@verdocs/web-sdk 1.12.22 → 1.12.24

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.
Files changed (68) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +5 -4
  3. package/dist/cjs/verdocs-button.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +0 -1
  5. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +4 -2
  7. package/dist/cjs/verdocs-sign.cjs.entry.js +15 -3
  8. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  9. package/dist/collection/components/controls/verdocs-button/verdocs-button.js +1 -1
  10. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.css +4 -1
  11. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +8 -1
  12. package/dist/collection/components/elements/verdocs-envelope-document-page/verdocs-envelope-document-page.js +0 -1
  13. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +6 -0
  14. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +14 -2
  15. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +3 -6
  16. package/dist/collection/components/embeds/verdocs-view/verdocs-view.stories.js +1 -2
  17. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +1 -1
  18. package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +23 -4
  19. package/dist/components/verdocs-button2.js +1 -1
  20. package/dist/components/verdocs-envelope-document-page2.js +0 -1
  21. package/dist/components/verdocs-field-textbox.js +1 -1
  22. package/dist/components/verdocs-ok-dialog2.js +6 -3
  23. package/dist/components/verdocs-sign.js +15 -3
  24. package/dist/components/verdocs-template-field-properties2.js +6 -4
  25. package/dist/custom-elements.json +1466 -0
  26. package/dist/docs.json +18 -1
  27. package/dist/esm/loader.js +1 -1
  28. package/dist/esm/verdocs-button-panel_3.entry.js +5 -4
  29. package/dist/esm/verdocs-button.entry.js +1 -1
  30. package/dist/esm/verdocs-dropdown_2.entry.js +0 -1
  31. package/dist/esm/verdocs-field-textbox.entry.js +1 -1
  32. package/dist/esm/verdocs-ok-dialog.entry.js +4 -2
  33. package/dist/esm/verdocs-sign.entry.js +15 -3
  34. package/dist/esm/verdocs-web-sdk.js +1 -1
  35. package/dist/esm-es5/loader.js +1 -1
  36. package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
  37. package/dist/esm-es5/verdocs-button.entry.js +1 -1
  38. package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
  39. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  40. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  41. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  42. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  43. package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +1 -0
  44. package/dist/types/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.d.ts +4 -0
  45. package/dist/types/components.d.ts +8 -0
  46. package/dist/verdocs-web-sdk/{p-7c05f57f.system.entry.js → p-0f065d24.system.entry.js} +1 -1
  47. package/dist/verdocs-web-sdk/p-12418743.system.entry.js +1 -0
  48. package/dist/verdocs-web-sdk/p-21ad4745.entry.js +1 -0
  49. package/dist/verdocs-web-sdk/p-42d17b0b.entry.js +1 -0
  50. package/dist/verdocs-web-sdk/{p-e7640564.system.entry.js → p-4f7dc10b.system.entry.js} +1 -1
  51. package/dist/verdocs-web-sdk/p-6be9c0c4.system.entry.js +1 -0
  52. package/dist/verdocs-web-sdk/p-6caf1137.system.js +1 -1
  53. package/dist/verdocs-web-sdk/p-895ca90d.system.entry.js +1 -0
  54. package/dist/verdocs-web-sdk/p-9364c0b0.entry.js +1 -0
  55. package/dist/verdocs-web-sdk/p-971a2acc.entry.js +1 -0
  56. package/dist/verdocs-web-sdk/{p-5574e12d.system.entry.js → p-b3768d2e.system.entry.js} +1 -1
  57. package/dist/verdocs-web-sdk/{p-212ecdc5.entry.js → p-c9131f7d.entry.js} +1 -1
  58. package/dist/verdocs-web-sdk/p-d4f2c4cd.entry.js +1 -0
  59. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  60. package/package.json +1 -1
  61. package/dist/verdocs-web-sdk/p-152f38f2.system.entry.js +0 -1
  62. package/dist/verdocs-web-sdk/p-32665c92.entry.js +0 -1
  63. package/dist/verdocs-web-sdk/p-34554447.entry.js +0 -1
  64. package/dist/verdocs-web-sdk/p-47eec326.system.entry.js +0 -1
  65. package/dist/verdocs-web-sdk/p-741f8f3e.system.entry.js +0 -1
  66. package/dist/verdocs-web-sdk/p-9f52d5c3.entry.js +0 -1
  67. package/dist/verdocs-web-sdk/p-de6dec13.entry.js +0 -1
  68. package/dist/verdocs-web-sdk/p-fc194085.entry.js +0 -1
