@verdocs/web-sdk 1.12.15 → 1.12.18
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/{Envelopes-0d95b997.js → Envelopes-87aea63d.js} +13 -2
- package/dist/cjs/{Envelopes-d1e5566b.js → Envelopes-89f7004d.js} +3 -3
- package/dist/cjs/{Token-576f0e8a.js → Types-35abf4e8.js} +46 -0
- package/dist/cjs/{VerdocsEndpoint-3d59c835.js → VerdocsEndpoint-b23334ec.js} +51 -15
- package/dist/cjs/{interact.min-bfe9a299.js → interact.min-d2e625b7.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-278509c0.js → utils-cc3321ad.js} +2 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-date.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +4 -6
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-preview.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-search.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-send.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-sign.cjs.entry.js +22 -12
- package/dist/cjs/verdocs-template-attachments.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-create_2.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-template-document-page.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-properties.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-roles.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-view.cjs.entry.js +72 -36
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +2 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +34 -6
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +3 -0
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.css +5 -1
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +72 -30
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.stories.js +2 -2
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +0 -2
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +1 -1
- package/dist/collection/utils/Envelopes.js +2 -2
- package/dist/components/Envelopes.js +12 -2
- package/dist/components/Envelopes2.js +3 -3
- package/dist/{esm/Token-54690789.js → components/Types.js} +47 -1
- package/dist/components/VerdocsEndpoint.js +50 -14
- package/dist/components/utils.js +2 -1
- package/dist/components/verdocs-auth.js +1 -0
- package/dist/components/verdocs-build.js +1 -0
- package/dist/components/verdocs-contact-picker2.js +1 -0
- package/dist/components/verdocs-envelope-document-page2.js +1 -0
- package/dist/components/verdocs-envelope-sidebar.js +2 -1
- package/dist/components/verdocs-field-textbox.js +0 -2
- package/dist/components/verdocs-preview.js +1 -0
- package/dist/components/verdocs-quick-functions2.js +1 -0
- package/dist/components/verdocs-search-activity2.js +1 -0
- package/dist/components/verdocs-search-box2.js +1 -0
- package/dist/components/verdocs-search.js +1 -0
- package/dist/components/verdocs-send.js +1 -0
- package/dist/components/verdocs-sign.js +19 -7
- package/dist/components/verdocs-template-attachments.js +1 -0
- package/dist/components/verdocs-template-create2.js +1 -0
- package/dist/components/verdocs-template-document-page2.js +1 -0
- package/dist/components/verdocs-template-field-properties2.js +1 -0
- package/dist/components/verdocs-template-fields2.js +1 -0
- package/dist/components/verdocs-template-name.js +1 -0
- package/dist/components/verdocs-template-properties.js +1 -0
- package/dist/components/verdocs-template-reminders.js +1 -0
- package/dist/components/verdocs-template-role-properties2.js +1 -0
- package/dist/components/verdocs-template-roles.js +1 -0
- package/dist/components/verdocs-template-sender2.js +1 -0
- package/dist/components/verdocs-template-visibility.js +1 -0
- package/dist/components/verdocs-view2.js +72 -32
- package/dist/docs.json +42 -8
- package/dist/esm/{Envelopes-3a9b4cff.js → Envelopes-16f09341.js} +12 -2
- package/dist/esm/{Envelopes-bbce70db.js → Envelopes-8c27f3c6.js} +3 -3
- package/dist/{components/Token.js → esm/Types-6dc82c14.js} +47 -1
- package/dist/esm/{VerdocsEndpoint-6ec36985.js → VerdocsEndpoint-ddde1255.js} +50 -14
- package/dist/esm/{interact.min-9ecbb023.js → interact.min-1e2f37ab.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-be76f4d8.js → utils-bca7b101.js} +2 -1
- package/dist/esm/verdocs-auth.entry.js +2 -2
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-button-panel_3.entry.js +2 -2
- package/dist/esm/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm/verdocs-dropdown_2.entry.js +4 -4
- package/dist/esm/verdocs-envelope-sidebar.entry.js +5 -5
- package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
- package/dist/esm/verdocs-field-date.entry.js +3 -3
- package/dist/esm/verdocs-field-dropdown.entry.js +3 -3
- package/dist/esm/verdocs-field-initial.entry.js +3 -3
- package/dist/esm/verdocs-field-payment.entry.js +3 -3
- package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
- package/dist/esm/verdocs-field-signature.entry.js +3 -3
- package/dist/esm/verdocs-field-textarea.entry.js +3 -3
- package/dist/esm/verdocs-field-textbox.entry.js +4 -6
- package/dist/esm/verdocs-field-timestamp.entry.js +3 -3
- package/dist/esm/verdocs-preview.entry.js +4 -4
- package/dist/esm/verdocs-quick-functions_3.entry.js +2 -2
- package/dist/esm/verdocs-search.entry.js +2 -2
- package/dist/esm/verdocs-send.entry.js +4 -4
- package/dist/esm/verdocs-sign.entry.js +22 -12
- package/dist/esm/verdocs-template-attachments.entry.js +2 -2
- package/dist/esm/verdocs-template-create_2.entry.js +5 -5
- package/dist/esm/verdocs-template-document-page.entry.js +4 -4
- package/dist/esm/verdocs-template-name.entry.js +2 -2
- package/dist/esm/verdocs-template-properties.entry.js +2 -2
- package/dist/esm/verdocs-template-reminders.entry.js +2 -2
- package/dist/esm/verdocs-template-role-properties_2.entry.js +2 -2
- package/dist/esm/verdocs-template-roles.entry.js +5 -5
- package/dist/esm/verdocs-template-visibility.entry.js +2 -2
- package/dist/esm/verdocs-view.entry.js +72 -36
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{Envelopes-3a9b4cff.js → Envelopes-16f09341.js} +1 -1
- package/dist/esm-es5/{Envelopes-bbce70db.js → Envelopes-8c27f3c6.js} +1 -1
- package/dist/esm-es5/Types-6dc82c14.js +1 -0
- package/dist/esm-es5/VerdocsEndpoint-ddde1255.js +1 -0
- package/dist/esm-es5/{interact.min-9ecbb023.js → interact.min-1e2f37ab.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-be76f4d8.js → utils-bca7b101.js} +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-roles.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +11 -0
- package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +13 -0
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +4 -0
- package/dist/types/components.d.ts +18 -2
- package/dist/types/utils/Envelopes.d.ts +1 -1
- package/dist/verdocs-web-sdk/{p-2829c669.system.entry.js → p-017e0370.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c38d2d4a.system.entry.js → p-0cbf3b46.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4c50da3f.entry.js → p-11f98973.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-416d1f60.system.entry.js → p-1498a643.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-151df9b1.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-6f705797.system.entry.js → p-17e5e3d2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4c1349bf.entry.js → p-17f37dca.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1eeceef9.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-854cf75f.entry.js → p-1f4d73da.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-2bc0d9be.js +1 -0
- package/dist/verdocs-web-sdk/{p-aafe8054.system.entry.js → p-2cadb341.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2060a40c.entry.js → p-2f46a9a5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6c0caf56.system.entry.js → p-30d55a71.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1be57028.entry.js → p-32b09c04.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-354ab558.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3165cfec.system.entry.js → p-37adaeae.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-475b76cf.system.entry.js → p-37bab4c1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d2baa74e.js → p-3d0efcc9.js} +2 -2
- package/dist/verdocs-web-sdk/{p-aac3f2bd.system.entry.js → p-3d891611.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-17889700.system.entry.js → p-43014432.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e10dd0f7.system.js → p-43c3073f.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-4718a722.js +1 -0
- package/dist/verdocs-web-sdk/p-474268c1.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-a24fc6db.entry.js → p-508bbabc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-78c681fe.system.entry.js → p-51010fb4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5abaf86d.js +1 -0
- package/dist/verdocs-web-sdk/{p-5662175d.system.entry.js → p-5e2f0571.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-97f21cbd.system.entry.js → p-603adb97.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-466589ad.entry.js → p-65effdc2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-be2bfca8.system.js → p-6a2e16ea.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c7ff8e32.entry.js → p-6a3a4a5a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a339ae33.system.entry.js → p-6d2386d1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fa5a2e43.js → p-736cf2bf.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fd718d03.system.entry.js → p-7bae4cd2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-7e6d7c07.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-8a784d93.system.entry.js → p-8124d679.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c0146adc.system.entry.js → p-8391ba92.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-83b89865.js +1 -0
- package/dist/verdocs-web-sdk/{p-62866e51.entry.js → p-83eb6fcc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-50c2b2df.entry.js → p-85409b28.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4cc767d8.system.entry.js → p-8612c102.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-03f1894c.entry.js → p-8f85b842.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ba34157a.entry.js → p-9a57225a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-34996fc6.system.entry.js → p-9f28288c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-db960f7f.entry.js → p-a13a8b81.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-53692637.entry.js → p-a209882e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7d7918bc.entry.js → p-a2ac88a4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b92991d0.entry.js → p-a49d94a5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-37ba7969.entry.js → p-a7fbb26e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3c00e2fa.system.entry.js → p-a8c30709.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-399744e1.entry.js → p-acb10f44.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-afa3d3fc.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-569844d0.entry.js → p-b173ba1c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-724c0c3d.system.entry.js → p-b8baf9d7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-31813507.system.entry.js → p-be9bf14d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c39ac27d.system.entry.js → p-c1a6a086.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3b5acfe7.system.entry.js → p-c1fdae98.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a5e2612b.entry.js → p-c51176b3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-98497031.entry.js → p-c6f81ab9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-62bd0d06.system.entry.js → p-c93c0129.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-05e4a811.entry.js → p-cce3a36c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d46a428b.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-c28e49a7.entry.js → p-d87925e0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-554a992e.system.entry.js → p-db54f1b4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e3b7c0fd.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-ae44e57b.entry.js → p-e624832c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-59a504ef.entry.js → p-eef54cf7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9e2c24ef.entry.js → p-efa81a50.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1418d2ab.system.js → p-f088f649.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-74a6403f.entry.js → p-f397f21d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-112daa16.entry.js → p-f773f3a1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6ba8adc5.system.entry.js → p-f7c9c9ea.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-24266a89.system.entry.js → p-f87f1072.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-569c96af.system.entry.js → p-fd72df84.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-177c637d.system.js → p-fdcf756a.system.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +8 -8
- package/dist/esm-es5/Token-54690789.js +0 -1
- package/dist/esm-es5/VerdocsEndpoint-6ec36985.js +0 -1
- package/dist/verdocs-web-sdk/p-0662b924.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-21603661.js +0 -1
- package/dist/verdocs-web-sdk/p-4926fa27.js +0 -1
- package/dist/verdocs-web-sdk/p-4b3172b1.js +0 -1
- package/dist/verdocs-web-sdk/p-65b43861.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-68602cb0.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8e5d9f77.system.js +0 -1
- package/dist/verdocs-web-sdk/p-a93b745a.js +0 -1
- package/dist/verdocs-web-sdk/p-af2c2f79.system.js +0 -1
- package/dist/verdocs-web-sdk/p-ebe3da9f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f529edb0.system.entry.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,o){function
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function a(e){try{l(o["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,r&&(i=s[0]&2?r["return"]:s[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;if(r=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,i;o<r;o++){if(i||!(o in t)){if(!i)i=Array.prototype.slice.call(t,0,o);i[o]=t[o]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,a as getElement}from"./index-e64d45e2.js";import{f as cancelEnvelope}from"./Envelopes-16f09341.js";import{E as EnvelopeStates}from"./Types-6dc82c14.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-ddde1255.js";import{i as saveEnvelopesAsZip,j as saveCertificate,s as saveAttachment}from"./utils-bca7b101.js";import{g as getEnvelopeById,s as state}from"./Envelopes-8c27f3c6.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./Files-70a192df.js";import"./index-d264c496.js";import"./index-24fd1580.js";var userIsEnvelopeOwner=function(e,t){return t.profile_id===(e===null||e===void 0?void 0:e.profile_id)};var userCanCancelEnvelope=function(e,t){return userIsEnvelopeOwner(e,t)&&t.status!==EnvelopeStates.COMPLETE&&t.status!==EnvelopeStates.DECLINED&&t.status!==EnvelopeStates.CANCELED};var verdocsViewCss='verdocs-view{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden;position:relative;min-height:600px;-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 .header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-view .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-view .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:70px 15px 15px 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}';var VerdocsView=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.headerTargetId=null;this.isProcessing=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}return[2,this.reloadEnvelope()]}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-view-header");if(e&&t){console.log("[VIEW] Moving header");t.remove();e.append(t)}};e.prototype.reloadEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,o;var r=this;return __generator(this,(function(i){switch(i.label){case 0:console.log("[VIEW] Checking for updated envelope");i.label=1;case 1:i.trys.push([1,3,,4]);return[4,getEnvelopeById(this.endpoint,this.envelopeId,true)];case 2:i.sent();this.isProcessing=state.envelope.documents.some((function(e){return e.type==="attachment"&&!e.processed}));if(this.isProcessing){setTimeout((function(){return r.reloadEnvelope()}),3e3)}return[3,4];case 3:o=i.sent();(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,(n=o.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handlePageRendered=function(e){var t=e.detail;console.log("[VIEW] Page rendered",t)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,o;var r=this;return __generator(this,(function(i){switch(i.label){case 0:o=e.detail.id;switch(o){case"cancel":return[3,1];case"print":return[3,4];case"download-attachments":return[3,5];case"download-certificate":return[3,6];case"download-all":return[3,7]}return[3,8];case 1:if(!confirm("Are you sure you wish to cancel this envelope? This action cannot be undone."))return[3,3];return[4,cancelEnvelope(this.endpoint,this.envelopeId)];case 2:i.sent();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:state.envelope,event:"canceled"});i.label=3;case 3:return[3,8];case 4:window.print();(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:state.envelope,event:"printed"});return[3,8];case 5:saveAttachment(this.endpoint,state.envelope,state.envelope.envelope_document_id).then((function(){var e;(e=r.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:r.endpoint,envelope:state.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading PDF",e)}));return[3,8];case 6:saveCertificate(this.endpoint,state.envelope,state.envelope.certificate_document_id).then((function(){var e;(e=r.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:r.endpoint,envelope:state.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading PDF",e)}));return[3,8];case 7:saveEnvelopesAsZip(this.endpoint,[state.envelope]).then((function(){var e;(e=r.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:r.endpoint,envelope:state.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,8];case 8:return[2]}}))}))};e.prototype.render=function(){var e=this;var t;if(state.loading||!state.envelope){return h(Host,null,h("verdocs-loader",null))}if(state.error){return h(Host,null,h("div",null,state.error))}var n=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.session,state.envelope)){n.push({id:"cancel",label:"Cancel"})}var o=state.envelope.documents.length>0;var r=!!state.envelope.certificate;if(o||r){n.push({label:""});if(o){n.push({id:"download-attachments",label:"Download Documents(s)"})}if(r){n.push({id:"download-certificate",label:"Download Certificate"})}if(o&&r){n.push({id:"download-all",label:"Download All Files"})}}return h(Host,{"data-r":state.updateCount},h("div",{class:"header",id:"verdocs-view-header"},h(Fragment,null,h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},state.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:n,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),h("div",{class:"document"},(((t=state.envelope)===null||t===void 0?void 0:t.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(t){var n=__spreadArray([],(t===null||t===void 0?void 0:t.pages)||[],true);n.sort((function(e,t){return e.sequence-t.sequence}));if(!t.processed){return h("verdocs-loader",null)}return h(Fragment,null,n.map((function(n){return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:n.sequence,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))))};Object.defineProperty(e.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsView.style=verdocsViewCss;export{VerdocsView as verdocs_view};
|
@@ -1 +1 @@
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-e64d45e2.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy(JSON.parse('[["verdocs-template-roles",[[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"forceRerender":[32]}]]],["verdocs-field-initial",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-signature",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-checkbox",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-dropdown",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-radio-button",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-loader",[[0,"verdocs-loader"]]],["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-template-properties",[[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}]]],["verdocs-template-reminders",[[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32],"loading":[32]}]]],["verdocs-template-name",[[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32],"loading":[32]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"rolesCompleted":[32],"reset":[64]}]]],["verdocs-template-visibility",[[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"loading":[32],"personal":[32],"public":[32]}]]],["verdocs-view",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"]}]]],["verdocs-upload-dialog",[[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-field-attachment",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-template-document-page",[[0,"verdocs-template-document-page",{"endpoint":[16],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["verdocs-preview",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-template-attachments",[[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32]}]]],["verdocs-floating-menu",[[0,"verdocs-floating-menu",{"options":[16]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"field":[16],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"rerender":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-button",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-checkbox_4",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"type":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["verdocs-initial-dialog",[[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["verdocs-signature-dialog",[[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["verdocs-toggle-button",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-contact-picker",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"nameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-template-role-properties_2",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"fullName":[32],"email":[32],"phone":[32],"allowDelegation":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]],["verdocs-template-create_2",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"selectedRoleName":[32],"rerender":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"showCancel":[4,"show-cancel"]}]]],["verdocs-quick-functions_3",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-toolbar-icon",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}]]],["verdocs-dropdown_2",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}],[0,"verdocs-dropdown",{"options":[16],"open":[32]}]]],["verdocs-button-panel_3",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1,"field-name"],"dirty":[32],"loading":[32],"type":[32],"setting":[32],"name":[32],"roleName":[32],"fieldType":[32],"required":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32]}],[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]]]'),e)}));
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-e64d45e2.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy(JSON.parse('[["verdocs-template-roles",[[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"forceRerender":[32]}]]],["verdocs-field-initial",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-signature",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-checkbox",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-dropdown",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-radio-button",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-loader",[[0,"verdocs-loader"]]],["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"headerTargetId":[1,"header-target-id"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-template-properties",[[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}]]],["verdocs-template-reminders",[[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32],"loading":[32]}]]],["verdocs-template-name",[[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32],"loading":[32]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"rolesCompleted":[32],"reset":[64]}]]],["verdocs-template-visibility",[[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"loading":[32],"personal":[32],"public":[32]}]]],["verdocs-view",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"isProcessing":[32]}]]],["verdocs-upload-dialog",[[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-field-attachment",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-template-document-page",[[0,"verdocs-template-document-page",{"endpoint":[16],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["verdocs-preview",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-template-attachments",[[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32]}]]],["verdocs-floating-menu",[[0,"verdocs-floating-menu",{"options":[16]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"field":[16],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"rerender":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-button",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-checkbox_4",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"type":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["verdocs-initial-dialog",[[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["verdocs-signature-dialog",[[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["verdocs-toggle-button",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-contact-picker",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"nameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-template-role-properties_2",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"fullName":[32],"email":[32],"phone":[32],"allowDelegation":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]],["verdocs-template-create_2",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"selectedRoleName":[32],"rerender":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"showCancel":[4,"show-cancel"]}]]],["verdocs-quick-functions_3",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-toolbar-icon",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}]]],["verdocs-dropdown_2",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}],[0,"verdocs-dropdown",{"options":[16],"open":[32]}]]],["verdocs-button-panel_3",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1,"field-name"],"dirty":[32],"loading":[32],"type":[32],"setting":[32],"name":[32],"roleName":[32],"fieldType":[32],"required":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32]}],[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]]]'),e)}));
|
@@ -33,6 +33,16 @@ export declare class VerdocsSign {
|
|
33
33
|
* The invite code for the signer.
|
34
34
|
*/
|
35
35
|
inviteCode: string | null;
|
36
|
+
/**
|
37
|
+
* If set, (recommended), the host application should create a <DIV> element with a unique ID. When this
|
38
|
+
* component renders, the header will be removed from its default location and placed in the target element.
|
39
|
+
* This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed").
|
40
|
+
*
|
41
|
+
* The movement of the header to the target container is not dynamic - it is performed only on the initial
|
42
|
+
* render. Host applications should not conditionally render this container. If the header's visibility must
|
43
|
+
* be externally controlled, use CSS display options to hide/show it instead.
|
44
|
+
*/
|
45
|
+
headerTargetId: string | null;
|
36
46
|
/**
|
37
47
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will
|
38
48
|
* terminate the process, and the calling application should correct the condition and re-render the component.
|
@@ -69,6 +79,7 @@ export declare class VerdocsSign {
|
|
69
79
|
recipientIndex: number;
|
70
80
|
componentWillLoad(): void;
|
71
81
|
componentDidLoad(): Promise<void>;
|
82
|
+
componentDidRender(): void;
|
72
83
|
handleClickAgree(): void;
|
73
84
|
handleOptionSelected(e: any): Promise<void>;
|
74
85
|
updateRecipientFieldValue(fieldName: string, updateResult: any): void;
|
@@ -15,6 +15,16 @@ export declare class VerdocsView {
|
|
15
15
|
* The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.
|
16
16
|
*/
|
17
17
|
envelopeId: string;
|
18
|
+
/**
|
19
|
+
* If set, (recommended), the host application should create a <DIV> element with a unique ID. When this
|
20
|
+
* component renders, the header will be removed from its default location and placed in the target element.
|
21
|
+
* This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed").
|
22
|
+
*
|
23
|
+
* The movement of the header to the target container is not dynamic - it is performed only on the initial
|
24
|
+
* render. Host applications should not conditionally render this container. If the header's visibility must
|
25
|
+
* be externally controlled, use CSS display options to hide/show it instead.
|
26
|
+
*/
|
27
|
+
headerTargetId: string | null;
|
18
28
|
/**
|
19
29
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will
|
20
30
|
* terminate the process, and the calling application should correct the condition and re-render the component.
|
@@ -28,8 +38,11 @@ export declare class VerdocsView {
|
|
28
38
|
envelope: IEnvelope;
|
29
39
|
event: string;
|
30
40
|
}>;
|
41
|
+
isProcessing: boolean;
|
31
42
|
componentWillLoad(): void;
|
32
43
|
componentDidLoad(): Promise<void>;
|
44
|
+
componentDidRender(): void;
|
45
|
+
reloadEnvelope(): Promise<void>;
|
33
46
|
handlePageRendered(e: any): void;
|
34
47
|
handleOptionSelected(e: any): Promise<void>;
|
35
48
|
render(): any;
|
package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts
CHANGED
@@ -21,6 +21,10 @@ export declare class VerdocsTemplateFields {
|
|
21
21
|
* If set, (recommended), the host application should create a <DIV> element with a unique ID. When this
|
22
22
|
* component renders, the toolbar will be removed from its default location and placed in the target element.
|
23
23
|
* This allows the parent application to more easily control its placement and scroll effects.
|
24
|
+
*
|
25
|
+
* The movement of the toolbar to the target container is not dynamic - it is performed only on the initial
|
26
|
+
* render. Host applications should not conditionally render this container. If the toolbar's visibility must
|
27
|
+
* be externally controlled, use CSS display options to hide/show it instead.
|
24
28
|
*/
|
25
29
|
toolbarTargetId: string | null;
|
26
30
|
/**
|
@@ -722,6 +722,10 @@ export namespace Components {
|
|
722
722
|
* The ID of the envelope to sign.
|
723
723
|
*/
|
724
724
|
"envelopeId": string | null;
|
725
|
+
/**
|
726
|
+
* If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the header will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed"). The movement of the header to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the header's visibility must be externally controlled, use CSS display options to hide/show it instead.
|
727
|
+
*/
|
728
|
+
"headerTargetId": string | null;
|
725
729
|
/**
|
726
730
|
* The invite code for the signer.
|
727
731
|
*/
|
@@ -831,7 +835,7 @@ export namespace Components {
|
|
831
835
|
*/
|
832
836
|
"templateId": string | null;
|
833
837
|
/**
|
834
|
-
* If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the toolbar will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects.
|
838
|
+
* If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the toolbar will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects. The movement of the toolbar to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the toolbar's visibility must be externally controlled, use CSS display options to hide/show it instead.
|
835
839
|
*/
|
836
840
|
"toolbarTargetId": string | null;
|
837
841
|
}
|
@@ -1003,6 +1007,10 @@ export namespace Components {
|
|
1003
1007
|
* The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.
|
1004
1008
|
*/
|
1005
1009
|
"envelopeId": string;
|
1010
|
+
/**
|
1011
|
+
* If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the header will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed"). The movement of the header to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the header's visibility must be externally controlled, use CSS display options to hide/show it instead.
|
1012
|
+
*/
|
1013
|
+
"headerTargetId": string | null;
|
1006
1014
|
}
|
1007
1015
|
}
|
1008
1016
|
export interface VerdocsAuthCustomEvent<T> extends CustomEvent<T> {
|
@@ -2494,6 +2502,10 @@ declare namespace LocalJSX {
|
|
2494
2502
|
* The ID of the envelope to sign.
|
2495
2503
|
*/
|
2496
2504
|
"envelopeId"?: string | null;
|
2505
|
+
/**
|
2506
|
+
* If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the header will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed"). The movement of the header to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the header's visibility must be externally controlled, use CSS display options to hide/show it instead.
|
2507
|
+
*/
|
2508
|
+
"headerTargetId"?: string | null;
|
2497
2509
|
/**
|
2498
2510
|
* The invite code for the signer.
|
2499
2511
|
*/
|
@@ -2671,7 +2683,7 @@ declare namespace LocalJSX {
|
|
2671
2683
|
*/
|
2672
2684
|
"templateId"?: string | null;
|
2673
2685
|
/**
|
2674
|
-
* If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the toolbar will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects.
|
2686
|
+
* If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the toolbar will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects. The movement of the toolbar to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the toolbar's visibility must be externally controlled, use CSS display options to hide/show it instead.
|
2675
2687
|
*/
|
2676
2688
|
"toolbarTargetId"?: string | null;
|
2677
2689
|
}
|
@@ -2927,6 +2939,10 @@ declare namespace LocalJSX {
|
|
2927
2939
|
* The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.
|
2928
2940
|
*/
|
2929
2941
|
"envelopeId"?: string;
|
2942
|
+
/**
|
2943
|
+
* If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the header will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed"). The movement of the header to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the header's visibility must be externally controlled, use CSS display options to hide/show it instead.
|
2944
|
+
*/
|
2945
|
+
"headerTargetId"?: string | null;
|
2930
2946
|
/**
|
2931
2947
|
* Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
|
2932
2948
|
*/
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { VerdocsEndpoint } from '@verdocs/js-sdk';
|
2
|
-
export declare const getEnvelopeById: (endpoint: VerdocsEndpoint, envelopeId: string) => Promise<void>;
|
2
|
+
export declare const getEnvelopeById: (endpoint: VerdocsEndpoint, envelopeId: string, forceReload?: boolean) => Promise<void>;
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function r(e){try{c(n["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):s(e.value).then(o,r)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(a=o[0]&2?s["return"]:o[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,o[1])).done)return a;if(s=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;s=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];s=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-8e5d9f77.system.js","./p-1418d2ab.system.js","./p-187b20b7.system.js","./p-51a3ea62.system.js","./p-af2c2f79.system.js","./p-e10dd0f7.system.js","./p-71c7e1ba.system.js"],(function(e){"use strict";var t,i,n,s,a,o,r,c,l;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H},function(e){a=e.V},function(e){o=e.g;r=e.s},function(e){c=e.S},function(e){l=e.f},function(){},function(){},function(){}],execute:function(){var d='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';var p='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var h='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var u={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-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.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><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.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><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.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.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>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'};var f=e("verdocs_envelope_sidebar",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.endpoint=a.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n;return __generator(this,(function(s){switch(s.label){case 0:if(!this.envelopeId){console.error("[SIDEBAR] Missing required envelopeId");return[2]}s.label=1;case 1:s.trys.push([1,3,,4]);return[4,o(this.endpoint,this.envelopeId)];case 2:s.sent();return[3,4];case 3:n=s.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(i=n.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[2]}}))}))};e.prototype.setTab=function(e){this.panelOpen=e!==this.activeTab||!this.panelOpen;this.activeTab=e};e.prototype.canResendRecipient=function(e){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.canModifyRecipient=function(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.handleRecipientAction=function(e,t){var i;console.log("recipient action",t,e);(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:r.envelope,event:t})};e.prototype.prepareHistoryEntries=function(){var e=[];var t=r.envelope.histories||[];e.push({icon:"pencil",message:"Envelope created.",date:new Date(r.envelope.created_at)});if(r.envelope.status==="complete"){e.push({icon:"pencil",message:"Envelope completed.",date:new Date(r.envelope.updated_at)})}var i=t.some((function(e){return e.event==="owner:canceled"}));if(r.envelope.status==="canceled"&&!i){e.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(r.envelope.canceled_at)})}t.forEach((function(t){var i=r.envelope.recipients.find((function(e){return e.role_name===t.role_name}));var n=(i===null||i===void 0?void 0:i.full_name)||"";switch(t.event.toLowerCase()){case"recipient:signed":e.push({icon:"gesture",message:"Signed by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:declined":e.push({icon:"clear",message:"Declined by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:opened":switch(t.event_detail){case"email":case"mail":e.push({icon:"visibility",message:"Opened by ".concat(n,", via email."),date:new Date(t.created_at)});break;case"sms":e.push({icon:"visibility",message:"Opened by ".concat(n,", via SMS."),date:new Date(t.created_at)});break;case"in_person_link":e.push({icon:"visibility",message:"Opened by ".concat(n,", via In-person link."),date:new Date(t.created_at)});break;case"in_app":e.push({icon:"visibility",message:"Opened by ".concat(n,", via dashboard."),date:new Date(t.created_at)});break;default:e.push({icon:"visibility",message:"Opened by ".concat(n,"."),date:new Date(t.created_at)})}break;case"recipient:submitted":switch(t.event_detail){case"approver":e.push({icon:"check_circle",message:"Approved by ".concat(n,"."),date:new Date(t.created_at)});break;default:e.push({icon:"send",message:"Submitted by ".concat(n,"."),date:new Date(t.created_at)});break}break;case"recipient:prepared":e.push({icon:"send",message:"Prepared by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:claimed":if(t.event_detail==="guest"){e.push({icon:"account_circle",message:"".concat(n," claimed the Verdoc as a guest."),date:new Date(t.created_at)})}else if(t.event_detail==="profile"){e.push({icon:"verified_user",message:"".concat(n," claimed the Verdoc as a verified user."),date:new Date(t.created_at)})}break;case"recipient:agreed":e.push({icon:"done",message:"".concat(n," agreed to use electronic records and signatures."),date:new Date(t.created_at)});break;case"recipient:invited":if(t.event_detail==="sms"){e.push({icon:"textsms",message:"".concat(n," has been invited via SMS."),date:new Date(t.created_at)})}else{e.push({icon:"mail",message:"".concat(n," has been invited via email."),date:new Date(t.created_at)})}break;case"invitation:resent":e.push({icon:"mail",message:"Invitation was resent to ".concat(n," ").concat(t.event_detail==="reminder"?" by reminder":"","."),date:new Date(t.created_at)});break;case"envelope:cc":e.push({icon:"contact_mail",message:"A copy has been sent to ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:delegated":e.push({icon:"people",message:t.event_detail,date:new Date(t.created_at)});break;case"recipient:updated_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"owner:updated_recipient_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"created":e.push({icon:"create",message:"Envelope was created.",date:new Date(t.created_at)});break;case"completed":e.push({icon:"done_all",message:"Envelope was completed.",date:new Date(t.created_at)});break;case"canceled":case"owner:canceled":e.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(t.created_at)});break;case"owner:get_in_person_link":e.push({icon:"link",message:"Owner accessed the In-person link for ".concat(i,"."),date:new Date(t.created_at)});break;default:console.log("unknown",t);break}}));e.sort((function(e,t){return t.date.getTime()-e.date.getTime()}));return e};e.prototype.render=function(){var e=this;var t,i,a;if(!r.envelope){return n(s,null)}var o=this.endpoint.getSession();var c=o.profile_id===r.envelope.profile_id;var d=this.prepareHistoryEntries();return n(s,{class:this.panelOpen?"open":"","data-r":r.updateCount},n("div",{class:"buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:p}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:v}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:h})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},r.envelope.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},l(new Date(r.envelope.created_at),"PP pp")),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},l(new Date(r.envelope.updated_at),"PP pp")),n("div",{class:"label"},"Status"),n("div",{class:"value"},r.envelope.status),n("div",{class:"label"},"Verdoc Owner UUID"),n("div",{class:"value"},r.envelope.profile_id),n("div",{class:"label"},"Verdoc Owner Name"),n("div",{class:"value"},(t=r.envelope.profile)===null||t===void 0?void 0:t.first_name," ",(i=r.envelope.profile)===null||i===void 0?void 0:i.last_name),n("div",{class:"label"},"Verdoc Owner Email"),n("div",{class:"value"},(a=r.envelope.profile)===null||a===void 0?void 0:a.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),r.envelope.recipients.map((function(t,i){var s;return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},i+1),n("div",{class:"recipient-type"},t.type),n("div",{class:(s={"recipient-status":true},s[t.status]=true,s)},t.status),c&&n("verdocs-dropdown",{onOptionSelected:function(i){return e.handleRecipientAction(t,i.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!e.canResendRecipient(t)},{id:"modify",label:"Modify Recipient",disabled:!e.canModifyRecipient(t)},{id:"inperson",label:"Get In-Person Link",disabled:!e.canModifyRecipient(t)||!["invited","opened"].includes(t.status)}]})),n("dic",{class:"recipient-content"},n("div",{class:"recipient-name"},t.full_name),n("div",{class:"recipient-name"},t.email),n("div",{class:"recipient-name"},t.phone)))}))),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),d.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:u[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},l(e.date,"PP pp"))))}))))};return e}());f.style=d}}}));
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function r(e){try{c(n["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):s(e.value).then(o,r)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(a=o[0]&2?s["return"]:o[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,o[1])).done)return a;if(s=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;s=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];s=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-d46a428b.system.js","./p-e3b7c0fd.system.js","./p-f088f649.system.js","./p-187b20b7.system.js","./p-51a3ea62.system.js","./p-43c3073f.system.js","./p-71c7e1ba.system.js"],(function(e){"use strict";var t,i,n,s,a,o,r,c,l;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H},function(){},function(e){a=e.V},function(e){o=e.g;r=e.s},function(e){c=e.S},function(e){l=e.f},function(){},function(){}],execute:function(){var d='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';var p='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var h='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var u={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-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.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><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.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><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.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.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>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'};var f=e("verdocs_envelope_sidebar",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.endpoint=a.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n;return __generator(this,(function(s){switch(s.label){case 0:if(!this.envelopeId){console.error("[SIDEBAR] Missing required envelopeId");return[2]}s.label=1;case 1:s.trys.push([1,3,,4]);return[4,o(this.endpoint,this.envelopeId)];case 2:s.sent();return[3,4];case 3:n=s.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(i=n.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[2]}}))}))};e.prototype.setTab=function(e){this.panelOpen=e!==this.activeTab||!this.panelOpen;this.activeTab=e};e.prototype.canResendRecipient=function(e){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.canModifyRecipient=function(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.handleRecipientAction=function(e,t){var i;console.log("recipient action",t,e);(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:r.envelope,event:t})};e.prototype.prepareHistoryEntries=function(){var e=[];var t=r.envelope.histories||[];e.push({icon:"pencil",message:"Envelope created.",date:new Date(r.envelope.created_at)});if(r.envelope.status==="complete"){e.push({icon:"pencil",message:"Envelope completed.",date:new Date(r.envelope.updated_at)})}var i=t.some((function(e){return e.event==="owner:canceled"}));if(r.envelope.status==="canceled"&&!i){e.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(r.envelope.canceled_at)})}t.forEach((function(t){var i=r.envelope.recipients.find((function(e){return e.role_name===t.role_name}));var n=(i===null||i===void 0?void 0:i.full_name)||"";switch(t.event.toLowerCase()){case"recipient:signed":e.push({icon:"gesture",message:"Signed by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:declined":e.push({icon:"clear",message:"Declined by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:opened":switch(t.event_detail){case"email":case"mail":e.push({icon:"visibility",message:"Opened by ".concat(n,", via email."),date:new Date(t.created_at)});break;case"sms":e.push({icon:"visibility",message:"Opened by ".concat(n,", via SMS."),date:new Date(t.created_at)});break;case"in_person_link":e.push({icon:"visibility",message:"Opened by ".concat(n,", via In-person link."),date:new Date(t.created_at)});break;case"in_app":e.push({icon:"visibility",message:"Opened by ".concat(n,", via dashboard."),date:new Date(t.created_at)});break;default:e.push({icon:"visibility",message:"Opened by ".concat(n,"."),date:new Date(t.created_at)})}break;case"recipient:submitted":switch(t.event_detail){case"approver":e.push({icon:"check_circle",message:"Approved by ".concat(n,"."),date:new Date(t.created_at)});break;default:e.push({icon:"send",message:"Submitted by ".concat(n,"."),date:new Date(t.created_at)});break}break;case"recipient:prepared":e.push({icon:"send",message:"Prepared by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:claimed":if(t.event_detail==="guest"){e.push({icon:"account_circle",message:"".concat(n," claimed the Verdoc as a guest."),date:new Date(t.created_at)})}else if(t.event_detail==="profile"){e.push({icon:"verified_user",message:"".concat(n," claimed the Verdoc as a verified user."),date:new Date(t.created_at)})}break;case"recipient:agreed":e.push({icon:"done",message:"".concat(n," agreed to use electronic records and signatures."),date:new Date(t.created_at)});break;case"recipient:invited":if(t.event_detail==="sms"){e.push({icon:"textsms",message:"".concat(n," has been invited via SMS."),date:new Date(t.created_at)})}else{e.push({icon:"mail",message:"".concat(n," has been invited via email."),date:new Date(t.created_at)})}break;case"invitation:resent":e.push({icon:"mail",message:"Invitation was resent to ".concat(n," ").concat(t.event_detail==="reminder"?" by reminder":"","."),date:new Date(t.created_at)});break;case"envelope:cc":e.push({icon:"contact_mail",message:"A copy has been sent to ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:delegated":e.push({icon:"people",message:t.event_detail,date:new Date(t.created_at)});break;case"recipient:updated_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"owner:updated_recipient_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"created":e.push({icon:"create",message:"Envelope was created.",date:new Date(t.created_at)});break;case"completed":e.push({icon:"done_all",message:"Envelope was completed.",date:new Date(t.created_at)});break;case"canceled":case"owner:canceled":e.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(t.created_at)});break;case"owner:get_in_person_link":e.push({icon:"link",message:"Owner accessed the In-person link for ".concat(i,"."),date:new Date(t.created_at)});break;default:console.log("unknown",t);break}}));e.sort((function(e,t){return t.date.getTime()-e.date.getTime()}));return e};e.prototype.render=function(){var e=this;var t,i,a;if(!r.envelope){return n(s,null)}var o=this.endpoint.getSession();var c=o.profile_id===r.envelope.profile_id;var d=this.prepareHistoryEntries();return n(s,{class:this.panelOpen?"open":"","data-r":r.updateCount},n("div",{class:"buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:p}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:v}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:h})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},r.envelope.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},l(new Date(r.envelope.created_at),"PP pp")),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},l(new Date(r.envelope.updated_at),"PP pp")),n("div",{class:"label"},"Status"),n("div",{class:"value"},r.envelope.status),n("div",{class:"label"},"Verdoc Owner ID"),n("div",{class:"value"},r.envelope.profile_id),n("div",{class:"label"},"Verdoc Owner Name"),n("div",{class:"value"},(t=r.envelope.profile)===null||t===void 0?void 0:t.first_name," ",(i=r.envelope.profile)===null||i===void 0?void 0:i.last_name),n("div",{class:"label"},"Verdoc Owner Email"),n("div",{class:"value"},(a=r.envelope.profile)===null||a===void 0?void 0:a.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),r.envelope.recipients.map((function(t,i){var s;return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},i+1),n("div",{class:"recipient-type"},t.type),n("div",{class:(s={"recipient-status":true},s[t.status]=true,s)},t.status),c&&n("verdocs-dropdown",{onOptionSelected:function(i){return e.handleRecipientAction(t,i.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!e.canResendRecipient(t)},{id:"modify",label:"Modify Recipient",disabled:!e.canModifyRecipient(t)},{id:"inperson",label:"Get In-Person Link",disabled:!e.canModifyRecipient(t)||!["invited","opened"].includes(t.status)}]})),n("dic",{class:"recipient-content"},n("div",{class:"recipient-name"},t.full_name),n("div",{class:"recipient-name"},t.email),n("div",{class:"recipient-name"},t.phone)))}))),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),d.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:u[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},l(e.date,"PP pp"))))}))))};return e}());f.style=d}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,o){function a(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function r(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):a(e.value).then(r,s)}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,a,n,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return l([e,t])}}function l(r){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,a&&(n=r[0]&2?a["return"]:r[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,r[1])).done)return n;if(a=0,n)r=[r[0]&2,n.value];switch(r[0]){case 0:case 1:n=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;a=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!n||r[1]>n[0]&&r[1]<n[3])){i.label=r[1];break}if(r[0]===6&&i.label<n[1]){i.label=n[1];n=r;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(r);break}if(n[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];a=0}finally{o=n=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var o=0,a=t.length,n;o<a;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))};System.register(["./p-9422b807.system.js","./p-69912cbf.system.js","./p-63398dca.system.js","./p-8e5d9f77.system.js","./p-187b20b7.system.js","./p-be2bfca8.system.js","./p-b1288daf.system.js","./p-177c637d.system.js","./p-03aeaebe.system.js","./p-f0f99234.system.js","./p-af2c2f79.system.js","./p-e10dd0f7.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,i,o,a,n,r,s,l,d,c,p,h,g,u,f,m,v,x,b;return{setters:[function(e){t=e.r;i=e.c;o=e.h;a=e.H},function(e){n=e.c;r=e.g},function(e){s=e.c},function(e){l=e.V},function(e){d=e.S},function(e){c=e.i},function(e){p=e.u;h=e.c},function(e){g=e.b;u=e.r;f=e.e;m=e.f;v=e.h},function(e){x=e.s},function(e){b=e.l},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var w='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end;padding:0 0 30px 0}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var y=" ";var q='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var C=e("verdocs_template_create",function(){function e(e){t(this,e);this.exit=i(this,"exit",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.endpoint=l.getDefault();this.file=undefined;this.creating=false}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,a,l,c,p,h;var g=this;return __generator(this,(function(u){switch(u.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;u.label=1;case 1:u.trys.push([1,4,,5]);return[4,n(this.endpoint,{name:this.file.name})];case 2:a=u.sent();console.log("[CREATE] Created template",a);return[4,s(this.endpoint,a.id,this.file)];case 3:l=u.sent();console.log("[CREATE] Created document",l);c=null;p=setInterval((function(){return __awaiter(g,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:console.log("[CREATE] Waiting for template to be processed...",l);return[4,r(this.endpoint,a.id)];case 1:c=t.sent();if(c===null||c===void 0?void 0:c.processed){console.log("[CREATE] Retrieved new template",c);if(p){clearInterval(p)}(e=this.next)===null||e===void 0?void 0:e.emit(c);this.creating=false}return[2]}}))}))}),3e3);return[3,5];case 4:h=u.sent();console.log("[CREATE] Error creating template",h);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new d(h.message,(i=h.response)===null||i===void 0?void 0:i.status,(o=h.response)===null||o===void 0?void 0:o.data));this.creating=false;return[3,5];case 5:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return o(a,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?o("div",{class:"loader-wrapper"},o("verdocs-loader",null),o("div",{class:"loading-text"},"Processing, please wait...")):o("div",{class:"upload-box"},o("div",null,o("span",{innerHTML:q})),o("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),o("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?y:"Or, if you prefer..."),o("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),o("div",{class:"buttons"},o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),o("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating})))};return e}());C.style=w;var E="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative}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 #0000000f;box-shadow:0 0 10px 5px #0000000f}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;-ms-flex:0 0 50px;flex:0 0 50px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}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_group{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_button_group{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 k='<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 Z='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" 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"/></svg>';var _='<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 V='<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 H='<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 M='<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 S='<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 I='<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 A='<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 L='<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 z=[{id:"signature",tooltip:"Signature",icon:M},{id:"initial",tooltip:"Initials",icon:S},{id:"sep1",tooltip:"",icon:L},{id:"textbox",tooltip:"Text Box",icon:k},{id:"textarea",tooltip:"Text Area",icon:Z},{id:"checkbox_group",tooltip:"Check Box",icon:_},{id:"radio_button_group",tooltip:"Radio Button",icon:V},{id:"dropdown",tooltip:"Dropdown",icon:A},{id:"sep2",tooltip:"",icon:L},{id:"date",tooltip:"Date",icon:H},{id:"timestamp",tooltip:"Timestamp",icon:I}];var P=e("verdocs_template_fields",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.pageHeights={};this.cachedPageInfo={};this.endpoint=l.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,a,n,r,s;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[FIELDS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,b(this.endpoint,this.templateId,true)];case 2:l.sent();this.selectedRoleName=x.roleNames[0];console.log("Starting with role",this.selectedRoleName);return[3,4];case 3:r=l.sent();console.log("[FIELDS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[3,6];case 5:s=l.sent();console.log("[FIELDS] Error with preview session",s);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new d(s.message,(a=s.response)===null||a===void 0?void 0:a.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){c.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.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){console.log("[FIELDS] handleFieldChange",e,t,i);this.rerender++;return[2]}))}))};e.prototype.attachFieldAttributes=function(e,t,i,o){var a=this;o.addEventListener("input",(function(e){return a.handleFieldChange(t,e)}));o.addEventListener("settingsChanged",(function(){var e;console.log("Settings",x.fields);a.selectedRoleName=t.role_name;console.log("settings changed",a.selectedRoleName,t);o.setAttribute("roleindex",g(x.roleNames,t.role_name));a.rerender++;o.setAttribute("rerender",a.rerender);(e=a.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:a.endpoint,template:x.template,event:"updated-field"})}));o.addEventListener("deleted",(function(){var e;console.log("deleted",a,t);o.remove();a.rerender++;(e=a.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:a.endpoint,template:x.template,event:"updated-field"})}));o.setAttribute("roleindex",i);o.setAttribute("pageNumber",e.pageNumber);o.setAttribute("xScale",e.xScale);o.setAttribute("yScale",e.yScale);o.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i);this.cachedPageInfo[i.pageNumber]=i;this.pageHeights[i.pageNumber]=i.naturalHeight;var o=x.fields.filter((function(e){return e.page_sequence===i.pageNumber}));o.forEach((function(e){var o=g(x.roleNames,e.role_name);var a=u(e,i,o,{disabled:true,editable:true,draggable:true});if(!a){return}if(Array.isArray(a)){a.forEach((function(a){t.attachFieldAttributes(i,e,o,a);c(a).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var i=+(e.target.getAttribute("posY")||0);var o=+(e.target.getAttribute("xScale")||1);var a=+(e.target.getAttribute("yScale")||1);var n=e.dx/o+t;var r=e.dy/a+i;e.target.setAttribute("posX",n);e.target.setAttribute("posy",r);f(e.target,"translate","".concat(n,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}))}else{t.attachFieldAttributes(i,e,o,a);c(a).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var i=+(e.target.getAttribute("posY")||0);var o=+(e.target.getAttribute("xScale")||1);var a=+(e.target.getAttribute("yScale")||1);var n=e.dx/o+t;var r=e.dy/a+i;e.target.setAttribute("posX",n);e.target.setAttribute("posy",r);f(e.target,"translate","".concat(n,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}}))};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,a,n,r,s,l,d,c,h,g,u,f,m,v,b,w,y,q;return __generator(this,(function(C){switch(C.label){case 0:t=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[t],o=i.naturalWidth,a=o===void 0?612:o,n=i.naturalHeight,r=n===void 0?792:n,s=i.renderedHeight,l=s===void 0?792:s;console.log("[FIELDS] Drag ended",t,e.target);d=e.target.getBoundingClientRect();c=e.target.parentElement;h=c.getBoundingClientRect();g=Math.max(d.left-h.left,0);u=Math.max(l-(h.bottom-d.bottom),0);f=this.viewCoordinatesToPageCoordinates(g,u,t,a-e.rect.width,r-e.rect.height),m=f.x,v=f.y;b=e.target.getAttribute("name");w=+(e.target.getAttribute("option")||"0");y=x.fields.find((function(e){return e.name===b}));console.log("Will update",b,w,y);if(!y)return[3,2];switch(y.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":y.setting.x=m;y.setting.y=v;break;case"checkbox_group":case"radio_button_group":{q=y.setting.options[w];if(q){q.x=m;q.y=v}}break}return[4,p(this.endpoint,this.templateId,b,y)];case 1:C.sent();this.handlePageRendered({detail:this.cachedPageInfo[t]});C.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var i=1;var o;do{o="".concat(e,"P").concat(t,"-").concat(i);console.log("testing field",o);i++}while(x.fields.some((function(e){return e.name===o})));console.log("Will use field name",o,x.fields);return o};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,i,o,a){var n=this.cachedPageInfo[i],r=n.xScale,s=r===void 0?1:r,l=n.yScale,d=l===void 0?1:l,c=n.renderedHeight,p=c===void 0?792:c;var h=Math.floor(Math.min(e/s,o));var g=Math.floor(Math.min(Math.max(p-t,0)/d,a));return{x:h,y:g}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,o,a,n,r,s,l,d,c,p,g,u,f,b,w,y;return __generator(this,(function(q){switch(q.label){case 0:if(!this.placing)return[3,2];console.log("Placing field",this.placing,t.sequence,e.offsetX,e.offsetY);o=t.sequence;a=e.offsetX;n=e.offsetY;r=m(this.placing);s=v(this.placing);l=this.cachedPageInfo[o];console.log("Cached page",l);d=l.naturalWidth,c=d===void 0?612:d,p=l.naturalHeight,g=p===void 0?792:p;u=this.viewCoordinatesToPageCoordinates(a,n,o,c-r,g-s);f=Math.floor(u.x);b=Math.floor(u.y);w={name:this.generateFieldName(this.placing,o),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:true,page_sequence:o,validator:null,setting:{x:f,y:b}};switch(w.type){case"attachment":case"payment":w.setting={x:f,y:b};break;case"initial":case"signature":w.setting={x:f,y:b,result:""};break;case"checkbox_group":w.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:"".concat(w.name,"-1"),value:"Option 1",checked:false,x:f,y:b}]};break;case"date":w.setting={x:f,y:b,width:r,height:s,result:""};break;case"dropdown":w.required=false;w.setting={x:f,y:b,width:r,height:s,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":w.setting={options:[{id:"".concat(w.name,"-1"),value:"Option 1",selected:false,x:f,y:b}]};break;case"textarea":case"textbox":w.setting={x:f,y:b,width:r,height:s,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":w.setting={x:f,y:b,width:r,height:s};break}if(w.type==="textarea"){w.type="textbox"}return[4,h(this.endpoint,this.templateId,w)];case 1:y=q.sent();console.log("Saved field",y);x.fields.push(y);this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:x.template,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[o]});q.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;if(!this.endpoint.session){return o(a,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(x.loading||!x.template){return o(a,null,o("verdocs-loader",null))}var i=__spreadArray([],x.template.pages,true);i.sort((function(e,t){return e.sequence-t.sequence}));return o(a,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){console.log("onSubmit")}},o("div",{id:"verdocs-template-fields-toolbar"},z.map((function(e){return o("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){if(e.tooltip){t.placing=e.id}}})}))),o("div",{class:"pages"},i.map((function(e){return o("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onClick:function(i){return t.handleClickPage(i,e)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))))};return e}());P.style=E}}}));
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,o){function a(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function r(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):a(e.value).then(r,s)}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,a,n,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return l([e,t])}}function l(r){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,a&&(n=r[0]&2?a["return"]:r[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,r[1])).done)return n;if(a=0,n)r=[r[0]&2,n.value];switch(r[0]){case 0:case 1:n=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;a=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!n||r[1]>n[0]&&r[1]<n[3])){i.label=r[1];break}if(r[0]===6&&i.label<n[1]){i.label=n[1];n=r;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(r);break}if(n[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];a=0}finally{o=n=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var o=0,a=t.length,n;o<a;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))};System.register(["./p-9422b807.system.js","./p-d46a428b.system.js","./p-69912cbf.system.js","./p-63398dca.system.js","./p-e3b7c0fd.system.js","./p-187b20b7.system.js","./p-6a2e16ea.system.js","./p-b1288daf.system.js","./p-fdcf756a.system.js","./p-03aeaebe.system.js","./p-f0f99234.system.js","./p-43c3073f.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,i,o,a,n,r,s,l,d,c,p,h,g,u,f,m,v,x,b;return{setters:[function(e){t=e.r;i=e.c;o=e.h;a=e.H},function(){},function(e){n=e.c;r=e.g},function(e){s=e.c},function(e){l=e.V},function(e){d=e.S},function(e){c=e.i},function(e){p=e.u;h=e.c},function(e){g=e.b;u=e.r;f=e.e;m=e.f;v=e.h},function(e){x=e.s},function(e){b=e.l},function(){},function(){},function(){},function(){},function(){}],execute:function(){var w='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end;padding:0 0 30px 0}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var y=" ";var q='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var C=e("verdocs_template_create",function(){function e(e){t(this,e);this.exit=i(this,"exit",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.endpoint=l.getDefault();this.file=undefined;this.creating=false}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,a,l,c,p,h;var g=this;return __generator(this,(function(u){switch(u.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;u.label=1;case 1:u.trys.push([1,4,,5]);return[4,n(this.endpoint,{name:this.file.name})];case 2:a=u.sent();console.log("[CREATE] Created template",a);return[4,s(this.endpoint,a.id,this.file)];case 3:l=u.sent();console.log("[CREATE] Created document",l);c=null;p=setInterval((function(){return __awaiter(g,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:console.log("[CREATE] Waiting for template to be processed...",l);return[4,r(this.endpoint,a.id)];case 1:c=t.sent();if(c===null||c===void 0?void 0:c.processed){console.log("[CREATE] Retrieved new template",c);if(p){clearInterval(p)}(e=this.next)===null||e===void 0?void 0:e.emit(c);this.creating=false}return[2]}}))}))}),3e3);return[3,5];case 4:h=u.sent();console.log("[CREATE] Error creating template",h);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new d(h.message,(i=h.response)===null||i===void 0?void 0:i.status,(o=h.response)===null||o===void 0?void 0:o.data));this.creating=false;return[3,5];case 5:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return o(a,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?o("div",{class:"loader-wrapper"},o("verdocs-loader",null),o("div",{class:"loading-text"},"Processing, please wait...")):o("div",{class:"upload-box"},o("div",null,o("span",{innerHTML:q})),o("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),o("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?y:"Or, if you prefer..."),o("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),o("div",{class:"buttons"},o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),o("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating})))};return e}());C.style=w;var E="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative}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 #0000000f;box-shadow:0 0 10px 5px #0000000f}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;-ms-flex:0 0 50px;flex:0 0 50px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}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_group{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_button_group{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 k='<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 Z='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" 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"/></svg>';var _='<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 V='<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 H='<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 M='<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 S='<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 I='<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 A='<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 L='<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 z=[{id:"signature",tooltip:"Signature",icon:M},{id:"initial",tooltip:"Initials",icon:S},{id:"sep1",tooltip:"",icon:L},{id:"textbox",tooltip:"Text Box",icon:k},{id:"textarea",tooltip:"Text Area",icon:Z},{id:"checkbox_group",tooltip:"Check Box",icon:_},{id:"radio_button_group",tooltip:"Radio Button",icon:V},{id:"dropdown",tooltip:"Dropdown",icon:A},{id:"sep2",tooltip:"",icon:L},{id:"date",tooltip:"Date",icon:H},{id:"timestamp",tooltip:"Timestamp",icon:I}];var P=e("verdocs_template_fields",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.pageHeights={};this.cachedPageInfo={};this.endpoint=l.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,a,n,r,s;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[FIELDS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,b(this.endpoint,this.templateId,true)];case 2:l.sent();this.selectedRoleName=x.roleNames[0];console.log("Starting with role",this.selectedRoleName);return[3,4];case 3:r=l.sent();console.log("[FIELDS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[3,6];case 5:s=l.sent();console.log("[FIELDS] Error with preview session",s);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new d(s.message,(a=s.response)===null||a===void 0?void 0:a.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){c.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.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){console.log("[FIELDS] handleFieldChange",e,t,i);this.rerender++;return[2]}))}))};e.prototype.attachFieldAttributes=function(e,t,i,o){var a=this;o.addEventListener("input",(function(e){return a.handleFieldChange(t,e)}));o.addEventListener("settingsChanged",(function(){var e;console.log("Settings",x.fields);a.selectedRoleName=t.role_name;console.log("settings changed",a.selectedRoleName,t);o.setAttribute("roleindex",g(x.roleNames,t.role_name));a.rerender++;o.setAttribute("rerender",a.rerender);(e=a.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:a.endpoint,template:x.template,event:"updated-field"})}));o.addEventListener("deleted",(function(){var e;console.log("deleted",a,t);o.remove();a.rerender++;(e=a.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:a.endpoint,template:x.template,event:"updated-field"})}));o.setAttribute("roleindex",i);o.setAttribute("pageNumber",e.pageNumber);o.setAttribute("xScale",e.xScale);o.setAttribute("yScale",e.yScale);o.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i);this.cachedPageInfo[i.pageNumber]=i;this.pageHeights[i.pageNumber]=i.naturalHeight;var o=x.fields.filter((function(e){return e.page_sequence===i.pageNumber}));o.forEach((function(e){var o=g(x.roleNames,e.role_name);var a=u(e,i,o,{disabled:true,editable:true,draggable:true});if(!a){return}if(Array.isArray(a)){a.forEach((function(a){t.attachFieldAttributes(i,e,o,a);c(a).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var i=+(e.target.getAttribute("posY")||0);var o=+(e.target.getAttribute("xScale")||1);var a=+(e.target.getAttribute("yScale")||1);var n=e.dx/o+t;var r=e.dy/a+i;e.target.setAttribute("posX",n);e.target.setAttribute("posy",r);f(e.target,"translate","".concat(n,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}))}else{t.attachFieldAttributes(i,e,o,a);c(a).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var i=+(e.target.getAttribute("posY")||0);var o=+(e.target.getAttribute("xScale")||1);var a=+(e.target.getAttribute("yScale")||1);var n=e.dx/o+t;var r=e.dy/a+i;e.target.setAttribute("posX",n);e.target.setAttribute("posy",r);f(e.target,"translate","".concat(n,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}}))};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,a,n,r,s,l,d,c,h,g,u,f,m,v,b,w,y,q;return __generator(this,(function(C){switch(C.label){case 0:t=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[t],o=i.naturalWidth,a=o===void 0?612:o,n=i.naturalHeight,r=n===void 0?792:n,s=i.renderedHeight,l=s===void 0?792:s;console.log("[FIELDS] Drag ended",t,e.target);d=e.target.getBoundingClientRect();c=e.target.parentElement;h=c.getBoundingClientRect();g=Math.max(d.left-h.left,0);u=Math.max(l-(h.bottom-d.bottom),0);f=this.viewCoordinatesToPageCoordinates(g,u,t,a-e.rect.width,r-e.rect.height),m=f.x,v=f.y;b=e.target.getAttribute("name");w=+(e.target.getAttribute("option")||"0");y=x.fields.find((function(e){return e.name===b}));console.log("Will update",b,w,y);if(!y)return[3,2];switch(y.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":y.setting.x=m;y.setting.y=v;break;case"checkbox_group":case"radio_button_group":{q=y.setting.options[w];if(q){q.x=m;q.y=v}}break}return[4,p(this.endpoint,this.templateId,b,y)];case 1:C.sent();this.handlePageRendered({detail:this.cachedPageInfo[t]});C.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var i=1;var o;do{o="".concat(e,"P").concat(t,"-").concat(i);console.log("testing field",o);i++}while(x.fields.some((function(e){return e.name===o})));console.log("Will use field name",o,x.fields);return o};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,i,o,a){var n=this.cachedPageInfo[i],r=n.xScale,s=r===void 0?1:r,l=n.yScale,d=l===void 0?1:l,c=n.renderedHeight,p=c===void 0?792:c;var h=Math.floor(Math.min(e/s,o));var g=Math.floor(Math.min(Math.max(p-t,0)/d,a));return{x:h,y:g}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,o,a,n,r,s,l,d,c,p,g,u,f,b,w,y;return __generator(this,(function(q){switch(q.label){case 0:if(!this.placing)return[3,2];console.log("Placing field",this.placing,t.sequence,e.offsetX,e.offsetY);o=t.sequence;a=e.offsetX;n=e.offsetY;r=m(this.placing);s=v(this.placing);l=this.cachedPageInfo[o];console.log("Cached page",l);d=l.naturalWidth,c=d===void 0?612:d,p=l.naturalHeight,g=p===void 0?792:p;u=this.viewCoordinatesToPageCoordinates(a,n,o,c-r,g-s);f=Math.floor(u.x);b=Math.floor(u.y);w={name:this.generateFieldName(this.placing,o),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:true,page_sequence:o,validator:null,setting:{x:f,y:b}};switch(w.type){case"attachment":case"payment":w.setting={x:f,y:b};break;case"initial":case"signature":w.setting={x:f,y:b,result:""};break;case"checkbox_group":w.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:"".concat(w.name,"-1"),value:"Option 1",checked:false,x:f,y:b}]};break;case"date":w.setting={x:f,y:b,width:r,height:s,result:""};break;case"dropdown":w.required=false;w.setting={x:f,y:b,width:r,height:s,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":w.setting={options:[{id:"".concat(w.name,"-1"),value:"Option 1",selected:false,x:f,y:b}]};break;case"textarea":case"textbox":w.setting={x:f,y:b,width:r,height:s,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":w.setting={x:f,y:b,width:r,height:s};break}if(w.type==="textarea"){w.type="textbox"}return[4,h(this.endpoint,this.templateId,w)];case 1:y=q.sent();console.log("Saved field",y);x.fields.push(y);this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:x.template,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[o]});q.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;if(!this.endpoint.session){return o(a,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(x.loading||!x.template){return o(a,null,o("verdocs-loader",null))}var i=__spreadArray([],x.template.pages,true);i.sort((function(e,t){return e.sequence-t.sequence}));return o(a,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){console.log("onSubmit")}},o("div",{id:"verdocs-template-fields-toolbar"},z.map((function(e){return o("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){if(e.tooltip){t.placing=e.id}}})}))),o("div",{class:"pages"},i.map((function(e){return o("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onClick:function(i){return t.handleClickPage(i,e)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))))};return e}());P.style=E}}}));
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as o,h as t,H as a}from"./p-7239d28d.js";import{u as s}from"./p-b28ef4bb.js";import{V as l}from"./p-
|
1
|
+
import{r as e,c as o,h as t,H as a}from"./p-7239d28d.js";import"./p-2bc0d9be.js";import{u as s}from"./p-b28ef4bb.js";import{V as l}from"./p-83b89865.js";import{s as i}from"./p-a8b01bb9.js";import{l as n}from"./p-35c46590.js";import{S as r}from"./p-7a1b2643.js";import"./p-8b2040be.js";import"./p-7291906c.js";const m=class{constructor(t){e(this,t),this.close=o(this,"close",7),this.sdkError=o(this,"sdkError",7),this.endpoint=l.getDefault(),this.templateId="",this.name="",this.dirty=!1,this.loading=!0}async componentWillLoad(){var e,o,t;try{this.endpoint.loadSession(),await n(this.endpoint,this.templateId),this.loading=!1,this.name=i.template.name,this.dirty=!1}catch(a){console.log("[TEMPLATE NAME] Error loading template",a),this.loading=!1,null===(e=this.sdkError)||void 0===e||e.emit(new r(a.message,null===(o=a.response)||void 0===o?void 0:o.status,null===(t=a.response)||void 0===t?void 0:t.data))}}handleCancel(e){var o;e.stopPropagation(),this.name=i.template.name,this.dirty=!1,console.log("Closing"),null===(o=this.close)||void 0===o||o.emit()}async handleSave(e){var o;e.stopPropagation(),await s(this.endpoint,this.templateId,{name:this.name}),i.template.name=this.name,this.dirty=!1,console.log("Closing"),null===(o=this.close)||void 0===o||o.emit()}render(){return this.endpoint.session?this.loading?t(a,{class:"loading"},t("verdocs-loader",null)):t(a,null,t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},t("label",{htmlFor:"verdocs-template-name"},"Template Name"),t("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:e=>{this.name=e.target.value,this.dirty=this.name!==i.template.name}}),t("div",{class:"buttons"},t("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),t("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):t(a,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};m.style='verdocs-template-name{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-name.loading{min-height:300px;position:relative;display:block}verdocs-template-name.empty{display:none}verdocs-template-name form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-name form label{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-name form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-name form input:focus{outline:none}verdocs-template-name .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-name ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-name ::-moz-placeholder{color:#aaaaaa}verdocs-template-name :-ms-input-placeholder{color:#aaaaaa}verdocs-template-name ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-name ::placeholder{color:#aaaaaa}';export{m as verdocs_template_name}
|