@saasquatch/mint-components 2.5.0-5 → 2.5.0

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 (168) hide show
  1. package/dist/cjs/{ErrorView-ee7b0f36.js → ErrorView-17578c10.js} +1 -1
  2. package/dist/cjs/{ShadowViewAddon-6d88b845.js → ShadowViewAddon-d4cf928f.js} +6 -6
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/mint-components.cjs.js +1 -1
  5. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +6 -5
  6. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +25 -23
  7. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +17 -4
  8. package/dist/cjs/sqm-form-message_2.cjs.entry.js +4 -4
  9. package/dist/cjs/{sqm-partner-info-modal-view-d9b61d54.js → sqm-partner-info-modal-view-e97ce8ef.js} +21 -8
  10. package/dist/cjs/{sqm-qr-code-view-1f2daa76.js → sqm-qr-code-view-0d43424e.js} +1 -1
  11. package/dist/cjs/sqm-qr-code.cjs.entry.js +2 -2
  12. package/dist/cjs/sqm-stencilbook.cjs.entry.js +45 -10
  13. package/dist/cjs/{sqm-user-info-form-view-6a65f1fb.js → sqm-user-info-form-view-e725523f.js} +20 -26
  14. package/dist/cjs/{subregions-d12829d6.js → subregions-cd5c7ad6.js} +9 -4
  15. package/dist/cjs/{useIndirectTaxForm-0969e194.js → useIndirectTaxForm-ed4df485.js} +23 -35
  16. package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +1 -1
  17. package/dist/collection/components/sqm-coupon-code/sqm-coupon-code-view.js +1 -1
  18. package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +1 -1
  19. package/dist/collection/components/sqm-empty/sqm-empty.js +1 -1
  20. package/dist/collection/components/sqm-form-message/sqm-form-message.js +6 -4
  21. package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +1 -0
  22. package/dist/collection/components/sqm-lead-form/sqm-lead-checkbox-field.js +2 -0
  23. package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field.js +2 -0
  24. package/dist/collection/components/sqm-lead-form/sqm-lead-input-field.js +2 -0
  25. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +16 -1
  26. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +21 -8
  27. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +59 -1
  28. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +4 -3
  29. package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +6 -0
  30. package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +3 -0
  31. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +0 -1
  32. package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +1 -0
  33. package/dist/collection/components/sqm-referred-registration/sqm-referred-registration.js +1 -0
  34. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +3 -3
  35. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +0 -3
  36. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +3 -0
  37. package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +1 -1
  38. package/dist/collection/components/sqm-share-button/sqm-share-button.js +1 -2
  39. package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +1 -0
  40. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +38 -3
  41. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +2 -1
  42. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +1 -1
  43. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +1 -1
  44. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +1 -0
  45. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +10 -1
  46. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +10 -14
  47. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +1 -1
  48. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +22 -34
  49. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/ErrorView.js +1 -1
  50. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +4 -2
  51. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.js +8 -1
  52. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +19 -25
  53. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -1
  54. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +2 -1
  55. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -0
  56. package/dist/collection/components/tax-and-cash/utils.js +9 -4
  57. package/dist/esm/{ErrorView-74cb3af8.js → ErrorView-c6fc1d9b.js} +1 -1
  58. package/dist/esm/{ShadowViewAddon-86b5e986.js → ShadowViewAddon-722e6707.js} +6 -6
  59. package/dist/esm/loader.js +1 -1
  60. package/dist/esm/mint-components.js +1 -1
  61. package/dist/esm/sqm-banking-info-form_10.entry.js +6 -5
  62. package/dist/esm/sqm-big-stat_47.entry.js +25 -23
  63. package/dist/esm/sqm-email-verification_2.entry.js +17 -4
  64. package/dist/esm/sqm-form-message_2.entry.js +4 -4
  65. package/dist/esm/{sqm-partner-info-modal-view-b921fed1.js → sqm-partner-info-modal-view-9c7a2c8c.js} +21 -8
  66. package/dist/esm/{sqm-qr-code-view-ce476721.js → sqm-qr-code-view-dd46daa3.js} +1 -1
  67. package/dist/esm/sqm-qr-code.entry.js +2 -2
  68. package/dist/esm/sqm-stencilbook.entry.js +45 -10
  69. package/dist/esm/{sqm-user-info-form-view-72afa9af.js → sqm-user-info-form-view-008f8969.js} +20 -26
  70. package/dist/esm/{subregions-98789b46.js → subregions-8e84e5fa.js} +10 -5
  71. package/dist/esm/{useIndirectTaxForm-bbe8779d.js → useIndirectTaxForm-f622ba23.js} +23 -35
  72. package/dist/esm-es5/ErrorView-c6fc1d9b.js +1 -0
  73. package/dist/esm-es5/ShadowViewAddon-722e6707.js +1 -0
  74. package/dist/esm-es5/loader.js +1 -1
  75. package/dist/esm-es5/mint-components.js +1 -1
  76. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  77. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  78. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  79. package/dist/esm-es5/sqm-form-message_2.entry.js +1 -1
  80. package/dist/esm-es5/sqm-partner-info-modal-view-9c7a2c8c.js +1 -0
  81. package/dist/esm-es5/{sqm-qr-code-view-ce476721.js → sqm-qr-code-view-dd46daa3.js} +1 -1
  82. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  83. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  84. package/dist/esm-es5/sqm-user-info-form-view-008f8969.js +1 -0
  85. package/dist/esm-es5/{subregions-98789b46.js → subregions-8e84e5fa.js} +1 -1
  86. package/dist/esm-es5/{useIndirectTaxForm-bbe8779d.js → useIndirectTaxForm-f622ba23.js} +2 -2
  87. package/dist/mint-components/mint-components.esm.js +1 -1
  88. package/dist/mint-components/{p-97edaf26.system.js → p-04da3964.system.js} +1 -1
  89. package/dist/mint-components/p-062fcc1d.system.entry.js +1 -0
  90. package/dist/mint-components/{p-5438b415.system.entry.js → p-09de0b11.system.entry.js} +1 -1
  91. package/dist/mint-components/p-17f7f612.js +499 -0
  92. package/dist/mint-components/p-2392aabe.entry.js +1 -0
  93. package/dist/mint-components/p-2d856a9f.system.entry.js +1 -0
  94. package/dist/mint-components/{p-53575d04.js → p-2ec539fc.js} +1 -1
  95. package/dist/mint-components/{p-c0517032.js → p-3484f1c1.js} +1 -1
  96. package/dist/mint-components/p-349d8437.system.js +1 -0
  97. package/dist/mint-components/{p-654cdee8.entry.js → p-3bf958d5.entry.js} +6 -5
  98. package/dist/mint-components/{p-81bc6dca.system.entry.js → p-3c9d8bf4.system.entry.js} +1 -1
  99. package/dist/mint-components/p-556338c3.system.js +1 -0
  100. package/dist/mint-components/p-56a7bb18.system.js +1 -0
  101. package/dist/mint-components/{p-84149f94.entry.js → p-64802b9e.entry.js} +3 -3
  102. package/dist/mint-components/p-815765ec.system.js +1 -0
  103. package/dist/mint-components/{p-29bc5f50.entry.js → p-91d2e886.entry.js} +2 -2
  104. package/dist/mint-components/{p-caa92c4b.entry.js → p-9cbb983c.entry.js} +11 -11
  105. package/dist/mint-components/p-9d05ad74.js +1 -0
  106. package/dist/mint-components/p-a6920cc9.system.entry.js +1 -0
  107. package/dist/mint-components/p-b27f98f1.js +108 -0
  108. package/dist/mint-components/p-bfb00685.system.js +1 -1
  109. package/dist/mint-components/p-c2254b88.js +1 -0
  110. package/dist/mint-components/{p-826e3db0.system.js → p-c5efdac3.system.js} +1 -1
  111. package/dist/mint-components/p-cb4acd7f.system.entry.js +1 -0
  112. package/dist/mint-components/{p-f5bea1c6.entry.js → p-de17f8b8.entry.js} +2 -2
  113. package/dist/mint-components/p-ea7218d3.system.js +6 -0
  114. package/dist/mint-components/p-ff8b3b02.js +1 -0
  115. package/dist/types/components/sqm-coupon-code/sqm-coupon-code.d.ts +1 -1
  116. package/dist/types/components/sqm-empty/sqm-empty.d.ts +1 -1
  117. package/dist/types/components/sqm-form-message/sqm-form-message.d.ts +2 -0
  118. package/dist/types/components/sqm-instant-access-registration/sqm-instant-access-registration.d.ts +1 -0
  119. package/dist/types/components/sqm-lead-form/sqm-lead-checkbox-field.d.ts +2 -0
  120. package/dist/types/components/sqm-lead-form/sqm-lead-dropdown-field.d.ts +2 -0
  121. package/dist/types/components/sqm-lead-form/sqm-lead-input-field.d.ts +2 -0
  122. package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +1 -0
  123. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +3 -0
  124. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +10 -0
  125. package/dist/types/components/sqm-portal-google-login/sqm-portal-google-login.d.ts +6 -0
  126. package/dist/types/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.d.ts +3 -0
  127. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +0 -1
  128. package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +1 -0
  129. package/dist/types/components/sqm-referred-registration/sqm-referred-registration.d.ts +1 -0
  130. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +0 -3
  131. package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +3 -0
  132. package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +1 -2
  133. package/dist/types/components/sqm-titled-section/sqm-titled-section.d.ts +1 -0
  134. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +8 -0
  135. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.d.ts +1 -0
  136. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +1 -0
  137. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +1 -0
  138. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +2 -1
  139. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +2 -0
  140. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.d.ts +1 -0
  141. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -0
  142. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +1 -0
  143. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +1 -0
  144. package/dist/types/components/tax-and-cash/utils.d.ts +4 -1
  145. package/dist/types/components.d.ts +30 -0
  146. package/docs/docs.docx +0 -0
  147. package/docs/raisins.json +1 -1
  148. package/grapesjs/grapesjs.js +1 -1
  149. package/package.json +2 -2
  150. package/dist/esm-es5/ErrorView-74cb3af8.js +0 -1
  151. package/dist/esm-es5/ShadowViewAddon-86b5e986.js +0 -1
  152. package/dist/esm-es5/sqm-partner-info-modal-view-b921fed1.js +0 -1
  153. package/dist/esm-es5/sqm-user-info-form-view-72afa9af.js +0 -1
  154. package/dist/mint-components/p-044a76f1.js +0 -1
  155. package/dist/mint-components/p-07b989a3.system.js +0 -6
  156. package/dist/mint-components/p-288249ae.system.entry.js +0 -1
  157. package/dist/mint-components/p-58dbdf63.system.js +0 -1
  158. package/dist/mint-components/p-714c5ef8.js +0 -1
  159. package/dist/mint-components/p-b15c0870.system.entry.js +0 -1
  160. package/dist/mint-components/p-b1feb0f1.js +0 -108
  161. package/dist/mint-components/p-bdfdee11.entry.js +0 -1
  162. package/dist/mint-components/p-bfb9b01a.system.entry.js +0 -1
  163. package/dist/mint-components/p-d10ac7eb.system.js +0 -1
  164. package/dist/mint-components/p-d570bdde.system.js +0 -1
  165. package/dist/mint-components/p-db73312a.system.js +0 -1
  166. package/dist/mint-components/p-f1af48c5.system.entry.js +0 -1
  167. package/dist/mint-components/p-f75ead20.js +0 -1
  168. package/dist/mint-components/p-ffcbe239.js +0 -499
