@saasquatch/mint-components 1.8.0-101 → 1.8.0-102
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/sqm-banking-info-form_16.cjs.entry.js +12 -20
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +4 -14
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +6 -6
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +2 -0
- package/dist/esm/sqm-banking-info-form_16.entry.js +12 -20
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-1d321e05.system.entry.js +1 -0
- package/dist/mint-components/p-576c9eed.entry.js +148 -0
- package/dist/mint-components/p-d5364cae.system.js +1 -1
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +2 -1
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/mint-components/p-321a6f30.entry.js +0 -148
- package/dist/mint-components/p-3b0c7a5e.system.entry.js +0 -1
|
@@ -1205,10 +1205,9 @@ const paypalFeeMap = {
|
|
|
1205
1205
|
const ACH_PAYMENT_METHOD = 3;
|
|
1206
1206
|
const WIRE_PAYMENT_METHOD = 5;
|
|
1207
1207
|
const PAYPAL_PAYMENT_METHOD = 7;
|
|
1208
|
-
function getFormMap({ props, getValidationErrorMessage, }) {
|
|
1208
|
+
function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
1209
1209
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
|
|
1210
1210
|
const { errors, ...formState } = props.states.formState;
|
|
1211
|
-
const country = props.states.bankCountry;
|
|
1212
1211
|
return {
|
|
1213
1212
|
0: {
|
|
1214
1213
|
input: (index.h("sl-input", Object.assign({ required: true, label: props.text.beneficiaryAccountNameLabel, name: "/beneficiaryAccountName", id: "beneficiaryAccountName", key: "beneficiaryAccountName", type: "text" }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.beneficiaryAccountName) && {
|
|
@@ -1262,7 +1261,7 @@ function getFormMap({ props, getValidationErrorMessage, }) {
|
|
|
1262
1261
|
id: "routingCodeText",
|
|
1263
1262
|
defaultMessage: props.text.routingCodeLabel,
|
|
1264
1263
|
}, {
|
|
1265
|
-
|
|
1264
|
+
bankCountry,
|
|
1266
1265
|
}), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((_r = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _r === void 0 ? void 0 : _r.routingCode) && {
|
|
1267
1266
|
class: "error-input",
|
|
1268
1267
|
helpText: getValidationErrorMessage({
|
|
@@ -1271,7 +1270,7 @@ function getFormMap({ props, getValidationErrorMessage, }) {
|
|
|
1271
1270
|
id: "routingCodeErrorText",
|
|
1272
1271
|
defaultMessage: props.text.routingCodeLabel,
|
|
1273
1272
|
}, {
|
|
1274
|
-
|
|
1273
|
+
bankCountry,
|
|
1275
1274
|
}),
|
|
1276
1275
|
}),
|
|
1277
1276
|
})))),
|
|
@@ -1301,7 +1300,7 @@ function getFormMap({ props, getValidationErrorMessage, }) {
|
|
|
1301
1300
|
id: "fxWireText",
|
|
1302
1301
|
defaultMessage: props.text.taxPayerIdLabel,
|
|
1303
1302
|
}, {
|
|
1304
|
-
|
|
1303
|
+
bankCountry,
|
|
1305
1304
|
}), type: "text", name: "/taxPayerId", id: "taxPayerId", key: "taxPayerId" }, (((_0 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _0 === void 0 ? void 0 : _0.taxPayerId) && {
|
|
1306
1305
|
class: "error-input",
|
|
1307
1306
|
helpText: getValidationErrorMessage({
|
|
@@ -1540,7 +1539,7 @@ function useBankingInfoForm(props) {
|
|
|
1540
1539
|
return true;
|
|
1541
1540
|
return false;
|
|
1542
1541
|
});
|
|
1543
|
-
setFormState((p) => ({
|
|
1542
|
+
setFormState((p) => ({ ...p, bankCountry }));
|
|
1544
1543
|
setCurrentPaymentOption(currentPaymentOption);
|
|
1545
1544
|
};
|
|
1546
1545
|
const onSubmit = async (event) => {
|
|
@@ -1661,6 +1660,7 @@ function useBankingInfoForm(props) {
|
|
|
1661
1660
|
thresholds: ((_h = currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.thresholdOptions) === null || _h === void 0 ? void 0 : _h.split(",")) || [],
|
|
1662
1661
|
countries,
|
|
1663
1662
|
hasPayPal,
|
|
1663
|
+
bankCountry: formState.bankCountry,
|
|
1664
1664
|
},
|
|
1665
1665
|
refs: {
|
|
1666
1666
|
formRef,
|
|
@@ -1791,7 +1791,7 @@ const BankingInfoForm = class {
|
|
|
1791
1791
|
* Label text for the routing code input field
|
|
1792
1792
|
* @uiName Routing code input label
|
|
1793
1793
|
*/
|
|
1794
|
-
this.routingCodeLabel = "{
|
|
1794
|
+
this.routingCodeLabel = "{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }";
|
|
1795
1795
|
/**
|
|
1796
1796
|
* Label text for the bank name input field
|
|
1797
1797
|
* @uiName Bank name input label
|
|
@@ -1975,15 +1975,12 @@ const BankingInfoForm = class {
|
|
|
1975
1975
|
const formMap = getFormMap({
|
|
1976
1976
|
props,
|
|
1977
1977
|
getValidationErrorMessage,
|
|
1978
|
+
bankCountry: props.states.bankCountry,
|
|
1978
1979
|
});
|
|
1979
1980
|
const inputFields = getFormInputs({
|
|
1980
1981
|
bitset: props.states.bitset,
|
|
1981
1982
|
formMap,
|
|
1982
1983
|
});
|
|
1983
|
-
console.log({
|
|
1984
|
-
formState: props.states.formState,
|
|
1985
|
-
thresholds: props.states.thresholds,
|
|
1986
|
-
});
|
|
1987
1984
|
return (index.h(index.Host, null, index.h(BankingInfoFormView, { callbacks: props.callbacks, text: props.text, states: props.states, refs: props.refs, slots: {
|
|
1988
1985
|
formInputsSlot: inputFields === null || inputFields === void 0 ? void 0 : inputFields.map(({ input }) => input),
|
|
1989
1986
|
countryInputSlot: (index.h("sl-select", Object.assign({ label: props.text.bankLocationLabel, required: true, name: "/bankCountry", id: "bankCountry", value: props.states.formState.bankCountry, "onSl-select": (e) => { var _a, _b; return props.callbacks.setBankCountry((_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.value); } }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.bankCountry) && {
|
|
@@ -2038,13 +2035,6 @@ function useDemoBankingInfoForm(props) {
|
|
|
2038
2035
|
});
|
|
2039
2036
|
const bitset = (currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.withdrawalSettingId) || ((_p = (_o = props.demoData) === null || _o === void 0 ? void 0 : _o.states) === null || _p === void 0 ? void 0 : _p.bitset) ||
|
|
2040
2037
|
0;
|
|
2041
|
-
console.log("demo hook", {
|
|
2042
|
-
demoData: props.demoData,
|
|
2043
|
-
currentPaymentOption,
|
|
2044
|
-
currency,
|
|
2045
|
-
bankCountry,
|
|
2046
|
-
bitset,
|
|
2047
|
-
});
|
|
2048
2038
|
stencilHooks_module.useEffect(() => {
|
|
2049
2039
|
if (defaultPaymentMethodChecked !== paymentMethodChecked)
|
|
2050
2040
|
setPaymentMethodChecked(defaultPaymentMethodChecked);
|
|
@@ -4693,7 +4683,7 @@ const TaxAndCashMonolith = class {
|
|
|
4693
4683
|
* @uiName Beneficiary account name input label
|
|
4694
4684
|
* @uiGroup Step 4 Properties
|
|
4695
4685
|
*/
|
|
4696
|
-
this.step4_beneficiaryAccountNameLabel = "Beneficiary
|
|
4686
|
+
this.step4_beneficiaryAccountNameLabel = "Beneficiary account name";
|
|
4697
4687
|
/**
|
|
4698
4688
|
* Label text for the bank account type input field
|
|
4699
4689
|
* @uiName Bank account type input label
|
|
@@ -4735,7 +4725,7 @@ const TaxAndCashMonolith = class {
|
|
|
4735
4725
|
* @uiName Routing code input label
|
|
4736
4726
|
* @uiGroup Step 4 Properties
|
|
4737
4727
|
*/
|
|
4738
|
-
this.step4_routingCodeLabel = "Routing code";
|
|
4728
|
+
this.step4_routingCodeLabel = "{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }";
|
|
4739
4729
|
/**
|
|
4740
4730
|
* Label text for the bank name input field
|
|
4741
4731
|
* @uiName Bank name input label
|
|
@@ -5528,6 +5518,8 @@ function getCountryName(countryCode, locale) {
|
|
|
5528
5518
|
}
|
|
5529
5519
|
function getSubRegionName(regionCode) {
|
|
5530
5520
|
var _a;
|
|
5521
|
+
if (!regionCode)
|
|
5522
|
+
return "";
|
|
5531
5523
|
// Impact adds an underscore to some regions
|
|
5532
5524
|
const standardCode = regionCode.replace("_", "");
|
|
5533
5525
|
const regions = [...sqmInvoiceTableView.INDIRECT_TAX_PROVINCES, ...sqmInvoiceTableView.INDIRECT_TAX_SPAIN_REGIONS];
|
package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js
CHANGED
|
@@ -137,7 +137,7 @@ export class BankingInfoForm {
|
|
|
137
137
|
* Label text for the routing code input field
|
|
138
138
|
* @uiName Routing code input label
|
|
139
139
|
*/
|
|
140
|
-
this.routingCodeLabel = "{
|
|
140
|
+
this.routingCodeLabel = "{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }";
|
|
141
141
|
/**
|
|
142
142
|
* Label text for the bank name input field
|
|
143
143
|
* @uiName Bank name input label
|
|
@@ -321,15 +321,12 @@ export class BankingInfoForm {
|
|
|
321
321
|
const formMap = getFormMap({
|
|
322
322
|
props,
|
|
323
323
|
getValidationErrorMessage,
|
|
324
|
+
bankCountry: props.states.bankCountry,
|
|
324
325
|
});
|
|
325
326
|
const inputFields = getFormInputs({
|
|
326
327
|
bitset: props.states.bitset,
|
|
327
328
|
formMap,
|
|
328
329
|
});
|
|
329
|
-
console.log({
|
|
330
|
-
formState: props.states.formState,
|
|
331
|
-
thresholds: props.states.thresholds,
|
|
332
|
-
});
|
|
333
330
|
return (h(Host, null,
|
|
334
331
|
h(BankingInfoFormView, { callbacks: props.callbacks, text: props.text, states: props.states, refs: props.refs, slots: {
|
|
335
332
|
formInputsSlot: inputFields === null || inputFields === void 0 ? void 0 : inputFields.map(({ input }) => input),
|
|
@@ -872,7 +869,7 @@ export class BankingInfoForm {
|
|
|
872
869
|
},
|
|
873
870
|
"attribute": "routing-code-label",
|
|
874
871
|
"reflect": false,
|
|
875
|
-
"defaultValue": "\"{
|
|
872
|
+
"defaultValue": "\"{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }\""
|
|
876
873
|
},
|
|
877
874
|
"bankNameLabel": {
|
|
878
875
|
"type": "string",
|
|
@@ -1467,7 +1464,7 @@ export class BankingInfoForm {
|
|
|
1467
1464
|
"mutable": false,
|
|
1468
1465
|
"complexType": {
|
|
1469
1466
|
"original": "DemoData<BankingInfoFormViewProps>",
|
|
1470
|
-
"resolved": "{ states?: { step?: string; locale?: string; loading: boolean; saveLoading?: boolean; disabled: boolean; saveDisabled: boolean; hideSteps?: boolean; hasPayPal: boolean; hideBanking?: boolean; hidePayPal?: boolean; hideBalanceThreshold?: boolean; hideFixedDay?: boolean; hideBackButton: boolean; feeCap?: string; isPartner: boolean; paymentMethodFeeLabel?: string; loadingError: boolean; formState: BankingInfoFormData & { paymentMethodChecked?: \"toBankAccount\" | \"toPayPalAccount\"; paymentScheduleChecked?: \"BALANCE_THRESHOLD\" | \"FIXED_DAY\"; errors?: { general?: boolean; inputErrors?: { [field: string]: { type: \"required\" | \"invalid\"; }; }; }; }; bitset?: number; currency?: string; thresholds: string[]; countries?: { code: string; name: string; }[]; currentPaymentOption?: any; showInputs?: boolean; }; slots?: { formInputsSlot?: VNode[]; countryInputSlot?: VNode; paymentMethodSlot?: VNode; paymentThresholdSelectSlot?: VNode; paymentFixedDaySelectSlot?: VNode; paypalInputSlot?: VNode; }; refs?: { formRef: any; }; }",
|
|
1467
|
+
"resolved": "{ states?: { step?: string; locale?: string; loading: boolean; saveLoading?: boolean; disabled: boolean; saveDisabled: boolean; hideSteps?: boolean; hasPayPal: boolean; hideBanking?: boolean; hidePayPal?: boolean; hideBalanceThreshold?: boolean; hideFixedDay?: boolean; hideBackButton: boolean; feeCap?: string; isPartner: boolean; paymentMethodFeeLabel?: string; loadingError: boolean; formState: BankingInfoFormData & { paymentMethodChecked?: \"toBankAccount\" | \"toPayPalAccount\"; paymentScheduleChecked?: \"BALANCE_THRESHOLD\" | \"FIXED_DAY\"; errors?: { general?: boolean; inputErrors?: { [field: string]: { type: \"required\" | \"invalid\"; }; }; }; }; bitset?: number; currency?: string; thresholds: string[]; countries?: { code: string; name: string; }[]; currentPaymentOption?: any; showInputs?: boolean; bankCountry?: string; }; slots?: { formInputsSlot?: VNode[]; countryInputSlot?: VNode; paymentMethodSlot?: VNode; paymentThresholdSelectSlot?: VNode; paymentFixedDaySelectSlot?: VNode; paypalInputSlot?: VNode; }; refs?: { formRef: any; }; }",
|
|
1471
1468
|
"references": {
|
|
1472
1469
|
"DemoData": {
|
|
1473
1470
|
"location": "import",
|
|
@@ -1515,13 +1512,6 @@ function useDemoBankingInfoForm(props) {
|
|
|
1515
1512
|
});
|
|
1516
1513
|
const bitset = (currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.withdrawalSettingId) || ((_p = (_o = props.demoData) === null || _o === void 0 ? void 0 : _o.states) === null || _p === void 0 ? void 0 : _p.bitset) ||
|
|
1517
1514
|
0;
|
|
1518
|
-
console.log("demo hook", {
|
|
1519
|
-
demoData: props.demoData,
|
|
1520
|
-
currentPaymentOption,
|
|
1521
|
-
currency,
|
|
1522
|
-
bankCountry,
|
|
1523
|
-
bitset,
|
|
1524
|
-
});
|
|
1525
1515
|
useEffect(() => {
|
|
1526
1516
|
if (defaultPaymentMethodChecked !== paymentMethodChecked)
|
|
1527
1517
|
setPaymentMethodChecked(defaultPaymentMethodChecked);
|
|
@@ -26,10 +26,9 @@ export const paypalFeeMap = {
|
|
|
26
26
|
const ACH_PAYMENT_METHOD = 3;
|
|
27
27
|
const WIRE_PAYMENT_METHOD = 5;
|
|
28
28
|
const PAYPAL_PAYMENT_METHOD = 7;
|
|
29
|
-
export function getFormMap({ props, getValidationErrorMessage, }) {
|
|
29
|
+
export function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
30
30
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
|
|
31
31
|
const { errors, ...formState } = props.states.formState;
|
|
32
|
-
const country = props.states.bankCountry;
|
|
33
32
|
return {
|
|
34
33
|
0: {
|
|
35
34
|
input: (h("sl-input", Object.assign({ required: true, label: props.text.beneficiaryAccountNameLabel, name: "/beneficiaryAccountName", id: "beneficiaryAccountName", key: "beneficiaryAccountName", type: "text" }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.beneficiaryAccountName) && {
|
|
@@ -83,7 +82,7 @@ export function getFormMap({ props, getValidationErrorMessage, }) {
|
|
|
83
82
|
id: "routingCodeText",
|
|
84
83
|
defaultMessage: props.text.routingCodeLabel,
|
|
85
84
|
}, {
|
|
86
|
-
|
|
85
|
+
bankCountry,
|
|
87
86
|
}), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((_r = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _r === void 0 ? void 0 : _r.routingCode) && {
|
|
88
87
|
class: "error-input",
|
|
89
88
|
helpText: getValidationErrorMessage({
|
|
@@ -92,7 +91,7 @@ export function getFormMap({ props, getValidationErrorMessage, }) {
|
|
|
92
91
|
id: "routingCodeErrorText",
|
|
93
92
|
defaultMessage: props.text.routingCodeLabel,
|
|
94
93
|
}, {
|
|
95
|
-
|
|
94
|
+
bankCountry,
|
|
96
95
|
}),
|
|
97
96
|
}),
|
|
98
97
|
})))),
|
|
@@ -122,7 +121,7 @@ export function getFormMap({ props, getValidationErrorMessage, }) {
|
|
|
122
121
|
id: "fxWireText",
|
|
123
122
|
defaultMessage: props.text.taxPayerIdLabel,
|
|
124
123
|
}, {
|
|
125
|
-
|
|
124
|
+
bankCountry,
|
|
126
125
|
}), type: "text", name: "/taxPayerId", id: "taxPayerId", key: "taxPayerId" }, (((_0 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _0 === void 0 ? void 0 : _0.taxPayerId) && {
|
|
127
126
|
class: "error-input",
|
|
128
127
|
helpText: getValidationErrorMessage({
|
|
@@ -361,7 +360,7 @@ export function useBankingInfoForm(props) {
|
|
|
361
360
|
return true;
|
|
362
361
|
return false;
|
|
363
362
|
});
|
|
364
|
-
setFormState((p) => ({
|
|
363
|
+
setFormState((p) => ({ ...p, bankCountry }));
|
|
365
364
|
setCurrentPaymentOption(currentPaymentOption);
|
|
366
365
|
};
|
|
367
366
|
const onSubmit = async (event) => {
|
|
@@ -482,6 +481,7 @@ export function useBankingInfoForm(props) {
|
|
|
482
481
|
thresholds: ((_h = currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.thresholdOptions) === null || _h === void 0 ? void 0 : _h.split(",")) || [],
|
|
483
482
|
countries,
|
|
484
483
|
hasPayPal,
|
|
484
|
+
bankCountry: formState.bankCountry,
|
|
485
485
|
},
|
|
486
486
|
refs: {
|
|
487
487
|
formRef,
|
|
@@ -406,7 +406,7 @@ export class TaxAndCashMonolith {
|
|
|
406
406
|
* @uiName Beneficiary account name input label
|
|
407
407
|
* @uiGroup Step 4 Properties
|
|
408
408
|
*/
|
|
409
|
-
this.step4_beneficiaryAccountNameLabel = "Beneficiary
|
|
409
|
+
this.step4_beneficiaryAccountNameLabel = "Beneficiary account name";
|
|
410
410
|
/**
|
|
411
411
|
* Label text for the bank account type input field
|
|
412
412
|
* @uiName Bank account type input label
|
|
@@ -448,7 +448,7 @@ export class TaxAndCashMonolith {
|
|
|
448
448
|
* @uiName Routing code input label
|
|
449
449
|
* @uiGroup Step 4 Properties
|
|
450
450
|
*/
|
|
451
|
-
this.step4_routingCodeLabel = "Routing code";
|
|
451
|
+
this.step4_routingCodeLabel = "{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }";
|
|
452
452
|
/**
|
|
453
453
|
* Label text for the bank name input field
|
|
454
454
|
* @uiName Bank name input label
|
|
@@ -2447,7 +2447,7 @@ export class TaxAndCashMonolith {
|
|
|
2447
2447
|
},
|
|
2448
2448
|
"attribute": "step-4_beneficiary-account-name-label",
|
|
2449
2449
|
"reflect": false,
|
|
2450
|
-
"defaultValue": "\"Beneficiary
|
|
2450
|
+
"defaultValue": "\"Beneficiary account name\""
|
|
2451
2451
|
},
|
|
2452
2452
|
"step4_bankAccountTypeLabel": {
|
|
2453
2453
|
"type": "string",
|
|
@@ -2615,7 +2615,7 @@ export class TaxAndCashMonolith {
|
|
|
2615
2615
|
},
|
|
2616
2616
|
"attribute": "step-4_routing-code-label",
|
|
2617
2617
|
"reflect": false,
|
|
2618
|
-
"defaultValue": "\"Routing code\""
|
|
2618
|
+
"defaultValue": "\"{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }\""
|
|
2619
2619
|
},
|
|
2620
2620
|
"step4_bankNameLabel": {
|
|
2621
2621
|
"type": "string",
|
package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js
CHANGED
|
@@ -23,6 +23,8 @@ function getCountryName(countryCode, locale) {
|
|
|
23
23
|
}
|
|
24
24
|
function getSubRegionName(regionCode) {
|
|
25
25
|
var _a;
|
|
26
|
+
if (!regionCode)
|
|
27
|
+
return "";
|
|
26
28
|
// Impact adds an underscore to some regions
|
|
27
29
|
const standardCode = regionCode.replace("_", "");
|
|
28
30
|
const regions = [...INDIRECT_TAX_PROVINCES, ...INDIRECT_TAX_SPAIN_REGIONS];
|
|
@@ -1201,10 +1201,9 @@ const paypalFeeMap = {
|
|
|
1201
1201
|
const ACH_PAYMENT_METHOD = 3;
|
|
1202
1202
|
const WIRE_PAYMENT_METHOD = 5;
|
|
1203
1203
|
const PAYPAL_PAYMENT_METHOD = 7;
|
|
1204
|
-
function getFormMap({ props, getValidationErrorMessage, }) {
|
|
1204
|
+
function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
1205
1205
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
|
|
1206
1206
|
const { errors, ...formState } = props.states.formState;
|
|
1207
|
-
const country = props.states.bankCountry;
|
|
1208
1207
|
return {
|
|
1209
1208
|
0: {
|
|
1210
1209
|
input: (h("sl-input", Object.assign({ required: true, label: props.text.beneficiaryAccountNameLabel, name: "/beneficiaryAccountName", id: "beneficiaryAccountName", key: "beneficiaryAccountName", type: "text" }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.beneficiaryAccountName) && {
|
|
@@ -1258,7 +1257,7 @@ function getFormMap({ props, getValidationErrorMessage, }) {
|
|
|
1258
1257
|
id: "routingCodeText",
|
|
1259
1258
|
defaultMessage: props.text.routingCodeLabel,
|
|
1260
1259
|
}, {
|
|
1261
|
-
|
|
1260
|
+
bankCountry,
|
|
1262
1261
|
}), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((_r = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _r === void 0 ? void 0 : _r.routingCode) && {
|
|
1263
1262
|
class: "error-input",
|
|
1264
1263
|
helpText: getValidationErrorMessage({
|
|
@@ -1267,7 +1266,7 @@ function getFormMap({ props, getValidationErrorMessage, }) {
|
|
|
1267
1266
|
id: "routingCodeErrorText",
|
|
1268
1267
|
defaultMessage: props.text.routingCodeLabel,
|
|
1269
1268
|
}, {
|
|
1270
|
-
|
|
1269
|
+
bankCountry,
|
|
1271
1270
|
}),
|
|
1272
1271
|
}),
|
|
1273
1272
|
})))),
|
|
@@ -1297,7 +1296,7 @@ function getFormMap({ props, getValidationErrorMessage, }) {
|
|
|
1297
1296
|
id: "fxWireText",
|
|
1298
1297
|
defaultMessage: props.text.taxPayerIdLabel,
|
|
1299
1298
|
}, {
|
|
1300
|
-
|
|
1299
|
+
bankCountry,
|
|
1301
1300
|
}), type: "text", name: "/taxPayerId", id: "taxPayerId", key: "taxPayerId" }, (((_0 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _0 === void 0 ? void 0 : _0.taxPayerId) && {
|
|
1302
1301
|
class: "error-input",
|
|
1303
1302
|
helpText: getValidationErrorMessage({
|
|
@@ -1536,7 +1535,7 @@ function useBankingInfoForm(props) {
|
|
|
1536
1535
|
return true;
|
|
1537
1536
|
return false;
|
|
1538
1537
|
});
|
|
1539
|
-
setFormState((p) => ({
|
|
1538
|
+
setFormState((p) => ({ ...p, bankCountry }));
|
|
1540
1539
|
setCurrentPaymentOption(currentPaymentOption);
|
|
1541
1540
|
};
|
|
1542
1541
|
const onSubmit = async (event) => {
|
|
@@ -1657,6 +1656,7 @@ function useBankingInfoForm(props) {
|
|
|
1657
1656
|
thresholds: ((_h = currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.thresholdOptions) === null || _h === void 0 ? void 0 : _h.split(",")) || [],
|
|
1658
1657
|
countries,
|
|
1659
1658
|
hasPayPal,
|
|
1659
|
+
bankCountry: formState.bankCountry,
|
|
1660
1660
|
},
|
|
1661
1661
|
refs: {
|
|
1662
1662
|
formRef,
|
|
@@ -1787,7 +1787,7 @@ const BankingInfoForm = class {
|
|
|
1787
1787
|
* Label text for the routing code input field
|
|
1788
1788
|
* @uiName Routing code input label
|
|
1789
1789
|
*/
|
|
1790
|
-
this.routingCodeLabel = "{
|
|
1790
|
+
this.routingCodeLabel = "{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }";
|
|
1791
1791
|
/**
|
|
1792
1792
|
* Label text for the bank name input field
|
|
1793
1793
|
* @uiName Bank name input label
|
|
@@ -1971,15 +1971,12 @@ const BankingInfoForm = class {
|
|
|
1971
1971
|
const formMap = getFormMap({
|
|
1972
1972
|
props,
|
|
1973
1973
|
getValidationErrorMessage,
|
|
1974
|
+
bankCountry: props.states.bankCountry,
|
|
1974
1975
|
});
|
|
1975
1976
|
const inputFields = getFormInputs({
|
|
1976
1977
|
bitset: props.states.bitset,
|
|
1977
1978
|
formMap,
|
|
1978
1979
|
});
|
|
1979
|
-
console.log({
|
|
1980
|
-
formState: props.states.formState,
|
|
1981
|
-
thresholds: props.states.thresholds,
|
|
1982
|
-
});
|
|
1983
1980
|
return (h(Host, null, h(BankingInfoFormView, { callbacks: props.callbacks, text: props.text, states: props.states, refs: props.refs, slots: {
|
|
1984
1981
|
formInputsSlot: inputFields === null || inputFields === void 0 ? void 0 : inputFields.map(({ input }) => input),
|
|
1985
1982
|
countryInputSlot: (h("sl-select", Object.assign({ label: props.text.bankLocationLabel, required: true, name: "/bankCountry", id: "bankCountry", value: props.states.formState.bankCountry, "onSl-select": (e) => { var _a, _b; return props.callbacks.setBankCountry((_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.value); } }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.bankCountry) && {
|
|
@@ -2034,13 +2031,6 @@ function useDemoBankingInfoForm(props) {
|
|
|
2034
2031
|
});
|
|
2035
2032
|
const bitset = (currentPaymentOption === null || currentPaymentOption === void 0 ? void 0 : currentPaymentOption.withdrawalSettingId) || ((_p = (_o = props.demoData) === null || _o === void 0 ? void 0 : _o.states) === null || _p === void 0 ? void 0 : _p.bitset) ||
|
|
2036
2033
|
0;
|
|
2037
|
-
console.log("demo hook", {
|
|
2038
|
-
demoData: props.demoData,
|
|
2039
|
-
currentPaymentOption,
|
|
2040
|
-
currency,
|
|
2041
|
-
bankCountry,
|
|
2042
|
-
bitset,
|
|
2043
|
-
});
|
|
2044
2034
|
useEffect(() => {
|
|
2045
2035
|
if (defaultPaymentMethodChecked !== paymentMethodChecked)
|
|
2046
2036
|
setPaymentMethodChecked(defaultPaymentMethodChecked);
|
|
@@ -4689,7 +4679,7 @@ const TaxAndCashMonolith = class {
|
|
|
4689
4679
|
* @uiName Beneficiary account name input label
|
|
4690
4680
|
* @uiGroup Step 4 Properties
|
|
4691
4681
|
*/
|
|
4692
|
-
this.step4_beneficiaryAccountNameLabel = "Beneficiary
|
|
4682
|
+
this.step4_beneficiaryAccountNameLabel = "Beneficiary account name";
|
|
4693
4683
|
/**
|
|
4694
4684
|
* Label text for the bank account type input field
|
|
4695
4685
|
* @uiName Bank account type input label
|
|
@@ -4731,7 +4721,7 @@ const TaxAndCashMonolith = class {
|
|
|
4731
4721
|
* @uiName Routing code input label
|
|
4732
4722
|
* @uiGroup Step 4 Properties
|
|
4733
4723
|
*/
|
|
4734
|
-
this.step4_routingCodeLabel = "Routing code";
|
|
4724
|
+
this.step4_routingCodeLabel = "{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }";
|
|
4735
4725
|
/**
|
|
4736
4726
|
* Label text for the bank name input field
|
|
4737
4727
|
* @uiName Bank name input label
|
|
@@ -5524,6 +5514,8 @@ function getCountryName(countryCode, locale) {
|
|
|
5524
5514
|
}
|
|
5525
5515
|
function getSubRegionName(regionCode) {
|
|
5526
5516
|
var _a;
|
|
5517
|
+
if (!regionCode)
|
|
5518
|
+
return "";
|
|
5527
5519
|
// Impact adds an underscore to some regions
|
|
5528
5520
|
const standardCode = regionCode.replace("_", "");
|
|
5529
5521
|
const regions = [...INDIRECT_TAX_PROVINCES, ...INDIRECT_TAX_SPAIN_REGIONS];
|