@verdocs/web-sdk 4.2.141 → 4.2.143
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/verdocs-kba-dialog_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_9.cjs.entry.js +0 -2
- package/dist/cjs/verdocs-template-role-properties.cjs.entry.js +10 -8
- package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.css +3 -0
- package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +11 -9
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +0 -2
- package/dist/components/verdocs-kba-dialog2.js +1 -1
- package/dist/components/verdocs-template-role-properties2.js +11 -9
- package/dist/components/verdocs-template-roles2.js +0 -2
- package/dist/custom-elements.json +2010 -0
- package/dist/esm/verdocs-kba-dialog_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_9.entry.js +0 -2
- package/dist/esm/verdocs-template-role-properties.entry.js +11 -9
- package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_9.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-role-properties.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-1e8c7927.entry.js → p-03cbc694.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-267df026.system.js +1 -1
- package/dist/verdocs-web-sdk/p-47a6b7b0.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-86ccec71.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a39695ed.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-458eda56.system.entry.js → p-ea10422a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f5a065e0.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/verdocs-web-sdk/p-2eccd1db.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-42d245bb.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-85184829.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d2fc4789.system.entry.js +0 -1
@@ -10,7 +10,7 @@ require('./_commonjsHelpers-e6ff1d6e.js');
|
|
10
10
|
require('./Types-7a726ff3.js');
|
11
11
|
require('./format-dc0f3757.js');
|
12
12
|
|
13
|
-
const verdocsKbaDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:\"Inter\", \"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}";
|
13
|
+
const verdocsKbaDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:\"Inter\", \"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}";
|
14
14
|
const VerdocsKbaDialogStyle0 = verdocsKbaDialogCss;
|
15
15
|
|
16
16
|
const QuestionIcon = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>`;
|
@@ -1300,10 +1300,8 @@ const VerdocsTemplateRoles = class {
|
|
1300
1300
|
console.log('Loading', this.loading, (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state.isLoaded);
|
1301
1301
|
return (index.h(index.Host, { class: "loading" }, index.h("verdocs-loader", null)));
|
1302
1302
|
}
|
1303
|
-
console.log('Rendering roles', this.roleStore.get('roles'));
|
1304
1303
|
const roleNames = this.getRoleNames();
|
1305
1304
|
const sequences = this.getSequenceNumbers();
|
1306
|
-
console.log('Rendering', roleNames, sequences);
|
1307
1305
|
return (index.h(index.Host, null, index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("h5", null, "Roles and Workflow"), index.h("div", { class: "participants" }, index.h("div", { class: "left-line" }), index.h("div", { class: "row" }, index.h("div", { class: "icon", innerHTML: startIcon }), index.h("div", { class: "row-roles" }, index.h("div", { class: "sender" }, index.h("span", { class: "label" }, "Owner:"), " ", senderLabels[(_d = (_c = this.templateStore) === null || _c === void 0 ? void 0 : _c.state) === null || _d === void 0 ? void 0 : _d.sender], ' '))), index.h("div", { class: "row add-sequence", "data-sequence": 0 }, index.h("div", { class: "icon", innerHTML: plusIcon }), index.h("div", { class: "row-roles" }, index.h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), sequences.map(sequence => (index.h(index.Fragment, null, index.h("div", { class: "row" }, index.h("div", { class: "icon", innerHTML: stepIcon }), index.h("div", { class: "row-roles" }, index.h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), this.getRolesAtSequence(sequence).map(role => {
|
1308
1306
|
const unknown = !role.email;
|
1309
1307
|
console.log('ras', sequence, role);
|
@@ -126,34 +126,36 @@ const VerdocsTemplateRoleProperties = class {
|
|
126
126
|
}
|
127
127
|
render() {
|
128
128
|
const hasFields = this.fieldStore.get('fields').some(field => field.role_name === this.roleName);
|
129
|
-
|
129
|
+
// Either all three should be empty, or all three need to be filled
|
130
|
+
const isValid = (!this.email && !this.first_name && !this.last_name) || (jsSdk.isValidEmail(this.email) && !!this.first_name && !!this.last_name);
|
131
|
+
return (index.h(index.Host, { key: '58d9b5313e75866e1fefe0dcdb8139fa8a5bb087' }, index.h("div", { key: '60ce08b776cbd8cedeec9a0ec5748e923c785bc9', class: "background-overlay", onClick: e => this.handleCancel(e) }, index.h("div", { key: '73977c5f9e90c20e6365e0423635a94dbea2b122', class: "dialog" }, index.h("form", { key: '3c4f7826391dfa5874cc541fb82657aefb36710b', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("verdocs-text-input", { key: 'de887a66aec1fe4ebc9a5ef50e32f6355b10aa0d', id: "verdocs-role-name", label: "Role Name", value: this.name, autocomplete: "off", disabled: hasFields, helpText: hasFields
|
130
132
|
? 'This role has fields assigned and can no longer be renamed.'
|
131
133
|
: 'A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.', placeholder: "Role Name...", onInput: (e) => {
|
132
134
|
this.name = e.target.value;
|
133
135
|
this.dirty = true;
|
134
|
-
} }), index.h("div", { key: '
|
136
|
+
} }), index.h("div", { key: 'cd7d4834a3998536c2b8c48e44ed5bf3ec804359', class: "row" }, index.h("div", { key: '12019f45c950a1bdd2e2579d420f6e5aefaab2c5', class: "input-label" }, "Type:"), index.h("verdocs-select-input", { key: 'f4c28c4adc8c9b68303e14d09e87dcb59c36a6d1', value: this.type, options: [
|
135
137
|
{ label: 'Signer', value: 'signer' },
|
136
138
|
{ label: 'CC', value: 'cc' },
|
137
139
|
{ label: 'Approver', value: 'approver' },
|
138
140
|
], onInput: (e) => {
|
139
141
|
this.type = e.target.value;
|
140
142
|
this.dirty = true;
|
141
|
-
} }), index.h("verdocs-help-icon", { key: '
|
143
|
+
} }), index.h("verdocs-help-icon", { key: 'f99179b5c88aeb76e55819a85bc657741c7f35cb', 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." })), index.h("verdocs-text-input", { key: 'cd07d5ba6bf22a58c86e8b0df5e76f32f42f4150', id: "verdocs-recipient-first", label: "First Name", value: this.first_name, autocomplete: "off", helpText: "The recipient's first 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: "First Name...", onInput: (e) => {
|
142
144
|
this.first_name = e.target.value;
|
143
145
|
this.dirty = true;
|
144
|
-
} }), index.h("verdocs-text-input", { key: '
|
146
|
+
} }), index.h("verdocs-text-input", { key: 'ffeeb3f0608dd7a03bce4705e088e0358fe55938', id: "verdocs-recipient-first", label: "Last Name", value: this.last_name, autocomplete: "off", helpText: "The recipient's last 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: "Last Name...", onInput: (e) => {
|
145
147
|
this.last_name = e.target.value;
|
146
148
|
this.dirty = true;
|
147
|
-
} }), index.h("verdocs-text-input", { key: '
|
149
|
+
} }), index.h("verdocs-text-input", { key: '16a366c91abc791b1225896436f1435407948d5f', 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) => {
|
148
150
|
this.email = e.target.value;
|
149
151
|
this.dirty = true;
|
150
|
-
} }), index.h("verdocs-text-input", { key: '
|
152
|
+
} }), index.h("verdocs-text-input", { key: '9b3085606377b915379023087f2a16048fb8d27d', 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) => {
|
151
153
|
this.phone = e.target.value;
|
152
154
|
this.dirty = true;
|
153
|
-
} }), index.h("div", { key: '
|
155
|
+
} }), index.h("div", { key: '3d9f8ee07579f56d0e0041bca7d7ecab19765475', class: "row" }, index.h("div", { key: 'c425db72f627ed05f87618d0feb6d09ad74513ca', class: "input-label" }, "May Delegate:"), index.h("div", { key: '5d4f7ca54f88406e1ff23b05ea516ca47e45a4a6', class: "checkbox-wrapper" }, index.h("verdocs-checkbox", { key: '8ab784e036647e39be5df5793104e81b24c5784f', checked: this.delegator, onInput: (e) => {
|
154
156
|
this.delegator = e.target.checked;
|
155
157
|
this.dirty = true;
|
156
|
-
} })), index.h("verdocs-help-icon", { key: '
|
158
|
+
} })), index.h("verdocs-help-icon", { key: 'e321303aa812683bf0f12cf12e56f19b2faf82ff', text: "If enabled, this recipient may delegate their actions to another individual." })), index.h("div", { key: '3bc17ab02dc1cd93f81d4c68a8ebc9c26fab2361', class: "buttons" }, index.h("button", { key: 'b52e9fd0c1b5e1be279cfdcebbb7bb74a08abcb6', class: "delete-button", disabled: this.dirty, onClick: e => this.handleDelete(e), innerHTML: TrashIcon }), index.h("div", { key: '75554b1ae55b373c7305b84b09980edcc53a7e6a', style: { flex: '1' } }), index.h("verdocs-button", { key: 'b44b20fc4c5b53ad5335b26ee463db76dc25fe6b', size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), index.h("verdocs-button", { key: '536656402d4bc0c9f46aa3bdf6b4923275fa30ba', size: "small", label: "Save", disabled: !this.dirty || !isValid, onClick: e => this.handleSave(e) })))))));
|
157
159
|
}
|
158
160
|
};
|
159
161
|
VerdocsTemplateRoleProperties.style = VerdocsTemplateRolePropertiesStyle0;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
2
|
-
import { deleteTemplateRole, updateTemplateRole, VerdocsEndpoint } from "@verdocs/js-sdk";
|
2
|
+
import { deleteTemplateRole, isValidEmail, updateTemplateRole, VerdocsEndpoint } from "@verdocs/js-sdk";
|
3
3
|
import { deleteStoreRole, getTemplateRoleStore, updateStoreRole } from "../../../utils/TemplateRoleStore";
|
4
4
|
import { getTemplateFieldStore } from "../../../utils/TemplateFieldStore";
|
5
5
|
import { getTemplateStore } from "../../../utils/TemplateStore";
|
@@ -115,34 +115,36 @@ export class VerdocsTemplateRoleProperties {
|
|
115
115
|
}
|
116
116
|
render() {
|
117
117
|
const hasFields = this.fieldStore.get('fields').some(field => field.role_name === this.roleName);
|
118
|
-
|
118
|
+
// Either all three should be empty, or all three need to be filled
|
119
|
+
const isValid = (!this.email && !this.first_name && !this.last_name) || (isValidEmail(this.email) && !!this.first_name && !!this.last_name);
|
120
|
+
return (h(Host, { key: '58d9b5313e75866e1fefe0dcdb8139fa8a5bb087' }, h("div", { key: '60ce08b776cbd8cedeec9a0ec5748e923c785bc9', class: "background-overlay", onClick: e => this.handleCancel(e) }, h("div", { key: '73977c5f9e90c20e6365e0423635a94dbea2b122', class: "dialog" }, h("form", { key: '3c4f7826391dfa5874cc541fb82657aefb36710b', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("verdocs-text-input", { key: 'de887a66aec1fe4ebc9a5ef50e32f6355b10aa0d', id: "verdocs-role-name", label: "Role Name", value: this.name, autocomplete: "off", disabled: hasFields, helpText: hasFields
|
119
121
|
? 'This role has fields assigned and can no longer be renamed.'
|
120
122
|
: 'A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.', placeholder: "Role Name...", onInput: (e) => {
|
121
123
|
this.name = e.target.value;
|
122
124
|
this.dirty = true;
|
123
|
-
} }), h("div", { key: '
|
125
|
+
} }), h("div", { key: 'cd7d4834a3998536c2b8c48e44ed5bf3ec804359', class: "row" }, h("div", { key: '12019f45c950a1bdd2e2579d420f6e5aefaab2c5', class: "input-label" }, "Type:"), h("verdocs-select-input", { key: 'f4c28c4adc8c9b68303e14d09e87dcb59c36a6d1', value: this.type, options: [
|
124
126
|
{ label: 'Signer', value: 'signer' },
|
125
127
|
{ label: 'CC', value: 'cc' },
|
126
128
|
{ label: 'Approver', value: 'approver' },
|
127
129
|
], onInput: (e) => {
|
128
130
|
this.type = e.target.value;
|
129
131
|
this.dirty = true;
|
130
|
-
} }), h("verdocs-help-icon", { key: '
|
132
|
+
} }), h("verdocs-help-icon", { key: 'f99179b5c88aeb76e55819a85bc657741c7f35cb', 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: 'cd07d5ba6bf22a58c86e8b0df5e76f32f42f4150', id: "verdocs-recipient-first", label: "First Name", value: this.first_name, autocomplete: "off", helpText: "The recipient's first 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: "First Name...", onInput: (e) => {
|
131
133
|
this.first_name = e.target.value;
|
132
134
|
this.dirty = true;
|
133
|
-
} }), h("verdocs-text-input", { key: '
|
135
|
+
} }), h("verdocs-text-input", { key: 'ffeeb3f0608dd7a03bce4705e088e0358fe55938', id: "verdocs-recipient-first", label: "Last Name", value: this.last_name, autocomplete: "off", helpText: "The recipient's last 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: "Last Name...", onInput: (e) => {
|
134
136
|
this.last_name = e.target.value;
|
135
137
|
this.dirty = true;
|
136
|
-
} }), h("verdocs-text-input", { key: '
|
138
|
+
} }), h("verdocs-text-input", { key: '16a366c91abc791b1225896436f1435407948d5f', 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
139
|
this.email = e.target.value;
|
138
140
|
this.dirty = true;
|
139
|
-
} }), h("verdocs-text-input", { key: '
|
141
|
+
} }), h("verdocs-text-input", { key: '9b3085606377b915379023087f2a16048fb8d27d', 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
142
|
this.phone = e.target.value;
|
141
143
|
this.dirty = true;
|
142
|
-
} }), h("div", { key: '
|
144
|
+
} }), h("div", { key: '3d9f8ee07579f56d0e0041bca7d7ecab19765475', class: "row" }, h("div", { key: 'c425db72f627ed05f87618d0feb6d09ad74513ca', class: "input-label" }, "May Delegate:"), h("div", { key: '5d4f7ca54f88406e1ff23b05ea516ca47e45a4a6', class: "checkbox-wrapper" }, h("verdocs-checkbox", { key: '8ab784e036647e39be5df5793104e81b24c5784f', checked: this.delegator, onInput: (e) => {
|
143
145
|
this.delegator = e.target.checked;
|
144
146
|
this.dirty = true;
|
145
|
-
} })), h("verdocs-help-icon", { key: '
|
147
|
+
} })), h("verdocs-help-icon", { key: 'e321303aa812683bf0f12cf12e56f19b2faf82ff', text: "If enabled, this recipient may delegate their actions to another individual." })), h("div", { key: '3bc17ab02dc1cd93f81d4c68a8ebc9c26fab2361', class: "buttons" }, h("button", { key: 'b52e9fd0c1b5e1be279cfdcebbb7bb74a08abcb6', class: "delete-button", disabled: this.dirty, onClick: e => this.handleDelete(e), innerHTML: TrashIcon }), h("div", { key: '75554b1ae55b373c7305b84b09980edcc53a7e6a', style: { flex: '1' } }), h("verdocs-button", { key: 'b44b20fc4c5b53ad5335b26ee463db76dc25fe6b', size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '536656402d4bc0c9f46aa3bdf6b4923275fa30ba', size: "small", label: "Save", disabled: !this.dirty || !isValid, onClick: e => this.handleSave(e) })))))));
|
146
148
|
}
|
147
149
|
static get is() { return "verdocs-template-role-properties"; }
|
148
150
|
static get originalStyleUrls() {
|
package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js
CHANGED
@@ -236,10 +236,8 @@ export class VerdocsTemplateRoles {
|
|
236
236
|
console.log('Loading', this.loading, (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state.isLoaded);
|
237
237
|
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
238
238
|
}
|
239
|
-
console.log('Rendering roles', this.roleStore.get('roles'));
|
240
239
|
const roleNames = this.getRoleNames();
|
241
240
|
const sequences = this.getSequenceNumbers();
|
242
|
-
console.log('Rendering', roleNames, sequences);
|
243
241
|
return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("h5", null, "Roles and Workflow"), h("div", { class: "participants" }, h("div", { class: "left-line" }), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: startIcon }), h("div", { class: "row-roles" }, h("div", { class: "sender" }, h("span", { class: "label" }, "Owner:"), " ", senderLabels[(_d = (_c = this.templateStore) === null || _c === void 0 ? void 0 : _c.state) === null || _d === void 0 ? void 0 : _d.sender], ' '))), h("div", { class: "row add-sequence", "data-sequence": 0 }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "row-roles" }, h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), sequences.map(sequence => (h(Fragment, null, h("div", { class: "row" }, h("div", { class: "icon", innerHTML: stepIcon }), h("div", { class: "row-roles" }, h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), this.getRolesAtSequence(sequence).map(role => {
|
244
242
|
const unknown = !role.email;
|
245
243
|
console.log('ras', sequence, role);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
|
2
2
|
import { d as defineCustomElement$1 } from './verdocs-button2.js';
|
3
3
|
|
4
|
-
const verdocsKbaDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:\"Inter\", \"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}";
|
4
|
+
const verdocsKbaDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:\"Inter\", \"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}";
|
5
5
|
const VerdocsKbaDialogStyle0 = verdocsKbaDialogCss;
|
6
6
|
|
7
7
|
const QuestionIcon = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>`;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
-
import { VerdocsEndpoint, updateTemplateRole, deleteTemplateRole } from '@verdocs/js-sdk';
|
2
|
+
import { VerdocsEndpoint, updateTemplateRole, deleteTemplateRole, isValidEmail } from '@verdocs/js-sdk';
|
3
3
|
import { g as getTemplateRoleStore, u as updateStoreRole, d as deleteStoreRole } from './TemplateRoleStore.js';
|
4
4
|
import { g as getTemplateFieldStore } from './TemplateFieldStore.js';
|
5
5
|
import { g as getTemplateStore } from './TemplateStore.js';
|
@@ -126,34 +126,36 @@ const VerdocsTemplateRoleProperties = /*@__PURE__*/ proxyCustomElement(class Ver
|
|
126
126
|
}
|
127
127
|
render() {
|
128
128
|
const hasFields = this.fieldStore.get('fields').some(field => field.role_name === this.roleName);
|
129
|
-
|
129
|
+
// Either all three should be empty, or all three need to be filled
|
130
|
+
const isValid = (!this.email && !this.first_name && !this.last_name) || (isValidEmail(this.email) && !!this.first_name && !!this.last_name);
|
131
|
+
return (h(Host, { key: '58d9b5313e75866e1fefe0dcdb8139fa8a5bb087' }, h("div", { key: '60ce08b776cbd8cedeec9a0ec5748e923c785bc9', class: "background-overlay", onClick: e => this.handleCancel(e) }, h("div", { key: '73977c5f9e90c20e6365e0423635a94dbea2b122', class: "dialog" }, h("form", { key: '3c4f7826391dfa5874cc541fb82657aefb36710b', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("verdocs-text-input", { key: 'de887a66aec1fe4ebc9a5ef50e32f6355b10aa0d', id: "verdocs-role-name", label: "Role Name", value: this.name, autocomplete: "off", disabled: hasFields, helpText: hasFields
|
130
132
|
? 'This role has fields assigned and can no longer be renamed.'
|
131
133
|
: 'A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.', placeholder: "Role Name...", onInput: (e) => {
|
132
134
|
this.name = e.target.value;
|
133
135
|
this.dirty = true;
|
134
|
-
} }), h("div", { key: '
|
136
|
+
} }), h("div", { key: 'cd7d4834a3998536c2b8c48e44ed5bf3ec804359', class: "row" }, h("div", { key: '12019f45c950a1bdd2e2579d420f6e5aefaab2c5', class: "input-label" }, "Type:"), h("verdocs-select-input", { key: 'f4c28c4adc8c9b68303e14d09e87dcb59c36a6d1', value: this.type, options: [
|
135
137
|
{ label: 'Signer', value: 'signer' },
|
136
138
|
{ label: 'CC', value: 'cc' },
|
137
139
|
{ label: 'Approver', value: 'approver' },
|
138
140
|
], onInput: (e) => {
|
139
141
|
this.type = e.target.value;
|
140
142
|
this.dirty = true;
|
141
|
-
} }), h("verdocs-help-icon", { key: '
|
143
|
+
} }), h("verdocs-help-icon", { key: 'f99179b5c88aeb76e55819a85bc657741c7f35cb', 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: 'cd07d5ba6bf22a58c86e8b0df5e76f32f42f4150', id: "verdocs-recipient-first", label: "First Name", value: this.first_name, autocomplete: "off", helpText: "The recipient's first 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: "First Name...", onInput: (e) => {
|
142
144
|
this.first_name = e.target.value;
|
143
145
|
this.dirty = true;
|
144
|
-
} }), h("verdocs-text-input", { key: '
|
146
|
+
} }), h("verdocs-text-input", { key: 'ffeeb3f0608dd7a03bce4705e088e0358fe55938', id: "verdocs-recipient-first", label: "Last Name", value: this.last_name, autocomplete: "off", helpText: "The recipient's last 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: "Last Name...", onInput: (e) => {
|
145
147
|
this.last_name = e.target.value;
|
146
148
|
this.dirty = true;
|
147
|
-
} }), h("verdocs-text-input", { key: '
|
149
|
+
} }), h("verdocs-text-input", { key: '16a366c91abc791b1225896436f1435407948d5f', 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) => {
|
148
150
|
this.email = e.target.value;
|
149
151
|
this.dirty = true;
|
150
|
-
} }), h("verdocs-text-input", { key: '
|
152
|
+
} }), h("verdocs-text-input", { key: '9b3085606377b915379023087f2a16048fb8d27d', 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) => {
|
151
153
|
this.phone = e.target.value;
|
152
154
|
this.dirty = true;
|
153
|
-
} }), h("div", { key: '
|
155
|
+
} }), h("div", { key: '3d9f8ee07579f56d0e0041bca7d7ecab19765475', class: "row" }, h("div", { key: 'c425db72f627ed05f87618d0feb6d09ad74513ca', class: "input-label" }, "May Delegate:"), h("div", { key: '5d4f7ca54f88406e1ff23b05ea516ca47e45a4a6', class: "checkbox-wrapper" }, h("verdocs-checkbox", { key: '8ab784e036647e39be5df5793104e81b24c5784f', checked: this.delegator, onInput: (e) => {
|
154
156
|
this.delegator = e.target.checked;
|
155
157
|
this.dirty = true;
|
156
|
-
} })), h("verdocs-help-icon", { key: '
|
158
|
+
} })), h("verdocs-help-icon", { key: 'e321303aa812683bf0f12cf12e56f19b2faf82ff', text: "If enabled, this recipient may delegate their actions to another individual." })), h("div", { key: '3bc17ab02dc1cd93f81d4c68a8ebc9c26fab2361', class: "buttons" }, h("button", { key: 'b52e9fd0c1b5e1be279cfdcebbb7bb74a08abcb6', class: "delete-button", disabled: this.dirty, onClick: e => this.handleDelete(e), innerHTML: TrashIcon }), h("div", { key: '75554b1ae55b373c7305b84b09980edcc53a7e6a', style: { flex: '1' } }), h("verdocs-button", { key: 'b44b20fc4c5b53ad5335b26ee463db76dc25fe6b', size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '536656402d4bc0c9f46aa3bdf6b4923275fa30ba', size: "small", label: "Save", disabled: !this.dirty || !isValid, onClick: e => this.handleSave(e) })))))));
|
157
159
|
}
|
158
160
|
static get style() { return VerdocsTemplateRolePropertiesStyle0; }
|
159
161
|
}, [0, "verdocs-template-role-properties", {
|
@@ -251,10 +251,8 @@ const VerdocsTemplateRoles = /*@__PURE__*/ proxyCustomElement(class VerdocsTempl
|
|
251
251
|
console.log('Loading', this.loading, (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state.isLoaded);
|
252
252
|
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
253
253
|
}
|
254
|
-
console.log('Rendering roles', this.roleStore.get('roles'));
|
255
254
|
const roleNames = this.getRoleNames();
|
256
255
|
const sequences = this.getSequenceNumbers();
|
257
|
-
console.log('Rendering', roleNames, sequences);
|
258
256
|
return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("h5", null, "Roles and Workflow"), h("div", { class: "participants" }, h("div", { class: "left-line" }), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: startIcon }), h("div", { class: "row-roles" }, h("div", { class: "sender" }, h("span", { class: "label" }, "Owner:"), " ", senderLabels[(_d = (_c = this.templateStore) === null || _c === void 0 ? void 0 : _c.state) === null || _d === void 0 ? void 0 : _d.sender], ' '))), h("div", { class: "row add-sequence", "data-sequence": 0 }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "row-roles" }, h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), sequences.map(sequence => (h(Fragment, null, h("div", { class: "row" }, h("div", { class: "icon", innerHTML: stepIcon }), h("div", { class: "row-roles" }, h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), this.getRolesAtSequence(sequence).map(role => {
|
259
257
|
const unknown = !role.email;
|
260
258
|
console.log('ras', sequence, role);
|