@saasquatch/mint-components 2.1.8-0 → 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.
Files changed (50) hide show
  1. package/dist/cjs/{ShadowViewAddon-1d15cdf7.js → ShadowViewAddon-a26deae6.js} +1 -1
  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 +54 -395
  5. package/dist/cjs/sqm-big-stat_45.cjs.entry.js +9 -4
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -1
  7. package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +1 -0
  8. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -1
  9. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +27 -1
  10. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +37 -75
  11. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +13 -688
  12. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -109
  13. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +4 -4
  14. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +2 -2
  15. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +6 -6
  16. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -2
  17. package/dist/esm/{ShadowViewAddon-53b9090b.js → ShadowViewAddon-47f1e579.js} +1 -1
  18. package/dist/esm/loader.js +1 -1
  19. package/dist/esm/mint-components.js +1 -1
  20. package/dist/esm/sqm-banking-info-form_10.entry.js +54 -395
  21. package/dist/esm/sqm-big-stat_45.entry.js +9 -4
  22. package/dist/esm/sqm-stencilbook.entry.js +2 -1
  23. package/dist/esm-es5/{ShadowViewAddon-53b9090b.js → ShadowViewAddon-47f1e579.js} +1 -1
  24. package/dist/esm-es5/loader.js +1 -1
  25. package/dist/esm-es5/mint-components.js +1 -1
  26. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  27. package/dist/esm-es5/sqm-big-stat_45.entry.js +1 -1
  28. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  29. package/dist/mint-components/mint-components.esm.js +1 -1
  30. package/dist/mint-components/{p-de7bb373.entry.js → p-0614dcbc.entry.js} +1 -1
  31. package/dist/mint-components/{p-e980472a.js → p-217dedde.js} +1 -1
  32. package/dist/mint-components/p-5492dd51.system.entry.js +1 -0
  33. package/dist/mint-components/{p-0e6c90b1.entry.js → p-7ee8f2ed.entry.js} +3 -3
  34. package/dist/mint-components/{p-e9258d20.system.entry.js → p-bf545082.system.entry.js} +1 -1
  35. package/dist/mint-components/p-ca098be1.system.js +1 -1
  36. package/dist/mint-components/{p-807ed3bf.system.js → p-ce050888.system.js} +1 -1
  37. package/dist/mint-components/p-d4f332a7.entry.js +106 -0
  38. package/dist/mint-components/{p-54ea8b9b.system.entry.js → p-de343dd0.system.entry.js} +1 -1
  39. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +1 -0
  40. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +5 -0
  41. package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +0 -2
  42. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +0 -4
  43. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +0 -165
  44. package/dist/types/components.d.ts +10 -240
  45. package/docs/docs.docx +0 -0
  46. package/docs/raisins.json +1 -1
  47. package/grapesjs/grapesjs.js +1 -1
  48. package/package.json +1 -1
  49. package/dist/mint-components/p-17b32de7.system.entry.js +0 -1
  50. package/dist/mint-components/p-7d16ee0e.entry.js +0 -108
