@hubsync/esign-web-sdk 6.9.15 → 6.9.17

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 (33) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-sign.cjs.entry.js +22 -8
  3. package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
  4. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  5. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +23 -8
  6. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  7. package/dist/components/verdocs-sign.js +23 -8
  8. package/dist/components/verdocs-sign.js.map +1 -1
  9. package/dist/esm/loader.js +1 -1
  10. package/dist/esm/verdocs-sign.entry.js +22 -8
  11. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  12. package/dist/esm/verdocs-web-sdk.js +1 -1
  13. package/dist/esm-es5/loader.js +1 -1
  14. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  15. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  16. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  17. package/dist/globals.css +4 -4
  18. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
  19. package/dist/verdocs-web-sdk/p-3b395384.system.entry.js +2 -0
  20. package/dist/verdocs-web-sdk/p-3b395384.system.entry.js.map +1 -0
  21. package/dist/verdocs-web-sdk/p-72bc05c0.entry.js +2 -0
  22. package/dist/verdocs-web-sdk/p-72bc05c0.entry.js.map +1 -0
  23. package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
  24. package/dist/verdocs-web-sdk/p-D9tCA59Y.system.js.map +1 -0
  25. package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
  26. package/dist/verdocs-web-sdk/verdocs-web-sdk.css +1 -1
  27. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  28. package/package.json +1 -1
  29. package/dist/verdocs-web-sdk/p-8d831133.system.entry.js +0 -2
  30. package/dist/verdocs-web-sdk/p-8d831133.system.entry.js.map +0 -1
  31. package/dist/verdocs-web-sdk/p-BD4bxShv.system.js.map +0 -1
  32. package/dist/verdocs-web-sdk/p-f15c3120.entry.js +0 -2
  33. package/dist/verdocs-web-sdk/p-f15c3120.entry.js.map +0 -1
@@ -101,6 +101,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
101
101
  this.agreed = false;
102
102
  this.signatureId = null;
103
103
  this.initialId = null;
104
+ this.skippedFields = [];
104
105
  this.documentsSingularPlural = 'document';
105
106
  this.authStep = null;
106
107
  this.authMethodStates = {};
@@ -411,6 +412,10 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
411
412
  updateDocumentFieldValue(oldField);
412
413
  this.fieldUpdateCounter++;
413
414
  this.markEnvelopeStarted();
415
+ // If a previously skipped field gets filled, remove it from the skipped list
416
+ if (this.skippedFields.includes(fieldName)) {
417
+ this.skippedFields = this.skippedFields.filter(n => n !== fieldName);
418
+ }
414
419
  this.checkRecipientFields();
415
420
  }
416
421
  });
@@ -624,7 +629,8 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
624
629
  // save is async, so the local value hasn't updated by the time onClick fires.
625
630
  const allFields = this.getSortedFillableFields();
626
631
  const requiredIncomplete = allFields.some(f => f.required && !this.isFieldActuallyFilled(f));
