@verdocs/web-sdk 1.10.8 → 1.10.10

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 (78) hide show
  1. package/dist/cjs/{Templates-a75b133d.js → Templates-2f2ea153.js} +2 -2
  2. package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
  3. package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-preview.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-send.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-template-attachments.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-template-create_2.cjs.entry.js +3 -3
  8. package/dist/cjs/verdocs-template-name.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-template-recipients.cjs.entry.js +3 -3
  10. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +1 -1
  13. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.css +0 -1
  14. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +1 -1
  15. package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.js +2 -2
  16. package/dist/collection/utils/Templates.js +2 -2
  17. package/dist/components/Templates.js +2 -2
  18. package/dist/components/verdocs-template-create2.js +1 -1
  19. package/dist/components/verdocs-template-fields2.js +1 -1
  20. package/dist/components/verdocs-template-recipients.js +2 -2
  21. package/dist/docs.json +1 -1
  22. package/dist/esm/{Templates-7595bdbf.js → Templates-a7530314.js} +2 -2
  23. package/dist/esm/verdocs-build.entry.js +1 -1
  24. package/dist/esm/verdocs-button-panel_3.entry.js +1 -1
  25. package/dist/esm/verdocs-preview.entry.js +1 -1
  26. package/dist/esm/verdocs-send.entry.js +1 -1
  27. package/dist/esm/verdocs-template-attachments.entry.js +1 -1
  28. package/dist/esm/verdocs-template-create_2.entry.js +3 -3
  29. package/dist/esm/verdocs-template-name.entry.js +1 -1
  30. package/dist/esm/verdocs-template-recipients.entry.js +3 -3
  31. package/dist/esm/verdocs-template-reminders.entry.js +1 -1
  32. package/dist/esm/verdocs-template-role-properties_2.entry.js +1 -1
  33. package/dist/esm/verdocs-template-visibility.entry.js +1 -1
  34. package/dist/esm-es5/{Templates-7595bdbf.js → Templates-a7530314.js} +1 -1
  35. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  36. package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
  37. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  38. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  39. package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -1
  40. package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
  41. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  42. package/dist/esm-es5/verdocs-template-recipients.entry.js +1 -1
  43. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  44. package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -1
  45. package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
  46. package/dist/types/utils/Templates.d.ts +1 -1
  47. package/dist/verdocs-web-sdk/{p-3a04acf4.system.entry.js → p-00307be5.system.entry.js} +1 -1
  48. package/dist/verdocs-web-sdk/{p-f2ae6ed5.entry.js → p-011eedf8.entry.js} +1 -1
  49. package/dist/verdocs-web-sdk/p-0214eab8.entry.js +1 -0
  50. package/dist/verdocs-web-sdk/{p-a802a598.entry.js → p-07dfda29.entry.js} +1 -1
  51. package/dist/verdocs-web-sdk/{p-51a99eed.system.entry.js → p-08270eb7.system.entry.js} +1 -1
  52. package/dist/verdocs-web-sdk/{p-584e4fca.entry.js → p-0fc8ae0a.entry.js} +1 -1
  53. package/dist/verdocs-web-sdk/{p-d95b1215.system.entry.js → p-1e710eb7.system.entry.js} +1 -1
  54. package/dist/verdocs-web-sdk/{p-7067adce.system.js → p-45a4da16.system.js} +1 -1
  55. package/dist/verdocs-web-sdk/{p-c9216df9.system.entry.js → p-46cfb904.system.entry.js} +1 -1
  56. package/dist/verdocs-web-sdk/{p-01117b44.entry.js → p-5a4b4373.entry.js} +1 -1
  57. package/dist/verdocs-web-sdk/{p-7bc5fc1e.system.entry.js → p-6790f267.system.entry.js} +1 -1
  58. package/dist/verdocs-web-sdk/p-7a05d4ac.system.entry.js +1 -0
  59. package/dist/verdocs-web-sdk/{p-50892057.system.entry.js → p-9576a08f.system.entry.js} +1 -1
  60. package/dist/verdocs-web-sdk/{p-6cb274e3.entry.js → p-ac3a9c3c.entry.js} +1 -1
  61. package/dist/verdocs-web-sdk/p-ad6cc9f4.js +1 -0
  62. package/dist/verdocs-web-sdk/{p-26bfe095.entry.js → p-af65650c.entry.js} +1 -1
  63. package/dist/verdocs-web-sdk/{p-a7c75902.entry.js → p-b537b400.entry.js} +1 -1
  64. package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
  65. package/dist/verdocs-web-sdk/{p-7417cdc7.entry.js → p-c9eb3771.entry.js} +1 -1
  66. package/dist/verdocs-web-sdk/{p-9f52748a.system.entry.js → p-cdff8cba.system.entry.js} +1 -1
  67. package/dist/verdocs-web-sdk/{p-0e1f1b27.entry.js → p-d06946ca.entry.js} +1 -1
  68. package/dist/verdocs-web-sdk/{p-6c2d3b0f.system.entry.js → p-d88f7d5e.system.entry.js} +1 -1
  69. package/dist/verdocs-web-sdk/{p-34efc869.system.entry.js → p-e91b174d.system.entry.js} +1 -1
  70. package/dist/verdocs-web-sdk/{p-efa9bfa2.system.entry.js → p-f4f44d6f.system.entry.js} +1 -1
  71. package/dist/verdocs-web-sdk/p-ff2816cf.entry.js +1 -0
  72. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  73. package/package.json +1 -1
  74. package/dist/custom-elements.json +0 -1361
  75. package/dist/verdocs-web-sdk/p-53198827.entry.js +0 -1
  76. package/dist/verdocs-web-sdk/p-59c4e444.entry.js +0 -1
  77. package/dist/verdocs-web-sdk/p-d1393a1a.js +0 -1
  78. package/dist/verdocs-web-sdk/p-e82bebc9.system.entry.js +0 -1
