@saasquatch/mint-components 1.15.4 → 1.15.5-2

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 (116) hide show
  1. package/dist/cjs/{ShadowViewAddon-e9dc77e3.js → ShadowViewAddon-28865623.js} +2 -2
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +377 -234
  5. package/dist/cjs/{sqm-base-registration-form-view-66f99821.js → sqm-base-registration-form-view-8029d30e.js} +4 -9
  6. package/dist/cjs/sqm-big-stat_43.cjs.entry.js +143 -10
  7. package/dist/cjs/{sqm-invoice-table-view-5c74607f.js → sqm-invoice-table-view-3f60fba9.js} +1 -0
  8. package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +19 -28
  9. package/dist/cjs/sqm-stencilbook.cjs.entry.js +5 -8
  10. package/dist/cjs/{usePayoutStatus-733ef29a.js → usePayoutStatus-fc4e609e.js} +167 -2
  11. package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +2 -2
  12. package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +4 -9
  13. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -1
  14. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +1 -1
  15. package/dist/collection/components/sqm-input-field/sqm-input-field.js +1 -1
  16. package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +1 -1
  17. package/dist/collection/components/sqm-name-fields/NameFields.stories.js +0 -2
  18. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +3 -3
  19. package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +1 -31
  20. package/dist/collection/components/sqm-name-fields/useNameFields.js +0 -1
  21. package/dist/collection/components/sqm-password-field/sqm-password-field.js +2 -2
  22. package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +0 -1
  23. package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +5 -7
  24. package/dist/collection/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.js +15 -22
  25. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -0
  26. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +47 -40
  27. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +87 -1
  28. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +327 -0
  29. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +27 -3
  30. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +300 -0
  31. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +85 -1
  32. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +300 -0
  33. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +23 -12
  34. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
  35. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +90 -9
  36. package/dist/esm/{ShadowViewAddon-e0d5f1c9.js → ShadowViewAddon-f2176779.js} +2 -2
  37. package/dist/esm/loader.js +1 -1
  38. package/dist/esm/mint-components.js +1 -1
  39. package/dist/esm/sqm-banking-info-form_17.entry.js +331 -188
  40. package/dist/esm/{sqm-base-registration-form-view-d81e316a.js → sqm-base-registration-form-view-dafba287.js} +4 -9
  41. package/dist/esm/sqm-big-stat_43.entry.js +143 -10
  42. package/dist/esm/{sqm-invoice-table-view-3491dd80.js → sqm-invoice-table-view-01453fa3.js} +1 -0
  43. package/dist/esm/sqm-portal-google-registration-form.entry.js +19 -28
  44. package/dist/esm/sqm-stencilbook.entry.js +5 -8
  45. package/dist/esm/{usePayoutStatus-b89e8c49.js → usePayoutStatus-b4bdbfa7.js} +154 -4
  46. package/dist/esm-es5/{ShadowViewAddon-e0d5f1c9.js → ShadowViewAddon-f2176779.js} +1 -1
  47. package/dist/esm-es5/loader.js +1 -1
  48. package/dist/esm-es5/mint-components.js +1 -1
  49. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
  50. package/dist/esm-es5/sqm-base-registration-form-view-dafba287.js +1 -0
  51. package/dist/esm-es5/sqm-big-stat_43.entry.js +1 -1
  52. package/dist/esm-es5/sqm-invoice-table-view-01453fa3.js +1 -0
  53. package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
  54. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  55. package/dist/esm-es5/usePayoutStatus-b4bdbfa7.js +6 -0
  56. package/dist/mint-components/mint-components.esm.js +1 -1
  57. package/dist/mint-components/{p-3ac8613d.system.entry.js → p-02832118.system.entry.js} +1 -1
  58. package/dist/mint-components/{p-d15b642f.system.js → p-0d939b73.system.js} +1 -1
  59. package/dist/mint-components/p-2651ef99.system.js +1 -0
  60. package/dist/mint-components/p-35701119.js +1 -0
  61. package/dist/mint-components/p-37996351.system.js +1 -1
  62. package/dist/mint-components/{p-1edebab1.entry.js → p-4a731079.entry.js} +2 -2
  63. package/dist/mint-components/p-59fe6066.js +1 -0
  64. package/dist/mint-components/p-86a5db85.system.js +1 -0
  65. package/dist/mint-components/p-93db61eb.system.js +6 -0
  66. package/dist/mint-components/p-9c4f4cd6.entry.js +1 -0
  67. package/dist/mint-components/p-a3647f70.system.entry.js +1 -0
  68. package/dist/mint-components/p-a4f494ee.system.entry.js +1 -0
  69. package/dist/mint-components/p-ba14b5f7.system.entry.js +1 -0
  70. package/dist/mint-components/{p-3b6dccec.js → p-c1b074b6.js} +1 -1
  71. package/dist/mint-components/p-d0b404d5.entry.js +109 -0
  72. package/dist/mint-components/p-e3deed72.entry.js +273 -0
  73. package/dist/mint-components/p-fde41ad1.js +157 -0
  74. package/dist/types/components/sqm-base-registration/sqm-base-registration-form-view.d.ts +1 -2
  75. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +1 -1
  76. package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field.d.ts +1 -1
  77. package/dist/types/components/sqm-input-field/sqm-input-field.d.ts +1 -1
  78. package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +1 -1
  79. package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +0 -1
  80. package/dist/types/components/sqm-name-fields/sqm-name-fields.d.ts +0 -5
  81. package/dist/types/components/sqm-name-fields/useNameFields.d.ts +0 -1
  82. package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +1 -1
  83. package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +1 -2
  84. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +31 -0
  85. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +14 -0
  86. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +53 -0
  87. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +2 -1
  88. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +48 -0
  89. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +12 -0
  90. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +48 -0
  91. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +2 -0
  92. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -0
  93. package/dist/types/components.d.ts +296 -10
  94. package/docs/docs.docx +0 -0
  95. package/docs/raisins.json +1 -1
  96. package/grapesjs/grapesjs.js +1 -1
  97. package/package.json +1 -1
  98. package/dist/esm-es5/sqm-base-registration-form-view-d81e316a.js +0 -1
  99. package/dist/esm-es5/sqm-invoice-table-view-3491dd80.js +0 -1
  100. package/dist/esm-es5/usePayoutStatus-b89e8c49.js +0 -6
  101. package/dist/mint-components/p-021b0540.js +0 -46
  102. package/dist/mint-components/p-3d73cd84.entry.js +0 -220
  103. package/dist/mint-components/p-49932f12.system.js +0 -1
  104. package/dist/mint-components/p-7176a952.entry.js +0 -1
  105. package/dist/mint-components/p-8d0393d9.system.entry.js +0 -1
  106. package/dist/mint-components/p-9308221f.js +0 -1
  107. package/dist/mint-components/p-959c42b2.system.entry.js +0 -1
  108. package/dist/mint-components/p-a6494752.system.js +0 -6
  109. package/dist/mint-components/p-bc021969.system.js +0 -1
  110. package/dist/mint-components/p-c78e6066.entry.js +0 -273
  111. package/dist/mint-components/p-e64e8354.system.entry.js +0 -1
  112. package/dist/mint-components/p-e8e48982.js +0 -1
  113. package/dist/types/global/android.d.ts +0 -7
  114. package/dist/types/global/demo.d.ts +0 -2
  115. package/dist/types/stories/features.d.ts +0 -4
  116. package/dist/types/stories/templates.d.ts +0 -4
