@saasquatch/mint-components 1.13.5-0 → 1.14.0-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 (147) hide show
  1. package/dist/cjs/{ShadowViewAddon-14a02da4.js → AutoColor-3b59126f.js} +1137 -1137
  2. package/dist/cjs/ErrorView-b2fcf954.js +35 -0
  3. package/dist/cjs/IndirectTaxDetailsView-409dae6f.js +646 -0
  4. package/dist/cjs/data-6d96b89c.js +137 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/mint-components.cjs.js +1 -1
  7. package/dist/cjs/parseStates-d1effc19.js +16 -0
  8. package/dist/cjs/{sqm-banking-info-form_17.cjs.entry.js → sqm-banking-info-form_10.cjs.entry.js} +209 -1885
  9. package/dist/cjs/sqm-big-stat_41.cjs.entry.js +30 -30
  10. package/dist/cjs/sqm-code-verification.cjs.entry.js +349 -0
  11. package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +84 -0
  12. package/dist/cjs/sqm-stencilbook.cjs.entry.js +12390 -11094
  13. package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +1221 -0
  14. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +11 -3
  15. package/dist/cjs/sqm-widget-verification.cjs.entry.js +17 -6
  16. package/dist/cjs/utils-8257e7ab.js +105 -0
  17. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +78 -78
  18. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +37 -3
  19. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +39 -5
  20. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +41 -6
  21. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +12 -8
  22. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +1 -1
  23. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -2
  24. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -1
  25. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +1 -1
  26. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +1 -1
  27. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -2
  28. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +2 -2
  29. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +1 -1
  30. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
  31. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +26 -1
  32. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +2 -2
  33. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +75 -41
  34. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +1 -1
  35. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +62 -3
  36. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +3 -3
  37. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +5 -4
  38. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +49 -11
  39. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +3 -3
  40. package/dist/collection/utils/parseStates.js +12 -0
  41. package/dist/esm/{ShadowViewAddon-23a6afab.js → AutoColor-d8d7f31d.js} +1141 -1141
  42. package/dist/esm/ErrorView-48e2b969.js +33 -0
  43. package/dist/esm/IndirectTaxDetailsView-c321099a.js +639 -0
  44. package/dist/esm/data-a05c78ae.js +121 -0
  45. package/dist/esm/loader.js +1 -1
  46. package/dist/esm/mint-components.js +1 -1
  47. package/dist/esm/parseStates-ed75e224.js +14 -0
  48. package/dist/esm/{sqm-banking-info-form_17.entry.js → sqm-banking-info-form_10.entry.js} +133 -1802
  49. package/dist/esm/sqm-big-stat_41.entry.js +1 -1
  50. package/dist/esm/sqm-code-verification.entry.js +345 -0
  51. package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +76 -0
  52. package/dist/esm/sqm-stencilbook.entry.js +10501 -9205
  53. package/dist/esm/sqm-tax-and-cash.entry.js +1217 -0
  54. package/dist/esm/sqm-widget-verification-controller.entry.js +12 -4
  55. package/dist/esm/sqm-widget-verification.entry.js +17 -6
  56. package/dist/esm/utils-7c96856c.js +97 -0
  57. package/dist/esm-es5/AutoColor-d8d7f31d.js +1 -0
  58. package/dist/esm-es5/ErrorView-48e2b969.js +1 -0
  59. package/dist/esm-es5/IndirectTaxDetailsView-c321099a.js +1 -0
  60. package/dist/esm-es5/data-a05c78ae.js +1 -0
  61. package/dist/esm-es5/loader.js +1 -1
  62. package/dist/esm-es5/mint-components.js +1 -1
  63. package/dist/esm-es5/parseStates-ed75e224.js +1 -0
  64. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -0
  65. package/dist/esm-es5/sqm-big-stat_41.entry.js +1 -1
  66. package/dist/esm-es5/sqm-code-verification.entry.js +1 -0
  67. package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -0
  68. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  69. package/dist/esm-es5/sqm-tax-and-cash.entry.js +1 -0
  70. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  71. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  72. package/dist/esm-es5/utils-7c96856c.js +1 -0
  73. package/dist/mint-components/mint-components.esm.js +1 -1
  74. package/dist/mint-components/p-0603a39f.js +1 -0
  75. package/dist/mint-components/p-0a37a288.system.entry.js +1 -0
  76. package/dist/mint-components/p-0b8f6a39.entry.js +11 -0
  77. package/dist/mint-components/p-115dfc03.system.js +1 -0
  78. package/dist/mint-components/p-13f3a647.js +1 -0
  79. package/dist/mint-components/p-1a7453c6.system.js +1 -0
  80. package/dist/mint-components/p-33d79be3.entry.js +93 -0
  81. package/dist/mint-components/p-37996351.system.js +1 -1
  82. package/dist/mint-components/p-3a62a7e2.system.js +1 -0
  83. package/dist/mint-components/p-4a46897f.system.js +1 -0
  84. package/dist/mint-components/p-4d11920f.entry.js +1 -0
  85. package/dist/mint-components/p-5510be1e.system.entry.js +1 -0
  86. package/dist/mint-components/p-6ef506ba.entry.js +16 -0
  87. package/dist/mint-components/{p-33ed6f1c.system.entry.js → p-70adcf4f.system.entry.js} +1 -1
  88. package/dist/mint-components/p-70d3d873.system.entry.js +1 -0
  89. package/dist/mint-components/p-7e0bf3de.system.entry.js +1 -0
  90. package/dist/mint-components/p-83acd617.js +1 -0
  91. package/dist/mint-components/p-84a78d09.entry.js +1 -0
  92. package/dist/mint-components/{p-01010af0.entry.js → p-84ed9923.entry.js} +5 -5
  93. package/dist/mint-components/p-889ec1df.system.entry.js +1 -0
  94. package/dist/mint-components/p-8a784f2a.system.entry.js +1 -0
  95. package/dist/mint-components/p-93e4a3c3.system.js +1 -0
  96. package/dist/mint-components/p-98a48fc4.system.entry.js +1 -0
  97. package/dist/mint-components/p-9acb5038.js +1 -0
  98. package/dist/mint-components/p-a38ca165.entry.js +9 -0
  99. package/dist/mint-components/p-c75a3b4a.js +103 -0
  100. package/dist/mint-components/p-d75c462c.entry.js +1 -0
  101. package/dist/mint-components/p-ea7f379d.js +394 -0
  102. package/dist/mint-components/p-f8175201.system.js +1 -0
  103. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +6 -0
  104. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +5 -0
  105. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +5 -0
  106. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +0 -1
  107. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +1 -1
  108. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +2 -2
  109. package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +4 -0
  110. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -1
  111. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +11 -10
  112. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
  113. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -1
  114. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +10 -0
  115. package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
  116. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +7 -0
  117. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -1
  118. package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
  119. package/dist/types/components.d.ts +96 -89
  120. package/dist/types/global/android.d.ts +7 -0
  121. package/dist/types/global/demo.d.ts +2 -0
  122. package/dist/types/stories/features.d.ts +4 -0
  123. package/dist/types/stories/templates.d.ts +4 -0
  124. package/dist/types/utils/parseStates.d.ts +1 -0
  125. package/docs/docs.docx +0 -0
  126. package/docs/raisins.json +1 -1
  127. package/grapesjs/grapesjs.js +1 -1
  128. package/package.json +2 -1
  129. package/dist/cjs/sqm-invoice-table-view-baded4af.js +0 -2067
  130. package/dist/esm/sqm-invoice-table-view-af69cd33.js +0 -2050
  131. package/dist/esm-es5/ShadowViewAddon-23a6afab.js +0 -1
  132. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +0 -1
  133. package/dist/esm-es5/sqm-invoice-table-view-af69cd33.js +0 -1
  134. package/dist/mint-components/p-33c96e14.entry.js +0 -16
  135. package/dist/mint-components/p-38b5f028.system.entry.js +0 -1
  136. package/dist/mint-components/p-6427e963.entry.js +0 -1
  137. package/dist/mint-components/p-7e7cbccf.system.js +0 -1
  138. package/dist/mint-components/p-9320582e.system.js +0 -1
  139. package/dist/mint-components/p-962f3200.js +0 -1
  140. package/dist/mint-components/p-9cf80e85.system.entry.js +0 -1
  141. package/dist/mint-components/p-b93fd99c.system.entry.js +0 -1
  142. package/dist/mint-components/p-c36506f6.system.entry.js +0 -1
  143. package/dist/mint-components/p-d3d74266.js +0 -394
  144. package/dist/mint-components/p-f29eda2f.entry.js +0 -205
  145. package/dist/mint-components/p-f2cc6a6f.entry.js +0 -9
  146. /package/dist/collection/components/tax-and-cash/{sqm-tax-and-cash/data.js → data.js} +0 -0
  147. /package/dist/types/components/tax-and-cash/{sqm-tax-and-cash/data.d.ts → data.d.ts} +0 -0
@@ -10,136 +10,18 @@ const jsonpointer = require('./jsonpointer-11327262.js');
10
10
  const cjs = require('./cjs-1066ec21.js');
11
11
  const utils = require('./utils-6847bc06.js');
12
12
  const JSS = require('./JSS-8503a151.js');
13
- const mixins = require('./mixins-f7e0377a.js');
13
+ require('./mixins-f7e0377a.js');
14
14
  const GenericTableView = require('./GenericTableView-a9f4ba75.js');
15
15
  const reRender = require('./re-render-b324deab.js');
16
16
  const useChildElements = require('./useChildElements-1b35d945.js');
17
17
  const luxon = require('./luxon-2926d85f.js');
18
18
  const useReferralTable = require('./useReferralTable-7c3f9600.js');
19
- const sqmTextSpanView = require('./sqm-text-span-view-0aa82125.js');
20
- const sqmInvoiceTableView = require('./sqm-invoice-table-view-baded4af.js');
21
- const extractProps = require('./extractProps-fd93ba62.js');
19
+ const IndirectTaxDetailsView = require('./IndirectTaxDetailsView-409dae6f.js');
20
+ const utils$1 = require('./utils-8257e7ab.js');
21
+ const parseStates = require('./parseStates-d1effc19.js');
22
+ const data = require('./data-6d96b89c.js');
22
23
  const keys = require('./keys-cff24974.js');
23
24
  const usePayoutStatus = require('./usePayoutStatus-4b5894ef.js');
24
- const useVerificationEmail = require('./useVerificationEmail-95a82767.js');
25
-
26
- const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
27
- const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
28
- const USER_QUERY_NAMESPACE = "sq:user-info-query";
29
- const USER_FORM_CONTEXT_NAMESPACE = "sq:user-form-context";
30
- const FINANCE_NETWORK_SETTINGS_NAMESPACE = "sq:finance-network-settings";
31
- const COUNTRIES_NAMESPACE = "sq:countries:list";
32
- const SORTED_COUNTRIES_NAMESPACE = "sq:countries:sorted";
33
- const COUNTRIES_QUERY_NAMESPACE = "sq:countries:query";
34
- const CURRENCIES_NAMESPACE = "sq:currencies:list";
35
- const CURRENCIES_QUERY_NAMESPACE = "sq:currencies:query";
36
- const GET_USER = index_module.dist.gql `
37
- query getUserTaxInfo {
38
- user: viewer {
39
- ... on User {
40
- id
41
- firstName
42
- lastName
43
- email
44
- countryCode
45
- customFields
46
- managedIdentity {
47
- uid
48
- email
49
- emailVerified
50
- }
51
- impactConnection {
52
- connected
53
- user {
54
- firstName
55
- lastName
56
- }
57
- publisher {
58
- id
59
- brandedSignup
60
- countryCode
61
- currency
62
- billingAddress
63
- billingCity
64
- billingState
65
- billingCountryCode
66
- billingPostalCode
67
- phoneNumberCountryCode
68
- phoneNumber
69
- taxInformation {
70
- indirectTaxId
71
- indirectTaxCountryCode
72
- indirectTaxRegion
73
- additionalTaxId
74
- withholdingTaxId
75
- withholdingTaxCountryCode
76
- }
77
- requiredTaxDocumentType
78
- currentTaxDocument {
79
- status
80
- type
81
- dateCreated
82
- }
83
- withdrawalSettings {
84
- paymentMethod
85
- paypalEmailAddress
86
- bankCountry
87
- bankAccountNumber
88
- paymentSchedulingType
89
- paymentThreshold
90
- paymentDay
91
- }
92
- payoutsAccount {
93
- hold
94
- holdReasons
95
- balance
96
- }
97
- }
98
- }
99
- }
100
- }
101
- }
102
- `;
103
- const GET_COUNTRIES = index_module.dist.gql `
104
- query getCountries {
105
- impactPayoutCountries(limit: 1000) {
106
- data {
107
- countryCode
108
- displayName
109
- }
110
- }
111
- }
112
- `;
113
- const GET_CURRENCIES = index_module.dist.gql `
114
- query currencies($locale: RSLocale) {
115
- currencies(limit: 300) {
116
- data {
117
- displayName(locale: $locale)
118
- currencyCode
119
- }
120
- }
121
- }
122
- `;
123
- const GET_FINANCE_NETWORK_SETTINGS = index_module.dist.gql `
124
- query impactFinanceNetworkSettings(
125
- $filter: ImpactFinanceNetworkSettingsFilterInput
126
- ) {
127
- impactFinanceNetworkSettings(filter: $filter, limit: 1000) {
128
- data {
129
- countryCode
130
- currency
131
- defaultFinancePaymentMethodId
132
- thresholdOptions
133
- withdrawalSettingId
134
- internationalEftFee
135
- foreignFxFee
136
- defaultFxFee
137
- }
138
- totalCount
139
- }
140
- }
141
- `;
142
- const FORM_STEPS = 4;
143
25
 
144
26
  function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
145
27
  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;
@@ -861,7 +743,7 @@ const BankingInfoFormView = (props) => {
861
743
  !states.hideSteps && (index.h("p", null, global.intl.formatMessage({
862
744
  id: "formStep",
863
745
  defaultMessage: text.formStep,
864
- }, { step: states.step, count: FORM_STEPS }))),
746
+ }, { step: states.step, count: data.FORM_STEPS }))),
865
747
  index.h("h3", { style: { fontSize: "24px" } }, text.taxAndPayouts),
866
748
  index.h("p", { class: classes.PageDescriptionText }, text.taxAndPayoutsDescription)),