@@ -22,8 +22,7 @@ import deepmerge from "deepmerge";
22
22
  * @example WhatsApp Share Button - <sqm-share-button medium="whatsapp">Share via WhatsApp</sqm-share-button>
23
23
  * @example LINE Share Button - <sqm-share-button medium="linemessenger">Share via Line Messenger</sqm-share-button>
24
24
  * @example Pinterest Share Button - <sqm-share-button medium="pinterest">Share on Pinterest</sqm-share-button>
25
- * @csspart primarybutton-base - The primary button base
26
- * @csspart secondarybutton-base - The secondary button base
25
+ * @csspart button-base - The button base, stable across all button style variants
27
26
  * @csspart icon - The share button icon
28
27
  */
29
28
  export class ShareButton {
@@ -9,6 +9,7 @@ import { PortalSectionView } from "./sqm-portal-section-view";
9
9
  * @slots [{"name":"label", "title":"Label"},{"name":"content", "title":"Content"}]
10
10
  * @exampleGroup Layout
11
11
  * @example Titled Section - <sqm-titled-section text-align="center" label-margin="small" padding="none"><div slot="label"><h2>Section Label</h2></div><div slot="content"><p>Add your section content here!</p></div></sqm-titled-section>
12
+ * @csspart sqm-base - The section base container
12
13
  * @csspart sqm-label - The section label
13
14
  */
14
15
  export class TitledSection {
@@ -40,6 +40,8 @@ const styleString = sheet.toString();
40
40
  * @uiName Widget Verification Flow
41
41
  * @exampleGroup Widget Verification
42
42
  * @example Widget Verification - <sqm-widget-verification></sqm-widget-verification>
43
+ * @csspart step-base - The base container of the currently rendered step
44
+ * @csspart primarybutton-base - The primary button base of the currently rendered step
43
45
  */
44
46
  export class WidgetVerification {
45
47
  constructor() {
@@ -202,6 +204,12 @@ export class WidgetVerification {
202
204
  * @uiWidget textArea
203
205
  */
204
206
  this.createPartnerStep_networkErrorText = "An error occurred. Please try again.";
207
+ /**
208
+ * @uiName Email verification error text
209
+ * @uiGroup Partner Creation Step
210
+ * @uiWidget textArea
211
+ */
212
+ this.createPartnerStep_emailVerificationErrorText = "Please log in to {loginLinkText} to review your account status. You may need to complete email verification or other pending steps. Once resolved, refresh this page to proceed.";
205
213
  /**
206
214
  * @uiName Missing fields error text
207
215
  * @uiGroup Partner Creation Step
@@ -240,12 +248,12 @@ export class WidgetVerification {
240
248
  const dialogLabel = this.general_widgetHeaderWithPartnerCreation;
241
249
  const renderStepContent = () => {
242
250
  if (props.showPartnerModal) {
243
- return (h("sqm-partner-info-modal", Object.assign({ inModal: true }, partnerText, { stateController: props["sqm-partner-info-modal_stateController"] || "{}" })));
251
+ return (h("sqm-partner-info-modal", Object.assign({ inModal: true }, partnerText, { stateController: props["sqm-partner-info-modal_stateController"] || "{}", exportparts: "sqm-base: step-base, primarybutton-base" })));
244
252
  }
245
253
  if (props.showCode) {
246
- return (h("sqm-code-verification", Object.assign({ onVerification: props.onVerification }, this.getStepTextProps("codeStep_"), extractProps(props, "sqm-code-verification_"))));
254
+ return (h("sqm-code-verification", Object.assign({ onVerification: props.onVerification }, this.getStepTextProps("codeStep_"), extractProps(props, "sqm-code-verification_"), { exportparts: "sqm-base: step-base, primarybutton-base" })));
247
255
  }
248
- return (h("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"), extractProps(props, "sqm-email-verification_"))));
256
+ return (h("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"), extractProps(props, "sqm-email-verification_"), { exportparts: "sqm-base: step-base, primarybutton-base" })));
249
257
  };
250
258
  return (h("div", null,
251
259
  h("style", { type: "text/css" }, styleString),
@@ -929,6 +937,33 @@ export class WidgetVerification {
929
937
  "reflect": false,
930
938
  "defaultValue": "\"An error occurred. Please try again.\""
931
939
  },
940
+ "createPartnerStep_emailVerificationErrorText": {
941
+ "type": "string",
942
+ "mutable": false,
943
+ "complexType": {
944
+ "original": "string",
945
+ "resolved": "string",
946
+ "references": {}
947
+ },
948
+ "required": false,
949
+ "optional": false,
950
+ "docs": {
951
+ "tags": [{
952
+ "text": "Email verification error text",
953
+ "name": "uiName"
954
+ }, {
955
+ "text": "Partner Creation Step",
956
+ "name": "uiGroup"
957
+ }, {
958
+ "text": "textArea",
959
+ "name": "uiWidget"
960
+ }],
961
+ "text": ""
962
+ },
963
+ "attribute": "create-partner-step_email-verification-error-text",
964
+ "reflect": false,
965
+ "defaultValue": "\"Please log in to {loginLinkText} to review your account status. You may need to complete email verification or other pending steps. Once resolved, refresh this page to proceed.\""
966
+ },
932
967
  "createPartnerStep_missingFieldsErrorText": {
933
968
  "type": "string",
934
969
  "mutable": false,
@@ -1220,7 +1220,8 @@ export const TaxAndCashDashboardBalanceUnderThreshold = () => {
1220
1220
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
1221
1221
  ...dashboardProps,
1222
1222
  states: {
1223
- payoutStatus: "BALANCE_UNDER_THRESHOLD",
1223
+ payoutStatus: "DONE",
1224
+ belowPayoutThreshold: true,
1224
1225
  minPayoutAmount: "USD50.00",
1225
1226
  veriffLoading: false,
1226
1227
  canEditPayoutInfo: true,
@@ -188,7 +188,7 @@ export const BankingInfoFormView = (props) => {
188
188
  h("div", { class: classes.LargeSkeleton }))));
189
189
  return skeletons;
190
190
  };
191
- return (h("sl-form", { part: "form-container", class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
191
+ return (h("sl-form", { part: "container", class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
192
192
  h("style", { type: "text/css" },
193
193
  styleString,
194
194
  vanillaStyle),
@@ -119,7 +119,7 @@ export const DocusignFormView = (props) => {
119
119
  var _a;
120
120
  const { states, states: { formState, documentTypeString }, callbacks, text, slots, } = props;
121
121
  const { classes } = sheet;
122
- return (h("div", { class: classes.Container, part: "form-container" },
122
+ return (h("div", { class: classes.Container, part: "container" },
123
123
  h("style", { type: "text/css" },
124
124
  styleString,
125
125
  vanillaStyle),
@@ -12,6 +12,7 @@ import { useIndirectTaxForm, } from "./useIndirectTaxForm";
12
12
  /**
13
13
  * @uiName Indirect Tax Form
14
14
  * @exampleGroup Tax and Cash Components
15
+ * @csspart form-container - The form container
15
16
  * @csspart alert-title - The alert title
16
17
  * @csspart primarybutton-base - The primary button base
17
18
  * @csspart secondarybutton-base - The secondary button base
@@ -33,7 +33,16 @@ export const PaymentHoldOnChange = () => (h("sqm-payout-status-alert", { demoDat
33
33
  export const BalanceUnderThreshold = () => (h("sqm-payout-status-alert", { demoData: {
34
34
  states: {
35
35
  ...defaultProps,
36
- status: "BALANCE_UNDER_THRESHOLD",
36
+ status: "DONE",
37
+ belowPayoutThreshold: true,
38
+ minPayoutAmount: "USD50.00",
39
+ },
40
+ } }));
41
+ export const BalanceUnderThresholdWithHold = () => (h("sqm-payout-status-alert", { demoData: {
42
+ states: {
43
+ ...defaultProps,
44
+ status: "NEW_PAYEE_REVIEW",
45
+ belowPayoutThreshold: true,
37
46
  minPayoutAmount: "USD50.00",
38
47
  },
39
48
  } }));
@@ -145,17 +145,6 @@ export function PayoutStatusAlertView(props) {
145
145
  alertType: "warning",
146
146
  icon: "exclamation-triangle",
147
147
  };
148
- case "BALANCE_UNDER_THRESHOLD":
149
- return {
150
- header: text.balanceUnderThresholdHeader,
151
- description: intl.formatMessage({
152
- id: "balanceUnderThresholdDescription",
153
- defaultMessage: text.balanceUnderThresholdDescription,
154
- }, { minPayoutAmount: states.minPayoutAmount }),
155
- buttonText: null,
156
- alertType: "info",
157
- icon: "info-circle",
158
- };
159
148
  case "PAYMENT_HOLD_ON_CHANGE":
160
149
  return {
161
150
  header: text.paymentHoldOnChangeHeader,
@@ -283,14 +272,21 @@ export function PayoutStatusAlertView(props) {
283
272
  }
284
273
  }
285
274
  const alertDetails = getAlert(states.status);
286
- if (states.status === "DONE" || !alertDetails) {
275
+ const showHoldAlert = states.status !== "DONE" && !!alertDetails;
276
+ if (!showHoldAlert && !states.belowPayoutThreshold) {
287
277
  return h("div", null);
288
278
  }
289
279
  return (h("div", { part: "sqm-base" },
290
280
  h("style", { type: "text/css" }, styleString),
291
281
  h("style", { type: "text/css" }, vanillaStyle),
292
- h("sqm-form-message", { loading: states.loading, type: alertDetails.alertType },
282
+ states.belowPayoutThreshold && (h("sqm-form-message", { loading: states.loading, type: "info" },
283
+ h("p", { part: "alert-title" }, text.balanceUnderThresholdHeader),
284
+ h("p", { part: "alert-description" }, intl.formatMessage({
285
+ id: "balanceUnderThresholdDescription",
286
+ defaultMessage: text.balanceUnderThresholdDescription,
287
+ }, { minPayoutAmount: states.minPayoutAmount })))),
288
+ showHoldAlert && (h("sqm-form-message", { loading: states.loading, type: alertDetails.alertType },
293
289
  h("p", { part: "alert-title" }, alertDetails.header),
294
290
  h("p", { part: "alert-description" }, alertDetails.description),
295
- getButton(states.status))));
291
+ getButton(states.status)))));
296
292
  }
@@ -1081,7 +1081,7 @@ export class PayoutStatusAlert {
1081
1081
  "mutable": false,
1082
1082
  "complexType": {
1083
1083
  "original": "DemoData<PayoutStatusAlertViewProps>",
1084
- "resolved": "{ states?: { error: boolean; loading: boolean; status: PayoutStatus; veriffLoading: boolean; minPayoutAmount?: string; enforceUsTaxComplianceOption?: EnforceUsTaxComplianceOption; }; data?: { type: \"SquatchJS2\" | \"SquatchAndroid\" | \"SquatchIOS\" | \"SquatchPortal\" | \"SquatchAdmin\" | \"None\"; }; }",
1084
+ "resolved": "{ states?: { error: boolean; loading: boolean; status: PayoutStatus; veriffLoading: boolean; belowPayoutThreshold?: boolean; minPayoutAmount?: string; enforceUsTaxComplianceOption?: EnforceUsTaxComplianceOption; }; data?: { type: \"SquatchJS2\" | \"SquatchAndroid\" | \"SquatchIOS\" | \"SquatchPortal\" | \"SquatchAdmin\" | \"None\"; }; }",
1085
1085
  "references": {
1086
1086
  "DemoData": {
1087
1087
  "location": "import",
@@ -49,23 +49,8 @@ const GET_TAX_SETTING = gql `
49
49
  }
50
50
  }
51
51
  `;
52
- /** Transient holds that clear automatically, so a balance under the minimum explains the wait better. */
53
- const DISPLACEABLE_STATUSES = [
54
- "DONE",
55
- "NEW_PAYEE_REVIEW",
56
- "PAYMENT_HOLD_ON_CHANGE",
57
- ];
58
52
  export function getStatus(data) {
59
- var _a;
60
- const status = getHoldStatus(data);
61
- const publisher = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher;
62
- return DISPLACEABLE_STATUSES.includes(status) &&
63
- isBalanceUnderPayoutThreshold(publisher)
64
- ? "BALANCE_UNDER_THRESHOLD"
65
- : status;
66
- }
67
- function getHoldStatus(data) {
68
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
53
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
69
54
  const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
70
55
  const hasTransferredReward = (_e = (_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.rewards) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.find((reward) => {
71
56
  var _a;
@@ -75,39 +60,41 @@ function getHoldStatus(data) {
75
60
  if (!((_g = (_f = data.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.connected) || !account)
76
61
  return "INFORMATION_REQUIRED";
77
62
  const currentTaxDocument = (_j = (_h = data.user.impactConnection) === null || _h === void 0 ? void 0 : _h.publisher) === null || _j === void 0 ? void 0 : _j.currentTaxDocument;
78
- if (((_k = account.holdReasons) === null || _k === void 0 ? void 0 : _k.includes("NO_W9_DOCUMENT")) && !currentTaxDocument)
63
+ // A new-payee review only starts once funds reach Impact, so until then nobody can act on it
64
+ const reviewIsLive = !!hasTransferredReward && account.balanceAmount > 0;
65
+ const holdReasons = ((_k = account.holdReasons) !== null && _k !== void 0 ? _k : []).filter((reason) => reason !== "NEW_PAYEE_REVIEW" || reviewIsLive);
66
+ if (holdReasons.includes("NO_W9_DOCUMENT") && !currentTaxDocument)
79
67
  return "OVER_W9_THRESHOLD";
80
- if ((_l = account.holdReasons) === null || _l === void 0 ? void 0 : _l.includes("IDV_CHECK_REQUIRED"))
68
+ if (holdReasons.includes("IDV_CHECK_REQUIRED"))
81
69
  return "VERIFICATION:REQUIRED";
82
- if ((_m = account.holdReasons) === null || _m === void 0 ? void 0 : _m.includes("IDV_CHECK_REQUIRED_INTERNAL"))
70
+ if (holdReasons.includes("IDV_CHECK_REQUIRED_INTERNAL"))
83
71
  return "VERIFICATION:INTERNAL";
84
- if ((_o = account.holdReasons) === null || _o === void 0 ? void 0 : _o.includes("IDV_CHECK_REVIEW_INTERNAL"))
72
+ if (holdReasons.includes("IDV_CHECK_REVIEW_INTERNAL"))
85
73
  return "VERIFICATION:REVIEW";
86
- if ((_p = account.holdReasons) === null || _p === void 0 ? void 0 : _p.includes("IDV_CHECK_FAILED_INTERNAL"))
74
+ if (holdReasons.includes("IDV_CHECK_FAILED_INTERNAL"))
87
75
  return "VERIFICATION:FAILED";
88
- // only show banner for NEW_PAYEE_REVIEW if a PFT was created
89
- if (((_q = account.holdReasons) === null || _q === void 0 ? void 0 : _q.includes("NEW_PAYEE_REVIEW")) && hasTransferredReward)
76
+ if (holdReasons.includes("NEW_PAYEE_REVIEW"))
90
77
  return "NEW_PAYEE_REVIEW";
91
- if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("NEW_PAYEE_REVIEW"))
92
- return "DONE";
93
- if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("PAYMENT_HOLD_ON_CHANGE"))
78
+ if (holdReasons.includes("PAYMENT_HOLD_ON_CHANGE"))
94
79
  return "PAYMENT_HOLD_ON_CHANGE";
95
- if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_INVALID"))
80
+ if (holdReasons.includes("BENEFICIARY_NAME_INVALID"))
96
81
  return "BENEFICIARY_NAME_INVALID";
97
- if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BENEFICIARY_NAME_MISMATCH"))
82
+ if (holdReasons.includes("BENEFICIARY_NAME_MISMATCH"))
98
83
  return "BENEFICIARY_NAME_MISMATCH";
99
- if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("BANK_TAX_NAME_MISMATCH"))
84
+ if (holdReasons.includes("BANK_TAX_NAME_MISMATCH"))
100
85
  return "BANK_TAX_NAME_MISMATCH";
101
- if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("WITHDRAWAL_SETTINGS_INVALID"))
86
+ if (holdReasons.includes("WITHDRAWAL_SETTINGS_INVALID"))
102
87
  return "WITHDRAWAL_SETTINGS_INVALID";
103
- if ((_x = account.holdReasons) === null || _x === void 0 ? void 0 : _x.includes("PAYMENT_RETURNED"))
88
+ if (holdReasons.includes("PAYMENT_RETURNED"))
104
89
  return "PAYMENT_RETURNED";
105
- if (account.hold)
90
+ // A hold whose every reason was suppressed leaves nothing to report
91
+ const unattributedHold = !((_l = account.holdReasons) === null || _l === void 0 ? void 0 : _l.length);
92
+ if (account.hold && (holdReasons.length > 0 || unattributedHold))
106
93
  return "HOLD";
107
94
  return "DONE";
108
95
  }
109
96
  export function usePayoutStatus(props) {
110
- var _a, _b, _c;
97
+ var _a, _b, _c, _d, _e;
111
98
  const { type } = getEnvironmentSDK();
112
99
  const { loading, data, errors, refetch } = useQuery(GET_USER_STATUS, {});
113
100
  const { data: taxSettingRes } = useQuery(GET_TAX_SETTING, {});
@@ -157,7 +144,8 @@ export function usePayoutStatus(props) {
157
144
  status,
158
145
  error: !!errors,
159
146
  enforceUsTaxComplianceOption,
160
- minPayoutAmount: formatPayoutThreshold((_c = (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher),
147
+ belowPayoutThreshold: isBalanceUnderPayoutThreshold((_c = (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher),
148
+ minPayoutAmount: formatPayoutThreshold((_e = (_d = data === null || data === void 0 ? void 0 : data.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
161
149
  },
162
150
  data: { type },
163
151
  text: props.getTextProps(),
@@ -1,6 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const ErrorView = (props) => {
3
- return (h("sqm-form-message", { type: "error" },
3
+ return (h("sqm-form-message", { type: "error", part: "container" },
4
4
  h("p", { part: "alert-title" }, props.loadingErrorAlertHeader),
5
5
  h("p", { part: "alert-description" }, props.loadingErrorAlertDescription)));
6
6
  };
@@ -16,6 +16,8 @@ import { intl } from "../../../global/global";
16
16
  * @validParents ["sqm-portal-container","div","sqm-hero","sqm-instant-access-registration","sqb-program-section","sqb-conditional-section", "template"]
17
17
  * @example Microsite Cash Payout Form - <sqm-tax-and-cash></sqm-tax-and-cash>
18
18
  * @csspart container - The base container for the tax and cash component
19
+ * @csspart alert-title - The error alert title, shown on the error step
20
+ * @csspart alert-description - The error alert description, shown on the error step
19
21
  */
20
22
  export class TaxAndCashMonolith {
21
23
  constructor() {
@@ -1185,9 +1187,9 @@ export class TaxAndCashMonolith {
1185
1187
  case "/2":
1186
1188
  return (h("sqm-indirect-tax-form", Object.assign({ exportparts: "form-container: container" }, this.getGeneralStepTextProps("step2_"))));
1187
1189
  case "/3":
1188
- return (h("sqm-docusign-form", Object.assign({ exportparts: "form-container: container" }, this.getGeneralStepTextProps("step3_"))));
1190
+ return (h("sqm-docusign-form", Object.assign({}, this.getGeneralStepTextProps("step3_"))));
1189
1191
  case "/4":
1190
- return (h("sqm-banking-info-form", Object.assign({ exportparts: "form-container: container" }, this.getGeneralStepTextProps("step4_"))));
1192
+ return (h("sqm-banking-info-form", Object.assign({}, this.getGeneralStepTextProps("step4_"))));
1191
1193
  case "/dashboard":
1192
1194
  return (h("sqm-tax-and-cash-dashboard", Object.assign({ exportparts: "dashboard-container: container" }, this.getGeneralStepTextProps("dashboard_"), { stateController: props["sqm-tax-and-cash-dashboard_stateController"] || "{}" })));
1193
1195
  case "/error":
@@ -131,7 +131,14 @@ export const AccountUnderReview = () => (h(TaxAndCashDashboardView, { states: {
131
131
  export const PaymentHoldOnChange = () => (h(TaxAndCashDashboardView, { states: { ...baseStates, payoutStatus: "PAYMENT_HOLD_ON_CHANGE" }, text: defaultText, callbacks: defaultCallbacks, slots: defaultSlots }));
132
132
  export const BalanceUnderThreshold = () => (h(TaxAndCashDashboardView, { states: {
133
133
  ...baseStates,
134
- payoutStatus: "BALANCE_UNDER_THRESHOLD",
134
+ payoutStatus: "DONE",
135
+ belowPayoutThreshold: true,
136
+ minPayoutAmount: "USD50.00",
137
+ }, text: defaultText, callbacks: defaultCallbacks, slots: buildSlots({ belowPayoutThreshold: true }) }));
138
+ export const BalanceUnderThresholdWithHold = () => (h(TaxAndCashDashboardView, { states: {
139
+ ...baseStates,
140
+ payoutStatus: "NEW_PAYEE_REVIEW",
141
+ belowPayoutThreshold: true,
135
142
  minPayoutAmount: "USD50.00",
136
143
  }, text: defaultText, callbacks: defaultCallbacks, slots: buildSlots({ belowPayoutThreshold: true }) }));
137
144
  export const BeneficiaryNameInvalid = () => (h(TaxAndCashDashboardView, { states: { ...baseStates, payoutStatus: "BENEFICIARY_NAME_INVALID" }, text: defaultText, callbacks: defaultCallbacks, slots: defaultSlots }));
@@ -276,7 +276,7 @@ export const TaxAndCashDashboardView = (props) => {
276
276
  }, {
277
277
  termsAndConditions: (h("a", { target: "_blank", href: `https://terms.advocate.impact.com/PayoutTermsAndConditions.html` }, text.termsAndConditions)),
278
278
  }),
279
- button: (h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", onClick: callbacks.onNewFormClick }, text.w9RequiredButtonText)),
279
+ button: (h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", exportparts: "base: primarybutton-base", onClick: callbacks.onNewFormClick }, text.w9RequiredButtonText)),
280
280
  alertType: "warning",
281
281
  icon: "info-circle",
282
282
  class: sheet.classes.WarningHoldAlertContainer,
@@ -364,18 +364,6 @@ export const TaxAndCashDashboardView = (props) => {
364
364
  icon: "exclamation-triangle",
365
365
  class: sheet.classes.WarningHoldAlertContainer,
366
366
  };
367
- case "BALANCE_UNDER_THRESHOLD":
368
- return {
369
- header: text.balanceUnderThresholdHeader,
370
- description: intl.formatMessage({
371
- id: "balanceUnderThresholdDescription",
372
- defaultMessage: text.balanceUnderThresholdDescription,
373
- }, { minPayoutAmount: states.minPayoutAmount }),
374
- buttonText: null,
375
- alertType: "info",
376
- icon: "info-circle",
377
- class: sheet.classes.InfoHoldAlertContainer,
378
- };
379
367
  case "PAYMENT_HOLD_ON_CHANGE":
380
368
  return {
381
369
  header: text.paymentHoldOnChangeHeader,
@@ -400,8 +388,8 @@ export const TaxAndCashDashboardView = (props) => {
400
388
  supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
401
389
  }),
402
390
  button: (h("div", { class: sheet.classes.ButtonContainer },
403
- h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
404
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
391
+ h("sl-button", { disabled: states.disabled || states.loading, type: "primary", exportparts: "base: primarybutton-base", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
392
+ h("sl-button", { disabled: states.disabled || states.loading, type: "default", exportparts: "base: secondarybutton-base", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
405
393
  alertType: "warning",
406
394
  icon: "exclamation-triangle",
407
395
  class: sheet.classes.WarningHoldAlertContainer,
@@ -416,8 +404,8 @@ export const TaxAndCashDashboardView = (props) => {
416
404
  supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
417
405
  }),
418
406
  button: (h("div", { class: sheet.classes.ButtonContainer },
419
- h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
420
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
407
+ h("sl-button", { disabled: states.disabled || states.loading, type: "primary", exportparts: "base: primarybutton-base", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
408
+ h("sl-button", { disabled: states.disabled || states.loading, type: "default", exportparts: "base: secondarybutton-base", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
421
409
  alertType: "warning",
422
410
  icon: "exclamation-triangle",
423
411
  class: sheet.classes.WarningHoldAlertContainer,
@@ -432,8 +420,8 @@ export const TaxAndCashDashboardView = (props) => {
432
420
  supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
433
421
  }),
434
422
  button: (h("div", { class: sheet.classes.ButtonContainer },
435
- h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
436
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
423
+ h("sl-button", { disabled: states.disabled || states.loading, type: "primary", exportparts: "base: primarybutton-base", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
424
+ h("sl-button", { disabled: states.disabled || states.loading, type: "default", exportparts: "base: secondarybutton-base", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
437
425
  alertType: "warning",
438
426
  icon: "exclamation-triangle",
439
427
  class: sheet.classes.WarningHoldAlertContainer,
@@ -447,7 +435,7 @@ export const TaxAndCashDashboardView = (props) => {
447
435
  }, {
448
436
  supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
449
437
  }),
450
- button: (h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
438
+ button: (h("sl-button", { disabled: states.disabled || states.loading, type: "default", exportparts: "base: primarybutton-base", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
451
439
  alertType: "warning",
452
440
  icon: "exclamation-triangle",
453
441
  class: sheet.classes.WarningHoldAlertContainer,
@@ -461,7 +449,7 @@ export const TaxAndCashDashboardView = (props) => {
461
449
  }, {
462
450
  supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
463
451
  }),
464
- button: (h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
452
+ button: (h("sl-button", { disabled: states.disabled || states.loading, type: "primary", exportparts: "base: primarybutton-base", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
465
453
  alertType: "error",
466
454
  icon: "exclamation-triangle",
467
455
  class: sheet.classes.WarningHoldAlertContainer,
@@ -619,15 +607,21 @@ export const TaxAndCashDashboardView = (props) => {
619
607
  }, {
620
608
  supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
621
609
  }))),
622
- alertInfo && (h("sqm-form-message", { loading: states.loading, exportparts: "warningalert-base: alert-base, warningalert-icon: alert-icon, erroralert-base: alert-base, erroralert-icon: alert-icon, infoalert-base: alert-base, infoalert-icon: alert-icon", type: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.alertType, class: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.class, icon: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.icon, transparent: true },
610
+ states.belowPayoutThreshold && (h("sqm-form-message", { loading: states.loading, exportparts: "alert-base, alert-icon", type: "info", class: sheet.classes.InfoHoldAlertContainer, icon: "info-circle", transparent: true },
611
+ h("strong", null, text.balanceUnderThresholdHeader),
612
+ h("p", { style: { margin: "0" } }, intl.formatMessage({
613
+ id: "balanceUnderThresholdDescription",
614
+ defaultMessage: text.balanceUnderThresholdDescription,
615
+ }, { minPayoutAmount: states.minPayoutAmount })))),
616
+ alertInfo && (h("sqm-form-message", { loading: states.loading, exportparts: "alert-base, alert-icon", type: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.alertType, class: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.class, icon: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.icon, transparent: true },
623
617
  h("strong", null, alertInfo.header),
624
618
  h("p", { style: { margin: "0" } }, alertInfo.description),
625
- alertInfo.buttonText && (h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.veriffLoading, onClick: () => callbacks.onVerifyClick() }, alertInfo.buttonText)),
619
+ alertInfo.buttonText && (h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", exportparts: "base: primarybutton-base", loading: states.veriffLoading, onClick: () => callbacks.onVerifyClick() }, alertInfo.buttonText)),
626
620
  alertInfo.button ? (alertInfo.button) : (h("div", { style: { display: "none" } })))),
627
621
  h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
628
622
  h("p", null, text.replaceTaxFormModalBodyText),
629
- h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
630
- h("sl-button", { slot: "footer", type: "default", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormCancel }, text.cancelButton)),
623
+ h("sl-button", { slot: "footer", type: "primary", exportparts: "base: primarybutton-base", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
624
+ h("sl-button", { slot: "footer", type: "default", exportparts: "base: secondarybutton-base", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormCancel }, text.cancelButton)),
631
625
  states.status === "INACTIVE" && alertMap[states.status],
632
626
  h("div", null,
633
627
  h("h3", { style: { marginBottom: "0" } }, text.bankingInformationSectionHeader),
@@ -7,6 +7,7 @@ import { TaxAndCashDashboardView } from "./sqm-tax-and-cash-dashboard-view";
7
7
  import { useTaxAndCashDashboard, } from "./useTaxAndCashDashboard";
8
8
  /**
9
9
  * @uiName Tax and Cash Status Dashboard
10
+ * @csspart dashboard-container - The dashboard container
10
11
  * @csspart alert-base - The alert base
11
12
  * @csspart alert-icon - The alert icon
12
13
  * @csspart primarybutton-base - The primary button base
@@ -2229,7 +2230,7 @@ export class TaxAndCashDashboard {
2229
2230
  "mutable": false,
2230
2231
  "complexType": {
2231
2232
  "original": "DemoData<UseTaxAndCashDashboardResult>",
2232
- "resolved": "{ states?: { status?: string; documentType: TaxDocumentType; documentTypeString: string; canEditPayoutInfo: boolean; disabled?: boolean; dateSubmitted?: string; noFormNeeded?: boolean; indirectTaxType?: string; qstNumber?: string; subRegionTaxNumber?: string; subRegion?: string; indirectTaxNumber?: string; province?: string; country?: string; notRegistered?: boolean; isBusinessEntity?: boolean; loading?: boolean; loadingError?: boolean; showNewFormDialog: boolean; hasHold: boolean; payoutStatus: PayoutStatus; minPayoutAmount?: string; veriffLoading: boolean; errors?: { general?: boolean; }; enforceUsTaxComplianceOption?: string; }; }",
2233
+ "resolved": "{ states?: { status?: string; documentType: TaxDocumentType; documentTypeString: string; canEditPayoutInfo: boolean; disabled?: boolean; dateSubmitted?: string; noFormNeeded?: boolean; indirectTaxType?: string; qstNumber?: string; subRegionTaxNumber?: string; subRegion?: string; indirectTaxNumber?: string; province?: string; country?: string; notRegistered?: boolean; isBusinessEntity?: boolean; loading?: boolean; loadingError?: boolean; showNewFormDialog: boolean; hasHold: boolean; payoutStatus: PayoutStatus; belowPayoutThreshold?: boolean; minPayoutAmount?: string; veriffLoading: boolean; errors?: { general?: boolean; }; enforceUsTaxComplianceOption?: string; }; }",
2233
2234
  "references": {
2234
2235
  "DemoData": {
2235
2236
  "location": "import",
@@ -6,7 +6,7 @@ import { getStatus, } from "../sqm-payout-status-alert/usePayoutStatus";
6
6
  import { TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../data";
7
7
  import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
8
8
  import { useVeriffApp, VERIFF_COMPLETE_EVENT_KEY } from "../useVeriffApp";
9
- import { formatPayoutThreshold, taxTypeToName } from "../utils";
9
+ import { formatPayoutThreshold, isBalanceUnderPayoutThreshold, taxTypeToName, } from "../utils";
10
10
  import { gql } from "graphql-request";
11
11
  const GET_TAX_SETTING = gql `
12
12
  query getTenantSettings {
@@ -126,6 +126,7 @@ export const useTaxAndCashDashboard = (props) => {
126
126
  showNewFormDialog: showDialog,
127
127
  hasHold: !!((_o = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _o === void 0 ? void 0 : _o.hold),
128
128
  payoutStatus,
129
+ belowPayoutThreshold: isBalanceUnderPayoutThreshold(publisher),
129
130
  minPayoutAmount: formatPayoutThreshold(publisher),
130
131
  veriffLoading,
131
132
  enforceUsTaxComplianceOption,
@@ -9,6 +9,7 @@ import { useUserInfoForm } from "./useUserInfoForm";
9
9
  /**
10
10
  * @uiName User Information Form
11
11
  * @exampleGroup Tax and Cash Components
12
+ * @csspart form-container - The form container
12
13
  * @csspart alert-title - The alert title
13
14
  * @csspart alert-description - The alert description
14
15
  * @csspart input-label - The input label
@@ -108,9 +108,12 @@ export function formatPayoutThreshold(publisher) {
108
108
  return undefined;
109
109
  return `${(_b = publisher === null || publisher === void 0 ? void 0 : publisher.currency) !== null && _b !== void 0 ? _b : ""}${threshold}`;
110
110
  }
111
- /** `payoutsAccount.balance` is a formatted string; only `balanceAmount` (minor units) is comparable. */
111
+ /**
112
+ * `payoutsAccount.balance` is a formatted string; only `balanceAmount` (minor units) is comparable.
113
+ * A zero balance gets no notice — there is nothing waiting to pay out.
114
+ */
112
115
  export function isBalanceUnderPayoutThreshold(publisher) {
113
- var _a;
116
+ var _a, _b;
114
117
  const rawThreshold = (_a = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _a === void 0 ? void 0 : _a.paymentThreshold;
115
118
  const account = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount;
116
119
  if (!rawThreshold || !account)
@@ -118,11 +121,13 @@ export function isBalanceUnderPayoutThreshold(publisher) {
118
121
  const threshold = Number(rawThreshold);
119
122
  if (!Number.isFinite(threshold) || !Number.isFinite(account.balanceAmount))
120
123
  return false;
124
+ if (account.balanceAmount <= 0)
125
+ return false;
121
126
  const currency = account.currencyCode || (publisher === null || publisher === void 0 ? void 0 : publisher.currency);
122
127
  if (!currency)
123
128
  return false;
124
129
  const scale = 10 **
125
- new Intl.NumberFormat("en-US", { style: "currency", currency })
126
- .resolvedOptions().maximumFractionDigits;
130
+ ((_b = new Intl.NumberFormat("en-US", { style: "currency", currency })
131
+ .resolvedOptions().maximumFractionDigits) !== null && _b !== void 0 ? _b : 2);
127
132
  return account.balanceAmount < Math.round(threshold * scale);
128
133
  }
@@ -1,7 +1,7 @@
1
1
  import { h } from './index-38ad4957.js';
2
2
 
3
3
  const ErrorView = (props) => {
4
- return (h("sqm-form-message", { type: "error" },
4
+ return (h("sqm-form-message", { type: "error", part: "container" },
5
5
  h("p", { part: "alert-title" }, props.loadingErrorAlertHeader),
6
6
  h("p", { part: "alert-description" }, props.loadingErrorAlertDescription)));
7
7
  };
@@ -114,7 +114,7 @@ function ShareButtonView(props, children) {
114
114
  return props.hide ? (h(Host, { style: { display: "none" } })) : (h("div", null,
115
115
  h("style", { type: "text/css" }, styleString),
116
116
  h("style", { type: "text/css" }, vanillaStyle),
117
- h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}button-base` },
117
+ h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}button-base, base: button-base` },
118
118
  !props.hideicon && (h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "base: icon" })),
119
119
  !props.hidetext && children)));
120
120
  }
@@ -327,7 +327,7 @@ const styleString$1 = sheet$1.toString();
327
327
  function BaseRegistrationFormView(props) {
328
328
  var _a, _b;
329
329
  const { states, content, callbacks } = props;
330
- return (h("div", { class: sheet$1.classes.Wrapper },
330
+ return (h("div", { class: sheet$1.classes.Wrapper, part: "sqm-base" },
331
331
  h("style", { type: "text/css" },
332
332
  vanillaStyle,
333
333
  styleString$1),
@@ -2339,7 +2339,7 @@ function CouponCodeView(props) {
2339
2339
  styleString,
2340
2340
  vanillaStyle),
2341
2341
  h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign }, part: "label" }, props.couponCodeLabel),
2342
- error ? (h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
2342
+ error ? (h("sqm-form-message", { type: props.errorType, exportparts: "alert-icon, erroralert-icon" },
2343
2343
  h("div", { part: "erroralert-text" }, props.errorText))) : (h(CopyTextView, Object.assign({}, props)))));
2344
2344
  }
2345
2345
 
@@ -3624,8 +3624,8 @@ function RewardExchangeView(props) {
3624
3624
  h("div", { class: "field" }, states.content.text.costTitle),
3625
3625
  h("div", { class: "value" }, cost)),
3626
3626
  h("div", { class: sheet$8.classes.Button },
3627
- h("sl-button", { class: "cancel", type: "secondary", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
3628
- h("sl-button", { class: "continue", size: "large", type: "primary", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
3627
+ h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", type: "secondary", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
3628
+ h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", type: "primary", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
3629
3629
  }
3630
3630
  function success() {
3631
3631
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -3644,7 +3644,7 @@ function RewardExchangeView(props) {
3644
3644
  states.content.text.promoCode,
3645
3645
  h(CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_h = states === null || states === void 0 ? void 0 : states.content) === null || _h === void 0 ? void 0 : _h.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
3646
3646
  h("div", { class: sheet$8.classes.Button },
3647
- h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
3647
+ h("sl-button", { exportparts: "base: primarybutton-base", class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
3648
3648
  }
3649
3649
  const stages = {
3650
3650
  chooseReward: () => chooseReward(),