@@ -4,7 +4,7 @@ const Templates = require('./Templates-ed812768.js');
4
4
  const templateStore = require('./templateStore-81ad25a7.js');
5
5
 
6
6
  const pendingNotifications = [];
7
- const loadTemplate = async (endpoint, templateId) => {
7
+ const loadTemplate = async (endpoint, templateId, forceReload = false) => {
8
8
  if (!templateId) {
9
9
  console.log(`[TEMPLATES] Missing required template ID`);
10
10
  throw new Error('Missing required template ID');
@@ -18,7 +18,7 @@ const loadTemplate = async (endpoint, templateId) => {
18
18
  pendingNotifications.push({ resolve, reject });
19
19
  });
20
20
  }
21
- if (templateId === templateStore.state.templateId) {
21
+ if (templateId === templateStore.state.templateId && !forceReload) {
22
22
  return templateStore.state.template;
23
23
  }
24
24
  templateStore.state.loading = true;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1329d89c.js');
6
6
  const VerdocsEndpoint = require('./VerdocsEndpoint-25056c73.js');
7
- const Templates = require('./Templates-a75b133d.js');
7
+ const Templates = require('./Templates-2f2ea153.js');
8
8
  const errors = require('./errors-0396da3d.js');
9
9
  require('./Token-576f0e8a.js');
10
10
  require('./Templates-ed812768.js');
@@ -7,7 +7,7 @@ const popper = require('./popper-11d5f714.js');
7
7
  const Fields = require('./Fields-705a2168.js');
8
8
  const VerdocsEndpoint = require('./VerdocsEndpoint-25056c73.js');
9
9
  const templateStore = require('./templateStore-81ad25a7.js');
10
- const Templates = require('./Templates-a75b133d.js');
10
+ const Templates = require('./Templates-2f2ea153.js');
11
11
  const errors = require('./errors-0396da3d.js');
12
12
  require('./Token-576f0e8a.js');
13
13
  require('./index-eb130f52.js');
@@ -6,7 +6,7 @@ const index = require('./index-1329d89c.js');
6
6
  const VerdocsEndpoint = require('./VerdocsEndpoint-25056c73.js');
7
7
  const utils = require('./utils-865fd657.js');
8
8
  const templateStore = require('./templateStore-81ad25a7.js');
9
- const Templates = require('./Templates-a75b133d.js');
9
+ const Templates = require('./Templates-2f2ea153.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
11
  require('./Token-576f0e8a.js');
12
12
  require('./Envelopes-68058bbe.js');
@@ -7,7 +7,7 @@ const VerdocsEndpoint = require('./VerdocsEndpoint-25056c73.js');
7
7
  const Validators = require('./Validators-16e6d7d1.js');
8
8
  const Colors = require('./Colors-e809dcc9.js');
9
9
  const templateStore = require('./templateStore-81ad25a7.js');
10
- const Templates = require('./Templates-a75b133d.js');
10
+ const Templates = require('./Templates-2f2ea153.js');
11
11
  const utils = require('./utils-865fd657.js');
12
12
  const errors = require('./errors-0396da3d.js');
13
13
  require('./Token-576f0e8a.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-1329d89c.js');
6
6
  const VerdocsEndpoint = require('./VerdocsEndpoint-25056c73.js');
7
7
  const templateStore = require('./templateStore-81ad25a7.js');
8
- const Templates = require('./Templates-a75b133d.js');
8
+ const Templates = require('./Templates-2f2ea153.js');
9
9
  const errors = require('./errors-0396da3d.js');
10
10
  require('./Token-576f0e8a.js');
11
11
  require('./index-eb130f52.js');
@@ -10,7 +10,7 @@ const interact_min = require('./interact.min-3e3c03a5.js');
10
10
  const Fields = require('./Fields-705a2168.js');
11
11
  const utils = require('./utils-865fd657.js');
12
12
  const templateStore = require('./templateStore-81ad25a7.js');
13
- const Templates$1 = require('./Templates-a75b133d.js');
13
+ const Templates$1 = require('./Templates-2f2ea153.js');
14
14
  require('./Token-576f0e8a.js');
15
15
  require('./Envelopes-68058bbe.js');
16
16
  require('./Files-4bdc0c0f.js');
@@ -46,7 +46,7 @@ var createTemplateDocument = function (endpoint, templateId, file, onUploadProgr
46
46
  .then(function (r) { return r.data; });
47
47
  };
48
48
 
49
- const verdocsTemplateCreateCss = "verdocs-template-create{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:340px}verdocs-template-create form .upload-box{max-width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}";
49
+ const verdocsTemplateCreateCss = "verdocs-template-create{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{max-width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}";
50
50
 
51
51
  // import {ITemplate, ITemplateDocument} from '@verdocs/js-sdk/Templates/Types';
52
52
  // import {createPage} from '@verdocs/js-sdk/Templates/Pages';
@@ -167,7 +167,7 @@ const VerdocsTemplateFields = class {
167
167
  }
168
168
  try {
169
169
  console.log(`[FIELDS] Loading template ${this.templateId}`, this.endpoint.session);
170
- await Templates$1.loadTemplate(this.endpoint, this.templateId);
170
+ await Templates$1.loadTemplate(this.endpoint, this.templateId, true);
171
171
  this.selectedRoleName = templateStore.state.roleNames[0];
172
172
  console.log('Starting with role', this.selectedRoleName);
173
173
  }
@@ -6,7 +6,7 @@ const index = require('./index-1329d89c.js');
6
6
  const Templates$1 = require('./Templates-ed812768.js');
7
7
  const VerdocsEndpoint = require('./VerdocsEndpoint-25056c73.js');
8
8
  const templateStore = require('./templateStore-81ad25a7.js');
9
- const Templates = require('./Templates-a75b133d.js');
9
+ const Templates = require('./Templates-2f2ea153.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
11
  require('./Token-576f0e8a.js');
12
12
  require('./index-eb130f52.js');
@@ -8,7 +8,7 @@ const Roles = require('./Roles-927719de.js');
8
8
  const VerdocsEndpoint = require('./VerdocsEndpoint-25056c73.js');
9
9
  const Colors = require('./Colors-e809dcc9.js');
10
10
  const templateStore = require('./templateStore-81ad25a7.js');
11
- const Templates = require('./Templates-a75b133d.js');
11
+ const Templates = require('./Templates-2f2ea153.js');
12
12
  const utils = require('./utils-865fd657.js');
13
13
  const errors = require('./errors-0396da3d.js');
14
14
  require('./Token-576f0e8a.js');
@@ -63,7 +63,7 @@ const VerdocsTemplateRecipients = class {
63
63
  }
64
64
  try {
65
65
  console.log(`[RECIPIENTS] Loading template ${this.templateId}`, this.endpoint.session);
66
- await Templates.loadTemplate(this.endpoint, this.templateId);
66
+ await Templates.loadTemplate(this.endpoint, this.templateId, true);
67
67
  }
68
68
  catch (e) {
69
69
  console.log('[RECIPIENTS] Error loading template', e);
@@ -233,7 +233,7 @@ const VerdocsTemplateRecipients = class {
233
233
  }
234
234
  render() {
235
235
  const roleNames = templateStore.state.template.roles.map(role => role.name);
236
- return (index.h(index.Host, null, index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off", "data-r": this.forceRerender }, index.h("h5", null, "Recipients"), index.h("div", { class: "participants" }, index.h("div", { class: "left-line" }), index.h("div", { class: "row" }, index.h("div", { class: "icon", innerHTML: startIcon }), index.h("div", { class: "row-recipients" }, index.h("div", { class: "sender" }, index.h("span", { class: "label" }, "Sender:"), " ", senderLabels[templateStore.state.template.sender], ' ', index.h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingSenderDialog = true), "aria-role": "button" })))), index.h("div", { class: "row add-sequence", "data-sequence": 0 }, index.h("div", { class: "icon", innerHTML: plusIcon }), index.h("div", { class: "row-recipients" }, index.h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), this.sequences.map(sequence => (index.h(index.Fragment, null, index.h("div", { class: "row" }, index.h("div", { class: "icon", innerHTML: stepIcon }), index.h("div", { class: "row-recipients" }, index.h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), templateStore.state.template.roles
236
+ return (index.h(index.Host, null, index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off", "data-r": this.forceRerender }, index.h("h5", null, "Roles"), index.h("div", { class: "participants" }, index.h("div", { class: "left-line" }), index.h("div", { class: "row" }, index.h("div", { class: "icon", innerHTML: startIcon }), index.h("div", { class: "row-recipients" }, index.h("div", { class: "sender" }, index.h("span", { class: "label" }, "Sender:"), " ", senderLabels[templateStore.state.template.sender], ' ', index.h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingSenderDialog = true), "aria-role": "button" })))), index.h("div", { class: "row add-sequence", "data-sequence": 0 }, index.h("div", { class: "icon", innerHTML: plusIcon }), index.h("div", { class: "row-recipients" }, index.h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), this.sequences.map(sequence => (index.h(index.Fragment, null, index.h("div", { class: "row" }, index.h("div", { class: "icon", innerHTML: stepIcon }), index.h("div", { class: "row-recipients" }, index.h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), templateStore.state.template.roles
237
237
  .filter(role => role.sequence === sequence)
238
238
  .map(role => {
239
239
  return (index.h(index.Fragment, null, index.h("div", { class: "recipient", style: { backgroundColor: Colors.getRGBA(utils.getRoleIndex(roleNames, role.name)) }, "data-rolename": role.name }, index.h("span", { class: "type-icon", innerHTML: role.type === 'signer' ? iconSigner : role.type === 'cc' ? iconCC : iconApprover }), role.name, " ", index.h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingRoleDialog = role.name), "aria-role": "button" })), index.h("div", { class: "dropzone", "data-order": role.order + 0.5, "data-sequence": sequence })));
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-1329d89c.js');
6
6
  const VerdocsEndpoint = require('./VerdocsEndpoint-25056c73.js');
7
7
  const templateStore = require('./templateStore-81ad25a7.js');
8
- const Templates = require('./Templates-a75b133d.js');
8
+ const Templates = require('./Templates-2f2ea153.js');
9
9
  const errors = require('./errors-0396da3d.js');
10
10
  require('./Token-576f0e8a.js');
11
11
  require('./index-eb130f52.js');
@@ -6,7 +6,7 @@ const index = require('./index-1329d89c.js');
6
6
  const Roles = require('./Roles-927719de.js');
7
7
  const VerdocsEndpoint = require('./VerdocsEndpoint-25056c73.js');
8
8
  const templateStore = require('./templateStore-81ad25a7.js');
9
- const Templates = require('./Templates-a75b133d.js');
9
+ const Templates = require('./Templates-2f2ea153.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
11
  const Templates$1 = require('./Templates-ed812768.js');
12
12
  require('./Token-576f0e8a.js');
@@ -6,7 +6,7 @@ const index = require('./index-1329d89c.js');
6
6
  const Templates$1 = require('./Templates-ed812768.js');
7
7
  const VerdocsEndpoint = require('./VerdocsEndpoint-25056c73.js');
8
8
  const templateStore = require('./templateStore-81ad25a7.js');
9
- const Templates = require('./Templates-a75b133d.js');
9
+ const Templates = require('./Templates-2f2ea153.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
11
  require('./Token-576f0e8a.js');
12
12
  require('./index-eb130f52.js');
@@ -6,7 +6,6 @@ verdocs-template-create form {
6
6
  padding: 12px;
7
7
  display: flex;
8
8
  flex-direction: column;
9
- width: 340px;
10
9
  }
11
10
  verdocs-template-create form .upload-box {
12
11
  max-width: 320px;
@@ -53,7 +53,7 @@ export class VerdocsTemplateFields {
53
53
  }
54
54
  try {
55
55
  console.log(`[FIELDS] Loading template ${this.templateId}`, this.endpoint.session);
56
- await loadTemplate(this.endpoint, this.templateId);
56
+ await loadTemplate(this.endpoint, this.templateId, true);
57
57
  this.selectedRoleName = TemplateStore.roleNames[0];
58
58
  console.log('Starting with role', this.selectedRoleName);
59
59
  }
@@ -50,7 +50,7 @@ export class VerdocsTemplateRecipients {
50
50
  }
51
51
  try {
52
52
  console.log(`[RECIPIENTS] Loading template ${this.templateId}`, this.endpoint.session);
53
- await loadTemplate(this.endpoint, this.templateId);
53
+ await loadTemplate(this.endpoint, this.templateId, true);
54
54
  }
55
55
  catch (e) {
56
56
  console.log('[RECIPIENTS] Error loading template', e);
@@ -220,7 +220,7 @@ export class VerdocsTemplateRecipients {
220
220
  }
221
221
  render() {
222
222
  const roleNames = TemplateStore.template.roles.map(role => role.name);
223
- return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off", "data-r": this.forceRerender }, h("h5", null, "Recipients"), h("div", { class: "participants" }, h("div", { class: "left-line" }), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: startIcon }), h("div", { class: "row-recipients" }, h("div", { class: "sender" }, h("span", { class: "label" }, "Sender:"), " ", senderLabels[TemplateStore.template.sender], ' ', h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingSenderDialog = true), "aria-role": "button" })))), h("div", { class: "row add-sequence", "data-sequence": 0 }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), this.sequences.map(sequence => (h(Fragment, null, h("div", { class: "row" }, h("div", { class: "icon", innerHTML: stepIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), TemplateStore.template.roles
223
+ return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off", "data-r": this.forceRerender }, h("h5", null, "Roles"), h("div", { class: "participants" }, h("div", { class: "left-line" }), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: startIcon }), h("div", { class: "row-recipients" }, h("div", { class: "sender" }, h("span", { class: "label" }, "Sender:"), " ", senderLabels[TemplateStore.template.sender], ' ', h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingSenderDialog = true), "aria-role": "button" })))), h("div", { class: "row add-sequence", "data-sequence": 0 }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), this.sequences.map(sequence => (h(Fragment, null, h("div", { class: "row" }, h("div", { class: "icon", innerHTML: stepIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), TemplateStore.template.roles
224
224
  .filter(role => role.sequence === sequence)
225
225
  .map(role => {
226
226
  return (h(Fragment, null, h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(roleNames, role.name)) }, "data-rolename": role.name }, h("span", { class: "type-icon", innerHTML: role.type === 'signer' ? iconSigner : role.type === 'cc' ? iconCC : iconApprover }), role.name, " ", h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingRoleDialog = role.name), "aria-role": "button" })), h("div", { class: "dropzone", "data-order": role.order + 0.5, "data-sequence": sequence })));
@@ -1,7 +1,7 @@
1
1
  import { getTemplate } from '@verdocs/js-sdk/Templates/Templates';
2
2
  import TemplateStore from './templateStore';
3
3
  const pendingNotifications = [];
4
- export const loadTemplate = async (endpoint, templateId) => {
4
+ export const loadTemplate = async (endpoint, templateId, forceReload = false) => {
5
5
  if (!templateId) {
6
6
  console.log(`[TEMPLATES] Missing required template ID`);
7
7
  throw new Error('Missing required template ID');
@@ -15,7 +15,7 @@ export const loadTemplate = async (endpoint, templateId) => {
15
15
  pendingNotifications.push({ resolve, reject });
16
16
  });
17
17
  }
18
- if (templateId === TemplateStore.templateId) {
18
+ if (templateId === TemplateStore.templateId && !forceReload) {
19
19
  return TemplateStore.template;
20
20
  }
21
21
  TemplateStore.loading = true;
@@ -2,7 +2,7 @@ import { g as getTemplate } from './Templates2.js';
2
2
  import { s as state } from './templateStore.js';
3
3
 
4
4
  const pendingNotifications = [];
5
- const loadTemplate = async (endpoint, templateId) => {
5
+ const loadTemplate = async (endpoint, templateId, forceReload = false) => {
6
6
  if (!templateId) {
7
7
  console.log(`[TEMPLATES] Missing required template ID`);
8
8
  throw new Error('Missing required template ID');
@@ -16,7 +16,7 @@ const loadTemplate = async (endpoint, templateId) => {
16
16
  pendingNotifications.push({ resolve, reject });
17
17
  });
18
18
  }
19
- if (templateId === state.templateId) {
19
+ if (templateId === state.templateId && !forceReload) {
20
20
  return state.template;
21
21
  }
22
22
  state.loading = true;
@@ -34,7 +34,7 @@ var createTemplateDocument = function (endpoint, templateId, file, onUploadProgr
34
34
  .then(function (r) { return r.data; });
35
35
  };
36
36
 
37
- const verdocsTemplateCreateCss = "verdocs-template-create{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:340px}verdocs-template-create form .upload-box{max-width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}";
37
+ const verdocsTemplateCreateCss = "verdocs-template-create{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{max-width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}";
38
38
 
39
39
  // import {ITemplate, ITemplateDocument} from '@verdocs/js-sdk/Templates/Types';
40
40
  // import {createPage} from '@verdocs/js-sdk/Templates/Pages';
@@ -62,7 +62,7 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class extends HTM
62
62
  }
63
63
  try {
64
64
  console.log(`[FIELDS] Loading template ${this.templateId}`, this.endpoint.session);
65
- await loadTemplate(this.endpoint, this.templateId);
65
+ await loadTemplate(this.endpoint, this.templateId, true);
66
66
  this.selectedRoleName = state.roleNames[0];
67
67
  console.log('Starting with role', this.selectedRoleName);
68
68
  }
@@ -61,7 +61,7 @@ const VerdocsTemplateRecipients$1 = /*@__PURE__*/ proxyCustomElement(class exten
61
61
  }
62
62
  try {
63
63
  console.log(`[RECIPIENTS] Loading template ${this.templateId}`, this.endpoint.session);
64
- await loadTemplate(this.endpoint, this.templateId);
64
+ await loadTemplate(this.endpoint, this.templateId, true);
65
65
  }
66
66
  catch (e) {
67
67
  console.log('[RECIPIENTS] Error loading template', e);
@@ -231,7 +231,7 @@ const VerdocsTemplateRecipients$1 = /*@__PURE__*/ proxyCustomElement(class exten
231
231
  }
232
232
  render() {
233
233
  const roleNames = state.template.roles.map(role => role.name);
234
- return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off", "data-r": this.forceRerender }, h("h5", null, "Recipients"), h("div", { class: "participants" }, h("div", { class: "left-line" }), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: startIcon }), h("div", { class: "row-recipients" }, h("div", { class: "sender" }, h("span", { class: "label" }, "Sender:"), " ", senderLabels[state.template.sender], ' ', h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingSenderDialog = true), "aria-role": "button" })))), h("div", { class: "row add-sequence", "data-sequence": 0 }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), this.sequences.map(sequence => (h(Fragment, null, h("div", { class: "row" }, h("div", { class: "icon", innerHTML: stepIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), state.template.roles
234
+ return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off", "data-r": this.forceRerender }, h("h5", null, "Roles"), h("div", { class: "participants" }, h("div", { class: "left-line" }), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: startIcon }), h("div", { class: "row-recipients" }, h("div", { class: "sender" }, h("span", { class: "label" }, "Sender:"), " ", senderLabels[state.template.sender], ' ', h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingSenderDialog = true), "aria-role": "button" })))), h("div", { class: "row add-sequence", "data-sequence": 0 }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), this.sequences.map(sequence => (h(Fragment, null, h("div", { class: "row" }, h("div", { class: "icon", innerHTML: stepIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), state.template.roles
235
235
  .filter(role => role.sequence === sequence)
236
236
  .map(role => {
237
237
  return (h(Fragment, null, h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(roleNames, role.name)) }, "data-rolename": role.name }, h("span", { class: "type-icon", innerHTML: role.type === 'signer' ? iconSigner : role.type === 'cc' ? iconCC : iconApprover }), role.name, " ", h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingRoleDialog = role.name), "aria-role": "button" })), h("div", { class: "dropzone", "data-order": role.order + 0.5, "data-sequence": sequence })));
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-02-11T01:05:52",
2
+ "timestamp": "2023-02-13T03:47:28",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "2.20.0",
@@ -2,7 +2,7 @@ import { g as getTemplate } from './Templates-8e4ab976.js';
2
2
  import { s as state } from './templateStore-fd4beaae.js';
3
3
 
4
4
  const pendingNotifications = [];
5
- const loadTemplate = async (endpoint, templateId) => {
5
+ const loadTemplate = async (endpoint, templateId, forceReload = false) => {
6
6
  if (!templateId) {
7
7
  console.log(`[TEMPLATES] Missing required template ID`);
8
8
  throw new Error('Missing required template ID');
@@ -16,7 +16,7 @@ const loadTemplate = async (endpoint, templateId) => {
16
16
  pendingNotifications.push({ resolve, reject });
17
17
  });
18
18
  }
19
- if (templateId === state.templateId) {
19
+ if (templateId === state.templateId && !forceReload) {
20
20
  return state.template;
21
21
  }
22
22
  state.loading = true;
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-f78d163d.js';
2
2
  import { V as VerdocsEndpoint } from './VerdocsEndpoint-7f17b088.js';
3
- import { l as loadTemplate } from './Templates-7595bdbf.js';
3
+ import { l as loadTemplate } from './Templates-a7530314.js';
4
4
  import { S as SDKError } from './errors-9b5498c8.js';
5
5
  import './Token-54690789.js';
6
6
  import './Templates-8e4ab976.js';
@@ -3,7 +3,7 @@ import { c as createPopper } from './popper-f860750c.js';
3
3
  import { u as updateField, d as deleteField } from './Fields-c82e6df3.js';
4
4
  import { V as VerdocsEndpoint } from './VerdocsEndpoint-7f17b088.js';
5
5
  import { s as state } from './templateStore-fd4beaae.js';
6
- import { l as loadTemplate } from './Templates-7595bdbf.js';
6
+ import { l as loadTemplate } from './Templates-a7530314.js';
7
7
  import { S as SDKError } from './errors-9b5498c8.js';
8
8
  import './Token-54690789.js';
9
9
  import './index-fd7b8a34.js';
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host } from './index-f
2
2
  import { V as VerdocsEndpoint } from './VerdocsEndpoint-7f17b088.js';
3
3
  import { r as renderDocumentField, a as getRoleIndex } from './utils-274e2e93.js';
4
4
  import { s as state } from './templateStore-fd4beaae.js';
5
- import { l as loadTemplate } from './Templates-7595bdbf.js';
5
+ import { l as loadTemplate } from './Templates-a7530314.js';
6
6
  import { S as SDKError } from './errors-9b5498c8.js';
7
7
  import './Token-54690789.js';
8
8
  import './Envelopes-130fd6ea.js';
@@ -3,7 +3,7 @@ import { V as VerdocsEndpoint } from './VerdocsEndpoint-7f17b088.js';
3
3
  import { i as isValidEmail, a as isValidPhone } from './Validators-f110bae2.js';
4
4
  import { g as getRGBA } from './Colors-1b298092.js';
5
5
  import { s as state } from './templateStore-fd4beaae.js';
6
- import { l as loadTemplate } from './Templates-7595bdbf.js';
6
+ import { l as loadTemplate } from './Templates-a7530314.js';
7
7
  import { a as getRoleIndex } from './utils-274e2e93.js';
8
8
  import { S as SDKError } from './errors-9b5498c8.js';
9
9
  import './Token-54690789.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-f78d163d.js';
2
2
  import { V as VerdocsEndpoint } from './VerdocsEndpoint-7f17b088.js';
3
3
  import { s as state } from './templateStore-fd4beaae.js';
4
- import { l as loadTemplate } from './Templates-7595bdbf.js';
4
+ import { l as loadTemplate } from './Templates-a7530314.js';
5
5
  import { S as SDKError } from './errors-9b5498c8.js';
6
6
  import './Token-54690789.js';
7
7
  import './index-fd7b8a34.js';
@@ -6,7 +6,7 @@ import { i as interact } from './interact.min-32c1c1e4.js';
6
6
  import { u as updateField, c as createField } from './Fields-c82e6df3.js';
7
7
  import { a as getRoleIndex, r as renderDocumentField, c as updateCssTransform, d as defaultWidth, e as defaultHeight } from './utils-274e2e93.js';
8
8
  import { s as state } from './templateStore-fd4beaae.js';
9
- import { l as loadTemplate } from './Templates-7595bdbf.js';
9
+ import { l as loadTemplate } from './Templates-a7530314.js';
10
10
  import './Token-54690789.js';
11
11
  import './Envelopes-130fd6ea.js';
12
12
  import './Files-70a192df.js';
@@ -42,7 +42,7 @@ var createTemplateDocument = function (endpoint, templateId, file, onUploadProgr
42
42
  .then(function (r) { return r.data; });
43
43
  };
44
44
 
45
- const verdocsTemplateCreateCss = "verdocs-template-create{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:340px}verdocs-template-create form .upload-box{max-width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}";
45
+ const verdocsTemplateCreateCss = "verdocs-template-create{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{max-width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}";
46
46
 
47
47
  // import {ITemplate, ITemplateDocument} from '@verdocs/js-sdk/Templates/Types';
48
48
  // import {createPage} from '@verdocs/js-sdk/Templates/Pages';
@@ -163,7 +163,7 @@ const VerdocsTemplateFields = class {
163
163
  }
164
164
  try {
165
165
  console.log(`[FIELDS] Loading template ${this.templateId}`, this.endpoint.session);
166
- await loadTemplate(this.endpoint, this.templateId);
166
+ await loadTemplate(this.endpoint, this.templateId, true);
167
167
  this.selectedRoleName = state.roleNames[0];
168
168
  console.log('Starting with role', this.selectedRoleName);
169
169
  }
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host } from './index-f
2
2
  import { u as updateTemplate } from './Templates-8e4ab976.js';
3
3
  import { V as VerdocsEndpoint } from './VerdocsEndpoint-7f17b088.js';
4
4
  import { s as state } from './templateStore-fd4beaae.js';
5
- import { l as loadTemplate } from './Templates-7595bdbf.js';
5
+ import { l as loadTemplate } from './Templates-a7530314.js';
6
6
  import { S as SDKError } from './errors-9b5498c8.js';
7
7
  import './Token-54690789.js';
8
8
  import './index-fd7b8a34.js';
@@ -4,7 +4,7 @@ import { u as updateRole, c as createRole } from './Roles-2488d047.js';
4
4
  import { V as VerdocsEndpoint, T as TemplateSenderTypes } from './VerdocsEndpoint-7f17b088.js';
5
5
  import { g as getRGBA } from './Colors-1b298092.js';
6
6
  import { s as state } from './templateStore-fd4beaae.js';
7
- import { l as loadTemplate } from './Templates-7595bdbf.js';
7
+ import { l as loadTemplate } from './Templates-a7530314.js';
8
8
  import { a as getRoleIndex } from './utils-274e2e93.js';
9
9
  import { S as SDKError } from './errors-9b5498c8.js';
10
10
  import './Token-54690789.js';
@@ -59,7 +59,7 @@ const VerdocsTemplateRecipients = class {
59
59
  }
60
60
  try {
61
61
  console.log(`[RECIPIENTS] Loading template ${this.templateId}`, this.endpoint.session);
62
- await loadTemplate(this.endpoint, this.templateId);
62
+ await loadTemplate(this.endpoint, this.templateId, true);
63
63
  }
64
64
  catch (e) {
65
65
  console.log('[RECIPIENTS] Error loading template', e);
@@ -229,7 +229,7 @@ const VerdocsTemplateRecipients = class {
229
229
  }
230
230
  render() {
231
231
  const roleNames = state.template.roles.map(role => role.name);
232
- return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off", "data-r": this.forceRerender }, h("h5", null, "Recipients"), h("div", { class: "participants" }, h("div", { class: "left-line" }), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: startIcon }), h("div", { class: "row-recipients" }, h("div", { class: "sender" }, h("span", { class: "label" }, "Sender:"), " ", senderLabels[state.template.sender], ' ', h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingSenderDialog = true), "aria-role": "button" })))), h("div", { class: "row add-sequence", "data-sequence": 0 }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), this.sequences.map(sequence => (h(Fragment, null, h("div", { class: "row" }, h("div", { class: "icon", innerHTML: stepIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), state.template.roles
232
+ return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off", "data-r": this.forceRerender }, h("h5", null, "Roles"), h("div", { class: "participants" }, h("div", { class: "left-line" }), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: startIcon }), h("div", { class: "row-recipients" }, h("div", { class: "sender" }, h("span", { class: "label" }, "Sender:"), " ", senderLabels[state.template.sender], ' ', h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingSenderDialog = true), "aria-role": "button" })))), h("div", { class: "row add-sequence", "data-sequence": 0 }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), this.sequences.map(sequence => (h(Fragment, null, h("div", { class: "row" }, h("div", { class: "icon", innerHTML: stepIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), state.template.roles
233
233
  .filter(role => role.sequence === sequence)
234
234
  .map(role => {
235
235
  return (h(Fragment, null, h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(roleNames, role.name)) }, "data-rolename": role.name }, h("span", { class: "type-icon", innerHTML: role.type === 'signer' ? iconSigner : role.type === 'cc' ? iconCC : iconApprover }), role.name, " ", h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingRoleDialog = role.name), "aria-role": "button" })), h("div", { class: "dropzone", "data-order": role.order + 0.5, "data-sequence": sequence })));
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-f78d163d.js';
2
2
  import { V as VerdocsEndpoint } from './VerdocsEndpoint-7f17b088.js';
3
3
  import { s as state } from './templateStore-fd4beaae.js';
4
- import { l as loadTemplate } from './Templates-7595bdbf.js';
4
+ import { l as loadTemplate } from './Templates-a7530314.js';
5
5
  import { S as SDKError } from './errors-9b5498c8.js';
6
6
  import './Token-54690789.js';
7
7
  import './index-fd7b8a34.js';
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host } from './index-f
2
2
  import { u as updateRole, d as deleteRole } from './Roles-2488d047.js';
3
3
  import { V as VerdocsEndpoint, T as TemplateSenderTypes } from './VerdocsEndpoint-7f17b088.js';
4
4
  import { s as state } from './templateStore-fd4beaae.js';
5
- import { l as loadTemplate } from './Templates-7595bdbf.js';
5
+ import { l as loadTemplate } from './Templates-a7530314.js';
6
6
  import { S as SDKError } from './errors-9b5498c8.js';
7
7
  import { u as updateTemplate } from './Templates-8e4ab976.js';
8
8
  import './Token-54690789.js';
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host } from './index-f
2
2
  import { u as updateTemplate } from './Templates-8e4ab976.js';
3
3
  import { V as VerdocsEndpoint } from './VerdocsEndpoint-7f17b088.js';
4
4
  import { s as state } from './templateStore-fd4beaae.js';
5
- import { l as loadTemplate } from './Templates-7595bdbf.js';
5
+ import { l as loadTemplate } from './Templates-a7530314.js';
6
6
  import { S as SDKError } from './errors-9b5498c8.js';
7
7
  import './Token-54690789.js';
8
8
  import './index-fd7b8a34.js';
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function i(e){try{s(r.next(e))}catch(e){o(e)}}function l(e){try{s(r["throw"](e))}catch(e){o(e)}}function s(e){e.done?n(e.value):a(e.value).then(i,l)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,a,o,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(t){return s([e,t])}}function s(i){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,a&&(o=i[0]&2?a["return"]:i[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,i[1])).done)return o;if(a=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;a=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=t.call(e,n)}catch(e){i=[6,e];a=0}finally{r=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{g as getTemplate}from"./Templates-8e4ab976.js";import{s as state}from"./templateStore-fd4beaae.js";var pendingNotifications=[];var loadTemplate=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var n,r;return __generator(this,(function(a){switch(a.label){case 0:if(!t){console.log("[TEMPLATES] Missing required template ID");throw new Error("Missing required template ID")}if(state.loading){return[2,new Promise((function(e,t){pendingNotifications.push({resolve:e,reject:t})}))]}if(t===state.templateId){return[2,state.template]}state.loading=true;state.template=null;a.label=1;case 1:a.trys.push([1,3,,4]);console.log("[TEMPLATES] Loading template ".concat(t));return[4,getTemplate(e,t,true)];case 2:n=a.sent();if(!n){console.log("[TEMPLATES] Unable to load template");return[2]}state.loading=false;state.template=n;state.templateId=t;pendingNotifications.forEach((function(e){return e.resolve(true)}));pendingNotifications.length=0;return[2,true];case 3:r=a.sent();console.log("[TEMPLATES] Error loading template",r);state.loading=false;pendingNotifications.forEach((function(e){return e.reject(r)}));pendingNotifications.length=0;throw r;case 4:return[2]}}))}))};export{loadTemplate as l};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,r){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function i(e){try{s(r.next(e))}catch(e){o(e)}}function l(e){try{s(r["throw"](e))}catch(e){o(e)}}function s(e){e.done?n(e.value):a(e.value).then(i,l)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,a,o,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(t){return s([e,t])}}function s(i){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,a&&(o=i[0]&2?a["return"]:i[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,i[1])).done)return o;if(a=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;a=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=t.call(e,n)}catch(e){i=[6,e];a=0}finally{r=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{g as getTemplate}from"./Templates-8e4ab976.js";import{s as state}from"./templateStore-fd4beaae.js";var pendingNotifications=[];var loadTemplate=function(e,t,n){if(n===void 0){n=false}return __awaiter(void 0,void 0,void 0,(function(){var r,a;return __generator(this,(function(o){switch(o.label){case 0:if(!t){console.log("[TEMPLATES] Missing required template ID");throw new Error("Missing required template ID")}if(state.loading){return[2,new Promise((function(e,t){pendingNotifications.push({resolve:e,reject:t})}))]}if(t===state.templateId&&!n){return[2,state.template]}state.loading=true;state.template=null;o.label=1;case 1:o.trys.push([1,3,,4]);console.log("[TEMPLATES] Loading template ".concat(t));return[4,getTemplate(e,t,true)];case 2:r=o.sent();if(!r){console.log("[TEMPLATES] Unable to load template");return[2]}state.loading=false;state.template=r;state.templateId=t;pendingNotifications.forEach((function(e){return e.resolve(true)}));pendingNotifications.length=0;return[2,true];case 3:a=o.sent();console.log("[TEMPLATES] Error loading template",a);state.loading=false;pendingNotifications.forEach((function(e){return e.reject(a)}));pendingNotifications.length=0;throw a;case 4:return[2]}}))}))};export{loadTemplate as l};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function i(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?n(e.value):r(e.value).then(i,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,r,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(e){return function(t){return l([e,t])}}function l(i){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,r&&(s=i[0]&2?r["return"]:i[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;if(r=0,s)i=[i[0]&2,s.value];switch(i[0]){case 0:case 1:s=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;r=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!s||i[1]>s[0]&&i[1]<s[3])){n.label=i[1];break}if(i[0]===6&&n.label<s[1]){n.label=s[1];s=i;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(i);break}if(s[2])n.ops.pop();n.trys.pop();continue}i=t.call(e,n)}catch(e){i=[6,e];r=0}finally{o=s=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-f78d163d.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-7f17b088.js";import{l as loadTemplate}from"./Templates-7595bdbf.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./Token-54690789.js";import"./Templates-8e4ab976.js";import"./templateStore-fd4beaae.js";import"./index-fd7b8a34.js";import"./Primitives-054bc6e5.js";var verdocsBuildCss='verdocs-build{display:-ms-flexbox;display:flex;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}';var VerdocsBuild=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.fields=[];this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.step="create";this.pdfUrl=null;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,o;return __generator(this,(function(r){switch(r.label){case 0:this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[BUILD] No template ID specified, showing upload option");this.step="create";return[2]}r.label=1;case 1:r.trys.push([1,3,,4]);console.log("[BUILD] Loading template ".concat(this.templateId));return[4,loadTemplate(this.endpoint,this.templateId)];case 2:r.sent();this.step="fields";return[3,4];case 3:o=r.sent();console.log("[BUILD] Error loading template",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(n=o.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handleCancel=function(e){console.log("Cancel",e.detail);this.step=""};e.prototype.handleTemplateCreated=function(e){console.log("Created",e.detail);this.step="fields"};e.prototype.handlePropertiesUpdated=function(e){console.log("updated",e.detail);this.step="recipients"};e.prototype.handleRecipientsUpdated=function(e){console.log("updated",e.detail);this.step="fields"};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return h(Host,null,this.step==="create"&&h("verdocs-template-create",{onCancel:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleTemplateCreated(t)}}),this.step==="fields"&&h("verdocs-template-fields",{onCancel:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleCancel(t)}}))};return e}();VerdocsBuild.style=verdocsBuildCss;export{VerdocsBuild as verdocs_build};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function i(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?n(e.value):r(e.value).then(i,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,r,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(e){return function(t){return l([e,t])}}function l(i){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,r&&(s=i[0]&2?r["return"]:i[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;if(r=0,s)i=[i[0]&2,s.value];switch(i[0]){case 0:case 1:s=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;r=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!s||i[1]>s[0]&&i[1]<s[3])){n.label=i[1];break}if(i[0]===6&&n.label<s[1]){n.label=s[1];s=i;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(i);break}if(s[2])n.ops.pop();n.trys.pop();continue}i=t.call(e,n)}catch(e){i=[6,e];r=0}finally{o=s=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-f78d163d.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-7f17b088.js";import{l as loadTemplate}from"./Templates-a7530314.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./Token-54690789.js";import"./Templates-8e4ab976.js";import"./templateStore-fd4beaae.js";import"./index-fd7b8a34.js";import"./Primitives-054bc6e5.js";var verdocsBuildCss='verdocs-build{display:-ms-flexbox;display:flex;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}';var VerdocsBuild=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.fields=[];this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.step="create";this.pdfUrl=null;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,o;return __generator(this,(function(r){switch(r.label){case 0:this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[BUILD] No template ID specified, showing upload option");this.step="create";return[2]}r.label=1;case 1:r.trys.push([1,3,,4]);console.log("[BUILD] Loading template ".concat(this.templateId));return[4,loadTemplate(this.endpoint,this.templateId)];case 2:r.sent();this.step="fields";return[3,4];case 3:o=r.sent();console.log("[BUILD] Error loading template",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(n=o.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handleCancel=function(e){console.log("Cancel",e.detail);this.step=""};e.prototype.handleTemplateCreated=function(e){console.log("Created",e.detail);this.step="fields"};e.prototype.handlePropertiesUpdated=function(e){console.log("updated",e.detail);this.step="recipients"};e.prototype.handleRecipientsUpdated=function(e){console.log("updated",e.detail);this.step="fields"};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return h(Host,null,this.step==="create"&&h("verdocs-template-create",{onCancel:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleTemplateCreated(t)}}),this.step==="fields"&&h("verdocs-template-fields",{onCancel:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleCancel(t)}}))};return e}();VerdocsBuild.style=verdocsBuildCss;export{VerdocsBuild as verdocs_build};