@@ -247,6 +247,54 @@ export class TaxAndCashDashboard {
247
247
  * @uiName Account review alert description
248
248
  */
249
249
  this.accountReviewDescription = "This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.";
250
+ /**
251
+ * @uiName Payment hold on change alert header
252
+ */
253
+ this.paymentHoldOnChangeHeader = "We are reviewing your new payout settings";
254
+ /**
255
+ * @uiName Payment hold on change alert description
256
+ */
257
+ this.paymentHoldOnChangeDescription = "Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.";
258
+ /**
259
+ * @uiName Beneficiary name invalid alert header
260
+ */
261
+ this.beneficiaryNameInvalidHeader = "Your payment information does not match your tax form";
262
+ /**
263
+ * @uiName Beneficiary name invalid description
264
+ */
265
+ this.beneficiaryNameInvalidDescription = "The beneficiary name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
266
+ /**
267
+ * @uiName Beneficiary name mismatch alert header
268
+ */
269
+ this.beneficiaryNameMismatchHeader = "Your payment information does not match your tax form";
270
+ /**
271
+ * @uiName Beneficiary name mismatch alert description
272
+ */
273
+ this.beneficiaryNameMismatchDescription = "The beneficiary name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
274
+ /**
275
+ * @uiName Bank name mismatch alert header
276
+ */
277
+ this.bankTaxNameMismatchHeader = "Your payment information does not match your tax form";
278
+ /**
279
+ * @uiName Bank name mismatch alert description
280
+ */
281
+ this.bankTaxNameMismatchDescription = "The bank name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
282
+ /**
283
+ * @uiName Withdrawal settings invalid alert header
284
+ */
285
+ this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
286
+ /**
287
+ * @uiName Withdrawal settings invalid alert description
288
+ */
289
+ this.withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct with no invalid characters. Your payouts are on hold until this is resolved.";
290
+ /**
291
+ * @uiName Payment returned alert header
292
+ */
293
+ this.paymentReturnedHeader = "Payout unsuccessful";
294
+ /**
295
+ * @uiName Payment returned alert description
296
+ */
297
+ this.paymentReturnedDescription = "Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.";
250
298
  /**
251
299
  * @uiName Terms and Conditions text
252
300
  */
@@ -1361,6 +1409,258 @@ export class TaxAndCashDashboard {
1361
1409
  "reflect": false,
1362
1410
  "defaultValue": "\"This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.\""
1363
1411
  },
1412
+ "paymentHoldOnChangeHeader": {
1413
+ "type": "string",
1414
+ "mutable": false,
1415
+ "complexType": {
1416
+ "original": "string",
1417
+ "resolved": "string",
1418
+ "references": {}
1419
+ },
1420
+ "required": false,
1421
+ "optional": false,
1422
+ "docs": {
1423
+ "tags": [{
1424
+ "text": "Payment hold on change alert header",
1425
+ "name": "uiName"
1426
+ }],
1427
+ "text": ""
1428
+ },
1429
+ "attribute": "payment-hold-on-change-header",
1430
+ "reflect": false,
1431
+ "defaultValue": "\"We are reviewing your new payout settings\""
1432
+ },
1433
+ "paymentHoldOnChangeDescription": {
1434
+ "type": "string",
1435
+ "mutable": false,
1436
+ "complexType": {
1437
+ "original": "string",
1438
+ "resolved": "string",
1439
+ "references": {}
1440
+ },
1441
+ "required": false,
1442
+ "optional": false,
1443
+ "docs": {
1444
+ "tags": [{
1445
+ "text": "Payment hold on change alert description",
1446
+ "name": "uiName"
1447
+ }],
1448
+ "text": ""
1449
+ },
1450
+ "attribute": "payment-hold-on-change-description",
1451
+ "reflect": false,
1452
+ "defaultValue": "\"Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.\""
1453
+ },
1454
+ "beneficiaryNameInvalidHeader": {
1455
+ "type": "string",
1456
+ "mutable": false,
1457
+ "complexType": {
1458
+ "original": "string",
1459
+ "resolved": "string",
1460
+ "references": {}
1461
+ },
1462
+ "required": false,
1463
+ "optional": false,
1464
+ "docs": {
1465
+ "tags": [{
1466
+ "text": "Beneficiary name invalid alert header",
1467
+ "name": "uiName"
1468
+ }],
1469
+ "text": ""
1470
+ },
1471
+ "attribute": "beneficiary-name-invalid-header",
1472
+ "reflect": false,
1473
+ "defaultValue": "\"Your payment information does not match your tax form\""
1474
+ },
1475
+ "beneficiaryNameInvalidDescription": {
1476
+ "type": "string",
1477
+ "mutable": false,
1478
+ "complexType": {
1479
+ "original": "string",
1480
+ "resolved": "string",
1481
+ "references": {}
1482
+ },
1483
+ "required": false,
1484
+ "optional": false,
1485
+ "docs": {
1486
+ "tags": [{
1487
+ "text": "Beneficiary name invalid description",
1488
+ "name": "uiName"
1489
+ }],
1490
+ "text": ""
1491
+ },
1492
+ "attribute": "beneficiary-name-invalid-description",
1493
+ "reflect": false,
1494
+ "defaultValue": "\"The beneficiary name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.\""
1495
+ },
1496
+ "beneficiaryNameMismatchHeader": {
1497
+ "type": "string",
1498
+ "mutable": false,
1499
+ "complexType": {
1500
+ "original": "string",
1501
+ "resolved": "string",
1502
+ "references": {}
1503
+ },
1504
+ "required": false,
1505
+ "optional": false,
1506
+ "docs": {
1507
+ "tags": [{
1508
+ "text": "Beneficiary name mismatch alert header",
1509
+ "name": "uiName"
1510
+ }],
1511
+ "text": ""
1512
+ },
1513
+ "attribute": "beneficiary-name-mismatch-header",
1514
+ "reflect": false,
1515
+ "defaultValue": "\"Your payment information does not match your tax form\""
1516
+ },
1517
+ "beneficiaryNameMismatchDescription": {
1518
+ "type": "string",
1519
+ "mutable": false,
1520
+ "complexType": {
1521
+ "original": "string",
1522
+ "resolved": "string",
1523
+ "references": {}
1524
+ },
1525
+ "required": false,
1526
+ "optional": false,
1527
+ "docs": {
1528
+ "tags": [{
1529
+ "text": "Beneficiary name mismatch alert description",
1530
+ "name": "uiName"
1531
+ }],
1532
+ "text": ""
1533
+ },
1534
+ "attribute": "beneficiary-name-mismatch-description",
1535
+ "reflect": false,
1536
+ "defaultValue": "\"The beneficiary name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.\""
1537
+ },
1538
+ "bankTaxNameMismatchHeader": {
1539
+ "type": "string",
1540
+ "mutable": false,
1541
+ "complexType": {
1542
+ "original": "string",
1543
+ "resolved": "string",
1544
+ "references": {}
1545
+ },
1546
+ "required": false,
1547
+ "optional": false,
1548
+ "docs": {
1549
+ "tags": [{
1550
+ "text": "Bank name mismatch alert header",
1551
+ "name": "uiName"
1552
+ }],
1553
+ "text": ""
1554
+ },
1555
+ "attribute": "bank-tax-name-mismatch-header",
1556
+ "reflect": false,
1557
+ "defaultValue": "\"Your payment information does not match your tax form\""
1558
+ },
1559
+ "bankTaxNameMismatchDescription": {
1560
+ "type": "string",
1561
+ "mutable": false,
1562
+ "complexType": {
1563
+ "original": "string",
1564
+ "resolved": "string",
1565
+ "references": {}
1566
+ },
1567
+ "required": false,
1568
+ "optional": false,
1569
+ "docs": {
1570
+ "tags": [{
1571
+ "text": "Bank name mismatch alert description",
1572
+ "name": "uiName"
1573
+ }],
1574
+ "text": ""
1575
+ },
1576
+ "attribute": "bank-tax-name-mismatch-description",
1577
+ "reflect": false,
1578
+ "defaultValue": "\"The bank name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.\""
1579
+ },
1580
+ "withdrawalSettingsInvalidHeader": {
1581
+ "type": "string",
1582
+ "mutable": false,
1583
+ "complexType": {
1584
+ "original": "string",
1585
+ "resolved": "string",
1586
+ "references": {}
1587
+ },
1588
+ "required": false,
1589
+ "optional": false,
1590
+ "docs": {
1591
+ "tags": [{
1592
+ "text": "Withdrawal settings invalid alert header",
1593
+ "name": "uiName"
1594
+ }],
1595
+ "text": ""
1596
+ },
1597
+ "attribute": "withdrawal-settings-invalid-header",
1598
+ "reflect": false,
1599
+ "defaultValue": "\"Your payment information includes invalid characters\""
1600
+ },
1601
+ "withdrawalSettingsInvalidDescription": {
1602
+ "type": "string",
1603
+ "mutable": false,
1604
+ "complexType": {
1605
+ "original": "string",
1606
+ "resolved": "string",
1607
+ "references": {}
1608
+ },
1609
+ "required": false,
1610
+ "optional": false,
1611
+ "docs": {
1612
+ "tags": [{
1613
+ "text": "Withdrawal settings invalid alert description",
1614
+ "name": "uiName"
1615
+ }],
1616
+ "text": ""
1617
+ },
1618
+ "attribute": "withdrawal-settings-invalid-description",
1619
+ "reflect": false,
1620
+ "defaultValue": "\"There are invalid characters in your payment information. Please review your information and make sure it is correct with no invalid characters. Your payouts are on hold until this is resolved.\""
1621
+ },
1622
+ "paymentReturnedHeader": {
1623
+ "type": "string",
1624
+ "mutable": false,
1625
+ "complexType": {
1626
+ "original": "string",
1627
+ "resolved": "string",
1628
+ "references": {}
1629
+ },
1630
+ "required": false,
1631
+ "optional": false,
1632
+ "docs": {
1633
+ "tags": [{
1634
+ "text": "Payment returned alert header",
1635
+ "name": "uiName"
1636
+ }],
1637
+ "text": ""
1638
+ },
1639
+ "attribute": "payment-returned-header",
1640
+ "reflect": false,
1641
+ "defaultValue": "\"Payout unsuccessful\""
1642
+ },
1643
+ "paymentReturnedDescription": {
1644
+ "type": "string",
1645
+ "mutable": false,
1646
+ "complexType": {
1647
+ "original": "string",
1648
+ "resolved": "string",
1649
+ "references": {}
1650
+ },
1651
+ "required": false,
1652
+ "optional": false,
1653
+ "docs": {
1654
+ "tags": [{
1655
+ "text": "Payment returned alert description",
1656
+ "name": "uiName"
1657
+ }],
1658
+ "text": ""
1659
+ },
1660
+ "attribute": "payment-returned-description",
1661
+ "reflect": false,
1662
+ "defaultValue": "\"Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.\""
1663
+ },
1364
1664
  "termsAndConditions": {
1365
1665
  "type": "string",
1366
1666
  "mutable": false,
@@ -154,6 +154,12 @@ export const UserInfoFormView = (props) => {
154
154
  default:
155
155
  regionLabel = text.state;
156
156
  }
157
+ function isDisabledInput(field) {
158
+ var _a;
159
+ if (states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]))
160
+ return true;
161
+ return false;
162
+ }
157
163
  return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