627
- if (requiredIncomplete) {
632
+ const optionalUnaddressed = allFields.some(f => !f.required && !this.isFieldActuallyFilled(f) && !this.skippedFields.includes(f.name));
633
+ if (requiredIncomplete || optionalUnaddressed) {
628
634
  this.nextSubmits = false;
629
635
  this.nextButtonLabel = 'Next';
630
636
  const currentField = allFields.find(f => f.name === this.focusedField);
@@ -657,7 +663,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
657
663
  this.focusFieldElement(next);
658
664
  }
659
665
  handleNextOptional() {
660
- const unfilledOptional = this.getSortedFillableFields().filter(f => !f.required && !this.isFieldActuallyFilled(f));
666
+ const unfilledOptional = this.getSortedFillableFields().filter(f => !f.required && !this.isFieldActuallyFilled(f) && !this.skippedFields.includes(f.name));
661
667
  const next = this.getNextFieldFromList(unfilledOptional);
662
668
  if (next) {
663
669
  this.focusFieldElement(next);
@@ -674,14 +680,15 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
674
680
  return this.getSortedFillableFields().filter(f => f.required && this.isFieldActuallyFilled(f)).length;
675
681
  }
676
682
  getOptionalUnfilledCount() {
677
- return this.getSortedFillableFields().filter(f => !f.required && !this.isFieldActuallyFilled(f)).length;
683
+ return this.getSortedFillableFields().filter(f => !f.required && !this.isFieldActuallyFilled(f) && !this.skippedFields.includes(f.name)).length;
678
684
  }
679
685
  // See if everything that "needs to be" filled in is, and all "fillable fields" are valid
680
686
  checkRecipientFields() {
681
687
  const allFields = this.getSortedFillableFields();
682
688
  const requiredIncomplete = allFields.some(f => f.required && !this.isFieldActuallyFilled(f));
689
+ const optionalUnaddressed = allFields.some(f => !f.required && !this.isFieldActuallyFilled(f) && !this.skippedFields.includes(f.name));
683
690
  const invalidFilled = allFields.some(f => this.isFieldActuallyFilled(f) && !isFieldValid(f, this.getRecipientFields()));
684
- if (!requiredIncomplete && !invalidFilled) {
691
+ if (!requiredIncomplete && !optionalUnaddressed && !invalidFilled) {
685
692
  this.nextButtonLabel = 'Finish';
686
693
  if (!this.nextSubmits) {
687
694
  this.nextSubmits = true;
@@ -728,12 +735,13 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
728
735
  getNextUnfilledField(after) {
729
736
  const allFields = this.getSortedFillableFields();
730
737
  const startIndex = after ? allFields.findIndex(f => f.name === after.name) + 1 : 0;
738
+ const isUnaddressed = (f) => !this.isFieldActuallyFilled(f) && !this.skippedFields.includes(f.name);
731
739
  // Look forward from current position first
732
- const nextAfter = allFields.slice(startIndex).find(f => !this.isFieldActuallyFilled(f));
740
+ const nextAfter = allFields.slice(startIndex).find(isUnaddressed);
733
741
  if (nextAfter)
734
742
  return nextAfter;
735
- // Wrap to beginning if nothing unfilled ahead
736
- return allFields.slice(0, startIndex).find(f => !this.isFieldActuallyFilled(f)) || null;
743
+ // Wrap to beginning if nothing unaddressed ahead
744
+ return allFields.slice(0, startIndex).find(isUnaddressed) || null;
737
745
  }
738
746
  getNextFieldFromList(fields) {
739
747
  const focusedIndex = fields.findIndex(field => field.name === this.focusedField);
@@ -815,7 +823,11 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
815
823
  label,
816
824
  showSkip,
817
825
  onSkip: () => {
826
+ if (!this.skippedFields.includes(nextField.name)) {
827
+ this.skippedFields = [...this.skippedFields, nextField.name];
828
+ }
818
829
  this.focusedField = nextField.name;
830
+ this.checkRecipientFields();
819
831
  this.handleNext();
820
832
  },
821
833
  onClick: () => {
@@ -1000,7 +1012,9 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
1000
1012
  return (h(Host, null, h("verdocs-loader", null)));
1001
1013
  }
1002
1014
  if (this.fatalErrorMessage) {
1003
- return (h(Host, { class: { agreed: this.agreed } }, h("div", { class: "fatal-error" }, h("div", { class: "message" }, h("div", { class: "header" }, this.fatalErrorHeader), h("p", null, this.fatalErrorMessage)))));
1015
+ return (h(Host, null, h("verdocs-ok-dialog", { heading: this.fatalErrorHeader, message: this.fatalErrorMessage, buttonLabel: "OK", onNext: () => {
1016
+ window.location.reload();
1017
+ } })));
1004
1018
  }
1005
1019
  if (this.delegated) {
1006
1020
  return (h(Host, { class: { agreed: false } }, h("div", { class: "fatal-error" }, h("div", { class: "message" }, h("div", { class: "header" }, "Delegated Signing Request"), h("p", null, "You have delegated signing to another recipient. You will not be able to sign this request again.")))));
@@ -1263,6 +1277,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
1263
1277
  "agreed": [32],
1264
1278
  "signatureId": [32],
1265
1279
  "initialId": [32],
1280
+ "skippedFields": [32],
1266
1281
  "documentsSingularPlural": [32],
1267
1282
  "authStep": [32],
1268
1283
  "authMethodStates": [32],