867
749
  ((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet.classes.AlertContainer },
@@ -1000,12 +882,12 @@ function useBankingInfoForm(props) {
1000
882
  const host = index_module._();
1001
883
  const locale = index_module.L();
1002
884
  const user = index_module.J();
1003
- const [step, setStep] = index_module.Pn(TAX_CONTEXT_NAMESPACE);
1004
- const context = index_module.Fn(TAX_FORM_CONTEXT_NAMESPACE);
1005
- const countries = index_module.Fn(SORTED_COUNTRIES_NAMESPACE);
885
+ const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
886
+ const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
887
+ const countries = index_module.Fn(data.SORTED_COUNTRIES_NAMESPACE);
1006
888
  const formRef = stencilHooks_module.useRef(null);
1007
- const { data: paymentOptionsData, loading: paymentOptionsLoading, errors: paymentOptionsError, } = index_module.$n(FINANCE_NETWORK_SETTINGS_NAMESPACE);
1008
- const { data: userData, refetch, errors: userError, } = index_module.$n(USER_QUERY_NAMESPACE);
889
+ const { data: paymentOptionsData, loading: paymentOptionsLoading, errors: paymentOptionsError, } = index_module.$n(data.FINANCE_NETWORK_SETTINGS_NAMESPACE);
890
+ const { data: userData, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
1009
891
  const [saveWithdrawalSettings] = index_module.$e(SAVE_WITHDRAWAL_SETTINGS);
1010
892
  const [updateWithdrawalSettings] = index_module.$e(UPDATE_WITHDRAWAL_SETTINGS);
1011
893
  const [showVerification, setShowVerification] = stencilHooks_module.useState(false);
@@ -1674,7 +1556,7 @@ function useDemoBankingInfoForm(props) {
1674
1556
  const defaultPaymentScheduleChecked = (_f = (_e = (_d = props.demoData) === null || _d === void 0 ? void 0 : _d.states) === null || _e === void 0 ? void 0 : _e.formState) === null || _f === void 0 ? void 0 : _f.paymentScheduleChecked;
1675
1557
  const defaultCurrency = (_h = (_g = props.demoData) === null || _g === void 0 ? void 0 : _g.states) === null || _h === void 0 ? void 0 : _h.currency;
1676
1558
  const defaultCountry = (_l = (_k = (_j = props.demoData) === null || _j === void 0 ? void 0 : _j.states) === null || _k === void 0 ? void 0 : _k.formState) === null || _l === void 0 ? void 0 : _l.bankCountry;
1677
- const setStep = index_module.En(TAX_CONTEXT_NAMESPACE);
1559
+ const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
1678
1560
  const [paymentMethodChecked, setPaymentMethodChecked] = stencilHooks_module.useState(undefined);
1679
1561
  const [paymentScheduleChecked, setPaymentScheduleChecked] = stencilHooks_module.useState(undefined);
1680
1562
  const [currency, setCurrency] = stencilHooks_module.useState(defaultCurrency);
@@ -1767,331 +1649,6 @@ function useDemoBankingInfoForm(props) {
1767
1649
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
1768
1650
  }
1769
1651
 
1770
- const style$1 = {
1771
- Wrapper: {
1772
- display: "flex",
1773
- flexDirection: "column",
1774
- gap: "var(--sl-spacing-medium)",
1775
- maxWidth: "550px",
1776
- },
1777
- HeaderContainer: {
1778
- display: "flex",
1779
- flexDirection: "column",
1780
- },
1781
- InputsContainer: {
1782
- display: "flex",
1783
- gap: "var(--sl-spacing-medium)",
1784
- position: "relative",
1785
- flexDirection: "column",
1786
- },
1787
- CodeInputContainer: {
1788
- display: "flex",
1789
- gap: "var(--sl-spacing-medium)",
1790
- },
1791
- CodeInput: {
1792
- maxWidth: "40px",
1793
- "&::part(input)": {
1794
- margin: "0",
1795
- padding: "0 var(--sl-input-spacing-small)",
1796
- fontSize: "var(--sl-font-size-large)",
1797
- },
1798
- },
1799
- CodeInputError: {
1800
- ...mixins.ErrorStyles,
1801
- maxWidth: "40px",
1802
- "&::part(input)": {
1803
- margin: "0",
1804
- padding: "0 var(--sl-input-spacing-small)",
1805
- fontSize: "var(--sl-font-size-large)",
1806
- },
1807
- },
1808
- ErrorText: {
1809
- color: "var(--sl-color-danger-500)",
1810
- fontSize: "var(--sl-font-size-small)",
1811
- margin: "0",
1812
- },
1813
- ContinueButton: {
1814
- width: "100%",
1815
- maxWidth: "100px",
1816
- },
1817
- FooterContainer: {
1818
- display: "flex",
1819
- flexDirection: "column",
1820
- },
1821
- SkeletonOne: {
1822
- width: "50%",
1823
- height: "16px",
1824
- },
1825
- SkeletonTwo: {
1826
- width: "30%",
1827
- height: "34px",
1828
- },
1829
- SkeletonThree: {
1830
- width: "15%",
1831
- height: "24px",
1832
- },
1833
- };
1834
- const vanillaStyle$1 = `
1835
- :host {
1836
- display: block;
1837
- }
1838
- :host([hidden]): {
1839
- display: none;
1840
- }
1841
-
1842
-
1843
- `;
1844
- const sheet$1 = JSS.createStyleSheet(style$1);
1845
- const styleString$1 = sheet$1.toString();
1846
- function WidgetCodeVerificationView(props) {
1847
- const { states, refs, callbacks, text } = props;
1848
- const resendCodeText = global.intl.formatMessage({
1849
- id: "resendCodeText",
1850
- defaultMessage: text.resendCodeText,
1851
- }, {
1852
- resendCodeLink: (index.h("a", { href: "", style: { textDecoration: "none" }, onClick: (e) => {
1853
- e.preventDefault();
1854
- callbacks.resendEmail();
1855
- } }, text.resendCodeLabel)),
1856
- });
1857
- const codeResentSuccessfully = global.intl.formatMessage({
1858
- id: "codeResentSuccessfully",
1859
- defaultMessage: text.codeResentSuccessfullyText,
1860
- }, {
1861
- email: states.email,
1862
- });
1863
- const inputClass = states.verifyFailed
1864
- ? sheet$1.classes.CodeInputError
1865
- : sheet$1.classes.CodeInput;
1866
- return (index.h("div", { part: "sqm-base" },
1867
- index.h("style", { type: "text/css" },
1868
- vanillaStyle$1,
1869
- styleString$1),
1870
- index.h("div", { class: sheet$1.classes.Wrapper },
1871
- index.h("div", { class: sheet$1.classes.HeaderContainer },
1872
- index.h(sqmTextSpanView.TextSpanView, { type: "p" }, global.intl.formatMessage({
1873
- id: `emailHeaderText`,
1874
- defaultMessage: states.verifyFailed
1875
- ? text.reverifyCodeHeaderText
1876
- : text.verifyCodeHeaderText,
1877
- }, { email: states.email }))),
1878
- states.emailResent && (index.h("sqm-form-message", { type: "success", exportparts: "successalert-icon" },
1879
- index.h("b", null, codeResentSuccessfully))),
1880
- index.h("div", { class: sheet$1.classes.InputsContainer },
1881
- index.h("div", { ref: refs.codeWrapperRef, class: sheet$1.classes.CodeInputContainer },
1882
- index.h("sl-input", { class: inputClass, name: "code" }),
1883
- index.h("sl-input", { class: inputClass, name: "code" }),
1884
- index.h("sl-input", { class: inputClass, name: "code" }),
1885
- index.h("sl-input", { class: inputClass, name: "code" }),
1886
- index.h("sl-input", { class: inputClass, name: "code" }),
1887
- index.h("sl-input", { class: inputClass, name: "code" })),
1888
- states.verifyFailed && (index.h("p", { class: sheet$1.classes.ErrorText }, text.invalidCodeText)),
1889
- index.h("sl-button", { class: sheet$1.classes.ContinueButton, onClick: callbacks.submitCode, disabled: states.loading || states.initialiseLoading, loading: states.loading || states.initialiseLoading, exportparts: "base: primarybutton-base", type: "primary" }, text.verifyText)),
1890
- index.h("div", { class: sheet$1.classes.FooterContainer },
1891
- index.h(sqmTextSpanView.TextSpanView, { type: "p" }, resendCodeText)))));
1892
- }
1893
-
1894
- const VerifyEmailWithCodeMutation = index_module.dist.gql `
1895
- mutation submitImpactPublisherEmail2FACode(
1896
- $user: UserIdInput!
1897
- $code: String!
1898
- ) {
1899
- submitImpactPublisherEmail2FACode(user: $user, code: $code) {
1900
- verifiedEmail
1901
- accessKey
1902
- }
1903
- }
1904
- `;
1905
- function useWidgetCodeVerification(props) {
1906
- const host = stencilHooks_module.l();
1907
- const [_, setShowCode] = index_module.Pn(keys.SHOW_CODE_NAMESPACE);
1908
- const email = index_module.Fn(keys.VERIFICATION_EMAIL_NAMESPACE);
1909
- const [emailSent, setEmailSent] = stencilHooks_module.useState(false);
1910
- const [emailResent, setEmailResent] = stencilHooks_module.useState(false);
1911
- const [codeRef, setCodeRef] = stencilHooks_module.useState(null);
1912
- const [validationError, setValidationError] = stencilHooks_module.useState(false);
1913
- const [emailError, setEmailError] = stencilHooks_module.useState(false);
1914
- const { initialized, verificationEmail, send: [sendEmail, { loading: sendLoading, errors: sendErrors }], verify: [verifyEmail, { loading: verifyLoading, errors: verifyErrors }], } = useVerificationEmail.useVerificationEmail();
1915
- stencilHooks_module.useEffect(() => {
1916
- if (!codeRef)
1917
- return;
1918
- const slInputs = codeRef.querySelectorAll("sl-input");
1919
- const codeElements = Array.from(slInputs).map((node) => node.shadowRoot.querySelector(`input[name="code"]`));
1920
- codeElements.forEach((element, idx) => {
1921
- element.addEventListener("focus", (e) => {
1922
- e.target.select();
1923
- });
1924
- element.addEventListener("keydown", (e) => {
1925
- if (e.key === "Backspace" && e.target.value === "") {
1926
- codeElements[Math.max(0, idx - 1)].focus();
1927
- }
1928
- });
1929
- element.addEventListener("input", (e) => {
1930
- const input = e.data;
1931
- if (!input)
1932
- return;
1933
- if (idx === codeElements.length - 1) {
1934
- e.target.value = input.slice(0, 1);
1935
- return;
1936
- }
1937
- if (input.length > 1) {
1938
- const rest = input.slice(1);
1939
- e.target.value = input.slice(0, 1);
1940
- codeElements[idx + 1].dispatchEvent(new InputEvent("input", {
1941
- inputType: "insertFromPaste",
1942
- data: rest,
1943
- }));
1944
- }
1945
- codeElements[idx + 1].focus();
1946
- });
1947
- });
1948
- }, [codeRef]);
1949
- const reset = () => {
1950
- setShowCode(false);
1951
- setValidationError(false);
1952
- };
1953
- const resendEmail = async () => {
1954
- // UI should only allow this to be called if initialized, but checking just in case
1955
- if (!initialized)
1956
- return;
1957
- const result = await sendEmail();
1958
- if (!result) {
1959
- setEmailError(true);
1960
- return;
1961
- }
1962
- if (emailSent)
1963
- setEmailResent(true);
1964
- setEmailSent(true);
1965
- };
1966
- const submitCode = async () => {
1967
- const slInputs = codeRef.querySelectorAll("sl-input");
1968
- const codeElements = Array.from(slInputs).map((node) => node.shadowRoot.querySelector(`input[name="code"]`));
1969
- if (codeElements.find((el) => !el.value)) {
1970
- setValidationError(true);
1971
- return;
1972
- }
1973
- let code = "";
1974
- codeElements.forEach((element) => {
1975
- code = `${code}${element.value}`;
1976
- });
1977
- // UI should only allow this to be called if initialized, but checking just in case
1978
- if (!initialized)
1979
- return;
1980
- setValidationError(false);
1981
- const res = await verifyEmail(code);
1982
- if (res === null || res === void 0 ? void 0 : res.success) {
1983
- props.onVerification(res.accessKey);
1984
- reset();
1985
- }
1986
- else {
1987
- setValidationError(true);
1988
- }
1989
- };
1990
- stencilHooks_module.useEffect(() => {
1991
- // Wait for mutations to be determined from user lookup
1992
- if (!initialized)
1993
- return;
1994
- // email should already exist if user has completed email-verification
1995
- if (!email)
1996
- resendEmail();
1997
- else
1998
- setEmailSent(true);
1999
- }, [initialized]);
2000
- return {
2001
- refs: {
2002
- codeWrapperRef: setCodeRef,
2003
- },
2004
- states: {
2005
- email: verificationEmail,
2006
- emailResent,
2007
- resendError: sendErrors || verifyErrors,
2008
- initialiseLoading: !initialized,
2009
- loading: sendLoading || verifyLoading,
2010
- verifyFailed: !!validationError,
2011
- },
2012
- callbacks: {
2013
- resendEmail,
2014
- submitCode,
2015
- },
2016
- text: props.getTextProps(),
2017
- };
2018
- }
2019
-
2020
- const WidgetCodeVerification = class {
2021
- constructor(hostRef) {
2022
- index.registerInstance(this, hostRef);
2023
- /**
2024
- * @uiName Verify code widget header text
2025
- */
2026
- this.verifyCodeHeaderText = "Enter the code sent to {email} from our referral provider, impact.com.";
2027
- /**
2028
- * @uiName Reverify code widget header text
2029
- */
2030
- this.reverifyCodeHeaderText = "Enter the code sent to {email} from our referral provider, impact.com.";
2031
- /**
2032
- * Text displayed under verify button
2033
- * @uiName Resend code text
2034
- */
2035
- this.resendCodeText = "Didn't receive your code? {resendCodeLink}";
2036
- /**
2037
- * The link that appears in the resend code link
2038
- * @uiName Resend code label
2039
- */
2040
- this.resendCodeLabel = "Resend code";
2041
- /**
2042
- * Link text displayed under verify button
2043
- * @uiName Resend code text
2044
- */
2045
- this.codeResentSuccessfullyText = "Another code has been sent to {email}";
2046
- /**
2047
- * Error text displayed under verification input
2048
- * @uiName Invalid code text
2049
- */
2050
- this.invalidCodeText = "Please check your code and try again. If you’re still having trouble, try resending your code.";
2051
- /**
2052
- * @uiName Verify code button text
2053
- */
2054
- this.verifyText = "Verify";
2055
- /**
2056
- * Displayed when the email verification fails due to a network error. The participant can try refreshing the page.
2057
- * @uiName Network error message
2058
- */
2059
- this.networkErrorMessage = "An error occurred while verifying your email. Please refresh the page and try again.";
2060
- stencilHooks_module.h$1(this);
2061
- }
2062
- disconnectedCallback() { }
2063
- getTextProps() {
2064
- return utils.getProps(this);
2065
- }
2066
- render() {
2067
- const props = index_module.isDemo()
2068
- ? useDemoWidgetCodeVerification(this)
2069
- : useWidgetCodeVerification(this);
2070
- return index.h(WidgetCodeVerificationView, Object.assign({}, props));
2071
- }
2072
- };
2073
- function useDemoWidgetCodeVerification(props) {
2074
- const [emailResent, setEmailResent] = stencilHooks_module.useState(false);
2075
- const setVerifiedContext = index_module.En(keys.VERIFICATION_PARENT_NAMESPACE);
2076
- return cjs.cjs({
2077
- states: {
2078
- loading: false,
2079
- email: "test@example.com",
2080
- emailResent,
2081
- resendError: false,
2082
- verifyFailed: false,
2083
- },
2084
- refs: {
2085
- codeWrapperRef: () => { },
2086
- },
2087
- callbacks: {
2088
- resendEmail: async () => setEmailResent(true),
2089
- submitCode: async () => setVerifiedContext(true),
2090
- },
2091
- text: props.getTextProps(),
2092
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
2093
- }
2094
-
2095
1652
  const GET_TAX_DOCUMENT = index_module.dist.gql `
2096
1653
  mutation createImpactPublisherTaxDocument(
2097
1654
  $vars: CreateImpactPublisherTaxDocumentInput!
@@ -2120,10 +1677,10 @@ const DOCUSIGN_EXPIRED_STATES = ["ttl_expired", "session_timeout"];
2120
1677
  function useDocusignForm(props) {
2121
1678
  var _a, _b, _c;
2122
1679
  const user = index_module.J();
2123
- const context = index_module.Fn(TAX_FORM_CONTEXT_NAMESPACE);
2124
- const [step, setStep] = index_module.Pn(TAX_CONTEXT_NAMESPACE);
2125
- const { data, loading: userLoading, refetch, } = index_module.$n(USER_QUERY_NAMESPACE);
2126
- const publisher = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
1680
+ const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
1681
+ const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
1682
+ const { data: data$1, loading: userLoading, refetch, } = index_module.$n(data.USER_QUERY_NAMESPACE);
1683
+ const publisher = (_b = (_a = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
2127
1684
  const [createTaxDocument, { loading: documentLoading, data: document, errors: documentErrors },] = index_module.$e(GET_TAX_DOCUMENT);
2128
1685
  const [completeTaxDocument, { loading: completeDocumentLoading, data: completeData, errors: completeErrors, },] = index_module.$e(COMPLETE_TAX_DOCUMENT);
2129
1686
  const [docusignStatus, setDocusignStatus] = stencilHooks_module.useState(undefined);
@@ -2132,7 +1689,7 @@ function useDocusignForm(props) {
2132
1689
  const [loading, setLoading] = stencilHooks_module.useState(false);
2133
1690
  const [showExitButton, setShowExitButton] = stencilHooks_module.useState(false);
2134
1691
  // Only look at current document if it's valid (same as required type)
2135
- const existingDocumentType = sqmInvoiceTableView.validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) && (publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument)
1692
+ const existingDocumentType = utils$1.validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) && (publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument)
2136
1693
  ? publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType : undefined;
2137
1694
  const actualDocumentType = existingDocumentType ||
2138
1695
  getDocumentType(participantType) || (publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType);
@@ -2224,7 +1781,7 @@ function useDocusignForm(props) {
2224
1781
  },
2225
1782
  docusignStatus,
2226
1783
  documentType: actualDocumentType,
2227
- documentTypeString: sqmInvoiceTableView.taxTypeToName(actualDocumentType),
1784
+ documentTypeString: utils$1.taxTypeToName(actualDocumentType),
2228
1785
  showExitButton,
2229
1786
  },
2230
1787
  data: {
@@ -2249,7 +1806,7 @@ function getDocumentType(p) {
2249
1806
  return undefined;
2250
1807
  }
2251
1808
 
2252
- const style$2 = {
1809
+ const style$1 = {
2253
1810
  DocusignStatusContainer: {
2254
1811
  width: "100%",
2255
1812
  minHeight: "600px",
@@ -2276,13 +1833,13 @@ const style$2 = {
2276
1833
  },
2277
1834
  },
2278
1835
  };
2279
- const sheet$2 = JSS.createStyleSheet(style$2);
2280
- const styleString$2 = sheet$2.toString();
1836
+ const sheet$1 = JSS.createStyleSheet(style$1);
1837
+ const styleString$1 = sheet$1.toString();
2281
1838
  const DocusignExpiredView = (props) => {
2282
- const { classes } = sheet$2;
1839
+ const { classes } = sheet$1;
2283
1840
  const { text } = props;
2284
1841
  return (index.h("div", null,
2285
- index.h("style", { type: "text/css" }, styleString$2),
1842
+ index.h("style", { type: "text/css" }, styleString$1),
2286
1843
  index.h("div", { class: classes.DocusignStatusContainer },
2287
1844
  index.h("sl-icon", { style: {
2288
1845
  width: "50px",
@@ -2294,10 +1851,10 @@ const DocusignExpiredView = (props) => {
2294
1851
  index.h("sl-button", { type: "primary", onClick: () => window.location.reload() }, text.refreshButton))));
2295
1852
  };
2296
1853
  const DocusignErrorView = (props) => {
2297
- const { classes } = sheet$2;
1854
+ const { classes } = sheet$1;
2298
1855
  const { text } = props;
2299
1856
  return (index.h("div", null,
2300
- index.h("style", { type: "text/css" }, styleString$2),
1857
+ index.h("style", { type: "text/css" }, styleString$1),
2301
1858
  index.h("div", { class: classes.DocusignStatusContainer },
2302
1859
  index.h("sl-icon", { style: {
2303
1860
  width: "50px",
@@ -2309,14 +1866,14 @@ const DocusignErrorView = (props) => {
2309
1866
  index.h("sl-button", { type: "primary", onClick: () => window.location.reload() }, text.refreshButton))));
2310
1867
  };
2311
1868
  const DocusignLoadingView = () => {
2312
- const { classes } = sheet$2;
1869
+ const { classes } = sheet$1;
2313
1870
  return (index.h("div", null,
2314
- index.h("style", { type: "text/css" }, styleString$2),
1871
+ index.h("style", { type: "text/css" }, styleString$1),
2315
1872
  index.h("div", { class: classes.DocusignStatusContainer },
2316
1873
  index.h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } }))));
2317
1874
  };
2318
1875
  const DocusignIframe = ({ states, data, callbacks, text, }) => {
2319
- const { classes } = sheet$2;
1876
+ const { classes } = sheet$1;
2320
1877
  const [iFrameHeight, setiFrameHeight] = stencilHooks_module.useState("100%");
2321
1878
  const allowedDomains = [
2322
1879
  "referralsaasquatch.com",
@@ -2349,12 +1906,12 @@ const DocusignIframe = ({ states, data, callbacks, text, }) => {
2349
1906
  return index.h(DocusignExpiredView, { text: text });
2350
1907
  // Wrap iFrame with container that shares the same height to push other elements down when absolute positioned
2351
1908
  return (index.h("div", { style: { height: iFrameHeight } },
2352
- index.h("style", { type: "text/css" }, styleString$2),
1909
+ index.h("style", { type: "text/css" }, styleString$1),
2353
1910
  index.h("div", { class: classes.IFrameContainer },
2354
1911
  index.h("iframe", { scrolling: "yes", frameBorder: "0", width: "100%", src: data.documentUrl, height: iFrameHeight }))));
2355
1912
  };
2356
1913
 
2357
- const style$3 = {
1914
+ const style$2 = {
2358
1915
  FormWrapper: {
2359
1916
  display: "flex",
2360
1917
  justifyContent: "flex-start",
@@ -2467,9 +2024,9 @@ const style$3 = {
2467
2024
  fontSize: "var(--sl-font-size-medium)",
2468
2025
  },
2469
2026
  };
2470
- const sheet$3 = JSS.createStyleSheet(style$3);
2471
- const styleString$3 = sheet$3.toString();
2472
- const vanillaStyle$2 = `
2027
+ const sheet$2 = JSS.createStyleSheet(style$2);
2028
+ const styleString$2 = sheet$2.toString();
2029
+ const vanillaStyle$1 = `
2473
2030
  :host{
2474
2031
  display: block;
2475
2032
  }
@@ -2494,21 +2051,21 @@ const vanillaStyle$2 = `
2494
2051
  const DocusignFormView = (props) => {
2495
2052
  var _a;
2496
2053
  const { states, states: { formState, documentTypeString }, callbacks, text, slots, } = props;
2497
- const { classes } = sheet$3;
2054
+ const { classes } = sheet$2;
2498
2055
  return (index.h("div", { class: classes.Container },
2499
2056
  index.h("style", { type: "text/css" },
2500
- styleString$3,
2501
- vanillaStyle$2),
2057
+ styleString$2,
2058
+ vanillaStyle$1),
2502
2059
  index.h("div", { class: classes.TextContainer },
2503
2060
  index.h("div", null,
2504
2061
  !states.hideSteps && (index.h("p", null, global.intl.formatMessage({
2505
2062
  id: "formStep",
2506
2063
  defaultMessage: text.formStep,
2507
- }, { step: states.step, count: FORM_STEPS }))),
2064
+ }, { step: states.step, count: data.FORM_STEPS }))),
2508
2065
  index.h("h3", null, text.taxForm),
2509
2066
  index.h("p", { class: classes.PageDescriptionText }, text.taxAndPayoutsDescription))),
2510
2067
  states.loadingError && (index.h("div", null,
2511
- index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$3.classes.ErrorAlertContainer },
2068
+ index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$2.classes.ErrorAlertContainer },
2512
2069
  index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
2513
2070
  index.h("strong", null, text.error.loadingErrorAlertHeader),
2514
2071
  index.h("br", null),
@@ -2518,7 +2075,7 @@ const DocusignFormView = (props) => {
2518
2075
  }, {
2519
2076
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
2520
2077
  })))),
