@verdocs/web-sdk 1.13.6 → 1.13.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Icons-a11fb3fc.js +84 -0
- package/dist/cjs/TemplateDocuments-e2e0e6b7.js +93 -0
- package/dist/cjs/{TemplateStore-df478971.js → TemplateStore-97e0b3f3.js} +1 -1
- package/dist/cjs/{index-67233b76.js → index-5e786db9.js} +10 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/verdocs-auth.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-build.cjs.entry.js +5 -7
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +56 -0
- package/dist/cjs/verdocs-floating-menu.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-loader.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
- package/dist/cjs/{verdocs-template-create_3.cjs.entry.js → verdocs-template-attachments_4.cjs.entry.js} +161 -22
- package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page.cjs.entry.js +3 -53
- package/dist/cjs/verdocs-template-name.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-properties.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +20 -17
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/controls/verdocs-file-chooser/verdocs-file-chooser.css +27 -0
- package/dist/collection/components/controls/verdocs-file-chooser/verdocs-file-chooser.js +93 -0
- package/dist/collection/components/controls/verdocs-file-chooser/verdocs-file-chooser.stories.js +10 -0
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.css +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +4 -3
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +22 -8
- package/dist/collection/components/templates/verdocs-template-attachments/verdocs-template-attachments.css +91 -5
- package/dist/collection/components/templates/verdocs-template-attachments/verdocs-template-attachments.js +140 -10
- package/dist/collection/components/templates/verdocs-template-attachments/verdocs-template-attachments.stories.js +2 -3
- package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +2 -2
- package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.stories.js +2 -3
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +14 -13
- package/dist/collection/components/templates/verdocs-template-name/verdocs-template-name.css +0 -40
- package/dist/collection/components/templates/verdocs-template-name/verdocs-template-name.stories.js +1 -2
- package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.js +1 -1
- package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.stories.js +1 -1
- package/dist/collection/components/templates/verdocs-template-reminders/verdocs-template-reminders.stories.js +1 -2
- package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +18 -15
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +7 -4
- package/dist/collection/utils/Icons.js +73 -0
- package/dist/components/Primitives.js +20 -0
- package/dist/components/TemplateDocuments.js +89 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/verdocs-auth.js +1 -1
- package/dist/components/verdocs-build.js +38 -23
- package/dist/components/verdocs-file-chooser.d.ts +11 -0
- package/dist/components/verdocs-file-chooser.js +6 -0
- package/dist/components/verdocs-file-chooser2.js +132 -0
- package/dist/components/verdocs-ok-dialog2.js +1 -1
- package/dist/components/verdocs-sign.js +2 -1
- package/dist/components/verdocs-template-attachments.js +1 -87
- package/dist/components/verdocs-template-attachments2.js +200 -0
- package/dist/components/verdocs-template-create2.js +2 -2
- package/dist/components/verdocs-template-document-page2.js +1 -51
- package/dist/components/verdocs-template-fields2.js +14 -13
- package/dist/components/verdocs-template-name.js +1 -1
- package/dist/components/verdocs-template-properties.js +1 -1
- package/dist/components/verdocs-template-role-properties2.js +18 -15
- package/dist/components/verdocs-template-roles2.js +7 -4
- package/dist/components/verdocs-view2.js +2 -20
- package/dist/docs.json +171 -8
- package/dist/esm/Icons-c29eb0fa.js +75 -0
- package/dist/esm/TemplateDocuments-6fd2f4e2.js +89 -0
- package/dist/esm/{TemplateStore-373c72a8.js → TemplateStore-17fa95d5.js} +1 -1
- package/dist/esm/{index-5260ed60.js → index-9ee0ca9f.js} +10 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/verdocs-auth.entry.js +2 -2
- package/dist/esm/verdocs-build.entry.js +5 -7
- package/dist/esm/verdocs-button-panel_3.entry.js +2 -2
- package/dist/esm/verdocs-button.entry.js +1 -1
- package/dist/esm/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-dropdown_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment.entry.js +1 -1
- package/dist/esm/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm/verdocs-field-date.entry.js +1 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm/verdocs-field-initial.entry.js +1 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm/verdocs-field-signature.entry.js +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm/verdocs-file-chooser_2.entry.js +51 -0
- package/dist/esm/verdocs-floating-menu.entry.js +1 -1
- package/dist/esm/verdocs-initial-dialog.entry.js +1 -1
- package/dist/esm/verdocs-kba-dialog.entry.js +1 -1
- package/dist/esm/verdocs-loader.entry.js +1 -1
- package/dist/esm/verdocs-ok-dialog.entry.js +2 -2
- package/dist/esm/verdocs-organization-card.entry.js +1 -1
- package/dist/esm/verdocs-preview.entry.js +2 -2
- package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm/verdocs-radio-button.entry.js +1 -1
- package/dist/esm/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +2 -2
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-signature-dialog.entry.js +1 -1
- package/dist/esm/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm/{verdocs-template-create_3.entry.js → verdocs-template-attachments_4.entry.js} +161 -23
- package/dist/esm/verdocs-template-card.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page.entry.js +2 -52
- package/dist/esm/verdocs-template-name.entry.js +3 -3
- package/dist/esm/verdocs-template-properties.entry.js +3 -3
- package/dist/esm/verdocs-template-reminders.entry.js +2 -2
- package/dist/esm/verdocs-template-role-properties_2.entry.js +20 -17
- package/dist/esm/verdocs-template-tags.entry.js +1 -1
- package/dist/esm/verdocs-template-visibility.entry.js +2 -2
- package/dist/esm/verdocs-toggle-button.entry.js +1 -1
- package/dist/esm/verdocs-toggle.entry.js +1 -1
- package/dist/esm/verdocs-toolbar-icon.entry.js +1 -1
- package/dist/esm/verdocs-upload-dialog.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +2 -2
- package/dist/esm-es5/Icons-c29eb0fa.js +1 -0
- package/dist/esm-es5/TemplateDocuments-6fd2f4e2.js +1 -0
- package/dist/esm-es5/{TemplateStore-373c72a8.js → TemplateStore-17fa95d5.js} +1 -1
- package/dist/esm-es5/{index-5260ed60.js → index-9ee0ca9f.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-floating-menu.entry.js +1 -1
- package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-loader.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-attachments_4.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
- package/dist/esm-es5/verdocs-toggle-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
- package/dist/esm-es5/verdocs-toolbar-icon.entry.js +1 -1
- package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-file-chooser/verdocs-file-chooser.d.ts +23 -0
- package/dist/types/components/controls/verdocs-file-chooser/verdocs-file-chooser.stories.d.ts +6 -0
- package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +3 -2
- package/dist/types/components/embeds/verdocs-build/verdocs-build.d.ts +8 -5
- package/dist/types/components/templates/verdocs-template-attachments/verdocs-template-attachments.d.ts +27 -2
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +2 -2
- package/dist/types/components.d.ts +49 -4
- package/dist/types/utils/Icons.d.ts +8 -0
- package/dist/verdocs-web-sdk/p-01a240ac.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-527f15bb.system.entry.js → p-056bec65.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1fc2dcb7.entry.js → p-07715513.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d4f2c4cd.entry.js → p-09382df0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ad6e9a9a.system.entry.js → p-09f756a2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1025430e.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-614368ee.system.entry.js → p-116c6981.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-499022e8.entry.js → p-12aac44a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-42fa6b2f.entry.js → p-13f80bb2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d595eba2.system.entry.js → p-149f9430.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1738fd08.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-6b693508.system.entry.js → p-18658f1f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7464fd3c.system.entry.js → p-1900bbbb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d1f80bd5.entry.js → p-1a666173.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2287f1bc.system.entry.js → p-237975c0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3ca6f68d.entry.js → p-263acb59.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5e3893ec.system.entry.js → p-26801979.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-16f3cd2d.system.entry.js → p-27c96690.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-07dac8d8.entry.js → p-29f2dfc9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0464731b.system.entry.js → p-2d31b931.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-798c0134.system.entry.js → p-2d36f297.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e59061aa.system.entry.js → p-2d40f2ba.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-77a2ec7e.entry.js → p-2d73b96f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1edbfaf5.entry.js → p-2e1b6646.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-2fa6de11.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3186b008.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-32547cde.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ebce4300.entry.js → p-385c9366.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-71a1576a.system.entry.js → p-3d521eb4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-97be89cf.entry.js → p-3fa5ce6b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1c75e276.entry.js → p-452d6537.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-455d16dc.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-f201e410.system.entry.js → p-4b7996e8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ac61df73.system.entry.js → p-4fdf4196.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-603db817.entry.js → p-4ff16721.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d714a804.system.entry.js → p-5544bdd4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-068e6212.entry.js → p-55a13b01.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-567a6e7c.js +1 -0
- package/dist/verdocs-web-sdk/{p-2fc46a8b.js → p-59a88b20.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a5970648.system.entry.js → p-5a851a3b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-895ca90d.system.entry.js → p-5d755377.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-da129971.entry.js → p-5e292135.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-637fee9b.js +1 -0
- package/dist/verdocs-web-sdk/{p-82854066.entry.js → p-63d89af6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-34eb8a38.entry.js → p-681c7361.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-438a5bfb.system.entry.js → p-6a26b4fd.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-db2b75bc.system.entry.js → p-6b3dd926.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-21ad4745.entry.js → p-6c12d567.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7ba0c530.system.entry.js → p-6c1817fa.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-6e9af353.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-78f732f3.system.entry.js → p-71de1985.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6ea848fe.system.entry.js → p-73875e21.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a5f3f29c.entry.js → p-73b44d44.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e9751ec7.entry.js → p-7416b77f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-658c3ab7.entry.js → p-7500179f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fc67ddc9.entry.js → p-753cdc95.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-756d5c24.entry.js → p-7aeb1f15.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-66c74103.system.js → p-7b2ca8ef.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d643db3b.entry.js → p-7ef23636.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-809947d4.system.entry.js → p-8ac409c5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0f065d24.system.entry.js → p-8c8960a3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-227d07a2.entry.js → p-8d998322.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e352d3f8.system.entry.js → p-8ebf7d74.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-37dd3108.system.entry.js → p-9258d861.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-eff8b358.entry.js → p-944996b2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-95119614.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-f0d1c6bd.system.entry.js → p-9a4124dd.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-9bafdd9f.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-07d80297.entry.js → p-a490803a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-137664e4.system.entry.js → p-a6da9fa8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-60548c5f.entry.js → p-a75f3b9a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f2f3583f.system.entry.js → p-a77f4093.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1db79af9.system.entry.js → p-a9e063bc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1e782b9d.entry.js → p-aabfb02a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-acb5e932.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-87f428fb.entry.js → p-ad7caefa.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1ea3753f.system.entry.js → p-adb73796.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a8003a10.system.entry.js → p-b2cb8889.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d936d293.system.entry.js → p-b3c3b7e8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e035df4b.js → p-b3dfe499.js} +2 -2
- package/dist/verdocs-web-sdk/{p-c2b91d4d.system.entry.js → p-bc7c1b67.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-920fd6d9.system.entry.js → p-be05977e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9cbe4bc7.system.entry.js → p-c42b7ca2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a3282274.system.entry.js → p-c45ee88f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ab6bd525.entry.js → p-c54d05db.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-47bba747.entry.js → p-c5fb045c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e16ad8fe.entry.js → p-c6547da0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3ef23762.system.entry.js → p-c8a56083.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-60b59333.system.entry.js → p-df691d95.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e312fbab.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9b9c0ae7.entry.js → p-e5fda62a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0714e785.entry.js → p-e78b7f2f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-ec7fc148.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-bd8ff2a6.entry.js → p-ed3d86cd.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-86e507c1.entry.js → p-ed6bc1ce.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9c36aaaa.entry.js → p-ed6c5982.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f1350ea7.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e9c9cdf5.entry.js → p-f1a773bf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f1c98c73.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ec6c0c40.system.entry.js → p-f23e0059.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8a84234f.entry.js → p-f6306a21.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7f13e92e.entry.js → p-f63b71ae.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a5a530fa.entry.js → p-f71a30f6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6f511c7b.entry.js → p-fa0123d2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-56bea00a.system.entry.js → p-fbee0760.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-aa3e3ffc.system.entry.js → p-fc64e091.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-871407e9.system.js → p-fd374620.system.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/verdocs-progress-bar.cjs.entry.js +0 -23
- package/dist/cjs/verdocs-template-attachments.cjs.entry.js +0 -64
- package/dist/esm/verdocs-progress-bar.entry.js +0 -19
- package/dist/esm/verdocs-template-attachments.entry.js +0 -60
- package/dist/esm-es5/verdocs-progress-bar.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-attachments.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-create_3.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-126c0301.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2413519c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-27332125.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5bb80e03.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6caf1137.system.js +0 -1
- package/dist/verdocs-web-sdk/p-7e8fe43e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-82512045.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-879e9572.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-91f062a8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ba591e02.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bcc9c2d8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bd35fd77.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c9ff6acb.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d28acca1.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d67b2a26.system.entry.js +0 -1
@@ -3,7 +3,7 @@ import { g as getSigningSession, t as throttledGetEnvelope, u as updateEnvelopeF
|
|
3
3
|
import { R as RecipientStates } from './Types.js';
|
4
4
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
5
5
|
import { a as isValidPhone, i as isValidEmail } from './Validators.js';
|
6
|
-
import { f as fullNameToInitials, i as integerSequence
|
6
|
+
import { f as fullNameToInitials, i as integerSequence } from './Primitives.js';
|
7
7
|
import { s as saveAttachment, u as updateDocumentFieldValue, a as getRoleIndex, r as renderDocumentField, b as getFieldId } from './utils.js';
|
8
8
|
import { S as SDKError } from './errors.js';
|
9
9
|
import { d as defineCustomElement$8 } from './verdocs-button2.js';
|
@@ -12,6 +12,7 @@ import { d as defineCustomElement$6 } from './verdocs-dropdown2.js';
|
|
12
12
|
import { d as defineCustomElement$5 } from './verdocs-envelope-document-page2.js';
|
13
13
|
import { d as defineCustomElement$4 } from './verdocs-loader2.js';
|
14
14
|
import { d as defineCustomElement$3 } from './verdocs-ok-dialog2.js';
|
15
|
+
import { d as defineCustomElement$2 } from './verdocs-view2.js';
|
15
16
|
|
16
17
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17
18
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
@@ -1,90 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import './Types.js';
|
3
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
4
|
-
import { g as getTemplateStore } from './TemplateStore.js';
|
5
|
-
import { S as SDKError } from './errors.js';
|
6
|
-
import { d as defineCustomElement$3 } from './verdocs-component-error2.js';
|
7
|
-
import { d as defineCustomElement$2 } from './verdocs-loader2.js';
|
8
|
-
|
9
|
-
const verdocsTemplateAttachmentsCss = "verdocs-template-attachments{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#4c56cb}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b;border:1px solid #cccccc}verdocs-template-attachments svg{width:24px;height:24px;fill:#5c6575;margin:2px 10px 0 0}";
|
10
|
-
|
11
|
-
const FileIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';
|
12
|
-
const VerdocsTemplateAttachments$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
13
|
-
constructor() {
|
14
|
-
super();
|
15
|
-
this.__registerHost();
|
16
|
-
this.close = createEvent(this, "close", 7);
|
17
|
-
this.sdkError = createEvent(this, "sdkError", 7);
|
18
|
-
this.store = null;
|
19
|
-
this.endpoint = VerdocsEndpoint.getDefault();
|
20
|
-
this.templateId = '';
|
21
|
-
}
|
22
|
-
async componentWillLoad() {
|
23
|
-
var _a, _b, _c;
|
24
|
-
try {
|
25
|
-
this.endpoint.loadSession();
|
26
|
-
if (!this.templateId) {
|
27
|
-
console.log(`[ROLES] Missing required template ID ${this.templateId}`);
|
28
|
-
return;
|
29
|
-
}
|
30
|
-
if (!this.endpoint.session) {
|
31
|
-
console.log('[ROLES] Unable to start builder session, must be authenticated');
|
32
|
-
return;
|
33
|
-
}
|
34
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId, false);
|
35
|
-
this.endpoint.loadSession();
|
36
|
-
}
|
37
|
-
catch (e) {
|
38
|
-
console.log('[TEMPLATE ATTACHMENTS] Error loading template', e);
|
39
|
-
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
40
|
-
}
|
41
|
-
}
|
42
|
-
render() {
|
43
|
-
var _a, _b;
|
44
|
-
if (!this.endpoint.session) {
|
45
|
-
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
46
|
-
}
|
47
|
-
const templateState = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state;
|
48
|
-
if (!templateState.isLoaded) {
|
49
|
-
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
50
|
-
}
|
51
|
-
// This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
|
52
|
-
// Checking
|
53
|
-
if (!this.endpoint.session || !templateState.profile_id) {
|
54
|
-
return h(Host, { class: "empty" });
|
55
|
-
}
|
56
|
-
return (h(Host, null, h("h5", null, "Attachments"), (_b = this.store) === null || _b === void 0 ? void 0 :
|
57
|
-
_b.state.template_documents.map(document => (h("div", { class: "attachment" }, h("span", { innerHTML: FileIcon }), document.name, " (", document.page_numbers, " page", document.page_numbers > 1 ? 's' : '', ")")))));
|
58
|
-
}
|
59
|
-
static get style() { return verdocsTemplateAttachmentsCss; }
|
60
|
-
}, [0, "verdocs-template-attachments", {
|
61
|
-
"endpoint": [16],
|
62
|
-
"templateId": [1, "template-id"]
|
63
|
-
}]);
|
64
|
-
function defineCustomElement$1() {
|
65
|
-
if (typeof customElements === "undefined") {
|
66
|
-
return;
|
67
|
-
}
|
68
|
-
const components = ["verdocs-template-attachments", "verdocs-component-error", "verdocs-loader"];
|
69
|
-
components.forEach(tagName => { switch (tagName) {
|
70
|
-
case "verdocs-template-attachments":
|
71
|
-
if (!customElements.get(tagName)) {
|
72
|
-
customElements.define(tagName, VerdocsTemplateAttachments$1);
|
73
|
-
}
|
74
|
-
break;
|
75
|
-
case "verdocs-component-error":
|
76
|
-
if (!customElements.get(tagName)) {
|
77
|
-
defineCustomElement$3();
|
78
|
-
}
|
79
|
-
break;
|
80
|
-
case "verdocs-loader":
|
81
|
-
if (!customElements.get(tagName)) {
|
82
|
-
defineCustomElement$2();
|
83
|
-
}
|
84
|
-
break;
|
85
|
-
} });
|
86
|
-
}
|
87
|
-
defineCustomElement$1();
|
1
|
+
import { V as VerdocsTemplateAttachments$1, d as defineCustomElement$1 } from './verdocs-template-attachments2.js';
|
88
2
|
|
89
3
|
const VerdocsTemplateAttachments = VerdocsTemplateAttachments$1;
|
90
4
|
const defineCustomElement = defineCustomElement$1;
|
@@ -0,0 +1,200 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
+
import './Types.js';
|
3
|
+
import { c as createTemplateDocument, d as deleteTemplateDocument } from './TemplateDocuments.js';
|
4
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
5
|
+
import { D as DocIcon, P as PngIcon, J as JpgIcon, a as PdfIcon, F as FileIcon, b as PageCountIcon, T as TrashIcon, d as defineCustomElement$4 } from './verdocs-file-chooser2.js';
|
6
|
+
import { g as getTemplateStore } from './TemplateStore.js';
|
7
|
+
import { S as SDKError } from './errors.js';
|
8
|
+
import { d as defineCustomElement$6 } from './verdocs-button2.js';
|
9
|
+
import { d as defineCustomElement$5 } from './verdocs-component-error2.js';
|
10
|
+
import { d as defineCustomElement$3 } from './verdocs-loader2.js';
|
11
|
+
import { d as defineCustomElement$2 } from './verdocs-ok-dialog2.js';
|
12
|
+
import { d as defineCustomElement$1 } from './verdocs-progress-bar2.js';
|
13
|
+
|
14
|
+
const verdocsTemplateAttachmentsCss = "verdocs-template-attachments{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}";
|
15
|
+
|
16
|
+
const VerdocsTemplateAttachments = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
17
|
+
constructor() {
|
18
|
+
super();
|
19
|
+
this.__registerHost();
|
20
|
+
this.exit = createEvent(this, "exit", 7);
|
21
|
+
this.next = createEvent(this, "next", 7);
|
22
|
+
this.templateUpdate = createEvent(this, "templateUpdate", 7);
|
23
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
24
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
25
|
+
this.templateId = '';
|
26
|
+
this.uploading = false;
|
27
|
+
this.progressLabel = 'Uploading...';
|
28
|
+
this.progressPercent = 0;
|
29
|
+
this.showDeleteError = false;
|
30
|
+
this.confirmDeleteDocument = null;
|
31
|
+
this.store = null;
|
32
|
+
}
|
33
|
+
async componentWillLoad() {
|
34
|
+
var _a, _b, _c;
|
35
|
+
try {
|
36
|
+
this.endpoint.loadSession();
|
37
|
+
if (!this.templateId) {
|
38
|
+
console.log(`[ROLES] Missing required template ID ${this.templateId}`);
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
if (!this.endpoint.session) {
|
42
|
+
console.log('[ROLES] Unable to start builder session, must be authenticated');
|
43
|
+
return;
|
44
|
+
}
|
45
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, false);
|
46
|
+
}
|
47
|
+
catch (e) {
|
48
|
+
console.log('[TEMPLATE ATTACHMENTS] Error loading template', e);
|
49
|
+
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
50
|
+
}
|
51
|
+
}
|
52
|
+
handleCancel(e) {
|
53
|
+
e.stopPropagation();
|
54
|
+
this.exit.emit();
|
55
|
+
}
|
56
|
+
handleUploadProgress(percent) {
|
57
|
+
if (percent >= 99) {
|
58
|
+
this.progressPercent = 100;
|
59
|
+
this.progressLabel = 'Processing...';
|
60
|
+
}
|
61
|
+
else {
|
62
|
+
this.progressPercent = percent;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
async handleUpload(e) {
|
66
|
+
var _a, _b, _c;
|
67
|
+
e.stopPropagation();
|
68
|
+
const file = e.detail.file;
|
69
|
+
if (!file) {
|
70
|
+
return;
|
71
|
+
}
|
72
|
+
console.log('[ATTACHMENTS] Uploading...', file);
|
73
|
+
this.uploading = true;
|
74
|
+
this.progressLabel = 'Uploading...';
|
75
|
+
try {
|
76
|
+
const template = await createTemplateDocument(this.endpoint, this.templateId, file, this.handleUploadProgress.bind(this));
|
77
|
+
console.log('[ATTACHMENTS] Created attachment', template);
|
78
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
79
|
+
console.log('[ATTACHMENTS] New template', this.store.state);
|
80
|
+
this.uploading = false;
|
81
|
+
this.progressLabel = '';
|
82
|
+
this.progressPercent = 0;
|
83
|
+
}
|
84
|
+
catch (e) {
|
85
|
+
console.log('[ATTACHMENTS] Error creating template', e);
|
86
|
+
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
87
|
+
this.uploading = false;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
handleNext(e) {
|
91
|
+
var _a;
|
92
|
+
e.stopPropagation();
|
93
|
+
this.uploading = false;
|
94
|
+
this.progressLabel = '';
|
95
|
+
this.progressPercent = 0;
|
96
|
+
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ template: this.store.state });
|
97
|
+
}
|
98
|
+
async confirmDelete() {
|
99
|
+
await deleteTemplateDocument(this.endpoint, this.templateId, this.confirmDeleteDocument.id);
|
100
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
101
|
+
console.log('[ATTACHMENTS] New template', this.store.state);
|
102
|
+
this.confirmDeleteDocument = null;
|
103
|
+
}
|
104
|
+
async handleDelete(document) {
|
105
|
+
var _a;
|
106
|
+
if (((_a = this.store.state) === null || _a === void 0 ? void 0 : _a.template_documents.length) > 1) {
|
107
|
+
this.confirmDeleteDocument = document;
|
108
|
+
}
|
109
|
+
else {
|
110
|
+
this.showDeleteError = true;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
getFileIcon(document) {
|
114
|
+
switch (document.mime) {
|
115
|
+
case 'application/pdf':
|
116
|
+
return PdfIcon;
|
117
|
+
case 'image/jpeg':
|
118
|
+
return JpgIcon;
|
119
|
+
case 'image/png':
|
120
|
+
return PngIcon;
|
121
|
+
case 'application/msword':
|
122
|
+
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
123
|
+
return DocIcon;
|
124
|
+
}
|
125
|
+
return FileIcon;
|
126
|
+
}
|
127
|
+
render() {
|
128
|
+
var _a, _b, _c;
|
129
|
+
if (!this.endpoint.session) {
|
130
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
131
|
+
}
|
132
|
+
const templateState = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state;
|
133
|
+
if (!templateState.isLoaded) {
|
134
|
+
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
135
|
+
}
|
136
|
+
// This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
|
137
|
+
if (!this.endpoint.session || !templateState.profile_id) {
|
138
|
+
return h(Host, { class: "empty" });
|
139
|
+
}
|
140
|
+
return (h(Host, null, h("h5", null, "Existing Attachments"), h("div", { class: "attachments" }, (_b = this.store) === null || _b === void 0 ? void 0 : _b.state.template_documents.map(document => (h("div", { class: "attachment" }, h("div", { class: "file-icon", innerHTML: this.getFileIcon(document) }), h("div", { class: "filename", title: document.name }, document.name), h("div", { class: "pages" }, h("div", { class: "count" }, document.page_numbers), h("div", { class: "pages-icon", innerHTML: PageCountIcon })), h("div", { class: "trash-icon", innerHTML: TrashIcon, onClick: () => this.handleDelete(document) }))))), h("h5", null, "Attach a New Document"), this.uploading ? (h("div", { class: "loader-wrapper" }, h("verdocs-loader", null), this.progressLabel && (h("div", { class: "progress-wrapper" }, h("verdocs-progress-bar", { showPercent: true, percent: this.progressPercent, label: this.progressLabel }))))) : (h("verdocs-file-chooser", { onFileSelected: e => this.handleUpload(e) })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e), disabled: this.uploading }), h("verdocs-button", { label: "Next", size: "small", onClick: e => this.handleNext(e), disabled: !((_c = this.store) === null || _c === void 0 ? void 0 : _c.state.template_documents.length) || this.uploading })), this.showDeleteError && (h("verdocs-ok-dialog", { heading: "Unable to Delete Attachment", message: "Templates must contain at least one attachment.", onNext: () => (this.showDeleteError = false) })), this.confirmDeleteDocument && (h("verdocs-ok-dialog", { heading: "Delete this Attachment?", message: "This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.", onNext: () => this.confirmDelete(), showCancel: true, onExit: () => {
|
141
|
+
this.confirmDeleteDocument = null;
|
142
|
+
} }))));
|
143
|
+
}
|
144
|
+
static get style() { return verdocsTemplateAttachmentsCss; }
|
145
|
+
}, [0, "verdocs-template-attachments", {
|
146
|
+
"endpoint": [16],
|
147
|
+
"templateId": [1, "template-id"],
|
148
|
+
"uploading": [32],
|
149
|
+
"progressLabel": [32],
|
150
|
+
"progressPercent": [32],
|
151
|
+
"showDeleteError": [32],
|
152
|
+
"confirmDeleteDocument": [32],
|
153
|
+
"store": [32]
|
154
|
+
}]);
|
155
|
+
function defineCustomElement() {
|
156
|
+
if (typeof customElements === "undefined") {
|
157
|
+
return;
|
158
|
+
}
|
159
|
+
const components = ["verdocs-template-attachments", "verdocs-button", "verdocs-component-error", "verdocs-file-chooser", "verdocs-loader", "verdocs-ok-dialog", "verdocs-progress-bar"];
|
160
|
+
components.forEach(tagName => { switch (tagName) {
|
161
|
+
case "verdocs-template-attachments":
|
162
|
+
if (!customElements.get(tagName)) {
|
163
|
+
customElements.define(tagName, VerdocsTemplateAttachments);
|
164
|
+
}
|
165
|
+
break;
|
166
|
+
case "verdocs-button":
|
167
|
+
if (!customElements.get(tagName)) {
|
168
|
+
defineCustomElement$6();
|
169
|
+
}
|
170
|
+
break;
|
171
|
+
case "verdocs-component-error":
|
172
|
+
if (!customElements.get(tagName)) {
|
173
|
+
defineCustomElement$5();
|
174
|
+
}
|
175
|
+
break;
|
176
|
+
case "verdocs-file-chooser":
|
177
|
+
if (!customElements.get(tagName)) {
|
178
|
+
defineCustomElement$4();
|
179
|
+
}
|
180
|
+
break;
|
181
|
+
case "verdocs-loader":
|
182
|
+
if (!customElements.get(tagName)) {
|
183
|
+
defineCustomElement$3();
|
184
|
+
}
|
185
|
+
break;
|
186
|
+
case "verdocs-ok-dialog":
|
187
|
+
if (!customElements.get(tagName)) {
|
188
|
+
defineCustomElement$2();
|
189
|
+
}
|
190
|
+
break;
|
191
|
+
case "verdocs-progress-bar":
|
192
|
+
if (!customElements.get(tagName)) {
|
193
|
+
defineCustomElement$1();
|
194
|
+
}
|
195
|
+
break;
|
196
|
+
} });
|
197
|
+
}
|
198
|
+
defineCustomElement();
|
199
|
+
|
200
|
+
export { VerdocsTemplateAttachments as V, defineCustomElement as d };
|
@@ -80,12 +80,12 @@ const VerdocsTemplateCreate = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
80
80
|
if (!this.endpoint.session) {
|
81
81
|
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
82
82
|
}
|
83
|
-
return (h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("input", { type: "file", id: "verdocs-template-create-file", multiple: true, accept: "application/pdf", style: { display: 'none' }, onChange: e => this.handleFileChanged(e) }), this.creating ? (h("div", { class: "loader-wrapper" }, h("verdocs-loader", null), this.progressLabel && (h("div", { class: "progress-wrapper" }, h("verdocs-progress-bar", { showPercent: true, percent: this.progressPercent, label: this.progressLabel }))))) : (h("div", { class: "upload-box" }, h("div", null, h("span", { innerHTML: FileIcon })), h("div", { style: { marginTop: '20px', fontSize: '20px', fontWeight: 'bold', overflowWrap: 'anywhere' } }, this.file ? this.file.name : 'Drag a file here'), h("div", { style: {
|
83
|
+
return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("input", { type: "file", id: "verdocs-template-create-file", multiple: true, accept: "application/pdf", style: { display: 'none' }, onChange: e => this.handleFileChanged(e) }), this.creating ? (h("div", { class: "loader-wrapper" }, h("verdocs-loader", null), this.progressLabel && (h("div", { class: "progress-wrapper" }, h("verdocs-progress-bar", { showPercent: true, percent: this.progressPercent, label: this.progressLabel }))))) : (h("div", { class: "upload-box" }, h("div", null, h("span", { innerHTML: FileIcon })), h("div", { style: { marginTop: '20px', fontSize: '20px', fontWeight: 'bold', overflowWrap: 'anywhere' } }, this.file ? this.file.name : 'Drag a file here'), h("div", { style: {
|
84
84
|
marginTop: '20px',
|
85
85
|
marginBottom: '20px',
|
86
86
|
fontSize: '16px',
|
87
87
|
height: '20px',
|
88
|
-
} }, this.file ? unicodeNBSP : 'Or, if you prefer...'), h("verdocs-button", { label: this.file ? 'Select a different file' : 'Select a file from your computer', size: "small", onClick: e => this.handleUpload(e) }))), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e), disabled: this.creating }), h("verdocs-button", { label: "Next", size: "small", onClick: e => this.handleSubmit(e), disabled: !this.file || this.creating }))));
|
88
|
+
} }, this.file ? unicodeNBSP : 'Or, if you prefer...'), h("verdocs-button", { label: this.file ? 'Select a different file' : 'Select a file from your computer', size: "small", onClick: e => this.handleUpload(e) }))), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e), disabled: this.creating }), h("verdocs-button", { label: "Next", size: "small", onClick: e => this.handleSubmit(e), disabled: !this.file || this.creating })))));
|
89
89
|
}
|
90
90
|
static get style() { return verdocsTemplateCreateCss; }
|
91
91
|
}, [0, "verdocs-template-create", {
|
@@ -1,59 +1,9 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import './Types.js';
|
3
|
+
import { g as getTemplateDocumentPageDisplayUri } from './TemplateDocuments.js';
|
3
4
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
4
5
|
import { t as throttle } from './utils.js';
|
5
6
|
|
6
|
-
/**
|
7
|
-
* A TemplateDocument represents a PDF or other attachment in a Template.
|
8
|
-
*
|
9
|
-
* @module
|
10
|
-
*/
|
11
|
-
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
18
|
-
});
|
19
|
-
};
|
20
|
-
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
21
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
22
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
23
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
24
|
-
function step(op) {
|
25
|
-
if (f) throw new TypeError("Generator is already executing.");
|
26
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
27
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
28
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
29
|
-
switch (op[0]) {
|
30
|
-
case 0: case 1: t = op; break;
|
31
|
-
case 4: _.label++; return { value: op[1], done: false };
|
32
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
33
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
34
|
-
default:
|
35
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
36
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
37
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
38
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
39
|
-
if (t[2]) _.ops.pop();
|
40
|
-
_.trys.pop(); continue;
|
41
|
-
}
|
42
|
-
op = body.call(thisArg, _);
|
43
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
44
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
45
|
-
}
|
46
|
-
};
|
47
|
-
/**
|
48
|
-
* Get a display URI for a given page in a file attached to a template document. These pages are rendered server-side
|
49
|
-
* into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are intended
|
50
|
-
* for DISPLAY ONLY, are not legally binding documents, and do not contain any encoded metadata from participants. The
|
51
|
-
* original asset may be obtained by calling `getTemplateDocumentFile()` or similar.
|
52
|
-
*/
|
53
|
-
var getTemplateDocumentPageDisplayUri = function (endpoint, templateId, documentId, page) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
54
|
-
return [2 /*return*/, endpoint.api.get("/templates/".concat(templateId, "/documents/").concat(documentId, "/pages/").concat(page, "/image")).then(function (r) { return r.data; })];
|
55
|
-
}); }); };
|
56
|
-
|
57
7
|
const verdocsTemplateDocumentPageCss = "verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}";
|
58
8
|
|
59
9
|
const VerdocsTemplateDocumentPage = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
@@ -3,6 +3,7 @@ import { i as interact } from './interact.min.js';
|
|
3
3
|
import './Types.js';
|
4
4
|
import { u as updateField, c as createField } from './Fields.js';
|
5
5
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
6
|
+
import { i as integerSequence } from './Primitives.js';
|
6
7
|
import { a as getRoleIndex, r as renderDocumentField, c as updateCssTransform, d as defaultWidth, e as defaultHeight } from './utils.js';
|
7
8
|
import { g as getTemplateStore, a as getRoleNames } from './TemplateStore.js';
|
8
9
|
import { S as SDKError } from './errors.js';
|
@@ -69,9 +70,9 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
69
70
|
return;
|
70
71
|
}
|
71
72
|
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
72
|
-
console.log(`[FIELDS]
|
73
|
+
console.log(`[FIELDS] Loaded template ${this.templateId}`, this.store.state);
|
73
74
|
this.selectedRoleName = ((_d = (_c = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.roles) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.name) || '';
|
74
|
-
console.log('Starting with role', this.selectedRoleName);
|
75
|
+
console.log('[FIELDS] Starting with role', this.selectedRoleName);
|
75
76
|
}
|
76
77
|
catch (e) {
|
77
78
|
console.log('[FIELDS] Error with preview session', e);
|
@@ -258,17 +259,18 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
258
259
|
const y = Math.floor(Math.min(Math.max(renderedHeight - viewY, 0) / yScale, yMax));
|
259
260
|
return { x, y };
|
260
261
|
}
|
261
|
-
async handleClickPage(e,
|
262
|
+
async handleClickPage(e, pageNumber) {
|
262
263
|
var _a, _b, _c;
|
263
264
|
if (this.placing) {
|
264
|
-
console.log('Placing field', this.placing,
|
265
|
-
|
265
|
+
console.log('Placing field', this.placing, pageNumber, e.offsetX, e.offsetY);
|
266
|
+
// console.log('Placing field', this.placing, page.sequence, e.offsetX, e.offsetY);
|
267
|
+
// const pageNumber = page.sequence;
|
266
268
|
const clickedX = e.offsetX;
|
267
269
|
const clickedY = e.offsetY;
|
268
270
|
const width = defaultWidth(this.placing);
|
269
271
|
const height = defaultHeight(this.placing);
|
270
272
|
const cachedPage = this.cachedPageInfo[pageNumber];
|
271
|
-
console.log('Cached page', cachedPage);
|
273
|
+
// console.log('Cached page', cachedPage);
|
272
274
|
const { naturalWidth = 612, naturalHeight = 792 } = cachedPage;
|
273
275
|
const coords = this.viewCoordinatesToPageCoordinates(clickedX, clickedY, pageNumber, naturalWidth - width, naturalHeight - height);
|
274
276
|
const x = Math.floor(coords.x);
|
@@ -363,7 +365,7 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
363
365
|
}
|
364
366
|
}
|
365
367
|
render() {
|
366
|
-
var _a, _b, _c, _d;
|
368
|
+
var _a, _b, _c, _d, _e;
|
367
369
|
if (!this.endpoint.session) {
|
368
370
|
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
369
371
|
}
|
@@ -371,9 +373,7 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
371
373
|
if (!((_a = this.store) === null || _a === void 0 ? void 0 : _a.state.isLoaded)) {
|
372
374
|
return (h(Host, null, h("verdocs-loader", null)));
|
373
375
|
}
|
374
|
-
const
|
375
|
-
pages.sort((a, b) => a.sequence - b.sequence);
|
376
|
-
const selectableRoles = (_d = (_c = this.store) === null || _c === void 0 ? void 0 : _c.state) === null || _d === void 0 ? void 0 : _d.roles.map(role => ({ value: role.name, label: role.name }));
|
376
|
+
const selectableRoles = (_c = (_b = this.store) === null || _b === void 0 ? void 0 : _b.state) === null || _c === void 0 ? void 0 : _c.roles.map(role => ({ value: role.name, label: role.name }));
|
377
377
|
return (h(Host, { class: this.placing ? { [`placing-${this.placing}`]: true } : {}, "data-r": this.rerender, onSubmit: () => {
|
378
378
|
console.log('onSubmit');
|
379
379
|
} }, h("div", { id: "verdocs-template-fields-toolbar" }, h("div", { class: "add-for" }, "Add field:"), h("verdocs-select-input", { value: this.selectedRoleName, options: selectableRoles, onInput: (e) => (this.selectedRoleName = e.target.value) }), menuOptions.map(option => (h("verdocs-toolbar-icon", { text: option.tooltip, icon: option.icon, onClick: () => {
|
@@ -381,11 +381,12 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
381
381
|
// We have empty tooltips on the separators, quick hack...
|
382
382
|
this.placing = option.id;
|
383
383
|
}
|
384
|
-
} })))), h("div", { class: "pages" },
|
385
|
-
|
384
|
+
} })))), h("div", { class: "pages" }, (((_e = (_d = this.store) === null || _d === void 0 ? void 0 : _d.state) === null || _e === void 0 ? void 0 : _e.template_documents) || []).map(document => {
|
385
|
+
const pageNumbers = integerSequence(1, document.page_numbers);
|
386
|
+
return pageNumbers.map(page => (h("verdocs-template-document-page", { templateId: this.templateId, documentId: document.id, pageNumber: page, virtualWidth: 612, virtualHeight: 792, onClick: (e) => this.handleClickPage(e, page), onPageRendered: e => this.handlePageRendered(e), layers: [
|
386
387
|
{ name: 'page', type: 'canvas' },
|
387
388
|
{ name: 'controls', type: 'div' },
|
388
|
-
] }));
|
389
|
+
] })));
|
389
390
|
}))));
|
390
391
|
}
|
391
392
|
static get style() { return verdocsTemplateFieldsCss; }
|
@@ -10,7 +10,7 @@ import { d as defineCustomElement$4 } from './verdocs-help-icon2.js';
|
|
10
10
|
import { d as defineCustomElement$3 } from './verdocs-loader2.js';
|
11
11
|
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
12
12
|
|
13
|
-
const verdocsTemplateNameCss = "
|
13
|
+
const verdocsTemplateNameCss = "";
|
14
14
|
|
15
15
|
const VerdocsTemplateName$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
16
16
|
constructor() {
|
@@ -40,7 +40,7 @@ const VerdocsTemplateProperties$1 = /*@__PURE__*/ proxyCustomElement(class exten
|
|
40
40
|
console.log('[PROPERTIES] Unable to start builder session, must be authenticated');
|
41
41
|
return;
|
42
42
|
}
|
43
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId,
|
43
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
44
44
|
this.name = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.name;
|
45
45
|
this.sendReminders = ((_d = (_c = this.store) === null || _c === void 0 ? void 0 : _c.state) === null || _d === void 0 ? void 0 : _d.reminder_id) !== null;
|
46
46
|
}
|
@@ -77,7 +77,7 @@ const VerdocsTemplateRoleProperties = /*@__PURE__*/ proxyCustomElement(class ext
|
|
77
77
|
this.email = editingRole.email;
|
78
78
|
this.phone = editingRole.phone;
|
79
79
|
this.allowDelegation = editingRole.delegator;
|
80
|
-
console.log('
|
80
|
+
console.log('[ROLES] Editing role', editingRole);
|
81
81
|
}
|
82
82
|
}
|
83
83
|
catch (e) {
|
@@ -103,23 +103,26 @@ const VerdocsTemplateRoleProperties = /*@__PURE__*/ proxyCustomElement(class ext
|
|
103
103
|
phone: this.phone,
|
104
104
|
delegator: this.allowDelegation,
|
105
105
|
})
|
106
|
-
.then(r => {
|
106
|
+
.then(async (r) => {
|
107
107
|
var _a;
|
108
|
-
console.log('Update result', r);
|
108
|
+
console.log('[ROLE_PROPERTIES] Update result', r);
|
109
109
|
this.saving = false;
|
110
110
|
this.dirty = false;
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
111
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
112
|
+
// this.sortTemplateRoles();
|
113
|
+
// this.renumberTemplateRoles();
|
114
|
+
// const newRoles = [...this.store.state.roles];
|
115
|
+
// newRoles.forEach(role => {
|
116
|
+
// if (role.name === this.roleName) {
|
117
|
+
// role.name = this.name;
|
118
|
+
// role.type = this.type;
|
119
|
+
// role.full_name = this.fullName;
|
120
|
+
// role.email = this.email;
|
121
|
+
// role.phone = this.phone;
|
122
|
+
// role.delegator = this.allowDelegation;
|
123
|
+
// }
|
124
|
+
// });
|
125
|
+
// this.store.state.roles = newRoles;
|
123
126
|
(_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
|
124
127
|
})
|
125
128
|
.catch(e => {
|
@@ -220,12 +220,15 @@ const VerdocsTemplateRoles = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
220
220
|
type: 'signer',
|
221
221
|
delegator: false,
|
222
222
|
})
|
223
|
-
.then(r => {
|
224
|
-
var _a, _b
|
223
|
+
.then(async (r) => {
|
224
|
+
var _a, _b;
|
225
225
|
console.log('[ROLES] Created role', r);
|
226
|
-
this.store
|
226
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
227
|
+
this.sortTemplateRoles();
|
227
228
|
this.renumberTemplateRoles();
|
228
|
-
|
229
|
+
// this.store.state.roles = [...this.store?.state.roles, r];
|
230
|
+
// this.renumberTemplateRoles();
|
231
|
+
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ event: 'created-role', endpoint: this.endpoint, template: (_b = this.store) === null || _b === void 0 ? void 0 : _b.state });
|
229
232
|
})
|
230
233
|
.catch(e => {
|
231
234
|
console.log('[ROLES] Error creating role', e);
|
@@ -2,6 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from
|
|
2
2
|
import { t as throttledGetEnvelope, d as cancelEnvelope } from './Envelopes.js';
|
3
3
|
import { E as EnvelopeStates } from './Types.js';
|
4
4
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
5
|
+
import { i as integerSequence } from './Primitives.js';
|
5
6
|
import { f as saveEnvelopesAsZip, h as saveCertificate, s as saveAttachment } from './utils.js';
|
6
7
|
import { S as SDKError } from './errors.js';
|
7
8
|
import { d as defineCustomElement$5 } from './verdocs-button2.js';
|
@@ -29,25 +30,6 @@ var userCanCancelEnvelope = function (session, envelope) {
|
|
29
30
|
envelope.status !== EnvelopeStates.CANCELED;
|
30
31
|
};
|
31
32
|
|
32
|
-
/**
|
33
|
-
* Create an array containing a sequence of integers, e.g. [START, START+1, START+2, ...] This is frequently useful
|
34
|
-
* in rendering operations when there is no source array to .map() across.
|
35
|
-
*/
|
36
|
-
var integerSequence = function (start, count) {
|
37
|
-
return Array(count)
|
38
|
-
.fill(1)
|
39
|
-
.map(function (_, index) { return index + start; });
|
40
|
-
};
|
41
|
-
/**
|
42
|
-
* Generate suggested initials for a full name, e.g. "John Doe" will yield "JD".
|
43
|
-
*/
|
44
|
-
var fullNameToInitials = function (name) {
|
45
|
-
return name
|
46
|
-
.split(' ')
|
47
|
-
.map(function (word) { return word[0]; })
|
48
|
-
.join('');
|
49
|
-
};
|
50
|
-
|
51
33
|
const verdocsViewCss = "verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}";
|
52
34
|
|
53
35
|
const VerdocsView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
@@ -251,4 +233,4 @@ function defineCustomElement() {
|
|
251
233
|
}
|
252
234
|
defineCustomElement();
|
253
235
|
|
254
|
-
export { VerdocsView as V, defineCustomElement as d
|
236
|
+
export { VerdocsView as V, defineCustomElement as d };
|