@@ -25,109 +25,6 @@ export const paypalFeeMap = {
25
25
  const ACH_PAYMENT_METHOD = 3;
26
26
  const WIRE_PAYMENT_METHOD = 5;
27
27
  const PAYPAL_PAYMENT_METHOD = 7;
28
- /**
29
- * Maps GraphQL validation error field names to form field names.
30
- *
31
- * The Impact API returns UpperCamelCase field names (e.g. `BankAccountNumber`).
32
- * The GraphQL layer in `UserServiceImpl.java` converts these to lowerCamelCase
33
- * via `CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, errorDto.field)`.
34
- *
35
- * Most converted field names already match the form field names exactly
36
- * (e.g. `bankAccountNumber`, `swiftCode`, `routingCode`). Only entries
37
- * where the GraphQL field name differs from the form field name need
38
- * to be listed here.
39
- */
40
- const API_FIELD_TO_FORM_FIELD = {
41
- // bankProvinceState → form uses bankState
42
- bankProvinceState: "bankState",
43
- };
44
- /**
45
- * Maps Impact API error code paths (from validationErrors[].errorPath) to short,
46
- * readable frontend error codes used in the ICU select props.
47
- *
48
- * The Impact API returns a stable dot-delimited error path (e.g.
49
- * "withdrawal.settings.error.routingcode") alongside the human-readable message.
50
- * The GraphQL layer exposes this as `errorPath`. The keys below match those paths
51
- * to short frontend codes used in the ICU `{errorCode, select, ...}` props.
52
- */
53
- const API_ERROR_PATH_TO_FRONTEND = {
54
- // Beneficiary account name
55
- "withdrawal.settings.error.empty_beneficiaryname": "empty",
56
- "withdrawal.settings.error.invalid_character_beneficiaryname": "invalidCharacters",
57
- "withdrawal.settings.error.numeric_beneficiaryname": "numeric",
58
- "withdrawal_settings.error.beneficiaryname.size": "tooLong",
59
- "withdrawal.settings.error.non_english_beneficiaryname": "nonEnglish",
60
- "withdrawal_settings.error.business_beneficiaryname_match": "businessNameMismatch",
61
- "withdrawal_settings.error.beneficiaryname_match": "nameMismatch",
62
- "withdrawal_settings.error.business_checkpayeename_match": "businessPayeeMismatch",
63
- "withdrawal_settings.error.checkpayeename_match": "payeeMismatch",
64
- // Bank account number
65
- "withdrawal.settings.error.accountnumber.empty": "empty",
66
- "withdrawal.settings.error.accountnumber.uk": "invalidUk",
67
- "withdrawal.settings.error.bankaccount.invalid": "invalid",
68
- // IBAN
69
- "withdrawal.settings.error.iban": "ibanEmpty",
70
- "withdrawal.settings.error.iban.alphanumeric": "ibanAlphanumeric",
71
- "withdrawal.settings.error.iban.invalid": "ibanInvalid",
72
- "withdrawal.settings.error.iban.uk.country.mismatch": "ibanCountryMismatch",
73
- // Routing code
74
- "withdrawal.settings.error.bsbNumber": "invalidBsb",
75
- "withdrawal.settings.error.sortcode": "invalidSortCode",
76
- "withdrawal.settings.error.routingNumber": "empty",
77
- "withdrawal.settings.error.routingcode": "invalid",
78
- // SWIFT / BIC
79
- "withdrawal.settings.error.bic": "empty",
80
- "withdrawal.settings.error.bic.alphanumeric": "alphanumeric",
81
- "withdrawal.settings.error.bic.invalid": "invalid",
82
- // Bank account type
83
- "global.error.invalid.accounttype": "empty",
84
- // Bank name
85
- "withdrawal.settings.error.bankName": "empty",
86
- // Tax payer ID
87
- "withdrawal.settings.error.taxPayerId": "empty",
88
- "withdrawal.settings.error.taxPayerId.ar": "emptyAr",
89
- "withdrawal.settings.error.taxPayerId.kr": "emptyKr",
90
- "withdrawal.settings.error.taxPayerId.alphanumeric": "alphanumeric",
91
- "withdrawal.settings.error.taxPayerId.alphanumeric.ar": "alphanumericAr",
92
- "withdrawal.settings.error.taxPayerId.alphanumeric.kr": "alphanumericKr",
93
- "withdrawal.settings.error.taxPayerId.invalid": "invalid",
94
- "withdrawal.settings.error.taxPayerId.invalid.ar": "invalidAr",
95
- "withdrawal.settings.error.taxPayerId.invalid.kr": "invalidKr",
96
- "withdrawal.settings.error.taxPayerId.invalid.kzt": "invalidKzt",
97
- "withdrawal.settings.error.taxPayerId.cnpj": "cnpjTooShort",
98
- "withdrawal.settings.error.taxPayerId.cpf": "cpfTooShort",
99
- // Patronymic name
100
- "withdrawal.settings.error.patronymicName": "empty",
101
- "withdrawal.settings.error.patronymicName.alphanumeric": "alphanumeric",
102
- // VO code
103
- "withdrawal.settings.error.voCode": "empty",
104
- "withdrawal.settings.error.voCode.alphanumeric": "alphanumeric",
105
- // Agency code
106
- "withdrawal.settings.error.agencyCode": "empty",
107
- "withdrawal.settings.error.agencyCode.alphanumeric": "alphanumeric",
108
- "withdrawal.settings.error.agencyCode.length": "tooShort",
109
- // Bank address fields
110
- "withdrawal.settings.error.bankAddress": "empty",
111
- "withdrawal.settings.error.bankCity": "empty",
112
- "withdrawal.settings.error.bankProvinceState": "empty",
113
- "withdrawal.settings.error.bankPostalCode": "empty",
114
- // Branch code / name
115
- "withdrawal.settings.error.branchCode": "invalid",
116
- "withdrawal.settings.error.branchName": "empty",
117
- // Classification code
118
- "withdrawal.settings.error.classificationCode.invalid": "empty",
119
- "withdrawal.settings.error.classificationCode.invalid.kzt": "invalidKzt",
120
- // PayPal
121
- "payment.error.email": "empty",
122
- "payment.error.paypal_not_supported": "unsupportedCurrency",
123
- "payment.error.email.invalid": "invalidEmail",
124
- "payment.error.paypal_verification_incomplete": "verificationIncomplete",
125
- // Payment schedule
126
- "payment.error.no_threshold": "empty",
127
- "payment.error.invalid_threshold": "invalid",
128
- "payment.error.no_dayOfMonth": "empty",
129
- "payment.error.invalid_dayOfMonth": "invalid",
130
- };
131
28
  export function getFormInputs({ bitset, formMap }) {
132
29
  // Convert bitset to binary representation
133
30
  const binary = bitset.toString(2).padStart(Object.keys(formMap).length, "0");
@@ -151,7 +48,6 @@ const SAVE_WITHDRAWAL_SETTINGS = gql `
151
48
  validationErrors {
152
49
  field
153
50
  message
154
- errorPath
155
51
  }
156
52
  }
157
53
  }
@@ -167,7 +63,6 @@ const UPDATE_WITHDRAWAL_SETTINGS = gql `
167
63
  validationErrors {
168
64
  field
169
65
  message
170
- errorPath
171
66
  }
172
67
  }
173
68
  }