158
164
  h("style", { type: "text/css" },
159
165
  styleString,
@@ -201,18 +207,22 @@ export const UserInfoFormView = (props) => {
201
207
  }))),
202
208
  h("div", null,
203
209
  h("div", { class: classes.InputContainer },
204
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled || states.isUser || states.isPartner }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
210
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
211
+ states.isUser ||
212
+ isDisabledInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
205
213
  class: classes.ErrorInput,
206
214
  helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
207
215
  }
208
216
  : {}), { id: "firstName", name: "/firstName", required: true })),
209
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled || states.isUser || states.isPartner }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
217
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
218
+ states.isUser ||
219
+ isDisabledInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
210
220
  class: classes.ErrorInput,
211
221
  helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
212
222
  }
213
223
  : {}), { id: "lastName", name: "/lastName", required: true })),
214
224
  h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
215
- h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || states.isPartner }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
225
+ h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || isDisabledInput("countryCode") }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
216
226
  class: classes.ErrorInput,
217
227
  helpText: formatErrorMessage(text.country, formState.errors.countryCode),
218
228
  }
@@ -228,7 +238,8 @@ export const UserInfoFormView = (props) => {
228
238
  h("div", { class: classes.PhoneInputsSection },
229
239
  h("p", null, text.phoneNumber),
230
240
  h("div", { class: classes.PhoneInputsContainer },
231
- h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
241
+ h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
242
+ isDisabledInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
232
243
  class: classes.ErrorInput,
233
244
  }
234
245
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -254,7 +265,7 @@ export const UserInfoFormView = (props) => {
254
265
  // Naive phone number validation
255
266
  validateBillingField(/[a-zA-Z]+/, value) &&
256
267
  formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
257
- }, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
268
+ }, disabled: states.disabled || isDisabledInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
258
269
  class: classes.ErrorInput,
259
270
  helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
260
271
  }
