@verdocs/web-sdk 2.2.8 → 2.2.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/{EnvelopeStore-c2f0d4ca.js → EnvelopeStore-0abf204c.js} +1 -1
- package/dist/cjs/{TemplateStore-4041d8af.js → TemplateStore-a5fa2b0c.js} +1 -1
- package/dist/cjs/{index-1d5fc518.js → index-5463795e.js} +2 -0
- package/dist/cjs/{index-f664e4d0.js → index-f712049c.js} +1 -1
- package/dist/cjs/ipc-test.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +7 -9
- package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-button_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-checkbox_3.cjs.entry.js +1 -1
- package/dist/cjs/{verdocs-contact-picker.cjs.entry.js → verdocs-contact-picker_2.cjs.entry.js} +30 -1
- package/dist/cjs/verdocs-dialog_3.cjs.entry.js +5 -3
- package/dist/cjs/verdocs-dropdown.cjs.entry.js +60 -48
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +3 -3
- 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 +1 -1
- 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 +1 -1
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_6.cjs.entry.js +604 -0
- 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-settings-api-keys_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
- 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-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-create.cjs.entry.js +99 -0
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-toggle.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/components/controls/verdocs-dropdown/verdocs-dropdown.css +28 -27
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.js +67 -51
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.stories.js +1 -1
- package/dist/collection/components/controls/verdocs-table/verdocs-table.js +39 -2
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.css +44 -0
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +5 -7
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.stories.js +5 -1
- package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.css +34 -6
- package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +1 -1
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.css +1 -1
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.css +38 -7
- package/dist/components/Validators.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/components/verdocs-build.js +76 -42
- package/dist/components/verdocs-dropdown2.js +61 -50
- package/dist/components/verdocs-envelopes-list.js +2 -2
- package/dist/components/verdocs-preview.js +1 -92
- package/dist/{esm/verdocs-preview.entry.js → components/verdocs-preview2.js} +42 -19
- package/dist/components/verdocs-send.js +1 -163
- package/dist/{esm/verdocs-send.entry.js → components/verdocs-send2.js} +56 -21
- package/dist/components/verdocs-sign.js +2 -2
- package/dist/components/verdocs-table2.js +5 -3
- package/dist/components/verdocs-template-create.js +138 -1
- package/dist/components/verdocs-template-fields2.js +1 -1
- package/dist/components/verdocs-template-name.js +1 -126
- package/dist/{esm/verdocs-template-name.entry.js → components/verdocs-template-name2.js} +62 -13
- package/dist/components/verdocs-template-reminders.js +1 -194
- package/dist/{esm/verdocs-template-reminders.entry.js → components/verdocs-template-reminders2.js} +71 -14
- package/dist/components/verdocs-template-roles2.js +2 -2
- package/dist/components/verdocs-template-visibility.js +1 -120
- package/dist/{esm/verdocs-template-visibility.entry.js → components/verdocs-template-visibility2.js} +51 -13
- package/dist/components/verdocs-templates-list.js +1 -1
- package/dist/components/verdocs-view2.js +1 -1
- package/dist/docs.json +103 -29
- package/dist/esm/{EnvelopeStore-ca60f0ab.js → EnvelopeStore-7f484014.js} +1 -1
- package/dist/esm/{TemplateStore-01a9d18f.js → TemplateStore-e8cf5a15.js} +1 -1
- package/dist/esm/{Validators-f110bae2.js → Validators-16a2a43b.js} +1 -1
- package/dist/esm/{index-151c0874.js → index-172625c5.js} +2 -0
- package/dist/esm/{index-38d7bc0b.js → index-4439b0d1.js} +1 -1
- package/dist/esm/ipc-test.entry.js +3 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{utils-51d998e2.js → utils-c0cd0b91.js} +1 -1
- package/dist/esm/verdocs-activity-box.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +7 -9
- package/dist/esm/verdocs-button-panel_2.entry.js +3 -3
- package/dist/esm/verdocs-button_3.entry.js +1 -1
- package/dist/esm/verdocs-checkbox_3.entry.js +1 -1
- package/dist/esm/{verdocs-contact-picker.entry.js → verdocs-contact-picker_2.entry.js} +31 -3
- package/dist/esm/verdocs-dialog_3.entry.js +5 -3
- package/dist/esm/verdocs-dropdown.entry.js +60 -48
- package/dist/esm/verdocs-envelope-document-page.entry.js +2 -2
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +3 -3
- package/dist/esm/verdocs-envelope-sidebar.entry.js +3 -3
- package/dist/esm/verdocs-envelopes-list.entry.js +4 -4
- package/dist/esm/verdocs-field-attachment.entry.js +2 -2
- package/dist/esm/verdocs-field-checkbox.entry.js +2 -2
- package/dist/esm/verdocs-field-date.entry.js +2 -2
- package/dist/esm/verdocs-field-dropdown.entry.js +2 -2
- package/dist/esm/verdocs-field-initial.entry.js +2 -2
- package/dist/esm/verdocs-field-payment.entry.js +2 -2
- package/dist/esm/verdocs-field-radio-button.entry.js +2 -2
- package/dist/esm/verdocs-field-signature.entry.js +2 -2
- package/dist/esm/verdocs-field-textarea.entry.js +2 -2
- package/dist/esm/verdocs-field-textbox.entry.js +2 -2
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -2
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/verdocs-organization-card.entry.js +1 -1
- package/dist/esm/verdocs-pagination_3.entry.js +2 -2
- package/dist/esm/verdocs-preview_6.entry.js +595 -0
- 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-settings-api-keys_4.entry.js +2 -2
- package/dist/esm/verdocs-settings.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +3 -3
- 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-card.entry.js +1 -1
- package/dist/{components/verdocs-template-create2.js → esm/verdocs-template-create.entry.js} +11 -56
- package/dist/esm/verdocs-template-document-page_2.entry.js +2 -2
- package/dist/esm/verdocs-template-fields_4.entry.js +5 -5
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-template-tags.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +2 -2
- package/dist/esm/verdocs-toggle.entry.js +1 -1
- package/dist/esm/verdocs-upload-dialog.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +2 -2
- package/dist/esm/verdocs-web-sdk.js +2 -2
- package/dist/esm-es5/{EnvelopeStore-ca60f0ab.js → EnvelopeStore-7f484014.js} +1 -1
- package/dist/esm-es5/{TemplateStore-01a9d18f.js → TemplateStore-e8cf5a15.js} +1 -1
- package/dist/esm-es5/{Validators-f110bae2.js → Validators-16a2a43b.js} +1 -1
- package/dist/esm-es5/{index-151c0874.js → index-172625c5.js} +1 -1
- package/dist/esm-es5/{index-38d7bc0b.js → index-4439b0d1.js} +1 -1
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-51d998e2.js → utils-c0cd0b91.js} +1 -1
- package/dist/esm-es5/verdocs-activity-box.entry.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_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-button_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-dialog_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.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 -1
- 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-pagination_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js +1 -0
- 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-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings.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-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-create.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-toggle.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-dropdown/verdocs-dropdown.d.ts +3 -9
- package/dist/types/components/controls/verdocs-table/verdocs-table.d.ts +13 -0
- package/dist/types/components/embeds/verdocs-build/verdocs-build.d.ts +3 -3
- package/dist/types/components/embeds/verdocs-build/verdocs-build.stories.d.ts +4 -1
- package/dist/types/components.d.ts +14 -2
- package/dist/verdocs-web-sdk/{p-50adf449.system.entry.js → p-013d1556.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-02dc4501.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-b35f33a8.entry.js → p-04580be0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ff2d4284.system.entry.js → p-07696831.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fb9b8d32.system.entry.js → p-07b5f356.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3dcf8e41.entry.js → p-0b2102df.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-19860fa1.system.entry.js → p-0df9e6e1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c3c0376a.entry.js → p-0edfbbb9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6d3e0994.js → p-14b44491.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6d2082b7.system.js → p-1753f57b.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c7c021fe.system.entry.js → p-1d0342e6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9d2b75ac.entry.js → p-20986706.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e0a212a1.system.entry.js → p-21e137f0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-400a996a.system.entry.js → p-2284d430.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fb71f28a.system.entry.js → p-2549a794.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b48a2f14.entry.js → p-27ea3260.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2ea70113.entry.js → p-2b6e4f2a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-01ec9d6d.system.entry.js → p-2f739b03.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-353c7ff6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-aac295bd.entry.js → p-3a90098d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2c95d99b.system.js → p-3af6b910.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e2fa3015.entry.js → p-3c798272.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4b0a633d.entry.js → p-3da4fed1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-766f8b54.system.entry.js → p-4017b53a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-33d75280.system.entry.js → p-41cd34db.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-449f38bb.js → p-425707d0.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3a7d47ba.entry.js → p-428de4a5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-19a0fdf2.entry.js → p-42f27e8c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a00ea81e.entry.js → p-43a8df52.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cfead4df.entry.js → p-450a3908.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2bed90fd.system.entry.js → p-4583338b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ff850808.system.entry.js → p-45bee3f6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b650d3c1.system.entry.js → p-45d5e035.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-37c09dd4.system.entry.js → p-48c62137.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-49b06b42.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-afd6285f.system.entry.js → p-4a500a3f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-937cd171.system.entry.js → p-4f914da5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-205b6235.system.entry.js → p-4fd9a342.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2a969dc8.system.entry.js → p-506754d5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1fea7a7e.entry.js → p-51979353.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5d6c7546.system.entry.js → p-519893b0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c3f5b07e.entry.js → p-521a3fec.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-02bbfba3.system.entry.js → p-55b5233b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c556a377.system.entry.js → p-59cc4e99.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5ab837bf.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3fcfb333.system.entry.js → p-5c01f483.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5d57357e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-5cb78c1b.system.entry.js → p-64d4ec95.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-66cec042.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-686bf682.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3dac1048.js → p-6b9c285d.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f7fecffd.entry.js → p-6ccb86b6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7967b361.entry.js → p-6e39e5e9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a8cf70dd.entry.js → p-6ff8759f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5f57ec68.entry.js → p-71eefe0e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-21615f18.js → p-7648c449.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a2b83969.entry.js → p-77ecee31.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cd92a456.entry.js → p-78c9bc84.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-df90b36d.entry.js → p-78e4f430.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c98bb9f4.entry.js → p-79b0c643.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fea16530.entry.js → p-7bab7252.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6572cc71.system.entry.js → p-7bd5db75.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cef5dd3e.entry.js → p-7c7eee3b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3a0c5966.system.entry.js → p-7cb3209d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dbfa7aea.entry.js → p-7d5e91f5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-675c95e8.entry.js → p-7ec2b6c4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-670a2414.system.entry.js → p-7efaf5de.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-06e445b1.system.entry.js → p-7f669bb1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0e08012c.system.entry.js → p-83e80908.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4911d1f9.entry.js → p-84efd562.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7efdefa3.system.js → p-877c2b06.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e248947e.system.entry.js → p-883d60e1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7d6c3d5b.entry.js → p-8dd6bda5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-453bb85d.entry.js → p-9009e136.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-93eb4996.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ed38d3d2.entry.js → p-955f0375.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fb609f37.entry.js → p-965b66a8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a0ad315e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a167438a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a1e82d5a.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-af8e5bc9.system.entry.js → p-a5f450a1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c9fe8bad.system.entry.js → p-a6048cc9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f05e18ba.system.entry.js → p-a6475e9e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a894761f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-b64f9e64.system.entry.js → p-aad7ef50.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-eddc727f.system.entry.js → p-ab889005.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6cd5db91.system.entry.js → p-aba05f25.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-803924f3.entry.js → p-ad273610.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c23359af.system.entry.js → p-ae971bb4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8e83ea1e.entry.js → p-aeeb0ee3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-70a1cb8d.entry.js → p-b68d2dba.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-750b37cd.system.entry.js → p-b820b749.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-169fa979.system.js → p-b8c356b3.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bc943a21.entry.js → p-ba04698a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-000348a7.system.entry.js → p-ba87f33c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-bbb2afd0.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bbd400a5.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-460b9fab.entry.js → p-c41a65a9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3eacc51e.entry.js → p-cb9f22d7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-353d7e71.system.js → p-cd48750c.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3aac3218.system.entry.js → p-cd64b223.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-55af2ceb.js → p-d4d8858f.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e2d0d0cc.entry.js → p-e122fb40.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e1cad931.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-cb9985fe.entry.js → p-e27ec758.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e1942999.system.entry.js → p-e2fe0aa5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-607a2dfe.entry.js → p-e40dd4d1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e662f81b.js → p-e8ce0b6f.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4dc8cc71.system.entry.js → p-ecfa94fb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-96ca789b.system.entry.js → p-edabba6b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-42efc13c.entry.js → p-f08e52e4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f0e1d7a4.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-966f84ec.entry.js → p-f0f27520.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5080cdfc.entry.js → p-f2deae25.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-511d7177.entry.js → p-f520ee27.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c125f51e.system.entry.js → p-f69ced2b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fac26def.system.entry.js → p-f9e89b56.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2dbc05c6.system.js → p-fbb8023f.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 +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +0 -75
- package/dist/cjs/verdocs-send.cjs.entry.js +0 -134
- package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +0 -236
- package/dist/cjs/verdocs-template-name.cjs.entry.js +0 -83
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +0 -143
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +0 -88
- package/dist/cjs/verdocs-toggle-button.cjs.entry.js +0 -35
- package/dist/esm/verdocs-template-attachments_2.entry.js +0 -231
- package/dist/esm/verdocs-toggle-button.entry.js +0 -31
- package/dist/esm-es5/verdocs-contact-picker.entry.js +0 -1
- package/dist/esm-es5/verdocs-preview.entry.js +0 -1
- package/dist/esm-es5/verdocs-send.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-attachments_2.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-name.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-visibility.entry.js +0 -1
- package/dist/esm-es5/verdocs-toggle-button.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0331a582.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0378a336.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0578c85b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-05b7ba5b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-07dac402.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-17d27ba8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2dc36f82.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4f8dbb97.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5314386f.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-54e215c5.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5cae759a.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-647cdb84.system.js +0 -1
- package/dist/verdocs-web-sdk/p-752fe35b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7dd4ffcc.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8fdcf4a9.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a5ce9047.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b41338e5.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b49e1610.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bad42f2d.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c0e4c58b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c2e3d476.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c9e66410.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cea9f0ba.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-dc6e47a4.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ebe13a66.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f164307e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fd059523.entry.js +0 -1
@@ -1,88 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
const index = require('./index-1d5fc518.js');
|
6
|
-
require('./Types-f89f9116.js');
|
7
|
-
const VerdocsEndpoint = require('./VerdocsEndpoint-45deeb6a.js');
|
8
|
-
const Templates = require('./Templates-f6e75719.js');
|
9
|
-
const TemplateStore = require('./TemplateStore-4041d8af.js');
|
10
|
-
const errors = require('./errors-0396da3d.js');
|
11
|
-
require('./index-f664e4d0.js');
|
12
|
-
|
13
|
-
const verdocsTemplateVisibilityCss = "verdocs-template-visibility{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}";
|
14
|
-
|
15
|
-
const VerdocsTemplateVisibility = class {
|
16
|
-
constructor(hostRef) {
|
17
|
-
index.registerInstance(this, hostRef);
|
18
|
-
this.close = index.createEvent(this, "close", 7);
|
19
|
-
this.sdkError = index.createEvent(this, "sdkError", 7);
|
20
|
-
this.store = null;
|
21
|
-
this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
|
22
|
-
this.templateId = '';
|
23
|
-
this.dirty = false;
|
24
|
-
this.personal = false;
|
25
|
-
this.public = false;
|
26
|
-
}
|
27
|
-
async componentWillLoad() {
|
28
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
29
|
-
try {
|
30
|
-
this.endpoint.loadSession();
|
31
|
-
if (!this.templateId) {
|
32
|
-
console.log(`[VISIBILITY] Missing required template ID ${this.templateId}`);
|
33
|
-
return;
|
34
|
-
}
|
35
|
-
if (!this.endpoint.session) {
|
36
|
-
console.log('[VISIBILITY] Unable to start builder session, must be authenticated');
|
37
|
-
return;
|
38
|
-
}
|
39
|
-
this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, false);
|
40
|
-
this.personal = ((_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.is_personal) || true;
|
41
|
-
this.public = ((_d = (_c = this.store) === null || _c === void 0 ? void 0 : _c.state) === null || _d === void 0 ? void 0 : _d.is_public) || false;
|
42
|
-
this.dirty = false;
|
43
|
-
}
|
44
|
-
catch (e) {
|
45
|
-
console.log('[TEMPLATE VISIBILITY] Error loading template', e);
|
46
|
-
(_e = this.sdkError) === null || _e === void 0 ? void 0 : _e.emit(new errors.SDKError(e.message, (_f = e.response) === null || _f === void 0 ? void 0 : _f.status, (_g = e.response) === null || _g === void 0 ? void 0 : _g.data));
|
47
|
-
}
|
48
|
-
}
|
49
|
-
handleCancel(e) {
|
50
|
-
var _a, _b, _c, _d, _e;
|
51
|
-
e.stopPropagation();
|
52
|
-
this.personal = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.is_personal;
|
53
|
-
this.public = (_d = (_c = this.store) === null || _c === void 0 ? void 0 : _c.state) === null || _d === void 0 ? void 0 : _d.is_public;
|
54
|
-
this.dirty = false;
|
55
|
-
(_e = this.close) === null || _e === void 0 ? void 0 : _e.emit();
|
56
|
-
}
|
57
|
-
async handleSave(e) {
|
58
|
-
var _a, _b;
|
59
|
-
e.stopPropagation();
|
60
|
-
await Templates.updateTemplate(this.endpoint, this.templateId, { is_personal: this.personal, is_public: this.public });
|
61
|
-
if ((_a = this.store) === null || _a === void 0 ? void 0 : _a.state) {
|
62
|
-
this.store.state.is_personal = this.personal;
|
63
|
-
this.store.state.is_public = this.public;
|
64
|
-
}
|
65
|
-
this.dirty = false;
|
66
|
-
(_b = this.close) === null || _b === void 0 ? void 0 : _b.emit();
|
67
|
-
}
|
68
|
-
render() {
|
69
|
-
var _a, _b;
|
70
|
-
if (!this.endpoint.session) {
|
71
|
-
return (index.h(index.Host, null, index.h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
72
|
-
}
|
73
|
-
// This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
|
74
|
-
if (!this.endpoint.session || !((_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.isLoaded)) {
|
75
|
-
return index.h(index.Host, { class: "empty" });
|
76
|
-
}
|
77
|
-
return (index.h(index.Host, null, index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("h5", null, "Visibility"), index.h("div", { class: "input-row" }, index.h("label", { htmlFor: "verdocs-is-shared" }, "Shared"), index.h("verdocs-checkbox", { id: "verdocs-is-shared", name: "is-shared", checked: !this.personal, value: "on", onInput: (e) => {
|
78
|
-
this.personal = !e.target.checked;
|
79
|
-
this.dirty = true;
|
80
|
-
} })), index.h("div", { class: "description" }, "Shared templates are visible to other members of your Organization (if any)."), index.h("div", { class: "input-row" }, index.h("label", { htmlFor: "verdocs-is-public" }, "Public"), index.h("verdocs-checkbox", { id: "verdocs-is-public", name: "is-public", checked: this.public, value: "on", onInput: (e) => {
|
81
|
-
this.public = e.target.checked;
|
82
|
-
this.dirty = true;
|
83
|
-
} })), index.h("div", { class: "description" }, "Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."), index.h("div", { class: "buttons" }, index.h("verdocs-button", { size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), index.h("verdocs-button", { size: "small", label: "Save", disabled: !this.dirty, onClick: e => this.handleSave(e) })))));
|
84
|
-
}
|
85
|
-
};
|
86
|
-
VerdocsTemplateVisibility.style = verdocsTemplateVisibilityCss;
|
87
|
-
|
88
|
-
exports.verdocs_template_visibility = VerdocsTemplateVisibility;
|
@@ -1,35 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
const index = require('./index-1d5fc518.js');
|
6
|
-
|
7
|
-
const verdocsToggleButtonCss = "verdocs-toggle-button{font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}";
|
8
|
-
|
9
|
-
const VerdocsToggleButton = class {
|
10
|
-
constructor(hostRef) {
|
11
|
-
index.registerInstance(this, hostRef);
|
12
|
-
this.toggle = index.createEvent(this, "toggle", 7);
|
13
|
-
this.active = false;
|
14
|
-
this.icon = null;
|
15
|
-
this.label = null;
|
16
|
-
this.size = 'normal';
|
17
|
-
this._active = false;
|
18
|
-
}
|
19
|
-
componentWillLoad() {
|
20
|
-
this._active = this.active;
|
21
|
-
}
|
22
|
-
handleToggle(e) {
|
23
|
-
var _a;
|
24
|
-
e.stopPropagation();
|
25
|
-
const newState = !this._active;
|
26
|
-
this._active = newState;
|
27
|
-
(_a = this.toggle) === null || _a === void 0 ? void 0 : _a.emit({ active: newState });
|
28
|
-
}
|
29
|
-
render() {
|
30
|
-
return (index.h(index.Host, { class: `size-${this.size}` }, this.icon ? (index.h("button", { innerHTML: this.icon, class: { active: this._active }, onClick: e => this.handleToggle(e) })) : (index.h("button", { class: { active: this._active }, onClick: e => this.handleToggle(e) }, this.label))));
|
31
|
-
}
|
32
|
-
};
|
33
|
-
VerdocsToggleButton.style = verdocsToggleButtonCss;
|
34
|
-
|
35
|
-
exports.verdocs_toggle_button = VerdocsToggleButton;
|
@@ -1,231 +0,0 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-151c0874.js';
|
2
|
-
import './Types-5f31149e.js';
|
3
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
4
|
-
import { c as createTemplateDocument, d as deleteTemplateDocument } from './TemplateDocuments-6fd2f4e2.js';
|
5
|
-
import { D as DocIcon, P as PngIcon, J as JpgIcon, a as PdfIcon, F as FileIcon$1, b as PageCountIcon, T as TrashIcon } from './Icons-c29eb0fa.js';
|
6
|
-
import { g as getTemplateStore } from './TemplateStore-01a9d18f.js';
|
7
|
-
import { S as SDKError } from './errors-9b5498c8.js';
|
8
|
-
import { c as createTemplate } from './Templates-f90883f7.js';
|
9
|
-
import './index-38d7bc0b.js';
|
10
|
-
|
11
|
-
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}";
|
12
|
-
|
13
|
-
const VerdocsTemplateAttachments = class {
|
14
|
-
constructor(hostRef) {
|
15
|
-
registerInstance(this, hostRef);
|
16
|
-
this.exit = createEvent(this, "exit", 7);
|
17
|
-
this.next = createEvent(this, "next", 7);
|
18
|
-
this.templateUpdate = createEvent(this, "templateUpdate", 7);
|
19
|
-
this.sdkError = createEvent(this, "sdkError", 7);
|
20
|
-
this.endpoint = VerdocsEndpoint.getDefault();
|
21
|
-
this.templateId = '';
|
22
|
-
this.uploading = false;
|
23
|
-
this.progressLabel = 'Uploading...';
|
24
|
-
this.progressPercent = 0;
|
25
|
-
this.showDeleteError = false;
|
26
|
-
this.confirmDeleteDocument = null;
|
27
|
-
this.store = null;
|
28
|
-
}
|
29
|
-
async componentWillLoad() {
|
30
|
-
var _a, _b, _c;
|
31
|
-
try {
|
32
|
-
this.endpoint.loadSession();
|
33
|
-
if (!this.templateId) {
|
34
|
-
console.log(`[ROLES] Missing required template ID ${this.templateId}`);
|
35
|
-
return;
|
36
|
-
}
|
37
|
-
if (!this.endpoint.session) {
|
38
|
-
console.log('[ROLES] Unable to start builder session, must be authenticated');
|
39
|
-
return;
|
40
|
-
}
|
41
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId, false);
|
42
|
-
}
|
43
|
-
catch (e) {
|
44
|
-
console.log('[TEMPLATE ATTACHMENTS] Error loading template', e);
|
45
|
-
(_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));
|
46
|
-
}
|
47
|
-
}
|
48
|
-
handleCancel(e) {
|
49
|
-
e.stopPropagation();
|
50
|
-
this.exit.emit();
|
51
|
-
}
|
52
|
-
handleUploadProgress(percent) {
|
53
|
-
if (percent >= 99) {
|
54
|
-
this.progressPercent = 100;
|
55
|
-
this.progressLabel = 'Processing...';
|
56
|
-
}
|
57
|
-
else {
|
58
|
-
this.progressPercent = percent;
|
59
|
-
}
|
60
|
-
}
|
61
|
-
async handleUpload(e) {
|
62
|
-
var _a, _b, _c;
|
63
|
-
e.stopPropagation();
|
64
|
-
const file = e.detail.file;
|
65
|
-
if (!file) {
|
66
|
-
return;
|
67
|
-
}
|
68
|
-
console.log('[ATTACHMENTS] Uploading...', file);
|
69
|
-
this.uploading = true;
|
70
|
-
this.progressLabel = 'Uploading...';
|
71
|
-
try {
|
72
|
-
const template = await createTemplateDocument(this.endpoint, this.templateId, file, this.handleUploadProgress.bind(this));
|
73
|
-
console.log('[ATTACHMENTS] Created attachment', template);
|
74
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
75
|
-
console.log('[ATTACHMENTS] New template', this.store.state);
|
76
|
-
this.uploading = false;
|
77
|
-
this.progressLabel = '';
|
78
|
-
this.progressPercent = 0;
|
79
|
-
}
|
80
|
-
catch (e) {
|
81
|
-
console.log('[ATTACHMENTS] Error creating template', e);
|
82
|
-
(_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));
|
83
|
-
this.uploading = false;
|
84
|
-
}
|
85
|
-
}
|
86
|
-
handleNext(e) {
|
87
|
-
var _a;
|
88
|
-
e.stopPropagation();
|
89
|
-
this.uploading = false;
|
90
|
-
this.progressLabel = '';
|
91
|
-
this.progressPercent = 0;
|
92
|
-
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ template: this.store.state });
|
93
|
-
}
|
94
|
-
async confirmDelete() {
|
95
|
-
await deleteTemplateDocument(this.endpoint, this.templateId, this.confirmDeleteDocument.id);
|
96
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
97
|
-
console.log('[ATTACHMENTS] New template', this.store.state);
|
98
|
-
this.confirmDeleteDocument = null;
|
99
|
-
}
|
100
|
-
async handleDelete(document) {
|
101
|
-
var _a;
|
102
|
-
if (((_a = this.store.state) === null || _a === void 0 ? void 0 : _a.template_documents.length) > 1) {
|
103
|
-
this.confirmDeleteDocument = document;
|
104
|
-
}
|
105
|
-
else {
|
106
|
-
this.showDeleteError = true;
|
107
|
-
}
|
108
|
-
}
|
109
|
-
getFileIcon(document) {
|
110
|
-
switch (document.mime) {
|
111
|
-
case 'application/pdf':
|
112
|
-
return PdfIcon;
|
113
|
-
case 'image/jpeg':
|
114
|
-
return JpgIcon;
|
115
|
-
case 'image/png':
|
116
|
-
return PngIcon;
|
117
|
-
case 'application/msword':
|
118
|
-
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
119
|
-
return DocIcon;
|
120
|
-
}
|
121
|
-
return FileIcon$1;
|
122
|
-
}
|
123
|
-
render() {
|
124
|
-
var _a, _b, _c;
|
125
|
-
if (!this.endpoint.session) {
|
126
|
-
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
127
|
-
}
|
128
|
-
const templateState = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state;
|
129
|
-
if (!templateState.isLoaded) {
|
130
|
-
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
131
|
-
}
|
132
|
-
// This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
|
133
|
-
if (!this.endpoint.session || !templateState.profile_id) {
|
134
|
-
return h(Host, { class: "empty" });
|
135
|
-
}
|
136
|
-
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: () => {
|
137
|
-
this.confirmDeleteDocument = null;
|
138
|
-
} }))));
|
139
|
-
}
|
140
|
-
};
|
141
|
-
VerdocsTemplateAttachments.style = verdocsTemplateAttachmentsCss;
|
142
|
-
|
143
|
-
const verdocsTemplateCreateCss = "verdocs-template-create{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .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-create .progress-wrapper{padding:20px}verdocs-template-create .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-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}";
|
144
|
-
|
145
|
-
const unicodeNBSP = ' ';
|
146
|
-
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>';
|
147
|
-
const VerdocsTemplateCreate = class {
|
148
|
-
constructor(hostRef) {
|
149
|
-
registerInstance(this, hostRef);
|
150
|
-
this.exit = createEvent(this, "exit", 7);
|
151
|
-
this.next = createEvent(this, "next", 7);
|
152
|
-
this.sdkError = createEvent(this, "sdkError", 7);
|
153
|
-
this.endpoint = VerdocsEndpoint.getDefault();
|
154
|
-
this.file = undefined;
|
155
|
-
this.creating = false;
|
156
|
-
this.progressLabel = 'Uploading...';
|
157
|
-
this.progressPercent = 0;
|
158
|
-
}
|
159
|
-
componentWillLoad() {
|
160
|
-
this.endpoint.setTimeout(30000);
|
161
|
-
this.endpoint.loadSession();
|
162
|
-
}
|
163
|
-
handleFileChanged(e) {
|
164
|
-
var _a;
|
165
|
-
this.file = ((_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) || null;
|
166
|
-
console.log('[CREATE] Selected file', this.file);
|
167
|
-
// this.filePath = e.target.files?.[0]?.name;
|
168
|
-
}
|
169
|
-
handleUpload(e) {
|
170
|
-
e.stopPropagation();
|
171
|
-
const fileElem = document.getElementById('verdocs-template-create-file');
|
172
|
-
fileElem.click();
|
173
|
-
}
|
174
|
-
handleCancel(e) {
|
175
|
-
e.stopPropagation();
|
176
|
-
this.exit.emit();
|
177
|
-
}
|
178
|
-
async handleSubmit(e) {
|
179
|
-
var _a, _b, _c, _d;
|
180
|
-
e.stopPropagation();
|
181
|
-
console.log('Submitting');
|
182
|
-
// Should be true if we're here because onClick is only enabled then. We're just guarding this for Typescript.
|
183
|
-
if (!this.file) {
|
184
|
-
return;
|
185
|
-
}
|
186
|
-
this.creating = true;
|
187
|
-
this.progressLabel = 'Uploading...';
|
188
|
-
try {
|
189
|
-
const template = await createTemplate(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
|
190
|
-
if (percent >= 99) {
|
191
|
-
this.progressLabel = 'Processing...';
|
192
|
-
this.progressPercent = 100;
|
193
|
-
}
|
194
|
-
else {
|
195
|
-
this.progressPercent = percent;
|
196
|
-
}
|
197
|
-
});
|
198
|
-
console.log('[CREATE] Created template', template);
|
199
|
-
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit(template);
|
200
|
-
this.creating = false;
|
201
|
-
this.progressLabel = '';
|
202
|
-
this.progressPercent = 0;
|
203
|
-
}
|
204
|
-
catch (e) {
|
205
|
-
console.log('[CREATE] Error creating template', e);
|
206
|
-
(_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
|
207
|
-
this.creating = false;
|
208
|
-
}
|
209
|
-
}
|
210
|
-
render() {
|
211
|
-
if (!this.endpoint.session) {
|
212
|
-
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
213
|
-
}
|
214
|
-
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", onDrop: (e) => {
|
215
|
-
e.preventDefault();
|
216
|
-
e.target.classList.remove('drag-over');
|
217
|
-
this.file = e.dataTransfer.files[0];
|
218
|
-
}, onDragOver: (e) => {
|
219
|
-
e.preventDefault();
|
220
|
-
e.dataTransfer.dropEffect = 'copy';
|
221
|
-
}, onDragEnter: (e) => e.target.classList.add('drag-over'), onDragLeave: (e) => e.target.classList.remove('drag-over') }, 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: {
|
222
|
-
marginTop: '20px',
|
223
|
-
marginBottom: '20px',
|
224
|
-
fontSize: '16px',
|
225
|
-
height: '20px',
|
226
|
-
} }, 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 })))));
|
227
|
-
}
|
228
|
-
};
|
229
|
-
VerdocsTemplateCreate.style = verdocsTemplateCreateCss;
|
230
|
-
|
231
|
-
export { VerdocsTemplateAttachments as verdocs_template_attachments, VerdocsTemplateCreate as verdocs_template_create };
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-151c0874.js';
|
2
|
-
|
3
|
-
const verdocsToggleButtonCss = "verdocs-toggle-button{font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}";
|
4
|
-
|
5
|
-
const VerdocsToggleButton = class {
|
6
|
-
constructor(hostRef) {
|
7
|
-
registerInstance(this, hostRef);
|
8
|
-
this.toggle = createEvent(this, "toggle", 7);
|
9
|
-
this.active = false;
|
10
|
-
this.icon = null;
|
11
|
-
this.label = null;
|
12
|
-
this.size = 'normal';
|
13
|
-
this._active = false;
|
14
|
-
}
|
15
|
-
componentWillLoad() {
|
16
|
-
this._active = this.active;
|
17
|
-
}
|
18
|
-
handleToggle(e) {
|
19
|
-
var _a;
|
20
|
-
e.stopPropagation();
|
21
|
-
const newState = !this._active;
|
22
|
-
this._active = newState;
|
23
|
-
(_a = this.toggle) === null || _a === void 0 ? void 0 : _a.emit({ active: newState });
|
24
|
-
}
|
25
|
-
render() {
|
26
|
-
return (h(Host, { class: `size-${this.size}` }, this.icon ? (h("button", { innerHTML: this.icon, class: { active: this._active }, onClick: e => this.handleToggle(e) })) : (h("button", { class: { active: this._active }, onClick: e => this.handleToggle(e) }, this.label))));
|
27
|
-
}
|
28
|
-
};
|
29
|
-
VerdocsToggleButton.style = verdocsToggleButtonCss;
|
30
|
-
|
31
|
-
export { VerdocsToggleButton as verdocs_toggle_button };
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as registerInstance,c as createEvent,h}from"./index-151c0874.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-d58d5544.js";import{d as convertToE164}from"./utils-51d998e2.js";import"./_commonjsHelpers-5ec8f9b7.js";import"./Envelopes-5e32159f.js";import"./Files-70a192df.js";import"./Types-de18e225.js";import"./index-914ed6f7.js";var verdocsContactPickerCss='verdocs-contact-picker{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;background-color:#ffffff}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';var messageIcon='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';var delegateIcon='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>';var placeholderIcon='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>';var VerdocsContactPicker=function(){function e(e){registerInstance(this,e);this.searchContacts=createEvent(this,"searchContacts",7);this.exit=createEvent(this,"exit",7);this.next=createEvent(this,"next",7);this.endpoint=VerdocsEndpoint.getDefault();this.templateRole=null;this.contactSuggestions=[];this.name=undefined;this.email=undefined;this.phone=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.nameFieldId="verdocs-contact-picker-name-".concat(Math.random().toString(36).substring(2,11));this.emailFieldId="verdocs-contact-picker-email-".concat(Math.random().toString(36).substring(2,11));this.phoneFieldId="verdocs-contact-picker-phone-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentWillLoad=function(){if(this.templateRole){this.name=this.templateRole.full_name||"";this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!==""}};e.prototype.handleNameChange=function(e){var t;this.name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.name})};e.prototype.handleEmailChange=function(e){this.email=e.target.value};e.prototype.handlePhoneChange=function(e){this.phone=convertToE164(e.target.value)};e.prototype.handleMessageChange=function(e){this.message=e.target.value};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})};e.prototype.handleSelectSuggestion=function(e,t){e.stopPropagation();this.name=t.name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;return h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{class:"row"},h("label",{htmlFor:this.nameFieldId},"Name:"),h("input",{id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:function(){var t;return e.showSuggestions=((t=e.contactSuggestions)===null||t===void 0?void 0:t.length)>0},onInput:function(t){return e.handleNameChange(t)}}),this.showSuggestions&&h("div",{class:"dropdown"},this.contactSuggestions.map((function(t){var o;return h("div",{key:(o=t.id)!==null&&o!==void 0?o:t.name,class:"suggestion",onClick:function(o){return e.handleSelectSuggestion(o,t)}},t.avatar?h("img",{alt:"Avatar",class:"avatar",src:t.avatar}):h("div",{class:"avatar",innerHTML:placeholderIcon}),h("div",{class:"details"},h("div",{class:"name"},t.name),t.email&&h("div",{class:"destination"},t.email),t.phone&&h("div",{class:"destination"},t.phone)))})))),h("div",{class:"row"},h("label",{htmlFor:this.emailFieldId},"Email:"),h("input",{id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email Address...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleEmailChange(t)}})),h("div",{class:"row"},h("label",{htmlFor:this.phoneFieldId},"Phone:"),h("input",{id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handlePhoneChange(t)}})),this.showMessage&&h("div",{class:"row"},h("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),h("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleMessageChange(t)}})),h("div",{class:"buttons"},h("verdocs-toggle-button",{icon:messageIcon,size:"small",active:this.showMessage,onToggle:function(t){e.showMessage=t.detail.active;e.showSuggestions=false}}),h("verdocs-toggle-button",{icon:delegateIcon,size:"small",active:this.delegator,onToggle:function(t){e.delegator=t.detail.active;e.showSuggestions=false}}),h("div",{class:"flex-fill"}),h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}();VerdocsContactPicker.style=verdocsContactPickerCss;export{VerdocsContactPicker as verdocs_contact_picker};
|
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,n){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-151c0874.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-d58d5544.js";import{r as renderDocumentField,a as getRoleIndex}from"./utils-51d998e2.js";import{g as getTemplateStore,a as getRoleNames}from"./TemplateStore-01a9d18f.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./_commonjsHelpers-5ec8f9b7.js";import"./Envelopes-5e32159f.js";import"./Files-70a192df.js";import"./Types-de18e225.js";import"./index-914ed6f7.js";import"./index-38d7bc0b.js";import"./Templates-f90883f7.js";var verdocsPreviewCss='verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';var VerdocsPreview=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,n,o;return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[PREVIEW] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[PREVIEW] Unable to start builder session, must be authenticated");return[2]}n=this;return[4,getTemplateStore(this.endpoint,this.templateId,true)];case 1:n.store=i.sent();console.log("[PREVIEW] Loading template ".concat(this.templateId),this.endpoint.session);return[3,3];case 2:o=i.sent();console.log("[PREVIEW] Error with preview session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(r=o.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handlePageRendered=function(e){var t=this;var r,n;var o=e.detail;var i=(n=(r=this.store)===null||r===void 0?void 0:r.state)===null||n===void 0?void 0:n.fields.filter((function(e){return e.page_sequence===o.pageNumber}));i.forEach((function(e){return renderDocumentField(e,o,getRoleIndex(getRoleNames(t.store),e.role_name),{disabled:true,editable:false,draggable:false})}))};e.prototype.render=function(){var e=this;var t,r,n,o;if(!((r=(t=this.store)===null||t===void 0?void 0:t.state)===null||r===void 0?void 0:r.isLoaded)){return h(Host,null,h("verdocs-loader",null))}var i=__spreadArray([],(o=(n=this.store)===null||n===void 0?void 0:n.state)===null||o===void 0?void 0:o.pages,true);i.sort((function(e,t){return e.sequence-t.sequence}));return h(Host,null,i.map((function(t){return h("verdocs-template-document-page",{templateId:t.template_id,documentId:t.document_id,pageNumber:t.sequence,virtualWidth:612,virtualHeight:792,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))};return e}();VerdocsPreview.style=verdocsPreviewCss;export{VerdocsPreview as verdocs_preview};
|
@@ -1 +0,0 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++){t=arguments[o];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,o,n){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function r(e){try{a(n.next(e))}catch(e){s(e)}}function l(e){try{a(n["throw"](e))}catch(e){s(e)}}function a(e){e.done?o(e.value):i(e.value).then(r,l)}a((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return a([e,t])}}function a(r){if(n)throw new TypeError("Generator is already executing.");while(o)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:o.label++;return{value:r[1],done:false};case 5:o.label++;i=r[1];r=[0];continue;case 7:r=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){o=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(r[0]===6&&o.label<s[1]){o.label=s[1];s=r;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(r);break}if(s[2])o.ops.pop();o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-151c0874.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-d58d5544.js";import{i as isValidEmail,a as isValidPhone}from"./Validators-f110bae2.js";import{g as getRGBA}from"./Colors-1b298092.js";import{g as getTemplateStore}from"./TemplateStore-01a9d18f.js";import{a as getRoleIndex}from"./utils-51d998e2.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./index-38d7bc0b.js";import"./Templates-f90883f7.js";import"./_commonjsHelpers-5ec8f9b7.js";import"./Envelopes-5e32159f.js";import"./Files-70a192df.js";import"./Types-de18e225.js";import"./index-914ed6f7.js";var verdocsSendCss='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';var editIcon='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';var startIcon='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var stepIcon='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var doneIcon='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var VerdocsSend=function(){function e(e){registerInstance(this,e);this.send=createEvent(this,"send",7);this.exit=createEvent(this,"exit",7);this.sdkError=createEvent(this,"sdkError",7);this.searchContacts=createEvent(this,"searchContacts",7);this.levels=[];this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.rolesCompleted={}}e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rolesCompleted={};return[2]}))}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,n,i,s,r,l,a,d,c,p,u,v;return __generator(this,(function(h){switch(h.label){case 0:h.trys.push([0,2,,3]);c=this.endpoint.loadSession();if(!this.templateId){console.log("[SEND] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SEND] Unable to start builder session, must be authenticated");return[2]}p=this;return[4,getTemplateStore(this.endpoint,this.templateId,true)];case 1:p.store=h.sent();if(!((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_sendable)){console.warn("[SEND] Template is not sendable",this.templateId)}if((n=(o=this.store)===null||o===void 0?void 0:o.state)===null||n===void 0?void 0:n.roles){u={};this.rolesCompleted={};(s=(i=this.store)===null||i===void 0?void 0:i.state)===null||s===void 0?void 0:s.roles.forEach((function(e){var t=e.sequence-1;u[t]||(u[t]=[]);var o="r-".concat(t,"-").concat(u[t].length);u[t].push(__assign(__assign({},e),{id:o}))}));this.rolesAtLevel=u;this.levels=Object.keys(u).map((function(e){return+e}));this.levels.sort((function(e,t){return e-t}))}if((r=c===null||c===void 0?void 0:c.session)===null||r===void 0?void 0:r.profile){this.sessionContacts.push({id:c.session.profile.id,name:"".concat(c.session.profile.first_name," ").concat(c.session.profile.last_name),email:c.session.profile.email,phone:c.session.profile.phone})}return[3,3];case 2:v=h.sent();console.log("[SEND] Error with preview session",v);(l=this.sdkError)===null||l===void 0?void 0:l.emit(new SDKError(v.message,(a=v.response)===null||a===void 0?void 0:a.status,(d=v.response)===null||d===void 0?void 0:d.data));return[3,3];case 3:return[2]}}))}))};e.prototype.getLevelIcon=function(e){if(e<0){return h("div",{class:"level-icon",innerHTML:startIcon})}else if(e>=this.levels.length){return h("div",{class:"level-icon",innerHTML:doneIcon})}else{return h("div",{class:"level-icon",innerHTML:stepIcon})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.rolesCompleted[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t,o,n;e.stopPropagation();(t=this.send)===null||t===void 0?void 0:t.emit({roles:Object.values(this.rolesCompleted),name:(n=(o=this.store)===null||o===void 0?void 0:o.state)===null||n===void 0?void 0:n.name,template_id:this.templateId})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t,o,n,i;var s=(((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.roles)||[]).map((function(e){return e.name}))||[];var r=Object.values(this.rolesCompleted).filter((function(e){return isValidEmail(e.email)||isValidPhone(e.phone)}));var l=r.length>=s.length;return h(Host,{class:{sendable:(i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.is_sendable}},h("div",{class:"recipients"},h("div",{class:"left-line"}),h("div",{class:"level level-start"},this.getLevelIcon(-1),h("div",{class:"complete"},"Send Envelope")),this.levels.map((function(t){return h("div",{class:"level level-".concat(t)},e.getLevelIcon(t),e.rolesAtLevel[t].map((function(t){var o,n,i,r,l,a;var d=!t.email;return d?h("div",{class:"recipient",style:{backgroundColor:getRGBA(getRoleIndex(s,t.name))},onClick:function(o){return e.handleClickRole(o,t)}},(n=(o=e.rolesCompleted[t.id])===null||o===void 0?void 0:o.full_name)!==null&&n!==void 0?n:t.name,h("div",{class:"icon",innerHTML:editIcon}),e.showPickerForId===t.id&&h("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(o){return e.handleSelectContact(o,t)},contactSuggestions:e.sessionContacts,templateRole:(i=e.rolesCompleted[t.id])!==null&&i!==void 0?i:t,onSearchContacts:function(t){var o;return(o=e.searchContacts)===null||o===void 0?void 0:o.emit(t.detail)}})):h("div",{class:"recipient",style:{borderColor:getRGBA(getRoleIndex(s,t.name))},onClick:function(o){return e.handleClickRole(o,t)}},(l=(r=e.rolesCompleted[t.id])===null||r===void 0?void 0:r.full_name)!==null&&l!==void 0?l:t.full_name,h("div",{class:"icon",innerHTML:editIcon}),e.showPickerForId===t.id&&h("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(o){return e.handleSelectContact(o,t)},contactSuggestions:e.sessionContacts,templateRole:(a=e.rolesCompleted[t.id])!==null&&a!==void 0?a:t,onSearchContacts:function(t){var o;return(o=e.searchContacts)===null||o===void 0?void 0:o.emit(t.detail)}}))})))})),h("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),h("div",{class:"complete"},"Signing Complete"))),h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{label:"Send",size:"small",disabled:!l,onClick:function(t){return e.handleSend(t)}})))};return e}();VerdocsSend.style=verdocsSendCss;export{VerdocsSend as verdocs_send};
|
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,r){function a(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,n){function s(e){try{l(r.next(e))}catch(e){n(e)}}function i(e){try{l(r["throw"](e))}catch(e){n(e)}}function l(e){e.done?o(e.value):a(e.value).then(s,i)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,a,n,s;return s={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(o)try{if(r=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;a=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(s[0]===6&&o.label<n[1]){o.label=n[1];n=s;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(s);break}if(n[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];a=0}finally{r=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-151c0874.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-d58d5544.js";import{c as createTemplateDocument,d as deleteTemplateDocument}from"./TemplateDocuments-6fd2f4e2.js";import{D as DocIcon,P as PngIcon,J as JpgIcon,a as PdfIcon,F as FileIcon$1,b as PageCountIcon,T as TrashIcon}from"./Icons-c29eb0fa.js";import{g as getTemplateStore}from"./TemplateStore-01a9d18f.js";import{S as SDKError}from"./errors-9b5498c8.js";import{c as createTemplate}from"./Templates-f90883f7.js";import"./index-38d7bc0b.js";var 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}';var VerdocsTemplateAttachments=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit",7);this.next=createEvent(this,"next",7);this.templateUpdate=createEvent(this,"templateUpdate",7);this.sdkError=createEvent(this,"sdkError",7);this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.uploading=false;this.progressLabel="Uploading...";this.progressPercent=0;this.showDeleteError=false;this.confirmDeleteDocument=null;this.store=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,r,a;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}r=this;return[4,getTemplateStore(this.endpoint,this.templateId,false)];case 1:r.store=n.sent();return[3,3];case 2:a=n.sent();console.log("[TEMPLATE ATTACHMENTS] Error loading template",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(a.message,(t=a.response)===null||t===void 0?void 0:t.status,(o=a.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleUploadProgress=function(e){if(e>=99){this.progressPercent=100;this.progressLabel="Processing..."}else{this.progressPercent=e}};e.prototype.handleUpload=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,r,a,n,s,i;return __generator(this,(function(l){switch(l.label){case 0:e.stopPropagation();a=e.detail.file;if(!a){return[2]}console.log("[ATTACHMENTS] Uploading...",a);this.uploading=true;this.progressLabel="Uploading...";l.label=1;case 1:l.trys.push([1,4,,5]);return[4,createTemplateDocument(this.endpoint,this.templateId,a,this.handleUploadProgress.bind(this))];case 2:n=l.sent();console.log("[ATTACHMENTS] Created attachment",n);s=this;return[4,getTemplateStore(this.endpoint,this.templateId,true)];case 3:s.store=l.sent();console.log("[ATTACHMENTS] New template",this.store.state);this.uploading=false;this.progressLabel="";this.progressPercent=0;return[3,5];case 4:i=l.sent();console.log("[ATTACHMENTS] Error creating template",i);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new SDKError(i.message,(o=i.response)===null||o===void 0?void 0:o.status,(r=i.response)===null||r===void 0?void 0:r.data));this.uploading=false;return[3,5];case 5:return[2]}}))}))};e.prototype.handleNext=function(e){var t;e.stopPropagation();this.uploading=false;this.progressLabel="";this.progressPercent=0;(t=this.next)===null||t===void 0?void 0:t.emit({template:this.store.state})};e.prototype.confirmDelete=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,deleteTemplateDocument(this.endpoint,this.templateId,this.confirmDeleteDocument.id)];case 1:t.sent();e=this;return[4,getTemplateStore(this.endpoint,this.templateId,true)];case 2:e.store=t.sent();console.log("[ATTACHMENTS] New template",this.store.state);this.confirmDeleteDocument=null;return[2]}}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(o){if(((t=this.store.state)===null||t===void 0?void 0:t.template_documents.length)>1){this.confirmDeleteDocument=e}else{this.showDeleteError=true}return[2]}))}))};e.prototype.getFileIcon=function(e){switch(e.mime){case"application/pdf":return PdfIcon;case"image/jpeg":return JpgIcon;case"image/png":return PngIcon;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return DocIcon}return FileIcon$1};e.prototype.render=function(){var e=this;var t,o,r;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var a=(t=this.store)===null||t===void 0?void 0:t.state;if(!a.isLoaded){return h(Host,{class:"loading"},h("verdocs-loader",null))}if(!this.endpoint.session||!a.profile_id){return h(Host,{class:"empty"})}return h(Host,null,h("h5",null,"Existing Attachments"),h("div",{class:"attachments"},(o=this.store)===null||o===void 0?void 0:o.state.template_documents.map((function(t){return h("div",{class:"attachment"},h("div",{class:"file-icon",innerHTML:e.getFileIcon(t)}),h("div",{class:"filename",title:t.name},t.name),h("div",{class:"pages"},h("div",{class:"count"},t.page_numbers),h("div",{class:"pages-icon",innerHTML:PageCountIcon})),h("div",{class:"trash-icon",innerHTML:TrashIcon,onClick:function(){return e.handleDelete(t)}}))}))),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:function(t){return e.handleUpload(t)}}),h("div",{class:"buttons"},h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.uploading}),h("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleNext(t)},disabled:!((r=this.store)===null||r===void 0?void 0:r.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:function(){return e.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:function(){return e.confirmDelete()},showCancel:true,onExit:function(){e.confirmDeleteDocument=null}}))};return e}();VerdocsTemplateAttachments.style=verdocsTemplateAttachmentsCss;var verdocsTemplateCreateCss='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .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-create .progress-wrapper{padding:20px}verdocs-template-create .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-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var unicodeNBSP=" ";var 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>';var VerdocsTemplateCreate=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit",7);this.next=createEvent(this,"next",7);this.sdkError=createEvent(this,"sdkError",7);this.endpoint=VerdocsEndpoint.getDefault();this.file=undefined;this.creating=false;this.progressLabel="Uploading...";this.progressPercent=0}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,r,a,n,s;var i=this;return __generator(this,(function(l){switch(l.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;this.progressLabel="Uploading...";l.label=1;case 1:l.trys.push([1,3,,4]);return[4,createTemplate(this.endpoint,{name:this.file.name,documents:[this.file]},(function(e){if(e>=99){i.progressLabel="Processing...";i.progressPercent=100}else{i.progressPercent=e}}))];case 2:n=l.sent();console.log("[CREATE] Created template",n);(t=this.next)===null||t===void 0?void 0:t.emit(n);this.creating=false;this.progressLabel="";this.progressPercent=0;return[3,4];case 3:s=l.sent();console.log("[CREATE] Error creating template",s);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new SDKError(s.message,(r=s.response)===null||r===void 0?void 0:r.status,(a=s.response)===null||a===void 0?void 0:a.data));this.creating=false;return[3,4];case 4:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return h(Host,null,h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),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",onDrop:function(t){t.preventDefault();t.target.classList.remove("drag-over");e.file=t.dataTransfer.files[0]},onDragOver:function(e){e.preventDefault();e.dataTransfer.dropEffect="copy"},onDragEnter:function(e){return e.target.classList.add("drag-over")},onDragLeave:function(e){return e.target.classList.remove("drag-over")}},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:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},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:function(t){return e.handleUpload(t)}})),h("div",{class:"buttons"},h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),h("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating}))))};return e}();VerdocsTemplateCreate.style=verdocsTemplateCreateCss;export{VerdocsTemplateAttachments as verdocs_template_attachments,VerdocsTemplateCreate as verdocs_template_create};
|
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function a(e){try{l(o["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,r&&(i=s[0]&2?r["return"]:s[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;if(r=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-151c0874.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-d58d5544.js";import{u as updateTemplate}from"./Templates-f90883f7.js";import{g as getTemplateStore}from"./TemplateStore-01a9d18f.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./index-38d7bc0b.js";var verdocsTemplateNameCss="";var VerdocsTemplateName=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close",7);this.sdkError=createEvent(this,"sdkError",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.name="";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,o,r,i,s;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}i=this;return[4,getTemplateStore(this.endpoint,this.templateId,false)];case 1:i.store=a.sent();this.name=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.name;this.dirty=false;return[3,3];case 2:s=a.sent();console.log("[TEMPLATE NAME] Error loading template",s);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(s.message,(o=s.response)===null||o===void 0?void 0:o.status,(r=s.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,n,o;e.stopPropagation();this.name=(n=(t=this.store)===null||t===void 0?void 0:t.state)===null||n===void 0?void 0:n.name;this.dirty=false;console.log("Closing");(o=this.close)===null||o===void 0?void 0:o.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(o){switch(o.label){case 0:e.stopPropagation();return[4,updateTemplate(this.endpoint,this.templateId,{name:this.name})];case 1:o.sent();if((t=this.store)===null||t===void 0?void 0:t.state){this.store.state.name=this.name}this.dirty=false;console.log("Closing");(n=this.close)===null||n===void 0?void 0:n.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,n;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if((n=(t=this.store)===null||t===void 0?void 0:t.state)===null||n===void 0?void 0:n.isLoading){return h(Host,{class:"loading"},h("verdocs-loader",null))}return h(Host,null,h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("label",{htmlFor:"verdocs-template-name"},"Template Name"),h("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:function(t){var n,o;e.name=t.target.value;e.dirty=e.name!==((o=(n=e.store)===null||n===void 0?void 0:n.state)===null||o===void 0?void 0:o.name)}}),h("div",{class:"buttons"},h("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};return e}();VerdocsTemplateName.style=verdocsTemplateNameCss;export{VerdocsTemplateName as verdocs_template_name};
|
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,n){function s(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{d(n.next(e))}catch(e){i(e)}}function a(e){try{d(n["throw"](e))}catch(e){i(e)}}function d(e){e.done?r(e.value):s(e.value).then(o,a)}d((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return d([e,t])}}function d(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,s&&(i=o[0]&2?s["return"]:o[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;if(s=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;s=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-151c0874.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-d58d5544.js";import{g as getTemplateStore}from"./TemplateStore-01a9d18f.js";import{S as SDKError}from"./errors-9b5498c8.js";import{V as VerdocsToast}from"./Toast-f3b8fd46.js";import"./index-38d7bc0b.js";import"./Templates-f90883f7.js";var createReminder=function(e,t,r){return e.api.post("/templates/".concat(t,"/reminder/"),r).then((function(e){return e.data}))};var updateReminder=function(e,t,r,n){return e.api.put("/templates/".concat(t,"/reminder/").concat(r),n).then((function(e){return e.data}))};var deleteReminder=function(e,t,r){return e.api.delete("/templates/".concat(t,"/reminder/").concat(r)).then((function(e){return e.data}))};var verdocsTemplateRemindersCss='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';var VerdocsTemplateReminders=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close",7);this.sdkError=createEvent(this,"sdkError",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.showPlanBlocker=false;this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,n,s,i,o;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}i=this;return[4,getTemplateStore(this.endpoint,this.templateId,true)];case 1:i.store=a.sent();this.sendReminders=!!((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.reminder_id);this.dirty=false;return[3,3];case 2:o=a.sent();console.log("[TEMPLATE REMINDERS] Error loading template",o);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new SDKError(o.message,(n=o.response)===null||n===void 0?void 0:n.status,(s=o.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,r,n;e.stopPropagation();this.sendReminders=!!((r=(t=this.store)===null||t===void 0?void 0:t.state)===null||r===void 0?void 0:r.reminder_id);this.dirty=false;(n=this.close)===null||n===void 0?void 0:n.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,s,i,o,a,d,l,c,m,u,p;return __generator(this,(function(h){switch(h.label){case 0:e.stopPropagation();h.label=1;case 1:h.trys.push([1,12,,13]);if(!this.sendReminders)return[3,8];l={setup_time:+this.firstReminderDays,interval_time:+this.reminderDays};if(!!((r=(t=this.store)===null||t===void 0?void 0:t.state)===null||r===void 0?void 0:r.reminder_id))return[3,4];return[4,createReminder(this.endpoint,this.templateId,l)];case 2:h.sent();c=this;return[4,getTemplateStore(this.endpoint,this.templateId,true)];case 3:c.store=h.sent();return[3,7];case 4:return[4,updateReminder(this.endpoint,this.templateId,(n=this.store)===null||n===void 0?void 0:n.state.reminder_id,l)];case 5:h.sent();m=this;return[4,getTemplateStore(this.endpoint,this.templateId,true)];case 6:m.store=h.sent();h.label=7;case 7:return[3,11];case 8:return[4,deleteReminder(this.endpoint,this.templateId,(s=this.store)===null||s===void 0?void 0:s.state.reminder_id)];case 9:h.sent();u=this;return[4,getTemplateStore(this.endpoint,this.templateId,true)];case 10:u.store=h.sent();h.label=11;case 11:return[3,13];case 12:p=h.sent();console.log("[TEMPLATE REMINDERS] Unable to update reminders",p);VerdocsToast(p.message);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(p.message,(o=p.response)===null||o===void 0?void 0:o.status,(a=p.response)===null||a===void 0?void 0:a.data));return[3,13];case 13:this.dirty=false;(d=this.close)===null||d===void 0?void 0:d.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,r;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((r=(t=this.store)===null||t===void 0?void 0:t.state)===null||r===void 0?void 0:r.isLoaded)){return h(Host,{class:"empty"})}return h(Host,null,h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("h5",null,"Reminders"),h("div",{class:"input-row"},h("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),h("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){e.sendReminders=t.target.checked;e.dirty=true}})),h("div",{class:"input-row"},h("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),h("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:function(t){e.firstReminderDays=t.target.value;e.dirty=true},disabled:!this.sendReminders})),h("div",{class:"input-row"},h("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),h("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:function(t){e.reminderDays=t.target.value;e.dirty=true},disabled:!this.sendReminders})),h("div",{class:"buttons"},h("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))),this.showPlanBlocker&&h("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:function(){return e.showPlanBlocker=false}}))};return e}();VerdocsTemplateReminders.style=verdocsTemplateRemindersCss;export{VerdocsTemplateReminders as verdocs_template_reminders};
|
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,o){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function l(e){try{a(o.next(e))}catch(e){r(e)}}function n(e){try{a(o["throw"](e))}catch(e){r(e)}}function a(e){e.done?i(e.value):s(e.value).then(l,n)}a((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,s,r,l;return l={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function n(e){return function(t){return a([e,t])}}function a(l){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,s&&(r=l[0]&2?s["return"]:l[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,l[1])).done)return r;if(s=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:i.label++;return{value:l[1],done:false};case 5:i.label++;s=l[1];l=[0];continue;case 7:l=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(l[0]===6&&i.label<r[1]){i.label=r[1];r=l;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(l);break}if(r[2])i.ops.pop();i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e];s=0}finally{o=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-151c0874.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-d58d5544.js";import{u as updateTemplate}from"./Templates-f90883f7.js";import{g as getTemplateStore}from"./TemplateStore-01a9d18f.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./index-38d7bc0b.js";var verdocsTemplateVisibilityCss='verdocs-template-visibility{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}';var VerdocsTemplateVisibility=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close",7);this.sdkError=createEvent(this,"sdkError",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.dirty=false;this.personal=false;this.public=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,s,r,l,n,a;return __generator(this,(function(c){switch(c.label){case 0:c.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[VISIBILITY] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[VISIBILITY] Unable to start builder session, must be authenticated");return[2]}n=this;return[4,getTemplateStore(this.endpoint,this.templateId,false)];case 1:n.store=c.sent();this.personal=((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_personal)||true;this.public=((o=(i=this.store)===null||i===void 0?void 0:i.state)===null||o===void 0?void 0:o.is_public)||false;this.dirty=false;return[3,3];case 2:a=c.sent();console.log("[TEMPLATE VISIBILITY] Error loading template",a);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new SDKError(a.message,(r=a.response)===null||r===void 0?void 0:r.status,(l=a.response)===null||l===void 0?void 0:l.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,i,o,s,r;e.stopPropagation();this.personal=(i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.is_personal;this.public=(s=(o=this.store)===null||o===void 0?void 0:o.state)===null||s===void 0?void 0:s.is_public;this.dirty=false;(r=this.close)===null||r===void 0?void 0:r.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(o){switch(o.label){case 0:e.stopPropagation();return[4,updateTemplate(this.endpoint,this.templateId,{is_personal:this.personal,is_public:this.public})];case 1:o.sent();if((t=this.store)===null||t===void 0?void 0:t.state){this.store.state.is_personal=this.personal;this.store.state.is_public=this.public}this.dirty=false;(i=this.close)===null||i===void 0?void 0:i.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,i;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.isLoaded)){return h(Host,{class:"empty"})}return h(Host,null,h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("h5",null,"Visibility"),h("div",{class:"input-row"},h("label",{htmlFor:"verdocs-is-shared"},"Shared"),h("verdocs-checkbox",{id:"verdocs-is-shared",name:"is-shared",checked:!this.personal,value:"on",onInput:function(t){e.personal=!t.target.checked;e.dirty=true}})),h("div",{class:"description"},"Shared templates are visible to other members of your Organization (if any)."),h("div",{class:"input-row"},h("label",{htmlFor:"verdocs-is-public"},"Public"),h("verdocs-checkbox",{id:"verdocs-is-public",name:"is-public",checked:this.public,value:"on",onInput:function(t){e.public=t.target.checked;e.dirty=true}})),h("div",{class:"description"},"Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."),h("div",{class:"buttons"},h("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};return e}();VerdocsTemplateVisibility.style=verdocsTemplateVisibilityCss;export{VerdocsTemplateVisibility as verdocs_template_visibility};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-151c0874.js";var verdocsToggleButtonCss='verdocs-toggle-button{font-family:"Inter", "Barlow", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}';var VerdocsToggleButton=function(){function t(t){registerInstance(this,t);this.toggle=createEvent(this,"toggle",7);this.active=false;this.icon=null;this.label=null;this.size="normal";this._active=false}t.prototype.componentWillLoad=function(){this._active=this.active};t.prototype.handleToggle=function(t){var e;t.stopPropagation();var o=!this._active;this._active=o;(e=this.toggle)===null||e===void 0?void 0:e.emit({active:o})};t.prototype.render=function(){var t=this;return h(Host,{class:"size-".concat(this.size)},this.icon?h("button",{innerHTML:this.icon,class:{active:this._active},onClick:function(e){return t.handleToggle(e)}}):h("button",{class:{active:this._active},onClick:function(e){return t.handleToggle(e)}},this.label))};return t}();VerdocsToggleButton.style=verdocsToggleButtonCss;export{VerdocsToggleButton as verdocs_toggle_button};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as e,c as i,h as s,H as o}from"./p-6d3e0994.js";import"./p-05788c2b.js";import{V as t}from"./p-af048fad.js";import{i as l,a as n}from"./p-e662f81b.js";import{g as d}from"./p-6de76553.js";import{g as a}from"./p-55af2ceb.js";import{a as r}from"./p-449f38bb.js";import{S as c}from"./p-7a1b2643.js";import"./p-21615f18.js";import"./p-976ec9e8.js";import"./p-eab67c09.js";import"./p-38d827d3.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-c220af42.js";const p='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>',v=class{constructor(s){e(this,s),this.send=i(this,"send",7),this.exit=i(this,"exit",7),this.sdkError=i(this,"sdkError",7),this.searchContacts=i(this,"searchContacts",7),this.levels=[],this.store=null,this.endpoint=t.getDefault(),this.templateId=null,this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`,this.rolesAtLevel={},this.showPickerForId="",this.sessionContacts=[],this.rolesCompleted={}}async reset(){this.rolesCompleted={}}async componentWillLoad(){var e,i,s,o,t,l,n,d,r,p;try{const d=this.endpoint.loadSession();if(!this.templateId)return void console.log(`[SEND] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[SEND] Unable to start builder session, must be authenticated");if(this.store=await a(this.endpoint,this.templateId,!0),(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.is_sendable)||console.warn("[SEND] Template is not sendable",this.templateId),null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.roles){const e={};this.rolesCompleted={},null===(l=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===l||l.roles.forEach((i=>{const s=i.sequence-1;e[s]||(e[s]=[]);const o=`r-${s}-${e[s].length}`;e[s].push({...i,id:o})})),this.rolesAtLevel=e,this.levels=Object.keys(e).map((e=>+e)),this.levels.sort(((e,i)=>e-i))}(null===(n=null==d?void 0:d.session)||void 0===n?void 0:n.profile)&&this.sessionContacts.push({id:d.session.profile.id,name:`${d.session.profile.first_name} ${d.session.profile.last_name}`,email:d.session.profile.email,phone:d.session.profile.phone})}catch(e){console.log("[SEND] Error with preview session",e),null===(d=this.sdkError)||void 0===d||d.emit(new c(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(p=e.response)||void 0===p?void 0:p.data))}}getLevelIcon(e){return s("div",e<0?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}:e>=this.levels.length?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}:{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'})}handleSelectContact(e,i){e.preventDefault(),this.rolesCompleted[i.id]={...i,...e.detail},this.showPickerForId=""}handleClickRole(e,i){e.stopPropagation(),this.showPickerForId=i.id}handleSend(e){var i,s,o;e.stopPropagation(),null===(i=this.send)||void 0===i||i.emit({roles:Object.values(this.rolesCompleted),name:null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.name,template_id:this.templateId})}handleCancel(e){var i;e.stopPropagation(),null===(i=this.exit)||void 0===i||i.emit()}render(){var e,i,t,a;const c=((null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.roles)||[]).map((e=>e.name))||[],v=Object.values(this.rolesCompleted).filter((e=>l(e.email)||n(e.phone))).length>=c.length;return s(o,{class:{sendable:null===(a=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===a?void 0:a.is_sendable}},s("div",{class:"recipients"},s("div",{class:"left-line"}),s("div",{class:"level level-start"},this.getLevelIcon(-1),s("div",{class:"complete"},"Send Envelope")),this.levels.map((e=>s("div",{class:`level level-${e}`},this.getLevelIcon(e),this.rolesAtLevel[e].map((e=>{var i,o,t,l,n,a;return e.email?s("div",{class:"recipient",style:{borderColor:d(r(c,e.name))},onClick:i=>this.handleClickRole(i,e)},null!==(n=null===(l=this.rolesCompleted[e.id])||void 0===l?void 0:l.full_name)&&void 0!==n?n:e.full_name,s("div",{class:"icon",innerHTML:p}),this.showPickerForId===e.id&&s("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:i=>this.handleSelectContact(i,e),contactSuggestions:this.sessionContacts,templateRole:null!==(a=this.rolesCompleted[e.id])&&void 0!==a?a:e,onSearchContacts:e=>{var i;return null===(i=this.searchContacts)||void 0===i?void 0:i.emit(e.detail)}})):s("div",{class:"recipient",style:{backgroundColor:d(r(c,e.name))},onClick:i=>this.handleClickRole(i,e)},null!==(o=null===(i=this.rolesCompleted[e.id])||void 0===i?void 0:i.full_name)&&void 0!==o?o:e.name,s("div",{class:"icon",innerHTML:p}),this.showPickerForId===e.id&&s("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:i=>this.handleSelectContact(i,e),contactSuggestions:this.sessionContacts,templateRole:null!==(t=this.rolesCompleted[e.id])&&void 0!==t?t:e,onSearchContacts:e=>{var i;return null===(i=this.searchContacts)||void 0===i?void 0:i.emit(e.detail)}}))}))))),s("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),s("div",{class:"complete"},"Signing Complete"))),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e)}),s("verdocs-button",{label:"Send",size:"small",disabled:!v,onClick:e=>this.handleSend(e)})))}};v.style='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';export{v as verdocs_send}
|