@verdocs/web-sdk 4.2.121 → 4.2.122

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 (122) hide show
  1. package/dist/cjs/index-a27a7f77.js +4 -4
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/verdocs-button_3.cjs.entry.js +2 -2
  4. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +6 -6
  6. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +30 -11
  7. package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-radio-button_3.cjs.entry.js +9 -9
  9. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-sign.cjs.entry.js +35 -16
  11. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +2 -2
  12. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  17. package/dist/collection/components/controls/verdocs-button/verdocs-button.css +14 -0
  18. package/dist/collection/components/controls/verdocs-button/verdocs-button.js +3 -3
  19. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.css +1 -1
  20. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +18 -4
  21. package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +1 -1
  22. package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +1 -1
  23. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +4 -3
  24. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +34 -15
  25. package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -1
  26. package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +6 -6
  27. package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.js +2 -2
  28. package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +18 -25
  29. package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.js +1 -1
  30. package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.js +1 -1
  31. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +8 -8
  32. package/dist/collection/components/templates/verdocs-template-sender/verdocs-template-sender.js +1 -1
  33. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
  34. package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
  35. package/dist/components/verdocs-button2.js +2 -2
  36. package/dist/components/verdocs-envelope-document-page2.js +1 -1
  37. package/dist/components/verdocs-envelopes-list.js +6 -6
  38. package/dist/components/verdocs-field-attachment2.js +28 -15
  39. package/dist/components/verdocs-preview2.js +38 -32
  40. package/dist/components/verdocs-quick-functions.js +1 -1
  41. package/dist/components/verdocs-search-tabs.js +1 -1
  42. package/dist/components/verdocs-sign.js +35 -16
  43. package/dist/components/verdocs-status-indicator2.js +2 -2
  44. package/dist/components/verdocs-template-card.js +1 -1
  45. package/dist/components/verdocs-template-document-page2.js +37 -31
  46. package/dist/components/verdocs-template-role-properties2.js +8 -8
  47. package/dist/components/verdocs-template-sender2.js +1 -1
  48. package/dist/components/verdocs-template-star2.js +1 -1
  49. package/dist/components/verdocs-template-tags.js +1 -1
  50. package/dist/components/verdocs-upload-dialog2.js +25 -6
  51. package/dist/esm/index-a68c7262.js +4 -4
  52. package/dist/esm/loader.js +1 -1
  53. package/dist/esm/verdocs-button_3.entry.js +2 -2
  54. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  55. package/dist/esm/verdocs-envelopes-list.entry.js +6 -6
  56. package/dist/esm/verdocs-field-attachment_13.entry.js +30 -11
  57. package/dist/esm/verdocs-quick-functions.entry.js +1 -1
  58. package/dist/esm/verdocs-radio-button_3.entry.js +9 -9
  59. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  60. package/dist/esm/verdocs-sign.entry.js +35 -16
  61. package/dist/esm/verdocs-status-indicator.entry.js +2 -2
  62. package/dist/esm/verdocs-template-card.entry.js +1 -1
  63. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  64. package/dist/esm/verdocs-template-star.entry.js +1 -1
  65. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  66. package/dist/esm/verdocs-web-sdk.js +1 -1
  67. package/dist/esm-es5/index-a68c7262.js +1 -1
  68. package/dist/esm-es5/loader.js +1 -1
  69. package/dist/esm-es5/verdocs-button_3.entry.js +1 -1
  70. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  71. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  72. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  73. package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
  74. package/dist/esm-es5/verdocs-radio-button_3.entry.js +1 -1
  75. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  76. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  78. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  81. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  83. package/dist/types/components/controls/verdocs-button/verdocs-button.d.ts +1 -1
  84. package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.d.ts +4 -2
  85. package/dist/types/components/fields/verdocs-field-attachment/verdocs-field-attachment.d.ts +5 -8
  86. package/dist/types/components.d.ts +11 -12
  87. package/dist/verdocs-web-sdk/{p-7798b826.system.entry.js → p-0f7e164f.system.entry.js} +1 -1
  88. package/dist/verdocs-web-sdk/{p-d00fb7f3.system.entry.js → p-188e327d.system.entry.js} +1 -1
  89. package/dist/verdocs-web-sdk/p-1ef68dfb.entry.js +1 -0
  90. package/dist/verdocs-web-sdk/p-267df026.system.js +1 -1
  91. package/dist/verdocs-web-sdk/{p-60ae48fb.system.entry.js → p-3128b508.system.entry.js} +1 -1
  92. package/dist/verdocs-web-sdk/{p-34439493.entry.js → p-43b81463.entry.js} +1 -1
  93. package/dist/verdocs-web-sdk/{p-b4b064ad.entry.js → p-48c2f79b.entry.js} +1 -1
  94. package/dist/verdocs-web-sdk/p-4f864f00.system.entry.js +1 -0
  95. package/dist/verdocs-web-sdk/{p-aa599c94.entry.js → p-55f49f87.entry.js} +1 -1
  96. package/dist/verdocs-web-sdk/{p-ae0ec155.entry.js → p-5b7fd148.entry.js} +1 -1
  97. package/dist/verdocs-web-sdk/p-5f27e1c5.system.entry.js +1 -0
  98. package/dist/verdocs-web-sdk/p-7764870c.system.entry.js +1 -0
  99. package/dist/verdocs-web-sdk/{p-24c226e1.system.entry.js → p-779a342d.system.entry.js} +1 -1
  100. package/dist/verdocs-web-sdk/{p-6885774c.entry.js → p-7f8c83da.entry.js} +1 -1
  101. package/dist/verdocs-web-sdk/p-826d6fb0.system.entry.js +1 -0
  102. package/dist/verdocs-web-sdk/{p-cb645d07.entry.js → p-8ce033ef.entry.js} +1 -1
  103. package/dist/verdocs-web-sdk/{p-46f5c0f0.system.entry.js → p-8f3ed4da.system.entry.js} +1 -1
  104. package/dist/verdocs-web-sdk/p-93fc163b.entry.js +1 -0
  105. package/dist/verdocs-web-sdk/{p-6975a763.entry.js → p-98885cd8.entry.js} +1 -1
  106. package/dist/verdocs-web-sdk/p-a3bc322b.entry.js +1 -0
  107. package/dist/verdocs-web-sdk/{p-c539cdb9.entry.js → p-aace040e.entry.js} +1 -1
  108. package/dist/verdocs-web-sdk/{p-2acc0c5c.system.entry.js → p-b52b2533.system.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/{p-e9c5d985.entry.js → p-c0018ff8.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/{p-d078d872.system.entry.js → p-c43f5df7.system.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/{p-34f114de.system.entry.js → p-cc5245b4.system.entry.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-68c7371d.system.entry.js → p-d69410c4.system.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/{p-e2a9ee8d.entry.js → p-ddb7b790.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  115. package/package.json +1 -1
  116. package/dist/verdocs-web-sdk/p-070549e6.system.entry.js +0 -1
  117. package/dist/verdocs-web-sdk/p-3164d8c4.system.entry.js +0 -1
  118. package/dist/verdocs-web-sdk/p-4cdc47be.system.entry.js +0 -1
  119. package/dist/verdocs-web-sdk/p-68eceea2.entry.js +0 -1
  120. package/dist/verdocs-web-sdk/p-a146e2b0.system.entry.js +0 -1
  121. package/dist/verdocs-web-sdk/p-af74d24f.entry.js +0 -1
  122. package/dist/verdocs-web-sdk/p-d93a51b0.entry.js +0 -1
@@ -10,7 +10,7 @@ const VerdocsSearchTabs$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSearch
10
10
  this.selected = 'all';
11
11
  }
12
12
  render() {
13
- return h("div", { key: 'afc8ae06fa51a4aa236c12b7ed057e16112ce8a8' }, "\u00A0");
13
+ return h("div", { key: '476b2a3baba29b498e5d91a9866f8e1f5070b8c3' }, "\u00A0");
14
14
  }
15
15
  static get style() { return VerdocsSearchTabsStyle0; }
16
16
  }, [0, "verdocs-search-tabs", {
@@ -15,7 +15,7 @@ import { d as defineCustomElement$4 } from './verdocs-portal2.js';
15
15
  import { d as defineCustomElement$3 } from './verdocs-spinner2.js';
16
16
  import { d as defineCustomElement$2 } from './verdocs-view2.js';
17
17
 
18
- const verdocsSignCss = "@-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-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>.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 .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-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 .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}#verdocs-sign-header .spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}";
18
+ const verdocsSignCss = "@-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-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>.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 .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-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 .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}";
19
19
  const VerdocsSignStyle0 = verdocsSignCss;
20
20
 
21
21
  const inProgressMenuOptions = [
@@ -63,7 +63,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
63
63
  this.agreed = false;
64
64
  this.documentsSingularPlural = 'document';
65
65
  this.kbaStep = '';
66
- this.showSpinner = true;
66
+ this.showSpinner = false;
67
67
  }
68
68
  componentWillLoad() {
69
69
  if (!this.endpoint) {
@@ -421,12 +421,20 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
421
421
  }
422
422
  }
423
423
  attachFieldAttributes(pageInfo, field, el) {
424
- // console.log('attach', field.name);
424
+ // We can get called multiple times as rendering completes and it's hard to avoid that
425
+ // because it's a ton of work for the callers to know it's been done already. But we
426
+ // don't want to attach multiple event listeners or we get dupe event handling, like
427
+ // calling the server twice on every field update. Since JS has no removeAllEventListeners()
428
+ // option, using removeEventListener() isn't reliable the way Stencil binds local function
429
+ // contexts, and cloneNode messes up the rest of the rendering, we just track it with a flag.
430
+ if (el.getAttribute('attached') === '1') {
431
+ return;
432
+ }
433
+ el.setAttribute('attached', '1');
425
434
  el.addEventListener('input', (e) => {
426
435
  // console.log('[SIGN] onfieldInput', e.detail, e.target.value);
427
436
  // These field types don't emit fieldChange. Should we standardize on that? We don't tap "input" for fields like
428
437
  // text boxes because we'd be updating the field on every keystroke. We do those on blur which fires fieldChange.
429
- console.log('onInput', e.target.type, e.target.name);
430
438
  if (e.target.type === 'radio' || e.target.type === 'checkbox') {
431
439
  // if (e.target.type === 'radio' || e.target.name.includes('date') || e.target.name.includes('checkbox')) {
432
440
  this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());
@@ -440,10 +448,11 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
440
448
  console.log('[SIGN] onAttached', e.detail, e.target.value);
441
449
  this.showSpinner = true;
442
450
  try {
443
- const r = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name, e.detail);
444
- console.log('upload result', r);
445
- // this.updateRecipientFieldValue(fieldName, updateResult)
451
+ const updateResult = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name, e.detail);
452
+ this.updateRecipientFieldValue(field.name, updateResult);
446
453
  this.checkRecipientFields();
454
+ const newEl = renderDocumentField(field, pageInfo, { disabled: false, editable: false, draggable: false, done: this.isDone });
455
+ this.attachFieldAttributes(pageInfo, field, newEl);
447
456
  this.showSpinner = false;
448
457
  }
449
458
  catch (e) {
@@ -452,14 +461,23 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
452
461
  this.showSpinner = false;
453
462
  }
454
463
  });
455
- el.addEventListener('remove', (e) => {
456
- console.log('[SIGN] onRemoved', e.detail, e.target.value);
457
- deleteEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name)
458
- .then(r => {
459
- console.log('[SIGN] Deleted attachment', r);
460
- // this.updateRecipientFieldValue(fieldName, updateResult)
461
- })
462
- .catch(e => console.log('[SIGN] Error deleting attachment', e));
464
+ el.addEventListener('deleted', async (e) => {
465
+ console.log('[SIGN] onDeleted', e.detail, e.target.value);
466
+ this.showSpinner = true;
467
+ try {
468
+ const updateResult = await deleteEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name);
469
+ console.log('[SIGN] Deleted attachment', updateResult);
470
+ this.updateRecipientFieldValue(field.name, updateResult);
471
+ this.checkRecipientFields();
472
+ const newEl = renderDocumentField(field, pageInfo, { disabled: false, editable: false, draggable: false, done: this.isDone });
473
+ this.attachFieldAttributes(pageInfo, field, newEl);
474
+ this.showSpinner = false;
475
+ }
476
+ catch (e) {
477
+ console.log('Error uploading attachment', e);
478
+ VerdocsToast('Unable to upload attachment, please try again later', { style: 'error' });
479
+ this.showSpinner = false;
480
+ }
463
481
  });
464
482
  el.addEventListener('focusout', e => {
465
483
  // These field types trigger focusout as they're used, even without a value change
@@ -489,6 +507,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
489
507
  if (field.page !== pageInfo.pageNumber) {
490
508
  return;
491
509
  }
510
+ // TODO: Review possible workflow/race conditions vs rendering in -document-page.
492
511
  const el = renderDocumentField(field, pageInfo, { disabled: false, editable: false, draggable: false, done: this.isDone }, tabIndex);
493
512
  if (!el) {
494
513
  return;
@@ -555,7 +574,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
555
574
  });
556
575
  } })))));