@@ -262,7 +273,7 @@ export const UserInfoFormView = (props) => {
262
273
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
263
274
  // Checks for non-ASCII characters
264
275
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
265
- formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
276
+ formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("address") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
266
277
  class: classes.ErrorInput,
267
278
  helpText: formatErrorMessage(text.address, formState.errors.address),
268
279
  }
@@ -270,22 +281,22 @@ export const UserInfoFormView = (props) => {
270
281
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
271
282
  // Checks for non-ASCII characters
272
283
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
273
- formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
284
+ formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("city") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
274
285
  class: classes.ErrorInput,
275
286
  helpText: formatErrorMessage(text.city, formState.errors.city),
276
287
  }
277
288
  : {}), { required: true })),
278
- !states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || states.isPartner }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
289
+ !states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || isDisabledInput("state") }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
279
290
  class: classes.ErrorInput,
280
291
  helpText: formatErrorMessage(text.state, formState.errors.state),
281
292
  }
282
293
  : {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
283
- h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || states.isPartner }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
294
+ h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || isDisabledInput("postalCode") }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
284
295
  class: classes.ErrorInput,
285
296
  helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
286
297
  }
287
298
  : {}), { required: true })),
288
- h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || states.isPartner, helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
299
+ h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || isDisabledInput("currency"), helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
289
300
  class: classes.ErrorInput,
