@saasquatch/mint-components 2.0.2-4 → 2.0.2-6
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/{IndirectTaxDetailsView-e5f70b8b.js → IndirectTaxDetailsView-dce2a79b.js} +2 -2
- package/dist/cjs/{ShadowViewAddon-925a8fa6.js → ShadowViewAddon-357bc625.js} +8 -8
- package/dist/cjs/{usePayoutStatus-95874989.js → data-16106637.js} +129 -155
- package/dist/cjs/{global-8bba5b3a.js → global-3d01d469.js} +5 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mint-components.cjs.js +2 -2
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +114 -344
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +29 -224
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/sqm-header-logo.cjs.entry.js +1 -14
- package/dist/cjs/{sqm-lead-checkbox-field-view-340acad0.js → sqm-lead-checkbox-field-view-ebb9ead9.js} +1 -1
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-lead-input-field-view-06ed3632.js → sqm-lead-input-field-view-62debb73.js} +1 -1
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +3 -3
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-5518eb0d.js → sqm-portal-email-verification-view-c280139a.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-615e6975.js → sqm-portal-profile-view-7bca5749.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +8 -9
- package/dist/cjs/{useLeadFormState-fd0445f9.js → useLeadFormState-593f5d39.js} +1 -1
- package/dist/cjs/{utils-83d125fa.js → utils-5167439f.js} +1 -1
- package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +3 -80
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +3 -3
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +4 -4
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -2
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +40 -46
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +2 -90
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +0 -353
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +3 -30
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +1 -301
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +2 -92
- 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 -92
- package/dist/collection/global/styles.js +5 -1
- package/dist/collection/global/styles.ts +5 -1
- package/dist/esm/{IndirectTaxDetailsView-0a57b622.js → IndirectTaxDetailsView-b7fa596b.js} +2 -2
- package/dist/esm/{ShadowViewAddon-aae27c2e.js → ShadowViewAddon-32559cba.js} +8 -8
- package/dist/esm/{usePayoutStatus-c515b24b.js → data-acdb790f.js} +130 -156
- package/dist/esm/{global-1099f20d.js → global-55e73040.js} +5 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mint-components.js +2 -2
- package/dist/esm/sqm-banking-info-form_10.entry.js +65 -295
- package/dist/esm/sqm-big-stat_47.entry.js +7 -202
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification.entry.js +1 -1
- package/dist/esm/sqm-empty_4.entry.js +1 -1
- package/dist/esm/sqm-header-logo.entry.js +1 -14
- package/dist/esm/{sqm-lead-checkbox-field-view-cbafee07.js → sqm-lead-checkbox-field-view-c359cc95.js} +1 -1
- package/dist/esm/sqm-lead-checkbox-field.entry.js +3 -3
- package/dist/esm/{sqm-lead-input-field-view-f3775c28.js → sqm-lead-input-field-view-6fe71f32.js} +1 -1
- package/dist/esm/sqm-lead-input-field.entry.js +3 -3
- package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-7d86299c.js → sqm-portal-email-verification-view-176ddb91.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-3ed13e4d.js → sqm-portal-profile-view-6a53716b.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +8 -9
- package/dist/esm/{useLeadFormState-c379e5d7.js → useLeadFormState-d8667862.js} +1 -1
- package/dist/esm/{utils-6122971b.js → utils-27fdc7d7.js} +1 -1
- package/dist/esm-es5/{IndirectTaxDetailsView-0a57b622.js → IndirectTaxDetailsView-b7fa596b.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-aae27c2e.js → ShadowViewAddon-32559cba.js} +1 -1
- package/dist/esm-es5/data-acdb790f.js +6 -0
- package/dist/esm-es5/{global-1099f20d.js → global-55e73040.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_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-checkbox-field-view-cbafee07.js → sqm-lead-checkbox-field-view-c359cc95.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-f3775c28.js → sqm-lead-input-field-view-6fe71f32.js} +1 -1
- package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-7d86299c.js → sqm-portal-email-verification-view-176ddb91.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-3ed13e4d.js → sqm-portal-profile-view-6a53716b.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{useLeadFormState-c379e5d7.js → useLeadFormState-d8667862.js} +1 -1
- package/dist/esm-es5/{utils-6122971b.js → utils-27fdc7d7.js} +1 -1
- package/dist/mint-components/global/styles.ts +5 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-f0eae4e6.system.js → p-0c6259b2.system.js} +1 -1
- package/dist/mint-components/{p-aefaec37.entry.js → p-130fd1d8.entry.js} +1 -1
- package/dist/mint-components/p-17e3f564.system.entry.js +1 -0
- package/dist/mint-components/{p-db1a0db1.js → p-1b7900ed.js} +1 -1
- package/dist/mint-components/{p-ed16b35a.js → p-23c21cf4.js} +1 -1
- package/dist/mint-components/{p-aa08457e.system.js → p-271c092c.system.js} +1 -1
- package/dist/mint-components/{p-5f3eafd4.entry.js → p-2e0a3d84.entry.js} +2 -2
- package/dist/mint-components/{p-0649123a.system.entry.js → p-3aba7c3a.system.entry.js} +1 -1
- package/dist/mint-components/{p-4c811d12.entry.js → p-449314ca.entry.js} +1 -1
- package/dist/mint-components/p-469a6450.system.js +6 -0
- package/dist/mint-components/{p-f401ef19.system.entry.js → p-46a22d08.system.entry.js} +1 -1
- package/dist/mint-components/{p-57ce33dd.js → p-47b73018.js} +2 -2
- package/dist/mint-components/{p-60465a2d.system.js → p-4cfa1432.system.js} +1 -1
- package/dist/mint-components/{p-c85f204b.system.js → p-52123353.system.js} +1 -1
- package/dist/mint-components/{p-bec87ac9.system.entry.js → p-54154ed4.system.entry.js} +1 -1
- package/dist/mint-components/{p-47c83656.entry.js → p-5a8911c7.entry.js} +1 -1
- package/dist/mint-components/{p-56009bf0.system.entry.js → p-5b088b96.system.entry.js} +1 -1
- package/dist/mint-components/{p-6d5bd95a.js → p-618d249d.js} +1 -1
- package/dist/mint-components/{p-22a9114f.system.entry.js → p-6ec7b746.system.entry.js} +1 -1
- package/dist/mint-components/{p-6445e926.system.entry.js → p-709cdbf7.system.entry.js} +1 -1
- package/dist/mint-components/{p-38f932ae.system.js → p-73fdd315.system.js} +1 -1
- package/dist/mint-components/{p-4ce51b1c.system.entry.js → p-745a27ee.system.entry.js} +1 -1
- package/dist/mint-components/{p-6d9ce4e5.entry.js → p-757820a4.entry.js} +1 -1
- package/dist/mint-components/{p-18720462.system.entry.js → p-7a2375c3.system.entry.js} +1 -1
- package/dist/mint-components/{p-d3120982.system.entry.js → p-84632241.system.entry.js} +1 -1
- package/dist/mint-components/{p-aa8c6332.js → p-887e3b03.js} +1 -1
- package/dist/mint-components/p-8a2ec966.entry.js +1 -0
- package/dist/mint-components/p-8a458176.entry.js +273 -0
- package/dist/mint-components/{p-60c14cec.entry.js → p-93f37676.entry.js} +1 -1
- package/dist/mint-components/{p-7a268047.js → p-9504b639.js} +1 -1
- package/dist/mint-components/{p-717b6730.system.entry.js → p-959925bf.system.entry.js} +1 -1
- package/dist/mint-components/p-9d4f1401.system.entry.js +1 -0
- package/dist/mint-components/{p-4fed8672.js → p-9db05d78.js} +1 -1
- package/dist/mint-components/p-9ff60e10.system.js +1 -0
- package/dist/mint-components/p-a7ee19dc.entry.js +1 -0
- package/dist/mint-components/{p-c994512c.system.js → p-aeea89b4.system.js} +1 -1
- package/dist/mint-components/{p-a5c63310.entry.js → p-b427cf9e.entry.js} +1 -1
- package/dist/mint-components/{p-511c87ce.system.entry.js → p-b5905137.system.entry.js} +1 -1
- package/dist/mint-components/{p-14e813a7.system.entry.js → p-b9d63ca9.system.entry.js} +1 -1
- package/dist/mint-components/{p-a217cc8d.entry.js → p-bcb8532f.entry.js} +1 -1
- package/dist/mint-components/{p-e0a724dd.system.js → p-bcc61fbe.system.js} +1 -1
- package/dist/mint-components/{p-00bc7211.js → p-c25e76f7.js} +1 -1
- package/dist/mint-components/{p-6c006998.entry.js → p-c803eaed.entry.js} +1 -1
- package/dist/mint-components/p-c8bbd212.entry.js +99 -0
- package/dist/mint-components/{p-5d059c95.entry.js → p-da0a7fa5.entry.js} +1 -1
- package/dist/mint-components/p-e1e7d01c.js +157 -0
- package/dist/mint-components/{p-ad4348c3.system.js → p-e8661eaa.system.js} +1 -1
- package/dist/mint-components/{p-79a3344f.js → p-ec0f9326.js} +1 -1
- package/dist/mint-components/p-eea87fdc.system.entry.js +1 -0
- package/dist/mint-components/{p-74f43a08.system.js → p-f9c3290d.system.js} +1 -1
- package/dist/mint-components/p-fac02d24.entry.js +1 -0
- package/dist/types/components/sqm-header-logo/sqm-header-logo.d.ts +1 -14
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +0 -24
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +0 -16
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +0 -57
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -3
- 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 +41 -331
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/shoelace/assets/icons/twitter-x.svg +4 -0
- package/dist/esm-es5/usePayoutStatus-c515b24b.js +0 -6
- package/dist/mint-components/p-09ab53fb.system.entry.js +0 -1
- package/dist/mint-components/p-1c1ae908.system.js +0 -6
- package/dist/mint-components/p-296dea25.system.entry.js +0 -1
- package/dist/mint-components/p-69ed04cc.entry.js +0 -273
- package/dist/mint-components/p-6eb050f1.system.entry.js +0 -1
- package/dist/mint-components/p-8b5b2acc.entry.js +0 -1
- package/dist/mint-components/p-967a9040.system.js +0 -1
- package/dist/mint-components/p-9c3ad5dc.entry.js +0 -99
- package/dist/mint-components/p-ab111e29.entry.js +0 -1
- package/dist/mint-components/p-c9cceb05.js +0 -157
- package/dist/mint-components/p-ea0bc627.entry.js +0 -1
- package/dist/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -2
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
|
@@ -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
|
*/
|
|
@@ -1414,258 +1366,6 @@ export class TaxAndCashDashboard {
|
|
|
1414
1366
|
"reflect": false,
|
|
1415
1367
|
"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}.\""
|
|
1416
1368
|
},
|
|
1417
|
-
"paymentHoldOnChangeHeader": {
|
|
1418
|
-
"type": "string",
|
|
1419
|
-
"mutable": false,
|
|
1420
|
-
"complexType": {
|
|
1421
|
-
"original": "string",
|
|
1422
|
-
"resolved": "string",
|
|
1423
|
-
"references": {}
|
|
1424
|
-
},
|
|
1425
|
-
"required": false,
|
|
1426
|
-
"optional": false,
|
|
1427
|
-
"docs": {
|
|
1428
|
-
"tags": [{
|
|
1429
|
-
"text": "Payment hold on change alert header",
|
|
1430
|
-
"name": "uiName"
|
|
1431
|
-
}],
|
|
1432
|
-
"text": ""
|
|
1433
|
-
},
|
|
1434
|
-
"attribute": "payment-hold-on-change-header",
|
|
1435
|
-
"reflect": false,
|
|
1436
|
-
"defaultValue": "\"We are reviewing your new payout settings\""
|
|
1437
|
-
},
|
|
1438
|
-
"paymentHoldOnChangeDescription": {
|
|
1439
|
-
"type": "string",
|
|
1440
|
-
"mutable": false,
|
|
1441
|
-
"complexType": {
|
|
1442
|
-
"original": "string",
|
|
1443
|
-
"resolved": "string",
|
|
1444
|
-
"references": {}
|
|
1445
|
-
},
|
|
1446
|
-
"required": false,
|
|
1447
|
-
"optional": false,
|
|
1448
|
-
"docs": {
|
|
1449
|
-
"tags": [{
|
|
1450
|
-
"text": "Payment hold on change alert description",
|
|
1451
|
-
"name": "uiName"
|
|
1452
|
-
}],
|
|
1453
|
-
"text": ""
|
|
1454
|
-
},
|
|
1455
|
-
"attribute": "payment-hold-on-change-description",
|
|
1456
|
-
"reflect": false,
|
|
1457
|
-
"defaultValue": "\"Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.\""
|
|
1458
|
-
},
|
|
1459
|
-
"beneficiaryNameInvalidHeader": {
|
|
1460
|
-
"type": "string",
|
|
1461
|
-
"mutable": false,
|
|
1462
|
-
"complexType": {
|
|
1463
|
-
"original": "string",
|
|
1464
|
-
"resolved": "string",
|
|
1465
|
-
"references": {}
|
|
1466
|
-
},
|
|
1467
|
-
"required": false,
|
|
1468
|
-
"optional": false,
|
|
1469
|
-
"docs": {
|
|
1470
|
-
"tags": [{
|
|
1471
|
-
"text": "Beneficiary name invalid alert header",
|
|
1472
|
-
"name": "uiName"
|
|
1473
|
-
}],
|
|
1474
|
-
"text": ""
|
|
1475
|
-
},
|
|
1476
|
-
"attribute": "beneficiary-name-invalid-header",
|
|
1477
|
-
"reflect": false,
|
|
1478
|
-
"defaultValue": "\"Your payment information does not match your tax form\""
|
|
1479
|
-
},
|
|
1480
|
-
"beneficiaryNameInvalidDescription": {
|
|
1481
|
-
"type": "string",
|
|
1482
|
-
"mutable": false,
|
|
1483
|
-
"complexType": {
|
|
1484
|
-
"original": "string",
|
|
1485
|
-
"resolved": "string",
|
|
1486
|
-
"references": {}
|
|
1487
|
-
},
|
|
1488
|
-
"required": false,
|
|
1489
|
-
"optional": false,
|
|
1490
|
-
"docs": {
|
|
1491
|
-
"tags": [{
|
|
1492
|
-
"text": "Beneficiary name invalid description",
|
|
1493
|
-
"name": "uiName"
|
|
1494
|
-
}],
|
|
1495
|
-
"text": ""
|
|
1496
|
-
},
|
|
1497
|
-
"attribute": "beneficiary-name-invalid-description",
|
|
1498
|
-
"reflect": false,
|
|
1499
|
-
"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.\""
|
|
1500
|
-
},
|
|
1501
|
-
"beneficiaryNameMismatchHeader": {
|
|
1502
|
-
"type": "string",
|
|
1503
|
-
"mutable": false,
|
|
1504
|
-
"complexType": {
|
|
1505
|
-
"original": "string",
|
|
1506
|
-
"resolved": "string",
|
|
1507
|
-
"references": {}
|
|
1508
|
-
},
|
|
1509
|
-
"required": false,
|
|
1510
|
-
"optional": false,
|
|
1511
|
-
"docs": {
|
|
1512
|
-
"tags": [{
|
|
1513
|
-
"text": "Beneficiary name mismatch alert header",
|
|
1514
|
-
"name": "uiName"
|
|
1515
|
-
}],
|
|
1516
|
-
"text": ""
|
|
1517
|
-
},
|
|
1518
|
-
"attribute": "beneficiary-name-mismatch-header",
|
|
1519
|
-
"reflect": false,
|
|
1520
|
-
"defaultValue": "\"Your payment information does not match your tax form\""
|
|
1521
|
-
},
|
|
1522
|
-
"beneficiaryNameMismatchDescription": {
|
|
1523
|
-
"type": "string",
|
|
1524
|
-
"mutable": false,
|
|
1525
|
-
"complexType": {
|
|
1526
|
-
"original": "string",
|
|
1527
|
-
"resolved": "string",
|
|
1528
|
-
"references": {}
|
|
1529
|
-
},
|
|
1530
|
-
"required": false,
|
|
1531
|
-
"optional": false,
|
|
1532
|
-
"docs": {
|
|
1533
|
-
"tags": [{
|
|
1534
|
-
"text": "Beneficiary name mismatch alert description",
|
|
1535
|
-
"name": "uiName"
|
|
1536
|
-
}],
|
|
1537
|
-
"text": ""
|
|
1538
|
-
},
|
|
1539
|
-
"attribute": "beneficiary-name-mismatch-description",
|
|
1540
|
-
"reflect": false,
|
|
1541
|
-
"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.\""
|
|
1542
|
-
},
|
|
1543
|
-
"bankTaxNameMismatchHeader": {
|
|
1544
|
-
"type": "string",
|
|
1545
|
-
"mutable": false,
|
|
1546
|
-
"complexType": {
|
|
1547
|
-
"original": "string",
|
|
1548
|
-
"resolved": "string",
|
|
1549
|
-
"references": {}
|
|
1550
|
-
},
|
|
1551
|
-
"required": false,
|
|
1552
|
-
"optional": false,
|
|
1553
|
-
"docs": {
|
|
1554
|
-
"tags": [{
|
|
1555
|
-
"text": "Bank name mismatch alert header",
|
|
1556
|
-
"name": "uiName"
|
|
1557
|
-
}],
|
|
1558
|
-
"text": ""
|
|
1559
|
-
},
|
|
1560
|
-
"attribute": "bank-tax-name-mismatch-header",
|
|
1561
|
-
"reflect": false,
|
|
1562
|
-
"defaultValue": "\"Your payment information does not match your tax form\""
|
|
1563
|
-
},
|
|
1564
|
-
"bankTaxNameMismatchDescription": {
|
|
1565
|
-
"type": "string",
|
|
1566
|
-
"mutable": false,
|
|
1567
|
-
"complexType": {
|
|
1568
|
-
"original": "string",
|
|
1569
|
-
"resolved": "string",
|
|
1570
|
-
"references": {}
|
|
1571
|
-
},
|
|
1572
|
-
"required": false,
|
|
1573
|
-
"optional": false,
|
|
1574
|
-
"docs": {
|
|
1575
|
-
"tags": [{
|
|
1576
|
-
"text": "Bank name mismatch alert description",
|
|
1577
|
-
"name": "uiName"
|
|
1578
|
-
}],
|
|
1579
|
-
"text": ""
|
|
1580
|
-
},
|
|
1581
|
-
"attribute": "bank-tax-name-mismatch-description",
|
|
1582
|
-
"reflect": false,
|
|
1583
|
-
"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.\""
|
|
1584
|
-
},
|
|
1585
|
-
"withdrawalSettingsInvalidHeader": {
|
|
1586
|
-
"type": "string",
|
|
1587
|
-
"mutable": false,
|
|
1588
|
-
"complexType": {
|
|
1589
|
-
"original": "string",
|
|
1590
|
-
"resolved": "string",
|
|
1591
|
-
"references": {}
|
|
1592
|
-
},
|
|
1593
|
-
"required": false,
|
|
1594
|
-
"optional": false,
|
|
1595
|
-
"docs": {
|
|
1596
|
-
"tags": [{
|
|
1597
|
-
"text": "Withdrawal settings invalid alert header",
|
|
1598
|
-
"name": "uiName"
|
|
1599
|
-
}],
|
|
1600
|
-
"text": ""
|
|
1601
|
-
},
|
|
1602
|
-
"attribute": "withdrawal-settings-invalid-header",
|
|
1603
|
-
"reflect": false,
|
|
1604
|
-
"defaultValue": "\"Your payment information includes invalid characters\""
|
|
1605
|
-
},
|
|
1606
|
-
"withdrawalSettingsInvalidDescription": {
|
|
1607
|
-
"type": "string",
|
|
1608
|
-
"mutable": false,
|
|
1609
|
-
"complexType": {
|
|
1610
|
-
"original": "string",
|
|
1611
|
-
"resolved": "string",
|
|
1612
|
-
"references": {}
|
|
1613
|
-
},
|
|
1614
|
-
"required": false,
|
|
1615
|
-
"optional": false,
|
|
1616
|
-
"docs": {
|
|
1617
|
-
"tags": [{
|
|
1618
|
-
"text": "Withdrawal settings invalid alert description",
|
|
1619
|
-
"name": "uiName"
|
|
1620
|
-
}],
|
|
1621
|
-
"text": ""
|
|
1622
|
-
},
|
|
1623
|
-
"attribute": "withdrawal-settings-invalid-description",
|
|
1624
|
-
"reflect": false,
|
|
1625
|
-
"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.\""
|
|
1626
|
-
},
|
|
1627
|
-
"paymentReturnedHeader": {
|
|
1628
|
-
"type": "string",
|
|
1629
|
-
"mutable": false,
|
|
1630
|
-
"complexType": {
|
|
1631
|
-
"original": "string",
|
|
1632
|
-
"resolved": "string",
|
|
1633
|
-
"references": {}
|
|
1634
|
-
},
|
|
1635
|
-
"required": false,
|
|
1636
|
-
"optional": false,
|
|
1637
|
-
"docs": {
|
|
1638
|
-
"tags": [{
|
|
1639
|
-
"text": "Payment returned alert header",
|
|
1640
|
-
"name": "uiName"
|
|
1641
|
-
}],
|
|
1642
|
-
"text": ""
|
|
1643
|
-
},
|
|
1644
|
-
"attribute": "payment-returned-header",
|
|
1645
|
-
"reflect": false,
|
|
1646
|
-
"defaultValue": "\"Payout unsuccessful\""
|
|
1647
|
-
},
|
|
1648
|
-
"paymentReturnedDescription": {
|
|
1649
|
-
"type": "string",
|
|
1650
|
-
"mutable": false,
|
|
1651
|
-
"complexType": {
|
|
1652
|
-
"original": "string",
|
|
1653
|
-
"resolved": "string",
|
|
1654
|
-
"references": {}
|
|
1655
|
-
},
|
|
1656
|
-
"required": false,
|
|
1657
|
-
"optional": false,
|
|
1658
|
-
"docs": {
|
|
1659
|
-
"tags": [{
|
|
1660
|
-
"text": "Payment returned alert description",
|
|
1661
|
-
"name": "uiName"
|
|
1662
|
-
}],
|
|
1663
|
-
"text": ""
|
|
1664
|
-
},
|
|
1665
|
-
"attribute": "payment-returned-description",
|
|
1666
|
-
"reflect": false,
|
|
1667
|
-
"defaultValue": "\"Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.\""
|
|
1668
|
-
},
|
|
1669
1369
|
"termsAndConditions": {
|
|
1670
1370
|
"type": "string",
|
|
1671
1371
|
"mutable": false,
|
package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js
CHANGED
|
@@ -287,12 +287,6 @@ export const UserInfoFormView = (props) => {
|
|
|
287
287
|
default:
|
|
288
288
|
regionLabel = text.state;
|
|
289
289
|
}
|
|
290
|
-
function isDisabledInput(field) {
|
|
291
|
-
var _a;
|
|
292
|
-
if (states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]))
|
|
293
|
-
return true;
|
|
294
|
-
return false;
|
|
295
|
-
}
|
|
296
290
|
return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
297
291
|
h("style", { type: "text/css" },
|
|
298
292
|
styleString,
|
|
@@ -333,22 +327,18 @@ export const UserInfoFormView = (props) => {
|
|
|
333
327
|
})))),
|
|
334
328
|
h("div", null,
|
|
335
329
|
h("div", { class: classes.InputContainer },
|
|
336
|
-
h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
|
|
337
|
-
states.isUser ||
|
|
338
|
-
isDisabledInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
330
|
+
h("sl-input", Object.assign({ class: "ErrorInput", 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) ? {
|
|
339
331
|
class: classes.ErrorInput,
|
|
340
332
|
helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
|
|
341
333
|
}
|
|
342
334
|
: {}), { id: "firstName", name: "/firstName", required: true })),
|
|
343
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
|
|
344
|
-
states.isUser ||
|
|
345
|
-
isDisabledInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
|
|
335
|
+
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) ? {
|
|
346
336
|
class: classes.ErrorInput,
|
|
347
337
|
helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
|
|
348
338
|
}
|
|
349
339
|
: {}), { id: "lastName", name: "/lastName", required: true })),
|
|
350
340
|
h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
|
|
351
|
-
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 ||
|
|
341
|
+
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) ? {
|
|
352
342
|
class: classes.ErrorInput,
|
|
353
343
|
helpText: formatErrorMessage(text.country, formState.errors.countryCode),
|
|
354
344
|
}
|
|
@@ -364,8 +354,7 @@ export const UserInfoFormView = (props) => {
|
|
|
364
354
|
h("div", { class: classes.PhoneInputsSection },
|
|
365
355
|
h("p", null, text.phoneNumber),
|
|
366
356
|
h("div", { class: classes.PhoneInputsContainer },
|
|
367
|
-
h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
|
|
368
|
-
isDisabledInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
|
|
357
|
+
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) ? {
|
|
369
358
|
class: classes.ErrorInput,
|
|
370
359
|
}
|
|
371
360
|
: {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
|
|
@@ -391,7 +380,7 @@ export const UserInfoFormView = (props) => {
|
|
|
391
380
|
// Naive phone number validation
|
|
392
381
|
validateBillingField(/[a-zA-Z]+/, value) &&
|
|
393
382
|
formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
|
|
394
|
-
}, disabled: states.disabled ||
|
|
383
|
+
}, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
395
384
|
class: classes.ErrorInput,
|
|
396
385
|
helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
397
386
|
}
|
|
@@ -399,7 +388,7 @@ export const UserInfoFormView = (props) => {
|
|
|
399
388
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
|
|
400
389
|
// Checks for non-ASCII characters
|
|
401
390
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
402
|
-
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
391
|
+
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
|
|
403
392
|
class: classes.ErrorInput,
|
|
404
393
|
helpText: formatErrorMessage(text.address, formState.errors.address),
|
|
405
394
|
}
|
|
@@ -407,22 +396,22 @@ export const UserInfoFormView = (props) => {
|
|
|
407
396
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
|
|
408
397
|
// Checks for non-ASCII characters
|
|
409
398
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
410
|
-
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
399
|
+
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
|
|
411
400
|
class: classes.ErrorInput,
|
|
412
401
|
helpText: formatErrorMessage(text.city, formState.errors.city),
|
|
413
402
|
}
|
|
414
403
|
: {}), { required: true })),
|
|
415
|
-
!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 ||
|
|
404
|
+
!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) ? {
|
|
416
405
|
class: classes.ErrorInput,
|
|
417
406
|
helpText: formatErrorMessage(text.state, formState.errors.state),
|
|
418
407
|
}
|
|
419
408
|
: {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
|
|
420
|
-
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 ||
|
|
409
|
+
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) ? {
|
|
421
410
|
class: classes.ErrorInput,
|
|
422
411
|
helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
|
|
423
412
|
}
|
|
424
413
|
: {}), { required: true })),
|
|
425
|
-
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 ||
|
|
414
|
+
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) ? {
|
|
426
415
|
class: classes.ErrorInput,
|
|
427
416
|
helpText: formatErrorMessage(text.currency, formState.errors.currency),
|
|
428
417
|
}
|
|
@@ -444,7 +433,7 @@ export const UserInfoFormView = (props) => {
|
|
|
444
433
|
h("div", { class: classes.CheckboxWrapper },
|
|
445
434
|
h("sl-checkbox", { checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
|
|
446
435
|
e.target.value = e.target.checked;
|
|
447
|
-
}, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
436
|
+
}, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
448
437
|
((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
|
|
449
|
-
h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
438
|
+
h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
450
439
|
};
|
|
@@ -889,7 +889,7 @@ export class TaxForm {
|
|
|
889
889
|
"mutable": false,
|
|
890
890
|
"complexType": {
|
|
891
891
|
"original": "DemoData<UseUserInfoFormResult>",
|
|
892
|
-
"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; }[];
|
|
892
|
+
"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>; }",
|
|
893
893
|
"references": {
|
|
894
894
|
"DemoData": {
|
|
895
895
|
"location": "import",
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useParent, useParentQueryValue, useParentValue, } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useEffect, useMemo, useRef, useState, } from "@saasquatch/universal-hooks";
|
|
3
3
|
import jsonpointer from "jsonpointer";
|
|
4
4
|
import { CURRENCIES_NAMESPACE, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../data";
|
|
5
5
|
import { ADDRESS_REGIONS } from "../subregions";
|
|
6
|
-
import { objectIsFull
|
|
7
|
-
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
8
|
-
import { CONNECT_PARTNER, } from "../sqm-indirect-tax-form/useIndirectTaxForm";
|
|
6
|
+
import { objectIsFull } from "../utils";
|
|
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,48 +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
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
catch (e) {
|
|
226
|
-
setErrors({ general: true });
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
|
|
160
|
+
const nextStep = context.overrideNextStep || "/2";
|
|
231
161
|
setStep(nextStep);
|
|
232
162
|
}
|
|
233
|
-
// TODO: get from backend
|
|
234
|
-
const hasIndirectTax = false;
|
|
235
|
-
const brandCountry = "";
|
|
236
|
-
function getSkipNextStep(userData) {
|
|
237
|
-
if (userData.countryCode === "US")
|
|
238
|
-
return true;
|
|
239
|
-
if (!hasIndirectTax)
|
|
240
|
-
return true;
|
|
241
|
-
if (hasIndirectTax && userData.countryCode !== brandCountry)
|
|
242
|
-
return true;
|
|
243
|
-
return false;
|
|
244
|
-
}
|
|
245
163
|
const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
|
|
246
164
|
const regionObj = hasStates
|
|
247
165
|
? ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
|
|
@@ -269,17 +187,16 @@ export function useUserInfoForm(props) {
|
|
|
269
187
|
allCountries: countries,
|
|
270
188
|
regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
|
|
271
189
|
regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
|
|
272
|
-
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,
|
|
273
190
|
},
|
|
274
191
|
states: {
|
|
275
192
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
276
193
|
hideState: !hasStates,
|
|
277
194
|
hideSteps: !!context.hideSteps,
|
|
278
|
-
disabled: loading
|
|
195
|
+
disabled: loading,
|
|
279
196
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
280
|
-
loading: loading
|
|
281
|
-
isPartner: !!((
|
|
282
|
-
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),
|
|
283
200
|
formState: {
|
|
284
201
|
...userFormContext,
|
|
285
202
|
errors: formErrors,
|
|
@@ -486,7 +486,7 @@ html {
|
|
|
486
486
|
--sl-transition-fast: 150ms;
|
|
487
487
|
--sl-transition-x-fast: 50ms;
|
|
488
488
|
--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
|
|
489
|
-
--sl-font-sans:
|
|
489
|
+
--sl-font-sans: var(--sqm-primary-font);
|
|
490
490
|
--sl-font-serif: Georgia, "Times New Roman", serif;
|
|
491
491
|
--sl-font-size-xx-small: 0.625rem;
|
|
492
492
|
--sl-font-size-x-small: 0.75rem;
|
|
@@ -872,6 +872,10 @@ sl-button[type="secondary"]::part(base):hover {
|
|
|
872
872
|
border-width: var(--sqm-border-thickness, 1px);
|
|
873
873
|
}
|
|
874
874
|
|
|
875
|
+
*::part(menu-item-base) {
|
|
876
|
+
font-family: var(--sqm-primary-font);
|
|
877
|
+
}
|
|
878
|
+
|
|
875
879
|
*::part(input-base):hover, *::part(select-base):hover, *::part(textarea-base):hover{
|
|
876
880
|
border-color: var(--sqm-border-color-hover);
|
|
877
881
|
}
|
|
@@ -493,7 +493,7 @@ html {
|
|
|
493
493
|
--sl-transition-fast: 150ms;
|
|
494
494
|
--sl-transition-x-fast: 50ms;
|
|
495
495
|
--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
|
|
496
|
-
--sl-font-sans:
|
|
496
|
+
--sl-font-sans: var(--sqm-primary-font);
|
|
497
497
|
--sl-font-serif: Georgia, "Times New Roman", serif;
|
|
498
498
|
--sl-font-size-xx-small: 0.625rem;
|
|
499
499
|
--sl-font-size-x-small: 0.75rem;
|
|
@@ -975,6 +975,10 @@ sl-button[type="secondary"]::part(base):hover {
|
|
|
975
975
|
border-width: var(--sqm-border-thickness, 1px);
|
|
976
976
|
}
|
|
977
977
|
|
|
978
|
+
*::part(menu-item-base) {
|
|
979
|
+
font-family: var(--sqm-primary-font);
|
|
980
|
+
}
|
|
981
|
+
|
|
978
982
|
*::part(input-base):hover, *::part(select-base):hover, *::part(textarea-base):hover{
|
|
979
983
|
border-color: var(--sqm-border-color-hover);
|
|
980
984
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from './index-b3a06de8.js';
|
|
2
|
-
import { i as intl } from './global-
|
|
2
|
+
import { i as intl } from './global-55e73040.js';
|
|
3
3
|
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
4
|
-
import { f as formatErrorMessage } from './utils-
|
|
4
|
+
import { f as formatErrorMessage } from './utils-27fdc7d7.js';
|
|
5
5
|
|
|
6
6
|
const style = {
|
|
7
7
|
Description: {
|