@verdocs/web-sdk 4.2.158 → 5.0.1
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/Datastore-b1742da2.js +1783 -0
- package/dist/cjs/{index-2589e4d1.js → index-ccac8641.js} +11 -27
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-6d673ca1.js → utils-ba1e95e0.js} +3 -2
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +22 -13
- package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +1 -1
- package/dist/cjs/{verdocs-button_3.cjs.entry.js → verdocs-button_2.cjs.entry.js} +1 -56
- package/dist/cjs/{verdocs-checkbox_4.cjs.entry.js → verdocs-checkbox_6.cjs.entry.js} +115 -24
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +30 -15
- package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +32 -17
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +64 -45
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +104 -155
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +38 -25
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +27 -5
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-organization-card_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +2 -2
- package/dist/cjs/{verdocs-preview_9.cjs.entry.js → verdocs-preview_6.cjs.entry.js} +252 -469
- package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +11 -12
- package/dist/cjs/verdocs-spinner.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-table.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 +108 -0
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +78 -63
- package/dist/cjs/verdocs-template-role-properties.cjs.entry.js +58 -37
- package/dist/cjs/verdocs-template-star.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +2 -2
- 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-web-sdk.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -4
- package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.js +5 -21
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +27 -40
- package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +27 -28
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +45 -44
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +12 -11
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +28 -28
- package/dist/collection/components/envelopes/verdocs-envelope-recipient-link/verdocs-envelope-recipient-link.js +34 -15
- package/dist/collection/components/envelopes/verdocs-envelope-recipient-summary/verdocs-envelope-recipient-summary.js +35 -17
- package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +67 -45
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +29 -18
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +30 -20
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +30 -22
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +29 -17
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +30 -18
- package/dist/collection/components/fields/verdocs-field-payment/verdocs-field-payment.js +192 -139
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.js +30 -20
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +30 -18
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +31 -19
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.css +31 -0
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +44 -44
- package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js +29 -17
- package/dist/collection/components/templates/verdocs-template-attachments/verdocs-template-attachments.js +37 -17
- package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.js +37 -32
- package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +7 -15
- package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.css +6 -0
- package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.js +79 -61
- package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +48 -24
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +63 -61
- package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +61 -36
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +63 -46
- package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
- package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
- package/dist/collection/utils/Datastore.js +141 -0
- package/dist/collection/utils/Templates.js +2 -0
- package/dist/collection/utils/utils.js +3 -2
- package/dist/components/index.js +1 -5
- package/dist/components/{p-3044c9cb.js → p-070bebd7.js} +1 -1
- package/dist/components/{p-1b60debe.js → p-0a69031f.js} +29 -28
- package/dist/components/{p-69881420.js → p-0ca7012b.js} +1 -1
- package/dist/components/{p-b2bf338f.js → p-0d063bf9.js} +65 -35
- package/dist/components/{p-ac7578f6.js → p-0e332769.js} +1 -1
- package/dist/components/{p-a655b737.js → p-15d530b8.js} +6 -6
- package/dist/components/{p-71dd305b.js → p-18999830.js} +2 -2
- package/dist/components/{p-90540412.js → p-1ae5d7e0.js} +1 -1
- package/dist/components/{p-8f942993.js → p-1ca705bc.js} +31 -30
- package/dist/components/{p-4d2f2954.js → p-1e2e8b1c.js} +1 -1
- package/dist/components/{p-c7a21595.js → p-1e67ebdf.js} +67 -42
- package/dist/components/{p-fe2dca8c.js → p-22da6d14.js} +2 -2
- package/dist/components/{p-945d225a.js → p-22e52874.js} +90 -88
- package/dist/components/{p-85ef4d07.js → p-2548f3f0.js} +49 -38
- package/dist/components/{p-263dc67d.js → p-315d6592.js} +1 -1
- package/dist/components/{p-4dc4418a.js → p-3201d529.js} +1 -1
- package/dist/components/{p-7786799a.js → p-324ed895.js} +8 -4
- package/dist/components/{p-b679d760.js → p-49153610.js} +32 -31
- package/dist/components/{p-03660739.js → p-4afcdc84.js} +30 -31
- package/dist/components/{p-b0af9b72.js → p-4bc5ac82.js} +3 -2
- package/dist/components/{p-ffe8b41d.js → p-4dd750e9.js} +1 -1
- package/dist/components/{p-82fb3284.js → p-58c2bd5d.js} +1 -1
- package/dist/components/{p-d3170dcd.js → p-5a9cea40.js} +4 -4
- package/dist/components/{p-8b27ce22.js → p-5d4bbcd0.js} +1 -1
- package/dist/components/{p-1e66385b.js → p-5d82a9f3.js} +64 -57
- package/dist/components/{p-877eaf65.js → p-5eb45a4f.js} +1 -1
- package/dist/components/{p-62f8b36c.js → p-6400f542.js} +36 -14
- package/dist/components/{p-e4ac6259.js → p-6fcd99d1.js} +2 -2
- package/dist/components/{p-921297ba.js → p-84ae0283.js} +1 -1
- package/dist/components/{p-7927a846.js → p-8d3c0b4c.js} +2 -2
- package/dist/components/{p-83a2fa2f.js → p-8fbc64e9.js} +72 -55
- package/dist/components/{p-0e64ccc3.js → p-9bb47a5a.js} +1 -1
- package/dist/components/{p-12594438.js → p-9c3fd545.js} +31 -31
- package/dist/components/{p-fe533b11.js → p-a22a3b1b.js} +125 -101
- package/dist/components/{p-df4ac086.js → p-a3e12c74.js} +2 -2
- package/dist/components/{p-6e8c00bc.js → p-b0c02eb8.js} +31 -30
- package/dist/components/{p-6b369b14.js → p-b16c202a.js} +1 -1
- package/dist/components/{p-3518350d.js → p-b9034018.js} +4 -4
- package/dist/components/{p-c7db1c7d.js → p-c25e82b9.js} +52 -53
- package/dist/components/{p-4535a9fd.js → p-c7b00ce6.js} +36 -17
- package/dist/components/{p-e4a852b5.js → p-c8fedb4e.js} +7 -6
- package/dist/components/{p-83245875.js → p-cf6ea837.js} +2 -2
- package/dist/components/{p-b8cd75c0.js → p-d9704a51.js} +55 -45
- package/dist/components/p-da4d4eed.js +1781 -0
- package/dist/components/{p-cdf871dd.js → p-dd701894.js} +29 -28
- package/dist/components/p-ea5954bd.js +4 -0
- package/dist/components/{p-42a676b7.js → p-ec894daf.js} +2 -2
- package/dist/components/{p-72e959a7.js → p-ecc818bb.js} +30 -31
- package/dist/components/{p-ed9a1a21.js → p-ed88b8d2.js} +44 -24
- package/dist/components/{p-556596e4.js → p-f72b9c45.js} +1 -1
- package/dist/components/{p-a7bbe96b.js → p-f990140a.js} +3 -3
- package/dist/components/{p-db4a15fd.js → p-fcad60f5.js} +1 -1
- package/dist/components/{p-0162bdd3.js → p-fd96322b.js} +30 -33
- package/dist/components/verdocs-auth.js +4 -4
- package/dist/components/verdocs-build.js +99 -103
- package/dist/components/verdocs-button-panel.js +1 -1
- package/dist/components/verdocs-button.js +1 -1
- package/dist/components/verdocs-checkbox.js +1 -1
- package/dist/components/verdocs-component-error.js +1 -1
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-dialog.js +1 -1
- package/dist/components/verdocs-dropdown.js +1 -1
- package/dist/components/verdocs-envelope-document-page.js +1 -1
- package/dist/components/verdocs-envelope-recipient-link.js +1 -1
- package/dist/components/verdocs-envelope-recipient-summary.js +37 -19
- package/dist/components/verdocs-envelope-sidebar.js +76 -54
- package/dist/components/verdocs-envelopes-list.js +12 -12
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-field-checkbox.js +1 -1
- package/dist/components/verdocs-field-date.js +1 -1
- package/dist/components/verdocs-field-dropdown.js +1 -1
- package/dist/components/verdocs-field-initial.js +1 -1
- package/dist/components/verdocs-field-payment.js +106 -33
- package/dist/components/verdocs-field-radio.js +1 -1
- package/dist/components/verdocs-field-signature.js +1 -1
- package/dist/components/verdocs-field-textarea.js +1 -1
- package/dist/components/verdocs-field-textbox.js +1 -1
- package/dist/components/verdocs-field-timestamp.js +1 -1
- package/dist/components/verdocs-file-chooser.js +1 -1
- package/dist/components/verdocs-help-icon.js +1 -1
- package/dist/components/verdocs-initial-dialog.js +1 -1
- package/dist/components/verdocs-kba-dialog.js +1 -1
- package/dist/components/verdocs-loader.js +1 -1
- package/dist/components/verdocs-ok-dialog.js +1 -1
- package/dist/components/verdocs-organization-card.js +2 -2
- package/dist/components/verdocs-pagination.js +1 -1
- package/dist/components/verdocs-portal.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-progress-bar.js +1 -1
- package/dist/components/verdocs-quick-filter.js +1 -1
- package/dist/components/verdocs-quick-functions.js +1 -1
- package/dist/components/verdocs-radio-button.js +1 -1
- package/dist/components/verdocs-search-box.js +1 -1
- package/dist/components/verdocs-search-tabs.js +1 -1
- package/dist/components/verdocs-select-input.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign.js +24 -23
- package/dist/components/verdocs-signature-dialog.js +1 -1
- package/dist/components/verdocs-spinner.js +1 -1
- package/dist/components/verdocs-status-indicator.js +1 -1
- package/dist/components/verdocs-switch.js +1 -1
- package/dist/components/verdocs-table.js +1 -1
- package/dist/components/verdocs-tabs.js +1 -1
- package/dist/components/verdocs-template-attachments.js +1 -1
- package/dist/components/verdocs-template-build-tabs.js +1 -1
- package/dist/components/verdocs-template-card.js +1 -1
- package/dist/components/verdocs-template-create.js +148 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-field-properties.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/components/verdocs-template-role-properties.js +1 -1
- package/dist/components/verdocs-template-roles.js +1 -1
- package/dist/components/verdocs-template-star.js +1 -1
- package/dist/components/verdocs-template-tags.js +2 -2
- package/dist/components/verdocs-templates-list.js +11 -11
- package/dist/components/verdocs-text-input.js +1 -1
- package/dist/components/verdocs-toggle-button.js +1 -1
- package/dist/components/verdocs-toggle.js +1 -1
- package/dist/components/verdocs-toolbar-icon.js +1 -1
- package/dist/components/verdocs-upload-dialog.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/esm/Datastore-52fcbac6.js +1781 -0
- package/dist/esm/{index-c8587076.js → index-272d51a4.js} +12 -26
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-27fa12eb.js → utils-47de6f79.js} +3 -2
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +23 -14
- package/dist/esm/verdocs-button-panel_2.entry.js +1 -1
- package/dist/esm/{verdocs-button_3.entry.js → verdocs-button_2.entry.js} +2 -56
- package/dist/esm/{verdocs-checkbox_4.entry.js → verdocs-checkbox_6.entry.js} +115 -26
- package/dist/esm/verdocs-contact-picker_2.entry.js +2 -2
- package/dist/esm/verdocs-dialog.entry.js +1 -1
- package/dist/esm/verdocs-dropdown.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +2 -2
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +31 -16
- package/dist/esm/verdocs-envelope-recipient-summary.entry.js +33 -18
- package/dist/esm/verdocs-envelope-sidebar.entry.js +65 -46
- package/dist/esm/verdocs-envelopes-list.entry.js +2 -2
- package/dist/esm/verdocs-field-attachment_13.entry.js +104 -155
- package/dist/esm/verdocs-field-payment.entry.js +38 -25
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-kba-dialog_2.entry.js +27 -5
- package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm/verdocs-organization-card_2.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +2 -2
- package/dist/esm/{verdocs-preview_9.entry.js → verdocs-preview_6.entry.js} +256 -470
- package/dist/esm/verdocs-quick-functions.entry.js +1 -1
- package/dist/esm/verdocs-radio-button.entry.js +1 -1
- package/dist/esm/verdocs-search-box.entry.js +1 -1
- package/dist/esm/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +11 -12
- package/dist/esm/verdocs-spinner.entry.js +1 -1
- package/dist/esm/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm/verdocs-table.entry.js +1 -1
- package/dist/esm/verdocs-template-card.entry.js +1 -1
- package/dist/{components/p-f9cc62a7.js → esm/verdocs-template-create.entry.js} +15 -69
- package/dist/esm/verdocs-template-document-page_2.entry.js +79 -64
- package/dist/esm/verdocs-template-role-properties.entry.js +59 -38
- package/dist/esm/verdocs-template-star.entry.js +2 -2
- package/dist/esm/verdocs-template-tags.entry.js +2 -2
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-toggle.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +4 -4
- package/dist/esm-es5/Datastore-52fcbac6.js +1 -0
- package/dist/esm-es5/index-272d51a4.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-27fa12eb.js → utils-47de6f79.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_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-checkbox_6.entry.js +1 -0
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-dialog.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-recipient-summary.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_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js +1 -0
- package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
- package/dist/esm-es5/verdocs-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-box.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-spinner.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-table.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-role-properties.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-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-text-input/verdocs-text-input.d.ts +0 -2
- package/dist/types/components/embeds/verdocs-build/verdocs-build.d.ts +8 -32
- package/dist/types/components/embeds/verdocs-preview/verdocs-preview.d.ts +6 -8
- package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +7 -6
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +3 -3
- package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +6 -5
- package/dist/types/components/envelopes/verdocs-envelope-recipient-link/verdocs-envelope-recipient-link.d.ts +6 -3
- package/dist/types/components/envelopes/verdocs-envelope-recipient-summary/verdocs-envelope-recipient-summary.d.ts +6 -3
- package/dist/types/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts +8 -4
- package/dist/types/components/fields/verdocs-field-attachment/verdocs-field-attachment.d.ts +6 -7
- package/dist/types/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.d.ts +6 -7
- package/dist/types/components/fields/verdocs-field-date/verdocs-field-date.d.ts +6 -7
- package/dist/types/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.d.ts +6 -7
- package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +6 -7
- package/dist/types/components/fields/verdocs-field-payment/verdocs-field-payment.d.ts +44 -30
- package/dist/types/components/fields/verdocs-field-radio/verdocs-field-radio.d.ts +6 -7
- package/dist/types/components/fields/verdocs-field-signature/verdocs-field-signature.d.ts +6 -7
- package/dist/types/components/fields/verdocs-field-textarea/verdocs-field-textarea.d.ts +6 -7
- package/dist/types/components/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +5 -12
- package/dist/types/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.d.ts +6 -7
- package/dist/types/components/templates/verdocs-template-attachments/verdocs-template-attachments.d.ts +6 -2
- package/dist/types/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.d.ts +7 -4
- package/dist/types/components/templates/verdocs-template-document-page/verdocs-template-document-page.d.ts +7 -4
- package/dist/types/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.d.ts +7 -8
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +6 -8
- package/dist/types/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.d.ts +7 -7
- package/dist/types/components/templates/verdocs-template-roles/verdocs-template-roles.d.ts +7 -6
- package/dist/types/components.d.ts +176 -330
- package/dist/types/utils/Datastore.d.ts +24 -0
- package/dist/types/utils/Templates.d.ts +3 -0
- package/dist/types/utils/utils.d.ts +1 -1
- package/dist/verdocs-web-sdk/{p-98c5f5a5.entry.js → p-0ca1e87c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-0e9de098.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-fc053d00.entry.js → p-167e3d7e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7bd37bca.entry.js → p-2a1287ec.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6419b913.system.js → p-2be751c4.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cb30f11e.entry.js → p-2f73c9de.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-3364cc13.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-196bc80f.system.entry.js → p-37d747fb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-386d789c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3a1fa556.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-0fd57194.entry.js → p-41cbf650.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-26715b8b.entry.js → p-4b36ca30.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-98501408.system.entry.js → p-4e9e154f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a3778013.system.entry.js → p-511a4ecc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-65a4e01e.entry.js → p-524f37a0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-13fe8650.system.entry.js → p-53f4c7c3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-54f085d1.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-cca517dc.entry.js → p-584113d1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f8cad58e.entry.js → p-5f1a000c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-256f07fd.system.entry.js → p-62f15675.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9b921211.js → p-650697bd.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c06d2604.entry.js → p-65c5398e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0446030b.entry.js → p-6ced37ed.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-16619383.entry.js → p-7464b84f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6e3fa0c4.system.entry.js → p-761f6656.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-30bc5986.entry.js → p-76cc40fe.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c45dc777.entry.js → p-771c2f92.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-78191329.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-f3c995d8.system.entry.js → p-7c8938e7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1ce2f724.system.entry.js → p-80ce3711.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-81c8663f.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8221a48f.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-860b9f94.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-89cdecac.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8a2ff048.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8c03fc69.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8d401072.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-921b56fd.system.entry.js → p-914e131c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5737f0ae.system.js → p-9186f42e.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8e233a6b.system.entry.js → p-9227d400.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-92ce6180.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9567cb7d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-97b00cae.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4b4801ad.system.entry.js → p-982f1b36.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1b6736fe.system.entry.js → p-9d0b0e36.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6d1d86ff.system.entry.js → p-a08886c1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e25e1dcf.entry.js → p-a165607e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a242aa80.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-5d6a2fda.system.entry.js → p-a9635106.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-aebb0cd9.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b0b958a0.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b8737f7b.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-49988769.js → p-b9654a5e.js} +2 -2
- package/dist/verdocs-web-sdk/p-bb0effe1.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bcc23811.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-0c3a471b.entry.js → p-bd7406ae.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e8d91957.entry.js → p-bdd7b3d3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c5818330.entry.js → p-c1728f5c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c18c718f.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-731066de.system.entry.js → p-c6fd3e53.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c7cd6843.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4f7c72f9.system.entry.js → p-c9f40726.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-ca712f40.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cbb75c5e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-751b0280.entry.js → p-d475fff3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-91c4298b.system.entry.js → p-d5870e33.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e5126f26.system.entry.js → p-d8dae4e9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-93093a7a.system.entry.js → p-d98cbd0f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-da4d4eed.js +1 -0
- package/dist/verdocs-web-sdk/{p-2298c22e.entry.js → p-ddb17b3e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-df04f0ca.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9ff1be63.entry.js → p-df392ef9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-2aea0c7b.system.entry.js → p-e438bd02.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0c42cb22.system.entry.js → p-e5d291f3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7f1e0c5e.entry.js → p-e6dbb0f7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c4d61c66.entry.js → p-e83cd333.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-edfb1951.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f4fcf7a5.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-97b951e6.system.entry.js → p-f5d01982.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6e55af26.system.entry.js → p-f9b37af2.system.entry.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 +3 -3
- package/dist/cjs/EnvelopeStore-f1cd9bd3.js +0 -96
- package/dist/cjs/TemplateFieldStore-7bcc0f7a.js +0 -44
- package/dist/cjs/TemplateRoleStore-e8bb00ec.js +0 -51
- package/dist/cjs/TemplateStore-db21be4d.js +0 -99
- package/dist/cjs/index-2a189d85.js +0 -3721
- package/dist/cjs/index-76d03a35.js +0 -196
- package/dist/cjs/verdocs-loader.cjs.entry.js +0 -20
- package/dist/collection/components/templates/verdocs-template-name/verdocs-template-name.css +0 -0
- package/dist/collection/components/templates/verdocs-template-name/verdocs-template-name.js +0 -196
- package/dist/collection/components/templates/verdocs-template-visibillity/verdocs-template-visibility.css +0 -86
- package/dist/collection/components/templates/verdocs-template-visibillity/verdocs-template-visibility.js +0 -203
- package/dist/collection/utils/EnvelopeStore.js +0 -90
- package/dist/collection/utils/TemplateFieldStore.js +0 -36
- package/dist/collection/utils/TemplateRoleStore.js +0 -41
- package/dist/collection/utils/TemplateStore.js +0 -94
- package/dist/components/p-00d39dca.js +0 -39
- package/dist/components/p-0933fb2d.js +0 -127
- package/dist/components/p-09d28afd.js +0 -97
- package/dist/components/p-3555cef1.js +0 -122
- package/dist/components/p-474b6663.js +0 -1314
- package/dist/components/p-821f2345.js +0 -93
- package/dist/components/p-9b5a4f9e.js +0 -44
- package/dist/components/p-a706bac9.js +0 -3719
- package/dist/components/verdocs-template-name.d.ts +0 -11
- package/dist/components/verdocs-template-name.js +0 -6
- package/dist/components/verdocs-template-visibility.d.ts +0 -11
- package/dist/components/verdocs-template-visibility.js +0 -6
- package/dist/esm/EnvelopeStore-4599b7d3.js +0 -93
- package/dist/esm/TemplateFieldStore-909147d8.js +0 -39
- package/dist/esm/TemplateRoleStore-2fef1fdb.js +0 -44
- package/dist/esm/TemplateStore-ace14a8b.js +0 -97
- package/dist/esm/index-24d8ae6a.js +0 -194
- package/dist/esm/index-7588a071.js +0 -3719
- package/dist/esm/verdocs-loader.entry.js +0 -16
- package/dist/esm-es5/EnvelopeStore-4599b7d3.js +0 -1
- package/dist/esm-es5/TemplateFieldStore-909147d8.js +0 -1
- package/dist/esm-es5/TemplateRoleStore-2fef1fdb.js +0 -1
- package/dist/esm-es5/TemplateStore-ace14a8b.js +0 -1
- package/dist/esm-es5/index-24d8ae6a.js +0 -1
- package/dist/esm-es5/index-7588a071.js +0 -1
- package/dist/esm-es5/index-c8587076.js +0 -1
- package/dist/esm-es5/verdocs-button_3.entry.js +0 -1
- package/dist/esm-es5/verdocs-checkbox_4.entry.js +0 -1
- package/dist/esm-es5/verdocs-loader.entry.js +0 -1
- package/dist/esm-es5/verdocs-preview_9.entry.js +0 -1
- package/dist/types/components/templates/verdocs-template-name/verdocs-template-name.d.ts +0 -41
- package/dist/types/components/templates/verdocs-template-visibillity/verdocs-template-visibility.d.ts +0 -42
- package/dist/types/utils/EnvelopeStore.d.ts +0 -12
- package/dist/types/utils/TemplateFieldStore.d.ts +0 -9
- package/dist/types/utils/TemplateRoleStore.d.ts +0 -11
- package/dist/types/utils/TemplateStore.d.ts +0 -16
- package/dist/verdocs-web-sdk/p-0c51c5be.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-194f9f4d.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1bb57e5d.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2211234d.system.js +0 -1
- package/dist/verdocs-web-sdk/p-2305c1e8.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-341d540f.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-368a36ea.system.js +0 -1
- package/dist/verdocs-web-sdk/p-36b5d46e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-483f3d7f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-569434fb.system.js +0 -1
- package/dist/verdocs-web-sdk/p-56c1ebd6.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5bf2910c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-60da2bbe.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6fda3817.js +0 -1
- package/dist/verdocs-web-sdk/p-79e222f8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7d18cb23.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7d593603.system.js +0 -1
- package/dist/verdocs-web-sdk/p-9515e206.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9fabdbb1.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a04aac80.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a706bac9.js +0 -1
- package/dist/verdocs-web-sdk/p-b17843d9.system.js +0 -1
- package/dist/verdocs-web-sdk/p-b56793c4.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b7a9f07d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b84d1a25.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bb253149.js +0 -1
- package/dist/verdocs-web-sdk/p-bd642df2.js +0 -1
- package/dist/verdocs-web-sdk/p-c7115b35.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cde4c155.js +0 -1
- package/dist/verdocs-web-sdk/p-d86c8c1a.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-dbddb752.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-dcd3eb1b.js +0 -1
- package/dist/verdocs-web-sdk/p-e123f19c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e294b6c2.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e48b387d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e83a163d.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e952ab89.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f08eb8bf.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f5064e0c.system.js +0 -1
- package/dist/verdocs-web-sdk/p-f79b8537.system.js +0 -1
- package/dist/verdocs-web-sdk/p-fa06e241.entry.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{d(i.next(e))}catch(e){o(e)}}function a(e){try{d(i["throw"](e))}catch(e){o(e)}}function d(e){e.done?n(e.value):r(e.value).then(s,a)}d((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,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 d([e,t])}}function d(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host}from"./index-272d51a4.js";import{getRGBA}from"@verdocs/js-sdk";import{S as SettingsIcon}from"./Icons-faf0377f.js";import{S as Store}from"./Datastore-52fcbac6.js";var verdocsFieldPaymentCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-payment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;border:1px solid #cfa;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-payment.disabled{opacity:0.5}verdocs-field-payment button,verdocs-field-payment div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-payment button{color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-payment button.hide{display:none}verdocs-field-payment input{float:left;font-family:Arial, sans-serif}verdocs-field-payment select{position:absolute;font-family:Arial, sans-serif;background:linear-gradient(55deg, transparent 50%, #333 50%), linear-gradient(125deg, #333 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 4px, calc(100% - 3px) 4px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none}verdocs-field-payment .frame{width:100%;height:100%;background-size:contain;text-align:left}verdocs-field-payment .frame img{position:absolute;height:auto;width:100%}verdocs-field-payment.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-payment .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-payment .settings-icon svg{fill:#707ae5}verdocs-field-payment .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}';var VerdocsFieldPaymentStyle0=verdocsFieldPaymentCss;var VerdocsFieldPayment=function(){function e(e){registerInstance(this,e);this.settingsChanged=createEvent(this,"settingsChanged",7);this.deleted=createEvent(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.disabled=false;this.done=false;this.editable=false;this.moveable=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false;this.fields=undefined;this.pageNum=undefined;this.roleName=undefined;this.fieldId=undefined;this.recipients=undefined;this.selectedRoleName=undefined;this.pdfPages=undefined;this.currentSignature=undefined;this.currentSignatureId=undefined;this.currentInitial=undefined;this.currentInitialId=undefined;this.signed=false;this.preparedMessage=undefined;this.signatureUrl="";this.roleindex=0}e.prototype.componentWillLoad=function(){if(this.recipients&&this.recipients.length>0){var e=this.recipients.find((function(e){return e.type==="preparer"}));console.log("Found preparer",e);if(e){this.preparedMessage="Prepared by ".concat(e["full_name"])}}};e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.focused=true;setTimeout((function(){e.focused=false}),500);return[2]}))}))};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.fieldname));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.fieldname));if(e&&e.hidePanel){e.hidePanel()}return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,n=t.source,i=t.sourceid,r=t.fieldname,o=t.editable,s=o===void 0?false:o,a=t.done,d=a===void 0?false:a,c=t.disabled,l=c===void 0?false:c,f=t.focused,u=t.xscale,p=u===void 0?1:u,g=t.yscale,v=g===void 0?1:g;var m=Store.getField(n,i,r),b=m.index,y=m.field;var k=getRGBA(b);if(!y){return h(Fragment,null)}if(d){return h(Host,{class:{done:d}},"$✓")}return h(Host,{class:{focused:f,disabled:l},style:{backgroundColor:k}},h("button",{class:{hide:this.signed}},"$"),this.signed?h("div",{class:"frame"}):h("div",{style:{display:"none"}}),h("img",{width:"100%",height:"100%",src:this.signatureUrl,alt:"Payment Icon"}),s&&h(Fragment,null,h("div",{id:"verdocs-settings-panel-trigger-".concat(r),style:{transform:"scale(".concat(Math.floor(1/p*1e3)/1e3,", ").concat(Math.floor(1/v*1e3)/1e3,")")},class:"settings-icon",innerHTML:SettingsIcon,onClick:function(t){t.stopPropagation();e.showingProperties=!e.showingProperties}}),this.showingProperties&&h("verdocs-portal",{anchor:"verdocs-settings-panel-trigger-".concat(y.name),onClickAway:function(){return e.showingProperties=false}},h("verdocs-template-field-properties",{templateId:i,fieldName:y.name,onClose:function(){return e.showingProperties=false},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:r});return e.hideSettingsPanel()},onSettingsChanged:function(t){var n;(n=e.settingsChanged)===null||n===void 0?void 0:n.emit(t.detail);return e.hideSettingsPanel()},helpText:"Check boxes allow the user to select one or more (non-exclusive) options."}))))};return e}();VerdocsFieldPayment.style=VerdocsFieldPaymentStyle0;export{VerdocsFieldPayment as verdocs_field_payment};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-272d51a4.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";import{u as unicodeNBSP}from"./Icons-faf0377f.js";var verdocsFileChooserCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-file-chooser{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-file-chooser .upload-box{text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:40px 15px;color:rgba(0, 0, 0, 0.54)}verdocs-file-chooser .upload-box svg{width:64px;height:64px;fill:#5c6575}verdocs-file-chooser .selected-filename{font-size:20px;font-weight:bold;overflow-wrap:anywhere}verdocs-file-chooser .or-prefer{height:20px;margin:20px 0;font-size:16px}';var VerdocsFileChooserStyle0=verdocsFileChooserCss;var VerdocsFileChooser=function(){function e(e){registerInstance(this,e);this.fileSelected=createEvent(this,"fileSelected",7);this.endpoint=VerdocsEndpoint.getDefault();this.file=undefined}e.prototype.handleFileChanged=function(e){var r,o;this.file=((r=e.target.files)===null||r===void 0?void 0:r[0])||null;(o=this.fileSelected)===null||o===void 0?void 0:o.emit({file:this.file});console.debug("[CHOOSER] Selected file",this.file)};e.prototype.handleSelectFile=function(e){var r,o;e.stopPropagation();this.file=null;(r=this.fileSelected)===null||r===void 0?void 0:r.emit({file:null});(o=document.getElementById("verdocs-file-chooser"))===null||o===void 0?void 0:o.click()};e.prototype.render=function(){var e=this;var r=this.file?"Select a different file":"Select a file from your computer";return h(Host,{key:"be9ae4e6e32d7c284001b7fea41d96f39b642005"},h("input",{key:"0bc7cd1766b630372ea380300575dfd239bc86e4",type:"file",multiple:true,id:"verdocs-file-chooser",accept:"application/pdf,.pdf,.doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",style:{display:"none"},onChange:function(r){return e.handleFileChanged(r)}}),h("div",{key:"dbd3aa4e9d64b4bd427f4c6e198d92b10e94dfff",class:"upload-box"},h("div",{key:"41a10b9ffbe862bedc300cdbb8d2a366dc00414e",class:"selected-filename"},this.file?this.file.name:"Drag a file here"),h("div",{key:"128679d890e1c68ff1c7fb47abd4f638db453b87",class:"or-prefer"},this.file?unicodeNBSP:"Or, if you prefer..."),h("verdocs-button",{key:"277c4246513e40dc2bc5e7f0f7d7130d52904813",label:r,size:"small",onClick:function(r){return e.handleSelectFile(r)}})))};return e}();VerdocsFileChooser.style=VerdocsFileChooserStyle0;var verdocsProgressBarCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-progress-bar{font-family:"Inter", "Barlow", sans-serif;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-progress-bar .labels{display:-ms-flexbox;display:flex;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-progress-bar .labels .label{display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin-right:8px;color:#33364b}verdocs-progress-bar .bar{display:-ms-flexbox;display:flex;-ms-flex:0 0 10px;flex:0 0 10px;border-radius:5px;background-color:#cccccc}verdocs-progress-bar .bar .slider{display:-ms-flexbox;display:flex;border-radius:5px;background-color:#55bc81}';var VerdocsProgressBarStyle0=verdocsProgressBarCss;var VerdocsProgressBar=function(){function e(e){registerInstance(this,e);this.label="";this.showPercent=false;this.percent=0}e.prototype.render=function(){var e=Math.ceil(100*Math.min(this.percent,100)/100);console.log("Rendering progress bar",{widthPercent:e,label:this.label,showPercent:this.showPercent,percent:this.percent});return h(Host,{key:"c57b566587b7fe5f95f7082964dc7d27c46008cb"},h("div",{key:"b44243b4c65cdd5ddb7a47028db07e47e1c9373b",class:"labels"},this.label&&h("div",{key:"58715d2cd0a47260618472ed06d3eeda095ea852",class:"label"},this.label),this.showPercent&&h("div",{key:"38b9fa2f2180eee29cdc6aff0562475c9d6cc943",class:"label"},this.percent,"%")),h("div",{key:"1258f3696cb5852865e7d1af59bf2acb7acfda50",class:"bar"},h("div",{key:"eb1346d2b9f7ccce786c358ef247fd3ec62de67f",class:"slider",style:{width:"".concat(e,"%")}})))};return e}();VerdocsProgressBar.style=VerdocsProgressBarStyle0;export{VerdocsFileChooser as verdocs_file_chooser,VerdocsProgressBar as verdocs_progress_bar};
|
@@ -1 +1 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,t=1,o=arguments.length;t<o;t++){i=arguments[t];for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))e[n]=i[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,i,t,o){function n(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):n(e.value).then(r,a)}l((o=o.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,n,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(i){return l([e,i])}}function l(a){if(o)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(o=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];n=0}finally{o=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-c8587076.js";import{VerdocsEndpoint,getEnvelope,getDocumentDownloadLink,cancelEnvelope,userCanCancelEnvelope,integerSequence}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-27fa12eb.js";import{S as SDKError}from"./errors-887f1e88.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./format-b8602175.js";var verdocsKbaDialogCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-kba-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-kba-dialog .field label{-ms-flex:0 0 100px;flex:0 0 100px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-kba-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';var VerdocsKbaDialogStyle0=verdocsKbaDialogCss;var QuestionIcon='<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>';var VerdocsKbaDialog=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit",7);this.pinEntered=createEvent(this,"pinEntered",7);this.next=createEvent(this,"next",7);this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.recipient=null;this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.response="";this.updatedRecipient=null}e.prototype.componentDidLoad=function(){this.updatedRecipient=__assign({},this.recipient||{})};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){if(e.target.class==="background-overlay"){e.preventDefault();this.handleCancel()}};e.prototype.handleDone=function(){this.next.emit(this.response);this.response=""};e.prototype.handleConfirmID=function(){this.next.emit(this.updatedRecipient)};e.prototype.render=function(){var e=this;var i,t,o,n,s,r,a,l,d,c,u;if(this.mode==="choice"){return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"choices"},this.choices.map((function(i){return h("div",{class:"choice ".concat(i===e.response?"selected":""),onClick:function(){console.log("Selected",i);e.response=i}},i)}))),h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:this.step<this.steps?"Next":"Submit",onClick:function(){return e.handleDone()},disabled:!this.response})))))}if(this.mode==="identity"){return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Confirm Your Identity"),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},"Identity verification is required"),h("div",{class:"help-text"},"NOTE: Only four fields are required, but providing more details will allow us to complete the verification process more quickly."))),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-first"},"Your Name:",h("span",{class:"required"},"*")),h("input",{required:true,type:"text",id:"verdocs-kba-first",name:"verdocs-kba-first",placeholder:"First name...",value:(i=this.updatedRecipient)===null||i===void 0?void 0:i.first_name,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{first_name:i.target.value})}}),h("input",{type:"text",id:"verdocs-kba-last",name:"verdocs-kba-last",placeholder:"Last name...",required:true,value:(t=this.updatedRecipient)===null||t===void 0?void 0:t.last_name,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{last_name:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-address"},"Address:",h("span",{class:"required"},"*")),h("input",{type:"text",id:"verdocs-kba-address",name:"verdocs-kba-address",placeholder:"Address...",value:(o=this.updatedRecipient)===null||o===void 0?void 0:o.address,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{address:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-city"},"City:"),h("input",{type:"text",id:"verdocs-kba-city",name:"verdocs-kba-city",placeholder:"City...",value:(n=this.updatedRecipient)===null||n===void 0?void 0:n.city,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{city:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-state"},"State:"),h("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"State...",value:(s=this.updatedRecipient)===null||s===void 0?void 0:s.state,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{state:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-zip"},"Zip Code:",h("span",{class:"required"},"*")),h("input",{type:"text",id:"verdocs-kba-zip",name:"verdocs-kba-zip",placeholder:"Zip Code...",required:true,value:(r=this.updatedRecipient)===null||r===void 0?void 0:r.zip,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{zip:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-address"},"SSN Last 4:"),h("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"Last 4 digits of your SSN...",value:(a=this.updatedRecipient)===null||a===void 0?void 0:a.ssn_last_4,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{ssn_last_4:i.target.value})}})),h("div",{class:"buttons"},h("verdocs-button",{label:"Submit",onClick:function(){return e.handleConfirmID()},disabled:!((l=this.updatedRecipient)===null||l===void 0?void 0:l.first_name)||!((d=this.updatedRecipient)===null||d===void 0?void 0:d.last_name)||!((c=this.updatedRecipient)===null||c===void 0?void 0:c.address)||!((u=this.updatedRecipient)===null||u===void 0?void 0:u.zip)})))))}return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Please Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"input"},h("label",{htmlFor:"verdocs-kba-input"},this.label),h("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:function(i){return e.response=i.target.value}})),h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:"Submit",onClick:function(){return e.handleDone()},disabled:!this.response})))))};return e}();VerdocsKbaDialog.style=VerdocsKbaDialogStyle0;var verdocsViewCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var VerdocsViewStyle0=verdocsViewCss;var VerdocsView=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.another=createEvent(this,"another",7);this.view=createEvent(this,"view",7);this.next=createEvent(this,"next",7);this.endpoint=null;this.envelopeId="";this.envelope=null;this.headerTargetId=null;this.canceling=false;this.roleNames=[];this.showCancelDone=false;this.showLoadError=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,o,n;return __generator(this,(function(s){switch(s.label){case 0:if(!this.endpoint){this.endpoint=VerdocsEndpoint.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}if(!!this.envelope)return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);console.log("[VIEW] Loading envelope...");o=this;return[4,getEnvelope(this.endpoint,this.envelopeId)];case 2:o.envelope=s.sent();console.log("[VIEW] Loaded envelope",this.envelope);this.roleNames=this.envelope.recipients.map((function(e){return e.role_name}));return[3,4];case 3:n=s.sent();this.showLoadError=true;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(t=n.response)===null||t===void 0?void 0:t.data));return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var i=document.getElementById("verdocs-view-header");if(e&&i){console.log("[VIEW] Moving header");i.remove();e.append(i)}};e.prototype.handlePageRendered=function(e){};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var i,t,o,n,s,r,s;var a=this;return __generator(this,(function(l){switch(l.label){case 0:o=e.detail.id;switch(o){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,6];case"download-all":return[3,9]}return[3,10];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(e){a.canceling=false;console.log("[VIEW] Envelope canceled",e);return getEnvelope(a.endpoint,a.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);a.envelope=e})).catch((function(e){var i,t,o;a.canceling=false;console.log("[VIEW] Error canceling envelope",e);(i=a.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(o=e.response)===null||o===void 0?void 0:o.data))}));this.showCancelDone=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,10];case 2:window.print();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,10];case 3:n=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(!n)return[3,5];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,n.id)];case 4:s=l.sent();window.open(s,"_blank");l.label=5;case 5:return[3,10];case 6:r=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!r)return[3,8];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,r.id)];case 7:s=l.sent();window.open(s,"_blank");l.label=8;case 8:return[3,10];case 9:saveEnvelopesAsZip(this.endpoint,[this.envelope]).then((function(){var e;(e=a.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:a.endpoint,envelope:a.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,10];case 10:return[2]}}))}))};e.prototype.render=function(){var e=this;var i;if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:"Sorry, that envelope is not valid.",buttonLabel:"OK",onNext:function(){e.showLoadError=false}}))}if(!this.envelope){return h(Host,null,h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var t=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.profile,this.envelope)){t.push({id:"cancel",label:"Cancel"})}var o=this.envelope.documents.length>0;var n=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var s=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(o||s){t.push({label:""});if(o){t.push({id:"download-attachments",label:n>1?"Download Documents":"Download Document"})}if(s){t.push({id:"download-certificate",label:"Download Certificate"})}if(o&&s){t.push({id:"download-all",label:"Download All Files"})}}return h(Host,null,h("div",{id:"verdocs-view-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:t,onOptionSelected:function(i){return e.handleOptionSelected(i)}}))),h("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((i=this.envelope)===null||i===void 0?void 0:i.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(i){var t=integerSequence(1,i.pages);return h(Fragment,null,t.map((function(t){var o;var n=((o=i.page_sizes)===null||o===void 0?void 0:o[t])||{width:612,height:792};return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:i.id,endpoint:e.endpoint,type:"filled",virtualWidth:n.width,virtualHeight:n.height,pageNumber:t,onPageRendered:function(i){return e.handlePageRendered(i)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&h("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsView.style=VerdocsViewStyle0;export{VerdocsKbaDialog as verdocs_kba_dialog,VerdocsView as verdocs_view};
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,t=1,o=arguments.length;t<o;t++){i=arguments[t];for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))e[n]=i[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,i,t,o){function n(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):n(e.value).then(r,a)}l((o=o.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,n,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(i){return l([e,i])}}function l(a){if(o)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(o=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];n=0}finally{o=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-272d51a4.js";import{VerdocsEndpoint,getEnvelope,getDocumentDownloadLink,cancelEnvelope,userCanCancelEnvelope,integerSequence}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-47de6f79.js";import{S as SDKError}from"./errors-887f1e88.js";import{S as Store}from"./Datastore-52fcbac6.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./format-b8602175.js";var verdocsKbaDialogCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-kba-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-kba-dialog .field label{-ms-flex:0 0 100px;flex:0 0 100px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-kba-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';var VerdocsKbaDialogStyle0=verdocsKbaDialogCss;var QuestionIcon='<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>';var VerdocsKbaDialog=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit",7);this.pinEntered=createEvent(this,"pinEntered",7);this.next=createEvent(this,"next",7);this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.recipient=null;this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.response="";this.updatedRecipient=null}e.prototype.componentDidLoad=function(){this.updatedRecipient=__assign({},this.recipient||{})};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){if(e.target.class==="background-overlay"){e.preventDefault();this.handleCancel()}};e.prototype.handleDone=function(){this.next.emit(this.response);this.response=""};e.prototype.handleConfirmID=function(){this.next.emit(this.updatedRecipient)};e.prototype.render=function(){var e=this;var i,t,o,n,s,r,a,l,d,c,u;if(this.mode==="choice"){return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"choices"},this.choices.map((function(i){return h("div",{class:"choice ".concat(i===e.response?"selected":""),onClick:function(){console.log("Selected",i);e.response=i}},i)}))),h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:this.step<this.steps?"Next":"Submit",onClick:function(){return e.handleDone()},disabled:!this.response})))))}if(this.mode==="identity"){return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Confirm Your Identity"),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},"Identity verification is required"),h("div",{class:"help-text"},"NOTE: Only four fields are required, but providing more details will allow us to complete the verification process more quickly."))),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-first"},"Your Name:",h("span",{class:"required"},"*")),h("input",{required:true,type:"text",id:"verdocs-kba-first",name:"verdocs-kba-first",placeholder:"First name...",value:(i=this.updatedRecipient)===null||i===void 0?void 0:i.first_name,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{first_name:i.target.value})}}),h("input",{type:"text",id:"verdocs-kba-last",name:"verdocs-kba-last",placeholder:"Last name...",required:true,value:(t=this.updatedRecipient)===null||t===void 0?void 0:t.last_name,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{last_name:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-address"},"Address:",h("span",{class:"required"},"*")),h("input",{type:"text",id:"verdocs-kba-address",name:"verdocs-kba-address",placeholder:"Address...",value:(o=this.updatedRecipient)===null||o===void 0?void 0:o.address,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{address:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-city"},"City:"),h("input",{type:"text",id:"verdocs-kba-city",name:"verdocs-kba-city",placeholder:"City...",value:(n=this.updatedRecipient)===null||n===void 0?void 0:n.city,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{city:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-state"},"State:"),h("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"State...",value:(s=this.updatedRecipient)===null||s===void 0?void 0:s.state,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{state:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-zip"},"Zip Code:",h("span",{class:"required"},"*")),h("input",{type:"text",id:"verdocs-kba-zip",name:"verdocs-kba-zip",placeholder:"Zip Code...",required:true,value:(r=this.updatedRecipient)===null||r===void 0?void 0:r.zip,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{zip:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-address"},"SSN Last 4:"),h("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"Last 4 digits of your SSN...",value:(a=this.updatedRecipient)===null||a===void 0?void 0:a.ssn_last_4,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{ssn_last_4:i.target.value})}})),h("div",{class:"buttons"},h("verdocs-button",{label:"Submit",onClick:function(){return e.handleConfirmID()},disabled:!((l=this.updatedRecipient)===null||l===void 0?void 0:l.first_name)||!((d=this.updatedRecipient)===null||d===void 0?void 0:d.last_name)||!((c=this.updatedRecipient)===null||c===void 0?void 0:c.address)||!((u=this.updatedRecipient)===null||u===void 0?void 0:u.zip)})))))}return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Please Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"input"},h("label",{htmlFor:"verdocs-kba-input"},this.label),h("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:function(i){return e.response=i.target.value}})),h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:"Submit",onClick:function(){return e.handleDone()},disabled:!this.response})))))};return e}();VerdocsKbaDialog.style=VerdocsKbaDialogStyle0;var verdocsViewCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var VerdocsViewStyle0=verdocsViewCss;var VerdocsView=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.another=createEvent(this,"another",7);this.view=createEvent(this,"view",7);this.next=createEvent(this,"next",7);this.envelopeListenerId=null;this.endpoint=null;this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.showCancelDone=false;this.showLoadError=false;this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,o,n;return __generator(this,(function(s){switch(s.label){case 0:if(!this.endpoint){this.endpoint=VerdocsEndpoint.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}this.listenToEnvelope();if(!!this.envelope)return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);console.log("[VIEW] Loading envelope...");o=this;return[4,getEnvelope(this.endpoint,this.envelopeId)];case 2:o.envelope=s.sent();console.log("[VIEW] Loaded envelope",this.envelope);return[3,4];case 3:n=s.sent();this.showLoadError=true;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(t=n.response)===null||t===void 0?void 0:t.data));return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var i=document.getElementById("verdocs-view-header");if(e&&i){console.log("[VIEW] Moving header");i.remove();e.append(i)}};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),false,(function(i){e.envelope=i;e.loading=false}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){Store.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.handlePageRendered=function(e){};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var i,t,o,n,s,r,s;var a=this;return __generator(this,(function(l){switch(l.label){case 0:o=e.detail.id;switch(o){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,6];case"download-all":return[3,9]}return[3,10];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(e){a.canceling=false;console.log("[VIEW] Envelope canceled",e);return getEnvelope(a.endpoint,a.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);a.envelope=e})).catch((function(e){var i,t,o;a.canceling=false;console.log("[VIEW] Error canceling envelope",e);(i=a.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(o=e.response)===null||o===void 0?void 0:o.data))}));this.showCancelDone=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,10];case 2:window.print();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,10];case 3:n=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(!n)return[3,5];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,n.id)];case 4:s=l.sent();window.open(s,"_blank");l.label=5;case 5:return[3,10];case 6:r=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!r)return[3,8];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,r.id)];case 7:s=l.sent();window.open(s,"_blank");l.label=8;case 8:return[3,10];case 9:saveEnvelopesAsZip(this.endpoint,[this.envelope]).then((function(){var e;(e=a.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:a.endpoint,envelope:a.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,10];case 10:return[2]}}))}))};e.prototype.render=function(){var e=this;var i;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:"Sorry, that envelope is not valid.",buttonLabel:"OK",onNext:function(){e.showLoadError=false}}))}if(!this.envelope){return h(Host,null,h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var t=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.profile,this.envelope)){t.push({id:"cancel",label:"Cancel"})}var o=this.envelope.documents.length>0;var n=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var s=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(o||s){t.push({label:""});if(o){t.push({id:"download-attachments",label:n>1?"Download Documents":"Download Document"})}if(s){t.push({id:"download-certificate",label:"Download Certificate"})}if(o&&s){t.push({id:"download-all",label:"Download All Files"})}}return h(Host,null,h("div",{id:"verdocs-view-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:t,onOptionSelected:function(i){return e.handleOptionSelected(i)}}))),h("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((i=this.envelope)===null||i===void 0?void 0:i.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(i){var t=integerSequence(1,i.pages);return h(Fragment,null,t.map((function(t){var o;var n=((o=i.page_sizes)===null||o===void 0?void 0:o[t])||{width:612,height:792};return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:i.id,endpoint:e.endpoint,type:"filled",virtualWidth:n.width,virtualHeight:n.height,pageNumber:t,onPageRendered:function(i){return e.handlePageRendered(i)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&h("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsView.style=VerdocsViewStyle0;export{VerdocsKbaDialog as verdocs_kba_dialog,VerdocsView as verdocs_view};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-272d51a4.js";var verdocsOkDialogCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-ok-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-ok-dialog.closed{display:none}verdocs-ok-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-ok-dialog .dialog{max-width:60%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-ok-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;-ms-flex-direction:row;flex-direction:row;padding:8px 16px;font-weight:bold;color:#ffffff;background:#46497d}verdocs-ok-dialog .content{font-size:16px;background:#ffffff;padding:20px}verdocs-ok-dialog .buttons{display:-ms-flexbox;display:flex;margin:30px 0 0 0;padding:0 20px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}verdocs-ok-dialog .buttons verdocs-button{margin-left:16px}';var VerdocsOkDialogStyle0=verdocsOkDialogCss;var VerdocsOkDialog=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next",7);this.exit=createEvent(this,"exit",7);this.heading="";this.message="";this.buttonLabel="OK";this.showCancel=false;this.closed=false}e.prototype.handleOk=function(){this.next.emit()};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}};e.prototype.render=function(){var e=this;return h(Host,{key:"f41613ca32a9471277c816d753e7f818ef427fd0",class:this.closed?"closed":""},h("div",{key:"570538e2743b23b5f18a1ec6ea3db51dfd314f02",class:"background-overlay",onClick:function(o){return e.handleDismiss(o)}},h("div",{key:"17bfc3cfaadc8d10fe27211cd4a0eb48083f7a4b",class:"dialog"},h("div",{key:"bc88208d6897a191ef5fda323a74acd3e3c2620e",class:"heading"},this.heading),h("div",{key:"bc794df180672198964f32a6c71eff9dd1180db9",class:"content"},h("div",{key:"d8618e9b479e64b457bca57838437f91a0677560",class:"message",innerHTML:this.message}),h("div",{key:"101f7819fa69c3cf8f8958a5582835b56cf94775",class:"buttons"},this.showCancel?h("verdocs-button",{label:"CANCEL",variant:"outline",onClick:function(){return e.handleCancel()}}):h("div",{style:{display:"none"}}),h("verdocs-button",{key:"e755590fdd93cb9cc7b23a3812377d5216a70aae",label:this.buttonLabel,onClick:function(){return e.handleOk()}}))))))};return e}();VerdocsOkDialog.style=VerdocsOkDialogStyle0;export{VerdocsOkDialog as verdocs_ok_dialog};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as registerInstance,h,H as Host,c as createEvent}from"./index-
|
1
|
+
import{r as registerInstance,h,H as Host,c as createEvent}from"./index-272d51a4.js";import{f as format}from"./format-b8602175.js";var verdocsOrganizationCardCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-organization-card{font-family:"Inter", "Barlow", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#ffffff;border-radius:8px;padding:7px 15px}verdocs-organization-card .icon{-ms-flex:0;flex:0;height:24px;width:24px;margin:0 14px 0 0}verdocs-organization-card .icon svg{fill:#aeb4bf;height:24px;width:24px}verdocs-organization-card .content{margin-top:2px}.verdocs-org-card-popup{font-family:"Inter", "Barlow", sans-serif;background:#ffffff;border-radius:10px;width:326px;padding:20px 40px 0 40px;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border:1px solid #cccccc}.verdocs-org-card-popup .popup-header-with-logo{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-header-with-logo img{max-width:300px;max-height:50px}.verdocs-org-card-popup .popup-header{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;gap:20px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}.verdocs-org-card-popup .popup-body{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;text-transform:uppercase}.verdocs-org-card-popup .status{-webkit-transform:scale(1.5);transform:scale(1.5);width:24px;height:24px}.verdocs-org-card-popup .field{margin:0 0 20px 0}.verdocs-org-card-popup .field strong{color:#7b7b9a;display:block;margin:0 0 5px 0}.verdocs-org-card-popup .field a{color:#654dcb;text-transform:uppercase}';var VerdocsOrganizationCardStyle0=verdocsOrganizationCardCss;var BusinessIcon='<svg xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" height="24px" viewBox="0 0 24 24" width="24px"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"></path></svg>';var VerdocsOrganizationCard=function(){function o(o){registerInstance(this,o);this.organization=undefined;this.hovered=false}o.prototype.onMouseOver=function(){this.hovered=true};o.prototype.onMouseOut=function(){this.hovered=false};o.prototype.render=function(){var o,r,e,a,i,s;console.log("Rendering org card",this.organization.thumbnail_url,this.organization);var d=BusinessIcon;var t="verdocs-org-card-".concat(this.organization.id);return h(Host,{key:"d7b475ffa8a508828c58362f1d132313910db262",id:t},this.organization.thumbnail_url?h("img",{class:"icon",src:this.organization.thumbnail_url,alt:"Logo"}):h("span",{class:"icon",innerHTML:d}),h("span",{key:"41371ad0ece9b5b13c455313658b3983facf5db5",class:"content"},(o=this.organization)===null||o===void 0?void 0:o.name),h("verdocs-portal",{key:"37b667310a2124dc68a88a8b5732ecd4a87f9da1",anchor:t},h("div",{key:"7f72d2f2c25314cdfa81721c6b6653989c7be72b",class:"verdocs-org-card-popup",style:{display:this.hovered?"block":"none"}},this.organization.full_logo_url?h("div",{class:"popup-header-with-logo"},h("img",{src:this.organization.full_logo_url,alt:"Logo"}),h("div",{class:"title"},(r=this.organization)===null||r===void 0?void 0:r.name)):h("div",{class:"popup-header"},h("span",{class:"status"},h("span",{class:"icon",innerHTML:d})),h("span",{class:"title"},(e=this.organization)===null||e===void 0?void 0:e.name)),h("div",{key:"478657fefd75b3adda14550ce7dd8117ee3f519f",class:"popup-body"},h("div",{key:"213022879f5f5d2cab6cf415692e418911e1ee05",class:"field"},h("strong",{key:"3e36b9b9ef2dd6b39dc313c77772b750d7bdb242"},"Joined"),format(new Date(((a=this.organization)===null||a===void 0?void 0:a.created_at)||undefined),"LLL d, Y")),this.organization.url&&h("div",{key:"b28cb49fe0214c3f0851fe4609433ada584bf0be",class:"field"},h("strong",{key:"9cdfd0da0dcb3d51149b1e0bc2f612e0f0edab6d"},"Website"),h("a",{key:"74be8e66995435c5e6a071098ec1d4a6a7ca6f5f",href:(i=this.organization)===null||i===void 0?void 0:i.url,target:"_blank",rel:"nofollow"},(s=this.organization)===null||s===void 0?void 0:s.url))))))};return o}();VerdocsOrganizationCard.style=VerdocsOrganizationCardStyle0;var verdocsPortalCss="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";var VerdocsPortalStyle0=verdocsPortalCss;var Z_INDEX="10001";var VerdocsPortal=function(){function o(o){registerInstance(this,o);this.clickAway=createEvent(this,"clickAway",7);this.moved=false;this.anchor=undefined;this.voffset=0}o.prototype.handleScroll=function(){this.calculatePosition()};o.prototype.handleResize=function(){this.calculatePosition()};o.prototype.handleClick=function(o){var r;if(!this.element.contains(o.target)){(r=this.clickAway)===null||r===void 0?void 0:r.emit()}};o.prototype.calculateLeft=function(){var o;var r=document.getElementById(this.anchor);if(!r)return 0;var e=r.getBoundingClientRect();var a=document.documentElement.clientWidth+document.documentElement.scrollLeft;var i=Math.max(e.left,0);var s=((o=this.element)===null||o===void 0?void 0:o.offsetWidth)||400;var d=i+s>a;return d?a-s-20:i};o.prototype.calculateTop=function(){var o;var r=document.getElementById(this.anchor);if(!r)return 0;var e=r.getBoundingClientRect();var a=document.documentElement.clientHeight+document.documentElement.scrollTop;var i=e.bottom+this.voffset+document.documentElement.scrollTop;var s=((o=this.element)===null||o===void 0?void 0:o.offsetHeight)||300;var d=i+s>a;return d?i-s-e.height:i};o.prototype.calculatePosition=function(){this.portal.style.top="".concat(this.calculateTop(),"px");this.portal.style.left="".concat(this.calculateLeft(),"px")};o.prototype.componentWillLoad=function(){var o;var r="".concat(this.anchor,"-portal");(o=document.getElementById(r))===null||o===void 0?void 0:o.remove();this.portal=document.createElement("div");this.portal.setAttribute("id",r);this.portal.style.zIndex=Z_INDEX;this.portal.style.position="absolute";document.body.append(this.portal)};o.prototype.componentDidLoad=function(){this.portal.appendChild(this.element);this.calculatePosition()};o.prototype.disconnectedCallback=function(){this.moved?this.portal.remove():this.moved=true};o.prototype.render=function(){var o=this;return h(Host,{key:"7379bf2578c769bf6112486912c7aa30b429fae1",ref:function(r){return o.element=r}},h("slot",{key:"3b141548481e6dd23f47ed4e0db78e3931a5bdaa"}))};return o}();VerdocsPortal.style=VerdocsPortalStyle0;export{VerdocsOrganizationCard as verdocs_organization_card,VerdocsPortal as verdocs_portal};
|
@@ -1 +1 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,r=1,t=arguments.length;r<t;r++){i=arguments[r];for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o))e[o]=i[o]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,i,r){if(r||arguments.length===2)for(var t=0,o=i.length,s;t<o;t++){if(s||!(t in i)){if(!s)s=Array.prototype.slice.call(i,0,t);s[t]=i[t]}}return e.concat(s||Array.prototype.slice.call(i))};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-c8587076.js";import{integerSequence}from"@verdocs/js-sdk";import{i as renderedTextWidth}from"./utils-27fa12eb.js";import{c as createPopper}from"./popper-0fbeff6d.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./format-b8602175.js";var verdocsPaginationCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #654dcb}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#654dcb}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}';var VerdocsPaginationStyle0=verdocsPaginationCss;var ChevronDoubleLeft='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>';var ChevronDoubleRight='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>';var VISIBLE_PAGES=5;var PageButton=function(e){var i=e.page,r=e.selected,t=e.onClick;var o;if(i==="first"){o=ChevronDoubleLeft}else if(i==="last"){o=ChevronDoubleRight}else{o=String(i+1)}return h("div",{class:"page-button ".concat(i===r?"selected":""),onClick:function(){return t(i)},innerHTML:o})};var VerdocsQuickFilter$1=function(){function e(e){registerInstance(this,e);this.selectPage=createEvent(this,"selectPage",7);this.selectedPage=0;this.itemCount=1;this.perPage=10}e.prototype.handleSelectPage=function(e){var i;this.selectedPage=e;(i=this.selectPage)===null||i===void 0?void 0:i.emit({selectedPage:e})};e.prototype.render=function(){var e=this;var i=Math.max(0,this.selectedPage-2);var r=this.itemCount>0?Math.ceil(this.itemCount/this.perPage):0;var t=integerSequence(0,Math.ceil(this.itemCount/this.perPage)).slice(i,i+VISIBLE_PAGES);return h(Host,{key:"9cb81ab797997f6bedf65126e759a329e01b5d86"},this.selectedPage>0&&h(PageButton,{key:"a172567f4adbaa02644a3c285344c0de4d2e5a33",page:"first",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(0)}}),i>0&&h("div",{key:"97833b23734e758e9ae5627b756fecad2371037c",class:"ellipsis"},"..."),t.map((function(i){return h(PageButton,{page:i,selected:e.selectedPage,onClick:function(i){return e.handleSelectPage(+i)}})})),this.selectedPage<r-1&&h("div",{key:"20dc5aa9111118ce1df8177d64c6fecff1d497e2",class:"ellipsis"},"..."),this.selectedPage<r-1&&h(PageButton,{key:"04b5d3fce4ba05f3acc2f24927c1bda6be7f34e7",page:"last",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(r-1)}}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsQuickFilter$1.style=VerdocsPaginationStyle0;var verdocsQuickFilterCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-quick-filter{position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-quick-filter .control{outline:0;height:34px;display:-ms-flexbox;display:flex;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;-webkit-transition:all 100ms ease 0s;transition:all 100ms ease 0s;border:1px solid #cccccc}verdocs-quick-filter .title{padding:0 8px;font-size:14px;max-width:100%;overflow:hidden;color:#33364b;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}verdocs-quick-filter .title .prefix{display:inline;font-weight:700;margin:0 7px 0 0;color:#4c56cb}verdocs-quick-filter .arrow{width:32px;height:32px;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:#ffffff;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s}verdocs-quick-filter .arrow svg{-webkit-transition:0.3s;transition:0.3s;fill:#cccccc}verdocs-quick-filter .separator{width:1px;display:block;margin-top:8px;margin-bottom:8px;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#cccccc}verdocs-quick-filter .items{display:none;z-index:10000;position:absolute;border-radius:4px;background:#ffffff;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px;box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px}verdocs-quick-filter .items[data-show]{display:block}verdocs-quick-filter .option{width:100%;border:none;display:block;font-size:14px;text-align:left;background:none;padding:10px 20px;color:#1e2031}verdocs-quick-filter .option:hover{cursor:pointer;background:rgba(76, 86, 203, 0.2470588235)}verdocs-quick-filter .option[disabled]{color:#aaaaaa}verdocs-quick-filter .option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}verdocs-quick-filter.open .items{display:block}verdocs-quick-filter.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1)}';var VerdocsQuickFilterStyle0=verdocsQuickFilterCss;var DropdownArrow='<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" class="css-8mmkcg"><path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>';var VerdocsQuickFilter=function(){function e(e){registerInstance(this,e);this.optionSelected=createEvent(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.label="Filter";this.value="";this.placeholder="Select...";this.open=undefined}e.prototype.componentDidLoad=function(){this.popper=createPopper(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-1,14]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};e.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};e.prototype.clickListener=function(e){var i=!(e.target==this.el||this.el.contains(e.target));if(i){this.hide()}};e.prototype.handleSelectOption=function(e,i){e.stopPropagation();this.optionSelected.emit(i);this.value=i.value;this.hide()};e.prototype.showDropdown=function(){var e,i;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(i=this.popper)===null||i===void 0?void 0:i.update().catch((function(){}))};e.prototype.handleHideDropdown=function(e){var i,r;if(((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.localName)==="button"&&((r=e===null||e===void 0?void 0:e.target)===null||r===void 0?void 0:r.className)==="arrow"){return}this.hide()};e.prototype.toggleDropdown=function(e){e.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};e.prototype.hide=function(){var e;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};e.prototype.render=function(){var e=this;var i,r,t;var o=(i=this.options)===null||i===void 0?void 0:i.find((function(i){return i.value===e.value}));var s=(r=this.options)===null||r===void 0?void 0:r.reduce((function(e,i){return e.label.length>i.label.length?e:i}));var n=renderedTextWidth((s===null||s===void 0?void 0:s.label)||"FILLER","14px Inter, Barlow, sans-serif");var a=renderedTextWidth(this.label,"14px Inter, Barlow, sans-serif");var c="".concat(n+a+40,"px");return h(Host,{key:"63c979bc0e8b4b75f0608a7b5c11bf92de2375cc",class:{open:!!this.open},style:{minWidth:c,display:"inline-block"}},h("div",{key:"785aac3556deaac0bbf55d8eb1f52e846448b44d",class:"control",onClick:function(i){return e.toggleDropdown(i)},onBlur:function(i){return e.handleHideDropdown(i)}},h("div",{key:"521c951babae9d882402ffb94aeb4f40a3afe9c6",class:"title",ref:function(i){return e.dropdownButton=i}},h("span",{key:"66f15637c5bcaa84326b0360b1cf0b9eeb34cc19",class:"prefix"},this.label,":"),o?o.label:this.placeholder),h("div",{key:"8f5719750fd5fb40c8787d044904629ede1cb5a5",style:{flex:"1"}}),h("div",{key:"1f16f93487115760416fa9d7fa025e25da4e1cb9",class:"separator"}),h("div",{key:"bf485d08eccf8e960d161007b3b16517f494f85f",class:"arrow",innerHTML:DropdownArrow,"aria-label":"Open Menu"})),h("div",{key:"8842f5609144f401a51124501544f0fb6c4700c9",class:"items","aria-hidden":!this.open,ref:function(i){return e.dropdownMenu=i},style:{minWidth:c}},(t=this.options)===null||t===void 0?void 0:t.map((function(i){return i.label?h("button",{onClick:function(r){return e.handleSelectOption(r,i)},class:"option ".concat(i.value===e.value?"selected":""),disabled:i.disabled},i.label):h("div",{class:"separator"})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsQuickFilter.style=VerdocsQuickFilterStyle0;export{VerdocsQuickFilter$1 as verdocs_pagination,VerdocsQuickFilter as verdocs_quick_filter};
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,r=1,t=arguments.length;r<t;r++){i=arguments[r];for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o))e[o]=i[o]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,i,r){if(r||arguments.length===2)for(var t=0,o=i.length,s;t<o;t++){if(s||!(t in i)){if(!s)s=Array.prototype.slice.call(i,0,t);s[t]=i[t]}}return e.concat(s||Array.prototype.slice.call(i))};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-272d51a4.js";import{integerSequence}from"@verdocs/js-sdk";import{i as renderedTextWidth}from"./utils-47de6f79.js";import{c as createPopper}from"./popper-0fbeff6d.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./format-b8602175.js";var verdocsPaginationCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #654dcb}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#654dcb}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}';var VerdocsPaginationStyle0=verdocsPaginationCss;var ChevronDoubleLeft='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>';var ChevronDoubleRight='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>';var VISIBLE_PAGES=5;var PageButton=function(e){var i=e.page,r=e.selected,t=e.onClick;var o;if(i==="first"){o=ChevronDoubleLeft}else if(i==="last"){o=ChevronDoubleRight}else{o=String(i+1)}return h("div",{class:"page-button ".concat(i===r?"selected":""),onClick:function(){return t(i)},innerHTML:o})};var VerdocsQuickFilter$1=function(){function e(e){registerInstance(this,e);this.selectPage=createEvent(this,"selectPage",7);this.selectedPage=0;this.itemCount=1;this.perPage=10}e.prototype.handleSelectPage=function(e){var i;this.selectedPage=e;(i=this.selectPage)===null||i===void 0?void 0:i.emit({selectedPage:e})};e.prototype.render=function(){var e=this;var i=Math.max(0,this.selectedPage-2);var r=this.itemCount>0?Math.ceil(this.itemCount/this.perPage):0;var t=integerSequence(0,Math.ceil(this.itemCount/this.perPage)).slice(i,i+VISIBLE_PAGES);return h(Host,{key:"9cb81ab797997f6bedf65126e759a329e01b5d86"},this.selectedPage>0&&h(PageButton,{key:"a172567f4adbaa02644a3c285344c0de4d2e5a33",page:"first",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(0)}}),i>0&&h("div",{key:"97833b23734e758e9ae5627b756fecad2371037c",class:"ellipsis"},"..."),t.map((function(i){return h(PageButton,{page:i,selected:e.selectedPage,onClick:function(i){return e.handleSelectPage(+i)}})})),this.selectedPage<r-1&&h("div",{key:"20dc5aa9111118ce1df8177d64c6fecff1d497e2",class:"ellipsis"},"..."),this.selectedPage<r-1&&h(PageButton,{key:"04b5d3fce4ba05f3acc2f24927c1bda6be7f34e7",page:"last",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(r-1)}}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsQuickFilter$1.style=VerdocsPaginationStyle0;var verdocsQuickFilterCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-quick-filter{position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-quick-filter .control{outline:0;height:34px;display:-ms-flexbox;display:flex;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;-webkit-transition:all 100ms ease 0s;transition:all 100ms ease 0s;border:1px solid #cccccc}verdocs-quick-filter .title{padding:0 8px;font-size:14px;max-width:100%;overflow:hidden;color:#33364b;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}verdocs-quick-filter .title .prefix{display:inline;font-weight:700;margin:0 7px 0 0;color:#4c56cb}verdocs-quick-filter .arrow{width:32px;height:32px;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:#ffffff;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s}verdocs-quick-filter .arrow svg{-webkit-transition:0.3s;transition:0.3s;fill:#cccccc}verdocs-quick-filter .separator{width:1px;display:block;margin-top:8px;margin-bottom:8px;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#cccccc}verdocs-quick-filter .items{display:none;z-index:10000;position:absolute;border-radius:4px;background:#ffffff;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px;box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px}verdocs-quick-filter .items[data-show]{display:block}verdocs-quick-filter .option{width:100%;border:none;display:block;font-size:14px;text-align:left;background:none;padding:10px 20px;color:#1e2031}verdocs-quick-filter .option:hover{cursor:pointer;background:rgba(76, 86, 203, 0.2470588235)}verdocs-quick-filter .option[disabled]{color:#aaaaaa}verdocs-quick-filter .option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}verdocs-quick-filter.open .items{display:block}verdocs-quick-filter.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1)}';var VerdocsQuickFilterStyle0=verdocsQuickFilterCss;var DropdownArrow='<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" class="css-8mmkcg"><path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>';var VerdocsQuickFilter=function(){function e(e){registerInstance(this,e);this.optionSelected=createEvent(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.label="Filter";this.value="";this.placeholder="Select...";this.open=undefined}e.prototype.componentDidLoad=function(){this.popper=createPopper(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-1,14]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};e.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};e.prototype.clickListener=function(e){var i=!(e.target==this.el||this.el.contains(e.target));if(i){this.hide()}};e.prototype.handleSelectOption=function(e,i){e.stopPropagation();this.optionSelected.emit(i);this.value=i.value;this.hide()};e.prototype.showDropdown=function(){var e,i;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(i=this.popper)===null||i===void 0?void 0:i.update().catch((function(){}))};e.prototype.handleHideDropdown=function(e){var i,r;if(((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.localName)==="button"&&((r=e===null||e===void 0?void 0:e.target)===null||r===void 0?void 0:r.className)==="arrow"){return}this.hide()};e.prototype.toggleDropdown=function(e){e.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};e.prototype.hide=function(){var e;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};e.prototype.render=function(){var e=this;var i,r,t;var o=(i=this.options)===null||i===void 0?void 0:i.find((function(i){return i.value===e.value}));var s=(r=this.options)===null||r===void 0?void 0:r.reduce((function(e,i){return e.label.length>i.label.length?e:i}));var n=renderedTextWidth((s===null||s===void 0?void 0:s.label)||"FILLER","14px Inter, Barlow, sans-serif");var a=renderedTextWidth(this.label,"14px Inter, Barlow, sans-serif");var c="".concat(n+a+40,"px");return h(Host,{key:"63c979bc0e8b4b75f0608a7b5c11bf92de2375cc",class:{open:!!this.open},style:{minWidth:c,display:"inline-block"}},h("div",{key:"785aac3556deaac0bbf55d8eb1f52e846448b44d",class:"control",onClick:function(i){return e.toggleDropdown(i)},onBlur:function(i){return e.handleHideDropdown(i)}},h("div",{key:"521c951babae9d882402ffb94aeb4f40a3afe9c6",class:"title",ref:function(i){return e.dropdownButton=i}},h("span",{key:"66f15637c5bcaa84326b0360b1cf0b9eeb34cc19",class:"prefix"},this.label,":"),o?o.label:this.placeholder),h("div",{key:"8f5719750fd5fb40c8787d044904629ede1cb5a5",style:{flex:"1"}}),h("div",{key:"1f16f93487115760416fa9d7fa025e25da4e1cb9",class:"separator"}),h("div",{key:"bf485d08eccf8e960d161007b3b16517f494f85f",class:"arrow",innerHTML:DropdownArrow,"aria-label":"Open Menu"})),h("div",{key:"8842f5609144f401a51124501544f0fb6c4700c9",class:"items","aria-hidden":!this.open,ref:function(i){return e.dropdownMenu=i},style:{minWidth:c}},(t=this.options)===null||t===void 0?void 0:t.map((function(i){return i.label?h("button",{onClick:function(r){return e.handleSelectOption(r,i)},class:"option ".concat(i.value===e.value?"selected":""),disabled:i.disabled},i.label):h("div",{class:"separator"})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsQuickFilter.style=VerdocsQuickFilterStyle0;export{VerdocsQuickFilter$1 as verdocs_pagination,VerdocsQuickFilter as verdocs_quick_filter};
|
@@ -0,0 +1 @@
|
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++){t=arguments[i];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function s(e){try{l(o.next(e))}catch(e){n(e)}}function a(e){try{l(o["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):r(e.value).then(s,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,r,n,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(a){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(o=1,r&&(n=a[0]&2?r["return"]:a[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;if(r=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(a[0]===6&&i.label<n[1]){i.label=n[1];n=a;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(a);break}if(n[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{o=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var o=0,r=t.length,n;o<r;o++){if(n||!(o in t)){if(!n)n=Array.prototype.slice.call(t,0,o);n[o]=t[o]}}return e.concat(n||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,g as getElement}from"./index-272d51a4.js";import{VerdocsEndpoint,getTemplate,integerSequence,getOrganizationContacts,isValidEmail,createEnvelope,getRGBA,formatFullName,createTemplateDocument,deleteTemplateDocument,updateField,createField,updateTemplateRole,createTemplateRole}from"@verdocs/js-sdk";import{S as SDKError}from"./errors-887f1e88.js";import{S as Store}from"./Datastore-52fcbac6.js";import{V as VerdocsToast}from"./Toast-c4843828.js";import{D as DocIcon,P as PngIcon,J as JpgIcon,a as PdfIcon,F as FileIcon,b as PageCountIcon,T as TrashIcon}from"./Icons-faf0377f.js";import{f as format}from"./format-b8602175.js";import{i as interact}from"./interact.min-a71beb3d.js";import{b as updateCssTransform,c as removeCssTransform,d as setControlStyles,g as getFieldId,e as defaultWidth,f as defaultHeight}from"./utils-47de6f79.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";var verdocsPreviewCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}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 VerdocsPreviewStyle0=verdocsPreviewCss;var VerdocsPreview=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.loading=true;this.template=null}e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.onTemplateIdChanged=function(e){console.log("[PREVIEW] Template ID changed",e);this.listenToTemplate()};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(o){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[PREVIEW] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[PREVIEW] Missing required template ID ".concat(this.templateId));return[2]}this.listenToTemplate()}catch(o){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,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.handlePageRendered=function(e){};e.prototype.render=function(){var e=this;var t;if(this.loading){return h(Host,null,h("verdocs-loader",null))}return h(Host,null,(((t=this.template)===null||t===void 0?void 0:t.documents)||[]).map((function(t){var i=integerSequence(1,t.pages);return h(Fragment,null,i.map((function(i){var o;var r=((o=t.page_sizes)===null||o===void 0?void 0:o[i])||{width:612,height:792};return h("verdocs-template-document-page",{templateId:t.template_id,documentId:t.id,pageNumber:i,disabled:true,editable:false,done:false,virtualWidth:r.width,virtualHeight:r.height,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))})))};Object.defineProperty(e,"watchers",{get:function(){return{templateId:["onTemplateIdChanged"]}},enumerable:false,configurable:true});return e}();VerdocsPreview.style=VerdocsPreviewStyle0;var getRoleNames=function(e){return((e===null||e===void 0?void 0:e.roles)||[]).map((function(e){return e.name}))};var getRoleIndex=function(e,t){return Math.max(getRoleNames(e).findIndex((function(e){return e===t})),0)};var verdocsSendCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}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}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 rgba(151, 151, 151, 0.2666666667)}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:rgba(0, 0, 0, 0.537254902)}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 VerdocsSendStyle0=verdocsSendCss;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$1='<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$1='<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$1='<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.sendingEnvelope=createEvent(this,"sendingEnvelope",7);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.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.environment="";this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.showPickerForId="";this.sessionContacts=[];this.sending=false;this.rolesCompleted={};this.loading=true;this.template=null}e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){console.log("[SEND] Loading template",this.templateId);this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false;e.rolesCompleted={}}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rolesCompleted={};return[2]}))}))};e.prototype.onTemplateIdChanged=function(e){console.log("[SEND] Template ID changed",e);this.listenToTemplate()};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;var o=this;return __generator(this,(function(r){try{this.endpoint.onSessionChanged((function(e,t,i){if(!i){return}var r={id:i.id,first_name:i.first_name,last_name:i.last_name,email:i.email,phone:i.phone};if(i){o.sessionContacts=[r];getOrganizationContacts(o.endpoint).then((function(e){console.log("[SEND] Got contacts",e);o.sessionContacts=__spreadArray(__spreadArray([],e,true),[r],false)})).catch((function(e){console.log("[SEND] Error getting contacts",e)}))}}));this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SEND] Unable to start Send operation, must be authenticated");return[2]}if(!this.templateId){console.log("[SEND] Missing required template ID ".concat(this.templateId));return[2]}this.listenToTemplate()}catch(o){console.log("[SEND] Error with send 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,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.recomputeRolesCompleted=function(){var e=this;var t;this.rolesCompleted={};var i={};(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).forEach((function(t){var o=t.sequence-1;i[o]||(i[o]=[]);var r="r-".concat(o,"-").concat(i[o].length);i[o].push(__assign(__assign({},t),{id:r,role_name:t.name,first_name:t.first_name,last_name:t.last_name}));if(t.first_name&&isValidEmail(t.email)){e.rolesCompleted[r]=__assign(__assign({},t),{id:r,role_name:t.name,first_name:t.first_name,last_name:t.last_name})}}))};e.prototype.getLevels=function(){var e;var t=__spreadArray([],new Set((((e=this.template)===null||e===void 0?void 0:e.roles)||[]).map((function(e){return e.sequence-1}))),true);t.sort((function(e,t){return e-t}));return t};e.prototype.getRolesAtLevel=function(e){var t;var i=(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).filter((function(t){return t.sequence-1===e})).map((function(t,i){return __assign(__assign({},t),{id:"r-".concat(e,"-").concat(i),role_name:t.name,first_name:"",last_name:""})}));return i};e.prototype.getLevelIcon=function(e){var t=this.getLevels();if(e<0){return h("div",{class:"level-icon",innerHTML:startIcon$1})}else if(e>=t.length){return h("div",{class:"level-icon",innerHTML:doneIcon$1})}else{return h("div",{class:"level-icon",innerHTML:stepIcon$1})}};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=this;var i,o;if(this.sending){console.log("[SEND] Skipping duplicate send",e);return}console.log("[SEND] Sending",e);e.preventDefault();e.stopPropagation();this.sending=true;(i=this.sendingEnvelope)===null||i===void 0?void 0:i.emit({sending:true});var r={template_id:this.templateId,name:((o=this.template)===null||o===void 0?void 0:o.name)||"New Envelope",environment:this.environment,initial_reminder:0,followup_reminders:0,recipients:Object.values(this.rolesCompleted),fields:[]};console.log("[SEND] Creating envelope",r);createEnvelope(this.endpoint,r).then((function(e){var i,o;console.log("[SEND] Send envelope",e);t.reset().catch((function(e){return console.log("Unknown Error",e)}));t.sending=false;(i=t.sendingEnvelope)===null||i===void 0?void 0:i.emit({sending:false});(o=t.send)===null||o===void 0?void 0:o.emit(__assign(__assign({},r),{name:r.name,envelope_id:e.id,envelope:e}))})).catch((function(e){var i,o,r;console.log("Send error",e);VerdocsToast(((o=(i=e.response)===null||i===void 0?void 0:i.data)===null||o===void 0?void 0:o.error)||"Error creating envelope, please try again later.");t.sending=false;(r=t.sendingEnvelope)===null||r===void 0?void 0:r.emit({sending:false})}))};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;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(!this.endpoint.session){return h(Host,{style:{display:"flex"}},h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var i=this.getLevels();var o=Object.values(this.rolesCompleted).filter((function(e){return isValidEmail(e.email)}));var r=o.length>=getRoleNames(this.template).length;return h(Host,{class:{sendable:(t=this.template)===null||t===void 0?void 0:t.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")),i.map((function(t){return h("div",{class:"level level-".concat(t)},e.getLevelIcon(t),e.getRolesAtLevel(t).map((function(t){var i,o,r,n;var s=!t.email;var a="verdocs-send-recipient-".concat(t.role_name);var l=getRoleIndex(e.template,t.role_name);var d=getRGBA(l);return s?h("div",{class:"recipient","data-ri":l,"data-rn":t.role_name,style:{backgroundColor:d},onClick:function(i){return e.handleClickRole(i,t)},id:a},((i=e.rolesCompleted[t.id])===null||i===void 0?void 0:i.first_name)?formatFullName(e.rolesCompleted[t.id]):t.role_name,h("div",{class:"icon",innerHTML:editIcon}),e.showPickerForId===t.id&&h("verdocs-portal",{anchor:a,onClickAway:function(){return e.showPickerForId=""}},h("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(i){return e.handleSelectContact(i,t)},contactSuggestions:e.sessionContacts,templateRole:(o=e.rolesCompleted[t.id])!==null&&o!==void 0?o:t,onSearchContacts:function(t){var i;return(i=e.searchContacts)===null||i===void 0?void 0:i.emit(t.detail)}}))):h("div",{class:"recipient",style:{borderColor:d},onClick:function(i){return e.handleClickRole(i,t)},id:a},((r=e.rolesCompleted[t.id])===null||r===void 0?void 0:r.first_name)?formatFullName(e.rolesCompleted[t.id]):t.role_name,h("div",{class:"icon",innerHTML:editIcon}),e.showPickerForId===t.id&&h("verdocs-portal",{anchor:a,onClickAway:function(){return e.showPickerForId=""}},h("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(i){return e.handleSelectContact(i,t)},contactSuggestions:e.sessionContacts,templateRole:(n=e.rolesCompleted[t.id])!==null&&n!==void 0?n:t,onSearchContacts:function(t){var i;return(i=e.searchContacts)===null||i===void 0?void 0:i.emit(t.detail)}})))})))})),h("div",{class:"level level-done"},this.getLevelIcon(i.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)},disabled:this.sending}),h("verdocs-button",{label:"Send",size:"small",disabled:!r||this.sending,onClick:function(t){return e.handleSend(t)}}),this.sending&&h("verdocs-spinner",null)))};Object.defineProperty(e,"watchers",{get:function(){return{templateId:["onTemplateIdChanged"]}},enumerable:false,configurable:true});return e}();VerdocsSend.style=VerdocsSendStyle0;var verdocsTemplateAttachmentsCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}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 VerdocsTemplateAttachmentsStyle0=verdocsTemplateAttachmentsCss;var VerdocsTemplateAttachments=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit",7);this.next=createEvent(this,"next",7);this.templateUpdated=createEvent(this,"templateUpdated",7);this.sdkError=createEvent(this,"sdkError",7);this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.uploading=false;this.progressLabel="Uploading...";this.progressPercent=0;this.showDeleteError=false;this.confirmDeleteDocument=null;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(o){try{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]}this.listenToTemplate()}catch(o){console.log("[TEMPLATE ATTACHMENTS] Error loading template",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,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};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,i,o,r,n,s,a,l;return __generator(this,(function(d){switch(d.label){case 0:e.stopPropagation();n=e.detail.file;if(!n){return[2]}console.log("[ATTACHMENTS] Uploading...",n);this.uploading=true;this.progressLabel="Uploading...";d.label=1;case 1:d.trys.push([1,4,,5]);return[4,createTemplateDocument(this.endpoint,this.templateId,n,this.handleUploadProgress.bind(this))];case 2:s=d.sent();console.log("[ATTACHMENTS] Created attachment",s);a=this;return[4,Store.getTemplate(this.endpoint,this.templateId,true)];case 3:a.template=d.sent();console.log("[ATTACHMENTS] Updated template",this.template);(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:this.template,event:"attachments"});this.uploading=false;this.progressLabel="";this.progressPercent=0;return[3,5];case 4:l=d.sent();console.log("[ATTACHMENTS] Error creating template",l);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(l.message,(o=l.response)===null||o===void 0?void 0:o.status,(r=l.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.template})};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,Store.getTemplate(this.endpoint,this.templateId,true)];case 2:e.template=t.sent();console.log("[ATTACHMENTS] New template",this.template);this.confirmDeleteDocument=null;return[2]}}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){if((((t=this.template)===null||t===void 0?void 0:t.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};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.loading){return h(Host,{class:"loading"},h("verdocs-loader",null))}if(!this.endpoint.session||!this.template){return h(Host,{class:"empty"})}return h(Host,null,h("h5",null,"Existing Attachments"),h("div",{class:"attachments"},(((t=this.template)===null||t===void 0?void 0:t.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.pages),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:!(((i=this.template)===null||i===void 0?void 0:i.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=VerdocsTemplateAttachmentsStyle0;var verdocsTemplateBuildTabsCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-build-tabs{-ms-flex:1;flex:1;gap:15px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-button-panel svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}.template-details-panel .row{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;margin:10px 0}.template-details-panel label{-ms-flex:0 0 70px;flex:0 0 70px}.template-details-panel .value{-ms-flex:1;flex:1;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.template-details-panel .icon-button{cursor:pointer;opacity:0.8;-ms-flex:0;flex:0;width:18px;height:18px}.template-details-panel .icon-button svg{stroke:#000000;width:18px;height:18px}.template-details-panel .icon-button:hover{opacity:1}';var VerdocsTemplateBuildTabsStyle0=verdocsTemplateBuildTabsCss;var HelpIcon='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" fill="#5c6575"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';var CopyIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" /></svg>';var STEPS=["attachments","roles","settings","fields","preview"];var VerdocsTemplateBuildTabs=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.stepChanged=createEvent(this,"stepChanged",7);this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.onTemplateIdChanged=function(e){console.log("[BUILD_TABS] Template ID changed",e);this.listenToTemplate()};e.prototype.onStepChanged=function(e){console.log("[BUILD_TABS] Step changed",e)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(o){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){this.step="attachments";console.log("[BUILD_TABS] Missing required template ID, forcing view to attachments");return[2]}this.listenToTemplate()}catch(o){console.log("[BUILD_TABS] Error loading template",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,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.setStep=function(e){var t;console.log("[BUILD_TABS] Selected step",e.detail.tab.id);e.stopPropagation();e.preventDefault();this.step=e.detail.tab.id;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e.detail.tab.id)};e.prototype.copyTemplateId=function(){var e=this;navigator.clipboard.writeText(this.templateId).then((function(){VerdocsToast("Template ID copied",{style:"success",duration:3e3})})).catch((function(t){var i;console.warn("[BUILD_TABS] Error copying to clipboard",t);(i=e.sdkError)===null||i===void 0?void 0:i.emit(t)}))};e.prototype.render=function(){var e=this;var t,i,o,r,n,s,a,l,d;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var c=(((t=this.template)===null||t===void 0?void 0:t.documents)||[]).length>0;var u=c&&(((i=this.template)===null||i===void 0?void 0:i.roles)||[]).length>0;var p=u&&(((o=this.template)===null||o===void 0?void 0:o.fields)||[]).length>0;var v=Math.max(STEPS.indexOf(this.step),0);if(!p&&v>=4){v=3}if(!u&&v>=3){v=1}if(!c&&v>=1){v=0}return h(Host,null,h("verdocs-tabs",{onSelectTab:function(t){return e.setStep(t)},selectedTab:v,tabs:[{id:"attachments",disabled:false,label:"Attachment(s)"},{id:"roles",disabled:!c,label:"Roles"},{id:"settings",disabled:!u,label:"Settings"},{id:"fields",disabled:!u,label:"Fields"},{id:"preview",disabled:!p,label:"Preview/Send"}]}),this.templateId&&h("div",{class:"info"},h("verdocs-button-panel",{icon:HelpIcon},h("div",{class:"template-details-panel"},h("h6",null,"Template Details"),h("div",{class:"row"},h("label",null,"ID:"),h("div",{class:"value"},this.templateId),h("div",{class:"icon-button",innerHTML:CopyIcon,onClick:function(){return e.copyTemplateId()}})),h("div",{class:"row"},h("label",null,"Name:"),h("div",{class:"value"},(r=this.template)===null||r===void 0?void 0:r.name)),h("div",{class:"row"},h("label",null,"Visibility:"),h("div",{class:"value"},((n=this.template)===null||n===void 0?void 0:n.is_public)?"Public":((s=this.template)===null||s===void 0?void 0:s.is_personal)?"Private":"Shared")),h("div",{class:"row"},h("label",null,"Created:"),h("div",{class:"value"},((a=this.template)===null||a===void 0?void 0:a.counter)?format(new Date((l=this.template)===null||l===void 0?void 0:l.created_at),"P p"):"")),h("div",{class:"row"},h("label",null,"Used:"),h("div",{class:"value"},(d=this.template)===null||d===void 0?void 0:d.counter," time(s)"))))))};Object.defineProperty(e,"watchers",{get:function(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}},enumerable:false,configurable:true});return e}();VerdocsTemplateBuildTabs.style=VerdocsTemplateBuildTabsStyle0;var verdocsTemplateFieldsCss="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{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-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}@media all and (max-width: 1000px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;padding:0 10px 0 0}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}@media all and (max-width: 600px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-template-fields #verdocs-template-fields-toolbar .separator,verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";var VerdocsTemplateFieldsStyle0=verdocsTemplateFieldsCss;var iconTextbox='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var iconCheck='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';var iconRadio='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';var iconDatepicker='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';var iconSignature='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var iconInitial='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var iconTimestamp='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z"></path></svg>';var iconDropdown='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';var iconAttachment='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13" /></svg>';var separator='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';var menuOptions=[{id:"signature",tooltip:"Signature",icon:iconSignature,class:"signature"},{id:"initial",tooltip:"Initials",icon:iconInitial,class:"initial"},{id:"sep1",tooltip:"",icon:separator,class:"separator"},{id:"textbox",tooltip:"Text Box",icon:iconTextbox,class:"textbox"},{id:"checkbox",tooltip:"Check Box",icon:iconCheck,class:"checkbox"},{id:"radio",tooltip:"Radio Button",icon:iconRadio,class:"radio"},{id:"dropdown",tooltip:"Dropdown",icon:iconDropdown,class:"dropdown"},{id:"sep2",tooltip:"",icon:separator,class:"separator"},{id:"date",tooltip:"Date",icon:iconDatepicker,class:"date"},{id:"timestamp",tooltip:"Timestamp",icon:iconTimestamp,class:"timestamp"},{id:"attachment",tooltip:"Attachment",icon:iconAttachment,class:"attachment"}];var VerdocsTemplateFields=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.templateUpdated=createEvent(this,"templateUpdated",7);this.fieldsUpdated=createEvent(this,"fieldsUpdated",7);this.templateListenerId=null;this.pageHeights={};this.cachedPageInfo={};this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.showMustSelectRole=false;this.selectedRoleName="";this.loading=true;this.template=null}e.prototype.onTemplateIdChanged=function(){this.listenToTemplate()};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(o){try{this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[FIELDS] Unable to start builder session, must be authenticated");return[2]}this.listenToTemplate()}catch(o){console.log("[FIELDS] Error with fields 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,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.componentDidRender=function(){interact.dynamicDrop(true);var e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){console.log("[FIELDS] Moving toolbar");t.remove();e.append(t)}};e.prototype.componentWillUpdate=function(){var e=this;var t,i;var o=((t=this.template)===null||t===void 0?void 0:t.roles)||[];if(!this.selectedRoleName||!o.find((function(t){return t&&t.name===e.selectedRoleName}))){this.selectedRoleName=((i=o[0])===null||i===void 0?void 0:i.name)||"";console.log("[FIELDS] Selected new role",this.selectedRoleName)}};e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){var i,o;e.template=t;e.loading=false;e.selectedRoleName=((o=(i=t.roles)===null||i===void 0?void 0:i[0])===null||o===void 0?void 0:o.name)||""}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.attachFieldAttributes=function(e,t,i){var o=this;i.addEventListener("settingsChanged",(function(){var e;(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:o.endpoint,template:o.template,event:"added-field"})}));i.addEventListener("deleted",(function(){var e;i.remove();(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:o.endpoint,template:o.template,event:"updated-field"})}));i.setAttribute("templateid",this.templateId);i.setAttribute("fieldname",t.name);i.setAttribute("pageNumber",String(e.pageNumber));i.setAttribute("xScale",String(e.xScale));i.setAttribute("yScale",String(e.yScale));i.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var i;var o=e.detail;this.cachedPageInfo[o.pageNumber]=o;this.pageHeights[o.pageNumber]=o.naturalHeight;(((i=this.template)===null||i===void 0?void 0:i.fields)||[]).filter((function(e){return e&&e.page===o.pageNumber})).forEach((function(e){var i=getFieldId(e);var o=document.getElementById(i);if(o){o.setAttribute("fieldname",e.name);o.setAttribute("pagenumber",String(e.page));t.makeDraggable(o)}}))};e.prototype.makeDraggable=function(e){interact(e).draggable({listeners:{move:this.handleMoveField.bind(this),end:this.handleMoveEnd.bind(this)}})};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,r,n,s;return __generator(this,(function(a){t=+(e.target.getAttribute("posX")||0);i=+(e.target.getAttribute("posY")||0);o=+(e.target.getAttribute("xScale")||1);r=+(e.target.getAttribute("yScale")||1);n=e.dx/o+t;s=e.dy/r+i;e.target.setAttribute("posX",n);e.target.setAttribute("posy",s);updateCssTransform(e.target,"translate","".concat(n,"px, ").concat(s,"px"));return[2]}))}))};e.prototype.handleMoveEnd=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,r,n,s,a,l,d,c,h,u,p,v,f,m,g,x,b,w,k,y,_,E,S,q,C,T,I,H,V,M,z,L,Z,D,A,N,R;return __generator(this,(function(B){switch(B.label){case 0:d=e.target.getAttribute("fieldname");c=(((t=this.template)===null||t===void 0?void 0:t.fields)||[]).find((function(e){return e.name===d}));if(!c){console.log("[FIELDS] Unable to find field",d,e.target);return[2]}h=e.target.getAttribute("pagenumber");u=this.cachedPageInfo[h],p=u.naturalWidth,v=p===void 0?612:p,f=u.naturalHeight,m=f===void 0?792:f,g=u.renderedHeight,x=g===void 0?792:g;b=e.target.getBoundingClientRect();w=e.target.parentElement;k=w.getBoundingClientRect();y=c.width||defaultWidth(c.type);_=c.height||defaultHeight(c.type);E=Math.max(b.left-k.left,0);S=Math.max(x-(k.bottom-b.bottom),0);q=parseInt(h);if(S>x){q=Math.min(q+1,((r=(o=((i=this.template)===null||i===void 0?void 0:i.documents)||[])===null||o===void 0?void 0:o[0])===null||r===void 0?void 0:r.pages)||1);S-=x;x=this.cachedPageInfo[q].renderedHeight;console.log("Next page",{newPageNumber:q,newY:S,renderedHeight:x})}else if(S<0){q=Math.max(q-1,1);x=this.cachedPageInfo[q].renderedHeight;S+=x;console.log("[FIELDS] Next page",{newPageNumber:q,newY:S,renderedHeight:x})}C=this.viewCoordinatesToPageCoordinates(E,S,h,v-y,m-_),T=C.x,I=C.y;B.label=1;case 1:B.trys.push([1,3,,4]);H={x:T,y:I,page:q};return[4,updateField(this.endpoint,this.templateId,d,H)];case 2:V=B.sent();console.log("[FIELDS] Updated",V);M=JSON.parse(JSON.stringify(this.template));z=M.fields.findIndex((function(e){return e.name===d}));if(z>-1){M.fields[z]=V}Store.updateTemplate(this.templateId,M);e.target.removeAttribute("posX");e.target.removeAttribute("posY");removeCssTransform(e.target);L=this.cachedPageInfo[h],Z=L.xScale,D=Z===void 0?1:Z,A=L.yScale,N=A===void 0?1:A;setControlStyles(e.target,V,D,N);(n=this.templateUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,template:M,event:"updated-field"});return[3,4];case 3:R=B.sent();VerdocsToast("Error updating field, please try again later",{style:"error"});console.log("[FIELDS] Error updating field",R);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new SDKError(R.message,(a=R.response)===null||a===void 0?void 0:a.status,(l=R.response)===null||l===void 0?void 0:l.data));e.target.removeAttribute("posX");e.target.removeAttribute("posY");removeCssTransform(e.target);return[3,4];case 4:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var i;var o=1;var r;do{r="".concat(e,"P").concat(t,"-").concat(o);o++}while((((i=this.template)===null||i===void 0?void 0:i.fields)||[]).some((function(e){return e&&e.name===r})));return r};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,i,o,r){var n=this.cachedPageInfo[i],s=n.xScale,a=s===void 0?1:s,l=n.yScale,d=l===void 0?1:l,c=n.renderedHeight,h=c===void 0?792:c;var u=Math.floor(Math.min(e/a,o));var p=Math.floor(Math.min(Math.max(h-t,0)/d,r));return{x:u,y:p}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,o,r,n,s,a,l,d,c,h,u,p,v,f,m,g;return __generator(this,(function(x){switch(x.label){case 0:if(!this.placing)return[3,2];o=e.offsetX;r=e.offsetY;n=defaultWidth(this.placing);s=defaultHeight(this.placing);a=this.cachedPageInfo[t];l=a.naturalWidth,d=l===void 0?612:l,c=a.naturalHeight,h=c===void 0?792:c;u=this.viewCoordinatesToPageCoordinates(o,r,t,d-n,h-s);p=Math.floor(u.x);v=Math.floor(u.y);f={name:this.generateFieldName(this.placing,t),role_name:this.selectedRoleName,template_id:this.templateId,document_id:a.documentId,type:this.placing,required:this.placing!=="radio",page:t,validator:null,label:null,default:null,placeholder:null,group:null,settings:{},x:p,y:v,width:n,height:s,multiline:false,options:this.placing==="radio"?[{id:"option-1",label:"Option 1"}]:[]};console.log("[FIELDS] Will save new field",f);return[4,createField(this.endpoint,this.templateId,f)];case 1:m=x.sent();console.log("[FIELDS] Saved field",m);g=JSON.parse(JSON.stringify(this.template));g.fields.push(m);Store.updateTemplate(this.templateId,g);(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:g,event:"added-field"});this.placing=null;x.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;var i,o,r;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var n=(((i=this.template)===null||i===void 0?void 0:i.roles)||[]).map((function(e){return{value:e.name,label:e.full_name?"".concat(e.name,": ").concat(e.full_name):e.name}}));return h(Host,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},onSubmit:function(){}},h("div",{id:"verdocs-template-fields-toolbar"},h("div",{class:"add-for"},"Add field:"),h("verdocs-select-input",{value:this.selectedRoleName,options:n,onInput:function(e){return t.selectedRoleName=e.target.value}}),menuOptions.map((function(e){return h("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,class:e.class,onClick:function(){if(e.tooltip){if(t.selectedRoleName){t.placing=e.id}else{t.showMustSelectRole=true}}}})}))),h("div",{class:"pages"},(((o=this.template)===null||o===void 0?void 0:o.documents)||[]).map((function(e){var i=integerSequence(1,e.pages);return i.map((function(i){var o=e.page_sizes[i];return h("verdocs-template-document-page",{templateId:t.templateId,documentId:e.id,pageNumber:i,virtualWidth:(o===null||o===void 0?void 0:o.width)||612,virtualHeight:(o===null||o===void 0?void 0:o.height)||792,disabled:true,editable:true,done:false,onClick:function(e){return t.handleClickPage(e,i)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))}))),this.showMustSelectRole&&h("verdocs-ok-dialog",{heading:"Unable to add field",message:(((r=this.template)===null||r===void 0?void 0:r.roles)||[]).length>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:function(){return t.showMustSelectRole=false}}))};Object.defineProperty(e,"watchers",{get:function(){return{templateId:["onTemplateIdChanged"]}},enumerable:false,configurable:true});return e}();VerdocsTemplateFields.style=VerdocsTemplateFieldsStyle0;var verdocsTemplateRolesCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-roles{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#46497d;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-top:0;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 15px 0 15px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{display:-ms-flexbox;display:flex;cursor:pointer;margin:0 0 0 9px}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:2px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:rgba(101, 77, 203, 0.4980392157);border:1px dashed #654dcb}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-role svg{width:32px;height:32px}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:rgba(101, 77, 203, 0.4980392157);-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-roles .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-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:16px;height:16px;stroke:#666666;margin-bottom:2px;display:inline-block}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}';var VerdocsTemplateRolesStyle0=verdocsTemplateRolesCss;var settingsIcon='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>';var startIcon='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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" fill="#00000089"><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" fill="#00000089"><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 plusIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';var iconSigner='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var iconApprover='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>';var iconCC='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>';var VerdocsTemplateRoles=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next",7);this.exit=createEvent(this,"exit",7);this.sdkError=createEvent(this,"sdkError",7);this.rolesUpdated=createEvent(this,"rolesUpdated",7);this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.showingRoleDialog=null;this.sender=null;this.loading=true;this.template=null}e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){console.log("[ROLES] Loading template",this.templateId);this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){console.log("[BUILD] Template Updated",t);e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(o){try{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]}this.listenToTemplate()}catch(o){console.log("[FIELDS] 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,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.componentDidRender=function(){interact.dynamicDrop(true);interact(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var i=+(t.target.getAttribute("dX")||0);var o=+(t.target.getAttribute("dY")||0);var r=+(t.target.dataset["sequence"]||0);var n=+(t.target.dataset["order"]||0);var s=t.dx+i;var a=t.dy+o;t.target.setAttribute("dX",s);t.target.setAttribute("dY",a);var l=t.target.getBoundingClientRect();console.log("w",l.width);t.target.style.transform="translate(".concat(s+l.width-(n+1),"px, ").concat(a-l.height*r,"px)")}.bind(this),end:function e(t){t.target.classList.remove("dragging");this.el.classList.remove("dragging");t.target.removeAttribute("dX");t.target.removeAttribute("dY");t.target.style.transform=null}.bind(this)}});interact(".dropzone").dropzone({overlap:.05,ondrop:function e(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:t.target.classList.remove("active");return[4,this.renumberTemplateRoles()];case 1:i.sent();console.log("[ROLES] Updated roles",this.getSortedRoles());(e=this.rolesUpdated)===null||e===void 0?void 0:e.emit({event:"updated",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()});return[2]}}))}))}.bind(this),ondropactivate:function(e){e.target.classList.add("visible")},ondropdeactivate:function(e){e.target.classList.remove("visible")},ondragenter:function(e){e.target.classList.add("active")},ondragleave:function(e){e.target.classList.remove("active")}})};e.prototype.handleCancel=function(){var e;(e=this.exit)===null||e===void 0?void 0:e.emit()};e.prototype.handleSubmit=function(){var e;(e=this.next)===null||e===void 0?void 0:e.emit()};e.prototype.getSortedRoles=function(){var e;return(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.getSequenceNumbers=function(){var e=[];this.getSortedRoles().forEach((function(t){if(!e.includes(t.sequence)){e.push(t.sequence)}}));return e.sort((function(e,t){return e-t}))};e.prototype.getRoleNames=function(){var e=this.getSortedRoles();return e.map((function(e){return e.name}))};e.prototype.getRolesAtSequence=function(e){var t;return(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).filter((function(t){return t&&t.sequence===e}))};e.prototype.renumberTemplateRoles=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;var i=this;return __generator(this,(function(o){e=[];t=[];this.getSequenceNumbers().forEach((function(o,r){i.getRolesAtSequence(o).forEach((function(o,n){if(!e.includes(o.name)){if(o.sequence!==r+1||o.order!==n+1){o.sequence=r+1;o.order=n+1;e.push(o.name);t.push(updateTemplateRole(i.endpoint,i.templateId,o.name,{sequence:o.sequence,order:o.order}))}}}))}));if(t.length>0){console.log("[ROLES] Submitting ".concat(t.length," renumber requests"));return[2,Promise.all(t).then((function(){return __awaiter(i,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,Store.getTemplate(this.endpoint,this.templateId,true)];case 1:e.template=t.sent();return[2]}}))}))}))]}return[2,true]}))}))};e.prototype.getNextRoleName=function(){var e,t;var i="";var o=(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).length;do{o++;i="Recipient ".concat(o)}while(!i||(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).some((function(e){return e&&e.name===i})));return i};e.prototype.callCreateRole=function(e,t,i){var o=this;console.log("[ROLES] Will create role",{name:e,sequence:t,order:i});createTemplateRole(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,message:"",order:i,full_name:null,first_name:"",last_name:"",email:"",phone:"",type:"signer",delegator:false,kba_method:null}).then((function(e){return __awaiter(o,void 0,void 0,(function(){var t,i;return __generator(this,(function(o){switch(o.label){case 0:console.log("[ROLES] Created role",e);i=JSON.parse(JSON.stringify(this.template));i.roles.push(e);console.log("Updating template in data store");Store.updateTemplate(this.templateId,i);return[4,this.renumberTemplateRoles()];case 1:o.sent();(t=this.rolesUpdated)===null||t===void 0?void 0:t.emit({event:"added",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()});return[2]}}))}))})).catch((function(e){console.log("[ROLES] Error creating role",e)}))};e.prototype.handleAddRole=function(e,t){e.stopPropagation();var i=this.getRolesAtSequence(t).length+1;var o=this.getNextRoleName();this.callCreateRole(o,t,i)};e.prototype.handleAddStep=function(e,t){e.stopPropagation();var i=1;var o=this.getNextRoleName();this.callCreateRole(o,t,i)};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."}))}if(this.loading||!this.template){return h(Host,{class:"loading"},h("verdocs-loader",null))}var t=this.getRoleNames();var i=this.getSequenceNumbers();return h(Host,null,h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("h5",null,"Roles and Workflow"),h("div",{class:"participants"},h("div",{class:"left-line"}),h("div",{class:"row"},h("div",{class:"icon",innerHTML:startIcon}),h("div",{class:"row-roles"},h("div",{class:"sender"},h("span",{class:"label"},"Send Envelope")))),h("div",{class:"row add-sequence","data-sequence":0},h("div",{class:"icon",innerHTML:plusIcon}),h("div",{class:"row-roles"},h("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),i.map((function(t){return h(Fragment,null,h("div",{class:"row"},h("div",{class:"icon",innerHTML:stepIcon}),h("div",{class:"row-roles"},h("div",{class:"dropzone","data-order":.5,"data-sequence":t}),e.getRolesAtSequence(t).map((function(i){var o=!i.email;return o?h(Fragment,null,h("div",{class:"recipient",style:{backgroundColor:getRGBA(getRoleIndex(e.template,i.name))},"data-rolename":i.name,"data-sequence":t,"data-order":i.order},h("span",{class:"type-icon",innerHTML:i.type==="signer"?iconSigner:i.type==="cc"?iconCC:iconApprover}),i.name," ",h("div",{class:"settings-button",innerHTML:settingsIcon,onClick:function(){return e.showingRoleDialog=i.name},"aria-role":"button"})),h("div",{class:"dropzone","data-order":i.order+.5,"data-sequence":t})):h(Fragment,null,h("div",{class:"recipient",style:{borderColor:getRGBA(getRoleIndex(e.template,i.name))},"data-rolename":i.name,"data-sequence":t,"data-order":i.order},h("span",{class:"type-icon",innerHTML:i.type==="signer"?iconSigner:i.type==="cc"?iconCC:iconApprover}),formatFullName(i)," ",h("div",{class:"settings-button",innerHTML:settingsIcon,onClick:function(){return e.showingRoleDialog=i.name},"aria-role":"button"})),h("div",{class:"dropzone","data-order":i.order+.5,"data-sequence":t}))})),h("button",{class:"add-role",innerHTML:plusIcon,onClick:function(i){return e.handleAddRole(i,t)}}))),i.length>0&&h("div",{class:"row add-sequence","data-sequence":t},h("div",{class:"row-roles"},h("div",{class:"icon",innerHTML:plusIcon}),h("div",{class:"dropzone","data-sequence":t+1,"data-order":1},"Add Step"))))})),h("div",{class:"row","data-sequence":i.length+1},h("div",{class:"row-roles"},h("div",{class:"icon",innerHTML:plusIcon}),h("button",{class:"add-step",innerHTML:plusIcon,onClick:function(t){return e.handleAddStep(t,i.length+1)}}))),h("div",{class:"row"},h("div",{class:"icon",innerHTML:doneIcon}),h("div",{class:"row-roles"},h("div",{class:"complete"},"Document Complete")))),t.length<1&&h("div",{class:"empty"},"You must add at least one Role before proceeding.",h("br",null)," Click the ",h("span",{innerHTML:plusIcon})," Add button above to get started."),h("div",{class:"buttons"},h("div",{class:"flex-fill"}),h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:"OK",size:"small",onClick:function(){return e.handleSubmit()},disabled:t.length<1}))),this.showingRoleDialog&&h("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:function(){e.showingRoleDialog=null},onDelete:function(){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:this.showingRoleDialog=null;return[4,this.renumberTemplateRoles()];case 1:t.sent();(e=this.rolesUpdated)===null||e===void 0?void 0:e.emit({event:"deleted",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()});return[2]}}))}))}}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsTemplateRoles.style=VerdocsTemplateRolesStyle0;export{VerdocsPreview as verdocs_preview,VerdocsSend as verdocs_send,VerdocsTemplateAttachments as verdocs_template_attachments,VerdocsTemplateBuildTabs as verdocs_template_build_tabs,VerdocsTemplateFields as verdocs_template_fields,VerdocsTemplateRoles as verdocs_template_roles};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as registerInstance,c as createEvent,h}from"./index-
|
1
|
+
import{r as registerInstance,c as createEvent,h}from"./index-272d51a4.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";var verdocsQuickFunctionsCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}';var VerdocsQuickFunctionsStyle0=verdocsQuickFunctionsCss;var DocumentIcon='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>';var TemplateIcon='<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>';var VerdocsQuickFunctions=function(){function e(e){registerInstance(this,e);this.createTemplate=createEvent(this,"createTemplate",7);this.createDocument=createEvent(this,"createDocument",7);this.endpoint=VerdocsEndpoint.getDefault()}e.prototype.handleCreateTemplate=function(){this.createTemplate.emit()};e.prototype.handleCreateDocument=function(){this.createDocument.emit()};e.prototype.render=function(){var e=this;return h("div",{key:"5477198aad675bd449cd36d7511db21ed9dae613",class:"container"},h("p",{key:"b7e436210675f73956d2b72de2683b22e9ad1def",class:"title"},"Quick Create"),h("button",{key:"638c4c831fc83d8d6e5c73ff67807c79b02d8c74",onClick:function(){return e.handleCreateTemplate()},innerHTML:TemplateIcon},"Template"),h("button",{key:"16d21850165b9b35129d12533dbe32d958093e0b",onClick:function(){return e.handleCreateDocument()},innerHTML:DocumentIcon},"Document"))};return e}();VerdocsQuickFunctions.style=VerdocsQuickFunctionsStyle0;export{VerdocsQuickFunctions as verdocs_quick_functions};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-272d51a4.js";var verdocsRadioButtonCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-radio-button{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:20px;height:20px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:100%}verdocs-radio-button.disabled{opacity:0.5}verdocs-radio-button input[type=radio]{position:absolute;opacity:0}verdocs-radio-button input[type=radio]+label:before{content:"";background:#f5f5fa;border-radius:100%;border:1px solid rgba(0, 0, 0, 0.6);display:inline-block;width:16px;height:16px;position:absolute;left:1px;top:1px;cursor:pointer;text-align:center;-webkit-transition:all 250ms ease;transition:all 250ms ease}verdocs-radio-button input[type=radio]:checked+label:before{background-color:#55bc81;-webkit-box-shadow:inset 0 0 0 2px #f5f5fa;box-shadow:inset 0 0 0 2px #f5f5fa}verdocs-radio-button input[type=radio]:focus+label:before{outline:none;border-color:#55bc81}verdocs-radio-button input[type=radio]:disabled+label:before{-webkit-box-shadow:inset 0 0 0 4px #f5f5fa;box-shadow:inset 0 0 0 4px #f5f5fa;border-color:#a0a0d0;background:#a0a0d0}verdocs-radio-button input[type=radio]+label:empty:before{margin-right:0}verdocs-radio-button.required input[type=radio]+label:before{border:1px solid #cc0000}verdocs-radio-button.hide{display:none}verdocs-radio-button.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var VerdocsRadioButtonStyle0=verdocsRadioButtonCss;var VerdocsRadioButton=function(){function o(o){registerInstance(this,o);this.checked=false;this.name="";this.value="";this.disabled=false}o.prototype.render=function(){return h(Host,{key:"67f3ed35f002dc6836a583735bc5394f13bd12d4",class:{disabled:this.disabled}},h("input",{key:"791fd4eb3d0336065189160bc9e3597f8f2e5a4b",type:"radio",value:this.value,name:this.name,id:"verdocs-radio-button-".concat(this.name,"-").concat(this.value),checked:this.checked,disabled:this.disabled}),h("label",{key:"508701c11f5ee5dc91fe5f96182b51e29451b910",htmlFor:"verdocs-radio-button-".concat(this.name,"-").concat(this.value)}))};return o}();VerdocsRadioButton.style=VerdocsRadioButtonStyle0;export{VerdocsRadioButton as verdocs_radio_button};
|