@verdocs/web-sdk 1.14.1 → 1.14.3

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 (25) hide show
  1. package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +3 -3
  2. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +3 -3
  3. package/dist/collection/components/envelopes/verdocs-envelope-recipient-summary/verdocs-envelope-recipient-summary.js +27 -12
  4. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.css +4 -4
  5. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +10 -5
  6. package/dist/components/verdocs-envelope-recipient-summary2.js +3 -3
  7. package/dist/components/verdocs-envelope-sidebar.js +3 -3
  8. package/dist/docs.json +5 -5
  9. package/dist/esm/verdocs-envelope-recipient-summary.entry.js +3 -3
  10. package/dist/esm/verdocs-envelope-sidebar.entry.js +3 -3
  11. package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
  12. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  13. package/dist/types/components/envelopes/verdocs-envelope-recipient-summary/verdocs-envelope-recipient-summary.d.ts +9 -3
  14. package/dist/types/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts +3 -1
  15. package/dist/types/components.d.ts +4 -4
  16. package/dist/verdocs-web-sdk/p-0251ca3a.entry.js +1 -0
  17. package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
  18. package/dist/verdocs-web-sdk/{p-5ed28056.system.entry.js → p-483ded0c.system.entry.js} +1 -1
  19. package/dist/verdocs-web-sdk/{p-5c21aaa3.entry.js → p-c36af1a6.entry.js} +1 -1
  20. package/dist/verdocs-web-sdk/p-f6009651.system.entry.js +1 -0
  21. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  22. package/package.json +1 -1
  23. package/dist/custom-elements.json +0 -1616
  24. package/dist/verdocs-web-sdk/p-18375932.system.entry.js +0 -1
  25. package/dist/verdocs-web-sdk/p-805d5545.entry.js +0 -1