@@ -340,13 +235,10 @@ export function useBankingInfoForm(props) {
340
235
  else if (!success) {
341
236
  console.error("Validation failed: ", validationErrors);
342
237
  const mappedValidationErrors = validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.reduce((agg, error) => {
343
- const formField = API_FIELD_TO_FORM_FIELD[error.field] || error.field;
344
- const errorCode = API_ERROR_PATH_TO_FRONTEND[error.errorPath] || error.errorPath;
345
238
  return {
346
239
  ...agg,
347
- [formField]: {
240
+ [error.field]: {
348
241
  type: "invalid",
349
- errorCode,
350
242
  },
351
243
  };
352
244
  }, {});
@@ -65,7 +65,7 @@ export class IndirectTaxForm {
65
65
  /**
66
66
  * @uiName Indirect tax number field label
67
67
  */
68
- this.indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}";
68
+ 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}}";
69
69
  /**
70
70
  * Displayed to participants registered for QST.
71
71
  * @uiName QST number field label
@@ -104,7 +104,7 @@ export class IndirectTaxForm {
104
104
  /**
105
105
  * @uiName Missing indirect tax number error message
106
106
  */
107
- 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";
107
+ 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";
108
108
  /**
109
109
  * Placeholder text displayed in the country search dropdown
110
110
  * @uiName Country field placeholder text
@@ -457,7 +457,7 @@ export class IndirectTaxForm {
457
457
  },
458
458
  "attribute": "indirect-tax-number",
459
459
  "reflect": false,
460
- "defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}\""
460
+ "defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number} other {Tax number}}\""
461
461
  },
462
462
  "qstNumber": {
463
463
  "type": "string",
@@ -631,7 +631,7 @@ export class IndirectTaxForm {
631
631
  },
632
632
  "attribute": "indirect-tax-number-error",
633
633
  "reflect": false,
634
- "defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required\""
634
+ "defaultValue": "\"{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\""
635
635
  },
636
636
  "searchForCountryText": {
637
637
  "type": "string",
@@ -15,7 +15,7 @@ export class PayoutDetailsCard {
15
15
  * Badge text indicating payout status
16
16
  * @uiName Payout badge status text
17
17
  */
18
- this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
18
+ this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} other {Failed}}";
19
19
  /**
20
20
  * Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
21
21
  * @uiName Payout schedule by threshold text
@@ -73,7 +73,7 @@ export class PayoutDetailsCard {
73
73
  },
74
74
  "attribute": "status-badge-text",
75
75
  "reflect": false,
76
- "defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }\""
76
+ "defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} other {Failed}}\""
77
77
  },
78
78
  "thresholdPayoutText": {
79
79
  "type": "string",
@@ -176,7 +176,7 @@ export class TaxAndCashMonolith {
176
176
  * @uiName Indirect tax number field label
177
177
  * @uiGroup Step 2 Properties
178
178
  */