@@ -16,6 +16,7 @@ export class VerdocsTemplateFieldProperties {
16
16
  this.endpoint = VerdocsEndpoint.getDefault();
17
17
  this.templateId = '';
18
18
  this.fieldName = '';
19
+ this.helpText = '';
19
20
  this.dirty = false;
20
21
  this.loading = true;
21
22
  this.type = 'signature';
@@ -27,7 +28,7 @@ export class VerdocsTemplateFieldProperties {
27
28
  this.options = [];
28
29
  this.placeholder = '';
29
30
  this.defaultValue = '';
30
- this.showingHelp = true;
31
+ this.showingHelp = false;
31
32
  }
32
33
  async componentWillLoad() {
33
34
  var _a, _b, _c, _d, _e;
@@ -147,10 +148,10 @@ export class VerdocsTemplateFieldProperties {
147
148
  if (!this.endpoint.session || !TemplateStore.template) {
148
149
  return h(Host, { class: "empty" });
149
150
  }
150
- if (this.showingHelp) {
151
- return (h(Host, null, h("h6", null, capitalize(this.fieldType), " Settings ", h("div", { style: { flex: '1' } }), h("div", { class: "help-icon", innerHTML: HelpIcon, onClick: () => (this.showingHelp = false) })), h("p", { class: "instructions" }, "Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the \"name\" field."), h("p", { class: "instructions" }, "If marked required, the participant must complete the field before proceeding..")));
151
+ if (this.helpText && this.showingHelp) {
152
+ return (h(Host, null, h("h6", null, capitalize(this.fieldType), " Settings ", h("div", { style: { flex: '1' } }), h("div", { class: "help-icon", innerHTML: HelpIcon, onClick: () => (this.showingHelp = false) })), h("p", { class: "instructions", innerHTML: this.helpText })));
152
153
  }
153
- return (h(Host, null, h("h6", null, capitalize(this.fieldType), " Settings ", h("div", { style: { flex: '1' } }), h("div", { class: "help-icon", innerHTML: HelpIcon, onClick: () => (this.showingHelp = true) })), h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { class: "row" }, h("verdocs-text-input", { id: "verdocs-field-name", label: "Field Name", value: this.name, autocomplete: "off",
154
+ return (h(Host, null, h("h6", null, capitalize(this.fieldType), " Settings ", h("div", { style: { flex: '1' } }), this.helpText && h("div", { class: "help-icon", innerHTML: HelpIcon, onClick: () => (this.showingHelp = true) })), h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { class: "row" }, h("verdocs-text-input", { id: "verdocs-field-name", label: "Field Name", value: this.name, autocomplete: "off",
154
155
  // helpText="The internal name of the field. Must be unique, and contain only letters, numbers, and dashes. After an envelope is completed, the value entered by the signer will be tagged with this key."
155
156
  placeholder: "Field Name...", onInput: (e) => {
156
157
  this.name = e.target.value;
@@ -259,6 +260,24 @@ export class VerdocsTemplateFieldProperties {
259
260
  "attribute": "field-name",
260
261
  "reflect": false,
261
262
  "defaultValue": "''"
263
+ },
264
+ "helpText": {
265
+ "type": "string",
266
+ "mutable": false,
267
+ "complexType": {
268
+ "original": "string",
269
+ "resolved": "string",
270
+ "references": {}
271
+ },
272
+ "required": false,
273
+ "optional": true,
274
+ "docs": {
275
+ "tags": [],
276
+ "text": "If specified, the properties card will have a \"back\" side with the help text as its content."
277
+ },
278
+ "attribute": "help-text",
279
+ "reflect": false,
280
+ "defaultValue": "''"
262
281
  }
263
282
  };
264
283
  }
@@ -15,7 +15,7 @@ const VerdocsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
15
15
  this.disabled = false;
16
16
  }
17
17
  render() {
18
- return (h("button", { disabled: this.disabled, type: this.type, class: `${this.variant} ${this.size} ${this.type}`, onMouseUp: () => console.log('mu') }, this.startIcon ? h("span", { class: "icon start", innerHTML: this.startIcon }) : null, h("span", { class: "label" }, this.label), this.endIcon ? h("span", { class: "icon end", innerHTML: this.endIcon }) : null));
18
+ return (h("button", { disabled: this.disabled, type: this.type, class: `${this.variant} ${this.size} ${this.type}` }, this.startIcon ? h("span", { class: "icon start", innerHTML: this.startIcon }) : null, h("span", { class: "label" }, this.label), this.endIcon ? h("span", { class: "icon end", innerHTML: this.endIcon }) : null));
19
19
  }
20
20
  static get style() { return verdocsButtonCss; }
21
21
  }, [0, "verdocs-button", {
@@ -74,7 +74,6 @@ const VerdocsEnvelopeDocumentPage = /*@__PURE__*/ proxyCustomElement(class exten
74
74
  }
75
75
  render() {
76
76
  const height = `${this.renderedHeight}px`;
77
- console.log('envelope page', this.envelopeId, this.documentId, this.pageNumber, this.pageDisplayUri);
78
77
  return (h(Host, { id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-envelope-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : this.pageDisplayUri ? (h("img", { class: "verdocs-envelope-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageDisplayUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, loading: "lazy", onLoad: (e) => {
79
78
  // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that
80
79
  // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).
@@ -90,7 +90,7 @@ const VerdocsFieldTextbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
90
90
  var _a;
91
91
  (_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
92
92
  return this.hideSettingsPanel();
93
- } })))));
93
+ }, helpText: 'Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the "name" field.<br /><br />If marked required, the participant must complete the field before proceeding.' })))));
94
94
  }
95
95
  get el() { return this; }
96
96
  static get style() { return verdocsFieldTextboxCss; }
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { d as defineCustomElement$1 } from './verdocs-button2.js';
3
3
 
4
- const verdocsOkDialogCss = "verdocs-ok-dialog{font-family:\"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-ok-dialog .background-overlay{position:absolute;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:#0000007f}verdocs-ok-dialog .dialog{max-width:50%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;-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-ok-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;-ms-flex-direction:row;flex-direction:row;padding:8px 16px;font-weight:bold;color:#ffffff;background:#46497d}verdocs-ok-dialog .content{font-size:16px;background:#ffffff;padding:20px}verdocs-ok-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}verdocs-ok-dialog .buttons verdocs-button{margin-left:16px}";
4
+ const verdocsOkDialogCss = "verdocs-ok-dialog{font-family:\"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-ok-dialog.closed{display:none}verdocs-ok-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:#0000007f}verdocs-ok-dialog .dialog{max-width:50%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;-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-ok-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;-ms-flex-direction:row;flex-direction:row;padding:8px 16px;font-weight:bold;color:#ffffff;background:#46497d}verdocs-ok-dialog .content{font-size:16px;background:#ffffff;padding:20px}verdocs-ok-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}verdocs-ok-dialog .buttons verdocs-button{margin-left:16px}";
5
5
 
6
6
  const VerdocsOkDialog = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {
@@ -12,6 +12,7 @@ const VerdocsOkDialog = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
12
12
  this.heading = '';
13
13
  this.message = '';
14
14
  this.showCancel = false;
15
+ this.closed = false;
15
16
  }
16
17
  handleOk() {
17
18
  this.next.emit();
@@ -21,19 +22,21 @@ const VerdocsOkDialog = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
21
22
  }
22
23
  // We need a separate event handler for clicking the background because it can receive events "through" other child components
23
24
  handleDismiss(e) {
25
+ this.closed = true;
24
26
  if (e.target.className === 'background-overlay') {
25
27
  e.preventDefault();
26
28
  this.exit.emit();
27
29
  }
28
30
  }
29
31
  render() {
30
- return (h(Host, null, h("div", { class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { class: "dialog" }, h("div", { class: "heading" }, this.heading), h("div", { class: "content" }, h("div", { class: "message", innerHTML: this.message }), h("div", { class: "buttons" }, this.showCancel ? h("verdocs-button", { label: "CANCEL", variant: "outline", onClick: () => this.handleCancel() }) : h("div", { style: { display: 'none' } }), h("verdocs-button", { label: "OK", onClick: () => this.handleOk() })))))));
32
+ return (h(Host, { class: this.closed ? 'closed' : '' }, h("div", { class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { class: "dialog" }, h("div", { class: "heading" }, this.heading), h("div", { class: "content" }, h("div", { class: "message", innerHTML: this.message }), h("div", { class: "buttons" }, this.showCancel ? h("verdocs-button", { label: "CANCEL", variant: "outline", onClick: () => this.handleCancel() }) : h("div", { style: { display: 'none' } }), h("verdocs-button", { label: "OK", onClick: () => this.handleOk() })))))));
31
33
  }
32
34
  static get style() { return verdocsOkDialogCss; }
33
35
  }, [0, "verdocs-ok-dialog", {
34
36
  "heading": [1],
35
37
  "message": [1],
36
- "showCancel": [4, "show-cancel"]
38
+ "showCancel": [4, "show-cancel"],
39
+ "closed": [32]
37
40
  }]);
38
41
  function defineCustomElement() {
39
42
  if (typeof customElements === "undefined") {
@@ -107,7 +107,7 @@ var createInitials = function (endpoint, name, initials) {
107
107
  .then(function (r) { return r.data; });
108
108
  };
109
109
 
110
- const verdocsSignCss = "verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 10px}#verdocs-sign-header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}";
110
+ const verdocsSignCss = "verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 10px}#verdocs-sign-header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}";
111
111
 
112
112
  const inProgressMenuOptions = [
113
113
  { id: 'later', label: 'Finish Later' },
@@ -196,6 +196,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
196
196
  console.log('[SIGN] Could not find our recipient record', this.roleId, this.envelope.recipients);
197
197
  }
198
198
  this.isDone = ['submitted', 'canceled', 'declined'].includes(this.recipient.status);
199
+ this.checkRecipientFields();
199
200
  // TODO: Fix service to allow this?
200
201
  // const sigs = await getSignatures();
201
202
  // console.log('sigs', sigs);
@@ -220,6 +221,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
220
221
  .then(() => {
221
222
  var _a;
222
223
  this.nextButtonLabel = 'Next';
224
+ this.recipient.agreed = true;
223
225
  this.agreed = true; // The server returns a recipient object but it's not "deep" so we track this locally
224
226
  (_a = this.envelopeUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, envelope: this.envelope, event: 'agreed' });
225
227
  })
@@ -267,6 +269,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
267
269
  oldField.settings = updateResult.settings;
268
270
  // TODO: When we break out other fields like value, update them here too
269
271
  updateDocumentFieldValue(oldField);
272
+ this.checkRecipientFields();
270
273
  }
271
274
  });