@@ -140,17 +140,17 @@ const VerdocsEnvelopeRecipientSummary = class {
140
140
  handleAnother(e) {
141
141
  var _a;
142
142
  e.preventDefault();
143
- (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit();
143
+ (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
144
144
  }
145
145
  handleView(e) {
146
146
  var _a;
147
147
  e.preventDefault();
148
- (_a = this.view) === null || _a === void 0 ? void 0 : _a.emit();
148
+ (_a = this.view) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
149
149
  }
150
150
  handleDone(e) {
151
151
  var _a;
152
152
  e.preventDefault();
153
- (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit();
153
+ (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
154
154
  }
155
155
  copyLink(link) {
156
156
  navigator.clipboard
@@ -11,7 +11,7 @@ const Toast = require('./Toast-26bf925e.js');
11
11
  const errors = require('./errors-0396da3d.js');
12
12
  const index$1 = require('./index-6528b430.js');
13
13
 
14
- const verdocsEnvelopeSidebarCss = "verdocs-envelope-sidebar{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}";
14
+ const verdocsEnvelopeSidebarCss = "verdocs-envelope-sidebar{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}";
15
15
 
16
16
  const InformationCircle = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>`;
17
17
  const Users = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>`;
@@ -231,7 +231,7 @@ const VerdocsEnvelopeSidebar = class {
231
231
  const isEnvelopeOwner = Permissions.userIsEnvelopeOwner(session, this.envelope);
232
232
  const historyEntries = this.prepareHistoryEntries();
233
233
  console.log('e', this.envelope);
234
- return (index.h(index.Host, { class: this.panelOpen ? 'open' : '' }, index.h("div", { class: "buttons" }, index.h("button", { class: this.activeTab === 1 ? 'active' : '', onClick: () => this.setTab(1), innerHTML: InformationCircle }), index.h("button", { class: this.activeTab === 2 ? 'active' : '', onClick: () => this.setTab(2), innerHTML: Users }), index.h("button", { class: this.activeTab === 3 ? 'active' : '', onClick: () => this.setTab(3), innerHTML: ClipboardDocuments })), this.activeTab === 1 && (index.h("div", { class: "content" }, index.h("div", { class: "title" }, "Details"), index.h("div", { class: "label" }, "Envelope ID"), index.h("div", { class: "value" }, this.envelope.id), index.h("div", { class: "label" }, "Date Created"), index.h("div", { class: "value" }, index$1.format(new Date(this.envelope.created_at), 'PP pp')), index.h("div", { class: "label" }, "Last Modified"), index.h("div", { class: "value" }, index$1.format(new Date(this.envelope.updated_at), 'PP pp')), index.h("div", { class: "label" }, "Status"), index.h("div", { class: "value" }, this.envelope.status), index.h("div", { class: "label" }, "Verdoc Owner ID"), index.h("div", { class: "value" }, this.envelope.profile_id), index.h("div", { class: "label" }, "Verdoc Owner Name"), index.h("div", { class: "value" }, (_a = this.envelope.profile) === null || _a === void 0 ? void 0 :
234
+ return (index.h(index.Host, { class: this.panelOpen ? 'open' : '' }, index.h("div", { class: "side-buttons" }, index.h("button", { class: this.activeTab === 1 ? 'active' : '', onClick: () => this.setTab(1), innerHTML: InformationCircle }), index.h("button", { class: this.activeTab === 2 ? 'active' : '', onClick: () => this.setTab(2), innerHTML: Users }), index.h("button", { class: this.activeTab === 3 ? 'active' : '', onClick: () => this.setTab(3), innerHTML: ClipboardDocuments })), this.activeTab === 1 && (index.h("div", { class: "content" }, index.h("div", { class: "title" }, "Details"), index.h("div", { class: "label" }, "Envelope ID"), index.h("div", { class: "value" }, this.envelope.id), index.h("div", { class: "label" }, "Date Created"), index.h("div", { class: "value" }, index$1.format(new Date(this.envelope.created_at), 'PP pp')), index.h("div", { class: "label" }, "Last Modified"), index.h("div", { class: "value" }, index$1.format(new Date(this.envelope.updated_at), 'PP pp')), index.h("div", { class: "label" }, "Status"), index.h("div", { class: "value" }, this.envelope.status), index.h("div", { class: "label" }, "Verdoc Owner ID"), index.h("div", { class: "value" }, this.envelope.profile_id), index.h("div", { class: "label" }, "Verdoc Owner Name"), index.h("div", { class: "value" }, (_a = this.envelope.profile) === null || _a === void 0 ? void 0 :
235
235
  _a.first_name, " ", (_b = this.envelope.profile) === null || _b === void 0 ? void 0 :
236
236
  _b.last_name), index.h("div", { class: "label" }, "Verdoc Owner Email"), index.h("div", { class: "value" }, (_c = this.envelope.profile) === null || _c === void 0 ? void 0 : _c.email))), this.activeTab === 2 && (index.h("div", { class: "content" }, index.h("div", { class: "title" }, "Recipients"), this.sortedRecipients.map((recipient, index$1) => (index.h("div", { class: "recipient-detail" }, index.h("div", { class: "recipient-header" }, index.h("div", { class: "recipient-number" }, index$1 + 1), index.h("div", { class: "recipient-type" }, recipient.role_name), index.h("div", { class: { 'recipient-status': true, [recipient.status]: true } }, recipient.status), isEnvelopeOwner && (index.h("verdocs-dropdown", { onOptionSelected: item => this.handleRecipientAction(recipient, item.detail.id), options: [
237
237
  { id: 'reminder', label: 'Send Reminder', disabled: !this.canResendRecipient(recipient) },
@@ -241,7 +241,7 @@ const VerdocsEnvelopeSidebar = class {
241
241
  ] }))), index.h("dic", { class: "recipient-content" }, index.h("div", { class: "recipient-name" }, recipient.full_name), index.h("div", { class: "recipient-name" }, recipient.email), index.h("div", { class: "recipient-name" }, recipient.phone))))), isEnvelopeOwner && index.h("verdocs-button", { class: "manage-recipients-button", variant: "standard", label: "Manage Recipients", onClick: () => (this.showManageDialog = true) }))), this.activeTab === 3 && (index.h("div", { class: "content" }, index.h("div", { class: "title" }, "History"), historyEntries.map(entry => (index.h("div", { class: "history-entry" }, index.h("div", { class: "activity-icon", innerHTML: ActivityIcons[entry.icon] || entry.icon }), index.h("div", { class: "activity-details" }, index.h("div", { class: "activity-text" }, entry.message), index.h("div", { class: "activity-date" }, index$1.format(entry.date, 'PP pp')))))))), this.showManageDialog && (index.h("verdocs-envelope-recipient-summary", { envelopeId: this.envelopeId, canView: false, onAnother: () => {
242
242
  var _a;
243
243
  this.showManageDialog = false;
244
- (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit();
244
+ (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.envelope });
245
245
  }, onNext: () => {
246
246
  this.showManageDialog = false;
247
247
  } }))));
@@ -58,17 +58,17 @@ export class VerdocsEnvelopeRecipientSummary {
58
58
  handleAnother(e) {
59
59
  var _a;
60
60
  e.preventDefault();
61
- (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit();
61
+ (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
62
62
  }
63
63
  handleView(e) {
64
64
  var _a;
65
65
  e.preventDefault();
66
- (_a = this.view) === null || _a === void 0 ? void 0 : _a.emit();
66
+ (_a = this.view) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
67
67
  }
68
68
  handleDone(e) {
69
69
  var _a;
70
70
  e.preventDefault();
71
- (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit();
71
+ (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
72
72
  }
73
73
  copyLink(link) {
74
74
  navigator.clipboard
@@ -252,9 +252,14 @@ export class VerdocsEnvelopeRecipientSummary {
252
252
  "text": "Event fired when the user clicks Send Another to proceed. It is up to the host application\nto redirect the user to the appropriate next workflow step."
253
253
  },
254
254
  "complexType": {
255
- "original": "any",
256
- "resolved": "any",
257
- "references": {}
255
+ "original": "{envelope: IEnvelope}",
256
+ "resolved": "{ envelope: IEnvelope; }",
257
+ "references": {
258
+ "IEnvelope": {
259
+ "location": "import",
260
+ "path": "@verdocs/js-sdk/Envelopes/Types"
261
+ }
262
+ }
258
263
  }
259
264
  }, {
260
265
  "method": "view",
@@ -267,9 +272,14 @@ export class VerdocsEnvelopeRecipientSummary {
267
272
  "text": "Event fired when the user clicks Send Another to proceed. It is up to the host application\nto redirect the user to the appropriate next workflow step."
268
273
  },
269
274
  "complexType": {
270
- "original": "any",
271
- "resolved": "any",
272
- "references": {}
275
+ "original": "{envelope: IEnvelope}",
276
+ "resolved": "{ envelope: IEnvelope; }",
277
+ "references": {
278
+ "IEnvelope": {
279
+ "location": "import",
280
+ "path": "@verdocs/js-sdk/Envelopes/Types"
281
+ }
282
+ }
273
283
  }
274
284
  }, {
275
285
  "method": "next",
@@ -282,9 +292,14 @@ export class VerdocsEnvelopeRecipientSummary {
282
292
  "text": "Event fired when the user clicks Done to proceed. It is up to the host application\nto redirect the user to the appropriate next workflow step."
283
293
  },
284
294
  "complexType": {
285
- "original": "any",
286
- "resolved": "any",
287
- "references": {}
295
+ "original": "{envelope: IEnvelope}",
296
+ "resolved": "{ envelope: IEnvelope; }",
297
+ "references": {
298
+ "IEnvelope": {
299
+ "location": "import",
300
+ "path": "@verdocs/js-sdk/Envelopes/Types"
301
+ }
302
+ }
288
303
  }
289
304
  }, {
290
305
  "method": "sdkError",
@@ -13,12 +13,12 @@ verdocs-envelope-sidebar.open {
13
13
  flex: 0 0 400px;
14
14
  width: 400px;
15
15
  }
16
- verdocs-envelope-sidebar .buttons {
16
+ verdocs-envelope-sidebar .side-buttons {
17
17
  flex-direction: column;
18
18
  flex: 0 0 56px;
19
19
  display: flex;
20
20
  }
21
- verdocs-envelope-sidebar .buttons button {
21
+ verdocs-envelope-sidebar .side-buttons button {
22
22
  height: 50px;
23
23
  outline: none;
24
24
  border: none;
@@ -26,10 +26,10 @@ verdocs-envelope-sidebar .buttons button {
26
26
  background: none;
27
27
  width: 100%;
28
28
  }
29
- verdocs-envelope-sidebar .buttons button.active {
29
+ verdocs-envelope-sidebar .side-buttons button.active {
30
30
  border-left: 2px solid #50bd80;
31
31
  }
32
- verdocs-envelope-sidebar .buttons button svg {
32
+ verdocs-envelope-sidebar .side-buttons button svg {
33
33
  color: white;
34
34
  width: 24px;
35
35
  height: 24px;
@@ -222,7 +222,7 @@ export class VerdocsEnvelopeSidebar {
222
222
  const isEnvelopeOwner = userIsEnvelopeOwner(session, this.envelope);
223
223
  const historyEntries = this.prepareHistoryEntries();
224
224
  console.log('e', this.envelope);
225
- return (h(Host, { class: this.panelOpen ? 'open' : '' }, h("div", { class: "buttons" }, h("button", { class: this.activeTab === 1 ? 'active' : '', onClick: () => this.setTab(1), innerHTML: InformationCircle }), h("button", { class: this.activeTab === 2 ? 'active' : '', onClick: () => this.setTab(2), innerHTML: Users }), h("button", { class: this.activeTab === 3 ? 'active' : '', onClick: () => this.setTab(3), innerHTML: ClipboardDocuments })), this.activeTab === 1 && (h("div", { class: "content" }, h("div", { class: "title" }, "Details"), h("div", { class: "label" }, "Envelope ID"), h("div", { class: "value" }, this.envelope.id), h("div", { class: "label" }, "Date Created"), h("div", { class: "value" }, format(new Date(this.envelope.created_at), 'PP pp')), h("div", { class: "label" }, "Last Modified"), h("div", { class: "value" }, format(new Date(this.envelope.updated_at), 'PP pp')), h("div", { class: "label" }, "Status"), h("div", { class: "value" }, this.envelope.status), h("div", { class: "label" }, "Verdoc Owner ID"), h("div", { class: "value" }, this.envelope.profile_id), h("div", { class: "label" }, "Verdoc Owner Name"), h("div", { class: "value" }, (_a = this.envelope.profile) === null || _a === void 0 ? void 0 :
225
+ return (h(Host, { class: this.panelOpen ? 'open' : '' }, h("div", { class: "side-buttons" }, h("button", { class: this.activeTab === 1 ? 'active' : '', onClick: () => this.setTab(1), innerHTML: InformationCircle }), h("button", { class: this.activeTab === 2 ? 'active' : '', onClick: () => this.setTab(2), innerHTML: Users }), h("button", { class: this.activeTab === 3 ? 'active' : '', onClick: () => this.setTab(3), innerHTML: ClipboardDocuments })), this.activeTab === 1 && (h("div", { class: "content" }, h("div", { class: "title" }, "Details"), h("div", { class: "label" }, "Envelope ID"), h("div", { class: "value" }, this.envelope.id), h("div", { class: "label" }, "Date Created"), h("div", { class: "value" }, format(new Date(this.envelope.created_at), 'PP pp')), h("div", { class: "label" }, "Last Modified"), h("div", { class: "value" }, format(new Date(this.envelope.updated_at), 'PP pp')), h("div", { class: "label" }, "Status"), h("div", { class: "value" }, this.envelope.status), h("div", { class: "label" }, "Verdoc Owner ID"), h("div", { class: "value" }, this.envelope.profile_id), h("div", { class: "label" }, "Verdoc Owner Name"), h("div", { class: "value" }, (_a = this.envelope.profile) === null || _a === void 0 ? void 0 :
226
226
  _a.first_name, " ", (_b = this.envelope.profile) === null || _b === void 0 ? void 0 :
227
227
  _b.last_name), h("div", { class: "label" }, "Verdoc Owner Email"), h("div", { class: "value" }, (_c = this.envelope.profile) === null || _c === void 0 ? void 0 : _c.email))), this.activeTab === 2 && (h("div", { class: "content" }, h("div", { class: "title" }, "Recipients"), this.sortedRecipients.map((recipient, index) => (h("div", { class: "recipient-detail" }, h("div", { class: "recipient-header" }, h("div", { class: "recipient-number" }, index + 1), h("div", { class: "recipient-type" }, recipient.role_name), h("div", { class: { 'recipient-status': true, [recipient.status]: true } }, recipient.status), isEnvelopeOwner && (h("verdocs-dropdown", { onOptionSelected: item => this.handleRecipientAction(recipient, item.detail.id), options: [
228
228
  { id: 'reminder', label: 'Send Reminder', disabled: !this.canResendRecipient(recipient) },
@@ -232,7 +232,7 @@ export class VerdocsEnvelopeSidebar {
232
232
  ] }))), h("dic", { class: "recipient-content" }, h("div", { class: "recipient-name" }, recipient.full_name), h("div", { class: "recipient-name" }, recipient.email), h("div", { class: "recipient-name" }, recipient.phone))))), isEnvelopeOwner && h("verdocs-button", { class: "manage-recipients-button", variant: "standard", label: "Manage Recipients", onClick: () => (this.showManageDialog = true) }))), this.activeTab === 3 && (h("div", { class: "content" }, h("div", { class: "title" }, "History"), historyEntries.map(entry => (h("div", { class: "history-entry" }, h("div", { class: "activity-icon", innerHTML: ActivityIcons[entry.icon] || entry.icon }), h("div", { class: "activity-details" }, h("div", { class: "activity-text" }, entry.message), h("div", { class: "activity-date" }, format(entry.date, 'PP pp')))))))), this.showManageDialog && (h("verdocs-envelope-recipient-summary", { envelopeId: this.envelopeId, canView: false, onAnother: () => {
233
233
  var _a;
234
234
  this.showManageDialog = false;
235
- (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit();
235
+ (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.envelope });
236
236
  }, onNext: () => {
237
237
  this.showManageDialog = false;
238
238
  } }))));
@@ -372,9 +372,14 @@ export class VerdocsEnvelopeSidebar {
372
372
  "text": "Event fired when the user clicks Send Another in the Manage Recipients dialog. It is up to the host application\nto redirect the user to the appropriate next workflow step."
373
373
  },
374
374
  "complexType": {
375
- "original": "any",
376
- "resolved": "any",
377
- "references": {}
375
+ "original": "{envelope: IEnvelope}",
376
+ "resolved": "{ envelope: IEnvelope; }",
377
+ "references": {
378
+ "IEnvelope": {
379
+ "location": "import",
380
+ "path": "@verdocs/js-sdk/Envelopes/Types"
381
+ }
382
+ }
378
383
  }
379
384
  }];
380
385
  }
@@ -137,17 +137,17 @@ const VerdocsEnvelopeRecipientSummary = /*@__PURE__*/ proxyCustomElement(class e
137
137
  handleAnother(e) {
138
138
  var _a;
139
139
  e.preventDefault();
140
- (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit();
140
+ (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
141
141
  }
142
142
  handleView(e) {
143
143
  var _a;
144
144
  e.preventDefault();
145
- (_a = this.view) === null || _a === void 0 ? void 0 : _a.emit();
145
+ (_a = this.view) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
146
146
  }
147
147
  handleDone(e) {
148
148
  var _a;
149
149
  e.preventDefault();
150
- (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit();
150
+ (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
151
151
  }
152
152
  copyLink(link) {
153
153
  navigator.clipboard
@@ -10,7 +10,7 @@ import { d as defineCustomElement$3 } from './verdocs-dropdown2.js';
10
10
  import { d as defineCustomElement$2 } from './verdocs-envelope-recipient-summary2.js';
11
11
  import { f as format } from './index2.js';
12
12
 
13
- const verdocsEnvelopeSidebarCss = "verdocs-envelope-sidebar{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}";
13
+ const verdocsEnvelopeSidebarCss = "verdocs-envelope-sidebar{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}";
14
14
 
15
15
  const InformationCircle = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>`;
16
16
  const Users = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>`;
@@ -231,7 +231,7 @@ const VerdocsEnvelopeSidebar$1 = /*@__PURE__*/ proxyCustomElement(class extends
231
231
  const isEnvelopeOwner = userIsEnvelopeOwner(session, this.envelope);
232
232
  const historyEntries = this.prepareHistoryEntries();
233
233
  console.log('e', this.envelope);
234
- return (h(Host, { class: this.panelOpen ? 'open' : '' }, h("div", { class: "buttons" }, h("button", { class: this.activeTab === 1 ? 'active' : '', onClick: () => this.setTab(1), innerHTML: InformationCircle }), h("button", { class: this.activeTab === 2 ? 'active' : '', onClick: () => this.setTab(2), innerHTML: Users }), h("button", { class: this.activeTab === 3 ? 'active' : '', onClick: () => this.setTab(3), innerHTML: ClipboardDocuments })), this.activeTab === 1 && (h("div", { class: "content" }, h("div", { class: "title" }, "Details"), h("div", { class: "label" }, "Envelope ID"), h("div", { class: "value" }, this.envelope.id), h("div", { class: "label" }, "Date Created"), h("div", { class: "value" }, format(new Date(this.envelope.created_at), 'PP pp')), h("div", { class: "label" }, "Last Modified"), h("div", { class: "value" }, format(new Date(this.envelope.updated_at), 'PP pp')), h("div", { class: "label" }, "Status"), h("div", { class: "value" }, this.envelope.status), h("div", { class: "label" }, "Verdoc Owner ID"), h("div", { class: "value" }, this.envelope.profile_id), h("div", { class: "label" }, "Verdoc Owner Name"), h("div", { class: "value" }, (_a = this.envelope.profile) === null || _a === void 0 ? void 0 :
234
+ return (h(Host, { class: this.panelOpen ? 'open' : '' }, h("div", { class: "side-buttons" }, h("button", { class: this.activeTab === 1 ? 'active' : '', onClick: () => this.setTab(1), innerHTML: InformationCircle }), h("button", { class: this.activeTab === 2 ? 'active' : '', onClick: () => this.setTab(2), innerHTML: Users }), h("button", { class: this.activeTab === 3 ? 'active' : '', onClick: () => this.setTab(3), innerHTML: ClipboardDocuments })), this.activeTab === 1 && (h("div", { class: "content" }, h("div", { class: "title" }, "Details"), h("div", { class: "label" }, "Envelope ID"), h("div", { class: "value" }, this.envelope.id), h("div", { class: "label" }, "Date Created"), h("div", { class: "value" }, format(new Date(this.envelope.created_at), 'PP pp')), h("div", { class: "label" }, "Last Modified"), h("div", { class: "value" }, format(new Date(this.envelope.updated_at), 'PP pp')), h("div", { class: "label" }, "Status"), h("div", { class: "value" }, this.envelope.status), h("div", { class: "label" }, "Verdoc Owner ID"), h("div", { class: "value" }, this.envelope.profile_id), h("div", { class: "label" }, "Verdoc Owner Name"), h("div", { class: "value" }, (_a = this.envelope.profile) === null || _a === void 0 ? void 0 :
235
235
  _a.first_name, " ", (_b = this.envelope.profile) === null || _b === void 0 ? void 0 :
236
236
  _b.last_name), h("div", { class: "label" }, "Verdoc Owner Email"), h("div", { class: "value" }, (_c = this.envelope.profile) === null || _c === void 0 ? void 0 : _c.email))), this.activeTab === 2 && (h("div", { class: "content" }, h("div", { class: "title" }, "Recipients"), this.sortedRecipients.map((recipient, index) => (h("div", { class: "recipient-detail" }, h("div", { class: "recipient-header" }, h("div", { class: "recipient-number" }, index + 1), h("div", { class: "recipient-type" }, recipient.role_name), h("div", { class: { 'recipient-status': true, [recipient.status]: true } }, recipient.status), isEnvelopeOwner && (h("verdocs-dropdown", { onOptionSelected: item => this.handleRecipientAction(recipient, item.detail.id), options: [
237
237
  { id: 'reminder', label: 'Send Reminder', disabled: !this.canResendRecipient(recipient) },
@@ -241,7 +241,7 @@ const VerdocsEnvelopeSidebar$1 = /*@__PURE__*/ proxyCustomElement(class extends
241
241
  ] }))), h("dic", { class: "recipient-content" }, h("div", { class: "recipient-name" }, recipient.full_name), h("div", { class: "recipient-name" }, recipient.email), h("div", { class: "recipient-name" }, recipient.phone))))), isEnvelopeOwner && h("verdocs-button", { class: "manage-recipients-button", variant: "standard", label: "Manage Recipients", onClick: () => (this.showManageDialog = true) }))), this.activeTab === 3 && (h("div", { class: "content" }, h("div", { class: "title" }, "History"), historyEntries.map(entry => (h("div", { class: "history-entry" }, h("div", { class: "activity-icon", innerHTML: ActivityIcons[entry.icon] || entry.icon }), h("div", { class: "activity-details" }, h("div", { class: "activity-text" }, entry.message), h("div", { class: "activity-date" }, format(entry.date, 'PP pp')))))))), this.showManageDialog && (h("verdocs-envelope-recipient-summary", { envelopeId: this.envelopeId, canView: false, onAnother: () => {
242
242
  var _a;
243
243
  this.showManageDialog = false;
244
- (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit();
244
+ (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.envelope });
245
245
  }, onNext: () => {
246
246
  this.showManageDialog = false;
247
247
  } }))));
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-05-10T16:24:37",
2
+ "timestamp": "2023-05-10T17:55:36",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "2.20.0",
@@ -1436,7 +1436,7 @@
1436
1436
  "events": [
1437
1437
  {
1438
1438
  "event": "another",
1439
- "detail": "any",
1439
+ "detail": "{ envelope: IEnvelope; }",
1440
1440
  "bubbles": true,
1441
1441
  "cancelable": true,
1442
1442
  "composed": true,
@@ -1445,7 +1445,7 @@
1445
1445
  },
1446
1446
  {
1447
1447
  "event": "next",
1448
- "detail": "any",
1448
+ "detail": "{ envelope: IEnvelope; }",
1449
1449
  "bubbles": true,
1450
1450
  "cancelable": true,
1451
1451
  "composed": true,
@@ -1463,7 +1463,7 @@
1463
1463
  },
1464
1464
  {
1465
1465
  "event": "view",
1466
- "detail": "any",
1466
+ "detail": "{ envelope: IEnvelope; }",
1467
1467
  "bubbles": true,
1468
1468
  "cancelable": true,
1469
1469
  "composed": true,
@@ -1536,7 +1536,7 @@
1536
1536
  "events": [
1537
1537
  {
1538
1538
  "event": "another",
1539
- "detail": "any",
1539
+ "detail": "{ envelope: IEnvelope; }",
1540
1540
  "bubbles": true,
1541
1541
  "cancelable": true,
1542
1542
  "composed": true,
@@ -136,17 +136,17 @@ const VerdocsEnvelopeRecipientSummary = class {
136
136
  handleAnother(e) {
137
137
  var _a;
138
138
  e.preventDefault();
139
- (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit();
139
+ (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
140
140
  }
141
141
  handleView(e) {
142
142
  var _a;
143
143
  e.preventDefault();
144
- (_a = this.view) === null || _a === void 0 ? void 0 : _a.emit();
144
+ (_a = this.view) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
145
145
  }
146
146
  handleDone(e) {
147
147
  var _a;
148
148
  e.preventDefault();
149
- (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit();
149
+ (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.store.state });
150
150
  }
151
151
  copyLink(link) {
152
152
  navigator.clipboard
@@ -7,7 +7,7 @@ import { V as VerdocsToast } from './Toast-fbda07e3.js';
7
7
  import { S as SDKError } from './errors-9b5498c8.js';
8
8
  import { f as format } from './index-d264c496.js';
9
9
 
10
- const verdocsEnvelopeSidebarCss = "verdocs-envelope-sidebar{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}";
10
+ const verdocsEnvelopeSidebarCss = "verdocs-envelope-sidebar{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}";
11
11
 
12
12
  const InformationCircle = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>`;
13
13
  const Users = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>`;
@@ -227,7 +227,7 @@ const VerdocsEnvelopeSidebar = class {
227
227
  const isEnvelopeOwner = userIsEnvelopeOwner(session, this.envelope);
228
228
  const historyEntries = this.prepareHistoryEntries();
229
229
  console.log('e', this.envelope);
230
- return (h(Host, { class: this.panelOpen ? 'open' : '' }, h("div", { class: "buttons" }, h("button", { class: this.activeTab === 1 ? 'active' : '', onClick: () => this.setTab(1), innerHTML: InformationCircle }), h("button", { class: this.activeTab === 2 ? 'active' : '', onClick: () => this.setTab(2), innerHTML: Users }), h("button", { class: this.activeTab === 3 ? 'active' : '', onClick: () => this.setTab(3), innerHTML: ClipboardDocuments })), this.activeTab === 1 && (h("div", { class: "content" }, h("div", { class: "title" }, "Details"), h("div", { class: "label" }, "Envelope ID"), h("div", { class: "value" }, this.envelope.id), h("div", { class: "label" }, "Date Created"), h("div", { class: "value" }, format(new Date(this.envelope.created_at), 'PP pp')), h("div", { class: "label" }, "Last Modified"), h("div", { class: "value" }, format(new Date(this.envelope.updated_at), 'PP pp')), h("div", { class: "label" }, "Status"), h("div", { class: "value" }, this.envelope.status), h("div", { class: "label" }, "Verdoc Owner ID"), h("div", { class: "value" }, this.envelope.profile_id), h("div", { class: "label" }, "Verdoc Owner Name"), h("div", { class: "value" }, (_a = this.envelope.profile) === null || _a === void 0 ? void 0 :
230
+ return (h(Host, { class: this.panelOpen ? 'open' : '' }, h("div", { class: "side-buttons" }, h("button", { class: this.activeTab === 1 ? 'active' : '', onClick: () => this.setTab(1), innerHTML: InformationCircle }), h("button", { class: this.activeTab === 2 ? 'active' : '', onClick: () => this.setTab(2), innerHTML: Users }), h("button", { class: this.activeTab === 3 ? 'active' : '', onClick: () => this.setTab(3), innerHTML: ClipboardDocuments })), this.activeTab === 1 && (h("div", { class: "content" }, h("div", { class: "title" }, "Details"), h("div", { class: "label" }, "Envelope ID"), h("div", { class: "value" }, this.envelope.id), h("div", { class: "label" }, "Date Created"), h("div", { class: "value" }, format(new Date(this.envelope.created_at), 'PP pp')), h("div", { class: "label" }, "Last Modified"), h("div", { class: "value" }, format(new Date(this.envelope.updated_at), 'PP pp')), h("div", { class: "label" }, "Status"), h("div", { class: "value" }, this.envelope.status), h("div", { class: "label" }, "Verdoc Owner ID"), h("div", { class: "value" }, this.envelope.profile_id), h("div", { class: "label" }, "Verdoc Owner Name"), h("div", { class: "value" }, (_a = this.envelope.profile) === null || _a === void 0 ? void 0 :
231
231
  _a.first_name, " ", (_b = this.envelope.profile) === null || _b === void 0 ? void 0 :
232
232
  _b.last_name), h("div", { class: "label" }, "Verdoc Owner Email"), h("div", { class: "value" }, (_c = this.envelope.profile) === null || _c === void 0 ? void 0 : _c.email))), this.activeTab === 2 && (h("div", { class: "content" }, h("div", { class: "title" }, "Recipients"), this.sortedRecipients.map((recipient, index) => (h("div", { class: "recipient-detail" }, h("div", { class: "recipient-header" }, h("div", { class: "recipient-number" }, index + 1), h("div", { class: "recipient-type" }, recipient.role_name), h("div", { class: { 'recipient-status': true, [recipient.status]: true } }, recipient.status), isEnvelopeOwner && (h("verdocs-dropdown", { onOptionSelected: item => this.handleRecipientAction(recipient, item.detail.id), options: [
233
233
  { id: 'reminder', label: 'Send Reminder', disabled: !this.canResendRecipient(recipient) },
@@ -237,7 +237,7 @@ const VerdocsEnvelopeSidebar = class {
237
237
  ] }))), h("dic", { class: "recipient-content" }, h("div", { class: "recipient-name" }, recipient.full_name), h("div", { class: "recipient-name" }, recipient.email), h("div", { class: "recipient-name" }, recipient.phone))))), isEnvelopeOwner && h("verdocs-button", { class: "manage-recipients-button", variant: "standard", label: "Manage Recipients", onClick: () => (this.showManageDialog = true) }))), this.activeTab === 3 && (h("div", { class: "content" }, h("div", { class: "title" }, "History"), historyEntries.map(entry => (h("div", { class: "history-entry" }, h("div", { class: "activity-icon", innerHTML: ActivityIcons[entry.icon] || entry.icon }), h("div", { class: "activity-details" }, h("div", { class: "activity-text" }, entry.message), h("div", { class: "activity-date" }, format(entry.date, 'PP pp')))))))), this.showManageDialog && (h("verdocs-envelope-recipient-summary", { envelopeId: this.envelopeId, canView: false, onAnother: () => {
238
238
  var _a;
239
239
  this.showManageDialog = false;
240
- (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit();
240
+ (_a = this.another) === null || _a === void 0 ? void 0 : _a.emit({ envelope: this.envelope });
241
241
  }, onNext: () => {
242
242
  this.showManageDialog = false;
243
243
  } }))));
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):i(e.value).then(s,a)}l((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,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-b18c0348.js";import{g as getRecipientsWithActions,r as recipientCanAct}from"./Permissions-7192ef7c.js";import{g as getInPersonLink}from"./Recipients-198b2531.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-5b92f115.js";import{c as createStore}from"./index-29123f30.js";import{e as getEnvelope}from"./Envelopes-c3d471e5.js";import{V as VerdocsToast}from"./Toast-fbda07e3.js";import{S as SDKError}from"./errors-9b5498c8.js";var createEnvelopeStore=function(e){var t=(new Date).toISOString();return createStore({isLoading:true,isLoaded:false,isError:false,error:null,updateCount:0,roleNames:[],id:e,template_id:"",name:"",status:"pending",profile_id:"",organization_id:"",no_contact:false,created_at:t,updated_at:t,canceled_at:null,reminder_id:null,envelope_document_id:"",certificate_document_id:null,visibility:"private",histories:[],recipients:[],profile:undefined,certificate:undefined,document:undefined,documents:undefined,fields:undefined})};var envelopeStores={};var getEnvelopeStore=function(e,t,n){if(n===void 0){n=false}return __awaiter(void 0,void 0,void 0,(function(){var r,i,o,s;return __generator(this,(function(a){switch(a.label){case 0:r=false;if(!envelopeStores[t]){console.debug("[ENVELOPES] No envelope store found for ID, creating",t);envelopeStores[t]=createEnvelopeStore(t);r=true}i=envelopeStores[t];i.use({reset:function(){return console.debug("[ENVELOPES] Store got reset")},dispose:function(){return console.debug("[ENVELOPES] Store got disposed")}});if(!(r||n))return[3,5];console.debug("[ENVELOPES] Reloading envelope",{envelopeId:t,created:r,forceReload:n});i.state.isLoading=true;i.state.isLoaded=false;i.state.isError=false;i.state.error=undefined;a.label=1;case 1:a.trys.push([1,3,,4]);return[4,getEnvelope(e,t)];case 2:o=a.sent();console.debug("[ENVELOPES] Got envelope",o);Object.assign(i.state,o);i.state.isLoaded=true;i.state.isError=false;i.state.error=undefined;return[3,4];case 3:s=a.sent();console.error("[ENVELOPES] Error loading envelope",s);i.state.isLoaded=false;i.state.isError=true;i.state.error=s;throw s;case 4:i.state.isLoading=false;i.state.updateCount++;a.label=5;case 5:return[2,i]}}))}))};var verdocsEnvelopeRecipientSummaryCss='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .label{color:#ffffff}verdocs-envelope-recipient-summary .content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .content .title{font-size:20px;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var VerdocsEnvelopeRecipientSummary=function(){function e(e){registerInstance(this,e);this.another=createEvent(this,"another",7);this.view=createEvent(this,"view",7);this.next=createEvent(this,"next",7);this.sdkError=createEvent(this,"sdkError",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.envelope=undefined;this.isOpen=undefined;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,i;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}r=this;return[4,getEnvelopeStore(this.endpoint,this.envelopeId,true)];case 1:r.store=o.sent();this.sortEnvelopeRecipients();return[3,3];case 2:i=o.sent();console.log("[RECIPIENTS] Error loading envelope",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,t;(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.recipients.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.handleAnother=function(e){var t;e.preventDefault();(t=this.another)===null||t===void 0?void 0:t.emit()};e.prototype.handleView=function(e){var t;e.preventDefault();(t=this.view)===null||t===void 0?void 0:t.emit()};e.prototype.handleDone=function(e){var t;e.preventDefault();(t=this.next)===null||t===void 0?void 0:t.emit()};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return VerdocsToast("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENTS] Error copying to clipboard",e);VerdocsToast("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var t=this;this.gettingLinks[e.role_name]=true;getInPersonLink(this.endpoint,e.envelope_id,e.role_name).then((function(n){var r;t.gettingLinks[e.role_name]=false;t.links=__assign(__assign({},t.links),(r={},r[e.role_name]=n.link,r));t.copyLink(n.link)})).catch((function(n){t.gettingLinks[e.role_name]=false;console.log("[RECIPIENTS] Error getting link",n);VerdocsToast("Unable to get link: "+n.message,{style:"error"})}))};e.prototype.render=function(){var e=this;var t;return h(Host,null,h("div",{class:"content"},h("h1",{class:"title"},"Recipient Summary"),h("div",{class:"rows"},(t=this.store.state)===null||t===void 0?void 0:t.recipients.map((function(t){var n=getRecipientsWithActions(e.store.state);var r=recipientCanAct(t,n);var i=e.links[t.role_name];var o=e.gettingLinks[t.role_name];return h("div",{class:"recipient"},h("div",{class:"role-name"},t.role_name),h("div",{class:"role-details"},h("div",{class:"role-info"},h("div",{class:"role-full-name"},t.full_name," (",t.email||t.phone,")"),r&&!i&&h("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:o,onClick:function(){return e.getLink(t)}})),i&&h("div",{class:"link-wrapper"},h("div",{class:"link"},i),h("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(i)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&h("div",{class:"buttons"},this.canSendAnother&&h("verdocs-button",{size:"small",label:"Send Another",onClick:function(t){return e.handleAnother(t)}}),this.canView&&h("verdocs-button",{size:"small",label:"View Now",onClick:function(t){return e.handleView(t)}}),this.canDone&&h("verdocs-button",{size:"small",label:"Done",onClick:function(t){return e.handleDone(t)}}))))};return e}();VerdocsEnvelopeRecipientSummary.style=verdocsEnvelopeRecipientSummaryCss;export{VerdocsEnvelopeRecipientSummary as verdocs_envelope_recipient_summary};
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):i(e.value).then(s,a)}l((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,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-b18c0348.js";import{g as getRecipientsWithActions,r as recipientCanAct}from"./Permissions-7192ef7c.js";import{g as getInPersonLink}from"./Recipients-198b2531.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-5b92f115.js";import{c as createStore}from"./index-29123f30.js";import{e as getEnvelope}from"./Envelopes-c3d471e5.js";import{V as VerdocsToast}from"./Toast-fbda07e3.js";import{S as SDKError}from"./errors-9b5498c8.js";var createEnvelopeStore=function(e){var t=(new Date).toISOString();return createStore({isLoading:true,isLoaded:false,isError:false,error:null,updateCount:0,roleNames:[],id:e,template_id:"",name:"",status:"pending",profile_id:"",organization_id:"",no_contact:false,created_at:t,updated_at:t,canceled_at:null,reminder_id:null,envelope_document_id:"",certificate_document_id:null,visibility:"private",histories:[],recipients:[],profile:undefined,certificate:undefined,document:undefined,documents:undefined,fields:undefined})};var envelopeStores={};var getEnvelopeStore=function(e,t,n){if(n===void 0){n=false}return __awaiter(void 0,void 0,void 0,(function(){var r,i,o,s;return __generator(this,(function(a){switch(a.label){case 0:r=false;if(!envelopeStores[t]){console.debug("[ENVELOPES] No envelope store found for ID, creating",t);envelopeStores[t]=createEnvelopeStore(t);r=true}i=envelopeStores[t];i.use({reset:function(){return console.debug("[ENVELOPES] Store got reset")},dispose:function(){return console.debug("[ENVELOPES] Store got disposed")}});if(!(r||n))return[3,5];console.debug("[ENVELOPES] Reloading envelope",{envelopeId:t,created:r,forceReload:n});i.state.isLoading=true;i.state.isLoaded=false;i.state.isError=false;i.state.error=undefined;a.label=1;case 1:a.trys.push([1,3,,4]);return[4,getEnvelope(e,t)];case 2:o=a.sent();console.debug("[ENVELOPES] Got envelope",o);Object.assign(i.state,o);i.state.isLoaded=true;i.state.isError=false;i.state.error=undefined;return[3,4];case 3:s=a.sent();console.error("[ENVELOPES] Error loading envelope",s);i.state.isLoaded=false;i.state.isError=true;i.state.error=s;throw s;case 4:i.state.isLoading=false;i.state.updateCount++;a.label=5;case 5:return[2,i]}}))}))};var verdocsEnvelopeRecipientSummaryCss='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .label{color:#ffffff}verdocs-envelope-recipient-summary .content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .content .title{font-size:20px;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var VerdocsEnvelopeRecipientSummary=function(){function e(e){registerInstance(this,e);this.another=createEvent(this,"another",7);this.view=createEvent(this,"view",7);this.next=createEvent(this,"next",7);this.sdkError=createEvent(this,"sdkError",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.envelope=undefined;this.isOpen=undefined;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,i;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}r=this;return[4,getEnvelopeStore(this.endpoint,this.envelopeId,true)];case 1:r.store=o.sent();this.sortEnvelopeRecipients();return[3,3];case 2:i=o.sent();console.log("[RECIPIENTS] Error loading envelope",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,t;(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.recipients.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.handleAnother=function(e){var t;e.preventDefault();(t=this.another)===null||t===void 0?void 0:t.emit({envelope:this.store.state})};e.prototype.handleView=function(e){var t;e.preventDefault();(t=this.view)===null||t===void 0?void 0:t.emit({envelope:this.store.state})};e.prototype.handleDone=function(e){var t;e.preventDefault();(t=this.next)===null||t===void 0?void 0:t.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return VerdocsToast("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENTS] Error copying to clipboard",e);VerdocsToast("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var t=this;this.gettingLinks[e.role_name]=true;getInPersonLink(this.endpoint,e.envelope_id,e.role_name).then((function(n){var r;t.gettingLinks[e.role_name]=false;t.links=__assign(__assign({},t.links),(r={},r[e.role_name]=n.link,r));t.copyLink(n.link)})).catch((function(n){t.gettingLinks[e.role_name]=false;console.log("[RECIPIENTS] Error getting link",n);VerdocsToast("Unable to get link: "+n.message,{style:"error"})}))};e.prototype.render=function(){var e=this;var t;return h(Host,null,h("div",{class:"content"},h("h1",{class:"title"},"Recipient Summary"),h("div",{class:"rows"},(t=this.store.state)===null||t===void 0?void 0:t.recipients.map((function(t){var n=getRecipientsWithActions(e.store.state);var r=recipientCanAct(t,n);var i=e.links[t.role_name];var o=e.gettingLinks[t.role_name];return h("div",{class:"recipient"},h("div",{class:"role-name"},t.role_name),h("div",{class:"role-details"},h("div",{class:"role-info"},h("div",{class:"role-full-name"},t.full_name," (",t.email||t.phone,")"),r&&!i&&h("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:o,onClick:function(){return e.getLink(t)}})),i&&h("div",{class:"link-wrapper"},h("div",{class:"link"},i),h("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(i)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&h("div",{class:"buttons"},this.canSendAnother&&h("verdocs-button",{size:"small",label:"Send Another",onClick:function(t){return e.handleAnother(t)}}),this.canView&&h("verdocs-button",{size:"small",label:"View Now",onClick:function(t){return e.handleView(t)}}),this.canDone&&h("verdocs-button",{size:"small",label:"Done",onClick:function(t){return e.handleDone(t)}}))))};return e}();VerdocsEnvelopeRecipientSummary.style=verdocsEnvelopeRecipientSummaryCss;export{VerdocsEnvelopeRecipientSummary as verdocs_envelope_recipient_summary};