@verdocs/web-sdk 2.2.34 → 2.2.35
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/loader.cjs.js +1 -1
- package/dist/cjs/{verdocs-pagination_3.cjs.entry.js → verdocs-pagination_2.cjs.entry.js} +6 -28
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +7 -11
- package/dist/cjs/verdocs-spinner.cjs.entry.js +28 -0
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +9 -5
- package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.js +5 -9
- package/dist/components/verdocs-build.js +32 -26
- package/dist/components/verdocs-send2.js +12 -6
- package/dist/components/verdocs-template-build-tabs2.js +5 -9
- package/dist/custom-elements.json +2059 -0
- package/dist/docs.json +12 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{verdocs-pagination_3.entry.js → verdocs-pagination_2.entry.js} +5 -26
- package/dist/esm/verdocs-preview_8.entry.js +7 -11
- package/dist/esm/verdocs-spinner.entry.js +24 -0
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{verdocs-pagination_3.entry.js → verdocs-pagination_2.entry.js} +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-spinner.entry.js +1 -0
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +3 -1
- package/dist/types/components.d.ts +1 -1
- package/dist/verdocs-web-sdk/p-0a78188f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-547f5660.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-a6cbd0a4.system.entry.js → p-877d6c80.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8db70951.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b7d1e999.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-316dfb50.entry.js → p-d6495ba8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/verdocs-web-sdk/p-cab21089.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d743a3f9.system.entry.js +0 -1
@@ -7,8 +7,9 @@ import { g as getRGBA } from './Colors.js';
|
|
7
7
|
import { g as getTemplateStore } from './TemplateStore.js';
|
8
8
|
import { b as getRoleIndex } from './utils.js';
|
9
9
|
import { S as SDKError } from './errors.js';
|
10
|
-
import { d as defineCustomElement$
|
11
|
-
import { d as defineCustomElement$
|
10
|
+
import { d as defineCustomElement$4 } from './verdocs-button2.js';
|
11
|
+
import { d as defineCustomElement$3 } from './verdocs-contact-picker2.js';
|
12
|
+
import { d as defineCustomElement$2 } from './verdocs-spinner2.js';
|
12
13
|
import { d as defineCustomElement$1 } from './verdocs-toggle-button2.js';
|
13
14
|
|
14
15
|
const verdocsSendCss = "verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}";
|
@@ -124,7 +125,7 @@ const VerdocsSend = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
124
125
|
console.log('[SEND] Send envelope', r);
|
125
126
|
this.reset().catch((e) => console.log('Unknown Error', e));
|
126
127
|
this.sending = false;
|
127
|
-
(_a = this.send) === null || _a === void 0 ? void 0 : _a.emit(details);
|
128
|
+
(_a = this.send) === null || _a === void 0 ? void 0 : _a.emit({ ...details, envelope_id: r.id, envelope: r });
|
128
129
|
})
|
129
130
|
.catch(e => {
|
130
131
|
console.log('Send error', e);
|
@@ -146,7 +147,7 @@ const VerdocsSend = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
146
147
|
var _a, _b, _c, _d, _e, _f;
|
147
148
|
const unknown = !role.email;
|
148
149
|
return unknown ? (h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(roleNames, role.name)) }, onClick: e => this.handleClickRole(e, role) }, (_b = (_a = this.rolesCompleted[role.id]) === null || _a === void 0 ? void 0 : _a.full_name) !== null && _b !== void 0 ? _b : role.name, h("div", { class: "icon", innerHTML: editIcon }), this.showPickerForId === role.id && (h("verdocs-contact-picker", { onExit: () => (this.showPickerForId = ''), onNext: e => this.handleSelectContact(e, role), contactSuggestions: this.sessionContacts, templateRole: (_c = this.rolesCompleted[role.id]) !== null && _c !== void 0 ? _c : role, onSearchContacts: e => { var _a; return (_a = this.searchContacts) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } })))) : (h("div", { class: "recipient", style: { borderColor: getRGBA(getRoleIndex(roleNames, role.name)) }, onClick: e => this.handleClickRole(e, role) }, (_e = (_d = this.rolesCompleted[role.id]) === null || _d === void 0 ? void 0 : _d.full_name) !== null && _e !== void 0 ? _e : role.full_name, h("div", { class: "icon", innerHTML: editIcon }), this.showPickerForId === role.id && (h("verdocs-contact-picker", { onExit: () => (this.showPickerForId = ''), onNext: e => this.handleSelectContact(e, role), contactSuggestions: this.sessionContacts, templateRole: (_f = this.rolesCompleted[role.id]) !== null && _f !== void 0 ? _f : role, onSearchContacts: e => { var _a; return (_a = this.searchContacts) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } }))));
|
149
|
-
})))), h("div", { class: `level level-done` }, this.getLevelIcon(this.levels.length), h("div", { class: "complete" }, "Signing Complete"))), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", size: "small", variant: "outline", onClick: e => this.handleCancel(e) }), h("verdocs-button", { label: "Send", size: "small", disabled: !allRolesAssigned, onClick: e => this.handleSend(e) }))));
|
150
|
+
})))), h("div", { class: `level level-done` }, this.getLevelIcon(this.levels.length), h("div", { class: "complete" }, "Signing Complete"))), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", size: "small", variant: "outline", onClick: e => this.handleCancel(e), disabled: this.sending }), h("verdocs-button", { label: "Send", size: "small", disabled: !allRolesAssigned || this.sending, onClick: e => this.handleSend(e) }), this.sending && h("verdocs-spinner", null))));
|
150
151
|
}
|
151
152
|
static get style() { return verdocsSendCss; }
|
152
153
|
}, [0, "verdocs-send", {
|
@@ -165,7 +166,7 @@ function defineCustomElement() {
|
|
165
166
|
if (typeof customElements === "undefined") {
|
166
167
|
return;
|
167
168
|
}
|
168
|
-
const components = ["verdocs-send", "verdocs-button", "verdocs-contact-picker", "verdocs-toggle-button"];
|
169
|
+
const components = ["verdocs-send", "verdocs-button", "verdocs-contact-picker", "verdocs-spinner", "verdocs-toggle-button"];
|
169
170
|
components.forEach(tagName => { switch (tagName) {
|
170
171
|
case "verdocs-send":
|
171
172
|
if (!customElements.get(tagName)) {
|
@@ -174,10 +175,15 @@ function defineCustomElement() {
|
|
174
175
|
break;
|
175
176
|
case "verdocs-button":
|
176
177
|
if (!customElements.get(tagName)) {
|
177
|
-
defineCustomElement$
|
178
|
+
defineCustomElement$4();
|
178
179
|
}
|
179
180
|
break;
|
180
181
|
case "verdocs-contact-picker":
|
182
|
+
if (!customElements.get(tagName)) {
|
183
|
+
defineCustomElement$3();
|
184
|
+
}
|
185
|
+
break;
|
186
|
+
case "verdocs-spinner":
|
181
187
|
if (!customElements.get(tagName)) {
|
182
188
|
defineCustomElement$2();
|
183
189
|
}
|
@@ -57,21 +57,18 @@ const VerdocsTemplateBuildTabs = /*@__PURE__*/ proxyCustomElement(class extends
|
|
57
57
|
(_a = this.stepChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail.tab.id);
|
58
58
|
}
|
59
59
|
render() {
|
60
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
60
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
61
61
|
if (!this.endpoint.session) {
|
62
62
|
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
63
63
|
}
|
64
64
|
let canPreview = false;
|
65
65
|
let canEditFields = false;
|
66
66
|
let canEditRoles = false;
|
67
|
-
console.log('[BUILD_TABS] Rendering tabs', this.templateId);
|
68
|
-
console.log('[BUILD_TABS] Tabs store', this.store);
|
69
|
-
console.log('[BUILD_TABS] Tabs state', (_a = this.store) === null || _a === void 0 ? void 0 : _a.state);
|
67
|
+
console.log('[BUILD_TABS] Rendering tabs', this.templateId, this.step);
|
70
68
|
if (this.templateId && this.store && this.store.state) {
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
canPreview = canEditFields && ((_u = (_t = (_s = this.store) === null || _s === void 0 ? void 0 : _s.state) === null || _t === void 0 ? void 0 : _t.fields) === null || _u === void 0 ? void 0 : _u.length) > 0;
|
69
|
+
canEditRoles = ((_c = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.template_documents) === null || _c === void 0 ? void 0 : _c.length) > 0;
|
70
|
+
canEditFields = canEditRoles && ((_f = (_e = (_d = this.store) === null || _d === void 0 ? void 0 : _d.state) === null || _e === void 0 ? void 0 : _e.roles) === null || _f === void 0 ? void 0 : _f.length) > 0;
|
71
|
+
canPreview = canEditFields && ((_j = (_h = (_g = this.store) === null || _g === void 0 ? void 0 : _g.state) === null || _h === void 0 ? void 0 : _h.fields) === null || _j === void 0 ? void 0 : _j.length) > 0;
|
75
72
|
// TODO
|
76
73
|
// canPreview = this.store && userCanPreviewTemplate(this.endpoint.session, this.store?.state);
|
77
74
|
// canEditFields = this.store && userCanBuildTemplate(this.endpoint.session, this.store?.state);
|
@@ -88,7 +85,6 @@ const VerdocsTemplateBuildTabs = /*@__PURE__*/ proxyCustomElement(class extends
|
|
88
85
|
selectedStepIndex = 0;
|
89
86
|
}
|
90
87
|
console.log({ selectedStepIndex, canPreview, canEditFields, canEditRoles });
|
91
|
-
console.log('[BUILD_TABS] Rendering', this.step, selectedStepIndex);
|
92
88
|
return (h(Host, null, h("verdocs-tabs", { onSelectTab: e => this.setStep(e), selectedTab: selectedStepIndex, tabs: [
|
93
89
|
{ id: 'attachments', disabled: false, label: this.templateId && this.store ? 'Attachment(s)' : 'Upload Attachment(s)' },
|
94
90
|
{ id: 'roles', disabled: !canEditRoles, label: 'Roles' },
|