290
301
  helpText: formatErrorMessage(text.currency, formState.errors.currency),
291
302
  }
@@ -307,7 +318,7 @@ export const UserInfoFormView = (props) => {
307
318
  h("div", { class: classes.CheckboxWrapper },
308
319
  h("sl-checkbox", { exportparts: "label: input-label, base: input-base", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
309
320
  e.target.value = e.target.checked;
310
- }, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
321
+ }, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
311
322
  ((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
312
- h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
323
+ h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
313
324
  };
@@ -892,7 +892,7 @@ export class TaxForm {
892
892
  "mutable": false,
893
893
  "complexType": {
894
894
  "original": "DemoData<UseUserInfoFormResult>",
895
- "resolved": "{ states?: { step: string; hideState: boolean; hideSteps: boolean; disabled: boolean; loadingError: boolean; loading: boolean; isPartner: boolean; isUser: boolean; formState: { errors: {}; firstName: string; lastName: string; email: string; phoneNumberCountryCode: string; phoneNumber: string; countryCode: string; currency: string; address: string; city: string; state: string; postalCode: string; }; }; refs?: { formRef: Ref<HTMLFormElement>; currencyRef: Ref<HTMLSelectElement>; phoneCountryRef: Ref<HTMLSelectElement>; }; data?: { currencies: { displayName: string; currencyCode: string; }[]; countries: TaxCountry[]; phoneCountries: TaxCountry[]; allCurrencies: { displayName: string; currencyCode: string; }[]; allCountries: TaxCountry[]; regionLabelEnum: \"STATE\" | \"PROVINCE\" | \"REGION\"; regions: { label: string; value: string; }[]; }; setStep?: (value: string) => void; onSubmit?: (event: any) => Promise<void>; }",
895
+ "resolved": "{ states?: { step: string; hideState: boolean; hideSteps: boolean; disabled: boolean; loadingError: boolean; loading: boolean; isPartner: boolean; isUser: boolean; formState: { errors: {}; firstName: string; lastName: string; email: string; phoneNumberCountryCode: string; phoneNumber: string; countryCode: string; currency: string; address: string; city: string; state: string; postalCode: string; }; }; refs?: { formRef: Ref<HTMLFormElement>; currencyRef: Ref<HTMLSelectElement>; phoneCountryRef: Ref<HTMLSelectElement>; }; data?: { currencies: { displayName: string; currencyCode: string; }[]; countries: TaxCountry[]; phoneCountries: TaxCountry[]; allCurrencies: { displayName: string; currencyCode: string; }[]; allCountries: TaxCountry[]; regionLabelEnum: \"STATE\" | \"PROVINCE\" | \"REGION\"; regions: { label: string; value: string; }[]; partnerData: ImpactPublisher; }; setStep?: (value: string) => void; onSubmit?: (event: any) => Promise<void>; }",
896
896
  "references": {
897
897
  "DemoData": {
898
898
  "location": "import",
@@ -1,11 +1,13 @@
1
1
  import { useEffect, useMemo, useRef, useState, } from "@saasquatch/universal-hooks";
2
2
  import jsonpointer from "jsonpointer";
3
3
  import { CURRENCIES_NAMESPACE, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../sqm-tax-and-cash/data";
4
- import { objectIsFull } from "../utils";
5
- import { useParent, useParentQueryValue, useParentValue, } from "@saasquatch/component-boilerplate";
4
+ import { objectIsFull, validTaxDocument } from "../utils";
5
+ import { useMutation, useParent, useParentQueryValue, useParentValue, useUserIdentity, } from "@saasquatch/component-boilerplate";
6
6
  import { ADDRESS_REGIONS } from "../subregions";
7
+ import { CONNECT_PARTNER, } from "../sqm-indirect-tax-form/useIndirectTaxForm";
8
+ import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
7
9
  export function useUserInfoForm(props) {
8
- var _a, _b, _c, _d;
10
+ var _a, _b, _c, _d, _e, _f;
9
11
  const currencyRef = useRef(undefined);
10
12
  const phoneCountryRef = useRef(undefined);
11
13
  const formRef = useRef(null);
@@ -13,7 +15,9 @@ export function useUserInfoForm(props) {
13
15
  const countries = useParentValue(SORTED_COUNTRIES_NAMESPACE);
14
16
  const [step, setStep] = useParent(TAX_CONTEXT_NAMESPACE);
15
17
  const [userFormContext, setUserFormContext] = useParent(USER_FORM_CONTEXT_NAMESPACE);
16
- const { data, loading, errors: userError, } = useParentQueryValue(USER_QUERY_NAMESPACE);
18
+ const user = useUserIdentity();
19
+ const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = useMutation(CONNECT_PARTNER);
20
+ const { data, loading, refetch, errors: userError, } = useParentQueryValue(USER_QUERY_NAMESPACE);
17
21
  const _currencies = useParentValue(CURRENCIES_NAMESPACE);
18
22
  const currencies = useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
19
23
  const [countrySearch, setCountrySearch] = useState("");
@@ -115,6 +119,45 @@ export function useUserInfoForm(props) {
115
119
  setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
116
120
  }
117
121
  }, [currencySearch, currencies]);
122
+ async function connectPartner(formData) {
123
+ var _a, _b, _c, _d, _e;
124
+ const vars = {
125
+ user: {
126
+ id: user.id,
127
+ accountId: user.accountId,
128
+ },
129
+ firstName: formData.firstName,
130
+ lastName: formData.lastName,
131
+ countryCode: formData.countryCode,
132
+ currency: formData.currency,
133
+ address: formData.address,
134
+ city: formData.city,
135
+ state: formData.state,
136
+ postalCode: formData.postalCode,
137
+ phoneNumber: formData.phoneNumber,
138
+ phoneNumberCountryCode: formData.phoneNumberCountryCode,
139
+ };
140
+ const result = await connectImpactPartner({
141
+ vars,
142
+ });
143
+ if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
144
+ throw new Error();
145
+ if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
146
+ // Output backend errors to console for now
147
+ console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
148
+ throw new Error();
149
+ }
150
+ await refetch();
151
+ const resultPublisher = (_e = (_d = (_c = result
152
+ .createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
153
+ const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
154
+ // Fire form change event
155
+ window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
156
+ return {
157
+ resultPublisher,
158
+ hasValidCurrentDocument,
159
+ };
160
+ }
118
161
  async function onSubmit(event) {
119
162
  let formControls = event.target.getFormControls();
120
163
  let formData = {};
@@ -157,9 +200,46 @@ export function useUserInfoForm(props) {
157
200
  postalCode: userData.postalCode,
158
201
  currency: userData.currency,
159
202
  });
160
- const nextStep = context.overrideNextStep || "/2";
203
+ const skipNextStep = getSkipNextStep(userData);
204
+ console.log({ skipNextStep });
205
+ if (skipNextStep) {
206
+ try {
207
+ const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
208
+ if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
209
+ !hasValidCurrentDocument) {
210
+ // Go to docusign form
211
+ setStep("/3");
212
+ }
213
+ else {
214
+ if (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.brandedSignup) {
215
+ // Go to banking information form
216
+ setStep("/4");
217
+ }
218
+ else {
219
+ // Go right to the dashboard
220
+ setStep("/dashboard");
221
+ }
222
+ }
223
+ }
224
+ catch (e) {
225
+ setErrors({ general: true });
226
+ }
227
+ }
228
+ const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
161
229
  setStep(nextStep);
162
230
  }
231
+ // TODO: get from backend
232
+ const hasIndirectTax = false;
233
+ const brandCountry = "";
234
+ function getSkipNextStep(userData) {
235
+ if (userData.countryCode === "US")
236
+ return true;
237
+ if (!hasIndirectTax)
238
+ return true;
239
+ if (hasIndirectTax && userData.countryCode !== brandCountry)
240
+ return true;
241
+ return false;
242
+ }
163
243
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
164
244
  const regionObj = hasStates
165
245
  ? ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
@@ -187,16 +267,17 @@ export function useUserInfoForm(props) {
187
267
  allCountries: countries,
188
268
  regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
189
269
  regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
270
+ partnerData: (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher,
190
271
  },
191
272
  states: {
192
273
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
193
274
  hideState: !hasStates,
194
275
  hideSteps: !!context.hideSteps,
195
- disabled: loading,
276
+ disabled: loading || connectLoading,
196
277
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
197
- loading: loading,
198
- isPartner: !!((_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher),
199
- isUser: !!((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.user),
278
+ loading: loading || connectLoading,
279
+ isPartner: !!((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.publisher),
280
+ isUser: !!((_f = (_e = data === null || data === void 0 ? void 0 : data.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.user),
200
281
  formState: {
201
282
  ...userFormContext,
202
283
  errors: formErrors,
@@ -2819,7 +2819,7 @@ function NameFieldsView(props) {
2819
2819
  h("style", { type: "text/css" },
2820
2820
  vanillaStyle$4,
2821
2821
  styleString$8),
2822
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: !states.optional, disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e.firstName) ? {
2822
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true, disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e.firstName) ? {
2823
2823
  value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
2824
2824
  }
2825
2825
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
@@ -2827,7 +2827,7 @@ function NameFieldsView(props) {
2827
2827
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
2828
2828
  }
2829
2829
  : []))),
2830
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: !states.optional, disabled: ((_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.loading) || ((_j = states.registrationFormState) === null || _j === void 0 ? void 0 : _j.disabled) }, (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.initialData) === null || _l === void 0 ? void 0 : _l.lastName) ? {
2830
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: true, disabled: ((_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.loading) || ((_j = states.registrationFormState) === null || _j === void 0 ? void 0 : _j.disabled) }, (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.initialData) === null || _l === void 0 ? void 0 : _l.lastName) ? {
2831
2831
  value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
2832
2832
  }
2833
2833
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {