@saasquatch/mint-components 2.1.8-1 → 2.1.8-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ShadowViewAddon-5ce32291.js → ShadowViewAddon-a26deae6.js} +1 -90
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +54 -381
- package/dist/cjs/{sqm-big-stat_46.cjs.entry.js → sqm-big-stat_45.cjs.entry.js} +9 -332
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -158
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +1 -0
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -1
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +27 -1
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +0 -2
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +37 -75
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +13 -688
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -95
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +6 -6
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -2
- package/dist/esm/{ShadowViewAddon-9d97b5d5.js → ShadowViewAddon-47f1e579.js} +2 -90
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +54 -381
- package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_45.entry.js} +14 -336
- package/dist/esm/sqm-stencilbook.entry.js +2 -158
- package/dist/esm-es5/{ShadowViewAddon-9d97b5d5.js → ShadowViewAddon-47f1e579.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_45.entry.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-0614dcbc.entry.js +9 -0
- package/dist/mint-components/{p-adc4e263.js → p-217dedde.js} +25 -25
- package/dist/mint-components/p-5492dd51.system.entry.js +1 -0
- package/dist/mint-components/p-7ee8f2ed.entry.js +273 -0
- package/dist/mint-components/p-bf545082.system.entry.js +1 -0
- package/dist/mint-components/p-ca098be1.system.js +1 -1
- package/dist/mint-components/p-ce050888.system.js +1 -0
- package/dist/mint-components/p-d4f332a7.entry.js +106 -0
- package/dist/mint-components/p-de343dd0.system.entry.js +1 -0
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +1 -0
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +5 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +0 -2
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +0 -4
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +0 -165
- package/dist/types/components.d.ts +10 -378
- 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/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +0 -143
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +0 -90
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +0 -462
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +0 -180
- package/dist/esm-es5/sqm-big-stat_46.entry.js +0 -1
- package/dist/mint-components/p-0f036907.system.js +0 -1
- package/dist/mint-components/p-22e39d2c.entry.js +0 -342
- package/dist/mint-components/p-499885aa.entry.js +0 -9
- package/dist/mint-components/p-a6621899.system.entry.js +0 -1
- package/dist/mint-components/p-b0253f4c.entry.js +0 -108
- package/dist/mint-components/p-d93e19e9.system.entry.js +0 -1
- package/dist/mint-components/p-e45a9966.system.entry.js +0 -1
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +0 -13
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +0 -41
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +0 -80
- package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -16
|
@@ -18,7 +18,7 @@ import { b as VERIFICATION_EVENT_KEY } from './keys-406491dc.js';
|
|
|
18
18
|
import { T as TAX_FORM_UPDATED_EVENT_KEY, a as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY } from './usePayoutStatus-46c0c289.js';
|
|
19
19
|
|
|
20
20
|
function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
21
|
-
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
|
|
21
|
+
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;
|
|
22
22
|
const { errors, ...formState } = props.states.formState;
|
|
23
23
|
return {
|
|
24
24
|
0: {
|
|
@@ -27,54 +27,44 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
27
27
|
helpText: getValidationErrorMessage({
|
|
28
28
|
type: (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _b === void 0 ? void 0 : _b.beneficiaryAccountName) === null || _c === void 0 ? void 0 : _c.type,
|
|
29
29
|
label: props.text.beneficiaryAccountNameLabel,
|
|
30
|
-
errorCode: (_e = (_d = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _d === void 0 ? void 0 : _d.beneficiaryAccountName) === null || _e === void 0 ? void 0 : _e.errorCode,
|
|
31
|
-
fieldName: "beneficiaryAccountName",
|
|
32
30
|
}),
|
|
33
31
|
})))),
|
|
34
32
|
},
|
|
35
33
|
1: {
|
|
36
|
-
input: (h("sl-select", Object.assign({ required: true, label: props.text.bankAccountTypeLabel, name: "/bankAccountType", id: "bankAccountType", key: "bankAccountType" }, (((
|
|
34
|
+
input: (h("sl-select", Object.assign({ required: true, label: props.text.bankAccountTypeLabel, name: "/bankAccountType", id: "bankAccountType", key: "bankAccountType" }, (((_d = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _d === void 0 ? void 0 : _d.bankAccountType) && {
|
|
37
35
|
class: "error-input",
|
|
38
36
|
helpText: getValidationErrorMessage({
|
|
39
|
-
type: (
|
|
37
|
+
type: (_f = (_e = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _e === void 0 ? void 0 : _e.bankAccountType) === null || _f === void 0 ? void 0 : _f.type,
|
|
40
38
|
label: props.text.bankAccountTypeLabel,
|
|
41
|
-
errorCode: (_k = (_j = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _j === void 0 ? void 0 : _j.bankAccountType) === null || _k === void 0 ? void 0 : _k.errorCode,
|
|
42
|
-
fieldName: "bankAccountType",
|
|
43
39
|
}),
|
|
44
40
|
})),
|
|
45
41
|
h("sl-menu-item", { value: "CHECKING" }, props.text.checkingSelectItemLabel),
|
|
46
42
|
h("sl-menu-item", { value: "SAVINGS" }, props.text.savingsSelectItemLabel))),
|
|
47
43
|
},
|
|
48
44
|
2: {
|
|
49
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.bankAccountNumberLabel, name: "/bankAccountNumber", id: "bankAccountNumber", key: "bankAccountNumber", value: formState.bankAccountNumber, type: "text" }, (((
|
|
45
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.bankAccountNumberLabel, name: "/bankAccountNumber", id: "bankAccountNumber", key: "bankAccountNumber", value: formState.bankAccountNumber, type: "text" }, (((_g = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _g === void 0 ? void 0 : _g.bankAccountNumber) && {
|
|
50
46
|
class: "error-input",
|
|
51
47
|
helpText: getValidationErrorMessage({
|
|
52
|
-
type: (
|
|
48
|
+
type: (_j = (_h = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _h === void 0 ? void 0 : _h.bankAccountNumber) === null || _j === void 0 ? void 0 : _j.type,
|
|
53
49
|
label: props.text.bankAccountNumberLabel,
|
|
54
|
-
errorCode: (_q = (_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.bankAccountNumber) === null || _q === void 0 ? void 0 : _q.errorCode,
|
|
55
|
-
fieldName: "bankAccountNumber",
|
|
56
50
|
}),
|
|
57
51
|
})))),
|
|
58
52
|
},
|
|
59
53
|
3: {
|
|
60
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.ibanLabel, name: "/bankAccountNumber", id: "iban", key: "iban", type: "text", value: formState.bankAccountNumber }, (((
|
|
54
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.ibanLabel, name: "/bankAccountNumber", id: "iban", key: "iban", type: "text", value: formState.bankAccountNumber }, (((_k = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _k === void 0 ? void 0 : _k.bankAccountNumber) && {
|
|
61
55
|
class: "error-input",
|
|
62
56
|
helpText: getValidationErrorMessage({
|
|
63
|
-
type: (
|
|
57
|
+
type: (_m = (_l = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _l === void 0 ? void 0 : _l.bankAccountNumber) === null || _m === void 0 ? void 0 : _m.type,
|
|
64
58
|
label: props.text.ibanLabel,
|
|
65
|
-
errorCode: (_v = (_u = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _u === void 0 ? void 0 : _u.bankAccountNumber) === null || _v === void 0 ? void 0 : _v.errorCode,
|
|
66
|
-
fieldName: "bankAccountNumber",
|
|
67
59
|
}),
|
|
68
60
|
})))),
|
|
69
61
|
},
|
|
70
62
|
4: {
|
|
71
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.swiftCodeLabel, name: "/swiftCode", id: "swiftCode", key: "swiftCode", type: "text" }, (((
|
|
63
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.swiftCodeLabel, name: "/swiftCode", id: "swiftCode", key: "swiftCode", type: "text" }, (((_o = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _o === void 0 ? void 0 : _o.swiftCode) && {
|
|
72
64
|
class: "error-input",
|
|
73
65
|
helpText: getValidationErrorMessage({
|
|
74
|
-
type: (
|
|
66
|
+
type: (_q = (_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.swiftCode) === null || _q === void 0 ? void 0 : _q.type,
|
|
75
67
|
label: props.text.swiftCodeLabel,
|
|
76
|
-
errorCode: (_0 = (_z = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _z === void 0 ? void 0 : _z.swiftCode) === null || _0 === void 0 ? void 0 : _0.errorCode,
|
|
77
|
-
fieldName: "swiftCode",
|
|
78
68
|
}),
|
|
79
69
|
})))),
|
|
80
70
|
},
|
|
@@ -84,41 +74,35 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
84
74
|
defaultMessage: props.text.routingCodeLabel,
|
|
85
75
|
}, {
|
|
86
76
|
bankCountry,
|
|
87
|
-
}), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((
|
|
77
|
+
}), 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
78
|
class: "error-input",
|
|
89
79
|
helpText: getValidationErrorMessage({
|
|
90
|
-
type: (
|
|
80
|
+
type: (_t = (_s = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _s === void 0 ? void 0 : _s.routingCode) === null || _t === void 0 ? void 0 : _t.type,
|
|
91
81
|
label: intl.formatMessage({
|
|
92
82
|
id: "routingCodeErrorText",
|
|
93
83
|
defaultMessage: props.text.routingCodeLabel,
|
|
94
84
|
}, {
|
|
95
85
|
bankCountry,
|
|
96
86
|
}),
|
|
97
|
-
errorCode: (_5 = (_4 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _4 === void 0 ? void 0 : _4.routingCode) === null || _5 === void 0 ? void 0 : _5.errorCode,
|
|
98
|
-
fieldName: "routingCode",
|
|
99
87
|
}),
|
|
100
88
|
})))),
|
|
101
89
|
},
|
|
102
90
|
6: {
|
|
103
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.bankNameLabel, name: "/bankName", id: "bankName", key: "bankName", type: "text" }, (((
|
|
91
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.bankNameLabel, name: "/bankName", id: "bankName", key: "bankName", type: "text" }, (((_u = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _u === void 0 ? void 0 : _u.bankName) && {
|
|
104
92
|
class: "error-input",
|
|
105
93
|
helpText: getValidationErrorMessage({
|
|
106
|
-
type: (
|
|
94
|
+
type: (_w = (_v = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _v === void 0 ? void 0 : _v.bankName) === null || _w === void 0 ? void 0 : _w.type,
|
|
107
95
|
label: props.text.bankNameLabel,
|
|
108
|
-
errorCode: (_10 = (_9 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _9 === void 0 ? void 0 : _9.bankName) === null || _10 === void 0 ? void 0 : _10.errorCode,
|
|
109
|
-
fieldName: "bankName",
|
|
110
96
|
}),
|
|
111
97
|
})))),
|
|
112
98
|
},
|
|
113
99
|
7: {
|
|
114
100
|
input: [
|
|
115
|
-
h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((
|
|
101
|
+
h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_x = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _x === void 0 ? void 0 : _x.beneficiaryClassification) && {
|
|
116
102
|
class: "error-input",
|
|
117
103
|
helpText: getValidationErrorMessage({
|
|
118
|
-
type: (
|
|
104
|
+
type: (_z = (_y = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _y === void 0 ? void 0 : _y.beneficiaryClassification) === null || _z === void 0 ? void 0 : _z.type,
|
|
119
105
|
label: props.text.classificationLabel,
|
|
120
|
-
errorCode: (_15 = (_14 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _14 === void 0 ? void 0 : _14.beneficiaryClassification) === null || _15 === void 0 ? void 0 : _15.errorCode,
|
|
121
|
-
fieldName: "beneficiaryClassification",
|
|
122
106
|
}),
|
|
123
107
|
})),
|
|
124
108
|
h("sl-menu-item", { value: "BUSINESS" }, props.text.businessSelectItemLabel),
|
|
@@ -129,122 +113,100 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
129
113
|
defaultMessage: props.text.taxPayerIdLabel,
|
|
130
114
|
}, {
|
|
131
115
|
bankCountry,
|
|
132
|
-
}), type: "text", name: "/beneficiaryTaxPayerId", id: "beneficiaryTaxPayerId", key: "beneficiaryTaxPayerId" }, (((
|
|
116
|
+
}), type: "text", name: "/beneficiaryTaxPayerId", id: "beneficiaryTaxPayerId", key: "beneficiaryTaxPayerId" }, (((_0 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _0 === void 0 ? void 0 : _0.beneficiaryTaxPayerId) && {
|
|
133
117
|
class: "error-input",
|
|
134
118
|
helpText: getValidationErrorMessage({
|
|
135
|
-
type: (
|
|
119
|
+
type: (_2 = (_1 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _1 === void 0 ? void 0 : _1.beneficiaryTaxPayerId) === null || _2 === void 0 ? void 0 : _2.type,
|
|
136
120
|
label: props.text.taxPayerIdLabel,
|
|
137
|
-
errorCode: (_20 = (_19 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _19 === void 0 ? void 0 : _19.taxPayerId) === null || _20 === void 0 ? void 0 : _20.errorCode,
|
|
138
|
-
fieldName: "taxPayerId",
|
|
139
121
|
}),
|
|
140
122
|
}))),
|
|
141
123
|
],
|
|
142
124
|
},
|
|
143
125
|
8: {
|
|
144
|
-
input: (h("sl-select", Object.assign({ required: true, label: props.text.classificationCPFLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((
|
|
126
|
+
input: (h("sl-select", Object.assign({ required: true, label: props.text.classificationCPFLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_3 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _3 === void 0 ? void 0 : _3.beneficiaryClassification) && {
|
|
145
127
|
class: "error-input",
|
|
146
128
|
helpText: getValidationErrorMessage({
|
|
147
|
-
type: (
|
|
129
|
+
type: (_5 = (_4 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _4 === void 0 ? void 0 : _4.beneficiaryClassification) === null || _5 === void 0 ? void 0 : _5.type,
|
|
148
130
|
label: props.text.classificationCPFLabel,
|
|
149
|
-
errorCode: (_25 = (_24 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _24 === void 0 ? void 0 : _24.beneficiaryClassification) === null || _25 === void 0 ? void 0 : _25.errorCode,
|
|
150
|
-
fieldName: "beneficiaryClassification",
|
|
151
131
|
}),
|
|
152
132
|
})),
|
|
153
133
|
h("sl-menu-item", { value: "CPF" }, "CPF"),
|
|
154
134
|
h("sl-menu-item", { value: "CNPJ" }, "CNPJ"))),
|
|
155
135
|
},
|
|
156
136
|
9: {
|
|
157
|
-
input: (h("sl-input", Object.assign({ key: "patronymicName", required: true, label: props.text.patronymicNameLabel, name: "/patronymicName", id: "patronymicName", type: "text" }, (((
|
|
137
|
+
input: (h("sl-input", Object.assign({ key: "patronymicName", required: true, label: props.text.patronymicNameLabel, name: "/patronymicName", id: "patronymicName", type: "text" }, (((_6 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _6 === void 0 ? void 0 : _6.patronymicName) && {
|
|
158
138
|
class: "error-input",
|
|
159
139
|
helpText: getValidationErrorMessage({
|
|
160
|
-
type: (
|
|
140
|
+
type: (_8 = (_7 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _7 === void 0 ? void 0 : _7.patronymicName) === null || _8 === void 0 ? void 0 : _8.type,
|
|
161
141
|
label: props.text.patronymicNameLabel,
|
|
162
|
-
errorCode: (_30 = (_29 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _29 === void 0 ? void 0 : _29.patronymicName) === null || _30 === void 0 ? void 0 : _30.errorCode,
|
|
163
|
-
fieldName: "patronymicName",
|
|
164
142
|
}),
|
|
165
143
|
})))),
|
|
166
144
|
},
|
|
167
145
|
10: {
|
|
168
|
-
input: (h("sl-input", Object.assign({ key: "voCode", label: props.text.voCodeLabel, name: "/voCode", id: "voCode", type: "text" }, (((
|
|
146
|
+
input: (h("sl-input", Object.assign({ key: "voCode", label: props.text.voCodeLabel, name: "/voCode", id: "voCode", type: "text" }, (((_9 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _9 === void 0 ? void 0 : _9.voCode) && {
|
|
169
147
|
class: "error-input",
|
|
170
148
|
helpText: getValidationErrorMessage({
|
|
171
|
-
type: (
|
|
149
|
+
type: (_11 = (_10 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _10 === void 0 ? void 0 : _10.voCode) === null || _11 === void 0 ? void 0 : _11.type,
|
|
172
150
|
label: props.text.voCodeLabel,
|
|
173
|
-
errorCode: (_35 = (_34 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _34 === void 0 ? void 0 : _34.voCode) === null || _35 === void 0 ? void 0 : _35.errorCode,
|
|
174
|
-
fieldName: "voCode",
|
|
175
151
|
}),
|
|
176
152
|
})))),
|
|
177
153
|
},
|
|
178
154
|
11: {
|
|
179
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.agencyCodeLabel, name: "/agencyCode", id: "agencyCode", key: "agencyCode", type: "text" }, (((
|
|
155
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.agencyCodeLabel, name: "/agencyCode", id: "agencyCode", key: "agencyCode", type: "text" }, (((_12 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _12 === void 0 ? void 0 : _12.agencyCode) && {
|
|
180
156
|
class: "error-input",
|
|
181
157
|
helpText: getValidationErrorMessage({
|
|
182
|
-
type: (
|
|
158
|
+
type: (_14 = (_13 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _13 === void 0 ? void 0 : _13.agencyCode) === null || _14 === void 0 ? void 0 : _14.type,
|
|
183
159
|
label: props.text.agencyCodeLabel,
|
|
184
|
-
errorCode: (_40 = (_39 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _39 === void 0 ? void 0 : _39.agencyCode) === null || _40 === void 0 ? void 0 : _40.errorCode,
|
|
185
|
-
fieldName: "agencyCode",
|
|
186
160
|
}),
|
|
187
161
|
})))),
|
|
188
162
|
},
|
|
189
163
|
12: {
|
|
190
164
|
input: [
|
|
191
|
-
h("sl-input", Object.assign({ required: true, label: props.text.bankAddressLabel, name: "/bankAddress", id: "bankAddress", key: "bankAddress", type: "text" }, (((
|
|
165
|
+
h("sl-input", Object.assign({ required: true, label: props.text.bankAddressLabel, name: "/bankAddress", id: "bankAddress", key: "bankAddress", type: "text" }, (((_15 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _15 === void 0 ? void 0 : _15.bankAddress) && {
|
|
192
166
|
class: "error-input",
|
|
193
167
|
helpText: getValidationErrorMessage({
|
|
194
|
-
type: (
|
|
168
|
+
type: (_17 = (_16 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _16 === void 0 ? void 0 : _16.bankAddress) === null || _17 === void 0 ? void 0 : _17.type,
|
|
195
169
|
label: props.text.bankAddressLabel,
|
|
196
|
-
errorCode: (_45 = (_44 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _44 === void 0 ? void 0 : _44.bankAddress) === null || _45 === void 0 ? void 0 : _45.errorCode,
|
|
197
|
-
fieldName: "bankAddress",
|
|
198
170
|
}),
|
|
199
171
|
}))),
|
|
200
|
-
h("sl-input", Object.assign({ required: true, label: props.text.bankCityLabel, name: "/bankCity", id: "bankCity", key: "bankCity", type: "text" }, (((
|
|
172
|
+
h("sl-input", Object.assign({ required: true, label: props.text.bankCityLabel, name: "/bankCity", id: "bankCity", key: "bankCity", type: "text" }, (((_18 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _18 === void 0 ? void 0 : _18.bankCity) && {
|
|
201
173
|
class: "error-input",
|
|
202
174
|
helpText: getValidationErrorMessage({
|
|
203
|
-
type: (
|
|
175
|
+
type: (_20 = (_19 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _19 === void 0 ? void 0 : _19.bankCity) === null || _20 === void 0 ? void 0 : _20.type,
|
|
204
176
|
label: props.text.bankCityLabel,
|
|
205
|
-
errorCode: (_50 = (_49 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _49 === void 0 ? void 0 : _49.bankCity) === null || _50 === void 0 ? void 0 : _50.errorCode,
|
|
206
|
-
fieldName: "bankCity",
|
|
207
177
|
}),
|
|
208
178
|
}))),
|
|
209
|
-
h("sl-input", Object.assign({ required: true, label: props.text.bankStateLabel, name: "/bankState", id: "bankState", key: "bankState", type: "text" }, (((
|
|
179
|
+
h("sl-input", Object.assign({ required: true, label: props.text.bankStateLabel, name: "/bankState", id: "bankState", key: "bankState", type: "text" }, (((_21 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _21 === void 0 ? void 0 : _21.bankState) && {
|
|
210
180
|
class: "error-input",
|
|
211
181
|
helpText: getValidationErrorMessage({
|
|
212
|
-
type: (
|
|
182
|
+
type: (_23 = (_22 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _22 === void 0 ? void 0 : _22.bankState) === null || _23 === void 0 ? void 0 : _23.type,
|
|
213
183
|
label: props.text.bankStateLabel,
|
|
214
|
-
errorCode: (_55 = (_54 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _54 === void 0 ? void 0 : _54.bankState) === null || _55 === void 0 ? void 0 : _55.errorCode,
|
|
215
|
-
fieldName: "bankState",
|
|
216
184
|
}),
|
|
217
185
|
}))),
|
|
218
|
-
h("sl-input", Object.assign({ required: true, label: props.text.bankPostalCodeLabel, name: "/bankPostalCode", id: "bankPostalCode", key: "bankPostalCode", type: "text" }, (((
|
|
186
|
+
h("sl-input", Object.assign({ required: true, label: props.text.bankPostalCodeLabel, name: "/bankPostalCode", id: "bankPostalCode", key: "bankPostalCode", type: "text" }, (((_24 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _24 === void 0 ? void 0 : _24.bankPostalCode) && {
|
|
219
187
|
class: "error-input",
|
|
220
188
|
helpText: getValidationErrorMessage({
|
|
221
|
-
type: (
|
|
189
|
+
type: (_26 = (_25 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _25 === void 0 ? void 0 : _25.bankPostalCode) === null || _26 === void 0 ? void 0 : _26.type,
|
|
222
190
|
label: props.text.bankPostalCodeLabel,
|
|
223
|
-
errorCode: (_60 = (_59 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _59 === void 0 ? void 0 : _59.bankPostalCode) === null || _60 === void 0 ? void 0 : _60.errorCode,
|
|
224
|
-
fieldName: "bankPostalCode",
|
|
225
191
|
}),
|
|
226
192
|
}))),
|
|
227
193
|
],
|
|
228
194
|
},
|
|
229
195
|
13: {
|
|
230
|
-
input: (h("sl-input", Object.assign({ required: true, label: props.text.branchCodeLabel, name: "/branchCode", id: "branchCode", key: "branchCode", type: "text" }, (((
|
|
196
|
+
input: (h("sl-input", Object.assign({ required: true, label: props.text.branchCodeLabel, name: "/branchCode", id: "branchCode", key: "branchCode", type: "text" }, (((_27 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _27 === void 0 ? void 0 : _27.branchCode) && {
|
|
231
197
|
class: "error-input",
|
|
232
198
|
helpText: getValidationErrorMessage({
|
|
233
|
-
type: (
|
|
199
|
+
type: (_29 = (_28 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _28 === void 0 ? void 0 : _28.branchCode) === null || _29 === void 0 ? void 0 : _29.type,
|
|
234
200
|
label: props.text.branchCodeLabel,
|
|
235
|
-
errorCode: (_65 = (_64 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _64 === void 0 ? void 0 : _64.branchCode) === null || _65 === void 0 ? void 0 : _65.errorCode,
|
|
236
|
-
fieldName: "branchCode",
|
|
237
201
|
}),
|
|
238
202
|
})))),
|
|
239
203
|
},
|
|
240
204
|
14: {
|
|
241
|
-
input: (h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((
|
|
205
|
+
input: (h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_30 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _30 === void 0 ? void 0 : _30.beneficiaryClassification) && {
|
|
242
206
|
class: "error-input",
|
|
243
207
|
helpText: getValidationErrorMessage({
|
|
244
|
-
type: (
|
|
208
|
+
type: (_32 = (_31 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _31 === void 0 ? void 0 : _31.beneficiaryClassification) === null || _32 === void 0 ? void 0 : _32.type,
|
|
245
209
|
label: props.text.classificationLabel,
|
|
246
|
-
errorCode: (_70 = (_69 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _69 === void 0 ? void 0 : _69.beneficiaryClassification) === null || _70 === void 0 ? void 0 : _70.errorCode,
|
|
247
|
-
fieldName: "beneficiaryClassification",
|
|
248
210
|
}),
|
|
249
211
|
})),
|
|
250
212
|
h("sl-menu-item", { value: "BUSINESS" }, props.text.businessSelectItemLabel),
|
|
@@ -837,95 +799,6 @@ const paypalFeeMap = {
|
|
|
837
799
|
const ACH_PAYMENT_METHOD = 3;
|
|
838
800
|
const WIRE_PAYMENT_METHOD = 5;
|
|
839
801
|
const PAYPAL_PAYMENT_METHOD = 7;
|
|
840
|
-
/**
|
|
841
|
-
* Maps GraphQL validation error field names to form field names.
|
|
842
|
-
*/
|
|
843
|
-
const API_FIELD_TO_FORM_FIELD = {
|
|
844
|
-
// bankProvinceState → form uses bankState
|
|
845
|
-
bankProvinceState: "bankState",
|
|
846
|
-
};
|
|
847
|
-
/**
|
|
848
|
-
* Maps Impact API error code paths (from validationErrors[].errorPath) to short,
|
|
849
|
-
* readable frontend error codes used in the ICU select props.
|
|
850
|
-
*/
|
|
851
|
-
const API_ERROR_PATH_TO_FRONTEND = {
|
|
852
|
-
// Beneficiary account name
|
|
853
|
-
"withdrawal.settings.error.empty_beneficiaryname": "empty",
|
|
854
|
-
"withdrawal.settings.error.invalid_character_beneficiaryname": "invalidCharacters",
|
|
855
|
-
"withdrawal.settings.error.numeric_beneficiaryname": "numeric",
|
|
856
|
-
"withdrawal_settings.error.beneficiaryname.size": "tooLong",
|
|
857
|
-
"withdrawal.settings.error.non_english_beneficiaryname": "nonEnglish",
|
|
858
|
-
"withdrawal_settings.error.business_beneficiaryname_match": "businessNameMismatch",
|
|
859
|
-
"withdrawal_settings.error.beneficiaryname_match": "nameMismatch",
|
|
860
|
-
"withdrawal_settings.error.business_checkpayeename_match": "businessPayeeMismatch",
|
|
861
|
-
"withdrawal_settings.error.checkpayeename_match": "payeeMismatch",
|
|
862
|
-
// Bank account number
|
|
863
|
-
"withdrawal.settings.error.accountnumber.empty": "empty",
|
|
864
|
-
"withdrawal.settings.error.accountnumber.uk": "invalidUk",
|
|
865
|
-
"withdrawal.settings.error.bankaccount.invalid": "invalid",
|
|
866
|
-
// IBAN
|
|
867
|
-
"withdrawal.settings.error.iban": "ibanEmpty",
|
|
868
|
-
"withdrawal.settings.error.iban.alphanumeric": "ibanAlphanumeric",
|
|
869
|
-
"withdrawal.settings.error.iban.invalid": "ibanInvalid",
|
|
870
|
-
"withdrawal.settings.error.iban.uk.country.mismatch": "ibanCountryMismatch",
|
|
871
|
-
// Routing code
|
|
872
|
-
"withdrawal.settings.error.bsbNumber": "invalidBsb",
|
|
873
|
-
"withdrawal.settings.error.sortcode": "invalidSortCode",
|
|
874
|
-
"withdrawal.settings.error.routingNumber": "empty",
|
|
875
|
-
"withdrawal.settings.error.routingcode": "invalid",
|
|
876
|
-
// SWIFT / BIC
|
|
877
|
-
"withdrawal.settings.error.bic": "empty",
|
|
878
|
-
"withdrawal.settings.error.bic.alphanumeric": "alphanumeric",
|
|
879
|
-
"withdrawal.settings.error.bic.invalid": "invalid",
|
|
880
|
-
// Bank account type
|
|
881
|
-
"global.error.invalid.accounttype": "empty",
|
|
882
|
-
// Bank name
|
|
883
|
-
"withdrawal.settings.error.bankName": "empty",
|
|
884
|
-
// Tax payer ID
|
|
885
|
-
"withdrawal.settings.error.taxPayerId": "empty",
|
|
886
|
-
"withdrawal.settings.error.taxPayerId.ar": "emptyAr",
|
|
887
|
-
"withdrawal.settings.error.taxPayerId.kr": "emptyKr",
|
|
888
|
-
"withdrawal.settings.error.taxPayerId.alphanumeric": "alphanumeric",
|
|
889
|
-
"withdrawal.settings.error.taxPayerId.alphanumeric.ar": "alphanumericAr",
|
|
890
|
-
"withdrawal.settings.error.taxPayerId.alphanumeric.kr": "alphanumericKr",
|
|
891
|
-
"withdrawal.settings.error.taxPayerId.invalid": "invalid",
|
|
892
|
-
"withdrawal.settings.error.taxPayerId.invalid.ar": "invalidAr",
|
|
893
|
-
"withdrawal.settings.error.taxPayerId.invalid.kr": "invalidKr",
|
|
894
|
-
"withdrawal.settings.error.taxPayerId.invalid.kzt": "invalidKzt",
|
|
895
|
-
"withdrawal.settings.error.taxPayerId.cnpj": "cnpjTooShort",
|
|
896
|
-
"withdrawal.settings.error.taxPayerId.cpf": "cpfTooShort",
|
|
897
|
-
// Patronymic name
|
|
898
|
-
"withdrawal.settings.error.patronymicName": "empty",
|
|
899
|
-
"withdrawal.settings.error.patronymicName.alphanumeric": "alphanumeric",
|
|
900
|
-
// VO code
|
|
901
|
-
"withdrawal.settings.error.voCode": "empty",
|
|
902
|
-
"withdrawal.settings.error.voCode.alphanumeric": "alphanumeric",
|
|
903
|
-
// Agency code
|
|
904
|
-
"withdrawal.settings.error.agencyCode": "empty",
|
|
905
|
-
"withdrawal.settings.error.agencyCode.alphanumeric": "alphanumeric",
|
|
906
|
-
"withdrawal.settings.error.agencyCode.length": "tooShort",
|
|
907
|
-
// Bank address fields
|
|
908
|
-
"withdrawal.settings.error.bankAddress": "empty",
|
|
909
|
-
"withdrawal.settings.error.bankCity": "empty",
|
|
910
|
-
"withdrawal.settings.error.bankProvinceState": "empty",
|
|
911
|
-
"withdrawal.settings.error.bankPostalCode": "empty",
|
|
912
|
-
// Branch code / name
|
|
913
|
-
"withdrawal.settings.error.branchCode": "invalid",
|
|
914
|
-
"withdrawal.settings.error.branchName": "empty",
|
|
915
|
-
// Classification code
|
|
916
|
-
"withdrawal.settings.error.classificationCode.invalid": "empty",
|
|
917
|
-
"withdrawal.settings.error.classificationCode.invalid.kzt": "invalidKzt",
|
|
918
|
-
// PayPal
|
|
919
|
-
"payment.error.email": "empty",
|
|
920
|
-
"payment.error.paypal_not_supported": "unsupportedCurrency",
|
|
921
|
-
"payment.error.email.invalid": "invalidEmail",
|
|
922
|
-
"payment.error.paypal_verification_incomplete": "verificationIncomplete",
|
|
923
|
-
// Payment schedule
|
|
924
|
-
"payment.error.no_threshold": "empty",
|
|
925
|
-
"payment.error.invalid_threshold": "invalid",
|
|
926
|
-
"payment.error.no_dayOfMonth": "empty",
|
|
927
|
-
"payment.error.invalid_dayOfMonth": "invalid",
|
|
928
|
-
};
|
|
929
802
|
function getFormInputs({ bitset, formMap }) {
|
|
930
803
|
// Convert bitset to binary representation
|
|
931
804
|
const binary = bitset.toString(2).padStart(Object.keys(formMap).length, "0");
|
|
@@ -949,7 +822,6 @@ const SAVE_WITHDRAWAL_SETTINGS = dist.gql `
|
|
|
949
822
|
validationErrors {
|
|
950
823
|
field
|
|
951
824
|
message
|
|
952
|
-
code
|
|
953
825
|
}
|
|
954
826
|
}
|
|
955
827
|
}
|
|
@@ -965,7 +837,6 @@ const UPDATE_WITHDRAWAL_SETTINGS = dist.gql `
|
|
|
965
837
|
validationErrors {
|
|
966
838
|
field
|
|
967
839
|
message
|
|
968
|
-
code
|
|
969
840
|
}
|
|
970
841
|
}
|
|
971
842
|
}
|
|
@@ -1138,13 +1009,10 @@ function useBankingInfoForm(props) {
|
|
|
1138
1009
|
else if (!success) {
|
|
1139
1010
|
console.error("Validation failed: ", validationErrors);
|
|
1140
1011
|
const mappedValidationErrors = validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.reduce((agg, error) => {
|
|
1141
|
-
const formField = API_FIELD_TO_FORM_FIELD[error.field] || error.field;
|
|
1142
|
-
const errorCode = API_ERROR_PATH_TO_FRONTEND[error.errorPath] || error.errorPath;
|
|
1143
1012
|
return {
|
|
1144
1013
|
...agg,
|
|
1145
|
-
[
|
|
1014
|
+
[error.field]: {
|
|
1146
1015
|
type: "invalid",
|
|
1147
|
-
errorCode,
|
|
1148
1016
|
},
|
|
1149
1017
|
};
|
|
1150
1018
|
}, {});
|
|
@@ -1559,156 +1427,6 @@ const BankingInfoForm = class {
|
|
|
1559
1427
|
* @uiName Information modal button text
|
|
1560
1428
|
*/
|
|
1561
1429
|
this.modalButtonText = "I understand, update my information";
|
|
1562
|
-
// ──────────────────────────────────────────────────────────────────
|
|
1563
|
-
// Per-field validation error messages
|
|
1564
|
-
// Each prop uses ICU select on {errorCode} to pick the right message.
|
|
1565
|
-
// Error codes are short frontend keys mapped from the API error codes.
|
|
1566
|
-
// The `other` branch displays the raw API message directly via {errorCode},
|
|
1567
|
-
// which is already human-readable English (e.g. "Invalid Routing Code").
|
|
1568
|
-
// ──────────────────────────────────────────────────────────────────
|
|
1569
|
-
/**
|
|
1570
|
-
* Error messages for the beneficiary / account holder name field.
|
|
1571
|
-
* Supports error codes: empty, invalidCharacters, numeric, tooLong,
|
|
1572
|
-
* nonEnglish, businessNameMismatch, nameMismatch, businessPayeeMismatch, payeeMismatch
|
|
1573
|
-
* @uiName Beneficiary account name error
|
|
1574
|
-
* @uiWidget textArea
|
|
1575
|
-
*/
|
|
1576
|
-
this.beneficiaryAccountNameError = "{errorCode, select, empty {Account holder name is required} invalidCharacters {Account holder name contains invalid characters} numeric {Account holder name cannot be purely numeric} tooLong {Account holder name must be 70 characters or fewer} nonEnglish {Account holder name must contain only English characters for this currency} businessNameMismatch {Beneficiary name must match the name on your tax document} nameMismatch {Beneficiary name must match the name on your tax document} businessPayeeMismatch {Payee name must match the name on your tax document} payeeMismatch {Payee name must match the name on your tax document} other {{errorCode}}}";
|
|
1577
|
-
/**
|
|
1578
|
-
* Error messages for the bank account number / IBAN field.
|
|
1579
|
-
* Supports error codes: empty, invalidUk, invalid, ibanEmpty,
|
|
1580
|
-
* ibanAlphanumeric, ibanInvalid, ibanCountryMismatch
|
|
1581
|
-
* @uiName Bank account number / IBAN error
|
|
1582
|
-
* @uiWidget textArea
|
|
1583
|
-
*/
|
|
1584
|
-
this.bankAccountNumberError = "{errorCode, select, empty {Account number is required} invalidUk {Please enter a valid UK account number} invalid {Account number is invalid} ibanEmpty {IBAN is required} ibanAlphanumeric {IBAN must contain only letters and numbers} ibanInvalid {IBAN is invalid} ibanCountryMismatch {UK accounts must use an IBAN starting with GB} other {{errorCode}}}";
|
|
1585
|
-
/**
|
|
1586
|
-
* Error messages for the routing code / sort code / BSB field.
|
|
1587
|
-
* Supports error codes: invalidBsb, invalidSortCode, empty, invalid
|
|
1588
|
-
* @uiName Routing code error
|
|
1589
|
-
* @uiWidget textArea
|
|
1590
|
-
*/
|
|
1591
|
-
this.routingCodeError = "{errorCode, select, invalidBsb {Please enter a valid BSB number} invalidSortCode {Please enter a valid sort code} empty {Routing number is required} invalid {Routing number is invalid} other {{errorCode}}}";
|
|
1592
|
-
/**
|
|
1593
|
-
* Error messages for the SWIFT / BIC code field.
|
|
1594
|
-
* Supports error codes: empty, alphanumeric, invalid
|
|
1595
|
-
* @uiName SWIFT code error
|
|
1596
|
-
* @uiWidget textArea
|
|
1597
|
-
*/
|
|
1598
|
-
this.swiftCodeError = "{errorCode, select, empty {SWIFT/BIC code is required} alphanumeric {SWIFT/BIC code must contain only letters and numbers} invalid {SWIFT/BIC code is invalid} other {{errorCode}}}";
|
|
1599
|
-
/**
|
|
1600
|
-
* Error messages for the bank account type field.
|
|
1601
|
-
* Supports error codes: empty
|
|
1602
|
-
* @uiName Bank account type error
|
|
1603
|
-
* @uiWidget textArea
|
|
1604
|
-
*/
|
|
1605
|
-
this.bankAccountTypeError = "{errorCode, select, empty {Bank account type is required} other {{errorCode}}}";
|
|
1606
|
-
/**
|
|
1607
|
-
* Error messages for the bank name field.
|
|
1608
|
-
* Supports error codes: empty
|
|
1609
|
-
* @uiName Bank name error
|
|
1610
|
-
* @uiWidget textArea
|
|
1611
|
-
*/
|
|
1612
|
-
this.bankNameError = "{errorCode, select, empty {Bank name is required} other {{errorCode}}}";
|
|
1613
|
-
/**
|
|
1614
|
-
* Error messages for the tax payer ID / classification entity field.
|
|
1615
|
-
* Supports error codes: empty, emptyAr, emptyKr, alphanumeric, alphanumericAr,
|
|
1616
|
-
* alphanumericKr, invalid, invalidAr, invalidKr, invalidKzt, cnpjTooShort, cpfTooShort
|
|
1617
|
-
* @uiName Tax payer ID error
|
|
1618
|
-
* @uiWidget textArea
|
|
1619
|
-
*/
|
|
1620
|
-
this.taxPayerIdError = "{errorCode, select, empty {Tax payer ID is required} emptyAr {CUIT/CUIL is required} emptyKr {Classification ID is required} alphanumeric {Tax payer ID must contain only letters and numbers} alphanumericAr {CUIT/CUIL must contain only letters and numbers} alphanumericKr {Classification ID must contain only letters and numbers} invalid {Tax payer ID is invalid} invalidAr {CUIT/CUIL must be 11 characters} invalidKr {Classification ID length is invalid} invalidKzt {Tax payer ID must be 12 characters for KZT} cnpjTooShort {CNPJ must be at least 14 characters} cpfTooShort {CPF must be at least 11 characters} other {{errorCode}}}";
|
|
1621
|
-
/**
|
|
1622
|
-
* Error messages for the patronymic name field.
|
|
1623
|
-
* Supports error codes: empty, alphanumeric
|
|
1624
|
-
* @uiName Patronymic name error
|
|
1625
|
-
* @uiWidget textArea
|
|
1626
|
-
*/
|
|
1627
|
-
this.patronymicNameError = "{errorCode, select, empty {Patronymic name is required} alphanumeric {Patronymic name must contain only letters and numbers} other {{errorCode}}}";
|
|
1628
|
-
/**
|
|
1629
|
-
* Error messages for the VO code field.
|
|
1630
|
-
* Supports error codes: empty, alphanumeric
|
|
1631
|
-
* @uiName VO code error
|
|
1632
|
-
* @uiWidget textArea
|
|
1633
|
-
*/
|
|
1634
|
-
this.voCodeError = "{errorCode, select, empty {VO code is required} alphanumeric {VO code must contain only letters and numbers} other {{errorCode}}}";
|
|
1635
|
-
/**
|
|
1636
|
-
* Error messages for the agency code field.
|
|
1637
|
-
* Supports error codes: empty, alphanumeric, tooShort
|
|
1638
|
-
* @uiName Agency code error
|
|
1639
|
-
* @uiWidget textArea
|
|
1640
|
-
*/
|
|
1641
|
-
this.agencyCodeError = "{errorCode, select, empty {Agency code is required} alphanumeric {Agency code must contain only letters and numbers} tooShort {Agency code must be at least 5 characters} other {{errorCode}}}";
|
|
1642
|
-
/**
|
|
1643
|
-
* Error messages for the bank address field.
|
|
1644
|
-
* Supports error codes: empty
|
|
1645
|
-
* @uiName Bank address error
|
|
1646
|
-
* @uiWidget textArea
|
|
1647
|
-
*/
|
|
1648
|
-
this.bankAddressError = "{errorCode, select, empty {Bank address is required} other {{errorCode}}}";
|
|
1649
|
-
/**
|
|
1650
|
-
* Error messages for the bank city field.
|
|
1651
|
-
* Supports error codes: empty
|
|
1652
|
-
* @uiName Bank city error
|
|
1653
|
-
* @uiWidget textArea
|
|
1654
|
-
*/
|
|
1655
|
-
this.bankCityError = "{errorCode, select, empty {Bank city is required} other {{errorCode}}}";
|
|
1656
|
-
/**
|
|
1657
|
-
* Error messages for the bank province/state field.
|
|
1658
|
-
* Supports error codes: empty
|
|
1659
|
-
* @uiName Bank province/state error
|
|
1660
|
-
* @uiWidget textArea
|
|
1661
|
-
*/
|
|
1662
|
-
this.bankStateError = "{errorCode, select, empty {Bank province/state is required} other {{errorCode}}}";
|
|
1663
|
-
/**
|
|
1664
|
-
* Error messages for the bank postal code field.
|
|
1665
|
-
* Supports error codes: empty
|
|
1666
|
-
* @uiName Bank postal code error
|
|
1667
|
-
* @uiWidget textArea
|
|
1668
|
-
*/
|
|
1669
|
-
this.bankPostalCodeError = "{errorCode, select, empty {Bank postal code is required} other {{errorCode}}}";
|
|
1670
|
-
/**
|
|
1671
|
-
* Error messages for the branch code field.
|
|
1672
|
-
* Supports error codes: invalid
|
|
1673
|
-
* @uiName Branch code error
|
|
1674
|
-
* @uiWidget textArea
|
|
1675
|
-
*/
|
|
1676
|
-
this.branchCodeError = "{errorCode, select, invalid {Branch code is invalid} other {{errorCode}}}";
|
|
1677
|
-
/**
|
|
1678
|
-
* Error messages for the branch name field.
|
|
1679
|
-
* Supports error codes: empty
|
|
1680
|
-
* @uiName Branch name error
|
|
1681
|
-
* @uiWidget textArea
|
|
1682
|
-
*/
|
|
1683
|
-
this.branchNameError = "{errorCode, select, empty {Branch name is required} other {{errorCode}}}";
|
|
1684
|
-
/**
|
|
1685
|
-
* Error messages for the classification code field.
|
|
1686
|
-
* Supports error codes: empty, invalidKzt
|
|
1687
|
-
* @uiName Classification code error
|
|
1688
|
-
* @uiWidget textArea
|
|
1689
|
-
*/
|
|
1690
|
-
this.classificationCodeError = "{errorCode, select, empty {Classification code is required} invalidKzt {Classification code must be exactly 2 characters} other {{errorCode}}}";
|
|
1691
|
-
/**
|
|
1692
|
-
* Error messages for the PayPal email field.
|
|
1693
|
-
* Supports error codes: empty, unsupportedCurrency, invalidEmail, verificationIncomplete
|
|
1694
|
-
* @uiName PayPal email error
|
|
1695
|
-
* @uiWidget textArea
|
|
1696
|
-
*/
|
|
1697
|
-
this.paypalEmailError = "{errorCode, select, empty {PayPal email is required} unsupportedCurrency {PayPal is not supported for this currency} invalidEmail {Please enter a valid email address} verificationIncomplete {PayPal verification is not complete} other {{errorCode}}}";
|
|
1698
|
-
/**
|
|
1699
|
-
* Error messages for the payment threshold field.
|
|
1700
|
-
* Supports error codes: empty, invalid
|
|
1701
|
-
* @uiName Payment threshold error
|
|
1702
|
-
* @uiWidget textArea
|
|
1703
|
-
*/
|
|
1704
|
-
this.paymentThresholdError = "{errorCode, select, empty {Payment threshold is required} invalid {Payment threshold is invalid} other {{errorCode}}}";
|
|
1705
|
-
/**
|
|
1706
|
-
* Error messages for the payment day field.
|
|
1707
|
-
* Supports error codes: empty, invalid
|
|
1708
|
-
* @uiName Payment day error
|
|
1709
|
-
* @uiWidget textArea
|
|
1710
|
-
*/
|
|
1711
|
-
this.paymentDayError = "{errorCode, select, empty {Payment day is required} invalid {Payment day must be the 1st or the 15th} other {{errorCode}}}";
|
|
1712
1430
|
h$1(this);
|
|
1713
1431
|
}
|
|
1714
1432
|
disconnectedCallback() { }
|
|
@@ -1722,54 +1440,17 @@ const BankingInfoForm = class {
|
|
|
1722
1440
|
loadingErrorAlertDescription: props.loadingErrorAlertDescription,
|
|
1723
1441
|
loadingErrorAlertHeader: props.loadingErrorAlertHeader,
|
|
1724
1442
|
},
|
|
1725
|
-
errorMessages: {
|
|
1726
|
-
beneficiaryAccountName: props.beneficiaryAccountNameError,
|
|
1727
|
-
bankAccountNumber: props.bankAccountNumberError,
|
|
1728
|
-
routingCode: props.routingCodeError,
|
|
1729
|
-
swiftCode: props.swiftCodeError,
|
|
1730
|
-
bankAccountType: props.bankAccountTypeError,
|
|
1731
|
-
bankName: props.bankNameError,
|
|
1732
|
-
taxPayerId: props.taxPayerIdError,
|
|
1733
|
-
patronymicName: props.patronymicNameError,
|
|
1734
|
-
voCode: props.voCodeError,
|
|
1735
|
-
agencyCode: props.agencyCodeError,
|
|
1736
|
-
bankAddress: props.bankAddressError,
|
|
1737
|
-
bankCity: props.bankCityError,
|
|
1738
|
-
bankState: props.bankStateError,
|
|
1739
|
-
bankPostalCode: props.bankPostalCodeError,
|
|
1740
|
-
branchCode: props.branchCodeError,
|
|
1741
|
-
branchName: props.branchNameError,
|
|
1742
|
-
beneficiaryClassification: props.classificationCodeError,
|
|
1743
|
-
paypalEmailAddress: props.paypalEmailError,
|
|
1744
|
-
paymentThreshold: props.paymentThresholdError,
|
|
1745
|
-
paymentDay: props.paymentDayError,
|
|
1746
|
-
},
|
|
1747
1443
|
};
|
|
1748
1444
|
}
|
|
1749
1445
|
render() {
|
|
1750
|
-
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
|
|
1446
|
+
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;
|
|
1751
1447
|
const props = isDemo()
|
|
1752
1448
|
? useDemoBankingInfoForm(this)
|
|
1753
1449
|
: useBankingInfoForm(this);
|
|
1754
1450
|
const { errors } = props.states.formState;
|
|
1755
1451
|
const fieldRequiredError = this.fieldRequiredError;
|
|
1756
1452
|
const fieldInvalidError = this.fieldInvalidError;
|
|
1757
|
-
function getValidationErrorMessage({ type, label,
|
|
1758
|
-
var _a;
|
|
1759
|
-
// If we have a specific error code from the API, try to use
|
|
1760
|
-
// the per-field ICU error message template for a rich message
|
|
1761
|
-
if (type === "invalid" && errorCode && fieldName) {
|
|
1762
|
-
const errorTemplate = (_a = props.text.errorMessages) === null || _a === void 0 ? void 0 : _a[fieldName];
|
|
1763
|
-
if (errorTemplate) {
|
|
1764
|
-
return intl.formatMessage({
|
|
1765
|
-
id: `fieldError-${fieldName}-${errorCode}`,
|
|
1766
|
-
defaultMessage: errorTemplate,
|
|
1767
|
-
}, {
|
|
1768
|
-
errorCode,
|
|
1769
|
-
fieldName: label,
|
|
1770
|
-
});
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1453
|
+
function getValidationErrorMessage({ type, label, }) {
|
|
1773
1454
|
if (type === "required") {
|
|
1774
1455
|
return intl.formatMessage({
|
|
1775
1456
|
id: `requiredText-${label}`,
|
|
@@ -1852,45 +1533,37 @@ const BankingInfoForm = class {
|
|
|
1852
1533
|
helpText: getValidationErrorMessage({
|
|
1853
1534
|
type: (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _b === void 0 ? void 0 : _b.bankCountry) === null || _c === void 0 ? void 0 : _c.type,
|
|
1854
1535
|
label: props.text.bankLocationLabel,
|
|
1855
|
-
errorCode: (_e = (_d = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _d === void 0 ? void 0 : _d.bankCountry) === null || _e === void 0 ? void 0 : _e.errorCode,
|
|
1856
|
-
fieldName: "bankCountry",
|
|
1857
1536
|
}),
|
|
1858
1537
|
})), h("sl-input", { disabled: props.states.saveLoading, class: sheet.classes.SearchInput, placeholder: this.searchForCountryText, onKeyDown: (e) => {
|
|
1859
1538
|
// Stop shoelace intercepting key presses
|
|
1860
1539
|
e.stopPropagation();
|
|
1861
1540
|
}, "onSl-input": (e) => {
|
|
1862
1541
|
props.callbacks.setCountrySearch(e.target.value);
|
|
1863
|
-
} }), (
|
|
1864
|
-
|
|
1542
|
+
} }), (_d = props.states.countries) === null || _d === void 0 ? void 0 :
|
|
1543
|
+
_d.map((country) => {
|
|
1865
1544
|
return (h("sl-menu-item", { value: country.countryCode }, country.displayName));
|
|
1866
|
-
}), (
|
|
1867
|
-
|
|
1545
|
+
}), (_f = (_e = props.states) === null || _e === void 0 ? void 0 : _e.allCountries) === null || _f === void 0 ? void 0 :
|
|
1546
|
+
_f.map((c) => (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName))))),
|
|
1868
1547
|
paymentMethodSlot: (h("sl-input", { key: "paymentMethod", label: props.text.paymentMethod, placeholder: props.states.paymentMethodFeeLabel, disabled: true })),
|
|
1869
|
-
paymentThresholdSelectSlot: (h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentThresholdSelectLabel, name: "/paymentThreshold", id: "paymentThreshold", value: ((
|
|
1548
|
+
paymentThresholdSelectSlot: (h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentThresholdSelectLabel, name: "/paymentThreshold", id: "paymentThreshold", value: ((_h = (_g = props.states) === null || _g === void 0 ? void 0 : _g.formState) === null || _h === void 0 ? void 0 : _h.paymentThreshold) || "" }, (((_j = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _j === void 0 ? void 0 : _j.paymentThreshold) && {
|
|
1870
1549
|
class: "error-input",
|
|
1871
1550
|
helpText: getValidationErrorMessage({
|
|
1872
|
-
type: (
|
|
1551
|
+
type: (_l = (_k = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _k === void 0 ? void 0 : _k.paymentThreshold) === null || _l === void 0 ? void 0 : _l.type,
|
|
1873
1552
|
label: props.text.paymentThresholdSelectLabel,
|
|
1874
|
-
errorCode: (_q = (_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.paymentThreshold) === null || _q === void 0 ? void 0 : _q.errorCode,
|
|
1875
|
-
fieldName: "paymentThreshold",
|
|
1876
1553
|
}),
|
|
1877
1554
|
})), props.states.thresholds.map((t) => (h("sl-menu-item", { value: t }, `${props.states.currency}${t}`))))),
|
|
1878
|
-
paymentFixedDaySelectSlot: (h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentDaySelectLabel, value: ((
|
|
1555
|
+
paymentFixedDaySelectSlot: (h("sl-select", Object.assign({ required: true, disabled: props.states.saveLoading, label: props.text.paymentDaySelectLabel, value: ((_o = (_m = props.states) === null || _m === void 0 ? void 0 : _m.formState) === null || _o === void 0 ? void 0 : _o.paymentDay) || "", name: "/paymentDay", id: "paymentDay" }, (((_p = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _p === void 0 ? void 0 : _p.paymentDay) && {
|
|
1879
1556
|
class: "error-input",
|
|
1880
1557
|
helpText: getValidationErrorMessage({
|
|
1881
|
-
type: (
|
|
1558
|
+
type: (_r = (_q = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _q === void 0 ? void 0 : _q.paymentDay) === null || _r === void 0 ? void 0 : _r.type,
|
|
1882
1559
|
label: props.text.paymentDaySelectLabel,
|
|
1883
|
-
errorCode: (_x = (_w = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _w === void 0 ? void 0 : _w.paymentDay) === null || _x === void 0 ? void 0 : _x.errorCode,
|
|
1884
|
-
fieldName: "paymentDay",
|
|
1885
1560
|
}),
|
|
1886
1561
|
})), h("sl-menu-item", { value: "1" }, props.text.paymentDayFirstOfMonthLabelText), h("sl-menu-item", { value: "15" }, props.text.paymentDayFifteenthOfMonthLabelText))),
|
|
1887
|
-
paypalInputSlot: (h("sl-input", Object.assign({ required: true, disabled: props.states.saveLoading, value: ((
|
|
1562
|
+
paypalInputSlot: (h("sl-input", Object.assign({ required: true, disabled: props.states.saveLoading, value: ((_t = (_s = props.states) === null || _s === void 0 ? void 0 : _s.formState) === null || _t === void 0 ? void 0 : _t.paypalEmailAddress) || "", label: props.text.payPalInputLabel, key: "paypalEmailAddress", name: "/paypalEmailAddress", id: "paypalEmailAddress", type: "text" }, (((_w = (_v = (_u = props.states.formState) === null || _u === void 0 ? void 0 : _u.errors) === null || _v === void 0 ? void 0 : _v.inputErrors) === null || _w === void 0 ? void 0 : _w.paypalEmailAddress) && {
|
|
1888
1563
|
class: "error-input",
|
|
1889
1564
|
helpText: getValidationErrorMessage({
|
|
1890
|
-
type: (
|
|
1565
|
+
type: (_0 = (_z = (_y = (_x = props.states.formState) === null || _x === void 0 ? void 0 : _x.errors) === null || _y === void 0 ? void 0 : _y.inputErrors) === null || _z === void 0 ? void 0 : _z.paypalEmailAddress) === null || _0 === void 0 ? void 0 : _0.type,
|
|
1891
1566
|
label: props.text.payPalInputLabel,
|
|
1892
|
-
errorCode: (_10 = (_9 = (_8 = (_7 = props.states.formState) === null || _7 === void 0 ? void 0 : _7.errors) === null || _8 === void 0 ? void 0 : _8.inputErrors) === null || _9 === void 0 ? void 0 : _9.paypalEmailAddress) === null || _10 === void 0 ? void 0 : _10.errorCode,
|
|
1893
|
-
fieldName: "paypalEmailAddress",
|
|
1894
1567
|
}),
|
|
1895
1568
|
})))),
|
|
1896
1569
|
} })));
|
|
@@ -3139,7 +2812,7 @@ const IndirectTaxForm = class {
|
|
|
3139
2812
|
/**
|
|
3140
2813
|
* @uiName Indirect tax number field label
|
|
3141
2814
|
*/
|
|
3142
|
-
this.indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}";
|
|
2815
|
+
this.indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number} other {Tax number}}";
|
|
3143
2816
|
/**
|
|
3144
2817
|
* Displayed to participants registered for QST.
|
|
3145
2818
|
* @uiName QST number field label
|
|
@@ -3178,7 +2851,7 @@ const IndirectTaxForm = class {
|
|
|
3178
2851
|
/**
|
|
3179
2852
|
* @uiName Missing indirect tax number error message
|
|
3180
2853
|
*/
|
|
3181
|
-
this.indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required";
|
|
2854
|
+
this.indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number} other {Tax number}} is required";
|
|
3182
2855
|
/**
|
|
3183
2856
|
* Placeholder text displayed in the country search dropdown
|
|
3184
2857
|
* @uiName Country field placeholder text
|
|
@@ -3989,7 +3662,7 @@ const PayoutDetailsCard = class {
|
|
|
3989
3662
|
* Badge text indicating payout status
|
|
3990
3663
|
* @uiName Payout badge status text
|
|
3991
3664
|
*/
|
|
3992
|
-
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
|
|
3665
|
+
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} other {Failed}}";
|
|
3993
3666
|
/**
|
|
3994
3667
|
* Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
|
|
3995
3668
|
* @uiName Payout schedule by threshold text
|
|
@@ -5043,7 +4716,7 @@ const TaxAndCashDashboard = class {
|
|
|
5043
4716
|
/**
|
|
5044
4717
|
* @uiName Payout status badge
|
|
5045
4718
|
*/
|
|
5046
|
-
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
|
|
4719
|
+
this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} other {Failed} }";
|
|
5047
4720
|
/**
|
|
5048
4721
|
* Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
|
|
5049
4722
|
* @uiName Payout schedule by threshold text
|