@saasquatch/mint-components 2.1.7 → 2.1.8-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/cjs/{ShadowViewAddon-1d15cdf7.js → ShadowViewAddon-5ce32291.js} +89 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +377 -50
  5. package/dist/cjs/{sqm-big-stat_45.cjs.entry.js → sqm-big-stat_46.cjs.entry.js} +329 -1
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +158 -1
  7. package/dist/collection/collection-manifest.json +1 -0
  8. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +143 -0
  9. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +90 -0
  10. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +462 -0
  11. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +180 -0
  12. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
  13. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +75 -37
  14. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +688 -13
  15. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +95 -1
  16. package/dist/esm/{ShadowViewAddon-53b9090b.js → ShadowViewAddon-9d97b5d5.js} +89 -1
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/esm/mint-components.js +1 -1
  19. package/dist/esm/sqm-banking-info-form_10.entry.js +377 -50
  20. package/dist/esm/{sqm-big-stat_45.entry.js → sqm-big-stat_46.entry.js} +333 -6
  21. package/dist/esm/sqm-stencilbook.entry.js +158 -1
  22. package/dist/esm-es5/{ShadowViewAddon-53b9090b.js → ShadowViewAddon-9d97b5d5.js} +1 -1
  23. package/dist/esm-es5/loader.js +1 -1
  24. package/dist/esm-es5/mint-components.js +1 -1
  25. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  26. package/dist/esm-es5/sqm-big-stat_46.entry.js +1 -0
  27. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  28. package/dist/mint-components/mint-components.esm.js +1 -1
  29. package/dist/mint-components/p-0f036907.system.js +1 -0
  30. package/dist/mint-components/{p-0e6c90b1.entry.js → p-22e39d2c.entry.js} +90 -21
  31. package/dist/mint-components/p-499885aa.entry.js +9 -0
  32. package/dist/mint-components/p-a6621899.system.entry.js +1 -0
  33. package/dist/mint-components/{p-e980472a.js → p-adc4e263.js} +25 -25
  34. package/dist/mint-components/p-b0253f4c.entry.js +108 -0
  35. package/dist/mint-components/p-ca098be1.system.js +1 -1
  36. package/dist/mint-components/p-d93e19e9.system.entry.js +1 -0
  37. package/dist/mint-components/p-e45a9966.system.entry.js +1 -0
  38. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +13 -0
  39. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +41 -0
  40. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +80 -0
  41. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +16 -0
  42. package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +2 -0
  43. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +4 -0
  44. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +165 -0
  45. package/dist/types/components.d.ts +378 -0
  46. package/docs/docs.docx +0 -0
  47. package/docs/raisins.json +1 -1
  48. package/grapesjs/grapesjs.js +1 -1
  49. package/package.json +1 -1
  50. package/dist/esm-es5/sqm-big-stat_45.entry.js +0 -1
  51. package/dist/mint-components/p-54ea8b9b.system.entry.js +0 -1
  52. package/dist/mint-components/p-807ed3bf.system.js +0 -1
  53. package/dist/mint-components/p-cacb897d.system.entry.js +0 -1
  54. package/dist/mint-components/p-de7bb373.entry.js +0 -9
  55. package/dist/mint-components/p-e9258d20.system.entry.js +0 -1
  56. package/dist/mint-components/p-ff378015.entry.js +0 -106
