@verdocs/web-sdk 1.11.3 → 1.11.4
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/{Templates-16615cb0.js → Templates-7a63d848.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +1 -0
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -0
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-floating-menu.cjs.entry.js +106 -0
- package/dist/cjs/verdocs-preview.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-attachments.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-create_2.cjs.entry.js +30 -16
- package/dist/cjs/verdocs-template-document-page.cjs.entry.js +103 -0
- package/dist/cjs/verdocs-template-name.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-recipients.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +51 -0
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/elements/verdocs-template-document-page/verdocs-template-document-page.js +1 -1
- package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.stories.js +2 -1
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +16 -1
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +16 -1
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +15 -0
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +16 -1
- package/dist/collection/components/fields/verdocs-field-payment/verdocs-field-payment.js +15 -0
- package/dist/collection/components/fields/verdocs-field-radio-button-group/verdocs-field-radio-button.js +16 -1
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +16 -1
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +16 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +16 -1
- package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js +16 -1
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.css +16 -2
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +46 -14
- package/dist/collection/utils/Templates.js +1 -1
- package/dist/components/Templates.js +1 -1
- package/dist/components/verdocs-build.js +4 -10
- package/dist/components/verdocs-field-checkbox.js +2 -1
- package/dist/components/verdocs-field-date.js +2 -1
- package/dist/components/verdocs-field-dropdown.js +1 -0
- package/dist/components/verdocs-field-initial.js +2 -1
- package/dist/components/verdocs-field-payment.js +1 -0
- package/dist/components/verdocs-field-radio-button.js +2 -1
- package/dist/components/verdocs-field-signature.js +2 -1
- package/dist/components/verdocs-field-textarea.js +2 -1
- package/dist/components/verdocs-field-textbox.js +2 -1
- package/dist/components/verdocs-field-timestamp.js +2 -1
- package/dist/components/verdocs-floating-menu.js +123 -1
- package/dist/components/verdocs-template-document-page2.js +1 -1
- package/dist/components/verdocs-template-fields2.js +32 -23
- package/dist/docs.json +120 -20
- package/dist/esm/{Templates-2528dad5.js → Templates-e288e682.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-build.entry.js +1 -1
- package/dist/esm/verdocs-button-panel_3.entry.js +1 -1
- package/dist/esm/verdocs-field-checkbox.entry.js +2 -1
- package/dist/esm/verdocs-field-date.entry.js +2 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +1 -0
- package/dist/esm/verdocs-field-initial.entry.js +2 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -0
- package/dist/esm/verdocs-field-radio-button.entry.js +2 -1
- package/dist/esm/verdocs-field-signature.entry.js +2 -1
- package/dist/esm/verdocs-field-textarea.entry.js +2 -1
- package/dist/esm/verdocs-field-textbox.entry.js +2 -1
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -1
- package/dist/{components/verdocs-floating-menu2.js → esm/verdocs-floating-menu.entry.js} +8 -31
- package/dist/esm/verdocs-preview.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +1 -1
- package/dist/esm/verdocs-template-attachments.entry.js +1 -1
- package/dist/esm/verdocs-template-create_2.entry.js +30 -16
- package/dist/esm/verdocs-template-document-page.entry.js +99 -0
- package/dist/esm/verdocs-template-name.entry.js +1 -1
- package/dist/esm/verdocs-template-recipients.entry.js +1 -1
- package/dist/esm/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm/verdocs-template-role-properties_2.entry.js +1 -1
- package/dist/esm/verdocs-template-visibility.entry.js +1 -1
- package/dist/esm/verdocs-toolbar-icon.entry.js +47 -0
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{Templates-2528dad5.js → Templates-e288e682.js} +1 -1
- package/dist/esm-es5/loader.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-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-floating-menu.entry.js +1 -0
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.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 -0
- package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-recipients.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-visibility.entry.js +1 -1
- package/dist/esm-es5/verdocs-toolbar-icon.entry.js +1 -0
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.d.ts +6 -0
- package/dist/types/components/fields/verdocs-field-date/verdocs-field-date.d.ts +6 -0
- package/dist/types/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.d.ts +6 -0
- package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +6 -0
- package/dist/types/components/fields/verdocs-field-payment/verdocs-field-payment.d.ts +6 -0
- package/dist/types/components/fields/verdocs-field-radio-button-group/verdocs-field-radio-button.d.ts +6 -0
- package/dist/types/components/fields/verdocs-field-signature/verdocs-field-signature.d.ts +6 -0
- package/dist/types/components/fields/verdocs-field-textarea/verdocs-field-textarea.d.ts +6 -0
- package/dist/types/components/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +6 -0
- package/dist/types/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.d.ts +6 -0
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +6 -0
- package/dist/types/components.d.ts +48 -0
- package/dist/verdocs-web-sdk/p-07f254ef.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0be7122f.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-a4b4ce45.entry.js → p-0c3d9831.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-11161d87.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-17d70035.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3019014e.system.entry.js → p-1872ef41.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-817e6569.system.entry.js → p-190394ec.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1aa26bbb.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-0aaa85ed.system.entry.js → p-23255004.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-23842282.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-58dda3d1.system.entry.js → p-2699042e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-671036fb.js → p-2ae1b96d.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9b9ecf94.system.entry.js → p-2d9225e9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-3046d912.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-37146bc0.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-442b0dca.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-479d7e1f.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-49a1c436.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-50a2bf7b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-608de9cf.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-61dbd1ed.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-5d6c8737.entry.js → p-623e2beb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-760262f3.system.entry.js → p-66384a4c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-93f0d41c.system.entry.js → p-68c780bd.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-06512901.entry.js → p-71cce0f0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6e3daf5a.system.js → p-7e58e898.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-53261332.entry.js → p-7f0e6545.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8012b6c0.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9ccdb9a9.system.entry.js → p-80345c52.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9b7d218c.system.entry.js → p-8175a794.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-82452c9b.system.entry.js → p-86bd8c38.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8f61a9ee.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ffdcc57f.system.entry.js → p-939190da.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-05f3c7bb.system.entry.js → p-96f838ea.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-72bc8464.system.entry.js → p-98ce58df.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-84b3f146.entry.js → p-99942818.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9f6e7b4a.system.entry.js → p-99c75b7d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3379e220.entry.js → p-9ba92e4f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e29f375d.system.entry.js → p-a0d235a3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ca0a2a00.entry.js → p-a3a9fcba.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bac9ba46.system.entry.js → p-a5237a8c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-686608f0.entry.js → p-aa7f6376.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-37e93857.system.entry.js → p-ab500634.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5a63da92.system.entry.js → p-b6e6f993.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-27396fa8.entry.js → p-d0bac2b8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-87e67bc6.system.entry.js → p-d2af1be8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-dd4589d9.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e79aabb3.entry.js → p-e40012b6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f12e0150.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-fb69732f.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/verdocs-floating-menu_3.cjs.entry.js +0 -248
- package/dist/custom-elements.json +0 -1390
- package/dist/esm/verdocs-floating-menu_3.entry.js +0 -242
- package/dist/esm-es5/verdocs-floating-menu_3.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0049ecc7.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0ef66c28.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2c3aecb8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4a17efd7.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4e9b66b1.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4fc181bd.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-64a6448f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-66bf5e70.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6a736c6a.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-823bf074.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-93e8443f.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-95ed895f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cb4d8942.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e7b7bd2b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f5c1ceb0.entry.js +0 -1
|
@@ -18,6 +18,7 @@ const VerdocsFieldRadioButton = class {
|
|
|
18
18
|
constructor(hostRef) {
|
|
19
19
|
registerInstance(this, hostRef);
|
|
20
20
|
this.settingsChanged = createEvent(this, "settingsChanged", 7);
|
|
21
|
+
this.deleted = createEvent(this, "deleted", 7);
|
|
21
22
|
this.field = null;
|
|
22
23
|
this.option = 0;
|
|
23
24
|
this.disabled = false;
|
|
@@ -52,7 +53,7 @@ const VerdocsFieldRadioButton = class {
|
|
|
52
53
|
}
|
|
53
54
|
return (h(Host, { class: { required, disabled }, style: { backgroundColor } }, h("input", { id: id, type: "radio", value: option.id, tabIndex: settings.order, name: this.field.name, checked: !!option.selected, disabled: disabled, required: settings.required }), h("label", { htmlFor: id }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
54
55
|
var _a;
|
|
55
|
-
(_a = this.
|
|
56
|
+
(_a = this.deleted) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
56
57
|
return this.hideSettingsPanel();
|
|
57
58
|
}, onSettingsChanged: e => {
|
|
58
59
|
var _a;
|
|
@@ -18,6 +18,7 @@ const VerdocsFieldSignature = class {
|
|
|
18
18
|
this.fieldChange = createEvent(this, "fieldChange", 7);
|
|
19
19
|
this.settingsPress = createEvent(this, "settingsPress", 7);
|
|
20
20
|
this.settingsChanged = createEvent(this, "settingsChanged", 7);
|
|
21
|
+
this.deleted = createEvent(this, "deleted", 7);
|
|
21
22
|
this.field = null;
|
|
22
23
|
this.name = '';
|
|
23
24
|
this.disabled = false;
|
|
@@ -75,7 +76,7 @@ const VerdocsFieldSignature = class {
|
|
|
75
76
|
}
|
|
76
77
|
return (h(Host, { class: { required: (_c = this.field) === null || _c === void 0 ? void 0 : _c.required, disabled }, style: { backgroundColor } }, value ? h("img", { src: value, alt: "Signature" }) : h("button", { onClick: () => !disabled && this.handleShow() }, "Signature"), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
77
78
|
var _a;
|
|
78
|
-
(_a = this.
|
|
79
|
+
(_a = this.deleted) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
79
80
|
return this.hideSettingsPanel();
|
|
80
81
|
}, onSettingsChanged: e => {
|
|
81
82
|
var _a;
|
|
@@ -16,6 +16,7 @@ const VerdocsFieldTextarea = class {
|
|
|
16
16
|
constructor(hostRef) {
|
|
17
17
|
registerInstance(this, hostRef);
|
|
18
18
|
this.settingsChanged = createEvent(this, "settingsChanged", 7);
|
|
19
|
+
this.deleted = createEvent(this, "deleted", 7);
|
|
19
20
|
this.field = null;
|
|
20
21
|
this.disabled = false;
|
|
21
22
|
this.editable = false;
|
|
@@ -49,7 +50,7 @@ const VerdocsFieldTextarea = class {
|
|
|
49
50
|
}
|
|
50
51
|
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, h("textarea", { placeholder: settings.placeholder || '', tabIndex: settings.order, value: settings.value, disabled: disabled, required: settings.required, ref: el => (this.el = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
51
52
|
var _a;
|
|
52
|
-
(_a = this.
|
|
53
|
+
(_a = this.deleted) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
53
54
|
return this.hideSettingsPanel();
|
|
54
55
|
}, onSettingsChanged: e => {
|
|
55
56
|
var _a;
|
|
@@ -16,6 +16,7 @@ const VerdocsFieldTextbox = class {
|
|
|
16
16
|
constructor(hostRef) {
|
|
17
17
|
registerInstance(this, hostRef);
|
|
18
18
|
this.settingsChanged = createEvent(this, "settingsChanged", 7);
|
|
19
|
+
this.deleted = createEvent(this, "deleted", 7);
|
|
19
20
|
this.field = null;
|
|
20
21
|
this.disabled = false;
|
|
21
22
|
this.editable = false;
|
|
@@ -50,7 +51,7 @@ const VerdocsFieldTextbox = class {
|
|
|
50
51
|
}
|
|
51
52
|
return (h(Host, { class: { required: (_c = this.field) === null || _c === void 0 ? void 0 : _c.required, disabled, done: this.done }, style: { backgroundColor } }, h("input", { type: "text", placeholder: settings === null || settings === void 0 ? void 0 : settings.placeholder, tabIndex: settings === null || settings === void 0 ? void 0 : settings.order, value: value, disabled: disabled, required: (_d = this.field) === null || _d === void 0 ? void 0 : _d.required, ref: el => (this.el = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
52
53
|
var _a;
|
|
53
|
-
(_a = this.
|
|
54
|
+
(_a = this.deleted) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
54
55
|
return this.hideSettingsPanel();
|
|
55
56
|
}, onSettingsChanged: e => {
|
|
56
57
|
var _a;
|
|
@@ -16,6 +16,7 @@ const VerdocsFieldTimestamp = class {
|
|
|
16
16
|
constructor(hostRef) {
|
|
17
17
|
registerInstance(this, hostRef);
|
|
18
18
|
this.settingsChanged = createEvent(this, "settingsChanged", 7);
|
|
19
|
+
this.deleted = createEvent(this, "deleted", 7);
|
|
19
20
|
this.field = null;
|
|
20
21
|
this.disabled = false;
|
|
21
22
|
this.editable = false;
|
|
@@ -55,7 +56,7 @@ const VerdocsFieldTimestamp = class {
|
|
|
55
56
|
// is encoded in a ton of existing entries in the database and is hard to change.
|
|
56
57
|
value: formatted, disabled: true, ref: el => (this.el = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
57
58
|
var _a;
|
|
58
|
-
(_a = this.
|
|
59
|
+
(_a = this.deleted) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
59
60
|
return this.hideSettingsPanel();
|
|
60
61
|
}, onSettingsChanged: e => {
|
|
61
62
|
var _a;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as defineCustomElement$1 } from './verdocs-toolbar-icon2.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, a as getElement, H as Host } from './index-f78d163d.js';
|
|
3
2
|
|
|
4
3
|
const verdocsFloatingMenuCss = "verdocs-floating-menu{display:none}#verdocs-floating-menu{position:absolute;width:56px;height:56px;display:-ms-flexbox;display:flex;-ms-flex:0 0 fit-content;flex:0 0 fit-content}#verdocs-floating-menu:not(.force-closed):hover{height:500px}#verdocs-floating-menu:not(.force-closed):hover .trigger{-webkit-box-shadow:0 10px 25px #4c56cb;box-shadow:0 10px 25px #4c56cb;-webkit-transform:translatey(2px);transform:translatey(2px);-webkit-transition:all 0.3s;transition:all 0.3s}#verdocs-floating-menu:not(.force-closed):hover .options{display:-ms-flexbox;display:flex}#verdocs-floating-menu:not(.force-closed):hover .options .option{-webkit-animation:vfm-appear 0.1s forwards 0.2s;animation:vfm-appear 0.1s forwards 0.2s}#verdocs-floating-menu .trigger{position:absolute;width:56px;height:56px;background:#654dcb;bottom:0;border-radius:50%;left:0;right:0;margin:auto;color:white;line-height:52px;text-align:center;font-size:44px;z-index:100;-webkit-box-shadow:0 10px 25px -5px #4c56cb;box-shadow:0 10px 25px -5px #4c56cb;cursor:pointer;-webkit-transition:all 0.3s;transition:all 0.3s}#verdocs-floating-menu .options{width:56px;-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 fit-content;flex:0 0 fit-content;position:absolute;bottom:70px;display:none}#verdocs-floating-menu .option{background:#654dcb;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:50%;width:36px;height:36px;margin:5px auto;color:white;font-weight:500;text-align:center;line-height:36px;opacity:0}#verdocs-floating-menu verdocs-toolbar-icon .icon{display:-ms-flexbox;display:flex}#verdocs-floating-menu verdocs-toolbar-icon .icon svg{fill:#ffffff}@-webkit-keyframes vfm-appear{0%{opacity:0}30%{-webkit-transform:scale(0.4);transform:scale(0.4);opacity:0.3}70%{-webkit-transform:scale(1.2);transform:scale(1.2);opacity:0.6}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes vfm-appear{0%{opacity:0}30%{-webkit-transform:scale(0.4);transform:scale(0.4);opacity:0.3}70%{-webkit-transform:scale(1.2);transform:scale(1.2);opacity:0.6}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}";
|
|
5
4
|
|
|
@@ -29,10 +28,9 @@ const getScrollParent = node => {
|
|
|
29
28
|
};
|
|
30
29
|
return scrollParent(node);
|
|
31
30
|
};
|
|
32
|
-
const VerdocsFloatingMenu =
|
|
33
|
-
constructor() {
|
|
34
|
-
|
|
35
|
-
this.__registerHost();
|
|
31
|
+
const VerdocsFloatingMenu = class {
|
|
32
|
+
constructor(hostRef) {
|
|
33
|
+
registerInstance(this, hostRef);
|
|
36
34
|
this.optionSelected = createEvent(this, "optionSelected", 7);
|
|
37
35
|
this.menuContainer = null;
|
|
38
36
|
this.scrollParent = null;
|
|
@@ -97,29 +95,8 @@ const VerdocsFloatingMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
97
95
|
render() {
|
|
98
96
|
return h(Host, null);
|
|
99
97
|
}
|
|
100
|
-
get el() { return this; }
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"options": [16]
|
|
104
|
-
}]);
|
|
105
|
-
function defineCustomElement() {
|
|
106
|
-
if (typeof customElements === "undefined") {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
const components = ["verdocs-floating-menu", "verdocs-toolbar-icon"];
|
|
110
|
-
components.forEach(tagName => { switch (tagName) {
|
|
111
|
-
case "verdocs-floating-menu":
|
|
112
|
-
if (!customElements.get(tagName)) {
|
|
113
|
-
customElements.define(tagName, VerdocsFloatingMenu);
|
|
114
|
-
}
|
|
115
|
-
break;
|
|
116
|
-
case "verdocs-toolbar-icon":
|
|
117
|
-
if (!customElements.get(tagName)) {
|
|
118
|
-
defineCustomElement$1();
|
|
119
|
-
}
|
|
120
|
-
break;
|
|
121
|
-
} });
|
|
122
|
-
}
|
|
123
|
-
defineCustomElement();
|
|
98
|
+
get el() { return getElement(this); }
|
|
99
|
+
};
|
|
100
|
+
VerdocsFloatingMenu.style = verdocsFloatingMenuCss;
|
|
124
101
|
|
|
125
|
-
export { VerdocsFloatingMenu as
|
|
102
|
+
export { VerdocsFloatingMenu as verdocs_floating_menu };
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host } from './index-f
|
|
|
2
2
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
3
3
|
import { r as renderDocumentField, a as getRoleIndex } from './utils-8065a62d.js';
|
|
4
4
|
import { s as state } from './templateStore-a7a5149a.js';
|
|
5
|
-
import { l as loadTemplate } from './Templates-
|
|
5
|
+
import { l as loadTemplate } from './Templates-e288e682.js';
|
|
6
6
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
7
7
|
import './Token-54690789.js';
|
|
8
8
|
import './Envelopes-eb3eef02.js';
|
|
@@ -3,7 +3,7 @@ import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
|
3
3
|
import { i as isValidEmail, a as isValidPhone } from './Validators-f110bae2.js';
|
|
4
4
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
5
5
|
import { s as state } from './templateStore-a7a5149a.js';
|
|
6
|
-
import { l as loadTemplate } from './Templates-
|
|
6
|
+
import { l as loadTemplate } from './Templates-e288e682.js';
|
|
7
7
|
import { a as getRoleIndex } from './utils-8065a62d.js';
|
|
8
8
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
9
9
|
import './Token-54690789.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-f78d163d.js';
|
|
2
2
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
3
3
|
import { s as state } from './templateStore-a7a5149a.js';
|
|
4
|
-
import { l as loadTemplate } from './Templates-
|
|
4
|
+
import { l as loadTemplate } from './Templates-e288e682.js';
|
|
5
5
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
6
6
|
import './Token-54690789.js';
|
|
7
7
|
import './index-fd7b8a34.js';
|
|
@@ -7,7 +7,7 @@ import { i as interact } from './interact.min-e472871a.js';
|
|
|
7
7
|
import { u as updateField, c as createField } from './Fields-c82e6df3.js';
|
|
8
8
|
import { a as getRoleIndex, r as renderDocumentField, e as updateCssTransform, f as defaultWidth, h as defaultHeight } from './utils-8065a62d.js';
|
|
9
9
|
import { s as state } from './templateStore-a7a5149a.js';
|
|
10
|
-
import { l as loadTemplate } from './Templates-
|
|
10
|
+
import { l as loadTemplate } from './Templates-e288e682.js';
|
|
11
11
|
import './Token-54690789.js';
|
|
12
12
|
import './Envelopes-eb3eef02.js';
|
|
13
13
|
import './Files-70a192df.js';
|
|
@@ -92,27 +92,29 @@ const VerdocsTemplateCreate = class {
|
|
|
92
92
|
};
|
|
93
93
|
VerdocsTemplateCreate.style = verdocsTemplateCreateCss;
|
|
94
94
|
|
|
95
|
-
const verdocsTemplateFieldsCss = "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.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath 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-dropdown{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-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
|
|
95
|
+
const verdocsTemplateFieldsCss = "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{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 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-dropdown{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-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath 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\") 0 14, pointer}";
|
|
96
96
|
|
|
97
|
-
const iconSingleline = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';
|
|
98
|
-
const iconMultiline = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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>';
|
|
99
|
-
const iconCheck = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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>';
|
|
100
|
-
const iconRadio = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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>';
|
|
101
|
-
const iconDatepicker = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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>';
|
|
102
|
-
const iconSignature = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';
|
|
103
|
-
const iconInitial = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';
|
|
97
|
+
const iconSingleline = '<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>';
|
|
98
|
+
const iconMultiline = '<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>';
|
|
99
|
+
const iconCheck = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';
|
|
100
|
+
const iconRadio = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';
|
|
101
|
+
const iconDatepicker = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';
|
|
102
|
+
const iconSignature = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';
|
|
103
|
+
const iconInitial = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';
|
|
104
|
+
const iconClock = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path fill="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';
|
|
105
|
+
const iconBarsDown = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 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>';
|
|
104
106
|
const menuOptions = [
|
|
105
107
|
// {id: 'attachment', tooltip: 'Attachment', icon: 'A'},
|
|
106
108
|
{ id: 'checkbox', tooltip: 'Check Box', icon: iconCheck },
|
|
107
109
|
{ id: 'date', tooltip: 'Date', icon: iconDatepicker },
|
|
108
|
-
{ id: 'dropdown', tooltip: 'Dropdown', icon:
|
|
110
|
+
{ id: 'dropdown', tooltip: 'Dropdown', icon: iconBarsDown },
|
|
109
111
|
{ id: 'initial', tooltip: 'Initials', icon: iconInitial },
|
|
110
112
|
// {id: 'payment', tooltip: 'Payment', icon: 'P'},
|
|
111
113
|
{ id: 'radio', tooltip: 'Radio Button', icon: iconRadio },
|
|
112
114
|
{ id: 'signature', tooltip: 'Signature', icon: iconSignature },
|
|
113
115
|
{ id: 'textarea', tooltip: 'Text Area', icon: iconMultiline },
|
|
114
116
|
{ id: 'textbox', tooltip: 'Text Box', icon: iconSingleline },
|
|
115
|
-
{ id: 'timestamp', tooltip: 'Timestamp', icon:
|
|
117
|
+
{ id: 'timestamp', tooltip: 'Timestamp', icon: iconClock },
|
|
116
118
|
];
|
|
117
119
|
const VerdocsTemplateFields = class {
|
|
118
120
|
constructor(hostRef) {
|
|
@@ -125,6 +127,7 @@ const VerdocsTemplateFields = class {
|
|
|
125
127
|
this.cachedPageInfo = {};
|
|
126
128
|
this.endpoint = VerdocsEndpoint.getDefault();
|
|
127
129
|
this.templateId = null;
|
|
130
|
+
this.toolbarTargetId = null;
|
|
128
131
|
this.placing = null;
|
|
129
132
|
this.selectedRoleName = '';
|
|
130
133
|
this.rerender = 1;
|
|
@@ -159,6 +162,13 @@ const VerdocsTemplateFields = class {
|
|
|
159
162
|
}
|
|
160
163
|
componentDidRender() {
|
|
161
164
|
interact.dynamicDrop(true);
|
|
165
|
+
const toolbarTarget = this.toolbarTargetId ? document.getElementById(this.toolbarTargetId) : null;
|
|
166
|
+
const toolbarEl = document.getElementById('verdocs-template-fields-toolbar');
|
|
167
|
+
if (toolbarTarget && toolbarEl) {
|
|
168
|
+
console.log('[FIELDS] Moving toolbar');
|
|
169
|
+
toolbarEl.remove();
|
|
170
|
+
toolbarTarget.append(toolbarEl);
|
|
171
|
+
}
|
|
162
172
|
}
|
|
163
173
|
async handleFieldChange(field, e, optionId) {
|
|
164
174
|
console.log('[FIELDS] handleFieldChange', field, e, optionId);
|
|
@@ -173,6 +183,13 @@ const VerdocsTemplateFields = class {
|
|
|
173
183
|
this.rerender++;
|
|
174
184
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: state.template, event: 'updated-field' });
|
|
175
185
|
});
|
|
186
|
+
el.addEventListener('deleted', () => {
|
|
187
|
+
var _a;
|
|
188
|
+
console.log('deleted', this, field);
|
|
189
|
+
el.remove();
|
|
190
|
+
this.rerender++;
|
|
191
|
+
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: state.template, event: 'updated-field' });
|
|
192
|
+
});
|
|
176
193
|
el.setAttribute('roleindex', roleIndex);
|
|
177
194
|
el.setAttribute('pageNumber', pageInfo.pageNumber);
|
|
178
195
|
el.setAttribute('xScale', pageInfo.xScale);
|
|
@@ -330,15 +347,12 @@ const VerdocsTemplateFields = class {
|
|
|
330
347
|
pages.sort((a, b) => a.sequence - b.sequence);
|
|
331
348
|
return (h(Host, { class: this.placing ? { [`placing-${this.placing}`]: true } : {}, "data-r": this.rerender, onSubmit: () => {
|
|
332
349
|
console.log('onSubmit');
|
|
333
|
-
} }, h("div", { class: "pages" }, pages.map(page => {
|
|
334
|
-
// console.log('rendering page', page);
|
|
350
|
+
} }, h("div", { id: "verdocs-template-fields-toolbar" }, menuOptions.map(option => (h("verdocs-toolbar-icon", { text: option.tooltip, icon: option.icon, onClick: () => (this.placing = option.id) })))), h("div", { class: "pages" }, pages.map(page => {
|
|
335
351
|
return (h("verdocs-template-document-page", { templateId: page.template_id, documentId: page.document_id, pageNumber: page.sequence, virtualWidth: 612, virtualHeight: 792, onClick: (e) => this.handleClickPage(e, page), onPageRendered: e => this.handlePageRendered(e), layers: [
|
|
336
352
|
{ name: 'page', type: 'canvas' },
|
|
337
353
|
{ name: 'controls', type: 'div' },
|
|
338
354
|
] }));
|
|
339
|
-
}))
|
|
340
|
-
this.placing = e.detail.id;
|
|
341
|
-
} })));
|
|
355
|
+
}))));
|
|
342
356
|
}
|
|
343
357
|
};
|
|
344
358
|
VerdocsTemplateFields.style = verdocsTemplateFieldsCss;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-f78d163d.js';
|
|
2
|
+
import { g as getTemplateDocumentPageDisplayUri } from './TemplateDocuments-1214b04d.js';
|
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
4
|
+
import { t as throttle } from './utils-8065a62d.js';
|
|
5
|
+
import './Token-54690789.js';
|
|
6
|
+
import './Envelopes-eb3eef02.js';
|
|
7
|
+
import './Files-70a192df.js';
|
|
8
|
+
import './index-d264c496.js';
|
|
9
|
+
|
|
10
|
+
const verdocsTemplateDocumentPageCss = "verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}";
|
|
11
|
+
|
|
12
|
+
const VerdocsTemplateDocumentPage = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
registerInstance(this, hostRef);
|
|
15
|
+
this.pageRendered = createEvent(this, "pageRendered", 7);
|
|
16
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
|
17
|
+
this.templateId = '';
|
|
18
|
+
this.documentId = '';
|
|
19
|
+
this.pageNumber = 1;
|
|
20
|
+
this.virtualWidth = 612;
|
|
21
|
+
this.virtualHeight = 792;
|
|
22
|
+
this.layers = [{ name: 'page', type: 'canvas' }];
|
|
23
|
+
this.containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;
|
|
24
|
+
this.renderedWidth = this.virtualWidth;
|
|
25
|
+
this.renderedHeight = this.virtualHeight;
|
|
26
|
+
this.naturalWidth = this.virtualWidth;
|
|
27
|
+
this.naturalHeight = this.virtualHeight;
|
|
28
|
+
this.aspectRatio = this.virtualWidth / this.virtualHeight;
|
|
29
|
+
this.skipFirstNotification = true;
|
|
30
|
+
this.pageDisplayUri = '';
|
|
31
|
+
}
|
|
32
|
+
async componentWillLoad() {
|
|
33
|
+
const uri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.templateId, this.documentId, this.pageNumber);
|
|
34
|
+
console.log('pd', uri);
|
|
35
|
+
this.pageDisplayUri = uri;
|
|
36
|
+
}
|
|
37
|
+
componentDidLoad() {
|
|
38
|
+
this.resizeObserver = new ResizeObserver(throttle(entries => {
|
|
39
|
+
for (const entry of entries) {
|
|
40
|
+
const renderedWidth = entry.contentRect.width;
|
|
41
|
+
this.renderedWidth = renderedWidth;
|
|
42
|
+
this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);
|
|
43
|
+
}
|
|
44
|
+
this.notifyRenderedSize();
|
|
45
|
+
}, 100));
|
|
46
|
+
this.resizeObserver.observe(this.container);
|
|
47
|
+
}
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
var _a;
|
|
50
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
51
|
+
}
|
|
52
|
+
// Left here for documentation purposes in case we find an edge case where this isn't true. But we apparently don't need this.
|
|
53
|
+
// When we add the resize observer it will always be triggered at least once so notifying here as well is just a dupe.
|
|
54
|
+
// componentDidRender() {
|
|
55
|
+
// this.notifyRenderedSize();
|
|
56
|
+
// }
|
|
57
|
+
notifyRenderedSize() {
|
|
58
|
+
// We skip one notification because by default we will always get at least two, one when rendering the initial size
|
|
59
|
+
// and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.
|
|
60
|
+
if (this.skipFirstNotification) {
|
|
61
|
+
this.skipFirstNotification = false;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
this.pageRendered.emit({
|
|
65
|
+
// container: this.container,
|
|
66
|
+
containerId: this.containerId,
|
|
67
|
+
pageNumber: this.pageNumber,
|
|
68
|
+
virtualWidth: this.virtualWidth,
|
|
69
|
+
virtualHeight: this.virtualHeight,
|
|
70
|
+
renderedWidth: this.renderedWidth,
|
|
71
|
+
renderedHeight: this.renderedHeight,
|
|
72
|
+
naturalWidth: this.naturalWidth,
|
|
73
|
+
naturalHeight: this.naturalHeight,
|
|
74
|
+
aspectRatio: this.aspectRatio,
|
|
75
|
+
xScale: this.renderedWidth / this.virtualWidth,
|
|
76
|
+
yScale: this.renderedHeight / this.virtualHeight,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
render() {
|
|
80
|
+
const height = `${this.renderedHeight}px`;
|
|
81
|
+
return (h(Host, { id: `${this.containerId}`, style: { height } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : this.pageDisplayUri ? (h("img", { class: "verdocs-template-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageDisplayUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, loading: "lazy", onLoad: (e) => {
|
|
82
|
+
// Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that
|
|
83
|
+
// useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).
|
|
84
|
+
// Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values
|
|
85
|
+
// for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the
|
|
86
|
+
// exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the
|
|
87
|
+
// aspect ratio to adjust the "virtual" height in case the page is not 8.5"x11".
|
|
88
|
+
// TODO: Store this in the DB with each page.
|
|
89
|
+
this.naturalWidth = e.target.naturalWidth;
|
|
90
|
+
this.naturalHeight = e.target.naturalHeight;
|
|
91
|
+
this.aspectRatio = this.naturalWidth / this.naturalHeight;
|
|
92
|
+
this.virtualHeight = this.virtualWidth / this.aspectRatio;
|
|
93
|
+
} })) : (h("div", null)))));
|
|
94
|
+
}
|
|
95
|
+
get container() { return getElement(this); }
|
|
96
|
+
};
|
|
97
|
+
VerdocsTemplateDocumentPage.style = verdocsTemplateDocumentPageCss;
|
|
98
|
+
|
|
99
|
+
export { VerdocsTemplateDocumentPage as verdocs_template_document_page };
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host } from './index-f
|
|
|
2
2
|
import { u as updateTemplate } from './Templates-8e4ab976.js';
|
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
4
4
|
import { s as state } from './templateStore-a7a5149a.js';
|
|
5
|
-
import { l as loadTemplate } from './Templates-
|
|
5
|
+
import { l as loadTemplate } from './Templates-e288e682.js';
|
|
6
6
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
7
7
|
import './Token-54690789.js';
|
|
8
8
|
import './index-fd7b8a34.js';
|
|
@@ -4,7 +4,7 @@ import { u as updateRole, c as createRole } from './Roles-6eb459df.js';
|
|
|
4
4
|
import { V as VerdocsEndpoint, T as TemplateSenderTypes } from './VerdocsEndpoint-d50a8d28.js';
|
|
5
5
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
6
6
|
import { s as state } from './templateStore-a7a5149a.js';
|
|
7
|
-
import { l as loadTemplate } from './Templates-
|
|
7
|
+
import { l as loadTemplate } from './Templates-e288e682.js';
|
|
8
8
|
import { a as getRoleIndex } from './utils-8065a62d.js';
|
|
9
9
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
10
10
|
import './Token-54690789.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-f78d163d.js';
|
|
2
2
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
3
3
|
import { s as state } from './templateStore-a7a5149a.js';
|
|
4
|
-
import { l as loadTemplate } from './Templates-
|
|
4
|
+
import { l as loadTemplate } from './Templates-e288e682.js';
|
|
5
5
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
6
6
|
import './Token-54690789.js';
|
|
7
7
|
import './index-fd7b8a34.js';
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host } from './index-f
|
|
|
2
2
|
import { u as updateRole, d as deleteRole } from './Roles-6eb459df.js';
|
|
3
3
|
import { V as VerdocsEndpoint, T as TemplateSenderTypes } from './VerdocsEndpoint-d50a8d28.js';
|
|
4
4
|
import { s as state } from './templateStore-a7a5149a.js';
|
|
5
|
-
import { l as loadTemplate } from './Templates-
|
|
5
|
+
import { l as loadTemplate } from './Templates-e288e682.js';
|
|
6
6
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
7
7
|
import { u as updateTemplate } from './Templates-8e4ab976.js';
|
|
8
8
|
import './Token-54690789.js';
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host } from './index-f
|
|
|
2
2
|
import { u as updateTemplate } from './Templates-8e4ab976.js';
|
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
4
4
|
import { s as state } from './templateStore-a7a5149a.js';
|
|
5
|
-
import { l as loadTemplate } from './Templates-
|
|
5
|
+
import { l as loadTemplate } from './Templates-e288e682.js';
|
|
6
6
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
7
7
|
import './Token-54690789.js';
|
|
8
8
|
import './index-fd7b8a34.js';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-f78d163d.js';
|
|
2
|
+
import { c as createPopper } from './popper-f860750c.js';
|
|
3
|
+
|
|
4
|
+
const verdocsToolbarIconCss = "verdocs-toolbar-icon{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:\"\";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}";
|
|
5
|
+
|
|
6
|
+
const VerdocsToolbarIcon = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.text = '';
|
|
10
|
+
this.icon = '';
|
|
11
|
+
this.placement = 'bottom';
|
|
12
|
+
this.containerId = `verdocs-toolbar-icon-${Math.random().toString(36).substring(2, 11)}`;
|
|
13
|
+
}
|
|
14
|
+
componentDidLoad() {
|
|
15
|
+
this.popperInstance = createPopper(this.iconEl, this.tooltip, {
|
|
16
|
+
placement: this.placement,
|
|
17
|
+
modifiers: this.placement === 'left' ? [{ name: 'offset', options: { offset: [0, 20] } }] : [],
|
|
18
|
+
});
|
|
19
|
+
// placement: 'top-end',
|
|
20
|
+
// modifiers: [{name: 'offset', options: {offset: [0, 10]}}],
|
|
21
|
+
// });
|
|
22
|
+
}
|
|
23
|
+
disconnectedCallback() {
|
|
24
|
+
if (this.popperInstance) {
|
|
25
|
+
this.popperInstance.destroy();
|
|
26
|
+
this.popperInstance = null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
show() {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.setAttribute('data-show', '');
|
|
32
|
+
(_b = this.popperInstance) === null || _b === void 0 ? void 0 : _b.update().catch(() => { });
|
|
33
|
+
}
|
|
34
|
+
hide() {
|
|
35
|
+
var _a;
|
|
36
|
+
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-show');
|
|
37
|
+
}
|
|
38
|
+
// handlePress() {
|
|
39
|
+
// this.press?.emit();
|
|
40
|
+
// }
|
|
41
|
+
render() {
|
|
42
|
+
return (h(Host, { class: {} }, h("div", { "aria-describedby": this.containerId, class: "icon", innerHTML: this.icon, onMouseEnter: () => this.show(), onFocus: () => this.show(), onMouseLeave: () => this.hide(), onBlur: () => this.hide(), ref: el => (this.iconEl = el) }), h("div", { id: this.containerId, role: "tooltip", class: "tooltip", "data-popper-placement": this.placement, ref: el => (this.tooltip = el) }, this.text, h("div", { "data-popper-arrow": "true", class: "arrow" }))));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
VerdocsToolbarIcon.style = verdocsToolbarIconCss;
|
|
46
|
+
|
|
47
|
+
export { VerdocsToolbarIcon as verdocs_toolbar_icon };
|