179
- this.step2_indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}";
179
+ this.step2_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}}";
180
180
  /**
181
181
  * @uiName Province field label
182
182
  * @uiGroup Step 2 Properties
@@ -186,7 +186,7 @@ export class TaxAndCashMonolith {
186
186
  * @uiName Missing indirect tax number error message
187
187
  * @uiGroup Step 2 Properties
188
188
  */
189
- this.step2_indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required";
189
+ this.step2_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";
190
190
  /**
191
191
  * Displayed to participants registered for QST.
192
192
  * @uiName QST number field label
@@ -754,7 +754,7 @@ export class TaxAndCashMonolith {
754
754
  * @uiName Payout status badge
755
755
  * @uiGroup Dashboard Properties
756
756
  */
757
- this.dashboard_statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
757
+ this.dashboard_statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} other {Failed} }";
758
758
  /**
759
759
  * Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
760
760
  * @uiName Payout schedule by threshold text
@@ -1844,7 +1844,7 @@ export class TaxAndCashMonolith {
1844
1844
  },
1845
1845
  "attribute": "step-2_indirect-tax-number",
1846
1846
  "reflect": false,
1847
- "defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}\""
1847
+ "defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number} other {Tax number}}\""
1848
1848
  },
1849
1849
  "step2_province": {
1850
1850
  "type": "string",
@@ -1892,7 +1892,7 @@ export class TaxAndCashMonolith {
1892
1892
  },
1893
1893
  "attribute": "step-2_indirect-tax-number-error",
1894
1894
  "reflect": false,
1895
- "defaultValue": "\"{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required\""
1895
+ "defaultValue": "\"{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\""
1896
1896
  },
1897
1897
  "step2_qstNumber": {
1898
1898
  "type": "string",
@@ -4259,7 +4259,7 @@ export class TaxAndCashMonolith {
4259
4259
  },
4260
4260
  "attribute": "dashboard_status-badge-text",
4261
4261
  "reflect": false,
4262
- "defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }\""
4262
+ "defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} other {Failed} }\""
4263
4263
  },
4264
4264
  "dashboard_thresholdPayoutText": {
4265
4265
  "type": "string",
@@ -168,7 +168,7 @@ export class TaxAndCashDashboard {
168
168
  /**
169
169
  * @uiName Payout status badge
170
170
  */
171
- this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
171
+ this.statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} other {Failed} }";
172
172
  /**
173
173
  * Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
174
174
  * @uiName Payout schedule by threshold text
@@ -1049,7 +1049,7 @@ export class TaxAndCashDashboard {
1049
1049
  },
1050
1050
  "attribute": "status-badge-text",
1051
1051
  "reflect": false,
1052
- "defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }\""
1052
+ "defaultValue": "\"{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} other {Failed} }\""
1053
1053
  },
1054
1054
  "thresholdPayoutText": {
1055
1055
  "type": "string",
@@ -3022,7 +3022,7 @@ function ReferralIframeView(props) {
3022
3022
  const styleString = sheet.toString();
3023
3023
  return (h("div", { class: sheet.classes.Container },
3024
3024
  h("style", { type: "text/css" }, styleString),
3025
- h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
3025
+ h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?${encodeURIComponent(content.codeParam)}=${data.shareCode}` })));
3026
3026
  }
3027
3027
 
3028
3028
  const CheckMark = () => (h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },