@verdocs/web-sdk 5.0.30 → 5.0.31

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.
@@ -219,7 +219,7 @@ const VerdocsSend = class {
219
219
  });
220
220
  console.log('[SEND] Sequences', sequences);
221
221
  return Object.keys(sequences)
222
- .map(s => +s)
222
+ .map(s => +s - 1) // We subtract 1 here because the sequence is 1-based and our rendering is 0-based
223
223
  .sort((a, b) => a - b);
224
224
  // const levels = [...new Set((this.template?.roles || []).map(role => role.sequence - 1))];
225
225
  // levels.sort((a, b) => a - b);
@@ -316,11 +316,15 @@ const VerdocsSend = class {
316
316
  return (index$1.h(index$1.Host, { style: { display: 'flex' } }, index$1.h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
317
317
  }
318
318
  const levels = this.getLevels();
319
+ console.log('[SEND] Rendering levels', levels);
319
320
  const rolesAssigned = Object.values(this.rolesCompleted).filter(recipient => jsSdk.isValidEmail(recipient.email) && recipient.first_name && recipient.last_name);
320
321
  // TODO: Reactivate once SMS is re-enabled
321
322
  // const rolesAssigned = Object.values(this.rolesCompleted).filter(recipient => isValidEmail(recipient.email) || isValidPhone(recipient.phone));
322
323
  const allRolesAssigned = rolesAssigned.length >= getRoleNames(this.template).length;
323
- return (index$1.h(index$1.Host, { class: { sendable: (_a = this.template) === null || _a === void 0 ? void 0 : _a.is_sendable } }, index$1.h("div", { class: "recipients" }, index$1.h("div", { class: "left-line" }), index$1.h("div", { class: `level level-start` }, this.getLevelIcon(-1), index$1.h("div", { class: "complete" }, "Send Envelope")), levels.map(level => (index$1.h("div", { class: `level level-${level}` }, this.getLevelIcon(level), this.getRolesAtLevel(level).map(role => {
324
+ return (index$1.h(index$1.Host, { class: { sendable: (_a = this.template) === null || _a === void 0 ? void 0 : _a.is_sendable } }, index$1.h("div", { class: "recipients" }, index$1.h("div", { class: "left-line" }), index$1.h("div", { class: `level level-start` }, this.getLevelIcon(-1), index$1.h("div", { class: "complete" }, "Send Envelope")), levels.map(level => (index$1.h("div", { class: `level level-${level}` }, this.getLevelIcon(level), () => {
325
+ console.log('Rendering level', level, this.getRolesAtLevel(level));
326
+ return '';
327
+ }, this.getRolesAtLevel(level).map(role => {
324
328
  var _a, _b, _c;
325
329
  const unknown = !role.email || !role.first_name || !role.last_name;
326
330
  const roleName = ((_a = this.rolesCompleted[role.id]) === null || _a === void 0 ? void 0 : _a.first_name) ? jsSdk.formatFullName(this.rolesCompleted[role.id]) : unknown ? role.role_name : jsSdk.formatFullName(role);