2521
- ((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$3.classes.ErrorAlertContainer },
2078
+ ((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$2.classes.ErrorAlertContainer },
2522
2079
  index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
2523
2080
  index.h("strong", null, text.error.generalTitle),
2524
2081
  index.h("br", null),
@@ -2689,7 +2246,7 @@ const DocusignForm = class {
2689
2246
  get el() { return index.getElement(this); }
2690
2247
  };
2691
2248
  function useDocusignFormDemo(props) {
2692
- const setStep = index_module.En(TAX_CONTEXT_NAMESPACE);
2249
+ const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
2693
2250
  return cjs.cjs({
2694
2251
  text: props.getTextProps(),
2695
2252
  states: {
@@ -2738,7 +2295,7 @@ const DemoDocusignIframe = ({ callbacks }) => {
2738
2295
  } }, index.h("span", null, "Placeholder for docusign iframe"), index.h("div", { style: { display: "flex", gap: "8px" } }, index.h("sl-button", { type: "primary", submit: true, exportparts: "base: primarybutton-base", onClick: callbacks.demo.onBack }, "Back to Step 2"), index.h("sl-button", { type: "primary", submit: true, exportparts: "base: primarybutton-base", onClick: callbacks.demo.onSubmit }, "Continue to Step 4")))));
2739
2296
  };
2740
2297
 
2741
- const style$4 = {
2298
+ const style$3 = {
2742
2299
  FormWrapper: {
2743
2300
  display: "flex",
2744
2301
  justifyContent: "flex-start",
@@ -2844,9 +2401,9 @@ const style$4 = {
2844
2401
  marginBottom: "var(--sl-spacing-small)",
2845
2402
  },
2846
2403
  };
2847
- const sheet$4 = JSS.createStyleSheet(style$4);
2848
- const styleString$4 = sheet$4.toString();
2849
- const vanillaStyle$3 = `
2404
+ const sheet$3 = JSS.createStyleSheet(style$3);
2405
+ const styleString$3 = sheet$3.toString();
2406
+ const vanillaStyle$2 = `
2850
2407
  :host{
2851
2408
  display: block;
2852
2409
  }
@@ -2865,11 +2422,11 @@ const vanillaStyle$3 = `
2865
2422
  const IndirectTaxFormView = (props) => {
2866
2423
  var _a;
2867
2424
  const { states, states: { formState }, callbacks, text, refs, slots, } = props;
2868
- const { classes } = sheet$4;
2425
+ const { classes } = sheet$3;
2869
2426
  return (index.h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
2870
2427
  index.h("style", { type: "text/css" },
2871
- styleString$4,
2872
- vanillaStyle$3),
2428
+ styleString$3,
2429
+ vanillaStyle$2),
2873
2430
  index.h("div", { class: classes.TextContainer },
2874
2431
  index.h("div", null,
2875
2432
  !states.hideSteps && (index.h("p", null,
@@ -2877,12 +2434,12 @@ const IndirectTaxFormView = (props) => {
2877
2434
  global.intl.formatMessage({
2878
2435
  id: "formStep",
2879
2436
  defaultMessage: text.formStep,
2880
- }, { step: states.step, count: FORM_STEPS }))),
2437
+ }, { step: states.step, count: data.FORM_STEPS }))),
2881
2438
  index.h("h3", null, text.indirectTax),
2882
2439
  index.h("p", { class: classes.PageDescriptionText }, text.taxAndPayoutsDescription),
2883
2440
  index.h("p", { class: classes.DescriptionText }, text.indirectTaxDescription)),
2884
2441
  states.loadingError && (index.h("div", null,
2885
- index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$4.classes.AlertContainer },
2442
+ index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$3.classes.AlertContainer },
2886
2443
  index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
2887
2444
  index.h("strong", null, text.error.loadingErrorAlertHeader),
2888
2445
  index.h("br", null),
@@ -2892,7 +2449,7 @@ const IndirectTaxFormView = (props) => {
2892
2449
  }, {
2893
2450
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
2894
2451
  })))),
2895
- ((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$4.classes.AlertContainer },
2452
+ ((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$3.classes.AlertContainer },
2896
2453
  index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
2897
2454
  index.h("strong", null, text.error.generalTitle),
2898
2455
  index.h("br", null),
@@ -2902,7 +2459,7 @@ const IndirectTaxFormView = (props) => {
2902
2459
  }, {
2903
2460
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
2904
2461
  }))),
2905
- states.isPartner && (index.h("sl-alert", { type: "primary", open: true, class: sheet$4.classes.PartnerAlertContainer, exportparts: "base: alert-base, icon:alert-icon" },
2462
+ states.isPartner && (index.h("sl-alert", { type: "primary", open: true, class: sheet$3.classes.PartnerAlertContainer, exportparts: "base: alert-base, icon:alert-icon" },
2906
2463
  index.h("sl-icon", { slot: "icon", name: "info-circle" }),
2907
2464
  index.h("strong", null, text.isPartnerAlertHeader),
2908
2465
  index.h("br", null),
@@ -2980,14 +2537,14 @@ function useIndirectTaxForm(props) {
2980
2537
  const user = index_module.J();
2981
2538
  const locale = index_module.L();
2982
2539
  const formRef = stencilHooks_module.useRef(null);
2983
- const context = index_module.Fn(TAX_FORM_CONTEXT_NAMESPACE);
2984
- const [step, setStep] = index_module.Pn(TAX_CONTEXT_NAMESPACE);
2540
+ const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
2541
+ const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
2985
2542
  const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
2986
- const userForm = index_module.Fn(USER_FORM_CONTEXT_NAMESPACE);
2987
- const { data: userData, refetch, errors: userError, } = index_module.$n(USER_QUERY_NAMESPACE);
2988
- const { data: _countriesRes, loading: countriesLoading } = index_module.$n(COUNTRIES_QUERY_NAMESPACE);
2543
+ const userForm = index_module.Fn(data.USER_FORM_CONTEXT_NAMESPACE);
2544
+ const { data: userData, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
2545
+ const { data: _countriesRes, loading: countriesLoading } = index_module.$n(data.COUNTRIES_QUERY_NAMESPACE);
2989
2546
  const intlLocale = (locale === null || locale === void 0 ? void 0 : locale.replace("_", "-")) || "en";
2990
- const _countries = stencilHooks_module.useMemo(() => { var _a, _b; return (_b = (_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.map((country) => sqmInvoiceTableView.getCountryObj({ countryCode: country.countryCode, locale: intlLocale })); }, [(_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data]);
2547
+ const _countries = stencilHooks_module.useMemo(() => { var _a, _b; return (_b = (_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.map((country) => utils$1.getCountryObj({ countryCode: country.countryCode, locale: intlLocale })); }, [(_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data]);
2991
2548
  const [loading, setLoading] = stencilHooks_module.useState(false);
2992
2549
  const [formState, setFormState] = stencilHooks_module.useState({});
2993
2550
  const [errors, setErrors] = stencilHooks_module.useState({});
@@ -3102,7 +2659,7 @@ function useIndirectTaxForm(props) {
3102
2659
  await refetch();
3103
2660
  const resultPublisher = (_e = (_d = (_c = result
3104
2661
  .createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
3105
- const hasValidCurrentDocument = sqmInvoiceTableView.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
2662
+ const hasValidCurrentDocument = utils$1.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
3106
2663
  // Fire form change event
3107
2664
  window.dispatchEvent(new Event(usePayoutStatus.TAX_FORM_UPDATED_EVENT_KEY));
3108
2665
  if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
@@ -3157,10 +2714,10 @@ function useIndirectTaxForm(props) {
3157
2714
  })),
3158
2715
  },
3159
2716
  data: {
3160
- esRegions: sqmInvoiceTableView.INDIRECT_TAX_SPAIN_REGIONS,
2717
+ esRegions: IndirectTaxDetailsView.INDIRECT_TAX_SPAIN_REGIONS,
3161
2718
  countries: filteredCountries,
3162
2719
  allCountries: _countries,
3163
- provinces: sqmInvoiceTableView.INDIRECT_TAX_PROVINCES,
2720
+ provinces: IndirectTaxDetailsView.INDIRECT_TAX_PROVINCES,
3164
2721
  },
3165
2722
  text: props.getTextProps(),
3166
2723
  refs: {
@@ -3362,7 +2919,7 @@ const IndirectTaxForm = class {
3362
2919
  const props = index_module.isDemo()
3363
2920
  ? useDemoIndirectTaxForm(this)
3364
2921
  : useIndirectTaxForm(this);
3365
- const registeredInDifferentCountryDetailsSlot = (index.h(sqmInvoiceTableView.OtherRegionSlotView, { states: {
2922
+ const registeredInDifferentCountryDetailsSlot = (index.h(IndirectTaxDetailsView.OtherRegionSlotView, { states: {
3366
2923
  hide: props.states.formState.checked !== "otherRegion",
3367
2924
  disabled: props.states.disabled || props.states.isPartner,
3368
2925
  formState: props.slotProps.formState,
@@ -3380,7 +2937,7 @@ const IndirectTaxForm = class {
3380
2937
  }
3381
2938
  };
3382
2939
  function useDemoIndirectTaxForm(props) {
3383
- const setStep = index_module.En(TAX_CONTEXT_NAMESPACE);
2940
+ const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
3384
2941
  const [option, setOption] = stencilHooks_module.useState(null);
3385
2942
  const [demoFormState, setDemoFormState] = stencilHooks_module.useState({});
3386
2943
  return cjs.cjs({
@@ -3421,7 +2978,7 @@ function useDemoIndirectTaxForm(props) {
3421
2978
  setCountrySearch: (c) => console.log(c),
3422
2979
  },
3423
2980
  data: {
3424
- esRegions: sqmInvoiceTableView.INDIRECT_TAX_SPAIN_REGIONS,
2981
+ esRegions: IndirectTaxDetailsView.INDIRECT_TAX_SPAIN_REGIONS,
3425
2982
  countries: [
3426
2983
  {
3427
2984
  countryCode: "CA",
@@ -3440,7 +2997,7 @@ function useDemoIndirectTaxForm(props) {
3440
2997
  displayName: "United States",
3441
2998
  },
3442
2999
  ],
3443
- provinces: sqmInvoiceTableView.INDIRECT_TAX_PROVINCES,
3000
+ provinces: IndirectTaxDetailsView.INDIRECT_TAX_PROVINCES,
3444
3001
  },
3445
3002
  text: props.getTextProps(),
3446
3003
  refs: {
@@ -3673,7 +3230,7 @@ const InvoiceTable = class {
3673
3230
  ? useInvoiceTableDemo(this, empty, loading)
3674
3231
  : useInvoiceTable(this, empty, loading);
3675
3232
  reRender.useRequestRerender([this.perPage]);
3676
- return (index.h(sqmInvoiceTableView.InvoiceTableView, { header: this.header, description: this.description }, index.h(GenericTableView.GenericTableView, { states: states, data: data, callbacks: callbacks, elements: elements })));
3233
+ return (index.h(IndirectTaxDetailsView.InvoiceTableView, { header: this.header, description: this.description }, index.h(GenericTableView.GenericTableView, { states: states, data: data, callbacks: callbacks, elements: elements })));
3677
3234
  }
3678
3235
  };
3679
3236
  function EmptySlot(props) {
@@ -3775,18 +3332,6 @@ function useInvoiceTableDemo(props, emptyElement, loadingElement) {
3775
3332
  return demoProps;
3776
3333
  }
3777
3334
 
3778
- const InvoiceTableDataCell = class {
3779
- constructor(hostRef) {
3780
- index.registerInstance(this, hostRef);
3781
- this.ignored = true;
3782
- stencilHooks_module.h$1(this);
3783
- }
3784
- disconnectedCallback() { }
3785
- render() {
3786
- return this.data;
3787
- }
3788
- };
3789
-
3790
3335
  const InvoiceTableDataColumn = class {
3791
3336
  constructor(hostRef) {
3792
3337
  index.registerInstance(this, hostRef);
@@ -3805,23 +3350,6 @@ const InvoiceTableDataColumn = class {
3805
3350
  }
3806
3351
  };
3807
3352
 
3808
- const RewardTableDateCell = class {
3809
- constructor(hostRef) {
3810
- index.registerInstance(this, hostRef);
3811
- this.ignored = true;
3812
- this.locale = "en";
3813
- stencilHooks_module.h$1(this);
3814
- }
3815
- disconnectedCallback() { }
3816
- render() {
3817
- var _a, _b;
3818
- const date = !this.date
3819
- ? "-"
3820
- : (_b = (_a = luxon.luxon.DateTime.fromMillis(this.date)) === null || _a === void 0 ? void 0 : _a.setLocale(utils.luxonLocale(this.locale))) === null || _b === void 0 ? void 0 : _b.toLocaleString(luxon.luxon.DateTime.DATE_MED);
3821
- return date;
3822
- }
3823
- };
3824
-
3825
3353
  const InvoiceTableDateColumn = class {
3826
3354
  constructor(hostRef) {
3827
3355
  index.registerInstance(this, hostRef);
@@ -3840,21 +3368,6 @@ const InvoiceTableDateColumn = class {
3840
3368
  }
3841
3369
  };
3842
3370
 
3843
- const InvoiceTableDownloadCell = class {
3844
- constructor(hostRef) {
3845
- index.registerInstance(this, hostRef);
3846
- this.ignored = true;
3847
- stencilHooks_module.h$1(this);
3848
- }
3849
- disconnectedCallback() { }
3850
- render() {
3851
- const vanillaStyle = `svg:hover, svg:hover * {
3852
- cursor: pointer;
3853
- }`;
3854
- return (index.h(index.Host, null, index.h("style", null, vanillaStyle), !!this.downloadUrl && (index.h("a", { href: this.downloadUrl, target: "_blank" }, index.h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M0.625 12.4375C0.79076 12.4375 0.949732 12.5033 1.06694 12.6206C1.18415 12.7378 1.25 12.8967 1.25 13.0625V16.1875C1.25 16.519 1.3817 16.837 1.61612 17.0714C1.85054 17.3058 2.16848 17.4375 2.5 17.4375H17.5C17.8315 17.4375 18.1495 17.3058 18.3839 17.0714C18.6183 16.837 18.75 16.519 18.75 16.1875V13.0625C18.75 12.8967 18.8158 12.7378 18.9331 12.6206C19.0503 12.5033 19.2092 12.4375 19.375 12.4375C19.5408 12.4375 19.6997 12.5033 19.8169 12.6206C19.9342 12.7378 20 12.8967 20 13.0625V16.1875C20 16.8505 19.7366 17.4864 19.2678 17.9553C18.7989 18.4241 18.163 18.6875 17.5 18.6875H2.5C1.83696 18.6875 1.20107 18.4241 0.732233 17.9553C0.263392 17.4864 0 16.8505 0 16.1875V13.0625C0 12.8967 0.065848 12.7378 0.183058 12.6206C0.300269 12.5033 0.45924 12.4375 0.625 12.4375Z", fill: "#717179" }), index.h("path", { d: "M9.5575 14.88C9.61556 14.9382 9.68453 14.9844 9.76046 15.0159C9.83639 15.0474 9.91779 15.0636 10 15.0636C10.0822 15.0636 10.1636 15.0474 10.2395 15.0159C10.3155 14.9844 10.3844 14.9382 10.4425 14.88L14.1925 11.13C14.3099 11.0126 14.3758 10.8535 14.3758 10.6875C14.3758 10.5215 14.3099 10.3624 14.1925 10.245C14.0751 10.1276 13.916 10.0617 13.75 10.0617C13.584 10.0617 13.4249 10.1276 13.3075 10.245L10.625 12.9288V1.9375C10.625 1.77174 10.5592 1.61277 10.4419 1.49556C10.3247 1.37835 10.1658 1.3125 10 1.3125C9.83424 1.3125 9.67527 1.37835 9.55806 1.49556C9.44085 1.61277 9.375 1.77174 9.375 1.9375V12.9288L6.6925 10.245C6.57514 10.1276 6.41597 10.0617 6.25 10.0617C6.08403 10.0617 5.92486 10.1276 5.8075 10.245C5.69014 10.3624 5.62421 10.5215 5.62421 10.6875C5.62421 10.8535 5.69014 11.0126 5.8075 11.13L9.5575 14.88Z", fill: "#717179" }))))));
3855
- }
3856
- };
3857
-
3858
3371
  const InvoiceTableGenericColumn = class {
3859
3372
  constructor(hostRef) {
3860
3373
  index.registerInstance(this, hostRef);
@@ -3877,7 +3390,7 @@ const PayPalIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg",
3877
3390
  index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M3.71826 -0.15332H9.30607C10.8808 -0.15332 12.7478 -0.099593 13.9903 1.00853C14.8208 1.754 15.2593 2.936 15.1597 4.21203C14.8142 8.52364 12.2694 10.9347 8.84762 10.9347H6.09026C5.61852 10.9347 5.31288 11.2503 5.18 12.0965L4.40926 17.0461C4.35611 17.3685 4.22323 17.5566 3.97739 17.5767H0.53567C0.156948 17.5767 0.0174187 17.2879 0.117082 16.6432L2.59539 0.786908C2.69505 0.148896 3.04055 -0.15332 3.71826 -0.15332Z", fill: "#113984" }),
3878
3391
  index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.25973 11.5995L6.23643 5.36045C6.32281 4.81646 6.61515 4.54782 7.20649 4.54782H12.7877C13.7112 4.54782 14.4554 4.69557 15.0401 4.96421C14.4819 8.799 12.0236 10.9347 8.80775 10.9347H6.06368C5.6916 10.9347 5.42583 11.1227 5.25973 11.5995Z", fill: "#172C70" })));
3879
3392
 
3880
- const style$5 = {
3393
+ const style$4 = {
3881
3394
  CardContainer: {
3882
3395
  display: "grid",
3883
3396
  gridTemplateColumns: "1fr",
@@ -4011,7 +3524,7 @@ const style$5 = {
4011
3524
  },
4012
3525
  };
4013
3526
  function PayoutDetailsCardView(props) {
4014
- const sheet = JSS.createStyleSheet(style$5);
3527
+ const sheet = JSS.createStyleSheet(style$4);
4015
3528
  const styleString = sheet.toString();
4016
3529
  const { classes } = sheet;
4017
3530
  const { states, text } = props;
@@ -4062,8 +3575,8 @@ function PayoutDetailsCardView(props) {
4062
3575
 
4063
3576
  function usePayoutDetailsCard(props) {
4064
3577
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
4065
- const { data, loading } = index_module.$n(USER_QUERY_NAMESPACE);
4066
- const publisher = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
3578
+ const { data: data$1, loading } = index_module.$n(data.USER_QUERY_NAMESPACE);
3579
+ const publisher = (_b = (_a = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
4067
3580
  function getPayoutDetailedStatusText(paymentDay) {
4068
3581
  var _a;
4069
3582
  const currentDay = luxon.luxon.DateTime.now().day;
@@ -4141,6 +3654,10 @@ const PayoutDetailsCard = class {
4141
3654
  * @uiName Payout missing information subtext
4142
3655
  */
4143
3656
  this.payoutMissingInformationText = "Missing banking information, go to Impact.com to resolve.";
3657
+ /**
3658
+ * @componentState { "title": "Loading", "props": { "states": { "loading": true } } }
3659
+ */
3660
+ this.stateController = "{}";
4144
3661
  stencilHooks_module.h$1(this);
4145
3662
  }
4146
3663
  disconnectedCallback() { }
@@ -4178,1220 +3695,7 @@ function useDemoPayoutDetailsCard(props) {
4178
3695
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
4179
3696
  }
4180
3697
 
4181
- const TableCell = class {
4182
- constructor(hostRef) {
4183
- index.registerInstance(this, hostRef);
4184
- /** @uiName Column span */
4185
- this.colspan = 1;
4186
- /** @uiName Padding */
4187
- this.padding = "15px 10px";
4188
- }
4189
- render() {
4190
- return (index.h(index.Host, { style: { display: "contents" } }, index.h("td", { colSpan: this.colspan, style: { padding: this.padding } }, index.h("slot", null))));
4191
- }
4192
- };
4193
-
4194
- const TableRow = class {
4195
- constructor(hostRef) {
4196
- index.registerInstance(this, hostRef);
4197
- /**
4198
- * @uiName Border
4199
- */
4200
- this.border = "1px solid #EAEAEA";
4201
- }
4202
- render() {
4203
- return (index.h(index.Host, { style: { display: "contents" } }, index.h("tr", { style: { border: this.border } }, index.h("slot", null))));
4204
- }
4205
- };
4206
-
4207
- function getCurrentStep(user) {
4208
- var _a, _b;
4209
- if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
4210
- return "/1";
4211
- }
4212
- const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, } = user.impactConnection.publisher;
4213
- // If they do have a required document, look at current document
4214
- if (requiredTaxDocumentType && !currentTaxDocument)
4215
- return "/3";
4216
- if (!withdrawalSettings && brandedSignup)
4217
- return "/4";
4218
- return "/dashboard";
4219
- }
4220
- function useTaxAndCash() {
4221
- var _a, _b, _c, _d, _e;
4222
- const host = index_module._();
4223
- const user = index_module.J();
4224
- const locale = index_module.L();
4225
- // State for current step of form
4226
- const [step, setStep] = index_module.In({
4227
- namespace: TAX_CONTEXT_NAMESPACE,
4228
- initialValue: "/loading",
4229
- });
4230
- // State for when to hide steps, or override certain actions
4231
- const [context, _setContext] = index_module.In({
4232
- namespace: TAX_FORM_CONTEXT_NAMESPACE,
4233
- initialValue: {},
4234
- });
4235
- // State to carry user form information into step 2
4236
- const [userFormContext, _setUserFormContext] = index_module.In({
4237
- namespace: USER_FORM_CONTEXT_NAMESPACE,
4238
- initialValue: {
4239
- firstName: undefined,
4240
- lastName: undefined,
4241
- email: undefined,
4242
- countryCode: undefined,
4243
- currency: undefined,
4244
- },
4245
- });
4246
- const [_currenciesContext, setCurrenciesContext] = index_module.In({
4247
- namespace: CURRENCIES_NAMESPACE,
4248
- initialValue: [],
4249
- });
4250
- const [_countriesContext, _setCountriesContext] = index_module.In({
4251
- namespace: COUNTRIES_NAMESPACE,
4252
- initialValue: [],
4253
- });
4254
- const [_sortedCountriesContext, setSortedCountriesContext] = index_module.In({
4255
- namespace: SORTED_COUNTRIES_NAMESPACE,
4256
- initialValue: [],
4257
- });
4258
- const { data, errors } = index_module.Sn({
4259
- namespace: USER_QUERY_NAMESPACE,
4260
- query: GET_USER,
4261
- skip: !user,
4262
- options: {
4263
- batch: false,
4264
- },
4265
- });
4266
- const countryCode = ((_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) === null || _c === void 0 ? void 0 : _c.countryCode) ||
4267
- userFormContext.countryCode;
4268
- index_module.Sn({
4269
- namespace: COUNTRIES_QUERY_NAMESPACE,
4270
- query: GET_COUNTRIES,
4271
- skip: !user,
4272
- });
4273
- const { data: financeNetworkData, refetch } = index_module.Sn({
4274
- namespace: FINANCE_NETWORK_SETTINGS_NAMESPACE,
4275
- query: GET_FINANCE_NETWORK_SETTINGS,
4276
- skip: !user,
4277
- variables: {
4278
- filter: getFinanceNetworkFilter(),
4279
- },
4280
- });
4281
- const { data: currenciesData } = index_module.Sn({
4282
- namespace: CURRENCIES_QUERY_NAMESPACE,
4283
- query: GET_CURRENCIES,
4284
- skip: !user,
4285
- variables: {
4286
- locale,
4287
- },
4288
- });
4289
- const supportedCurrencies = stencilHooks_module.useMemo(() => {
4290
- var _a, _b;
4291
- // Filter out any currencies not supported by finance network settings
4292
- const allValidCurrencies = (_b = (_a = financeNetworkData === null || financeNetworkData === void 0 ? void 0 : financeNetworkData.impactFinanceNetworkSettings) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.reduce((agg, settings) => {
4293
- var _a, _b;
4294
- const currency = (_b = (_a = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.find((currency) => currency.currencyCode === settings.currency);
4295
- // Currency not in supported list
4296
- if (!currency)
4297
- return agg;
4298
- // Currency already added to list
4299
- if (agg.find((currency) => currency.currencyCode === settings.currency))
4300
- return agg;
4301
- // Currency not supported by selected country
4302
- if (userFormContext.countryCode &&
4303
- settings.countryCode !== countryCode)
4304
- return agg;
4305
- return [...agg, currency];
4306
- }, []);
4307
- return allValidCurrencies;
4308
- }, [financeNetworkData, countryCode]);
4309
- const intlLocale = (locale === null || locale === void 0 ? void 0 : locale.replace("_", "-")) || "en";
4310
- const sortByName = (a, b) => a.displayName < b.displayName ? -1 : 1;
4311
- const paymentOptions = (_d = financeNetworkData === null || financeNetworkData === void 0 ? void 0 : financeNetworkData.impactFinanceNetworkSettings) === null || _d === void 0 ? void 0 : _d.data;
4312
- // filter out any duplicate countries and null countryCode
4313
- const availableCountries = stencilHooks_module.useMemo(() => new Set(paymentOptions === null || paymentOptions === void 0 ? void 0 : paymentOptions.map((option) => option.countryCode).filter((value) => value)), [paymentOptions]);
4314
- const _topCountries = ["CA", "GB", "US"];
4315
- const sortedCountries = stencilHooks_module.useMemo(() => Array.from(availableCountries)
4316
- .map((countryCode) => sqmInvoiceTableView.getCountryObj({ countryCode, locale: intlLocale }))
4317
- .sort(sortByName)
4318
- .reduce((prev, countryObj) => {
4319
- if (_topCountries.includes(countryObj.countryCode))
4320
- return [countryObj, ...prev];
4321
- return [...prev, countryObj];
4322
- }, []), [availableCountries]);
4323
- stencilHooks_module.useEffect(() => {
4324
- if (sortedCountries)
4325
- setSortedCountriesContext(sortedCountries);
4326
- }, [sortedCountries]);
4327
- stencilHooks_module.useEffect(() => {
4328
- if (supportedCurrencies)
4329
- setCurrenciesContext(supportedCurrencies);
4330
- }, [supportedCurrencies]);
4331
- stencilHooks_module.useEffect(() => {
4332
- if (errors) {
4333
- setStep("/error");
4334
- return;
4335
- }
4336
- if (!host || !user)
4337
- return;
4338
- if (data) {
4339
- const user = data === null || data === void 0 ? void 0 : data.user;
4340
- if (!user || step !== "/loading")
4341
- return;
4342
- const currentStep = getCurrentStep(user);
4343
- setStep(currentStep);
4344
- }
4345
- }, [host, user, (_e = data === null || data === void 0 ? void 0 : data.user) === null || _e === void 0 ? void 0 : _e.email, errors]);
4346
- function getFinanceNetworkFilter() {
4347
- var _a, _b, _c;
4348
- if (step === "/1")
4349
- return {};
4350
- if (step === "/4")
4351
- return { currency_eq: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) === null || _c === void 0 ? void 0 : _c.currency };
4352
- if (countryCode)
4353
- return {
4354
- countryCode_eq: countryCode,
4355
- };
4356
- return {};
4357
- }
4358
- return {
4359
- step,
4360
- setStep,
4361
- context,
4362
- namespace: index_module.Mn(TAX_CONTEXT_NAMESPACE),
4363
- loading: step === "/loading",
4364
- };
4365
- }
4366
-
4367
- const TaxAndCashMonolith = class {
4368
- constructor(hostRef) {
4369
- index.registerInstance(this, hostRef);
4370
- /*---------------------------------------------------------------------------------
4371
- !IMPORTANT!: Make sure to also change the prop names in the respective component
4372
- -----------------------------------------------------------------------------------*/
4373
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4374
- STEP 1 PROPS:
4375
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
4376
- /**
4377
- * @uiName First name field label
4378
- * @uiGroup Step 1 Properties
4379
- */
4380
- this.step1_firstName = "First name";
4381
- /**
4382
- * @uiName Last name field label
4383
- * @uiGroup Step 1 Properties
4384
- */
4385
- this.step1_lastName = "Last name";
4386
- /**
4387
- * @uiName Email field label
4388
- * @uiGroup Step 1 Properties
4389
- */
4390
- this.step1_email = "Email";
4391
- /**
4392
- * @uiName Country field label
4393
- * @uiGroup Step 1 Properties
4394
- */
4395
- this.step1_country = "Country";
4396
- /**
4397
- * @uiName Phone number field label
4398
- * @uiGroup Step 1 Properties
4399
- */
4400
- this.step1_phoneNumber = "Phone number";
4401
- /**
4402
- * @uiName Address field label
4403
- * @uiGroup Step 1 Properties
4404
- */
4405
- this.step1_address = "Address";
4406
- /**
4407
- * @uiName City field label
4408
- * @uiGroup Step 1 Properties
4409
- */
4410
- this.step1_city = "City";
4411
- /**
4412
- * @uiName State field label for states
4413
- * @uiGroup Step 1 Properties
4414
- */
4415
- this.step1_state = "State";
4416
- /**
4417
- * @uiName State field label for provinces
4418
- * @uiGroup Step 1 Properties
4419
- */
4420
- this.step1_province = "Province";
4421
- /**
4422
- * @uiName State field label for regions
4423
- * @uiGroup Step 1 Properties
4424
- */
4425
- this.step1_region = "Region";
4426
- /**
4427
- * @uiName Postal code field label
4428
- * @uiGroup Step 1 Properties
4429
- */
4430
- this.step1_postalCode = "Postal code";
4431
- /**
4432
- * @uiName Currency field label
4433
- * @uiGroup Step 1 Properties
4434
- */
4435
- this.step1_currency = "Currency";
4436
- /**
4437
- * @uiName Currency field help text
4438
- * @uiGroup Step 1 Properties
4439
- */
4440
- this.step1_currencyHelpText = "Choose your preferred payout currency";
4441
- /**
4442
- * Edit the property called terms and conditions text to change what's displayed for {termsAndConditionsLink}.
4443
- * @uiName Terms and conditions checkbox
4444
- * @uiGroup Step 1 Properties
4445
- */
4446
- this.step1_allowBankingCollection = "I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information";
4447
- /**
4448
- * @uiName Step 1 title
4449
- * @uiGroup Step 1 Properties
4450
- */
4451
- this.step1_personalInformation = "Personal Information";
4452
- /**
4453
- * The link text that appears in the terms and conditions checkbox
4454
- * @uiName Terms and conditions text
4455
- * @uiGroup Step 1 Properties
4456
- * @uiWidget textArea
4457
- */
4458
- this.step1_termsAndConditionsLabel = "terms and conditions";
4459
- /**
4460
- * The link that appears in the terms and conditions checkbox
4461
- * @uiName Terms and conditions link
4462
- * @uiGroup Step 1 Properties
4463
- */
4464
- this.step1_termsAndConditionsLink = "https://terms.advocate.impact.com/PayoutTermsAndConditions.html";
4465
- /**
4466
- * Placeholder text displayed in the currency search dropdown
4467
- * @uiName Currency field placeholder text
4468
- * @uiGroup Step 1 Properties
4469
- */
4470
- this.step1_searchForCurrencyText = "Search for currency..";
4471
- /**
4472
-
4473
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4474
- STEP 2 PROPS:
4475
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
4476
- /**
4477
- * @uiName Step 2 title
4478
- * @uiGroup Step 2 Properties
4479
- */
4480
- this.step2_indirectTax = "Indirect Tax";
4481
- /**
4482
- * Displayed under the title of this step.
4483
- * @uiName Step 2 description
4484
- * @uiGroup Step 2 Properties
4485
- * @uiWidget textArea
4486
- */
4487
- this.step2_indirectTaxDescription = "Indirect taxes (e.g. VAT, HST, GST) are transaction based taxes often applied to goods and services. Service providers are typically required to register with their tax authority and collect these taxes on behalf governments.";
4488
- /**
4489
- * Displayed with indirect tax registration options.
4490
- * @uiName Indirect tax details section title
4491
- * @uiGroup Step 2 Properties
4492
- */
4493
- this.step2_indirectTaxDetails = "Indirect tax details";
4494
- /**
4495
- * @uiName Registered for indirect tax option
4496
- * @uiGroup Step 2 Properties
4497
- * @uiWidget textArea
4498
- *
4499
- */
4500
- this.step2_otherRegion = "Registered for indirect tax";
4501
- /**
4502
- * Selecting this option will display fields to enter indirect tax details.
4503
- * @uiName Registered for indirect tax option description
4504
- * @uiGroup Step 2 Properties
4505
- */
4506
- this.step2_otherRegionSubtext = "If you’ve registered with your tax authority, add your information to stay tax compliant.";
4507
- /**
4508
- * @uiName Not registered for indirect tax option
4509
- * @uiGroup Step 2 Properties
4510
- * @uiWidget textArea
4511
- */
4512
- this.step2_notRegistered = "Not registered for indirect tax";
4513
- /**
4514
- * Participants based in the US are considered not registered.
4515
- * @uiName Not registered for indirect tax option description
4516
- * @uiGroup Step 2 Properties
4517
- */
4518
- this.step2_notRegisteredSubtext = "If you’ve never set up indirect tax with your tax authority, then you’re likely not considered registered.";
4519
- /**
4520
- * @uiName Region of indirect tax field label
4521
- * @uiGroup Step 2 Properties
4522
- */
4523
- this.step2_selectedRegion = "Country / region of indirect tax";
4524
- /**
4525
- * @uiName Indirect tax number field label
4526
- * @uiGroup Step 2 Properties
4527
- */
4528
- this.step2_indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}";
4529
- /**
4530
- * @uiName Province field label
4531
- * @uiGroup Step 2 Properties
4532
- */
4533
- this.step2_province = "Province";
4534
- /**
4535
- * @uiName Missing indirect tax number error message
4536
- * @uiGroup Step 2 Properties
4537
- */
4538
- 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";
4539
- /**
4540
- * Displayed to participants registered for QST.
4541
- * @uiName QST number field label
4542
- * @uiGroup Step 2 Properties
4543
- */
4544
- this.step2_qstNumber = "QST number";
4545
- /**
4546
- * Displayed to participants registered for indirect tax in Quebec, Canada.
4547
- * @uiName QST tax checkbox
4548
- * @uiGroup Step 2 Properties
4549
- */
4550
- this.step2_isRegisteredQST = "I am registered for QST Tax";
4551
- /**
4552
- * Displayed to participants registered for indirect tax in Spain.
4553
- * @uiName Spain income tax checkbox
4554
- * @uiGroup Step 2 Properties
4555
- * @uiWidget textArea
4556
- */
4557
- this.step2_isRegisteredSubRegionIncomeTax = "I am an individual registered for Income Tax purposes in Spain, and withholding tax will apply to any payments made to me.";
4558
- /**
4559
- * Displayed to participants registered in Spain.
4560
- * @uiName Sub-region of indirect tax field label
4561
- * @uiGroup Step 2 Properties
4562
- */
4563
- this.step2_subRegion = "Sub-region";
4564
- /**
4565
- * @uiName Income tax field label
4566
- * @uiGroup Step 2 Properties
4567
- */
4568
- this.step2_subRegionTaxNumberLabel = "Income Tax Number";
4569
- /**
4570
- * Communicate that after this step, only Support can change personal and indirect tax information.
4571
- * @uiName Submission confirmation alert
4572
- * @uiGroup Step 2 Properties
4573
- * @uiWidget textArea
4574
- */
4575
- this.step2_cannotChangeInfoAlert = "Changes to your personal and indirect tax information can only be made through our {supportLink} after you complete this step. Make sure these are correct before continuing.";
4576
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4577
- STEP 3 PROPS:
4578
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
4579
- /**
4580
- * @uiName Step 3 title
4581
- * @uiGroup Step 3 Properties
4582
- */
4583
- this.step3_taxForm = "Tax form";
4584
- /**
4585
- * Display the type of tax form that the participant must submit.
4586
- * @uiName Tax form name
4587
- * @uiGroup Step 3 Properties
4588
- */
4589
- this.step3_taxFormLabel = "{documentType} Tax Form";
4590
- /**
4591
- * @uiName Participant type field label
4592
- * @uiGroup Step 3 Properties
4593
- */
4594
- this.step3_participantType = "Participant type";
4595
- /**
4596
- * An option for the participant type field. Used to determine which W-8 form is required.
4597
- * @uiName Business representative participant type label
4598
- * @uiGroup Step 3 Properties
4599
- */
4600
- this.step3_businessEntity = "I represent a business";
4601
- /**
4602
- * An option for the participant type field. Used to determine which W-8 form is required.
4603
- * @uiName Individual participant type label
4604
- * @uiGroup Step 3 Properties
4605
- */
4606
- this.step3_individualParticipant = "I am an individual participant";
4607
- /**
4608
- * Displayed at the top of the page to participants based in the US.
4609
- * @uiName W-9 tax form description
4610
- * @uiGroup Step 3 Properties
4611
- * @uiWidget textArea
4612
- */
4613
- this.step3_taxFormDescription = "Participants based in the US need to submit a {documentType} form.";
4614
- /**
4615
- * Displayed at the top of the page to individuals joining a US program who reside outside the country.
4616
- * @uiName W-8 BEN tax form description
4617
- * @uiGroup Step 3 Properties
4618
- * @uiWidget textArea
4619
- */
4620
- this.step3_taxFormDescriptionIndividualParticipant = "Participants residing outside of the US, joining the referral program of a US-based company, need to submit a {documentType} form.";
4621
- /**
4622
- * Displayed at the top of the page to participants representing a business.
4623
- * @uiName W-8 BEN-E tax form description
4624
- * @uiGroup Step 3 Properties
4625
- * @uiWidget textArea
4626
- */
4627
- this.step3_taxFormDescriptionBusinessEntity = "Participants residing outside of the US who represent a business entity need to submit a {documentType} form.";
4628
- /**
4629
- * This appears inside the Docusign frame.
4630
- * @uiName Docusign session expired message
4631
- * @uiGroup Step 3 Properties
4632
- * @uiWidget textArea
4633
- */
4634
- this.step3_docusignExpired = "For your security and privacy, we automatically end your session after 20 minutes of inactivity. Please refresh and re-enter your tax information to continue.";
4635
- /**
4636
- * Remind participants their session will time out after 20 minutes of inactivity.
4637
- * @uiName Docusign timed session message
4638
- * @uiGroup Step 3 Properties
4639
- * @uiWidget textArea
4640
- */
4641
- this.step3_docusignSessionWarning = "For your security, we automatically end your session when you have not interacted with the form after 20 minutes.";
4642
- /**
4643
- * This appears inside the Docusign frame.
4644
- * @uiName Docusign form error message
4645
- * @uiGroup Step 3 Properties
4646
- * @uiWidget textArea
4647
- */
4648
- this.step3_docusignError = "There was a problem displaying this form. Please refresh the page. If this problem continues, contact our {supportLink}.";
4649
- /**
4650
- * @uiName Refresh page button label
4651
- * @uiGroup Step 3 Properties
4652
- */
4653
- this.step3_refreshButton = "Refresh Page";
4654
- /**
4655
- * @uiName Exit button text
4656
- * @uiGroup Step 3 Properties
4657
- */
4658
- this.step3_exitButton = "Exit";
4659
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4660
- STEP 4 PROPS:
4661
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
4662
- /**
4663
- * @uiName Step 4 title
4664
- * @uiGroup Step 4 Properties
4665
- */
4666
- this.step4_taxAndPayouts = "Payouts";
4667
- /**
4668
- * @uiName Direct to bank payout option
4669
- * @uiGroup Step 4 Properties
4670
- */
4671
- this.step4_directlyToBankAccount = "Directly to my bank account";
4672
- /**
4673
- * @uiName PayPal payout option
4674
- * @uiGroup Step 4 Properties
4675
- */
4676
- this.step4_toPayPalAccount = "PayPal (2% processing fee capped to {feeCap})";
4677
- /**
4678
- * @uiName Threshold balance payment schedule option
4679
- * @uiGroup Step 4 Properties
4680
- */
4681
- this.step4_paymentScheduleBalanceThreshold = "Pay me when my balance reaches a threshold";
4682
- /**
4683
- * @uiName Fixed day payment schedule option
4684
- * @uiGroup Step 4 Properties
4685
- */
4686
- this.step4_paymentScheduleFixedDay = "Pay me on a fixed day of the month";
4687
- /**
4688
- * Let the participant choose what day of the month they’ll get paid
4689
- * @uiName Payment day field label
4690
- * @uiGroup Step 4 Properties
4691
- */
4692
- this.step4_paymentDaySelectLabel = "Payment Day";
4693
- /**
4694
- * Participant use this field to select the balance at which they want to be paid
4695
- * @uiName Payment threshold field label
4696
- * @uiGroup Step 4 Properties
4697
- */
4698
- this.step4_paymentThresholdSelectLabel = "Payment threshold";
4699
- /**
4700
- * One of two payment day options
4701
- * @uiName First of month payday option
4702
- * @uiGroup Step 4 Properties
4703
- */
4704
- this.step4_paymentDayFirstOfMonthLabelText = "1st of the month";
4705
- /**
4706
- * One of two payment day options
4707
- * @uiName Fifteenth of month payday option
4708
- * @uiGroup Step 4 Properties
4709
- */
4710
- this.step4_paymentDayFifteenthOfMonthLabelText = "15th of the month";
4711
- /**
4712
- * @uiName Payment method section header
4713
- * @uiGroup Step 4 Properties
4714
- */
4715
- this.step4_paymentMethod = "Payment method";
4716
- /**
4717
- * @uiName Payment schedule section header
4718
- * @uiGroup Step 4 Properties
4719
- */
4720
- this.step4_paymentSchedule = "Payment schedule";
4721
- /**
4722
- * @uiName Payment method section description
4723
- * @uiGroup Step 4 Properties
4724
- */
4725
- this.step4_paymentMethodSubtext = "Payouts will be sent from our referral program provider, impact.com.";
4726
- /**
4727
- * Displayed to participants who choose PayPal as their payout method
4728
- * @uiName PayPal email field label
4729
- * @uiGroup Step 4 Properties
4730
- */
4731
- this.step4_payPalInputLabel = "PayPal email";
4732
- /**
4733
- * @uiName Bank country field label
4734
- * @uiGroup Step 4 Properties
4735
- */
4736
- this.step4_bankLocationLabel = "Bank country location";
4737
- /**
4738
- * @uiName Beneficiary account field label
4739
- * @uiGroup Step 4 Properties
4740
- */
4741
- this.step4_beneficiaryAccountNameLabel = "Beneficiary account name";
4742
- /**
4743
- * @uiName Bank account type field label
4744
- * @uiGroup Step 4 Properties
4745
- */
4746
- this.step4_bankAccountTypeLabel = "Bank account type";
4747
- /**
4748
- * @uiName Checking account option
4749
- * @uiGroup Step 4 Properties
4750
- */
4751
- this.step4_checkingSelectItemLabel = "Checking";
4752
- /**
4753
- * Label text for the savings account type select item
4754
- * @uiName Savings account options
4755
- * @uiGroup Step 4 Properties
4756
- */
4757
- this.step4_savingsSelectItemLabel = "Savings";
4758
- /**
4759
- * @uiName Bank account number field label
4760
- * @uiGroup Step 4 Properties
4761
- */
4762
- this.step4_bankAccountNumberLabel = "Bank account number";
4763
- /**
4764
- * @uiName IBAN field label
4765
- * @uiGroup Step 4 Properties
4766
- */
4767
- this.step4_ibanLabel = "IBAN";
4768
- /**
4769
- * @uiName SWIFT code field label
4770
- * @uiGroup Step 4 Properties
4771
- */
4772
- this.step4_swiftCodeLabel = "SWIFT code";
4773
- /**
4774
- * @uiName Routing code field label
4775
- * @uiGroup Step 4 Properties
4776
- */
4777
- this.step4_routingCodeLabel = "{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }";
4778
- /**
4779
- * @uiName Bank name field label
4780
- * @uiGroup Step 4 Properties
4781
- */
4782
- this.step4_bankNameLabel = "Bank name";
4783
- /**
4784
- * @uiName Classification entity field label
4785
- * @uiGroup Step 4 Properties
4786
- */
4787
- this.step4_classificationEntityLabel = "Classification entity";
4788
- /**
4789
- * One of three options listed for the classification field
4790
- * @uiName Business classification option
4791
- * @uiGroup Step 4 Properties
4792
- */
4793
- this.step4_businessSelectItemLabel = "Business";
4794
- /**
4795
- * One of three options listed for the classification field
4796
- * @uiName Individual classification option
4797
- * @uiGroup Step 4 Properties
4798
- */
4799
- this.step4_individualSelectItemLabel = "Individual";
4800
- /**
4801
- * One of three options listed for the classification field
4802
- * @uiName Foreign classification option
4803
- * @uiGroup Step 4 Properties
4804
- */
4805
- this.step4_foreignSelectItemLabel = "Foreign";
4806
- /**
4807
- * @uiName Classification CPF field label
4808
- * @uiGroup Step 4 Properties
4809
- */
4810
- this.step4_classificationCPFLabel = "Classification CPF";
4811
- /**
4812
- * @uiName Patronymic name field label
4813
- * @uiGroup Step 4 Properties
4814
- */
4815
- this.step4_patronymicNameLabel = "Patronymic name";
4816
- /**
4817
- * @uiName VO code field label
4818
- * @uiGroup Step 4 Properties
4819
- */
4820
- this.step4_voCodeLabel = "VO code";
4821
- /**
4822
- * @uiName Agency code field label
4823
- * @uiGroup Step 4 Properties
4824
- */
4825
- this.step4_agencyCodeLabel = "Agency code";
4826
- /**
4827
- * @uiName Branch code field label
4828
- * @uiGroup Step 4 Properties
4829
- */
4830
- this.step4_branchCodeLabel = "Branch code";
4831
- /**
4832
- * Label text for the classification input field
4833
- * @uiName Classification field label
4834
- * @uiGroup Step 4 Properties
4835
- */
4836
- this.step4_classificationLabel = "Classification";
4837
- /**
4838
- * @uiName Taxpayer ID field label
4839
- * @uiGroup Step 4 Properties
4840
- */
4841
- this.step4_taxPayerIdLabel = "Beneficiary INN";
4842
- /**
4843
- * @uiName Bank address field label
4844
- * @uiGroup Step 4 Properties
4845
- */
4846
- this.step4_bankAddressLabel = "Bank address";
4847
- /**
4848
- * @uiName Bank city field label
4849
- * @uiGroup Step 4 Properties
4850
- */
4851
- this.step4_bankCityLabel = "Bank city";
4852
- /**
4853
- * @uiName Bank province/state field label
4854
- * @uiGroup Step 4 Properties
4855
- */
4856
- this.step4_bankStateLabel = "Bank Province / State";
4857
- /**
4858
- * @uiName Bank postal code field label
4859
- * @uiGroup Step 4 Properties
4860
- */
4861
- this.step4_bankPostalCodeLabel = "Bank postal code";
4862
- /**
4863
- * Default payment method to the participants’ bank account.
4864
- * @uiName EFT withdrawal payment method
4865
- * @uiGroup Step 4 Properties
4866
- */
4867
- this.step4_eftWithdrawalLabel = "EFT Withdrawal (free)";
4868
- /**
4869
- * @uiName FX Wire Processing fee text
4870
- * @uiGroup Step 4 Properties
4871
- */
4872
- this.step4_fxWireProcessingFeeLabel = "FX Wire (Processing Fee {currency}{defaultFxFee}.00)";
4873
- /**
4874
- * @uiName Text for verify email dialog
4875
- * @uiGroup Step 4 Properties
4876
- */
4877
- this.step4_verifyEmailHeaderText = "Verify your email";
4878
- /**
4879
- * @uiName Verify code widget header text
4880
- * @uiGroup Step 4 Properties
4881
- */
4882
- this.step4_verifyEmailDescriptionText = "Verify your email to update your payment settings. Enter the code sent to {email} from our referral provider, impact.com.";
4883
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4884
- DASHBOARD PROPS:
4885
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
4886
- /**
4887
- * @uiName Active tax form badge label
4888
- * @uiGroup Dashboard Properties
4889
- */
4890
- this.dashboard_statusTextActive = "Active";
4891
- /**
4892
- * @uiName Invalid tax form badge label
4893
- * @uiGroup Dashboard Properties
4894
- */
4895
- this.dashboard_statusTextNotActive = "Invalid Tax Form";
4896
- /**
4897
- * Displayed when the participant submitted their form but it is awaiting review.
4898
- *
4899
- * @uiName Not verified tax form badge label
4900
- * @uiGroup Dashboard Properties
4901
- */
4902
- this.dashboard_statusTextNotVerified = "Not Verified";
4903
- /**
4904
- * Additional text displayed next to the tax form's status badge
4905
- *
4906
- * @uiName Active W-9 description
4907
- * @uiGroup Dashboard Properties
4908
- */
4909
- this.dashboard_badgeTextSubmittedOn = "Submitted on {dateSubmitted}.";
4910
- /**
4911
- * Additional text displayed next to the tax form's status badge.
4912
- *
4913
- * @uiName Active W-8 description
4914
- * @uiGroup Dashboard Properties
4915
- */
4916
- this.dashboard_badgeTextSubmittedOnW8 = "Submitted on {dateSubmitted}. Valid for three years after submission.";
4917
- /**
4918
- * Additional text displayed next to the tax form's status badge.
4919
- *
4920
- * @uiName Tax form in review description
4921
- * @uiGroup Dashboard Properties
4922
- */
4923
- this.dashboard_badgeTextAwaitingReview = "Awaiting review. Submitted on {dateSubmitted}.";
4924
- /**
4925
- * Part of the alert displayed at the top of the page.
4926
- *
4927
- * @uiName Inactive W-9 error message title
4928
- * @uiGroup Dashboard Properties
4929
- * @uiWidget textArea
4930
- */
4931
- this.dashboard_taxAlertHeaderNotActiveW9 = "Your W9 tax form has personal information that doesn’t match your profile";
4932
- /**
4933
- * Part of the alert displayed at the top of the page.
4934
- *
4935
- * @uiName Inactive W-8 error message title
4936
- * @uiGroup Dashboard Properties
4937
- * @uiWidget textArea
4938
- */
4939
- this.dashboard_taxAlertHeaderNotActiveW8 = "{documentType} tax form is invalid";
4940
- /**
4941
- * Part of the alert displayed at the top of the page.
4942
- *
4943
- * @uiName Inactive W-9 error message description
4944
- * @uiGroup Dashboard Properties
4945
- * @uiWidget textArea
4946
- */
4947
- this.dashboard_taxAlertNotActiveMessageW9 = "Please resubmit a new {documentType} form.";
4948
- /**
4949
- * Part of the alert displayed at the top of the page.
4950
- *
4951
- * @uiName Inactive W-8 error message description
4952
- * @uiGroup Dashboard Properties
4953
- */
4954
- this.dashboard_taxAlertNotActiveMessageW8 = "Your tax form may have expired or has personal information that doesn’t match your profile. Please submit a new {documentType} form.";
4955
- /**
4956
- * Additional text displayed next to the tax form's status badge.
4957
- *
4958
- * @uiName Invalid tax form description
4959
- * @uiGroup Dashboard Properties
4960
- * @uiWidget textArea
4961
- */
4962
- this.dashboard_invalidForm = "Make sure your information is correct and submit new form.";
4963
- /**
4964
- * @uiName Payout information section header
4965
- * @uiGroup Dashboard Properties
4966
- */
4967
- this.dashboard_bankingInformationSectionHeader = "Payout Information";
4968
- /**
4969
- * @uiName Tax document section header
4970
- * @uiGroup Dashboard Properties
4971
- */
4972
- this.dashboard_taxDocumentSectionHeader = "Tax documents";
4973
- /**
4974
- * Displayed under the tax document section header.
4975
- *
4976
- * @uiName Tax documents section description
4977
- * @uiGroup Dashboard Properties
4978
- */
4979
- this.dashboard_taxDocumentSectionSubHeader = "{documentType} tax form";
4980
- /**
4981
- * No other statuses or badges will be displayed in the tax form section in this case.
4982
- *
4983
- * @uiName Tax form not required text
4984
- * @uiGroup Dashboard Properties
4985
- * @uiWidget textArea
4986
- */
4987
- this.dashboard_noFormNeededSubtext = "Tax documents are only required if you are based in the US or joining the referral program of a US based brand.";
4988
- /**
4989
- *
4990
- * @uiName Indirect tax section header
4991
- * @uiGroup Dashboard Properties
4992
- */
4993
- this.dashboard_indirectTaxInfoSectionHeader = "Indirect tax";
4994
- /**
4995
- * If the participant is registered for indirect tax in Canada, display the province they’re registered in.
4996
- *
4997
- * @uiName Canadian province of indirect tax
4998
- * @uiGroup Dashboard Properties
4999
- */
5000
- this.dashboard_indirectTaxInfoCanada = "Registered in {province}, {country}";
5001
- /**
5002
- * If the participant is registered for indirect tax, display the country they’re registered in.
5003
- *
5004
- * @uiName Indirect tax country
5005
- * @uiGroup Dashboard Properties
5006
- */
5007
- this.dashboard_indirectTaxInfoOtherCountry = "Registered in {country}";
5008
- /**
5009
- * If the participant is registered for indirect tax in Spain, display the region they’re registered in.
5010
- *
5011
- * @uiName Spanish region of indirect tax
5012
- * @uiGroup Dashboard Properties
5013
- */
5014
- this.dashboard_indirectTaxInfoSpain = "Registered in {country}, {subRegion}";
5015
- /**
5016
- * @uiName Indirect tax tooltip
5017
- * @uiGroup Dashboard Properties
5018
- * @uiWidget textArea
5019
- */
5020
- this.dashboard_indirectTaxTooltipSupport = "To make changes to your indirect tax information, please contact our {supportLink}.";
5021
- /**
5022
- * Displayed to participants who have submitted their indirect tax information.
5023
- *
5024
- * @uiName Indirect tax details
5025
- * @uiGroup Dashboard Properties
5026
- */
5027
- this.dashboard_indirectTaxDetails = "{indirectTaxType} number: {indirectTaxNumber}";
5028
- /**
5029
- * @uiName Submit new tax form button label
5030
- * @uiGroup Dashboard Properties
5031
- */
5032
- this.dashboard_newFormButton = "Submit new form";
5033
- /**
5034
- * @uiName Edit payment info button label
5035
- * @uiGroup Dashboard Properties
5036
- */
5037
- this.dashboard_editPaymentInformationButton = "Edit Payout Information";
5038
- /**
5039
- * @uiName Not registered for indirect tax text
5040
- * @uiGroup Dashboard Properties
5041
- * @uiWidget textArea
5042
- */
5043
- this.dashboard_notRegisteredForTax = "Not registered for indirect tax. If you’ve previously registered with your tax authority, contact our {supportLink} to add your information to stay tax compliant.";
5044
- /**
5045
- * Displayed to participants registered in Quebec, Canada.
5046
- * @uiName QST indirect tax details
5047
- * @uiGroup Dashboard Properties
5048
- */
5049
- this.dashboard_qstNumber = "QST number: {qstNumber}";
5050
- /**
5051
- * @uiName Spain sub-region indirect tax number
5052
- * @uiGroup Dashboard Properties
5053
- */
5054
- this.dashboard_subRegionTaxNumber = "Income tax number: {subRegionTaxNumber}";
5055
- /**
5056
- * @uiName Payout status badge
5057
- * @uiGroup Dashboard Properties
5058
- */
5059
- this.dashboard_statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
5060
- /**
5061
- * Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
5062
- * @uiName Payout schedule by threshold text
5063
- * @uiGroup Dashboard Properties
5064
- */
5065
- this.dashboard_thresholdPayoutText = "Next payout occurs when balance is {thresholdBalance}";
5066
- /**
5067
- * Shown before the participant’s bank account information.
5068
- * @uiName Bank account field label
5069
- * @uiGroup Dashboard Properties
5070
- */
5071
- this.dashboard_accountText = "Account";
5072
- /**
5073
- * Part of the Invoice table displayed at the bottom of the page.
5074
- * @uiName Invoice number column title
5075
- * @uiGroup Dashboard Properties
5076
- */
5077
- this.dashboard_invoiceColumnTitle = "Invoice";
5078
- /**
5079
- * Part of the Invoice table displayed at the bottom of the page.
5080
- * @uiName Date column title
5081
- * @uiGroup Dashboard Properties
5082
- */
5083
- this.dashboard_dateColumnTitle = "Date";
5084
- /**
5085
- * Part of the Invoice table displayed at the bottom of the page.
5086
- * @uiName Earnings column title
5087
- * @uiGroup Dashboard Properties
5088
- */
5089
- this.dashboard_earningsColumnTitle = "Earnings";
5090
- /**
5091
- * Part of the Invoice table displayed at the bottom of the page.
5092
- * @uiName Indirect tax column title
5093
- * @uiGroup Dashboard Properties
5094
- */
5095
- this.dashboard_indirectTaxColumnTitle = "Indirect tax";
5096
- /**
5097
- * Displayed under the payout details card.
5098
- * @uiName Payout from impact text
5099
- * @uiGroup Dashboard Properties
5100
- * @uiWidget textArea
5101
- */
5102
- this.dashboard_payoutFromImpact = "Your balance may take up to 24 hours to update. Payouts will be sent from our referral program provider, impact.com.";
5103
- /**
5104
- * Part of the Invoice table displayed at the bottom of the page.
5105
- * @uiName Earnings after tax column title
5106
- * @uiGroup Dashboard Properties
5107
- */
5108
- this.dashboard_earningsAfterTaxColumnTitle = "Earnings after tax";
5109
- /**
5110
- * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
5111
- * @uiName Payout error message title
5112
- * @uiGroup Dashboard Properties
5113
- * @uiWidget textArea
5114
- */
5115
- this.dashboard_payoutHoldAlertHeader = "Your payout is on hold";
5116
- /**
5117
- * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
5118
- * @uiName Payout error message description
5119
- * @uiGroup Dashboard Properties
5120
- * @uiWidget textArea
5121
- */
5122
- this.dashboard_payoutHoldAlertDescription = "Please contact our {supportLink} or check your inbox for an email from our referral program provider, impact.com.";
5123
- /**
5124
- * Text displayed for existing publishers that do not have saved banking information.
5125
- * @uiName Payout missing information subtext
5126
- * @uiGroup Dashboard Properties
5127
- */
5128
- this.dashboard_payoutMissingInformationText = "Missing banking information, go to Impact.com to resolve.";
5129
- /**
5130
- * @uiName Invoice table description
5131
- * @uiGroup Dashboard Properties
5132
- */
5133
- this.dashboard_invoiceDescription = "View and download your invoices to report your earnings and stay tax compliant.";
5134
- /**
5135
- * @uiName Invoice table previous page button label
5136
- * @uiGroup Dashboard Properties
5137
- */
5138
- this.dashboard_invoicePrevLabel = "Prev";
5139
- /**
5140
- * @uiName Invoice table next page button label
5141
- * @uiGroup Dashboard Properties
5142
- */
5143
- this.dashboard_invoiceMoreLabel = "Next";
5144
- /**
5145
- * @uiName Invoice table title
5146
- * @uiGroup Dashboard Properties
5147
- */
5148
- this.dashboard_invoiceHeader = "Invoices";
5149
- /**
5150
- * @uiName Empty invoice table header
5151
- * @uiGroup Dashboard Properties
5152
- */
5153
- this.dashboard_invoiceEmptyStateHeader = "View your invoice details";
5154
- /**
5155
- * @uiName Empty invoice table description
5156
- * @uiGroup Dashboard Properties
5157
- */
5158
- this.dashboard_invoiceEmptyStateText = "Refer a friend to view the status of your invoices and rewards earned";
5159
- /**
5160
- * @uiName Replace tax form modal header
5161
- * @uiGroup Dashboard Properties
5162
- */
5163
- this.dashboard_replaceTaxFormModalHeader = "Replace existing tax form";
5164
- /**
5165
- * @uiName Replace tax form modal body text
5166
- * @uiGroup Dashboard Properties
5167
- * @uiWidget textArea
5168
- */
5169
- this.dashboard_replaceTaxFormModalBodyText = "Submitting a new tax form will remove your existing form. Make sure to sign and complete your new tax form to prevent any issues with your next payout.";
5170
- /**
5171
- * Part of the alert displayed at the top of the page when the user needs to verify their identity.
5172
- * @uiName Verification required alert message title
5173
- * @uiGroup Dashboard Properties
5174
- * @uiWidget textArea
5175
- */
5176
- this.dashboard_verificationRequiredHeader = "Verify your identity";
5177
- /**
5178
- * Part of the alert displayed at the top of the page when the user needs to verify their identity
5179
- * @uiName Verification required alert message description
5180
- * @uiGroup Dashboard Properties
5181
- * @uiWidget textArea
5182
- */
5183
- this.dashboard_verificationRequiredDescription = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.";
5184
- /**
5185
- * @uiName Verification required internal alert header
5186
- * @uiGroup Dashboard Properties
5187
- * @uiWidget textArea
5188
- */
5189
- this.dashboard_verificationRequiredInternalHeader = "Identity Verification in Progress";
5190
- /**
5191
- * @uiName Verification required internal alert description
5192
- * @uiGroup Dashboard Properties
5193
- * @uiWidget textArea
5194
- */
5195
- this.dashboard_verificationRequiredInternalDescription = "Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.";
5196
- /**
5197
- * @uiName Verification review internal alert header
5198
- * @uiGroup Dashboard Properties
5199
- * @uiWidget textArea
5200
- */
5201
- this.dashboard_verificationReviewInternalHeader = "Identity Verification Under Review";
5202
- /**
5203
- * @uiName Verification review internal alert description
5204
- * @uiGroup Dashboard Properties
5205
- * @uiWidget textArea
5206
- */
5207
- this.dashboard_verificationReviewInternalDescription = "Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.";
5208
- /**
5209
- * @uiName Verification failed internal alert header
5210
- * @uiGroup Dashboard Properties
5211
- * @uiWidget textArea
5212
- */
5213
- this.dashboard_verificationFailedInternalHeader = "Identity Verification Unsuccessful";
5214
- /**
5215
- * @uiName Verification failed internal alert description
5216
- * @uiGroup Dashboard Properties
5217
- * @uiWidget textArea
5218
- */
5219
- this.dashboard_verificationFailedInternalDescription = "Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.";
5220
- /**
5221
- * Part of the alert displayed at the top of the page when the user needs to verify their identity.
5222
- * @uiName Verification required alert button text
5223
- * @uiGroup Dashboard Properties
5224
- * @uiWidget textArea
5225
- */
5226
- this.dashboard_verificationRequiredButtonText = "Start Verification";
5227
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5228
- GENERAL PROPS:
5229
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
5230
- /**
5231
- * @uiName Setup progress
5232
- * @uiGroup General Form Properties
5233
- */
5234
- this.formStep = "Step {step} of {count}";
5235
- /**
5236
- * Part of the alert displayed at the top of the page.
5237
- * @uiName Form submission error message title
5238
- * @uiGroup General Form Properties
5239
- * @uiWidget textArea
5240
- */
5241
- this.generalErrorTitle = "There was a problem submitting your information";
5242
- /**
5243
- * Part of the alert displayed at the top of the page.
5244
- * @uiName Form submission error message description
5245
- * @uiGroup General Form Properties
5246
- * @uiWidget textArea
5247
- */
5248
- this.generalErrorDescription = "Please review your information and try again. If this problem continues, contact our {supportLink}.";
5249
- /**
5250
- * Displayed under a field that is missing required information.
5251
- * @uiName Empty form field error message
5252
- * @uiGroup General Form Properties
5253
- */
5254
- this.fieldRequiredError = "{fieldName} is required";
5255
- /**
5256
- * Displayed under a field that includes invalid characters (non-ASCII).
5257
- * @uiName Invalid character error message
5258
- * @uiGroup General Form Properties
5259
- */
5260
- this.invalidCharacterError = "{fieldName} includes characters that aren't supported.";
5261
- /**
5262
- * Displayed under a field when it has an invalid entry.
5263
- * @uiName Form field error message
5264
- * @uiGroup General Form Properties
5265
- */
5266
- this.fieldInvalidError = "{fieldName} is invalid";
5267
- /**
5268
- * @uiName Continue button label
5269
- * @uiGroup General Form Properties
5270
- */
5271
- this.continueButton = "Continue";
5272
- /**
5273
- * @uiName Back button label
5274
- * @uiGroup General Form Properties
5275
- */
5276
- this.backButton = "Back";
5277
- /**
5278
- * @uiName Cancel button label
5279
- * @uiGroup General Form Properties
5280
- */
5281
- this.cancelButton = "Cancel";
5282
- /**
5283
- * Part of the alert displayed at the top of the page if the participant is already a registered partner on impact.com.
5284
- * @uiName Participant is a partner alert title
5285
- * @uiGroup General Form Properties
5286
- * @uiWidget textArea
5287
- */
5288
- this.isPartnerAlertHeader = "An account with this email already exists with our referral program provider, impact.com";
5289
- /**
5290
- * Part of the alert displayed at the top of the page if the participant is already a registered partner on impact.com.
5291
- * @uiName Participant is a partner alert description
5292
- * @uiGroup General Form Properties
5293
- * @uiWidget textArea
5294
- */
5295
- this.isPartnerAlertDescription = "If you don’t recognize this referral program provider or believe this is a mistake, please contact our {supportLink} or sign up for this referral program with a different email.";
5296
- /**
5297
- * Placeholder text displayed in the country search dropdown
5298
- * @uiName Country field placeholder text
5299
- * @uiGroup General Form Properties
5300
- */
5301
- this.searchForCountryText = "Search for country..";
5302
- /**
5303
- * Part of the alert displayed at the top of the page.
5304
- * @uiName Page load error message title
5305
- * @uiGroup General Form Properties
5306
- * @uiWidget textArea
5307
- */
5308
- this.loadingErrorAlertHeader = "There was a problem loading your form";
5309
- /**
5310
- * Part of the alert displayed at the top of the page.
5311
- * @uiName Page load error message description
5312
- * @uiGroup General Form Properties
5313
- * @uiWidget textArea
5314
- */
5315
- this.loadingErrorAlertDescription = "Please refresh the page and try again. If this problem continues, contact our {supportLink}.";
5316
- /**
5317
- * Displayed at the top of the page on all set up steps.
5318
- * @uiName Page description
5319
- * @uiGroup General Form Properties
5320
- */
5321
- this.taxAndPayoutsDescription = "Submit your tax documents and add your banking information to receive your rewards.";
5322
- /**
5323
- * Link text for contacting support team
5324
- * @uiName Suport link text
5325
- * @uiGroup General Form Properties
5326
- */
5327
- this.supportLink = "support team";
5328
- stencilHooks_module.h$1(this);
5329
- }
5330
- disconnectedCallback() { }
5331
- // this field is required prop
5332
- getGeneralStepTextProps(prefix) {
5333
- const props = utils.getProps(this);
5334
- return {
5335
- ...extractProps.extractProps(props, prefix),
5336
- generalErrorTitle: props.generalErrorTitle,
5337
- generalErrorDescription: props.generalErrorDescription,
5338
- fieldRequiredError: props.fieldRequiredError,
5339
- invalidCharacterError: props.invalidCharacterError,
5340
- fieldInvalidError: props.fieldInvalidError,
5341
- continueButton: props.continueButton,
5342
- backButton: props.backButton,
5343
- cancelButton: props.cancelButton,
5344
- isPartnerAlertHeader: props.isPartnerAlertHeader,
5345
- isPartnerAlertDescription: props.isPartnerAlertDescription,
5346
- loadingErrorAlertHeader: props.loadingErrorAlertHeader,
5347
- loadingErrorAlertDescription: props.loadingErrorAlertDescription,
5348
- taxAndPayoutsDescription: props.taxAndPayoutsDescription,
5349
- searchForCountryText: props.searchForCountryText,
5350
- formStep: props.formStep,
5351
- supportLink: props.supportLink,
5352
- };
5353
- }
5354
- render() {
5355
- var _a, _b;
5356
- const props = index_module.isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
5357
- // @ts-ignore
5358
- if ((_a = this.demoData) === null || _a === void 0 ? void 0 : _a.showTextProps) {
5359
- const textProps = utils.getProps(this);
5360
- return (index.h("div", null, (_b = Object.keys(textProps)) === null || _b === void 0 ? void 0 : _b.map((prop) => {
5361
- if (prop === "demoData")
5362
- return;
5363
- return (index.h("div", null, index.h("b", null, prop, ":"), " ", this[prop], index.h("hr", null)));
5364
- })));
5365
- }
5366
- switch (props.step) {
5367
- case "/1":
5368
- return (index.h("sqm-user-info-form", Object.assign({}, this.getGeneralStepTextProps("step1_"))));
5369
- case "/2":
5370
- return (index.h("sqm-indirect-tax-form", Object.assign({}, this.getGeneralStepTextProps("step2_"))));
5371
- case "/3":
5372
- return (index.h("sqm-docusign-form", Object.assign({}, this.getGeneralStepTextProps("step3_"))));
5373
- case "/4":
5374
- return (index.h("sqm-banking-info-form", Object.assign({}, this.getGeneralStepTextProps("step4_"))));
5375
- case "/dashboard":
5376
- return (index.h("sqm-tax-and-cash-dashboard", Object.assign({}, this.getGeneralStepTextProps("dashboard_"))));
5377
- case "/error":
5378
- return (index.h(sqmInvoiceTableView.ErrorView, { loadingErrorAlertHeader: this.loadingErrorAlertHeader, loadingErrorAlertDescription: this.loadingErrorAlertDescription }));
5379
- }
5380
- return index.h(sqmInvoiceTableView.LoadingView, null);
5381
- }
5382
- };
5383
- function useDemoTaxAndCash(props) {
5384
- const [step, setStep] = index_module.In({
5385
- namespace: TAX_CONTEXT_NAMESPACE,
5386
- initialValue: "/1",
5387
- });
5388
- return cjs.cjs({
5389
- step,
5390
- setStep,
5391
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
5392
- }
5393
-
5394
- const style$6 = {
3698
+ const style$5 = {
5395
3699
  ErrorAlertContainer: {
5396
3700
  "&::part(base)": {
5397
3701
  backgroundColor: "var(--sl-color-red-100)",
@@ -5582,8 +3886,8 @@ const style$6 = {
5582
3886
  },
5583
3887
  DialogButton: { margin: "auto", width: "100%" },
5584
3888
  };
5585
- const sheet$5 = JSS.createStyleSheet(style$6);
5586
- const styleString$5 = sheet$5.toString();
3889
+ const sheet$4 = JSS.createStyleSheet(style$5);
3890
+ const styleString$4 = sheet$4.toString();
5587
3891
  const TaxAndCashDashboardView = (props) => {
5588
3892
  var _a, _b, _c, _d;
5589
3893
  const { states, text, callbacks, slots } = props;
@@ -5601,7 +3905,7 @@ const TaxAndCashDashboardView = (props) => {
5601
3905
  buttonText: text.verificationRequiredButtonText,
5602
3906
  alertType: "warning",
5603
3907
  icon: "exclamation-triangle",
5604
- class: sheet$5.classes.WarningHoldAlertContainer,
3908
+ class: sheet$4.classes.WarningHoldAlertContainer,
5605
3909
  };
5606
3910
  case "VERIFICATION:INTERNAL":
5607
3911
  return {
@@ -5614,7 +3918,7 @@ const TaxAndCashDashboardView = (props) => {
5614
3918
  }),
5615
3919
  alertType: "warning",
5616
3920
  icon: "exclamation-triangle",
5617
- class: sheet$5.classes.WarningHoldAlertContainer,
3921
+ class: sheet$4.classes.WarningHoldAlertContainer,
5618
3922
  };
5619
3923
  case "VERIFICATION:REVIEW":
5620
3924
  return {
@@ -5627,7 +3931,7 @@ const TaxAndCashDashboardView = (props) => {
5627
3931
  }),
5628
3932
  alertType: "warning",
5629
3933
  icon: "exclamation-triangle",
5630
- class: sheet$5.classes.WarningHoldAlertContainer,
3934
+ class: sheet$4.classes.WarningHoldAlertContainer,
5631
3935
  };
5632
3936
  case "VERIFICATION:FAILED":
5633
3937
  return {
@@ -5640,7 +3944,7 @@ const TaxAndCashDashboardView = (props) => {
5640
3944
  }),
5641
3945
  alertType: "critical",
5642
3946
  icon: "exclamation-octagon",
5643
- class: sheet$5.classes.ErrorHoldAlertContainer,
3947
+ class: sheet$4.classes.ErrorHoldAlertContainer,
5644
3948
  };
5645
3949
  case "HOLD":
5646
3950
  return {
@@ -5654,14 +3958,14 @@ const TaxAndCashDashboardView = (props) => {
5654
3958
  buttonText: null,
5655
3959
  alertType: "warning",
5656
3960
  icon: "exclamation-triangle",
5657
- class: sheet$5.classes.WarningHoldAlertContainer,
3961
+ class: sheet$4.classes.WarningHoldAlertContainer,
5658
3962
  };
5659
3963
  default:
5660
3964
  return;
5661
3965
  }
5662
3966
  }
5663
3967
  const statusMap = {
5664
- NOT_VERIFIED: (index.h("div", { class: sheet$5.classes.TaxFormDetailsContainer },
3968
+ NOT_VERIFIED: (index.h("div", { class: sheet$4.classes.TaxFormDetailsContainer },
5665
3969
  index.h("sl-badge", { type: "warning", pill: true }, text.statusTextNotVerified),
5666
3970
  index.h("p", null, global.intl.formatMessage({
5667
3971
  id: `badgeTextAwaitingReview`,
@@ -5669,7 +3973,7 @@ const TaxAndCashDashboardView = (props) => {
5669
3973
  }, {
5670
3974
  dateSubmitted: states.dateSubmitted,
5671
3975
  })))),
5672
- ACTIVE: (index.h("div", { class: sheet$5.classes.TaxFormDetailsContainer },
3976
+ ACTIVE: (index.h("div", { class: sheet$4.classes.TaxFormDetailsContainer },
5673
3977
  index.h("sl-badge", { type: "success", pill: true }, text.statusTextActive),
5674
3978
  index.h("p", null, global.intl.formatMessage({
5675
3979
  id: `badgeTextSubmittedOn`,
@@ -5679,12 +3983,12 @@ const TaxAndCashDashboardView = (props) => {
5679
3983
  }, {
5680
3984
  dateSubmitted: states.dateSubmitted,
5681
3985
  })))),
5682
- INACTIVE: (index.h("div", { class: sheet$5.classes.TaxFormDetailsContainer },
3986
+ INACTIVE: (index.h("div", { class: sheet$4.classes.TaxFormDetailsContainer },
5683
3987
  index.h("sl-badge", { type: "danger", pill: true }, text.statusTextNotActive),
5684
3988
  index.h("p", null, text.invalidForm))),
5685
3989
  };
5686
3990
  const alertMap = {
5687
- INACTIVE: (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$5.classes.ErrorAlertContainer },
3991
+ INACTIVE: (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$4.classes.ErrorAlertContainer },
5688
3992
  index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
5689
3993
  index.h("strong", null, global.intl.formatMessage({
5690
3994
  id: `taxAlertHeaderNotActive`,
@@ -5734,9 +4038,9 @@ const TaxAndCashDashboardView = (props) => {
5734
4038
  };
5735
4039
  return (index.h("div", null,
5736
4040
  index.h("div", null,
5737
- index.h("style", { type: "text/css" }, styleString$5),
4041
+ index.h("style", { type: "text/css" }, styleString$4),
5738
4042
  states.loadingError && (index.h("div", null,
5739
- index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$5.classes.ErrorAlertContainer },
4043
+ index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$4.classes.ErrorAlertContainer },
5740
4044
  index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
5741
4045
  index.h("strong", null, text.error.loadingErrorAlertHeader),
5742
4046
  index.h("br", null),
@@ -5746,7 +4050,7 @@ const TaxAndCashDashboardView = (props) => {
5746
4050
  }, {
5747
4051
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
5748
4052
  })))),
5749
- ((_a = states.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$5.classes.ErrorAlertContainer },
4053
+ ((_a = states.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$4.classes.ErrorAlertContainer },
5750
4054
  index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
5751
4055
  index.h("strong", null, text.error.generalTitle),
5752
4056
  index.h("br", null),
@@ -5761,49 +4065,49 @@ const TaxAndCashDashboardView = (props) => {
5761
4065
  index.h("strong", null, getAlert(states.payoutStatus).header),
5762
4066
  index.h("p", { style: { margin: "0" } }, getAlert(states.payoutStatus).description),
5763
4067
  getAlert(states.payoutStatus).buttonText && (index.h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.veriffLoading, onClick: () => callbacks.onVerifyClick() }, getAlert(states.payoutStatus).buttonText)))),
5764
- index.h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet$5.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
4068
+ index.h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet$4.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
5765
4069
  index.h("p", null, text.replaceTaxFormModalBodyText),
5766
- index.h("sl-button", { slot: "footer", type: "primary", class: sheet$5.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
5767
- index.h("sl-button", { slot: "footer", type: "default", class: sheet$5.classes.DialogButton, onClick: callbacks.onNewFormCancel }, text.cancelButton)),
4070
+ index.h("sl-button", { slot: "footer", type: "primary", class: sheet$4.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
4071
+ index.h("sl-button", { slot: "footer", type: "default", class: sheet$4.classes.DialogButton, onClick: callbacks.onNewFormCancel }, text.cancelButton)),
5768
4072
  states.status === "INACTIVE" && alertMap[states.status],
5769
4073
  index.h("div", null,
5770
4074
  index.h("h3", { style: { marginBottom: "0" } }, text.bankingInformationSectionHeader),
5771
- index.h("p", { class: sheet$5.classes.PageDescriptionText }, text.taxAndPayoutsDescription),
5772
- index.h("div", { class: sheet$5.classes.BankingInformationContainer },
4075
+ index.h("p", { class: sheet$4.classes.PageDescriptionText }, text.taxAndPayoutsDescription),
4076
+ index.h("div", { class: sheet$4.classes.BankingInformationContainer },
5773
4077
  slots.payoutDetailsCardSlot,
5774
- !states.loading && (index.h("p", { class: sheet$5.classes.DescriptionText }, text.payoutFromImpact)),
5775
- states.canEditPayoutInfo && (index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$5.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)))),
5776
- index.h("div", { class: sheet$5.classes.TaxDocumentsContainer },
5777
- index.h("div", null, states.loading ? (index.h("div", { class: sheet$5.classes.TaxSectionSkeletonContainer },
5778
- index.h("sl-skeleton", { class: sheet$5.classes.SkeletonOne }),
5779
- index.h("sl-skeleton", { class: sheet$5.classes.SkeletonTwo }))) : (index.h("div", null, states.noFormNeeded ? (index.h("div", null,
5780
- index.h("h3", { class: sheet$5.classes.TaxDocumentsSectionHeaderContainer }, text.taxDocumentSectionHeader),
5781
- index.h("p", { class: sheet$5.classes.TaxDocSubtext }, text.noFormNeededSubtext))) : (index.h("div", null,
5782
- index.h("span", { class: sheet$5.classes.TaxFormDetailsContainer },
5783
- index.h("div", { class: sheet$5.classes.StatusContainer },
4078
+ !states.loading && (index.h("p", { class: sheet$4.classes.DescriptionText }, text.payoutFromImpact)),
4079
+ states.canEditPayoutInfo && (index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)))),
4080
+ index.h("div", { class: sheet$4.classes.TaxDocumentsContainer },
4081
+ index.h("div", null, states.loading ? (index.h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
4082
+ index.h("sl-skeleton", { class: sheet$4.classes.SkeletonOne }),
4083
+ index.h("sl-skeleton", { class: sheet$4.classes.SkeletonTwo }))) : (index.h("div", null, states.noFormNeeded ? (index.h("div", null,
4084
+ index.h("h3", { class: sheet$4.classes.TaxDocumentsSectionHeaderContainer }, text.taxDocumentSectionHeader),
4085
+ index.h("p", { class: sheet$4.classes.TaxDocSubtext }, text.noFormNeededSubtext))) : (index.h("div", null,
4086
+ index.h("span", { class: sheet$4.classes.TaxFormDetailsContainer },
4087
+ index.h("div", { class: sheet$4.classes.StatusContainer },
5784
4088
  index.h("h3", null, global.intl.formatMessage({
5785
4089
  id: "section-subheader",
5786
4090
  defaultMessage: text.taxDocumentSectionSubHeader,
5787
4091
  }, {
5788
4092
  documentType: states.documentTypeString,
5789
4093
  })),
5790
- index.h("span", { class: sheet$5.classes.StatusAlert }, statusMap[states.status]))),
5791
- states.status !== "NOT_VERIFIED" && (index.h("sl-button", { disabled: states.disabled || states.loading, onClick: callbacks.onClick, type: "default", class: sheet$5.classes.NewFormButton, exportparts: "base: primarybutton-base" }, text.newFormButton)))))))),
5792
- index.h("div", { class: sheet$5.classes.IndirectTaxPreviewContainer }, states.loading ? (index.h("div", { class: sheet$5.classes.TaxSectionSkeletonContainer },
5793
- index.h("sl-skeleton", { class: sheet$5.classes.SkeletonOne }),
5794
- index.h("sl-skeleton", { class: sheet$5.classes.SkeletonTwo }))) : (index.h("div", null,
5795
- index.h("h3", { class: sheet$5.classes.IndirectTaxPreviewHeaderContainer },
4094
+ index.h("span", { class: sheet$4.classes.StatusAlert }, statusMap[states.status]))),
4095
+ states.status !== "NOT_VERIFIED" && (index.h("sl-button", { disabled: states.disabled || states.loading, onClick: callbacks.onClick, type: "default", class: sheet$4.classes.NewFormButton, exportparts: "base: primarybutton-base" }, text.newFormButton)))))))),
4096
+ index.h("div", { class: sheet$4.classes.IndirectTaxPreviewContainer }, states.loading ? (index.h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
4097
+ index.h("sl-skeleton", { class: sheet$4.classes.SkeletonOne }),
4098
+ index.h("sl-skeleton", { class: sheet$4.classes.SkeletonTwo }))) : (index.h("div", null,
4099
+ index.h("h3", { class: sheet$4.classes.IndirectTaxPreviewHeaderContainer },
5796
4100
  text.indirectTaxInfoSectionHeader,
5797
- index.h("sl-tooltip", { trigger: "hover", placement: "top", content: text.indirectTaxTooltipSupport, class: sheet$5.classes.TooltipContainer },
5798
- index.h("sl-icon", { name: "info-circle", class: sheet$5.classes.ToolTip }))),
5799
- index.h("div", { class: sheet$5.classes.IndirectTaxPreviewDetails },
5800
- index.h("span", null, states.notRegistered ? (index.h("span", { class: sheet$5.classes.NotRegisteredIndirectTaxText }, global.intl.formatMessage({
4101
+ index.h("sl-tooltip", { trigger: "hover", placement: "top", content: text.indirectTaxTooltipSupport, class: sheet$4.classes.TooltipContainer },
4102
+ index.h("sl-icon", { name: "info-circle", class: sheet$4.classes.ToolTip }))),
4103
+ index.h("div", { class: sheet$4.classes.IndirectTaxPreviewDetails },
4104
+ index.h("span", null, states.notRegistered ? (index.h("span", { class: sheet$4.classes.NotRegisteredIndirectTaxText }, global.intl.formatMessage({
5801
4105
  id: "notRegisteredForTax",
5802
4106
  defaultMessage: text.notRegisteredForTax,
5803
4107
  }, {
5804
4108
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
5805
4109
  }))) : (getIndirectTaxRegisteredIn())),
5806
- !states.notRegistered && (index.h("div", { class: sheet$5.classes.TaxNumberContainer },
4110
+ !states.notRegistered && (index.h("div", { class: sheet$4.classes.TaxNumberContainer },
5807
4111
  index.h("span", null, global.intl.formatMessage({
5808
4112
  id: `indirectTaxDetails`,
5809
4113
  defaultMessage: text.indirectTaxDetails,
@@ -5826,7 +4130,7 @@ const TaxAndCashDashboardView = (props) => {
5826
4130
  }, {
5827
4131
  subRegionTaxNumber: states.subRegionTaxNumber,
5828
4132
  })))),
5829
- !states.notRegistered && (index.h("div", { class: sheet$5.classes.InvoiceTableContainer },
4133
+ !states.notRegistered && (index.h("div", { class: sheet$4.classes.InvoiceTableContainer },
5830
4134
  index.h("sqm-invoice-table", { description: text.invoiceDescription, "prev-label": text.invoicePrevLabel, "more-label": text.invoiceMoreLabel, header: text.invoiceHeader, "empty-state-header": text.invoiceEmptyStateHeader, "empty-state-text": text.invoiceEmptyStateText },
5831
4135
  index.h("sqm-invoice-table-download-column", null),
5832
4136
  index.h("sqm-invoice-table-date-column", { "column-title": text.dateColumnTitle }),
@@ -5850,12 +4154,12 @@ function getSubRegionName(regionCode) {
5850
4154
  return "";
5851
4155
  // Impact adds an underscore to some regions
5852
4156
  const standardCode = regionCode.replace("_", "");
5853
- const regions = [...sqmInvoiceTableView.INDIRECT_TAX_PROVINCES, ...sqmInvoiceTableView.INDIRECT_TAX_SPAIN_REGIONS];
4157
+ const regions = [...IndirectTaxDetailsView.INDIRECT_TAX_PROVINCES, ...IndirectTaxDetailsView.INDIRECT_TAX_SPAIN_REGIONS];
5854
4158
  return (_a = regions.find((r) => r.regionCode === standardCode)) === null || _a === void 0 ? void 0 : _a.displayName;
5855
4159
  }
5856
4160
  function getIndirectTaxType(taxInformation) {
5857
4161
  var _a;
5858
- const regions = [...sqmInvoiceTableView.INDIRECT_TAX_PROVINCES, ...sqmInvoiceTableView.INDIRECT_TAX_SPAIN_REGIONS];
4162
+ const regions = [...IndirectTaxDetailsView.INDIRECT_TAX_PROVINCES, ...IndirectTaxDetailsView.INDIRECT_TAX_SPAIN_REGIONS];
5859
4163
  if (taxInformation === null || taxInformation === void 0 ? void 0 : taxInformation.indirectTaxRegion) {
5860
4164
  const standardRegion = taxInformation.indirectTaxRegion.replace("_", "");
5861
4165
  const taxType = (_a = regions.find((r) => r.regionCode === standardRegion)) === null || _a === void 0 ? void 0 : _a.taxType;
@@ -5866,14 +4170,14 @@ function getIndirectTaxType(taxInformation) {
5866
4170
  if (taxInformation === null || taxInformation === void 0 ? void 0 : taxInformation.withholdingTaxCountryCode)
5867
4171
  return "VAT";
5868
4172
  if (taxInformation === null || taxInformation === void 0 ? void 0 : taxInformation.indirectTaxCountryCode) {
5869
- return sqmInvoiceTableView.vatLabels[taxInformation.indirectTaxCountryCode] || "Indirect Tax";
4173
+ return IndirectTaxDetailsView.vatLabels[taxInformation.indirectTaxCountryCode] || "Indirect Tax";
5870
4174
  }
5871
4175
  return "Indirect Tax";
5872
4176
  }
5873
4177
  const useTaxAndCashDashboard = (props) => {
5874
4178
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
5875
- const setStep = index_module.En(TAX_CONTEXT_NAMESPACE);
5876
- const setContext = index_module.En(TAX_FORM_CONTEXT_NAMESPACE);
4179
+ const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
4180
+ const setContext = index_module.En(data.TAX_FORM_CONTEXT_NAMESPACE);
5877
4181
  const [showDialog, setShowDialog] = stencilHooks_module.useState(false);
5878
4182
  const { render, loading: veriffLoading, errors: veriffErrors, } = usePayoutStatus.useVeriffApp();
5879
4183
  const locale = index_module.L();
@@ -5881,8 +4185,8 @@ const useTaxAndCashDashboard = (props) => {
5881
4185
  // Clear override context once on submitted
5882
4186
  setContext({});
5883
4187
  }, []);
5884
- const { data, loading, errors: userError, refetch, } = index_module.$n(USER_QUERY_NAMESPACE);
5885
- const publisher = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
4188
+ const { data: data$1, loading, errors: userError, refetch, } = index_module.$n(data.USER_QUERY_NAMESPACE);
4189
+ const publisher = (_b = (_a = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
5886
4190
  const documentType = publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType;
5887
4191
  const submissionDate = (_c = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _c === void 0 ? void 0 : _c.dateCreated;
5888
4192
  const dateSubmitted = submissionDate
@@ -5905,8 +4209,8 @@ const useTaxAndCashDashboard = (props) => {
5905
4209
  });
5906
4210
  setStep("/3");
5907
4211
  };
5908
- const provinceName = (_d = sqmInvoiceTableView.INDIRECT_TAX_PROVINCES.find((p) => { var _a; return p.regionCode === ((_a = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _a === void 0 ? void 0 : _a.indirectTaxRegion); })) === null || _d === void 0 ? void 0 : _d.displayName;
5909
- const payoutStatus = data ? usePayoutStatus.getStatus(data) : null;
4212
+ const provinceName = (_d = IndirectTaxDetailsView.INDIRECT_TAX_PROVINCES.find((p) => { var _a; return p.regionCode === ((_a = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _a === void 0 ? void 0 : _a.indirectTaxRegion); })) === null || _d === void 0 ? void 0 : _d.displayName;
4213
+ const payoutStatus = data$1 ? usePayoutStatus.getStatus(data$1) : null;
5910
4214
  stencilHooks_module.useEffect(() => {
5911
4215
  const cb = () => refetch();
5912
4216
  window.addEventListener(usePayoutStatus.VERIFF_COMPLETE_EVENT_KEY, cb);
@@ -5919,7 +4223,7 @@ const useTaxAndCashDashboard = (props) => {
5919
4223
  dateSubmitted,
5920
4224
  documentType,
5921
4225
  canEditPayoutInfo: publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup,
5922
- documentTypeString: sqmInvoiceTableView.taxTypeToName(documentType),
4226
+ documentTypeString: utils$1.taxTypeToName(documentType),
5923
4227
  status: (_e = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _e === void 0 ? void 0 : _e.status,
5924
4228
  subRegion: getSubRegionName((_f = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _f === void 0 ? void 0 : _f.indirectTaxRegion),
5925
4229
  subRegionTaxNumber: (_g = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _g === void 0 ? void 0 : _g.withholdingTaxId,
@@ -6257,6 +4561,16 @@ const TaxAndCashDashboard = class {
6257
4561
  * @uiName Cancel button label
6258
4562
  */
6259
4563
  this.cancelButton = "Cancel";
4564
+ /**
4565
+ * @parentState { "parent": "sqm-tax-and-cash", "title": "Dashboard" }
4566
+ * @componentState { "title": "Default", "props": { } }
4567
+ * @componentState { "title": "Verification Required", "props": { "states": { "payoutStatus": "VERIFICATION:REQUIRED" } } }
4568
+ * @componentState { "title": "Internal Verification Required", "props": { "states": { "payoutStatus": "VERIFICATION:INTERNAL" } } }
4569
+ * @componentState { "title": "Review in progress", "props": { "states": { "payoutStatus": "VERIFICATION:REVIEW" } } }
4570
+ * @componentState { "title": "Verification failed", "props": { "states": { "payoutStatus": "VERIFICATION:FAILED" } } }
4571
+ * @componentState { "title": "Payout hold", "props": { "states": { "payoutStatus": "HOLD" } } }
4572
+ */
4573
+ this.stateController = "{}";
6260
4574
  stencilHooks_module.h$1(this);
6261
4575
  }
6262
4576
  disconnectedCallback() { }
@@ -6282,6 +4596,8 @@ const TaxAndCashDashboard = class {
6282
4596
  }
6283
4597
  };
6284
4598
  function useDemoTaxAndCashDashboard(props) {
4599
+ const states = parseStates.parseStates(props.stateController);
4600
+ console.log({ states });
6285
4601
  return cjs.cjs({
6286
4602
  states: {
6287
4603
  dateSubmitted: "today",
@@ -6289,16 +4605,23 @@ function useDemoTaxAndCashDashboard(props) {
6289
4605
  documentTypeString: "W9",
6290
4606
  status: "ACTIVE",
6291
4607
  country: "United States",
6292
- indirectTaxNumber: 55555555,
4608
+ indirectTaxNumber: "55555555",
6293
4609
  indirectTaxType: "Indirect Tax",
6294
4610
  noFormNeeded: true,
6295
4611
  disabled: false,
6296
4612
  loading: false,
6297
4613
  showNewFormDialog: false,
6298
4614
  hasHold: false,
6299
- showVerifyIdentity: false,
6300
4615
  payoutStatus: "DONE",
6301
4616
  veriffLoading: false,
4617
+ canEditPayoutInfo: true,
4618
+ subRegion: "CA",
4619
+ subRegionTaxNumber: undefined,
4620
+ qstNumber: undefined,
4621
+ isBusinessEntity: false,
4622
+ province: undefined,
4623
+ notRegistered: false,
4624
+ loadingError: false,
6302
4625
  },
6303
4626
  callbacks: {
6304
4627
  onClick: () => console.debug("check step"),
@@ -6308,7 +4631,7 @@ function useDemoTaxAndCashDashboard(props) {
6308
4631
  onVerifyClick: () => console.log("verify"),
6309
4632
  },
6310
4633
  text: props.getTextProps(),
6311
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
4634
+ }, props.demoData || states || {}, { arrayMerge: (_, a) => a });
6312
4635
  }
6313
4636
 
6314
4637
  const PHONE_EXTENSIONS = {
@@ -7282,7 +5605,7 @@ const PHONE_EXTENSIONS = {
7282
5605
  },
7283
5606
  };
7284
5607
 
7285
- const style$7 = {
5608
+ const style$6 = {
7286
5609
  FormWrapper: {},
7287
5610
  ErrorInput: {
7288
5611
  "&::part(base)": {
@@ -7380,9 +5703,9 @@ const style$7 = {
7380
5703
  },
7381
5704
  },
7382
5705
  };
7383
- const sheet$6 = JSS.createStyleSheet(style$7);
7384
- const styleString$6 = sheet$6.toString();
7385
- const vanillaStyle$4 = `
5706
+ const sheet$5 = JSS.createStyleSheet(style$6);
5707
+ const styleString$5 = sheet$5.toString();
5708
+ const vanillaStyle$3 = `
7386
5709
  :host{
7387
5710
  display: block;
7388
5711
  }
@@ -7409,8 +5732,8 @@ const vanillaStyle$4 = `
7409
5732
  `;
7410
5733
  const UserInfoFormView = (props) => {
7411
5734
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
7412
- const { states, states: { formState }, callbacks, text, refs, data, } = props;
7413
- const { classes } = sheet$6;
5735
+ const { states, states: { formState }, callbacks, text, refs, data: data$1, } = props;
5736
+ const { classes } = sheet$5;
7414
5737
  const bankingCollectionText = global.intl.formatMessage({
7415
5738
  id: "bankingCollectionText",
7416
5739
  defaultMessage: text.allowBankingCollection,
@@ -7418,7 +5741,7 @@ const UserInfoFormView = (props) => {
7418
5741
  termsAndConditionsLink: (index.h("a", { href: text.termsAndConditionsLink, target: "_blank" }, text.termsAndConditionsLabel)),
7419
5742
  });
7420
5743
  let regionLabel = undefined;
7421
- switch (data.regionLabelEnum) {
5744
+ switch (data$1.regionLabelEnum) {
7422
5745
  case "STATE":
7423
5746
  regionLabel = text.state;
7424
5747
  break;
@@ -7433,10 +5756,10 @@ const UserInfoFormView = (props) => {
7433
5756
  }
7434
5757
  return (index.h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
7435
5758
  index.h("style", { type: "text/css" },
7436
- styleString$6,
7437
- vanillaStyle$4),
5759
+ styleString$5,
5760
+ vanillaStyle$3),
7438
5761
  states.loadingError && (index.h("div", null,
7439
- index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$6.classes.AlertContainer },
5762
+ index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$5.classes.AlertContainer },
7440
5763
  index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
7441
5764
  index.h("strong", null, text.error.loadingErrorAlertHeader),
7442
5765
  index.h("br", null),
@@ -7447,16 +5770,16 @@ const UserInfoFormView = (props) => {
7447
5770
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
7448
5771
  })),
7449
5772
  index.h("br", null))),
7450
- states.loading ? (index.h(sqmInvoiceTableView.GeneralLoadingView, null)) : (index.h("div", null,
5773
+ states.loading ? (index.h(utils$1.LoadingView, null)) : (index.h("div", null,
7451
5774
  index.h("div", { class: classes.TextContainer },
7452
5775
  index.h("div", null,
7453
5776
  !states.hideSteps && (index.h("p", null, global.intl.formatMessage({
7454
5777
  id: "formStep",
7455
5778
  defaultMessage: text.formStep,
7456
- }, { step: states.step, count: FORM_STEPS }))),
5779
+ }, { step: states.step, count: data.FORM_STEPS }))),
7457
5780
  index.h("h3", null, text.personalInformation),
7458
5781
  index.h("p", { class: classes.PageDescriptionText }, text.taxAndPayoutsDescription))),
7459
- ((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$6.classes.AlertContainer },
5782
+ ((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$5.classes.AlertContainer },
7460
5783
  index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
7461
5784
  index.h("strong", null, text.error.generalTitle),
7462
5785
  index.h("br", null),
@@ -7466,7 +5789,7 @@ const UserInfoFormView = (props) => {
7466
5789
  }, {
7467
5790
  supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
7468
5791
  }))),
7469
- (states.isPartner || states.isUser) && (index.h("sl-alert", { type: "primary", open: true, class: sheet$6.classes.PartnerAlertContainer, exportparts: "base: alert-base, icon:alert-icon" },
5792
+ (states.isPartner || states.isUser) && (index.h("sl-alert", { type: "primary", open: true, class: sheet$5.classes.PartnerAlertContainer, exportparts: "base: alert-base, icon:alert-icon" },
7470
5793
  index.h("sl-icon", { slot: "icon", name: "info-circle" }),
7471
5794
  index.h("strong", null, text.isPartnerAlertHeader),
7472
5795
  index.h("br", null),
@@ -7480,18 +5803,18 @@ const UserInfoFormView = (props) => {
7480
5803
  index.h("div", { class: classes.InputContainer },
7481
5804
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled || states.isUser || states.isPartner }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
7482
5805
  class: classes.ErrorInput,
7483
- helpText: sqmInvoiceTableView.formatErrorMessage(text.firstName, formState.errors.firstName),
5806
+ helpText: utils$1.formatErrorMessage(text.firstName, formState.errors.firstName),
7484
5807
  }
7485
5808
  : {}), { id: "firstName", name: "/firstName", required: true })),
7486
5809
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled || states.isUser || states.isPartner }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
7487
5810
  class: classes.ErrorInput,
7488
- helpText: sqmInvoiceTableView.formatErrorMessage(text.lastName, formState.errors.lastName),
5811
+ helpText: utils$1.formatErrorMessage(text.lastName, formState.errors.lastName),
7489
5812
  }
7490
5813
  : {}), { id: "lastName", name: "/lastName", required: true })),
7491
5814
  index.h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
7492
5815
  index.h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || states.isPartner }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
7493
5816
  class: classes.ErrorInput,
7494
- helpText: sqmInvoiceTableView.formatErrorMessage(text.country, formState.errors.countryCode),
5817
+ helpText: utils$1.formatErrorMessage(text.country, formState.errors.countryCode),
7495
5818
  }
7496
5819
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("countryCode", e) }),
7497
5820
  index.h("sl-input", { class: classes.SearchInput, placeholder: text.searchForCountryText, onKeyDown: (e) => {
@@ -7499,8 +5822,8 @@ const UserInfoFormView = (props) => {
7499
5822
  e.stopPropagation();
7500
5823
  }, "onSl-input": (e) => {
7501
5824
  callbacks.setCountrySearch(e.target.value);
7502
- } }), (_e = data === null || data === void 0 ? void 0 : data.countries) === null || _e === void 0 ? void 0 :
7503
- _e.map((c) => (index.h("sl-menu-item", { value: c.countryCode }, c.displayName))), (_f = data === null || data === void 0 ? void 0 : data.allCountries) === null || _f === void 0 ? void 0 :
5825
+ } }), (_e = data$1 === null || data$1 === void 0 ? void 0 : data$1.countries) === null || _e === void 0 ? void 0 :
5826
+ _e.map((c) => (index.h("sl-menu-item", { value: c.countryCode }, c.displayName))), (_f = data$1 === null || data$1 === void 0 ? void 0 : data$1.allCountries) === null || _f === void 0 ? void 0 :
7504
5827
  _f.map((c) => (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName)))),
7505
5828
  index.h("div", { class: classes.PhoneInputsSection },
7506
5829
  index.h("p", null, text.phoneNumber),
@@ -7514,13 +5837,13 @@ const UserInfoFormView = (props) => {
7514
5837
  e.stopPropagation();
7515
5838
  }, "onSl-input": (e) => {
7516
5839
  callbacks.setPhoneCountrySearch(e.target.value);
7517
- } }), (_h = data === null || data === void 0 ? void 0 : data.phoneCountries) === null || _h === void 0 ? void 0 :
5840
+ } }), (_h = data$1 === null || data$1 === void 0 ? void 0 : data$1.phoneCountries) === null || _h === void 0 ? void 0 :
7518
5841
  _h.map((c) => {
7519
5842
  var _a, _b;
7520
5843
  return (index.h("sl-menu-item", { value: c.countryCode },
7521
5844
  index.h("div", { slot: "prefix" }, `${(_a = PHONE_EXTENSIONS[c.countryCode]) === null || _a === void 0 ? void 0 : _a.name} `), (_b = PHONE_EXTENSIONS[c.countryCode]) === null || _b === void 0 ? void 0 :
7522
5845
  _b.dial_code));
7523
- }), (_j = data === null || data === void 0 ? void 0 : data.allCountries) === null || _j === void 0 ? void 0 :
5846
+ }), (_j = data$1 === null || data$1 === void 0 ? void 0 : data$1.allCountries) === null || _j === void 0 ? void 0 :
7524
5847
  _j.map((c) => {
7525
5848
  var _a, _b;
7526
5849
  return (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } },
@@ -7529,42 +5852,42 @@ const UserInfoFormView = (props) => {
7529
5852
  })),
7530
5853
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: ({ value }) => {
7531
5854
  // Naive phone number validation
7532
- sqmInvoiceTableView.validateBillingField(/[a-zA-Z]+/, value) &&
7533
- sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
5855
+ utils$1.validateBillingField(/[a-zA-Z]+/, value) &&
5856
+ utils$1.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
7534
5857
  }, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
7535
5858
  class: classes.ErrorInput,
7536
- helpText: sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
5859
+ helpText: utils$1.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
7537
5860
  }
7538
5861
  : {}), { required: true })))),
7539
5862
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
7540
5863
  // Checks for non-ASCII characters
7541
- !sqmInvoiceTableView.validateBillingField(/^[\x20-\xFF]+$/, value) &&
7542
- sqmInvoiceTableView.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
5864
+ !utils$1.validateBillingField(/^[\x20-\xFF]+$/, value) &&
5865
+ utils$1.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
7543
5866
  class: classes.ErrorInput,
7544
- helpText: sqmInvoiceTableView.formatErrorMessage(text.address, formState.errors.address),
5867
+ helpText: utils$1.formatErrorMessage(text.address, formState.errors.address),
7545
5868
  }
7546
5869
  : {}), { required: true })),
7547
5870
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
7548
5871
  // Checks for non-ASCII characters
7549
- !sqmInvoiceTableView.validateBillingField(/^[\x20-\xFF]+$/, value) &&
7550
- sqmInvoiceTableView.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
5872
+ !utils$1.validateBillingField(/^[\x20-\xFF]+$/, value) &&
5873
+ utils$1.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
7551
5874
  class: classes.ErrorInput,
7552
- helpText: sqmInvoiceTableView.formatErrorMessage(text.city, formState.errors.city),
5875
+ helpText: utils$1.formatErrorMessage(text.city, formState.errors.city),
7553
5876
  }
7554
5877
  : {}), { required: true })),
7555
5878
  !states.hideState && (index.h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || states.isPartner }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
7556
5879
  class: classes.ErrorInput,
7557
- helpText: sqmInvoiceTableView.formatErrorMessage(text.state, formState.errors.state),
5880
+ helpText: utils$1.formatErrorMessage(text.state, formState.errors.state),
7558
5881
  }
7559
- : {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (index.h("sl-menu-item", { value: r.value }, r.label))))),
5882
+ : {}), { required: true }), (_p = data$1.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (index.h("sl-menu-item", { value: r.value }, r.label))))),
7560
5883
  index.h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || states.isPartner }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
7561
5884
  class: classes.ErrorInput,
7562
- helpText: sqmInvoiceTableView.formatErrorMessage(text.postalCode, formState.errors.postalCode),
5885
+ helpText: utils$1.formatErrorMessage(text.postalCode, formState.errors.postalCode),
7563
5886
  }
7564
5887
  : {}), { required: true })),
7565
5888
  index.h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || states.isPartner, helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
7566
5889
  class: classes.ErrorInput,
7567
- helpText: sqmInvoiceTableView.formatErrorMessage(text.currency, formState.errors.currency),
5890
+ helpText: utils$1.formatErrorMessage(text.currency, formState.errors.currency),
7568
5891
  }
7569
5892
  : {}), { required: true, ref: (el) => (refs.currencyRef.current = el) }),
7570
5893
  index.h("sl-input", { class: classes.SearchInput, placeholder: text.searchForCurrencyText, onKeyDown: (e) => {
@@ -7572,11 +5895,11 @@ const UserInfoFormView = (props) => {
7572
5895
  e.stopPropagation();
7573
5896
  }, "onSl-input": (e) => {
7574
5897
  callbacks.setCurrencySearch(e.target.value);
7575
- } }), (_s = data === null || data === void 0 ? void 0 : data.currencies) === null || _s === void 0 ? void 0 :
5898
+ } }), (_s = data$1 === null || data$1 === void 0 ? void 0 : data$1.currencies) === null || _s === void 0 ? void 0 :
7576
5899
  _s.map((c) => (index.h("sl-menu-item", { value: c.currencyCode },
7577
5900
  c.currencyCode,
7578
5901
  " - ",
7579
- c.displayName))), (_t = data === null || data === void 0 ? void 0 : data.allCurrencies) === null || _t === void 0 ? void 0 :
5902
+ c.displayName))), (_t = data$1 === null || data$1 === void 0 ? void 0 : data$1.allCurrencies) === null || _t === void 0 ? void 0 :
7580
5903
  _t.map((c) => (index.h("sl-menu-item", { value: c.currencyCode, style: { display: "none" } },
7581
5904
  c.currencyCode,
7582
5905
  " - ",
@@ -7585,7 +5908,7 @@ const UserInfoFormView = (props) => {
7585
5908
  index.h("sl-checkbox", { exportparts: "label: input-label, base: input-base", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
7586
5909
  e.target.value = e.target.checked;
7587
5910
  }, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
7588
- ((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (index.h("p", { class: classes.ErrorText }, sqmInvoiceTableView.formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
5911
+ ((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (index.h("p", { class: classes.ErrorText }, utils$1.formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
7589
5912
  index.h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
7590
5913
  };
7591
5914
 
@@ -7594,12 +5917,12 @@ function useUserInfoForm(props) {
7594
5917
  const currencyRef = stencilHooks_module.useRef(undefined);
7595
5918
  const phoneCountryRef = stencilHooks_module.useRef(undefined);
7596
5919
  const formRef = stencilHooks_module.useRef(null);
7597
- const context = index_module.Fn(TAX_FORM_CONTEXT_NAMESPACE);
7598
- const countries = index_module.Fn(SORTED_COUNTRIES_NAMESPACE);
7599
- const [step, setStep] = index_module.Pn(TAX_CONTEXT_NAMESPACE);
7600
- const [userFormContext, setUserFormContext] = index_module.Pn(USER_FORM_CONTEXT_NAMESPACE);
7601
- const { data, loading, errors: userError, } = index_module.$n(USER_QUERY_NAMESPACE);
7602
- const _currencies = index_module.Fn(CURRENCIES_NAMESPACE);
5920
+ const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
5921
+ const countries = index_module.Fn(data.SORTED_COUNTRIES_NAMESPACE);
5922
+ const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
5923
+ const [userFormContext, setUserFormContext] = index_module.Pn(data.USER_FORM_CONTEXT_NAMESPACE);
5924
+ const { data: data$1, loading, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
5925
+ const _currencies = index_module.Fn(data.CURRENCIES_NAMESPACE);
7603
5926
  const currencies = stencilHooks_module.useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
7604
5927
  const [countrySearch, setCountrySearch] = stencilHooks_module.useState("");
7605
5928
  const [phoneCountrySearch, setPhoneCountrySearch] = stencilHooks_module.useState("");
@@ -7610,11 +5933,11 @@ function useUserInfoForm(props) {
7610
5933
  const [formErrors, setErrors] = stencilHooks_module.useState({});
7611
5934
  stencilHooks_module.useEffect(() => {
7612
5935
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
7613
- const user = data === null || data === void 0 ? void 0 : data.user;
5936
+ const user = data$1 === null || data$1 === void 0 ? void 0 : data$1.user;
7614
5937
  if (!user || step !== "/1")
7615
5938
  return;
7616
5939
  // If form already filled out, skip initialising it
7617
- if (sqmInvoiceTableView.objectIsFull(userFormContext))
5940
+ if (utils$1.objectIsFull(userFormContext))
7618
5941
  return;
7619
5942
  // Prefer MI email if it was verified before this
7620
5943
  const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
@@ -7651,7 +5974,7 @@ function useUserInfoForm(props) {
7651
5974
  postalCode: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.postalCode,
7652
5975
  });
7653
5976
  }
7654
- }, [data, step, userFormContext]);
5977
+ }, [data$1, step, userFormContext]);
7655
5978
  const onFormChange = (field, e) => {
7656
5979
  var _a, _b;
7657
5980
  const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
@@ -7743,7 +6066,7 @@ function useUserInfoForm(props) {
7743
6066
  }
7744
6067
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
7745
6068
  const regionObj = hasStates
7746
- ? sqmInvoiceTableView.ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
6069
+ ? IndirectTaxDetailsView.ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
7747
6070
  : {};
7748
6071
  return {
7749
6072
  setStep: setStep,
@@ -7776,8 +6099,8 @@ function useUserInfoForm(props) {
7776
6099
  disabled: loading,
7777
6100
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
7778
6101
  loading: loading,
7779
- isPartner: !!((_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher),
7780
- isUser: !!((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.user),
6102
+ isPartner: !!((_b = (_a = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher),
6103
+ isUser: !!((_d = (_c = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.user),
7781
6104
  formState: {
7782
6105
  ...userFormContext,
7783
6106
  errors: formErrors,
@@ -7940,6 +6263,13 @@ const TaxForm = class {
7940
6263
  * @uiName Support link text
7941
6264
  */
7942
6265
  this.supportLink = "support team";
6266
+ /**
6267
+ * @uiName States
6268
+ * @parentState { "parent": "sqm-tax-and-cash", "title": "Step 1" }
6269
+ * @componentState { "title": "Errors", "props": { "states": { "loadingError": true, "formState": { "errors": { "email": true, "firstName": true, "lastName": true, "countryCode": true, "currency": true } } } } }
6270
+ * @componentState { "title": "Loading", "props": { "states": { "loading": true } } }
6271
+ */
6272
+ this.stateController = "{}";
7943
6273
  stencilHooks_module.h$1(this);
7944
6274
  }
7945
6275
  disconnectedCallback() { }
@@ -7960,19 +6290,20 @@ const TaxForm = class {
7960
6290
  }
7961
6291
  render() {
7962
6292
  const props = index_module.isDemo() ? useDemoUserInfoForm(this) : useUserInfoForm(this);
7963
- return (index.h(index.Host, null, index.h(UserInfoFormView, { data: props.data,
6293
+ return (index.h(UserInfoFormView, { data: props.data,
7964
6294
  // @ts-ignore
7965
6295
  states: props.states, callbacks: {
7966
6296
  ...props.callbacks,
7967
6297
  onSubmit: props.onSubmit,
7968
- }, text: props.text, refs: props.refs })));
6298
+ }, text: props.text, refs: props.refs }));
7969
6299
  }
7970
6300
  };
7971
6301
  function useDemoUserInfoForm(props) {
7972
- const setStep = index_module.En(TAX_CONTEXT_NAMESPACE);
6302
+ const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
6303
+ // @ts-ignore
7973
6304
  return cjs.cjs({
7974
6305
  setStep,
7975
- onSubmit: () => {
6306
+ onSubmit: async () => {
7976
6307
  setStep("/2");
7977
6308
  },
7978
6309
  onRadioClick: () => { },
@@ -8012,23 +6343,16 @@ function useDemoUserInfoForm(props) {
8012
6343
  },
8013
6344
  },
8014
6345
  },
8015
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
6346
+ }, props.demoData || parseStates.parseStates(props.stateController) || {}, { arrayMerge: (_, a) => a });
8016
6347
  }
8017
6348
 
8018
6349
  exports.sqm_banking_info_form = BankingInfoForm;
8019
- exports.sqm_code_verification = WidgetCodeVerification;
8020
6350
  exports.sqm_docusign_form = DocusignForm;
8021
6351
  exports.sqm_indirect_tax_form = IndirectTaxForm;
8022
6352
  exports.sqm_invoice_table = InvoiceTable;
8023
- exports.sqm_invoice_table_data_cell = InvoiceTableDataCell;
8024
6353
  exports.sqm_invoice_table_data_column = InvoiceTableDataColumn;
8025
- exports.sqm_invoice_table_date_cell = RewardTableDateCell;
8026
6354
  exports.sqm_invoice_table_date_column = InvoiceTableDateColumn;
8027
- exports.sqm_invoice_table_download_cell = InvoiceTableDownloadCell;
8028
6355
  exports.sqm_invoice_table_download_column = InvoiceTableGenericColumn;
8029
6356
  exports.sqm_payout_details_card = PayoutDetailsCard;
8030
- exports.sqm_table_cell = TableCell;
8031
- exports.sqm_table_row = TableRow;
8032
- exports.sqm_tax_and_cash = TaxAndCashMonolith;
8033
6357
  exports.sqm_tax_and_cash_dashboard = TaxAndCashDashboard;
8034
6358
  exports.sqm_user_info_form = TaxForm;