@verdocs/web-sdk 4.2.13 → 4.2.25
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/{Toast-bb6f20af.js → Toast-818b7b3e.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +98 -103
- package/dist/cjs/verdocs-button_3.cjs.entry.js +9 -4
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +7 -7
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_10.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-radio-button_3.cjs.entry.js +8 -8
- package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.css +12 -0
- package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.js +12 -2
- package/dist/collection/components/controls/verdocs-toggle-button/verdocs-toggle-button.js +1 -1
- package/dist/collection/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.js +1 -1
- package/dist/collection/components/dialogs/verdocs-dialog/verdocs-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.js +2 -2
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +1 -1
- package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +1 -1
- package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +13 -8
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +101 -109
- package/dist/collection/components/embeds/verdocs-search/verdocs-search.js +1 -1
- package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -1
- package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +6 -6
- package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.js +2 -2
- package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.js +1 -1
- package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.js +1 -1
- package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +7 -7
- package/dist/collection/components/templates/verdocs-template-sender/verdocs-template-sender.js +1 -1
- package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
- package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
- package/dist/collection/utils/Toast.js +2 -2
- package/dist/components/Toast.js +2 -2
- package/dist/components/verdocs-auth.js +102 -110
- package/dist/components/verdocs-dialog.js +1 -1
- package/dist/components/verdocs-envelope-document-page2.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +6 -6
- package/dist/components/verdocs-initial-dialog2.js +1 -1
- package/dist/components/verdocs-kba-dialog.js +2 -2
- package/dist/components/verdocs-ok-dialog2.js +1 -1
- package/dist/components/verdocs-quick-functions2.js +1 -1
- package/dist/components/verdocs-search-tabs.js +1 -1
- package/dist/components/verdocs-search.js +1 -1
- package/dist/components/verdocs-signature-dialog2.js +1 -1
- package/dist/components/verdocs-status-indicator2.js +2 -2
- package/dist/components/verdocs-template-card.js +1 -1
- package/dist/components/verdocs-template-document-page2.js +1 -1
- package/dist/components/verdocs-template-role-properties2.js +7 -7
- package/dist/components/verdocs-template-sender2.js +1 -1
- package/dist/components/verdocs-template-star2.js +1 -1
- package/dist/components/verdocs-template-tags.js +1 -1
- package/dist/components/verdocs-text-input2.js +10 -4
- package/dist/components/verdocs-toggle-button2.js +1 -1
- package/dist/components/verdocs-toolbar-icon2.js +1 -1
- package/dist/components/verdocs-upload-dialog2.js +1 -1
- package/dist/esm/{Toast-b71de686.js → Toast-3e2645fc.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +99 -104
- package/dist/esm/verdocs-button_3.entry.js +9 -4
- package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm/verdocs-dialog.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +7 -7
- package/dist/esm/verdocs-field-attachment_13.entry.js +3 -3
- package/dist/esm/verdocs-kba-dialog.entry.js +2 -2
- package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm/verdocs-preview_10.entry.js +1 -1
- package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm/verdocs-radio-button_3.entry.js +8 -8
- package/dist/esm/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-status-indicator.entry.js +2 -2
- package/dist/esm/verdocs-template-card.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js +2 -2
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-template-tags.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{Toast-b71de686.js → Toast-3e2645fc.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-button_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_10.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-radio-button_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-text-input/verdocs-text-input.d.ts +1 -0
- package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +10 -13
- package/dist/verdocs-web-sdk/{p-b3017cd6.entry.js → p-0349f360.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-20593762.entry.js → p-0ff14c4d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-67e9f8a5.entry.js → p-1dd1d686.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8ee31f33.system.entry.js → p-1fec2d1e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3f9b5a02.entry.js → p-3093ede7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9ce9d353.system.entry.js → p-314321b8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-322fa613.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-51544250.system.entry.js → p-3a4dcc93.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8ca0c8c2.system.entry.js → p-3a8b2213.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d6f6f255.entry.js → p-402a35bf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-71f53fd6.entry.js → p-40d811fe.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0d54abe5.entry.js → p-4145b69a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-48fce604.system.entry.js → p-420fc040.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7a4930b1.entry.js → p-4291db9f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-62af2ee6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-62d7e050.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-0713ab8d.entry.js → p-67c3b3d1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ee08c75b.system.entry.js → p-72ae790a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-65df6ef0.entry.js → p-748ed4ef.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-71efd549.system.entry.js → p-7b222135.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cef88396.system.entry.js → p-7bfe3ed2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3f246894.entry.js → p-7e6fa885.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e1679e5b.system.entry.js → p-7ef593c3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a7dac539.entry.js → p-8092bd81.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cf1ae7bf.entry.js → p-82f7b16a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fd2c9b30.entry.js → p-83c81948.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2be9ba53.system.entry.js → p-8c3c0869.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f632ffac.entry.js → p-8ce594b2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d2feac5b.system.entry.js → p-96e5a460.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-aed8139a.system.entry.js → p-99510d53.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fc5e568d.system.entry.js → p-9c955106.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6bbea733.system.entry.js → p-a908ebeb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1b6664c9.entry.js → p-ad2814b4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8d0807ab.system.entry.js → p-ad474154.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-b2b16ce8.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-08210588.system.entry.js → p-bb0ed696.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7ce23c90.system.js → p-c8915559.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4bb08486.entry.js → p-d61235cf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-77ec3348.entry.js → p-dda420e7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a1289b75.system.entry.js → p-e772c022.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-10947d22.entry.js → p-eaf4de2f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1030a0b7.system.entry.js → p-ebc3ed52.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fdb77c22.system.entry.js → p-f2f6c646.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6fc92b73.system.entry.js → p-f54b4cc0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-78908c67.entry.js → p-f978550e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-026b3103.js → p-fa58907b.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f80e65ce.entry.js → p-fe246d59.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/verdocs-web-sdk/p-3d0ceb71.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-50aa20d5.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-dd426399.system.entry.js +0 -1
@@ -12,7 +12,7 @@ export class VerdocsTemplateCard {
|
|
12
12
|
}
|
13
13
|
render() {
|
14
14
|
var _a, _b, _c, _d;
|
15
|
-
return (h(Host, { key: '
|
15
|
+
return (h(Host, { key: '92db1527b29db1accce1236ad170c1d071bd9af9' }, h("span", { key: '6df84f4e3f47f2a3bde4de1aaeb55cfdaaf24cec', class: "name" }, this.template.name), h("span", { key: '6be1cd61a1496fa579f25ff06fcd5295149aada1', class: "org-name" }, ((_a = this.template.organization) === null || _a === void 0 ? void 0 : _a.name) || 'Public'), h("hr", { key: '8f95b065445cf18ec71b2976c5c75d7335857f1a' }), h("div", { key: 'cce4e78b58f924de6b68bcf947af20dbed74ae15', class: "controls" }, h("div", { key: '124cf87ac1ab5f25d505004ebba55c0ad00d3b34', class: "control" }, h("span", { key: 'b39885d89f97c7f29077f5a0e8e943c2fd74e8a0', class: "icon", innerHTML: StarIcon }), h("span", { key: '7fa8e32525ed221d9907e658ca6f982fed16dba6', class: "value" }, this.template.star_counter)), h("div", { key: '37fb74c5e9302e8c310e2052b725183bac587c3d', class: "control secondary" }, h("span", { key: 'bef0ebc42c5f9062bf67d86a097dd0d4a8e03e11', class: "icon", innerHTML: PagesIcon }), h("span", { key: '3763e7ec4ac4e73ce712c460101223d6f8663b2a', class: "value" }, ((_d = (_c = (_b = this.template) === null || _b === void 0 ? void 0 : _b.documents) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.pages) || 1)), h("div", { key: 'e4f9d35db361036a46297e82ecf1528058e214bc', class: "control secondary" }, h("span", { key: '985da1d76dfeecb4e57e440fbf788c18453696a1', class: "icon", innerHTML: EmailIcon }), h("span", { key: 'f098866929e19bf47e30a660aba05a3e508561ed', class: "value" }, this.template.counter)), h("span", { key: 'c742e5c6e1087a9b0f1a8b037476759274838c42', class: "additional-controls", innerHTML: ActionsIcon }))));
|
16
16
|
}
|
17
17
|
static get is() { return "verdocs-template-card"; }
|
18
18
|
static get originalStyleUrls() {
|
@@ -93,7 +93,7 @@ export class VerdocsTemplateDocumentPage {
|
|
93
93
|
}
|
94
94
|
render() {
|
95
95
|
const height = `${this.renderedHeight}px`;
|
96
|
-
return (h(Host, { key: '
|
96
|
+
return (h(Host, { key: '6fabe54a0840385228e13a0e61f7748d41fbcf17', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } }, layer.name === 'controls' &&
|
97
97
|
this.fieldStore
|
98
98
|
.get('fields')
|
99
99
|
.filter(field => field && field.page === this.pageNumber)
|
@@ -118,31 +118,31 @@ export class VerdocsTemplateRoleProperties {
|
|
118
118
|
}
|
119
119
|
render() {
|
120
120
|
const hasFields = this.fieldStore.get('fields').some(field => field.role_name === this.roleName);
|
121
|
-
return (h(Host, { key: '
|
121
|
+
return (h(Host, { key: 'c2728e2fb47306d99d3eebaaa38130322d37ad64' }, h("div", { key: 'a329fa189219f99c747e915ee2f0a41de978474f', class: "background-overlay", onClick: e => this.handleCancel(e) }, h("div", { key: 'a0325d8949c173d73ba2a48af5924d015e746266', class: "dialog" }, h("form", { key: '378e17dc270ae28779557793f6669143c86a41a3', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("verdocs-text-input", { key: '20f8de0856c8e5c847b7e1852edc437a8c6427fb', id: "verdocs-role-name", label: "Role Name", value: this.name, autocomplete: "off", disabled: hasFields, helpText: hasFields
|
122
122
|
? 'This role has fields assigned and can no longer be renamed.'
|
123
123
|
: 'A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.', placeholder: "Role Name...", onInput: (e) => {
|
124
124
|
this.name = e.target.value;
|
125
125
|
this.dirty = true;
|
126
|
-
} }), h("div", { key: '
|
126
|
+
} }), h("div", { key: '35310c43c72be59031d74995d5e4e08fd74b34bd', class: "row" }, h("div", { key: '4b47e8595ad1119d4027049b56acd43443a4b09a', class: "input-label" }, "Type:"), h("verdocs-select-input", { key: '97f18bfb8052d6f0690bf2d570a42a0a604556b9', value: this.type, options: [
|
127
127
|
{ label: 'Signer', value: 'signer' },
|
128
128
|
{ label: 'CC', value: 'cc' },
|
129
129
|
{ label: 'Approver', value: 'approver' },
|
130
130
|
], onInput: (e) => {
|
131
131
|
this.type = e.target.value;
|
132
132
|
this.dirty = true;
|
133
|
-
} }), h("verdocs-help-icon", { key: '
|
133
|
+
} }), h("verdocs-help-icon", { key: '3f4059c1a1232aa08449e4518ccd9473066430df', text: "Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review." })), h("verdocs-text-input", { key: 'df9c1439da6894608dad4ef81dddf21e2591115f', id: "verdocs-recipient-email", label: "Full Name", value: this.full_name, autocomplete: "off", helpText: "The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Full Name...", onInput: (e) => {
|
134
134
|
this.full_name = e.target.value;
|
135
135
|
this.dirty = true;
|
136
|
-
} }), h("verdocs-text-input", { key: '
|
136
|
+
} }), h("verdocs-text-input", { key: 'af0ac9644670cb4b3e5607eb75e6c0aa9746ed76', id: "verdocs-recipient-email", label: "Email", value: this.email, autocomplete: "off", helpText: "The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Email Address...", onInput: (e) => {
|
137
137
|
this.email = e.target.value;
|
138
138
|
this.dirty = true;
|
139
|
-
} }), h("verdocs-text-input", { key: '
|
139
|
+
} }), h("verdocs-text-input", { key: 'f7055746726c2d199beac4206847bc1534de5601', id: "verdocs-recipient-phone", label: "Phone", value: this.phone, autocomplete: "off", helpText: "The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Phone Number...", onInput: (e) => {
|
140
140
|
this.phone = e.target.value;
|
141
141
|
this.dirty = true;
|
142
|
-
} }), h("div", { key: '
|
142
|
+
} }), h("div", { key: '12903a2f12f8f750cecaf0332a69099f67b4d530', class: "row" }, h("div", { key: '9959973a48e154155cc6b5892ae81a5105d62d33', class: "input-label" }, "May Delegate:"), h("div", { key: '0dd8af27a2fd4cf6c8a641a39ea3332887b1f71a', class: "checkbox-wrapper" }, h("verdocs-checkbox", { key: '8a145a05207fc1cae42d5c3e4596c2d673ecc097', checked: this.delegator, onInput: (e) => {
|
143
143
|
this.delegator = e.target.checked;
|
144
144
|
this.dirty = true;
|
145
|
-
} })), h("verdocs-help-icon", { key: '
|
145
|
+
} })), h("verdocs-help-icon", { key: 'd725f8446967e2c145e0e5ecad8416ee7e368bc8', text: "If enabled, this recipient may delegate their actions to another individual." })), h("div", { key: 'eae241c53cc8213d5c14bb213b41923620e17be3', class: "buttons" }, h("button", { key: '5eb5792ff0f79aab12bcfbb20ffdf58d431f4103', class: "delete-button", disabled: this.dirty, onClick: e => this.handleDelete(e), innerHTML: TrashIcon }), h("div", { key: 'bca3f871c37e1a346d98620ee0fd1dd0dfce9917', style: { flex: '1' } }), h("verdocs-button", { key: 'b40fb1ff70cb3cce19b793f940fc0038d12490ea', size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '51270815757b0fd6803d527ac3388f1e2af16b25', size: "small", label: "Save", disabled: !this.dirty, onClick: e => this.handleSave(e) })))))));
|
146
146
|
}
|
147
147
|
static get is() { return "verdocs-template-role-properties"; }
|
148
148
|
static get originalStyleUrls() {
|
package/dist/collection/components/templates/verdocs-template-sender/verdocs-template-sender.js
CHANGED
@@ -61,7 +61,7 @@ export class VerdocsTemplateSender {
|
|
61
61
|
});
|
62
62
|
}
|
63
63
|
render() {
|
64
|
-
return (h(Host, { key: '
|
64
|
+
return (h(Host, { key: 'f8d8cca0bfceaf4770487a2013d8b4719236ddf4' }, h("div", { key: '2f3adaefa9ee3dcbac271ee02d76fa46bbe58e10', class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { key: '659f51292068e189d9c995db643fae5c2acb15b3', class: "dialog" }, h("div", { key: '3015a1be71fe71983fce44357433b5e2186c4946', class: "options" }, h("div", { key: 'ce818b1d25630a8f487fbaff0c5db38119a6f824', class: "option" }, h("verdocs-radio-button", { key: '8a4d98f6553248a88a024c1d024d3a4145a202ed', name: "template-sender", value: 'everyone', checked: this.sender === 'everyone', onInput: () => this.handleSelectSetting('everyone') }), h("div", { key: 'e2924ad4589dfcdca2ad342852f517f919e99914', class: "description" }, h("div", { key: '6bf123474dc857917dd84c971bb3e634eecc8868', class: "name" }, "Anyone on the Web"), h("verdocs-help-icon", { key: '53129fa609dcb99cf6f1ddc76867c09a90359973', text: "Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)" }))), h("div", { key: '4b566084de0d35ade13b0d82354ddfab42fb4be2', class: "option" }, h("verdocs-radio-button", { key: '3704512d6d38faf3f275fb039a1c97cf2464b0e2', name: "template-sender", value: 'everyone_as_creator', checked: this.sender === 'everyone_as_creator', onInput: () => this.handleSelectSetting('everyone_as_creator') }), h("div", { key: '8dd4ffbcc1727fb28bec4e404dcc1a4a7cec9431', class: "description" }, h("div", { key: '2c4093c5ecff6192c6ec94ffa0a32ae516a4d13d', class: "name" }, "Anyone on the Web as me"), h("verdocs-help-icon", { key: '73b99113cd11ac40ef3784fe23b523e54f2a8d5a', text: "Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)" }))), h("div", { key: '528f64ff348386c14b0cea7d4983bccd664a0645', class: "option" }, h("verdocs-radio-button", { key: 'f1538d9c86ad7f2dc337a42f53f49f86faa3a469', name: "template-sender", value: 'organization_member', checked: this.sender === 'organization_member', onInput: () => this.handleSelectSetting('organization_member') }), h("div", { key: 'ddd5129726d3b2a0786341c2df2f8012e783d643', class: "description" }, h("div", { key: '449c1a5eb124b7006f319f96ff617d6480cab3a9', class: "name" }, "Anyone in my organization"), h("verdocs-help-icon", { key: '8d01e0fba4bfb8b5d12390b5c138b19d6362a055', text: "Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')" }))), h("div", { key: '76f686a2976749ffa02be5b95d9d61ded315714c', class: "option" }, h("verdocs-radio-button", { key: '00c5b5d78a7c380665abc3157403f597cbcaabc9', name: "template-sender", value: 'organization_member_as_creator', checked: this.sender === 'organization_member_as_creator', onInput: () => this.handleSelectSetting('organization_member_as_creator') }), h("div", { key: '7eaf1cce0528f17359b19320ba0e10311ec34821', class: "description" }, h("div", { key: '4bd0b1b35504afa1c67566ac8cd589041958de41', class: "name" }, "Anyone in my organization as me"), h("verdocs-help-icon", { key: 'cfe825b414ef5a0c4ddd33e3de621629cc92149e', text: "Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)" }))), h("div", { key: 'f86771d023449f505a45f07b73e505a7c481bdf0', class: "option" }, h("verdocs-radio-button", { key: '039f5bb7b444f942fb609ad1ef5fda0d5f160083', name: "template-sender", value: 'creator', checked: this.sender === 'creator', onInput: () => this.handleSelectSetting('creator') }), h("div", { key: 'b7ecd4a8e68ac17e9ba116a6f8f2dcf84ff92c56', class: "description" }, h("div", { key: 'ca006222ed947daf96a22425fe7dbc1dd809aef5', class: "name" }, "Me"), h("verdocs-help-icon", { key: 'fec5c4aeb7285eaa3a22d238208e2072b17a14b0', text: "Only I can use this template." })))), h("div", { key: '1344c8e35ee75f17f5a035ba93e770958b1fcba0', class: "buttons" }, h("verdocs-button", { key: '6d2e2796fd3464440662e8dd5dba2ae273aab02e', label: "Close", onClick: () => this.handleClose() }))))));
|
65
65
|
}
|
66
66
|
static get is() { return "verdocs-template-sender"; }
|
67
67
|
static get originalStyleUrls() {
|
@@ -38,7 +38,7 @@ export class VerdocsTemplateStar {
|
|
38
38
|
});
|
39
39
|
}
|
40
40
|
render() {
|
41
|
-
return (h(Host, { key: '
|
41
|
+
return (h(Host, { key: '96d245ead9fb7891ab0f497b37b306b379a20abc' }, h("div", { key: '67ceace21c9957fbb27a05a527ef1b7847ac33a9', class: `star ${this.updating ? 'updating' : ''}`, innerHTML: this.template.star_counter ? SolidStarIcon : OutlineStarIcon, onClick: e => this.toggle(e) }), h("div", { key: '3a76f28df10bb79ffb87ca8a046a6ec4e04dc49b', class: "count" }, this.template.star_counter || '--')));
|
42
42
|
}
|
43
43
|
static get is() { return "verdocs-template-star"; }
|
44
44
|
static get originalStyleUrls() {
|
@@ -8,7 +8,7 @@ export class VerdocsTemplateTags {
|
|
8
8
|
}
|
9
9
|
render() {
|
10
10
|
var _a;
|
11
|
-
return (h(Host, { key: '
|
11
|
+
return (h(Host, { key: 'e754a66c64713a7b01c072b1becd919d9768ac66' }, (_a = this.tags) === null || _a === void 0 ? void 0 : _a.map(tag => (h("span", null, tag)))));
|
12
12
|
}
|
13
13
|
static get is() { return "verdocs-template-tags"; }
|
14
14
|
static get originalStyleUrls() {
|
@@ -44,7 +44,7 @@ export const VerdocsToast = (text, config = {}) => {
|
|
44
44
|
const icon = Icons[style] || Icons.default;
|
45
45
|
const toastBody = `
|
46
46
|
${icon}
|
47
|
-
<div class="verdocs-toast-text" style="padding: 12px 12px 12px 0;">${text}</div>
|
47
|
+
<div class="verdocs-toast-text" style="padding: 12px 12px 12px 0; display: flex; flex: 1">${text}</div>
|
48
48
|
<div class="verdocs-toast-close" style="padding: 12px 10px; background: rgba(0, 0, 0, 0.2); cursor: pointer;">✕</div>
|
49
49
|
`;
|
50
50
|
const toast = document.createElement('div');
|
@@ -52,7 +52,7 @@ export const VerdocsToast = (text, config = {}) => {
|
|
52
52
|
toast.innerHTML = toastBody;
|
53
53
|
toast.style.cssText = `
|
54
54
|
display: flex; flex-direction: row; gap: 10px; align-items: center;
|
55
|
-
position: fixed; top: 20px; right: 20px; z-index: 2147483647; max-width: calc(
|
55
|
+
position: fixed; top: 20px; right: 20px; z-index: 2147483647; width: 80%; max-width: calc(100% - 40px);
|
56
56
|
color: #ffffff; background: ${color}; font-family: 'Barlow', sans-serif;
|
57
57
|
border-radius: 2px; padding-left: 10px;
|
58
58
|
box-shadow: 0 3px 7px 2px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);`;
|
package/dist/components/Toast.js
CHANGED
@@ -44,7 +44,7 @@ const VerdocsToast = (text, config = {}) => {
|
|
44
44
|
const icon = Icons[style] || Icons.default;
|
45
45
|
const toastBody = `
|
46
46
|
${icon}
|
47
|
-
<div class="verdocs-toast-text" style="padding: 12px 12px 12px 0;">${text}</div>
|
47
|
+
<div class="verdocs-toast-text" style="padding: 12px 12px 12px 0; display: flex; flex: 1">${text}</div>
|
48
48
|
<div class="verdocs-toast-close" style="padding: 12px 10px; background: rgba(0, 0, 0, 0.2); cursor: pointer;">✕</div>
|
49
49
|
`;
|
50
50
|
const toast = document.createElement('div');
|
@@ -52,7 +52,7 @@ const VerdocsToast = (text, config = {}) => {
|
|
52
52
|
toast.innerHTML = toastBody;
|
53
53
|
toast.style.cssText = `
|
54
54
|
display: flex; flex-direction: row; gap: 10px; align-items: center;
|
55
|
-
position: fixed; top: 20px; right: 20px; z-index: 2147483647; max-width: calc(
|
55
|
+
position: fixed; top: 20px; right: 20px; z-index: 2147483647; width: 80%; max-width: calc(100% - 40px);
|
56
56
|
color: #ffffff; background: ${color}; font-family: 'Barlow', sans-serif;
|
57
57
|
border-radius: 2px; padding-left: 10px;
|
58
58
|
box-shadow: 0 3px 7px 2px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);`;
|
@@ -1,48 +1,47 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
2
|
-
import { VerdocsEndpoint, createProfile, authenticate,
|
2
|
+
import { VerdocsEndpoint, createProfile, verifyEmail, authenticate, getMyUser, resendVerification, resetPassword } from '@verdocs/js-sdk';
|
3
3
|
import { V as VerdocsToast } from './Toast.js';
|
4
4
|
import { S as SDKError } from './errors.js';
|
5
5
|
import { d as defineCustomElement$4 } from './verdocs-button2.js';
|
6
6
|
import { d as defineCustomElement$3 } from './verdocs-help-icon2.js';
|
7
7
|
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
8
8
|
|
9
|
-
const verdocsAuthCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-auth{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-
|
9
|
+
const verdocsAuthCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-auth{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{width:320px;display:-ms-flexbox;display:flex;padding:20px;max-width:90%;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;background:#ffffff}verdocs-auth .logo{width:128px;max-width:100%;margin:20px 0 30px}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth h4 verdocs-button button.normal .button-label{padding:0}verdocs-auth h6{text-align:center;font-weight:500;font-size:16px;line-height:1.75;margin:0 0 20px 0}verdocs-auth em{font-size:14px;margin:15px 0}verdocs-auth .buttons{gap:20px;margin:20px 0 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p{margin:0 0 1em 0}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}";
|
10
10
|
const VerdocsAuthStyle0 = verdocsAuthCss;
|
11
11
|
|
12
|
-
const RECHECK_INTERVAL = 5000;
|
13
12
|
const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsAuth extends HTMLElement {
|
14
13
|
constructor() {
|
15
14
|
super();
|
16
15
|
this.__registerHost();
|
17
16
|
this.authenticated = createEvent(this, "authenticated", 7);
|
18
17
|
this.sdkError = createEvent(this, "sdkError", 7);
|
19
|
-
this.recheckTimer = null;
|
20
18
|
this.resendDisabledTimer = null;
|
21
|
-
|
19
|
+
// We can't instantly log in on the default endpoint because other listeners might see
|
20
|
+
// its events and incorrectly trigger before we're done. So we manage our own temp
|
21
|
+
// endpoint and pass the final tokens to the default once we're ready.
|
22
|
+
this.tempAuthEndpoint = new VerdocsEndpoint({
|
23
|
+
baseURL: VerdocsEndpoint.getDefault().getBaseURL(),
|
24
|
+
persist: false,
|
25
|
+
});
|
22
26
|
this.endpoint = VerdocsEndpoint.getDefault();
|
23
27
|
this.visible = true;
|
24
28
|
this.logo = 'https://app.verdocs.com/assets/blue-logo.svg';
|
25
|
-
this.isAuthenticated = false;
|
26
29
|
this.displayMode = 'login';
|
27
30
|
this.org_name = '';
|
28
31
|
this.first_name = '';
|
29
32
|
this.last_name = '';
|
30
|
-
this.
|
33
|
+
this.email = '';
|
34
|
+
this.verificationCode = '';
|
31
35
|
this.password = '';
|
36
|
+
this.confirmpass = '';
|
32
37
|
this.submitting = false;
|
33
|
-
this.activeSession = null;
|
34
|
-
this.accountType = 'org';
|
35
|
-
this.signupStep = 1;
|
36
38
|
this.resendDisabled = false;
|
37
|
-
this.checkingOrg = false;
|
38
39
|
}
|
39
40
|
componentWillLoad() {
|
40
41
|
var _a, _b;
|
41
42
|
this.endpoint.loadSession();
|
42
43
|
if (this.endpoint.session) {
|
43
44
|
console.log('[AUTH] Authenticated');
|
44
|
-
this.isAuthenticated = true;
|
45
|
-
this.activeSession = this.endpoint.session;
|
46
45
|
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: true, session: this.endpoint.session });
|
47
46
|
}
|
48
47
|
else {
|
@@ -50,29 +49,6 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsAuth extends
|
|
50
49
|
(_b = this.authenticated) === null || _b === void 0 ? void 0 : _b.emit({ authenticated: false, session: null });
|
51
50
|
}
|
52
51
|
}
|
53
|
-
disconnectedCallback() {
|
54
|
-
this.cancelRecheckTimer();
|
55
|
-
}
|
56
|
-
cancelRecheckTimer() {
|
57
|
-
if (this.recheckTimer) {
|
58
|
-
try {
|
59
|
-
clearTimeout(this.recheckTimer);
|
60
|
-
}
|
61
|
-
catch (e) {
|
62
|
-
// NOP
|
63
|
-
}
|
64
|
-
this.recheckTimer = null;
|
65
|
-
}
|
66
|
-
if (this.resendDisabledTimer) {
|
67
|
-
try {
|
68
|
-
clearTimeout(this.resendDisabledTimer);
|
69
|
-
}
|
70
|
-
catch (e) {
|
71
|
-
// NOP
|
72
|
-
}
|
73
|
-
this.resendDisabledTimer = null;
|
74
|
-
}
|
75
|
-
}
|
76
52
|
isPasswordComplex(password) {
|
77
53
|
const isUppercase = (ch) => /[A-Z]/.test(ch);
|
78
54
|
const isLowercase = (ch) => /[a-z]/.test(ch);
|
@@ -90,14 +66,18 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsAuth extends
|
|
90
66
|
return password.length >= 8 && countOfLowerCase > 0 && countOfUpperCase > 0 && countOfSpecialChar > 0;
|
91
67
|
}
|
92
68
|
handleSignup() {
|
93
|
-
this.submitting = true;
|
94
|
-
this.accessTokenForVerification = null;
|
95
69
|
if (!this.isPasswordComplex(this.password)) {
|
96
|
-
|
70
|
+
VerdocsToast('Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.', { style: 'error' });
|
97
71
|
return;
|
98
72
|
}
|
99
|
-
|
100
|
-
|
73
|
+
if (this.password !== this.confirmpass) {
|
74
|
+
VerdocsToast('Passwords do not match.', { style: 'error' });
|
75
|
+
return;
|
76
|
+
}
|
77
|
+
this.submitting = true;
|
78
|
+
this.tempAuthEndpoint.clearSession();
|
79
|
+
createProfile(this.tempAuthEndpoint, {
|
80
|
+
email: this.email,
|
101
81
|
password: this.password,
|
102
82
|
first_name: this.first_name,
|
103
83
|
last_name: this.last_name,
|
@@ -105,62 +85,85 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsAuth extends
|
|
105
85
|
})
|
106
86
|
.then(r => {
|
107
87
|
console.log('Profile creation result', r);
|
108
|
-
this.
|
88
|
+
this.tempAuthEndpoint.setToken(r.access_token);
|
89
|
+
this.clearForms();
|
90
|
+
this.displayMode = 'verify';
|
109
91
|
})
|
110
92
|
.catch(e => {
|
111
93
|
var _a, _b, _c, _d, _e, _f;
|
112
94
|
console.log('[AUTH] Signup error', e.response);
|
113
95
|
this.submitting = false;
|
114
|
-
this.activeSession = null;
|
115
96
|
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, session: null });
|
116
97
|
(_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
|
117
98
|
VerdocsToast('Signup failed: ' + ((_f = (_e = e.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.message) || 'Unknown Error', { style: 'error' });
|
118
99
|
});
|
119
100
|
}
|
120
|
-
|
101
|
+
async handleVerification() {
|
121
102
|
this.submitting = true;
|
122
|
-
|
123
|
-
authenticate(this.endpoint, { username: this.username, password: this.password, grant_type: 'password' })
|
124
|
-
.then(r => {
|
125
|
-
var _a;
|
126
|
-
this.cancelRecheckTimer();
|
103
|
+
try {
|
127
104
|
this.submitting = false;
|
128
|
-
const
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
105
|
+
const verificationResult = await verifyEmail(this.tempAuthEndpoint, { email: this.email, token: this.verificationCode });
|
106
|
+
VerdocsToast('Thank you for verifying your email address.', { style: 'success' });
|
107
|
+
this.completeLogin(verificationResult);
|
108
|
+
}
|
109
|
+
catch (e) {
|
110
|
+
this.submitting = false;
|
111
|
+
console.log('Verification error', e);
|
112
|
+
VerdocsToast('Verification error, please check the code and try again.');
|
113
|
+
}
|
114
|
+
}
|
115
|
+
completeLogin(result) {
|
116
|
+
var _a;
|
117
|
+
this.clearForms();
|
118
|
+
this.tempAuthEndpoint.clearSession();
|
119
|
+
this.endpoint.setToken(result.access_token);
|
120
|
+
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: true, session: this.endpoint.session });
|
121
|
+
}
|
122
|
+
async loginAndCheckVerification() {
|
123
|
+
var _a;
|
124
|
+
this.submitting = true;
|
125
|
+
this.tempAuthEndpoint.clearSession();
|
126
|
+
try {
|
127
|
+
this.submitting = false;
|
128
|
+
const authResult = await authenticate(this.tempAuthEndpoint, { username: this.email, password: this.password, grant_type: 'password' });
|
129
|
+
console.log('[AUTH] Authenticated, checking email verification');
|
130
|
+
this.tempAuthEndpoint.setToken(authResult.access_token);
|
131
|
+
const user = await getMyUser(this.tempAuthEndpoint);
|
132
|
+
console.log('Got user', user);
|
133
|
+
if (!user.email_verified) {
|
140
134
|
console.log('[AUTH] Logged in, pending email address verification');
|
141
135
|
this.displayMode = 'verify';
|
142
|
-
this.accessTokenForVerification = r.access_token;
|
143
|
-
this.recheckTimer = setTimeout(this.loginAndCheckVerification, RECHECK_INTERVAL);
|
144
136
|
}
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
137
|
+
else {
|
138
|
+
console.log('[AUTH] Email address is verified, completing login');
|
139
|
+
this.completeLogin(authResult);
|
140
|
+
}
|
141
|
+
}
|
142
|
+
catch (e) {
|
151
143
|
this.submitting = false;
|
152
|
-
|
153
|
-
(
|
154
|
-
|
155
|
-
|
156
|
-
|
144
|
+
console.log('[AUTH] Auth failure', ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) || e);
|
145
|
+
VerdocsToast('Login failed. Please check your credentials and try again.', { style: 'error' });
|
146
|
+
}
|
147
|
+
}
|
148
|
+
clearForms() {
|
149
|
+
this.submitting = false;
|
150
|
+
this.resendDisabled = false;
|
151
|
+
this.email = '';
|
152
|
+
this.password = '';
|
153
|
+
this.confirmpass = '';
|
154
|
+
this.verificationCode = '';
|
155
|
+
this.first_name = '';
|
156
|
+
this.last_name = '';
|
157
|
+
this.org_name = '';
|
157
158
|
}
|
158
159
|
handleLogout() {
|
159
160
|
var _a;
|
161
|
+
console.log('logging out');
|
160
162
|
this.endpoint.clearSession();
|
161
|
-
this.
|
162
|
-
this.accessTokenForVerification = null;
|
163
|
+
this.tempAuthEndpoint.clearSession();
|
163
164
|
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, session: null });
|
165
|
+
this.clearForms();
|
166
|
+
this.displayMode = 'login';
|
164
167
|
}
|
165
168
|
handleResend() {
|
166
169
|
// Avoid the user just click-spamming this pathway. The server rate-limits this anyway so it's not a
|
@@ -170,76 +173,65 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsAuth extends
|
|
170
173
|
this.resendDisabled = false;
|
171
174
|
this.resendDisabledTimer = null;
|
172
175
|
}, 30000);
|
173
|
-
resendVerification(this.
|
176
|
+
resendVerification(this.tempAuthEndpoint)
|
174
177
|
.then(r => {
|
175
178
|
console.log('[AUTH] Verification request resent', r);
|
176
|
-
VerdocsToast('Please check your email for a
|
179
|
+
VerdocsToast('Please check your email for a verification code.', { style: 'info' });
|
177
180
|
})
|
178
181
|
.catch((e) => {
|
179
182
|
console.log('[AUTH] Unable to resend verification', e);
|
183
|
+
VerdocsToast('Unable to resend code. Please try again later.', { style: 'error' });
|
180
184
|
});
|
181
185
|
}
|
182
|
-
handleReset() {
|
186
|
+
async handleReset() {
|
183
187
|
this.submitting = true;
|
184
|
-
|
185
|
-
.
|
186
|
-
console.log('[AUTH] Reset sent',
|
188
|
+
try {
|
189
|
+
const result = await resetPassword(this.endpoint, { email: this.email });
|
190
|
+
console.log('[AUTH] Reset sent', result);
|
187
191
|
this.submitting = false;
|
188
192
|
this.displayMode = 'login';
|
189
193
|
VerdocsToast('If your email address is registered, you will receive instructions on resetting your password shortly.', { style: 'info' });
|
190
|
-
}
|
191
|
-
|
194
|
+
}
|
195
|
+
catch (e) {
|
192
196
|
console.log('[AUTH] Unable to reset password', e);
|
193
197
|
this.submitting = false;
|
194
|
-
|
198
|
+
VerdocsToast('Unable to reset password. Please check your email address and try again.', { style: 'error' });
|
199
|
+
}
|
195
200
|
}
|
196
201
|
render() {
|
197
202
|
if (!this.visible) {
|
198
203
|
return h("div", { style: { display: 'none' } }, "Authenticated");
|
199
204
|
}
|
200
|
-
if (this.
|
205
|
+
if (this.endpoint.session) {
|
201
206
|
return (h("verdocs-button", { label: "Sign Out", disabled: this.submitting, onClick: () => this.handleLogout(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }));
|
202
207
|
}
|
203
208
|
if (this.displayMode === 'signup') {
|
204
|
-
const
|
205
|
-
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Sign up for a free account"), h("h5", null, "Already have an account?", h("verdocs-button", { label: "Log In", variant: "text", onClick: () => (this.displayMode = 'login'), disabled: this.submitting })),
|
206
|
-
this.signupStep = 2;
|
207
|
-
}, style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }), h("verdocs-button", { label: "Go to Dashboard", disabled: true, onClick: () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))))));
|
208
|
-
}
|
209
|
-
if (this.displayMode === 'forgot') {
|
210
|
-
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below, and reset instructions will be sent to your Inbox."), h("p", null, h("em", null, "Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")), h("form", { onSubmit: () => this.handleSignup() }, h("verdocs-text-input", { label: "Email", autocomplete: "email", required: true, value: this.username, onInput: (e) => (this.username = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { label: "Reset", disabled: this.submitting, onClick: () => this.handleReset() })))));
|
209
|
+
const invalid = this.submitting || !this.first_name || !this.last_name || !this.email || !this.password || !this.confirmpass || !this.org_name;
|
210
|
+
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Sign up for a free account"), h("h5", null, "Already have an account?", h("verdocs-button", { label: "Log In", variant: "text", onClick: () => (this.displayMode = 'login'), disabled: this.submitting })), h("form", { onSubmit: () => this.handleSignup() }, h("div", { style: { display: 'flex', flexDirection: 'row', columnGap: '20px' } }, h("verdocs-text-input", { label: "First Name", autocomplete: "first", required: true, value: this.first_name, onInput: (e) => (this.first_name = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Last Name", autocomplete: "last", required: true, value: this.last_name, onInput: (e) => (this.last_name = e.target.value), disabled: this.submitting })), h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", required: true, autocomplete: "new-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Confirm Password", type: "password", required: true, autocomplete: "off", value: this.confirmpass, onInput: (e) => (this.confirmpass = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Organization Name", autocomplete: "org", required: true, value: this.org_name, onInput: (e) => (this.org_name = e.target.value), disabled: this.submitting, style: { flex: '1' } }), h("div", { style: { marginTop: '30px' } }), h("verdocs-button", { label: "Next", disabled: invalid, onClick: invalid ? () => { } : () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))));
|
211
211
|
}
|
212
212
|
if (this.displayMode === 'verify') {
|
213
|
-
return (h("div", { class: "form" }, h("
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
this.displayMode = 'login';
|
218
|
-
} }), h("verdocs-button", { label: "Resend Email", disabled: this.resendDisabled, onClick: () => this.handleResend() }))));
|
213
|
+
return (h("div", { class: "form" }, h("form", { onSubmit: () => this.handleVerification() }, h("p", null, "Please check your e-mail inbox for a verification code and enter it below."), h("verdocs-text-input", { label: "Verification Code", required: true, value: this.verificationCode, onInput: (e) => (this.verificationCode = e.target.value), disabled: this.submitting }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Sign Out", variant: "outline", disabled: this.submitting, onClick: () => this.handleLogout() }), h("verdocs-button", { label: "Verify", disabled: this.submitting || !this.verificationCode || this.verificationCode.length !== 6, onClick: () => this.handleVerification() })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "text", label: "Resend Code", disabled: this.resendDisabled || this.submitting, onClick: () => this.handleResend() })))));
|
214
|
+
}
|
215
|
+
if (this.displayMode === 'forgot') {
|
216
|
+
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."), h("form", { onSubmit: () => this.handleSignup() }, h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { label: "Reset", disabled: this.submitting, onClick: () => this.handleReset() })))));
|
219
217
|
}
|
220
|
-
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Log in to your account"), h("h4", null, "Don't have an account?", h("verdocs-button", { label: "Sign Up", variant: "text", onClick: () => {
|
221
|
-
this.displayMode = 'signup';
|
222
|
-
this.signupStep = 1;
|
223
|
-
}, disabled: this.submitting })), h("form", { onSubmit: () => this.loginAndCheckVerification() }, h("verdocs-text-input", { label: "Email", autocomplete: "username", value: this.username, onInput: (e) => (this.username = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", autocomplete: "current-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.submitting }), h("verdocs-button", { label: "Forgot Your Password?", variant: "text", onClick: () => (this.displayMode = 'forgot'), disabled: this.submitting, style: { display: 'flex', justifyContent: 'center', margin: '10px auto 20px' } }), h("verdocs-button", { label: "Login", disabled: this.submitting, onClick: () => this.loginAndCheckVerification(), style: { display: 'flex', justifyContent: 'center', margin: '10px auto 0' } }))));
|
218
|
+
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Log in to your account"), h("h4", null, "Don't have an account?", h("verdocs-button", { label: "Sign Up", variant: "text", onClick: () => (this.displayMode = 'signup'), disabled: this.submitting })), h("form", { onSubmit: () => this.loginAndCheckVerification() }, h("verdocs-text-input", { label: "Email", autocomplete: "username", value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", autocomplete: "current-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.submitting }), h("verdocs-button", { label: "Forgot Your Password?", variant: "text", onClick: () => (this.displayMode = 'forgot'), disabled: this.submitting, style: { display: 'flex', justifyContent: 'center', margin: '10px auto 20px' } }), h("verdocs-button", { label: "Login", disabled: this.submitting, onClick: () => this.loginAndCheckVerification(), style: { display: 'flex', justifyContent: 'center', margin: '10px auto 0' } }))));
|
224
219
|
}
|
225
220
|
static get style() { return VerdocsAuthStyle0; }
|
226
221
|
}, [0, "verdocs-auth", {
|
227
222
|
"endpoint": [16],
|
228
223
|
"visible": [4],
|
229
224
|
"logo": [1],
|
230
|
-
"isAuthenticated": [32],
|
231
225
|
"displayMode": [32],
|
232
226
|
"org_name": [32],
|
233
227
|
"first_name": [32],
|
234
228
|
"last_name": [32],
|
235
|
-
"
|
229
|
+
"email": [32],
|
230
|
+
"verificationCode": [32],
|
236
231
|
"password": [32],
|
232
|
+
"confirmpass": [32],
|
237
233
|
"submitting": [32],
|
238
|
-
"
|
239
|
-
"accountType": [32],
|
240
|
-
"signupStep": [32],
|
241
|
-
"resendDisabled": [32],
|
242
|
-
"checkingOrg": [32]
|
234
|
+
"resendDisabled": [32]
|
243
235
|
}]);
|
244
236
|
function defineCustomElement$1() {
|
245
237
|
if (typeof customElements === "undefined") {
|
@@ -18,7 +18,7 @@ const VerdocsDialog$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsDialog ext
|
|
18
18
|
}
|
19
19
|
}
|
20
20
|
render() {
|
21
|
-
return (h(Host, { key: '
|
21
|
+
return (h(Host, { key: '952c27946d1eb8552949ac29d9ffaa05222baaba' }, h("div", { key: '4721082da97c31ddb4e29b05922749b42ab38845', class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { key: '80e01d2ee87fd7ffbdd789068587d11ab4323644', class: "dialog" }, h("slot", { key: 'f55b17d75983192918a7c8b5b7df87ca22259b7b', name: "title" }, h("div", { key: '0ebb27bff2de5a06232e419cf9eeff67abddbb3a', class: "heading" }, "Please Confirm")), h("div", { key: 'c93aa214cf8f4c034611f1638dff493a9b2066e2', class: "content" }, h("slot", { key: '7473721bf10ed5dfe388e3d17aec8ee67a5e193f' }))))));
|
22
22
|
}
|
23
23
|
static get style() { return VerdocsDialogStyle0; }
|
24
24
|
}, [4, "verdocs-dialog"]);
|
@@ -76,7 +76,7 @@ const VerdocsEnvelopeDocumentPage = /*@__PURE__*/ proxyCustomElement(class Verdo
|
|
76
76
|
}
|
77
77
|
render() {
|
78
78
|
const height = `${this.renderedHeight}px`;
|
79
|
-
return (h(Host, { key: '
|
79
|
+
return (h(Host, { key: '1626cbea713462254f8d518479181a39156fd599', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-envelope-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : this.pageDisplayUri ? (h("img", { class: "verdocs-envelope-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageDisplayUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, loading: "lazy", onLoad: (e) => {
|
80
80
|
// Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that
|
81
81
|
// useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).
|
82
82
|
// Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values
|