@verdocs/web-sdk 2.2.9 → 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 +1 -1
- 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 +1 -1
- package/dist/cjs/verdocs-field-attachment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +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 +1 -1
- 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/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/templates/verdocs-template-roles/verdocs-template-roles.css +1 -1
- 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-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-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-view2.js +1 -1
- package/dist/docs.json +83 -28
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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/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 +2 -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-ae5fe9e7.entry.js → p-5ab837bf.entry.js} +1 -1
- 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-a6a226bd.system.entry.js → p-66cec042.system.entry.js} +1 -1
- 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-53fd209e.system.entry.js → p-93eb4996.system.entry.js} +1 -1
- 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-615b82c0.system.entry.js → p-a894761f.system.entry.js} +1 -1
- 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-52808c19.entry.js → p-bbd400a5.entry.js} +1 -1
- 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-0a78214b.entry.js → p-e1cad931.entry.js} +1 -1
- 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-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-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-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-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,143 +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 TemplateStore = require('./TemplateStore-4041d8af.js');
|
9
|
-
const errors = require('./errors-0396da3d.js');
|
10
|
-
const Toast = require('./Toast-06880504.js');
|
11
|
-
require('./index-f664e4d0.js');
|
12
|
-
require('./Templates-f6e75719.js');
|
13
|
-
|
14
|
-
/**
|
15
|
-
* Enable automatic reminders. setup_time is the number of days after the envelope is sent that the first reminder
|
16
|
-
* should be sent. interval_time is the number of days between reminders.
|
17
|
-
*/
|
18
|
-
var createReminder = function (endpoint, templateId, params) {
|
19
|
-
return endpoint.api //
|
20
|
-
.post("/templates/".concat(templateId, "/reminder/"), params)
|
21
|
-
.then(function (r) { return r.data; });
|
22
|
-
};
|
23
|
-
/**
|
24
|
-
* Update the reminder configuration for a template.
|
25
|
-
*/
|
26
|
-
var updateReminder = function (endpoint, templateId, reminderId, params) {
|
27
|
-
return endpoint.api //
|
28
|
-
.put("/templates/".concat(templateId, "/reminder/").concat(reminderId), params)
|
29
|
-
.then(function (r) { return r.data; });
|
30
|
-
};
|
31
|
-
/**
|
32
|
-
* Delete the reminder configuration for a template.
|
33
|
-
*/
|
34
|
-
var deleteReminder = function (endpoint, templateId, reminderId) {
|
35
|
-
return endpoint.api //
|
36
|
-
.delete("/templates/".concat(templateId, "/reminder/").concat(reminderId))
|
37
|
-
.then(function (r) { return r.data; });
|
38
|
-
};
|
39
|
-
|
40
|
-
const 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}";
|
41
|
-
|
42
|
-
const VerdocsTemplateReminders = class {
|
43
|
-
constructor(hostRef) {
|
44
|
-
index.registerInstance(this, hostRef);
|
45
|
-
this.close = index.createEvent(this, "close", 7);
|
46
|
-
this.sdkError = index.createEvent(this, "sdkError", 7);
|
47
|
-
this.store = null;
|
48
|
-
this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
|
49
|
-
this.templateId = '';
|
50
|
-
this.showPlanBlocker = false;
|
51
|
-
this.sendReminders = false;
|
52
|
-
this.firstReminderDays = '1';
|
53
|
-
this.reminderDays = '1';
|
54
|
-
this.dirty = false;
|
55
|
-
}
|
56
|
-
// POST https://api.verdocs.com/templates/8337af06-3b5a-4e1b-98be-67d82bc7ecd1/reminder
|
57
|
-
// interval_time: 1,
|
58
|
-
// setup_time:1,
|
59
|
-
async componentWillLoad() {
|
60
|
-
var _a, _b, _c, _d, _e;
|
61
|
-
try {
|
62
|
-
this.endpoint.loadSession();
|
63
|
-
if (!this.templateId) {
|
64
|
-
console.log(`[ROLES] Missing required template ID ${this.templateId}`);
|
65
|
-
return;
|
66
|
-
}
|
67
|
-
if (!this.endpoint.session) {
|
68
|
-
console.log('[ROLES] Unable to start builder session, must be authenticated');
|
69
|
-
return;
|
70
|
-
}
|
71
|
-
this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
|
72
|
-
this.sendReminders = !!((_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.reminder_id);
|
73
|
-
this.dirty = false;
|
74
|
-
}
|
75
|
-
catch (e) {
|
76
|
-
console.log('[TEMPLATE REMINDERS] Error loading template', e);
|
77
|
-
(_c = this.sdkError) === null || _c === void 0 ? void 0 : _c.emit(new errors.SDKError(e.message, (_d = e.response) === null || _d === void 0 ? void 0 : _d.status, (_e = e.response) === null || _e === void 0 ? void 0 : _e.data));
|
78
|
-
}
|
79
|
-
}
|
80
|
-
handleCancel(e) {
|
81
|
-
var _a, _b, _c;
|
82
|
-
e.stopPropagation();
|
83
|
-
this.sendReminders = !!((_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.reminder_id);
|
84
|
-
this.dirty = false;
|
85
|
-
(_c = this.close) === null || _c === void 0 ? void 0 : _c.emit();
|
86
|
-
}
|
87
|
-
async handleSave(e) {
|
88
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
89
|
-
e.stopPropagation();
|
90
|
-
try {
|
91
|
-
if (this.sendReminders) {
|
92
|
-
const params = {
|
93
|
-
setup_time: +this.firstReminderDays,
|
94
|
-
interval_time: +this.reminderDays,
|
95
|
-
};
|
96
|
-
if (!((_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.reminder_id)) {
|
97
|
-
await createReminder(this.endpoint, this.templateId, params);
|
98
|
-
this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
|
99
|
-
}
|
100
|
-
else {
|
101
|
-
await updateReminder(this.endpoint, this.templateId, (_c = this.store) === null || _c === void 0 ? void 0 : _c.state.reminder_id, params);
|
102
|
-
this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
|
103
|
-
}
|
104
|
-
}
|
105
|
-
else {
|
106
|
-
await deleteReminder(this.endpoint, this.templateId, (_d = this.store) === null || _d === void 0 ? void 0 : _d.state.reminder_id);
|
107
|
-
this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
|
108
|
-
}
|
109
|
-
}
|
110
|
-
catch (e) {
|
111
|
-
console.log('[TEMPLATE REMINDERS] Unable to update reminders', e);
|
112
|
-
Toast.VerdocsToast(e.message);
|
113
|
-
(_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));
|
114
|
-
}
|
115
|
-
this.dirty = false;
|
116
|
-
(_h = this.close) === null || _h === void 0 ? void 0 : _h.emit();
|
117
|
-
}
|
118
|
-
render() {
|
119
|
-
var _a, _b;
|
120
|
-
if (!this.endpoint.session) {
|
121
|
-
return (index.h(index.Host, null, index.h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
122
|
-
}
|
123
|
-
// This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
|
124
|
-
if (!this.endpoint.session || !((_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.isLoaded)) {
|
125
|
-
return index.h(index.Host, { class: "empty" });
|
126
|
-
}
|
127
|
-
return (index.h(index.Host, null, index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("h5", null, "Reminders"), index.h("div", { class: "input-row" }, index.h("label", { htmlFor: "verdocs-send-reminders" }, "Send Automatic Reminders"), index.h("verdocs-checkbox", { id: "verdocs-send-reminders", name: "automatic-reminders", checked: this.sendReminders, value: "on", onInput: (e) => {
|
128
|
-
// this.showPlanBlocker = true;
|
129
|
-
// e.target.checked = false;
|
130
|
-
this.sendReminders = e.target.checked;
|
131
|
-
this.dirty = true;
|
132
|
-
} })), index.h("div", { class: "input-row" }, index.h("label", { htmlFor: "verdocs-first-reminder-days" }, "Days Before First Reminder"), index.h("verdocs-text-input", { id: "verdocs-first-reminder-days", type: "number", value: this.firstReminderDays, onInput: (e) => {
|
133
|
-
this.firstReminderDays = e.target.value;
|
134
|
-
this.dirty = true;
|
135
|
-
}, disabled: !this.sendReminders })), index.h("div", { class: "input-row" }, index.h("label", { htmlFor: "verdocs-days-between-reminders" }, "Days Between Reminders"), index.h("verdocs-text-input", { id: "verdocs-days-between-reminders", type: "number", value: this.reminderDays, onInput: (e) => {
|
136
|
-
this.reminderDays = e.target.value;
|
137
|
-
this.dirty = true;
|
138
|
-
}, disabled: !this.sendReminders })), 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) }))), this.showPlanBlocker && (index.h("verdocs-ok-dialog", { heading: "Upgrade to access this feature", message: "Please upgrade your plan to access this feature.", onNext: () => (this.showPlanBlocker = false) }))));
|
139
|
-
}
|
140
|
-
};
|
141
|
-
VerdocsTemplateReminders.style = verdocsTemplateRemindersCss;
|
142
|
-
|
143
|
-
exports.verdocs_template_reminders = VerdocsTemplateReminders;
|
@@ -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};
|