(type)
| 742 | }; |
| 743 | |
| 744 | export const defaultWidthHeight = (type) => { |
| 745 | switch (type) { |
| 746 | case "signature": |
| 747 | return { width: 150, height: 60 }; |
| 748 | case "stamp": |
| 749 | return { width: 150, height: 60 }; |
| 750 | case "checkbox": |
| 751 | return { width: 15, height: 19 }; |
| 752 | case textInputWidget: |
| 753 | return { width: 150, height: 19 }; |
| 754 | case cellsWidget: |
| 755 | return { width: 112, height: 22 }; |
| 756 | case "dropdown": |
| 757 | return { width: 120, height: 22 }; |
| 758 | case "initials": |
| 759 | return { width: 50, height: 50 }; |
| 760 | case "name": |
| 761 | return { width: 150, height: 19 }; |
| 762 | case "company": |
| 763 | return { width: 150, height: 19 }; |
| 764 | case "job title": |
| 765 | return { width: 150, height: 19 }; |
| 766 | case "date": |
| 767 | return { width: 100, height: 20 }; |
| 768 | case "image": |
| 769 | return { width: 70, height: 70 }; |
| 770 | case "email": |
| 771 | return { width: 150, height: 19 }; |
| 772 | case radioButtonWidget: |
| 773 | return { width: 5, height: 10 }; |
| 774 | case textWidget: |
| 775 | return { width: 150, height: 19 }; |
| 776 | case drawWidget: |
| 777 | return { width: 150, height: 60 }; |
| 778 | default: |
| 779 | return { width: 150, height: 60 }; |
| 780 | } |
| 781 | }; |
| 782 | //convert url to base64 |
| 783 | export async function getBase64FromUrl(url, autosign) { |
| 784 | const data = await fetch(url); |
no outgoing calls
no test coverage detected