557
576
  }
558
- return (h(Host, null, h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, 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) }))), h("div", { class: "document", style: { paddingTop: '15px' } }, (this.envelope.documents || []).map(envelopeDocument => {
577
+ return (h(Host, null, h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, 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: "xsmall", 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) }))), h("div", { class: "document", style: { paddingTop: '15px' } }, (this.envelope.documents || []).map(envelopeDocument => {
559
578
  const pageNumbers = integerSequence(1, envelopeDocument.pages);
560
579
  return (h(Fragment, null, pageNumbers.map(pageNumber => {
561
580
  // In signing mode we show the original template page with all the recipient fields so we can show source formatting and
@@ -7190,11 +7190,11 @@ const VerdocsStatusIndicator = /*@__PURE__*/ proxyCustomElement(class VerdocsSta
7190
7190
  }
7191
7191
  const icon = this.getStatusIcon(status);
7192
7192
  const statusMessage = this.getStatusMessage(status);
7193
- return (h(Host, { key: 'a579d2ed18289b75beaaaf5fef322db25d0a4e93', ref: el => (this.summaryComponent = el), class: `${this.theme} ${this.size} ${this.envelope ? 'has-document' : ''}`, "aria-label": "Click to View Details", onClick: e => {
7193
+ return (h(Host, { key: '3111e544a8f287a2b5a501cae08fc88752186477', ref: el => (this.summaryComponent = el), class: `${this.theme} ${this.size} ${this.envelope ? 'has-document' : ''}`, "aria-label": "Click to View Details", onClick: e => {
7194
7194
  e.stopPropagation();
7195
7195
  e.preventDefault();
7196
7196
  this.envelope && this.toggleDropdown();
7197
- }, onBlur: e => this.envelope && this.handleHideDropdown(e) }, h("span", { key: 'c59f8b21dce6f4fe2cd7bdc1124c6af339e70de7', class: "icon", innerHTML: icon }), h("span", { key: '1c96b95b111836c791a14e22c28defc43db1cc48', class: "content" }, statusMessage), h("div", { key: 'd673852a5e1a03656cb15d39d7f469a6e43f45a9', class: "detail-panel", ref: el => (this.detailPanel = el) }, h("div", { key: '0d1597689117ca7419f556fc38ff55711644f55f', id: `${this.containerId}` }), this.recipientStatusIcons.map(icon => (h("span", { innerHTML: icon.icon, style: { position: 'absolute', top: `${icon.y}px`, left: `${icon.x}px` } }))))));
7197
+ }, onBlur: e => this.envelope && this.handleHideDropdown(e) }, h("span", { key: '2dd4397db22358d7dd8e495f601c3f31687e400e', class: "icon", innerHTML: icon }), h("span", { key: 'fb37993d036b1a1552f19fc2bc57565bf3026a44', class: "content" }, statusMessage), h("div", { key: '5bc4ea53d9eec94c0dfd34662437bf90aaf76d60', class: "detail-panel", ref: el => (this.detailPanel = el) }, h("div", { key: 'e073e793dc4f0bef2d9826fb5b70f62f2495fa45', id: `${this.containerId}` }), this.recipientStatusIcons.map(icon => (h("span", { innerHTML: icon.icon, style: { position: 'absolute', top: `${icon.y}px`, left: `${icon.x}px` } }))))));
7198
7198
  }
7199
7199
  static get style() { return VerdocsStatusIndicatorStyle0; }
7200
7200
  }, [0, "verdocs-status-indicator", {
@@ -15,7 +15,7 @@ const VerdocsTemplateCard$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsTemp
15
15
  }
16
16
  render() {
17
17
  var _a, _b, _c, _d;
18
- return (h(Host, { key: '3e5011cab3a4e78b92e9c2565f40d304ad334ed6' }, h("span", { key: '65ae319e5f2c07d6ad30dc7e1ef797d7d1f45e34', class: "name" }, this.template.name), h("span", { key: '81078cc46080d7417f3a2aa2a87f62787867ab7d', class: "org-name" }, ((_a = this.template.organization) === null || _a === void 0 ? void 0 : _a.name) || 'Public'), h("hr", { key: 'e35365811650f21862ebc87e89015c1c044f65cc' }), h("div", { key: '9d7e0b7a9e09be59890df0b8655f1ad74b8aadc9', class: "controls" }, h("div", { key: '24e402c45e499969b3f039010a730b7e22e5eb82', class: "control" }, h("span", { key: '06891917e493b9902f141acf3c906d9f2dfb98fc', class: "icon", innerHTML: StarIcon }), h("span", { key: '6599c695f7f5e1798254a16e1e209afe1768cd9d', class: "value" }, this.template.star_counter)), h("div", { key: '868b45b247a1e613caa0ca20270435ecfc52032d', class: "control secondary" }, h("span", { key: 'c0c308c9762ed5ada2456d69697dc5b0295f257c', class: "icon", innerHTML: PagesIcon }), h("span", { key: 'f851ea648cd5115798937af1d9d12671410e3f5b', class: "value" }, ((_d = (_c = (_b = this.template) === null || _b === void 0 ? void 0 : _b.documents) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.pages) || 1)), h("div", { key: '3c24408d7b9cd968d721cd5360a87f7d66d0f02a', class: "control secondary" }, h("span", { key: '12a94b8fc7850db8ab535161abd7003ddb8f5eca', class: "icon", innerHTML: EmailIcon }), h("span", { key: '544d6b2ba82c971ba46649fa45d044293a89ca07', class: "value" }, this.template.counter)), h("span", { key: '62c64a478015d8edd079272405a366fc117dafea', class: "additional-controls", innerHTML: ActionsIcon }))));
18
+ return (h(Host, { key: '34dbb55f6c6b8afe8e2a27142d1edd560aa8123e' }, h("span", { key: '83a70355f7d740968113d4b7c70223b8b1728199', class: "name" }, this.template.name), h("span", { key: 'daba1bec48afa7914db6812c092ecc9006f0c0fa', class: "org-name" }, ((_a = this.template.organization) === null || _a === void 0 ? void 0 : _a.name) || 'Public'), h("hr", { key: 'f33a1caa30b0e73e490c353aeda95f03ccc8cdc9' }), h("div", { key: '132457e5862298418311e5630cf91ee4c388eb53', class: "controls" }, h("div", { key: '4d6a907defae65e3e71468227ff01bf378349325', class: "control" }, h("span", { key: '859bf9965d4d4d666b191410269c8e4733abdc3b', class: "icon", innerHTML: StarIcon }), h("span", { key: 'bb2aa5c6f908aad15c3ffaec48786bf32e4afafe', class: "value" }, this.template.star_counter)), h("div", { key: 'f908946f9052972407ec26065774aeffe86fd370', class: "control secondary" }, h("span", { key: '8703c428b3154521c3156b32a95267fcda3a73ab', class: "icon", innerHTML: PagesIcon }), h("span", { key: '811320f402296ac578418a0ae4a6b0403455fadc', class: "value" }, ((_d = (_c = (_b = this.template) === null || _b === void 0 ? void 0 : _b.documents) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.pages) || 1)), h("div", { key: '3fdbd916fd49d41b9c8254d78bce60eff644d008', class: "control secondary" }, h("span", { key: '5ca32fdaa0f2fb7ea7a093169d2abc4a531462e3', class: "icon", innerHTML: EmailIcon }), h("span", { key: '0e37528844b8097102ecd8c5a48fa59efe8a6705', class: "value" }, this.template.counter)), h("span", { key: '8877d1faf766e75f1198a5842cf97ec6be28fb6b', class: "additional-controls", innerHTML: ActionsIcon }))));
19
19
  }
20
20
  static get style() { return VerdocsTemplateCardStyle0; }
21
21
  }, [0, "verdocs-template-card", {
@@ -2,21 +2,22 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from
2
2
  import { VerdocsEndpoint, getTemplateDocumentPageDisplayUri } from '@verdocs/js-sdk';
3
3
  import { g as getTemplateFieldStore } from './TemplateFieldStore.js';
4
4
  import { t as throttle, d as getControlStyles, g as getFieldId } from './utils.js';
5
- import { d as defineCustomElement$l } from './verdocs-button2.js';
6
- import { d as defineCustomElement$k } from './verdocs-checkbox2.js';
7
- import { d as defineCustomElement$j } from './verdocs-component-error2.js';
8
- import { d as defineCustomElement$i } from './verdocs-field-attachment2.js';
9
- import { d as defineCustomElement$h } from './verdocs-field-checkbox2.js';
10
- import { d as defineCustomElement$g } from './verdocs-field-date2.js';
11
- import { d as defineCustomElement$f } from './verdocs-field-dropdown2.js';
12
- import { d as defineCustomElement$e } from './verdocs-field-initial2.js';
13
- import { d as defineCustomElement$d } from './verdocs-field-radio2.js';
14
- import { d as defineCustomElement$c } from './verdocs-field-signature2.js';
15
- import { d as defineCustomElement$b } from './verdocs-field-textarea2.js';
16
- import { d as defineCustomElement$a } from './verdocs-field-textbox2.js';
17
- import { d as defineCustomElement$9 } from './verdocs-field-timestamp2.js';
18
- import { d as defineCustomElement$8 } from './verdocs-help-icon2.js';
19
- import { d as defineCustomElement$7 } from './verdocs-initial-dialog2.js';
5
+ import { d as defineCustomElement$m } from './verdocs-button2.js';
6
+ import { d as defineCustomElement$l } from './verdocs-checkbox2.js';
7
+ import { d as defineCustomElement$k } from './verdocs-component-error2.js';
8
+ import { d as defineCustomElement$j } from './verdocs-field-attachment2.js';
9
+ import { d as defineCustomElement$i } from './verdocs-field-checkbox2.js';
10
+ import { d as defineCustomElement$h } from './verdocs-field-date2.js';
11
+ import { d as defineCustomElement$g } from './verdocs-field-dropdown2.js';
12
+ import { d as defineCustomElement$f } from './verdocs-field-initial2.js';
13
+ import { d as defineCustomElement$e } from './verdocs-field-radio2.js';
14
+ import { d as defineCustomElement$d } from './verdocs-field-signature2.js';
15
+ import { d as defineCustomElement$c } from './verdocs-field-textarea2.js';
16
+ import { d as defineCustomElement$b } from './verdocs-field-textbox2.js';
17
+ import { d as defineCustomElement$a } from './verdocs-field-timestamp2.js';
18
+ import { d as defineCustomElement$9 } from './verdocs-help-icon2.js';
19
+ import { d as defineCustomElement$8 } from './verdocs-initial-dialog2.js';
20
+ import { d as defineCustomElement$7 } from './verdocs-ok-dialog2.js';
20
21
  import { d as defineCustomElement$6 } from './verdocs-portal2.js';
21
22
  import { d as defineCustomElement$5 } from './verdocs-select-input2.js';
22
23
  import { d as defineCustomElement$4 } from './verdocs-signature-dialog2.js';
@@ -115,7 +116,7 @@ const VerdocsTemplateDocumentPage = /*@__PURE__*/ proxyCustomElement(class Verdo
115
116
  }
116
117
  render() {
117
118
  const height = `${this.renderedHeight}px`;
118
- return (h(Host, { key: '4c35b1d1d350e3c16813170b0421d888aaf76a4d', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } }, layer.name === 'controls' &&
119
+ return (h(Host, { key: '2c5cc60056b48fbcb7de1e1abffdbb3753b38e10', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } }, layer.name === 'controls' &&
119
120
  this.fieldStore
120
121
  .get('fields')
121
122
  .filter(field => field && field.page === this.pageNumber)
@@ -195,7 +196,7 @@ function defineCustomElement() {
195
196
  if (typeof customElements === "undefined") {
196
197
  return;
197
198
  }
198
- const components = ["verdocs-template-document-page", "verdocs-button", "verdocs-checkbox", "verdocs-component-error", "verdocs-field-attachment", "verdocs-field-checkbox", "verdocs-field-date", "verdocs-field-dropdown", "verdocs-field-initial", "verdocs-field-radio", "verdocs-field-signature", "verdocs-field-textarea", "verdocs-field-textbox", "verdocs-field-timestamp", "verdocs-help-icon", "verdocs-initial-dialog", "verdocs-portal", "verdocs-select-input", "verdocs-signature-dialog", "verdocs-template-field-properties", "verdocs-text-input", "verdocs-upload-dialog"];
199
+ const components = ["verdocs-template-document-page", "verdocs-button", "verdocs-checkbox", "verdocs-component-error", "verdocs-field-attachment", "verdocs-field-checkbox", "verdocs-field-date", "verdocs-field-dropdown", "verdocs-field-initial", "verdocs-field-radio", "verdocs-field-signature", "verdocs-field-textarea", "verdocs-field-textbox", "verdocs-field-timestamp", "verdocs-help-icon", "verdocs-initial-dialog", "verdocs-ok-dialog", "verdocs-portal", "verdocs-select-input", "verdocs-signature-dialog", "verdocs-template-field-properties", "verdocs-text-input", "verdocs-upload-dialog"];
199
200
  components.forEach(tagName => { switch (tagName) {
200
201
  case "verdocs-template-document-page":
201
202
  if (!customElements.get(tagName)) {
@@ -204,75 +205,80 @@ function defineCustomElement() {
204
205
  break;
205
206
  case "verdocs-button":
206
207
  if (!customElements.get(tagName)) {
207
- defineCustomElement$l();
208
+ defineCustomElement$m();
208
209
  }
209
210
  break;
210
211
  case "verdocs-checkbox":
211
212
  if (!customElements.get(tagName)) {
212
- defineCustomElement$k();
213
+ defineCustomElement$l();
213
214
  }
214
215
  break;
215
216
  case "verdocs-component-error":
216
217
  if (!customElements.get(tagName)) {
217
- defineCustomElement$j();
218
+ defineCustomElement$k();
218
219
  }
219
220
  break;
220
221
  case "verdocs-field-attachment":
221
222
  if (!customElements.get(tagName)) {
222
- defineCustomElement$i();
223
+ defineCustomElement$j();
223
224
  }
224
225
  break;
225
226
  case "verdocs-field-checkbox":
226
227
  if (!customElements.get(tagName)) {
227
- defineCustomElement$h();
228
+ defineCustomElement$i();
228
229
  }
229
230
  break;
230
231
  case "verdocs-field-date":
231
232
  if (!customElements.get(tagName)) {
232
- defineCustomElement$g();
233
+ defineCustomElement$h();
233
234
  }
234
235
  break;
235
236
  case "verdocs-field-dropdown":
236
237
  if (!customElements.get(tagName)) {
237
- defineCustomElement$f();
238
+ defineCustomElement$g();
238
239
  }
239
240
  break;
240
241
  case "verdocs-field-initial":
241
242
  if (!customElements.get(tagName)) {
242
- defineCustomElement$e();
243
+ defineCustomElement$f();
243
244
  }
244
245
  break;
245
246
  case "verdocs-field-radio":
246
247
  if (!customElements.get(tagName)) {
247
- defineCustomElement$d();
248
+ defineCustomElement$e();
248
249
  }
249
250
  break;
250
251
  case "verdocs-field-signature":
251
252
  if (!customElements.get(tagName)) {
252
- defineCustomElement$c();
253
+ defineCustomElement$d();
253
254
  }
254
255
  break;
255
256
  case "verdocs-field-textarea":
256
257
  if (!customElements.get(tagName)) {
257
- defineCustomElement$b();
258
+ defineCustomElement$c();
258
259
  }
259
260
  break;
260
261
  case "verdocs-field-textbox":
261
262
  if (!customElements.get(tagName)) {
262
- defineCustomElement$a();
263
+ defineCustomElement$b();
263
264
  }
264
265
  break;
265
266
  case "verdocs-field-timestamp":
266
267
  if (!customElements.get(tagName)) {
267
- defineCustomElement$9();
268
+ defineCustomElement$a();
268
269
  }
269
270
  break;
270
271
  case "verdocs-help-icon":
271
272
  if (!customElements.get(tagName)) {
272
- defineCustomElement$8();
273
+ defineCustomElement$9();
273
274
  }
274
275
  break;
275
276
  case "verdocs-initial-dialog":
277
+ if (!customElements.get(tagName)) {
278
+ defineCustomElement$8();
279
+ }
280
+ break;
281
+ case "verdocs-ok-dialog":
276
282
  if (!customElements.get(tagName)) {
277
283
  defineCustomElement$7();
278
284
  }
@@ -127,34 +127,34 @@ const VerdocsTemplateRoleProperties = /*@__PURE__*/ proxyCustomElement(class Ver
127
127
  }
128
128
  render() {
129
129
  const hasFields = this.fieldStore.get('fields').some(field => field.role_name === this.roleName);
130
- return (h(Host, { key: 'c54a0b5c84e2ca6eba28bccd0ed7dbaf61b9318e' }, h("div", { key: 'ed724b07e6bd402c2c8f593e4f0ae5eeb7af6f2a', class: "background-overlay", onClick: e => this.handleCancel(e) }, h("div", { key: '7372ec9e048dde505c4f59f30d4bf94c9d206e2c', class: "dialog" }, h("form", { key: '2fc19ec7adb1fafa2f501698a6e61025fdc31749', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("verdocs-text-input", { key: 'd11fa702e1b5ae5ffb300b9d89c437ac6ba419c1', id: "verdocs-role-name", label: "Role Name", value: this.name, autocomplete: "off", disabled: hasFields, helpText: hasFields
130
+ return (h(Host, { key: 'e1713fef30610985e7b198413152ba998aa3d400' }, h("div", { key: '89ea386f74975c52b86fd6c78984edd49837b2de', class: "background-overlay", onClick: e => this.handleCancel(e) }, h("div", { key: '5676470ae1372df1418d7bb2bec1b6f7e25b7939', class: "dialog" }, h("form", { key: '33d2922247d3a510ae4425f028ac9a795efac654', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("verdocs-text-input", { key: '768bc89e775f2d5214fa80b092e1eeee5b113432', id: "verdocs-role-name", label: "Role Name", value: this.name, autocomplete: "off", disabled: hasFields, helpText: hasFields
131
131
  ? 'This role has fields assigned and can no longer be renamed.'
132
132
  : 'A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.', placeholder: "Role Name...", onInput: (e) => {
133
133
  this.name = e.target.value;
134
134
  this.dirty = true;
135
- } }), h("div", { key: 'e9558475d3e2a193ac753402e4df7fd4c975bc9d', class: "row" }, h("div", { key: 'ecb28611e04310a9d802f597ef4bc3a4b7b53f4d', class: "input-label" }, "Type:"), h("verdocs-select-input", { key: 'a9dc9ae0fd6ac107ec9a79fc5a77b2b4f0286808', value: this.type, options: [
135
+ } }), h("div", { key: '776217b83bd5a63075c71659b866fc66dfa2e7c6', class: "row" }, h("div", { key: '4e279080306d686e92c8a8dc51eb81ee8791a01b', class: "input-label" }, "Type:"), h("verdocs-select-input", { key: '3fe5574371f47d33996e811902c44e4144acc134', value: this.type, options: [
136
136
  { label: 'Signer', value: 'signer' },
137
137
  { label: 'CC', value: 'cc' },
138
138
  { label: 'Approver', value: 'approver' },
139
139
  ], onInput: (e) => {
140
140
  this.type = e.target.value;
141
141
  this.dirty = true;
142
- } }), h("verdocs-help-icon", { key: '56b67267f62756e09f7b02d2ebbd5b3cc20e228f', 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: '29f2c4124c9fc9a126f73088f8f7f8056f4c4323', 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
+ } }), h("verdocs-help-icon", { key: '53165bb74f7ee07445abb8c123c9b4111f16d48e', 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: '6b7b54ba54e6282f5de0bcaf3e55a6144ea02a1e', 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) => {
143
143
  this.first_name = e.target.value;
144
144
  this.dirty = true;
145
- } }), h("verdocs-text-input", { key: '512457a0c6e9abf29b6f4e8403deef8ee833dec4', 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
+ } }), h("verdocs-text-input", { key: 'f950aa5ca8c6d60f099910b1e51a79bc12552112', 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) => {
146
146
  this.last_name = e.target.value;
147
147
  this.dirty = true;
148
- } }), h("verdocs-text-input", { key: 'b69cc6d65593ecd139748a6b39e33f13f38ed3be', 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
+ } }), h("verdocs-text-input", { key: '304ed1bf5528a7db9103e1cef62af2628cb09dab', 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) => {
149
149
  this.email = e.target.value;
150
150
  this.dirty = true;
151
- } }), h("verdocs-text-input", { key: '931910a385e6b54ae33897bde3c344a4643089f6', 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
+ } }), h("verdocs-text-input", { key: '7d5fb7b56d99a09dc1f4e61744786f23a766a142', 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) => {
152
152
  this.phone = e.target.value;
153
153
  this.dirty = true;
154
- } }), h("div", { key: '380809846d4cc9a93737e244c60f2455dc3c451b', class: "row" }, h("div", { key: 'f2f518c482eed372f261eb80c4678f839ec23c9c', class: "input-label" }, "May Delegate:"), h("div", { key: 'ee8816cd6b1268c8c62c793fcd500f45d676f1d6', class: "checkbox-wrapper" }, h("verdocs-checkbox", { key: '36958e4cdfbc38ea934fe19fb3509e3107aa015f', checked: this.delegator, onInput: (e) => {
154
+ } }), h("div", { key: 'fdcffc8bcdb934b850e691b9f133fb0f009546a6', class: "row" }, h("div", { key: '84e445026a799bad4ed33a6e1c7f470f9269249c', class: "input-label" }, "May Delegate:"), h("div", { key: 'ba99473e1b59b0c7977061f5e52a6dbeb017106b', class: "checkbox-wrapper" }, h("verdocs-checkbox", { key: 'b7041e784c399da331820a6b6eaecf98716c91a5', checked: this.delegator, onInput: (e) => {
155
155
  this.delegator = e.target.checked;
156
156
  this.dirty = true;
157
- } })), h("verdocs-help-icon", { key: '44b92c48e4604fb543ff5028528bb761c348091e', text: "If enabled, this recipient may delegate their actions to another individual." })), h("div", { key: '855c97f472fe9ec7e230cb3687bbb43ad0f3d893', class: "buttons" }, h("button", { key: '09b8562821002359fa9c3d5e6281b58e2eea5ee5', class: "delete-button", disabled: this.dirty, onClick: e => this.handleDelete(e), innerHTML: TrashIcon }), h("div", { key: '65fdeeecbdc7a34bee5d1c72dcc9ab9630e6adfa', style: { flex: '1' } }), h("verdocs-button", { key: '1dcf66c59be34535f3af1e96cc15816ea097546b', size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '0eb80af6e8d388eeb6563db768bc5511a14cafb8', size: "small", label: "Save", disabled: !this.dirty, onClick: e => this.handleSave(e) })))))));
157
+ } })), h("verdocs-help-icon", { key: 'e814cd3a3f7cd8b2a3fbe1470b83f8546fbd794d', text: "If enabled, this recipient may delegate their actions to another individual." })), h("div", { key: 'e56e3368bcb7fa24e7b5ff826afbed91694ab377', class: "buttons" }, h("button", { key: '57973ea3a7326bd368d1e555575da5f0c6c083e2', class: "delete-button", disabled: this.dirty, onClick: e => this.handleDelete(e), innerHTML: TrashIcon }), h("div", { key: 'bf8ed30bc50bedc68a98cbcc338b06fdb912e430', style: { flex: '1' } }), h("verdocs-button", { key: 'bd09a8ad07eb043bccb32cee9d1ac5e5d90e1c6b', size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '68d8ff732f3190ef20225c1f50a4ab6425dcad6c', size: "small", label: "Save", disabled: !this.dirty, onClick: e => this.handleSave(e) })))))));
158
158
  }
159
159
  static get style() { return VerdocsTemplateRolePropertiesStyle0; }
160
160
  }, [0, "verdocs-template-role-properties", {
@@ -69,7 +69,7 @@ const VerdocsTemplateSender = /*@__PURE__*/ proxyCustomElement(class VerdocsTemp
69
69
  });
70
70
  }
71
71
  render() {
72
- return (h(Host, { key: '67fca56fbc8af88952abcbf38e100924ef12450e' }, h("div", { key: '7aa3d03b7cf0a197c2c0b19f8095acff8f33b0c7', class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { key: '14ed1a78f60c2f9390f5b950bc367334bf3ba5ab', class: "dialog" }, h("div", { key: 'eadbe8d3794d0bbaef40c4cf66b2b4003470cff3', class: "options" }, h("div", { key: '4e55a553a7a543ba7d0d0f9b89cc079a29cbc23f', class: "option" }, h("verdocs-radio-button", { key: 'cd77756aff5201d3278a8bf8564842bfd77378b1', name: "template-sender", value: 'everyone', checked: this.sender === 'everyone', onInput: () => this.handleSelectSetting('everyone') }), h("div", { key: '65aa448d8011a4835762bda5350758353fb86554', class: "description" }, h("div", { key: '4811f42f5a2779834b8e0c0705b52bc4ea9071df', class: "name" }, "Anyone on the Web"), h("verdocs-help-icon", { key: '2738d5cbd942df36910ae33548dfda99b93114be', text: "Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)" }))), h("div", { key: 'f316dd18967d795dc19973d46c0178d48b04cf3a', class: "option" }, h("verdocs-radio-button", { key: '06c9415f680dbe9eb06995ac46f3884ab341ca76', name: "template-sender", value: 'everyone_as_creator', checked: this.sender === 'everyone_as_creator', onInput: () => this.handleSelectSetting('everyone_as_creator') }), h("div", { key: '5f88f41c3eac901c01a996edeb21ef729d90dbf4', class: "description" }, h("div", { key: '4f6977dc538f073bf0eb24034ea9ec60e274169c', class: "name" }, "Anyone on the Web as me"), h("verdocs-help-icon", { key: 'a3d6246ae9288c701f50ecc73176c649962c3301', text: "Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)" }))), h("div", { key: '00209bb46399d1e8630540a020db6a83acb80d70', class: "option" }, h("verdocs-radio-button", { key: 'b236c9613d1078151e4c0adea3767d095714276b', name: "template-sender", value: 'organization_member', checked: this.sender === 'organization_member', onInput: () => this.handleSelectSetting('organization_member') }), h("div", { key: '6335469dd6109b6b36eec21bfb344e2a94fa793e', class: "description" }, h("div", { key: '88cddc5dd229213d243e175c7bca422e67d84fc4', class: "name" }, "Anyone in my organization"), h("verdocs-help-icon", { key: 'e2f24e4d1c5af940e1c8860b7fd78eeb8a8367b4', text: "Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')" }))), h("div", { key: 'fcbfa21b9b5aad992a608b83cec6104bee2e410f', class: "option" }, h("verdocs-radio-button", { key: 'b31555051581c7eeedd012510053f29cee40b2d0', name: "template-sender", value: 'organization_member_as_creator', checked: this.sender === 'organization_member_as_creator', onInput: () => this.handleSelectSetting('organization_member_as_creator') }), h("div", { key: 'ca1941475808a7db037dafab17ff6c2fc6b40b1b', class: "description" }, h("div", { key: '6bca41574f92ce15eba532289db4ac2a5480c9f2', class: "name" }, "Anyone in my organization as me"), h("verdocs-help-icon", { key: '8e916441fcd37488e0061c49c0b91c88b9b7f467', text: "Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)" }))), h("div", { key: '2c32fb35cc221336e96cd07ff5e79971c26475c8', class: "option" }, h("verdocs-radio-button", { key: '2f86e27c50fb65632dd647e627621f163369ca2e', name: "template-sender", value: 'creator', checked: this.sender === 'creator', onInput: () => this.handleSelectSetting('creator') }), h("div", { key: '21cef2358038a2089c5a80f32f745530380cb5f0', class: "description" }, h("div", { key: 'ed173b10391c63d838d2a814de2d3c74a056a837', class: "name" }, "Me"), h("verdocs-help-icon", { key: 'c7f3204522f631e84d34f7f040bb73af50455196', text: "Only I can use this template." })))), h("div", { key: '4d26f9e23c3b3eed492a0782b324612ddd989325', class: "buttons" }, h("verdocs-button", { key: 'e65545f203f631214e5939946b95fbc14f37686a', label: "Close", onClick: () => this.handleClose() }))))));
72
+ return (h(Host, { key: '11d6c9e8b28b149150dc2c8247a9897af3c5be8f' }, h("div", { key: '3aa4135a95fada5ef5ae8dbd6e1f4d5103e331ab', class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { key: '82604c1d23b8da0e977f335cc5e91d3f50cf8b9e', class: "dialog" }, h("div", { key: 'f4e75b7ce50372317d39f36896ffb41a1ab62bc4', class: "options" }, h("div", { key: 'e6a53f521720750d9308c6f86b7ec1ce3da5d6f5', class: "option" }, h("verdocs-radio-button", { key: '71a5dee2cdd1714a24b693e43b09a09fb390127a', name: "template-sender", value: 'everyone', checked: this.sender === 'everyone', onInput: () => this.handleSelectSetting('everyone') }), h("div", { key: '96ec93e3673df83d059068a7e6b26c893344b0e1', class: "description" }, h("div", { key: 'f96bec057a8e3813eb5d995a2c3318831dc8833c', class: "name" }, "Anyone on the Web"), h("verdocs-help-icon", { key: '936f9fc0cf13fda75dcd8ba5b7be130a7d509feb', text: "Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)" }))), h("div", { key: 'ffd734f9e6b150c8473c73c569f5344db01b33d1', class: "option" }, h("verdocs-radio-button", { key: '44c89ee4fd83268addc932681bac9cc5e4265b11', name: "template-sender", value: 'everyone_as_creator', checked: this.sender === 'everyone_as_creator', onInput: () => this.handleSelectSetting('everyone_as_creator') }), h("div", { key: 'ac2717cceef39304a7a9b3d5b6cdbd7bac459831', class: "description" }, h("div", { key: '95f4a2acb38164158e6de9d7920046a66c9b3edd', class: "name" }, "Anyone on the Web as me"), h("verdocs-help-icon", { key: '977e40893b6660ddbcd3c278e5ae54ca49d61a4d', text: "Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)" }))), h("div", { key: '67362c118307c90e5fd40b10321b8875bd771040', class: "option" }, h("verdocs-radio-button", { key: 'd582a6659c8be50cd118690fc91fea18af8026d8', name: "template-sender", value: 'organization_member', checked: this.sender === 'organization_member', onInput: () => this.handleSelectSetting('organization_member') }), h("div", { key: 'e18b002f29dd3dfdcbe742599bfdbd0a20f43697', class: "description" }, h("div", { key: 'ed4ce6c890aa51883ee72e0aff5b296128da1fd9', class: "name" }, "Anyone in my organization"), h("verdocs-help-icon", { key: '82cc8a2ee2da32cda56555d4484bf94ce9e230ed', text: "Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')" }))), h("div", { key: 'c6ea6745540bea7d20196fc4d96590f334387333', class: "option" }, h("verdocs-radio-button", { key: '5d941faac5fd0ab09ed531141ab049248de97afd', name: "template-sender", value: 'organization_member_as_creator', checked: this.sender === 'organization_member_as_creator', onInput: () => this.handleSelectSetting('organization_member_as_creator') }), h("div", { key: 'a57cb28c9609a2d6d583b5fb7022866354b95bb2', class: "description" }, h("div", { key: '33561830437d8f604c7cda519617b687b1588e65', class: "name" }, "Anyone in my organization as me"), h("verdocs-help-icon", { key: '65557a2d57bc56c248f13d1b4d1d72305728fb8c', text: "Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)" }))), h("div", { key: 'f6e19ddf05d5468b226a2767e05bdd83efe66e06', class: "option" }, h("verdocs-radio-button", { key: '2d82a2104f9f5c209f560144b8fc6c28b3675889', name: "template-sender", value: 'creator', checked: this.sender === 'creator', onInput: () => this.handleSelectSetting('creator') }), h("div", { key: '8afe677cfca3535e2e372af8a227c91b880af4e4', class: "description" }, h("div", { key: 'd628e15e4223cae86a4152063b91a055b441328b', class: "name" }, "Me"), h("verdocs-help-icon", { key: 'd85b39030f38b05d2a8053950d64a00383a28ca6', text: "Only I can use this template." })))), h("div", { key: '575bdb57d53dac18f852f5f79c370cd186550402', class: "buttons" }, h("verdocs-button", { key: '44f30d116ebfd5618b818b1170881566fadd1e68', label: "Close", onClick: () => this.handleClose() }))))));
73
73
  }
74
74
  static get style() { return VerdocsTemplateSenderStyle0; }
75
75
  }, [0, "verdocs-template-sender", {
@@ -43,7 +43,7 @@ const VerdocsTemplateStar = /*@__PURE__*/ proxyCustomElement(class VerdocsTempla
43
43
  });
44
44
  }
45
45
  render() {
46
- return (h(Host, { key: '9b776fbc0df8053116cf8c90abf92ca936e4aed3' }, h("div", { key: '4623b371e18334c1c88f8a2463c9cc48b308eedf', class: `star ${this.updating ? 'updating' : ''}`, innerHTML: this.template.star_counter ? SolidStarIcon : OutlineStarIcon, onClick: e => this.toggle(e) }), h("div", { key: 'd0f7d0d65266d1683a1fcd537cd4eda40e94b287', class: "count" }, this.template.star_counter || '--')));
46
+ return (h(Host, { key: '380d6e0aa5c8cda93b4d5ed1276da45dafc8c8b4' }, h("div", { key: '04dd0b86049e0dd2ca756c6f209ecce0cda2e22b', class: `star ${this.updating ? 'updating' : ''}`, innerHTML: this.template.star_counter ? SolidStarIcon : OutlineStarIcon, onClick: e => this.toggle(e) }), h("div", { key: 'e26658e05d76b6d72fbd434d8b938f61cde39b2a', class: "count" }, this.template.star_counter || '--')));
47
47
  }
48
48
  static get style() { return VerdocsTemplateStarStyle0; }
49
49
  }, [0, "verdocs-template-star", {
@@ -11,7 +11,7 @@ const VerdocsTemplateTags$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsTemp
11
11
  }
12
12
  render() {
13
13
  var _a;
14
- return (h(Host, { key: 'bae2503fd50b94ad99bfbb24f2abe5e6d5629e2e' }, (_a = this.tags) === null || _a === void 0 ? void 0 : _a.map(tag => (h("span", null, tag)))));
14
+ return (h(Host, { key: '0935c5356bbfe973758193fb4901abb941827d5b' }, (_a = this.tags) === null || _a === void 0 ? void 0 : _a.map(tag => (h("span", null, tag)))));
15
15
  }
16
16
  static get style() { return VerdocsTemplateTagsStyle0; }
17
17
  }, [0, "verdocs-template-tags", {
@@ -1,7 +1,8 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
2
- import { d as defineCustomElement$1 } from './verdocs-button2.js';
2
+ import { d as defineCustomElement$2 } from './verdocs-button2.js';
3
+ import { d as defineCustomElement$1 } from './verdocs-ok-dialog2.js';
3
4
 
4
- const verdocsUploadDialogCss = "@-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-upload-dialog{position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-upload-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-upload-dialog .background-overlay{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}verdocs-upload-dialog .dialog{width:320px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-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-upload-dialog .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-upload-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-upload-dialog .buttons verdocs-button{margin-left:16px}verdocs-upload-dialog .current-label{margin:20px 0 5px 0}verdocs-upload-dialog .drop-target{opacity:1;width:100%;display:-ms-flexbox;display:flex;margin:20px 0;min-height:260px;padding:30px 15px;text-align:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;background-color:#f5f5f5;color:rgba(0, 0, 0, 0.54);border:2px dashed #979797}verdocs-upload-dialog .drop-target p{margin:12px 0}verdocs-upload-dialog .drop-target.dragging-over{border:5px solid #4c56cb}verdocs-upload-dialog .drop-target>verdocs-button{margin:12px 0;display:inline-block}verdocs-upload-dialog .attachments{height:56px;font-size:0;margin:20px 0;padding:0 16px;line-height:56px;white-space:normal;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-upload-dialog .attachments .attachment{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .attachments .attachment .icon{width:18px;height:18px;line-height:18px}verdocs-upload-dialog .attachments .attachment .icon.trash{cursor:pointer}verdocs-upload-dialog .attachments .attachment .name{-ms-flex:1;flex:1;font-size:14px;overflow:hidden;font-weight:400;white-space:nowrap;text-overflow:ellipsis}";
5
+ const verdocsUploadDialogCss = "@-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-upload-dialog{position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-upload-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-upload-dialog .background-overlay{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}verdocs-upload-dialog .upload-dialog-content{width:320px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-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-upload-dialog .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-upload-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-upload-dialog .buttons verdocs-button{margin-left:16px}verdocs-upload-dialog .current-label{margin:20px 0 5px 0}verdocs-upload-dialog .drop-target{opacity:1;width:100%;display:-ms-flexbox;display:flex;margin:20px 0;min-height:260px;padding:30px 15px;text-align:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;background-color:#f5f5f5;color:rgba(0, 0, 0, 0.54);border:2px dashed #979797}verdocs-upload-dialog .drop-target p{margin:12px 0}verdocs-upload-dialog .drop-target.dragging-over{border:5px solid #4c56cb}verdocs-upload-dialog .drop-target>verdocs-button{margin:12px 0;display:inline-block}verdocs-upload-dialog .attachments{height:56px;font-size:0;margin:20px 0;padding:0 16px;line-height:56px;white-space:normal;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-upload-dialog .attachments .attachment{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .attachments .attachment .icon{width:18px;height:18px;line-height:18px}verdocs-upload-dialog .attachments .attachment .icon.trash{cursor:pointer}verdocs-upload-dialog .attachments .attachment .name{-ms-flex:1;flex:1;font-size:14px;overflow:hidden;font-weight:400;white-space:nowrap;text-overflow:ellipsis}";
5
6
  const VerdocsUploadDialogStyle0 = verdocsUploadDialogCss;
6
7
 
7
8
  const TrashIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>`;
@@ -15,6 +16,7 @@ const VerdocsUploadDialog = /*@__PURE__*/ proxyCustomElement(class VerdocsUpload
15
16
  this.remove = createEvent(this, "remove", 7);
16
17
  this.existingFile = undefined;
17
18
  this.draggingOver = false;
19
+ this.confirmDelete = false;
18
20
  this.selectedFiles = [];
19
21
  }
20
22
  handleCancel() {
@@ -48,11 +50,15 @@ const VerdocsUploadDialog = /*@__PURE__*/ proxyCustomElement(class VerdocsUpload
48
50
  newFiles.splice(index, 1);
49
51
  this.selectedFiles = newFiles;
50
52
  }
51
- handleDeleteAttachment() {
53
+ handleDeleteAttachment(e) {
52
54
  var _a;
53
- // TODO: Discuss how we want to delete up to the server
55
+ // Stop the parent from seeing "next" and thinking an upload was done.
56
+ // TODO: Rethink having so many commonalities in nested dialogs (next/exit).
57
+ e.preventDefault();
58
+ e.stopPropagation();
54
59
  (_a = this.remove) === null || _a === void 0 ? void 0 : _a.emit();
55
60
  this.existingFile = null;
61
+ this.confirmDelete = false;
56
62
  }
57
63
  handleSelectFile() {
58
64
  var _a;
@@ -63,19 +69,27 @@ const VerdocsUploadDialog = /*@__PURE__*/ proxyCustomElement(class VerdocsUpload
63
69
  this.selectedFiles = Array.from((_a = this.fileInput) === null || _a === void 0 ? void 0 : _a.files);
64
70
  }
65
71
  render() {
66
- return (h(Host, { key: 'ea7aaec178e0708c73e6ad4f12253f4ff73b9310' }, h("div", { key: '7d769afe448df6edfb40800bc08237d60c924d95', class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { key: 'cd32c34e98c48b1e48b1792bead1634ca70df871', class: "dialog" }, h("div", { key: 'eb7f1782c643b531c2ff6faf17e2248f803cde39', class: "heading" }, "Upload attachment"), this.selectedFiles.length < 1 && this.existingFile && (h(Fragment, { key: '2feac9b495828147f2be51e2368c7d03b039f64a' }, h("div", { key: '9ead90c769215c71bd952bb585a3cbde16c7e518', class: "current-label" }, "Current Attachment"), h("div", { key: '671e35179c26f14823ae504a1fc40f4506117e2e', class: "attachments", style: { marginTop: '0' } }, h("div", { key: '2ae16fe846ee84db2f0fdb2cfb39d1e0a30f85f2', class: "attachment" }, h("div", { key: '8db0145b16b3568d7fd5e1287a4a81b3a8822c3f', class: "icon", innerHTML: PaperclipIcon }), h("div", { key: '5c9c54ce036cec26e721fc32e4a9c8326735f221', class: "name" }, this.existingFile.name), h("div", { key: '99c17d1a88f6f8c07b346b37836969c60c1ee31d', class: "icon trash", innerHTML: TrashIcon, onClick: () => this.handleDeleteAttachment() }))))), this.selectedFiles.length < 1 && !this.existingFile && (h("div", { key: 'eec6e965857fca674db531ebad805c6931a2daf2', class: { 'drop-target': true, 'dragging-over': this.draggingOver }, onDragOver: e => this.handleDragOver(e), onDragLeave: e => this.handleDragLeave(e), onDrop: e => this.handleDrop(e) }, h("p", { key: '4dc240eacbd3724a54f6613113d98f5446c6c478' }, "Drag and drop a ", !!this.existingFile && 'replacement', " here..."), h("p", { key: 'af261cba2d009aa6733891e670029e4a2fec6a4d' }, "- or -"), h("verdocs-button", { key: 'f922efbffa39aa22b58b30b50697f17edcdd0f48', label: !!this.existingFile ? 'Replace file...' : 'Select a file...', onClick: () => this.handleSelectFile() }), h("input", { key: '504ae2231657a1ff6f27405b789c239f41f4fdce', type: "file", ref: el => (this.fileInput = el), style: { display: 'none' }, onChange: () => this.handleFileChange() }))), this.selectedFiles.length > 0 && (h("div", { key: 'e225969a1e6073a883e3e47fbeeec1bf88085f82', class: "attachments" }, this.selectedFiles.map((file, index) => (h("div", { class: "attachment" }, h("div", { class: "icon", innerHTML: PaperclipIcon }), h("div", { class: "name" }, file.name), h("div", { class: "icon trash", innerHTML: TrashIcon, onClick: () => this.handleRemoveAttachment(index) })))))), h("div", { key: 'b34ab1a0be4e5b7bfeb9f52b2e4820e8dce3a40a', class: "buttons" }, h("verdocs-button", { key: '9e35669d8a39a493b53434d680d66745610d4828', label: "Cancel", variant: "outline", onClick: () => this.handleCancel() }), h("verdocs-button", { key: '9b41014e538eecdec86221c637c09c8f00b9b3af', label: "Upload", onClick: () => this.handleDone(), disabled: this.selectedFiles.length < 1 }))))));
72
+ var _a;
73
+ const existingFile = ((_a = this.existingFile) === null || _a === void 0 ? void 0 : _a.name) ? this.existingFile : null;
74
+ return (h(Host, { key: '1659eb29f75e9bf3866a011a1ce39767f045e58c' }, h("div", { key: '764f802db78676a02d17fbf2ee93dd859c90494c', class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { key: 'c28580308a52defdd648f197aa5d1e74a1ff366c', class: "upload-dialog-content" }, h("div", { key: '6de50a3f71d93a176b4db5a248a49da4cf8d404d', class: "heading" }, "Upload attachment"), this.selectedFiles.length < 1 && existingFile && (h(Fragment, { key: '0882e3e5cae1dae105645f6f4b5dd8986c336e1f' }, h("div", { key: 'a762a4dbf4f1be8a29d637e6bee196ab4b960c60', class: "current-label" }, "Current Attachment"), h("div", { key: 'ada0b184bb53583dc6012ab5393be2a36714eba4', class: "attachments", style: { marginTop: '0' } }, h("div", { key: '3d9555cf0f7876ba192e3efec76bf677eec137cf', class: "attachment" }, h("div", { key: 'cea6d0e30448b6ea003a32d838bd64d642a621f3', class: "icon", innerHTML: PaperclipIcon }), h("div", { key: '20b87ade4eb56de78db2e0c1a7fe5c1f88d9f2c7', class: "name" }, existingFile.name), h("div", { key: '6359ea1dffd674d708afcd6b1e4f5be38062b861', class: "icon trash", innerHTML: TrashIcon, onClick: () => (this.confirmDelete = true) }))))), this.selectedFiles.length < 1 && !existingFile && (h("div", { key: 'c554239826339af3008fd9b4ef235efe6b4bf138', class: { 'drop-target': true, 'dragging-over': this.draggingOver }, onDragOver: e => this.handleDragOver(e), onDragLeave: e => this.handleDragLeave(e), onDrop: e => this.handleDrop(e) }, h("p", { key: 'a2bcc388981e79a1c6c3325081546ea41d7fd96f' }, "Drag and drop a ", !!existingFile && 'replacement', " here..."), h("p", { key: '23c7c1e2c8c369a8b85d83fc9a7d2e03bd26f6d9' }, "- or -"), h("verdocs-button", { key: 'cba655d0b392f5f03776f769cd3ee626b432b846', label: !!existingFile ? 'Replace file...' : 'Select a file...', onClick: () => this.handleSelectFile() }), h("input", { key: 'cbaa00e587959f418709c89b531a173512f5b9fa', type: "file", ref: el => (this.fileInput = el), style: { display: 'none' }, onChange: () => this.handleFileChange() }))), this.selectedFiles.length > 0 && (h("div", { key: '35f7be5ad20ecab5947c2f90f4ac529775ec51ce', class: "attachments" }, this.selectedFiles.map((file, index) => (h("div", { class: "attachment" }, h("div", { class: "icon", innerHTML: PaperclipIcon }), h("div", { class: "name" }, file.name), h("div", { class: "icon trash", innerHTML: TrashIcon, onClick: () => this.handleRemoveAttachment(index) })))))), h("div", { key: 'ea437cefbfa71cd4853f4fd77d1d1a78b576e032', class: "buttons" }, h("verdocs-button", { key: '2be19df5ae677ee0d0893266fd2f72aeff609e95', label: "Cancel", variant: "outline", onClick: () => this.handleCancel() }), h("verdocs-button", { key: '2013efb5dba9d6b3236ad280dbc6883473eebabf', label: "Upload", onClick: () => this.handleDone(), disabled: this.selectedFiles.length < 1 })))), this.confirmDelete && (h("verdocs-ok-dialog", { key: 'd55cbad44c7d50d9c479a87917b14fc0ae488a2b', heading: "Delete Attachment?", message: "Are you sure you wish to delete this attachment? This action cannot be undone.", showCancel: true, onExit: e => {
75
+ // So we don't close the upload dialog
76
+ e.preventDefault();
77
+ e.stopPropagation();
78
+ this.confirmDelete = false;
79
+ }, onNext: e => this.handleDeleteAttachment(e) }))));
67
80
  }
68
81
  static get style() { return VerdocsUploadDialogStyle0; }
69
82
  }, [0, "verdocs-upload-dialog", {
70
83
  "existingFile": [1032, "existing-file"],
71
84
  "draggingOver": [32],
85
+ "confirmDelete": [32],
72
86
  "selectedFiles": [32]
73
87
  }]);
74
88
  function defineCustomElement() {
75
89
  if (typeof customElements === "undefined") {
76
90
  return;
77
91
  }
78
- const components = ["verdocs-upload-dialog", "verdocs-button"];
92
+ const components = ["verdocs-upload-dialog", "verdocs-button", "verdocs-ok-dialog"];
79
93
  components.forEach(tagName => { switch (tagName) {
80
94
  case "verdocs-upload-dialog":
81
95
  if (!customElements.get(tagName)) {
@@ -83,6 +97,11 @@ function defineCustomElement() {
83
97
  }
84
98
  break;
85
99
  case "verdocs-button":
100
+ if (!customElements.get(tagName)) {
101
+ defineCustomElement$2();
102
+ }
103
+ break;
104
+ case "verdocs-ok-dialog":
86
105
  if (!customElements.get(tagName)) {
87
106
  defineCustomElement$1();
88
107
  }
@@ -180,14 +180,14 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
180
180
  return import(
181
181
  /* webpackMode: "lazy" */
182
182
  './verdocs-spinner.entry.js').then(processMod, consoleError);
183
- case 'verdocs-ok-dialog':
184
- return import(
185
- /* webpackMode: "lazy" */
186
- './verdocs-ok-dialog.entry.js').then(processMod, consoleError);
187
183
  case 'verdocs-loader':
188
184
  return import(
189
185
  /* webpackMode: "lazy" */
190
186
  './verdocs-loader.entry.js').then(processMod, consoleError);
187
+ case 'verdocs-ok-dialog':
188
+ return import(
189
+ /* webpackMode: "lazy" */
190
+ './verdocs-ok-dialog.entry.js').then(processMod, consoleError);
191
191
  case 'verdocs-checkbox_4':
192
192
  return import(
193
193
  /* webpackMode: "lazy" */