@saasquatch/mint-components 1.8.0-141 → 1.8.0-142

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.
@@ -1646,21 +1646,20 @@ function useDocusignForm(props) {
1646
1646
  const [errors, setErrors] = stencilHooks_module.useState({});
1647
1647
  const [loading, setLoading] = stencilHooks_module.useState(false);
1648
1648
  // Only look at current document if it's valid (same as required type)
1649
- const existingDocumentType = sqmInvoiceTableView.validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType, (_c = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _c === void 0 ? void 0 : _c.type) && ((_d = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _d === void 0 ? void 0 : _d.type);
1649
+ const existingDocumentType = sqmInvoiceTableView.validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType, (_c = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _c === void 0 ? void 0 : _c.type)
1650
+ ? (_d = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _d === void 0 ? void 0 : _d.type : undefined;
1650
1651
  const actualDocumentType = existingDocumentType ||
1651
1652
  getDocumentType(participantType) || (publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType);
1652
1653
  stencilHooks_module.useEffect(() => {
1653
- var _a;
1654
- if (!((_a = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _a === void 0 ? void 0 : _a.type))
1654
+ if (!existingDocumentType)
1655
1655
  return;
1656
- const type = publisher.currentTaxDocument.type;
1657
- if (type === "W8BEN") {
1656
+ if (existingDocumentType === "W8BEN") {
1658
1657
  setParticipantType("individualParticipant");
1659
1658
  }
1660
- else if (type === "W8BENE") {
1659
+ else if (existingDocumentType === "W8BENE") {
1661
1660
  setParticipantType("businessEntity");
1662
1661
  }
1663
- }, [publisher]);
1662
+ }, [existingDocumentType]);
1664
1663
  stencilHooks_module.useEffect(() => {
1665
1664
  var _a;
1666
1665
  // Skip if no publisher info
@@ -35,21 +35,20 @@ export function useDocusignForm(props) {
35
35
  const [errors, setErrors] = useState({});
36
36
  const [loading, setLoading] = useState(false);
37
37
  // Only look at current document if it's valid (same as required type)
38
- const existingDocumentType = validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType, (_c = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _c === void 0 ? void 0 : _c.type) && ((_d = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _d === void 0 ? void 0 : _d.type);
38
+ const existingDocumentType = validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType, (_c = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _c === void 0 ? void 0 : _c.type)
39
+ ? (_d = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _d === void 0 ? void 0 : _d.type : undefined;
39
40
  const actualDocumentType = existingDocumentType ||
40
41
  getDocumentType(participantType) || (publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType);
41
42
  useEffect(() => {
42
- var _a;
43
- if (!((_a = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _a === void 0 ? void 0 : _a.type))
43
+ if (!existingDocumentType)
44
44
  return;
45
- const type = publisher.currentTaxDocument.type;
46
- if (type === "W8BEN") {
45
+ if (existingDocumentType === "W8BEN") {
47
46
  setParticipantType("individualParticipant");
48
47
  }
49
- else if (type === "W8BENE") {
48
+ else if (existingDocumentType === "W8BENE") {
50
49
  setParticipantType("businessEntity");
51
50
  }
52
- }, [publisher]);
51
+ }, [existingDocumentType]);
53
52
  useEffect(() => {
54
53
  var _a;
55
54
  // Skip if no publisher info
@@ -1642,21 +1642,20 @@ function useDocusignForm(props) {
1642
1642
  const [errors, setErrors] = useState({});
1643
1643
  const [loading, setLoading] = useState(false);
1644
1644
  // Only look at current document if it's valid (same as required type)
1645
- const existingDocumentType = validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType, (_c = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _c === void 0 ? void 0 : _c.type) && ((_d = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _d === void 0 ? void 0 : _d.type);
1645
+ const existingDocumentType = validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType, (_c = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _c === void 0 ? void 0 : _c.type)
1646
+ ? (_d = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _d === void 0 ? void 0 : _d.type : undefined;
1646
1647
  const actualDocumentType = existingDocumentType ||
1647
1648
  getDocumentType(participantType) || (publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType);
1648
1649
  useEffect(() => {
1649
- var _a;
1650
- if (!((_a = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _a === void 0 ? void 0 : _a.type))
1650
+ if (!existingDocumentType)
1651
1651
  return;
1652
- const type = publisher.currentTaxDocument.type;
1653
- if (type === "W8BEN") {
1652
+ if (existingDocumentType === "W8BEN") {
1654
1653
  setParticipantType("individualParticipant");
1655
1654
  }
1656
- else if (type === "W8BENE") {
1655
+ else if (existingDocumentType === "W8BENE") {
1657
1656
  setParticipantType("businessEntity");
1658
1657
  }
1659
- }, [publisher]);
1658
+ }, [existingDocumentType]);
1660
1659
  useEffect(() => {
1661
1660
  var _a;
1662
1661
  // Skip if no publisher info