272
275
  }
@@ -370,10 +373,13 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
370
373
  }
371
374
  async handleNext() {
372
375
  var _a;
376
+ console.log('Next');
373
377
  if (this.nextSubmits) {
378
+ console.log('Next submits');
374
379
  try {
375
380
  const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);
376
381
  console.log('[SIGN] Submitted successfully', result);
382
+ this.recipient.status = 'submitted';
377
383
  this.showDone = true;
378
384
  this.isDone = true;
379
385
  }
@@ -514,7 +520,10 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
514
520
  return (h(Host, null, h("verdocs-loader", null)));
515
521
  }
516
522
  if (this.isDone) {
517
- return (h(Host, { class: { agreed: this.agreed } }, this.isDone ? (h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } })) : (h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } })), this.errorMessage && h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') })));
523
+ return (h(Host, { class: { agreed: this.agreed } }, this.isDone ? (h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } })) : (h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } })), this.errorMessage && h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), this.showDone && (h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`, onNext: () => {
524
+ this.showDone = false;
525
+ this.isDone = true;
526
+ } }))));
518
527
  }
519
528
  return (h(Host, { class: { agreed: this.agreed } }, !this.finishLater && h("div", { class: "intro" }, "Please review and act on these documents."), h("div", { id: "verdocs-sign-header" }, !this.agreed ? (h("div", { class: "agree" }, h("verdocs-checkbox", { name: "agree", label: "I agree to use electronic records and signatures.", onInput: () => this.handleClickAgree() }))) : (h(Fragment, null, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, this.envelope.name), h("div", { style: { flex: '1' } }))), !this.finishLater && h("verdocs-button", { size: "small", label: this.nextButtonLabel, disabled: !this.agreed, onClick: () => this.handleNext() }), h("div", { style: { marginLeft: '10px' } }), h("verdocs-dropdown", { options: !this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions, onOptionSelected: e => this.handleOptionSelected(e) })), !this.agreed ? h("div", { class: "cover" }) : h("div", { style: { display: 'none' } }), h("div", { class: "document", style: { paddingTop: this.headerTargetId ? '70px' : '15px' } }, (this.envelope.documents || []).map(envelopeDocument => {
520
529
  const pages = [...((envelopeDocument === null || envelopeDocument === void 0 ? void 0 : envelopeDocument.pages) || [])];
@@ -533,7 +542,10 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
533
542
  { name: 'controls', type: 'div' },
534
543
  ] }));
535
544
  })));
536
- })), this.showFinishLater && (h("verdocs-ok-dialog", { heading: "You've saved your document to finish later.", message: `To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`, onNext: () => (this.showFinishLater = false) })), this.errorMessage && h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), this.showDone && (h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`, onNext: () => (this.showDone = false) }))));
545
+ })), this.showFinishLater && (h("verdocs-ok-dialog", { heading: "You've saved your document to finish later.", message: `To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`, onNext: () => (this.showFinishLater = false) })), this.errorMessage && h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), this.showDone && (h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`, onNext: () => {
546
+ this.showDone = false;
547
+ this.isDone = true;
548
+ } }))));
537
549
  }
538
550
  static get style() { return verdocsSignCss; }
539
551
  }, [0, "verdocs-sign", {
@@ -28,6 +28,7 @@ const VerdocsTemplateFieldProperties = /*@__PURE__*/ proxyCustomElement(class ex
28
28
  this.endpoint = VerdocsEndpoint.getDefault();
29
29
  this.templateId = '';
30
30
  this.fieldName = '';
31
+ this.helpText = '';
31
32
  this.dirty = false;
32
33
  this.loading = true;
33
34
  this.type = 'signature';
@@ -39,7 +40,7 @@ const VerdocsTemplateFieldProperties = /*@__PURE__*/ proxyCustomElement(class ex
39
40
  this.options = [];
40
41
  this.placeholder = '';
41
42
  this.defaultValue = '';
42
- this.showingHelp = true;
43
+ this.showingHelp = false;
43
44
  }
44
45
  async componentWillLoad() {
45
46
  var _a, _b, _c, _d, _e;
@@ -159,10 +160,10 @@ const VerdocsTemplateFieldProperties = /*@__PURE__*/ proxyCustomElement(class ex
159
160
  if (!this.endpoint.session || !state.template) {
160
161
  return h(Host, { class: "empty" });
161
162
  }
162
- if (this.showingHelp) {
163
- return (h(Host, null, h("h6", null, capitalize(this.fieldType), " Settings ", h("div", { style: { flex: '1' } }), h("div", { class: "help-icon", innerHTML: HelpIcon, onClick: () => (this.showingHelp = false) })), h("p", { class: "instructions" }, "Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the \"name\" field."), h("p", { class: "instructions" }, "If marked required, the participant must complete the field before proceeding..")));
163
+ if (this.helpText && this.showingHelp) {
164
+ return (h(Host, null, h("h6", null, capitalize(this.fieldType), " Settings ", h("div", { style: { flex: '1' } }), h("div", { class: "help-icon", innerHTML: HelpIcon, onClick: () => (this.showingHelp = false) })), h("p", { class: "instructions", innerHTML: this.helpText })));
164
165
  }
165
- return (h(Host, null, h("h6", null, capitalize(this.fieldType), " Settings ", h("div", { style: { flex: '1' } }), h("div", { class: "help-icon", innerHTML: HelpIcon, onClick: () => (this.showingHelp = true) })), h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { class: "row" }, h("verdocs-text-input", { id: "verdocs-field-name", label: "Field Name", value: this.name, autocomplete: "off",
166
+ return (h(Host, null, h("h6", null, capitalize(this.fieldType), " Settings ", h("div", { style: { flex: '1' } }), this.helpText && h("div", { class: "help-icon", innerHTML: HelpIcon, onClick: () => (this.showingHelp = true) })), h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { class: "row" }, h("verdocs-text-input", { id: "verdocs-field-name", label: "Field Name", value: this.name, autocomplete: "off",
166
167
  // helpText="The internal name of the field. Must be unique, and contain only letters, numbers, and dashes. After an envelope is completed, the value entered by the signer will be tagged with this key."
167
168
  placeholder: "Field Name...", onInput: (e) => {
168
169
  this.name = e.target.value;
@@ -208,6 +209,7 @@ const VerdocsTemplateFieldProperties = /*@__PURE__*/ proxyCustomElement(class ex
208
209
  "endpoint": [16],
209
210
  "templateId": [1, "template-id"],
210
211
  "fieldName": [1, "field-name"],
212
+ "helpText": [1, "help-text"],
211
213
  "dirty": [32],
212
214
  "loading": [32],
213
215
  "type": [32],