@@ -0,0 +1,180 @@
1
+ import { useLocale, useMutation, useQuery, useUserIdentity, } from "@saasquatch/component-boilerplate";
2
+ import { useState } from "@saasquatch/universal-hooks";
3
+ import { gql } from "graphql-request";
4
+ import { TAX_FORM_UPDATED_EVENT_KEY } from "../tax-and-cash/eventKeys";
5
+ export const GET_USER_PARTNER_INFO = gql `
6
+ query getUserPartnerInfo {
7
+ user: viewer {
8
+ ... on User {
9
+ id
10
+ firstName
11
+ lastName
12
+ email
13
+ countryCode
14
+ customFields
15
+ impactConnection {
16
+ connected
17
+ publisher {
18
+ countryCode
19
+ currency
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
25
+ `;
26
+ export const GET_COUNTRIES = gql `
27
+ query getCountries {
28
+ impactPayoutCountries(limit: 1000) {
29
+ data {
30
+ countryCode
31
+ displayName
32
+ }
33
+ }
34
+ }
35
+ `;
36
+ export const GET_CURRENCIES = gql `
37
+ query currencies($locale: RSLocale) {
38
+ currencies(limit: 300) {
39
+ data {
40
+ displayName(locale: $locale)
41
+ currencyCode
42
+ }
43
+ }
44
+ }
45
+ `;
46
+ export const CONNECT_PARTNER = gql `
47
+ mutation createImpactConnection($vars: ImpactConnectionInput!) {
48
+ createImpactConnection(impactConnectionInput: $vars) {
49
+ success
50
+ validationErrors {
51
+ field
52
+ message
53
+ }
54
+ user {
55
+ id
56
+ accountId
57
+ impactConnection {
58
+ connected
59
+ publisher {
60
+ brandedSignup
61
+ requiredTaxDocumentType
62
+ currentTaxDocument {
63
+ type
64
+ status
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ `;
72
+ const GET_BRAND_NAME = gql `
73
+ query getTenantSettings {
74
+ tenantSettings {
75
+ companyName
76
+ }
77
+ }
78
+ `;
79
+ export function usePartnerInfoModal(props) {
80
+ var _a, _b, _c, _d;
81
+ const user = useUserIdentity();
82
+ const locale = useLocale();
83
+ const { data: userData, loading: userLoading, refetch, } = useQuery(GET_USER_PARTNER_INFO, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
84
+ const { data: currenciesData } = useQuery(GET_CURRENCIES, { variables: { locale } }, !(user === null || user === void 0 ? void 0 : user.jwt));
85
+ const { data: countriesData } = useQuery(GET_COUNTRIES, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
86
+ const { data: tenantSettingsData } = useQuery(GET_BRAND_NAME, {});
87
+ const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = useMutation(CONNECT_PARTNER);
88
+ const [countryCode, setCountryCode] = useState("");
89
+ const [currency, setCurrency] = useState("");
90
+ const [error, setError] = useState("");
91
+ const [success, setSuccess] = useState(false);
92
+ console.log(user, "user identity in create partner modal"); // TEMP
93
+ console.log(userData, "user data from partner info query"); // TEMP
94
+ const impactConnection = (_a = userData === null || userData === void 0 ? void 0 : userData.user) === null || _a === void 0 ? void 0 : _a.impactConnection;
95
+ function onCountryChange(e) {
96
+ var _a, _b;
97
+ const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
98
+ if (!value)
99
+ return;
100
+ setCountryCode(value);
101
+ setCurrency("");
102
+ setError("");
103
+ }
104
+ function onCurrencyChange(e) {
105
+ var _a, _b;
106
+ const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
107
+ if (!value)
108
+ return;
109
+ setCurrency(value);
110
+ setError("");
111
+ }
112
+ async function onSubmit() {
113
+ var _a, _b;
114
+ if (!countryCode || !currency) {
115
+ setError(props.missingFieldsErrorText);
116
+ return;
117
+ }
118
+ setError("");
119
+ // AL TODO: How to create impact connection if we dont have address, postalCode, and city?
120
+ try {
121
+ const vars = {
122
+ user: {
123
+ id: user.id,
124
+ accountId: user.accountId,
125
+ },
126
+ firstName: userData.user.firstName,
127
+ lastName: userData.user.lastName,
128
+ countryCode,
129
+ currency,
130
+ };
131
+ const result = await connectImpactPartner({ vars });
132
+ if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message)) {
133
+ setError(props.networkErrorText);
134
+ return;
135
+ }
136
+ const connectionResult = result
137
+ .createImpactConnection;
138
+ console.log(result, connectionResult, "result and connectionResult from creating partner from modal");
139
+ if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
140
+ const validationMsg = (_b = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join(". ");
141
+ setError(validationMsg || props.networkErrorText);
142
+ console.error("Failed to create Impact connection:", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
143
+ return;
144
+ }
145
+ // Success
146
+ window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
147
+ await refetch();
148
+ setSuccess(true);
149
+ }
150
+ catch (e) {
151
+ console.error("Partner creation error:", e);
152
+ setError(props.networkErrorText);
153
+ }
154
+ }
155
+ const shouldShow = !success && !userLoading && !(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected);
156
+ return {
157
+ states: {
158
+ open: shouldShow,
159
+ loading: userLoading,
160
+ submitting: connectLoading,
161
+ isExistingPartner: !!(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected),
162
+ countryCode,
163
+ currency,
164
+ error,
165
+ success,
166
+ brandName: ((_b = tenantSettingsData === null || tenantSettingsData === void 0 ? void 0 : tenantSettingsData.tenantSettings) === null || _b === void 0 ? void 0 : _b.companyName) || "",
167
+ filteredCountries: ((_c = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _c === void 0 ? void 0 : _c.data) || [],
168
+ filteredCurrencies: ((_d = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _d === void 0 ? void 0 : _d.data) || [],
169
+ },
170
+ callbacks: {
171
+ onCountryChange,
172
+ onCurrencyChange,
173
+ onCountrySearch: () => { },
174
+ onCurrencySearch: () => { },
175
+ onSubmit,
176
+ onClose: () => setSuccess(true),
177
+ },
178
+ text: props.getTextProps(),
179
+ };
180
+ }
@@ -107,6 +107,7 @@ import * as LeadFormDropdownField from "../sqm-lead-form/LeadFormDropdownField.s
107
107
  import * as LeadCheckboxField from "../sqm-lead-form/LeadCheckboxField.stories";
108
108
  import * as Skeleton from "../sqm-skeleton/Skeleton.stories";
109
109
  import * as UserInfoFormView from "../tax-and-cash/sqm-user-info-form/UserInfoFormView.stories";
110
+ import * as PartnerInfoModal from "../sqm-partner-info-modal/PartnerInfoModal.stories";
110
111
  import { ShadowViewAddon } from "../../ShadowViewAddon";
111
112
  import { CucumberAddon } from "./CucumberAddon";
112
113
  import { HookStoryAddon } from "./HookStoryAddon";
@@ -218,6 +219,7 @@ const stories = [
218
219
  TaxAndCashRewardsTable,
219
220
  TaxAndCashReferralTableRewardsCell,
220
221
  TaxAndCashReferralTable,
222
+ PartnerInfoModal,
221
223
  ];
222
224
  /**
223
225
  * For internal documentation
@@ -1,7 +1,7 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { intl } from "../../../global/global";
3
3
  export function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
4
- 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;
4
+ 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, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70;
5
5
  const { errors, ...formState } = props.states.formState;
6
6
  return {
7
7
  0: {
@@ -10,44 +10,54 @@ export function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
10
10
  helpText: getValidationErrorMessage({
11
11
  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,
12
12
  label: props.text.beneficiaryAccountNameLabel,
13
+ 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,
14
+ fieldName: "beneficiaryAccountName",
13
15
  }),
14
16
  })))),
15
17
  },
16
18
  1: {
17
- 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) && {
19
+ input: (h("sl-select", Object.assign({ required: true, label: props.text.bankAccountTypeLabel, name: "/bankAccountType", id: "bankAccountType", key: "bankAccountType" }, (((_f = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _f === void 0 ? void 0 : _f.bankAccountType) && {
18
20
  class: "error-input",
19
21
  helpText: getValidationErrorMessage({
20
- 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,
22
+ type: (_h = (_g = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _g === void 0 ? void 0 : _g.bankAccountType) === null || _h === void 0 ? void 0 : _h.type,
21
23
  label: props.text.bankAccountTypeLabel,
24
+ 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,
25
+ fieldName: "bankAccountType",
22
26
  }),
23
27
  })),
24
28
  h("sl-menu-item", { value: "CHECKING" }, props.text.checkingSelectItemLabel),
25
29
  h("sl-menu-item", { value: "SAVINGS" }, props.text.savingsSelectItemLabel))),
26
30
  },
27
31
  2: {
28
- 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) && {
32
+ input: (h("sl-input", Object.assign({ required: true, label: props.text.bankAccountNumberLabel, name: "/bankAccountNumber", id: "bankAccountNumber", key: "bankAccountNumber", value: formState.bankAccountNumber, type: "text" }, (((_l = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _l === void 0 ? void 0 : _l.bankAccountNumber) && {
29
33
  class: "error-input",
30
34
  helpText: getValidationErrorMessage({
31
- 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,
35
+ type: (_o = (_m = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _m === void 0 ? void 0 : _m.bankAccountNumber) === null || _o === void 0 ? void 0 : _o.type,
32
36
  label: props.text.bankAccountNumberLabel,
37
+ 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,
38
+ fieldName: "bankAccountNumber",
33
39
  }),
34
40
  })))),
35
41
  },
36
42
  3: {
37
- 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) && {
43
+ input: (h("sl-input", Object.assign({ required: true, label: props.text.ibanLabel, name: "/bankAccountNumber", id: "iban", key: "iban", type: "text", value: formState.bankAccountNumber }, (((_r = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _r === void 0 ? void 0 : _r.bankAccountNumber) && {
38
44
  class: "error-input",
39
45
  helpText: getValidationErrorMessage({
40
- 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,
46
+ type: (_t = (_s = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _s === void 0 ? void 0 : _s.bankAccountNumber) === null || _t === void 0 ? void 0 : _t.type,
41
47
  label: props.text.ibanLabel,
48
+ 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,
49
+ fieldName: "bankAccountNumber",
42
50
  }),
43
51
  })))),
44
52
  },
45
53
  4: {
46
- 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) && {
54
+ input: (h("sl-input", Object.assign({ required: true, label: props.text.swiftCodeLabel, name: "/swiftCode", id: "swiftCode", key: "swiftCode", type: "text" }, (((_w = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _w === void 0 ? void 0 : _w.swiftCode) && {
47
55
  class: "error-input",
48
56
  helpText: getValidationErrorMessage({
49
- 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,
57
+ type: (_y = (_x = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _x === void 0 ? void 0 : _x.swiftCode) === null || _y === void 0 ? void 0 : _y.type,
50
58
  label: props.text.swiftCodeLabel,
59
+ 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,
60
+ fieldName: "swiftCode",
51
61
  }),
52
62
  })))),
53
63
  },
@@ -57,35 +67,41 @@ export function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
57
67
  defaultMessage: props.text.routingCodeLabel,
58
68
  }, {
59
69
  bankCountry,
60
- }), 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) && {
70
+ }), name: "/routingCode", id: "routingCode", key: "routingCode", type: "text" }, (((_1 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _1 === void 0 ? void 0 : _1.routingCode) && {
61
71
  class: "error-input",
62
72
  helpText: getValidationErrorMessage({
63
- 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,
73
+ type: (_3 = (_2 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _2 === void 0 ? void 0 : _2.routingCode) === null || _3 === void 0 ? void 0 : _3.type,
64
74
  label: intl.formatMessage({
65
75
  id: "routingCodeErrorText",
66
76
  defaultMessage: props.text.routingCodeLabel,
67
77
  }, {
68
78
  bankCountry,
69
79
  }),
80
+ 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,
81
+ fieldName: "routingCode",
70
82
  }),
71
83
  })))),
72
84
  },
73
85
  6: {
74
- 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) && {
86
+ input: (h("sl-input", Object.assign({ required: true, label: props.text.bankNameLabel, name: "/bankName", id: "bankName", key: "bankName", type: "text" }, (((_6 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _6 === void 0 ? void 0 : _6.bankName) && {
75
87
  class: "error-input",
76
88
  helpText: getValidationErrorMessage({
77
- 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,
89
+ type: (_8 = (_7 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _7 === void 0 ? void 0 : _7.bankName) === null || _8 === void 0 ? void 0 : _8.type,
78
90
  label: props.text.bankNameLabel,
91
+ 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,
92
+ fieldName: "bankName",
79
93
  }),
80
94
  })))),
81
95
  },
82
96
  7: {
83
97
  input: [
84
- 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) && {
98
+ h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_11 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _11 === void 0 ? void 0 : _11.beneficiaryClassification) && {
85
99
  class: "error-input",
86
100
  helpText: getValidationErrorMessage({
87
- 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,
101
+ type: (_13 = (_12 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _12 === void 0 ? void 0 : _12.beneficiaryClassification) === null || _13 === void 0 ? void 0 : _13.type,
88
102
  label: props.text.classificationLabel,
103
+ 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,
104
+ fieldName: "beneficiaryClassification",
89
105
  }),
90
106
  })),
91
107
  h("sl-menu-item", { value: "BUSINESS" }, props.text.businessSelectItemLabel),
@@ -96,100 +112,122 @@ export function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
96
112
  defaultMessage: props.text.taxPayerIdLabel,
97
113
  }, {
98
114
  bankCountry,
99
- }), 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) && {
115
+ }), type: "text", name: "/beneficiaryTaxPayerId", id: "beneficiaryTaxPayerId", key: "beneficiaryTaxPayerId" }, (((_16 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _16 === void 0 ? void 0 : _16.beneficiaryTaxPayerId) && {
100
116
  class: "error-input",
101
117
  helpText: getValidationErrorMessage({
102
- 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,
118
+ type: (_18 = (_17 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _17 === void 0 ? void 0 : _17.beneficiaryTaxPayerId) === null || _18 === void 0 ? void 0 : _18.type,
103
119
  label: props.text.taxPayerIdLabel,
120
+ 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,
121
+ fieldName: "taxPayerId",
104
122
  }),
105
123
  }))),
106
124
  ],
107
125
  },
108
126
  8: {
109
- 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) && {
127
+ input: (h("sl-select", Object.assign({ required: true, label: props.text.classificationCPFLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_21 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _21 === void 0 ? void 0 : _21.beneficiaryClassification) && {
110
128
  class: "error-input",
111
129
  helpText: getValidationErrorMessage({
112
- 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,
130
+ type: (_23 = (_22 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _22 === void 0 ? void 0 : _22.beneficiaryClassification) === null || _23 === void 0 ? void 0 : _23.type,
113
131
  label: props.text.classificationCPFLabel,
132
+ 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,
133
+ fieldName: "beneficiaryClassification",
114
134
  }),
115
135
  })),
116
136
  h("sl-menu-item", { value: "CPF" }, "CPF"),
117
137
  h("sl-menu-item", { value: "CNPJ" }, "CNPJ"))),
118
138
  },
119
139
  9: {
120
- 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) && {
140
+ input: (h("sl-input", Object.assign({ key: "patronymicName", required: true, label: props.text.patronymicNameLabel, name: "/patronymicName", id: "patronymicName", type: "text" }, (((_26 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _26 === void 0 ? void 0 : _26.patronymicName) && {
121
141
  class: "error-input",
122
142
  helpText: getValidationErrorMessage({
123
- 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,
143
+ type: (_28 = (_27 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _27 === void 0 ? void 0 : _27.patronymicName) === null || _28 === void 0 ? void 0 : _28.type,
124
144
  label: props.text.patronymicNameLabel,
145
+ 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,
146
+ fieldName: "patronymicName",
125
147
  }),
126
148
  })))),
127
149
  },
128
150
  10: {
129
- 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) && {
151
+ input: (h("sl-input", Object.assign({ key: "voCode", label: props.text.voCodeLabel, name: "/voCode", id: "voCode", type: "text" }, (((_31 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _31 === void 0 ? void 0 : _31.voCode) && {
130
152
  class: "error-input",
131
153
  helpText: getValidationErrorMessage({
132
- 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,
154
+ type: (_33 = (_32 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _32 === void 0 ? void 0 : _32.voCode) === null || _33 === void 0 ? void 0 : _33.type,
133
155
  label: props.text.voCodeLabel,
156
+ 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,
157
+ fieldName: "voCode",
134
158
  }),
135
159
  })))),
136
160
  },
137
161
  11: {
138
- 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) && {
162
+ input: (h("sl-input", Object.assign({ required: true, label: props.text.agencyCodeLabel, name: "/agencyCode", id: "agencyCode", key: "agencyCode", type: "text" }, (((_36 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _36 === void 0 ? void 0 : _36.agencyCode) && {
139
163
  class: "error-input",
140
164
  helpText: getValidationErrorMessage({
141
- 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,
165
+ type: (_38 = (_37 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _37 === void 0 ? void 0 : _37.agencyCode) === null || _38 === void 0 ? void 0 : _38.type,
142
166
  label: props.text.agencyCodeLabel,
167
+ 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,
168
+ fieldName: "agencyCode",
143
169
  }),
144
170
  })))),
145
171
  },
146
172
  12: {
147
173
  input: [
148
- 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) && {
174
+ h("sl-input", Object.assign({ required: true, label: props.text.bankAddressLabel, name: "/bankAddress", id: "bankAddress", key: "bankAddress", type: "text" }, (((_41 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _41 === void 0 ? void 0 : _41.bankAddress) && {
149
175
  class: "error-input",
150
176
  helpText: getValidationErrorMessage({
151
- 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,
177
+ type: (_43 = (_42 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _42 === void 0 ? void 0 : _42.bankAddress) === null || _43 === void 0 ? void 0 : _43.type,
152
178
  label: props.text.bankAddressLabel,
179
+ 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,
180
+ fieldName: "bankAddress",
153
181
  }),
154
182
  }))),
155
- 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) && {
183
+ h("sl-input", Object.assign({ required: true, label: props.text.bankCityLabel, name: "/bankCity", id: "bankCity", key: "bankCity", type: "text" }, (((_46 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _46 === void 0 ? void 0 : _46.bankCity) && {
156
184
  class: "error-input",
157
185
  helpText: getValidationErrorMessage({
158
- 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,
186
+ type: (_48 = (_47 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _47 === void 0 ? void 0 : _47.bankCity) === null || _48 === void 0 ? void 0 : _48.type,
159
187
  label: props.text.bankCityLabel,
188
+ 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,
189
+ fieldName: "bankCity",
160
190
  }),
161
191
  }))),
162
- 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) && {
192
+ h("sl-input", Object.assign({ required: true, label: props.text.bankStateLabel, name: "/bankState", id: "bankState", key: "bankState", type: "text" }, (((_51 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _51 === void 0 ? void 0 : _51.bankState) && {
163
193
  class: "error-input",
164
194
  helpText: getValidationErrorMessage({
165
- 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,
195
+ type: (_53 = (_52 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _52 === void 0 ? void 0 : _52.bankState) === null || _53 === void 0 ? void 0 : _53.type,
166
196
  label: props.text.bankStateLabel,
197
+ 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,
198
+ fieldName: "bankState",
167
199
  }),
168
200
  }))),
169
- 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) && {
201
+ h("sl-input", Object.assign({ required: true, label: props.text.bankPostalCodeLabel, name: "/bankPostalCode", id: "bankPostalCode", key: "bankPostalCode", type: "text" }, (((_56 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _56 === void 0 ? void 0 : _56.bankPostalCode) && {
170
202
  class: "error-input",
171
203
  helpText: getValidationErrorMessage({
172
- 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,
204
+ type: (_58 = (_57 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _57 === void 0 ? void 0 : _57.bankPostalCode) === null || _58 === void 0 ? void 0 : _58.type,
173
205
  label: props.text.bankPostalCodeLabel,
206
+ 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,
207
+ fieldName: "bankPostalCode",
174
208
  }),
175
209
  }))),
176
210
  ],
177
211
  },
178
212
  13: {
179
- 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) && {
213
+ input: (h("sl-input", Object.assign({ required: true, label: props.text.branchCodeLabel, name: "/branchCode", id: "branchCode", key: "branchCode", type: "text" }, (((_61 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _61 === void 0 ? void 0 : _61.branchCode) && {
180
214
  class: "error-input",
181
215
  helpText: getValidationErrorMessage({
182
- 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,
216
+ type: (_63 = (_62 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _62 === void 0 ? void 0 : _62.branchCode) === null || _63 === void 0 ? void 0 : _63.type,
183
217
  label: props.text.branchCodeLabel,
218
+ 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,
219
+ fieldName: "branchCode",
184
220
  }),
185
221
  })))),
186
222
  },
187
223
  14: {
188
- 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) && {
224
+ input: (h("sl-select", Object.assign({ required: true, label: props.text.classificationLabel, name: "/beneficiaryClassification", id: "beneficiaryClassification", key: "beneficiaryClassification" }, (((_66 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _66 === void 0 ? void 0 : _66.beneficiaryClassification) && {
189
225
  class: "error-input",
190
226
  helpText: getValidationErrorMessage({
191
- 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,
227
+ type: (_68 = (_67 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _67 === void 0 ? void 0 : _67.beneficiaryClassification) === null || _68 === void 0 ? void 0 : _68.type,
192
228
  label: props.text.classificationLabel,
229
+ 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,
230
+ fieldName: "beneficiaryClassification",
193
231
  }),
194
232
  })),
195
233
  h("sl-menu-item", { value: "BUSINESS" }, props.text.businessSelectItemLabel),