@saasquatch/mint-components 1.15.5-2 → 1.15.5
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.
- package/dist/cjs/{ShadowViewAddon-28865623.js → ShadowViewAddon-e9dc77e3.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +234 -377
- package/dist/cjs/{sqm-base-registration-form-view-8029d30e.js → sqm-base-registration-form-view-66f99821.js} +9 -4
- package/dist/cjs/sqm-big-stat_43.cjs.entry.js +10 -143
- package/dist/cjs/{sqm-invoice-table-view-3f60fba9.js → sqm-invoice-table-view-5c74607f.js} +0 -1
- package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +25 -18
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +8 -5
- package/dist/cjs/{usePayoutStatus-fc4e609e.js → usePayoutStatus-733ef29a.js} +2 -167
- package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +2 -2
- package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +9 -4
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -1
- package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +1 -1
- package/dist/collection/components/sqm-input-field/sqm-input-field.js +1 -1
- package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +1 -1
- package/dist/collection/components/sqm-name-fields/NameFields.stories.js +2 -0
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +3 -3
- package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +31 -1
- package/dist/collection/components/sqm-name-fields/useNameFields.js +1 -0
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +2 -2
- package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +1 -0
- package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +4 -4
- package/dist/collection/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.js +22 -15
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +40 -47
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +1 -87
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +0 -327
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +3 -27
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +0 -300
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +1 -85
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +0 -300
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +12 -23
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +9 -90
- package/dist/esm/{ShadowViewAddon-f2176779.js → ShadowViewAddon-e0d5f1c9.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_17.entry.js +188 -331
- package/dist/esm/{sqm-base-registration-form-view-dafba287.js → sqm-base-registration-form-view-d81e316a.js} +9 -4
- package/dist/esm/sqm-big-stat_43.entry.js +10 -143
- package/dist/esm/{sqm-invoice-table-view-01453fa3.js → sqm-invoice-table-view-3491dd80.js} +0 -1
- package/dist/esm/sqm-portal-google-registration-form.entry.js +25 -18
- package/dist/esm/sqm-stencilbook.entry.js +8 -5
- package/dist/esm/{usePayoutStatus-b4bdbfa7.js → usePayoutStatus-b89e8c49.js} +4 -154
- package/dist/esm-es5/{ShadowViewAddon-f2176779.js → ShadowViewAddon-e0d5f1c9.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
- package/dist/esm-es5/sqm-base-registration-form-view-d81e316a.js +1 -0
- package/dist/esm-es5/sqm-big-stat_43.entry.js +1 -1
- package/dist/esm-es5/sqm-invoice-table-view-3491dd80.js +1 -0
- package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/usePayoutStatus-b89e8c49.js +6 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-021b0540.js +46 -0
- package/dist/mint-components/{p-4a731079.entry.js → p-1edebab1.entry.js} +2 -2
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/{p-02832118.system.entry.js → p-3ac8613d.system.entry.js} +1 -1
- package/dist/mint-components/{p-c1b074b6.js → p-3b6dccec.js} +1 -1
- package/dist/mint-components/p-3d73cd84.entry.js +220 -0
- package/dist/mint-components/p-43e274e9.entry.js +1 -0
- package/dist/mint-components/p-49932f12.system.js +1 -0
- package/dist/mint-components/p-8db18561.system.entry.js +1 -0
- package/dist/mint-components/p-9308221f.js +1 -0
- package/dist/mint-components/p-959c42b2.system.entry.js +1 -0
- package/dist/mint-components/p-a6494752.system.js +6 -0
- package/dist/mint-components/p-bc021969.system.js +1 -0
- package/dist/mint-components/p-c78e6066.entry.js +273 -0
- package/dist/mint-components/{p-0d939b73.system.js → p-d15b642f.system.js} +1 -1
- package/dist/mint-components/p-e64e8354.system.entry.js +1 -0
- package/dist/mint-components/p-e8e48982.js +1 -0
- package/dist/types/components/sqm-base-registration/sqm-base-registration-form-view.d.ts +2 -1
- package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +1 -1
- package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field.d.ts +1 -1
- package/dist/types/components/sqm-input-field/sqm-input-field.d.ts +1 -1
- package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +1 -1
- package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +1 -0
- package/dist/types/components/sqm-name-fields/sqm-name-fields.d.ts +5 -0
- package/dist/types/components/sqm-name-fields/useNameFields.d.ts +1 -0
- package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +1 -1
- package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +2 -1
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +0 -31
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +0 -14
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +0 -53
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -2
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +0 -48
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +0 -12
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +0 -48
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -2
- package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +0 -1
- package/dist/types/components.d.ts +10 -296
- package/dist/types/global/android.d.ts +7 -0
- package/dist/types/global/demo.d.ts +2 -0
- package/dist/types/stories/features.d.ts +4 -0
- package/dist/types/stories/templates.d.ts +4 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/sqm-base-registration-form-view-dafba287.js +0 -1
- package/dist/esm-es5/sqm-invoice-table-view-01453fa3.js +0 -1
- package/dist/esm-es5/usePayoutStatus-b4bdbfa7.js +0 -6
- package/dist/mint-components/p-2651ef99.system.js +0 -1
- package/dist/mint-components/p-35701119.js +0 -1
- package/dist/mint-components/p-59fe6066.js +0 -1
- package/dist/mint-components/p-86a5db85.system.js +0 -1
- package/dist/mint-components/p-93db61eb.system.js +0 -6
- package/dist/mint-components/p-9c4f4cd6.entry.js +0 -1
- package/dist/mint-components/p-a3647f70.system.entry.js +0 -1
- package/dist/mint-components/p-a4f494ee.system.entry.js +0 -1
- package/dist/mint-components/p-ba14b5f7.system.entry.js +0 -1
- package/dist/mint-components/p-d0b404d5.entry.js +0 -109
- package/dist/mint-components/p-e3deed72.entry.js +0 -273
- package/dist/mint-components/p-fde41ad1.js +0 -157
|
@@ -247,54 +247,6 @@ 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.";
|
|
298
250
|
/**
|
|
299
251
|
* @uiName Terms and Conditions text
|
|
300
252
|
*/
|
|
@@ -1409,258 +1361,6 @@ export class TaxAndCashDashboard {
|
|
|
1409
1361
|
"reflect": false,
|
|
1410
1362
|
"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}.\""
|
|
1411
1363
|
},
|
|
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
|
-
},
|
|
1664
1364
|
"termsAndConditions": {
|
|
1665
1365
|
"type": "string",
|
|
1666
1366
|
"mutable": false,
|
package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js
CHANGED
|
@@ -154,12 +154,6 @@ 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
|
-
}
|
|
163
157
|
return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
164
158
|
h("style", { type: "text/css" },
|
|
165
159
|
styleString,
|
|
@@ -207,22 +201,18 @@ export const UserInfoFormView = (props) => {
|
|
|
207
201
|
}))),
|
|
208
202
|
h("div", null,
|
|
209
203
|
h("div", { class: classes.InputContainer },
|
|
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) ? {
|
|
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) ? {
|
|
213
205
|
class: classes.ErrorInput,
|
|
214
206
|
helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
|
|
215
207
|
}
|
|
216
208
|
: {}), { id: "firstName", name: "/firstName", required: true })),
|
|
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) ? {
|
|
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) ? {
|
|
220
210
|
class: classes.ErrorInput,
|
|
221
211
|
helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
|
|
222
212
|
}
|
|
223
213
|
: {}), { id: "lastName", name: "/lastName", required: true })),
|
|
224
214
|
h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
|
|
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 ||
|
|
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) ? {
|
|
226
216
|
class: classes.ErrorInput,
|
|
227
217
|
helpText: formatErrorMessage(text.country, formState.errors.countryCode),
|
|
228
218
|
}
|
|
@@ -238,8 +228,7 @@ export const UserInfoFormView = (props) => {
|
|
|
238
228
|
h("div", { class: classes.PhoneInputsSection },
|
|
239
229
|
h("p", null, text.phoneNumber),
|
|
240
230
|
h("div", { class: classes.PhoneInputsContainer },
|
|
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) ? {
|
|
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) ? {
|
|
243
232
|
class: classes.ErrorInput,
|
|
244
233
|
}
|
|
245
234
|
: {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
|
|
@@ -265,7 +254,7 @@ export const UserInfoFormView = (props) => {
|
|
|
265
254
|
// Naive phone number validation
|
|
266
255
|
validateBillingField(/[a-zA-Z]+/, value) &&
|
|
267
256
|
formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
|
|
268
|
-
}, disabled: states.disabled ||
|
|
257
|
+
}, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
269
258
|
class: classes.ErrorInput,
|
|
270
259
|
helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
271
260
|
}
|
|
@@ -273,7 +262,7 @@ export const UserInfoFormView = (props) => {
|
|
|
273
262
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
|
|
274
263
|
// Checks for non-ASCII characters
|
|
275
264
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
276
|
-
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
265
|
+
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
|
|
277
266
|
class: classes.ErrorInput,
|
|
278
267
|
helpText: formatErrorMessage(text.address, formState.errors.address),
|
|
279
268
|
}
|
|
@@ -281,22 +270,22 @@ export const UserInfoFormView = (props) => {
|
|
|
281
270
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
|
|
282
271
|
// Checks for non-ASCII characters
|
|
283
272
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
284
|
-
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
273
|
+
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
|
|
285
274
|
class: classes.ErrorInput,
|
|
286
275
|
helpText: formatErrorMessage(text.city, formState.errors.city),
|
|
287
276
|
}
|
|
288
277
|
: {}), { required: true })),
|
|
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 ||
|
|
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) ? {
|
|
290
279
|
class: classes.ErrorInput,
|
|
291
280
|
helpText: formatErrorMessage(text.state, formState.errors.state),
|
|
292
281
|
}
|
|
293
282
|
: {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
|
|
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 ||
|
|
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) ? {
|
|
295
284
|
class: classes.ErrorInput,
|
|
296
285
|
helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
|
|
297
286
|
}
|
|
298
287
|
: {}), { required: true })),
|
|
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 ||
|
|
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) ? {
|
|
300
289
|
class: classes.ErrorInput,
|
|
301
290
|
helpText: formatErrorMessage(text.currency, formState.errors.currency),
|
|
302
291
|
}
|
|
@@ -318,7 +307,7 @@ export const UserInfoFormView = (props) => {
|
|
|
318
307
|
h("div", { class: classes.CheckboxWrapper },
|
|
319
308
|
h("sl-checkbox", { exportparts: "label: input-label, base: input-base", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
|
|
320
309
|
e.target.value = e.target.checked;
|
|
321
|
-
}, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
310
|
+
}, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
322
311
|
((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
|
|
323
|
-
h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
312
|
+
h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
324
313
|
};
|
|
@@ -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; }[];
|
|
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>; }",
|
|
896
896
|
"references": {
|
|
897
897
|
"DemoData": {
|
|
898
898
|
"location": "import",
|
|
@@ -1,13 +1,11 @@
|
|
|
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
|
|
5
|
-
import {
|
|
4
|
+
import { objectIsFull } from "../utils";
|
|
5
|
+
import { useParent, useParentQueryValue, useParentValue, } 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";
|
|
9
7
|
export function useUserInfoForm(props) {
|
|
10
|
-
var _a, _b, _c, _d
|
|
8
|
+
var _a, _b, _c, _d;
|
|
11
9
|
const currencyRef = useRef(undefined);
|
|
12
10
|
const phoneCountryRef = useRef(undefined);
|
|
13
11
|
const formRef = useRef(null);
|
|
@@ -15,9 +13,7 @@ export function useUserInfoForm(props) {
|
|
|
15
13
|
const countries = useParentValue(SORTED_COUNTRIES_NAMESPACE);
|
|
16
14
|
const [step, setStep] = useParent(TAX_CONTEXT_NAMESPACE);
|
|
17
15
|
const [userFormContext, setUserFormContext] = useParent(USER_FORM_CONTEXT_NAMESPACE);
|
|
18
|
-
const
|
|
19
|
-
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = useMutation(CONNECT_PARTNER);
|
|
20
|
-
const { data, loading, refetch, errors: userError, } = useParentQueryValue(USER_QUERY_NAMESPACE);
|
|
16
|
+
const { data, loading, errors: userError, } = useParentQueryValue(USER_QUERY_NAMESPACE);
|
|
21
17
|
const _currencies = useParentValue(CURRENCIES_NAMESPACE);
|
|
22
18
|
const currencies = useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
|
|
23
19
|
const [countrySearch, setCountrySearch] = useState("");
|
|
@@ -119,45 +115,6 @@ export function useUserInfoForm(props) {
|
|
|
119
115
|
setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
|
|
120
116
|
}
|
|
121
117
|
}, [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
|
-
}
|
|
161
118
|
async function onSubmit(event) {
|
|
162
119
|
let formControls = event.target.getFormControls();
|
|
163
120
|
let formData = {};
|
|
@@ -200,46 +157,9 @@ export function useUserInfoForm(props) {
|
|
|
200
157
|
postalCode: userData.postalCode,
|
|
201
158
|
currency: userData.currency,
|
|
202
159
|
});
|
|
203
|
-
const
|
|
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";
|
|
160
|
+
const nextStep = context.overrideNextStep || "/2";
|
|
229
161
|
setStep(nextStep);
|
|
230
162
|
}
|
|
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
|
-
}
|
|
243
163
|
const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
|
|
244
164
|
const regionObj = hasStates
|
|
245
165
|
? ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
|
|
@@ -267,17 +187,16 @@ export function useUserInfoForm(props) {
|
|
|
267
187
|
allCountries: countries,
|
|
268
188
|
regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
|
|
269
189
|
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,
|
|
271
190
|
},
|
|
272
191
|
states: {
|
|
273
192
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
274
193
|
hideState: !hasStates,
|
|
275
194
|
hideSteps: !!context.hideSteps,
|
|
276
|
-
disabled: loading
|
|
195
|
+
disabled: loading,
|
|
277
196
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
278
|
-
loading: loading
|
|
279
|
-
isPartner: !!((
|
|
280
|
-
isUser: !!((
|
|
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),
|
|
281
200
|
formState: {
|
|
282
201
|
...userFormContext,
|
|
283
202
|
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:
|
|
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) ? {
|
|
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:
|
|
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) ? {
|
|
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) ? {
|