@saasquatch/mint-components 1.8.0-85 → 1.8.0-87

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 (34) hide show
  1. package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +80 -15
  2. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +1 -1
  3. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +7 -5
  4. package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
  5. package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +1 -1
  6. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +8 -7
  7. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +2 -3
  8. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +4 -4
  9. package/dist/collection/components/tax-and-cash/sqm-user-info-form/defaultTextCopy.js +1 -1
  10. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +5 -2
  11. package/dist/esm/sqm-banking-info-form_16.entry.js +82 -17
  12. package/dist/esm/sqm-portal-email-verification.entry.js +1 -1
  13. package/dist/esm/sqm-portal-verify-email.entry.js +9 -7
  14. package/dist/esm/sqm-stencilbook.entry.js +1 -1
  15. package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
  16. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  17. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  18. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  19. package/dist/mint-components/mint-components.esm.js +1 -1
  20. package/dist/mint-components/p-1d39c0bc.system.entry.js +1 -0
  21. package/dist/mint-components/{p-d78221ad.entry.js → p-222e9cea.entry.js} +1 -1
  22. package/dist/mint-components/p-3b9d17c6.system.entry.js +1 -0
  23. package/dist/mint-components/{p-107c3f3e.entry.js → p-7689bdec.entry.js} +1 -1
  24. package/dist/mint-components/p-7be753b7.entry.js +1 -0
  25. package/dist/mint-components/p-8019e18f.system.entry.js +1 -0
  26. package/dist/mint-components/{p-a94b22fe.entry.js → p-c42be42b.entry.js} +9 -9
  27. package/dist/mint-components/{p-930895ab.system.entry.js → p-c4771341.system.entry.js} +1 -1
  28. package/dist/mint-components/p-d5364cae.system.js +1 -1
  29. package/docs/docs.docx +0 -0
  30. package/package.json +1 -1
  31. package/dist/mint-components/p-38a4816a.system.entry.js +0 -1
  32. package/dist/mint-components/p-81ba36aa.entry.js +0 -1
  33. package/dist/mint-components/p-991f2dcf.system.entry.js +0 -1
  34. package/dist/mint-components/p-c3ddf902.system.entry.js +0 -1
@@ -4159,7 +4159,79 @@ function getCurrentStep(user) {
4159
4159
  function useTaxAndCash() {
4160
4160
  var _a, _b, _c, _d;
4161
4161
  const host = index_module.O();
4162
- // setupDemo();
4162
+ function setupDemo() {
4163
+ // coleton
4164
+ // const id =
4165
+ // "4c794ebe367f7021e3ce543542e27389d76394571b1bb8e7ebfbbd33ae4214d1";
4166
+ // const accountId =
4167
+ // "4c794ebe367f7021e3ce543542e27389d76394571b1bb8e7ebfbbd33ae4214d1";
4168
+ // andy3
4169
+ const id = "e061ee21b45eff8ada22845d441c6a2cd7190af1718a55452ad2d44b020915a7";
4170
+ const accountId = "e061ee21b45eff8ada22845d441c6a2cd7190af1718a55452ad2d44b020915a7";
4171
+ // // andy
4172
+ // const id = "12345";
4173
+ // const accountId = "12345";
4174
+ // andy2
4175
+ // const id =
4176
+ // "80d24e8d6133bdcf859844ca1fc7552c57d5d0661a7f46f791ea0785827a70ed";
4177
+ // const accountId =
4178
+ // "80d24e8d6133bdcf859844ca1fc7552c57d5d0661a7f46f791ea0785827a70ed";
4179
+ // sam
4180
+ // const id =
4181
+ // "3e0fab4f3e7c7cd3ee971b0c0e9a4ece4061349c837f24c71582330842fc8462";
4182
+ // const accountId =
4183
+ // "3e0fab4f3e7c7cd3ee971b0c0e9a4ece4061349c837f24c71582330842fc8462";
4184
+ const programId = "22514";
4185
+ // const programId = "22999";
4186
+ //@ts-ignore
4187
+ window.widgetIdent = {
4188
+ tenantAlias: "aprh0cfq6y8tk",
4189
+ // tenantAlias: "aswi7zpxl6rjp",
4190
+ appDomain: "https://staging.referralsaasquatch.com",
4191
+ programId,
4192
+ };
4193
+ // coleton
4194
+ // useEffect(() => {
4195
+ // setUserIdentity({
4196
+ // accountId,
4197
+ // id,
4198
+ // jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiNGM3OTRlYmUzNjdmNzAyMWUzY2U1NDM1NDJlMjczODlkNzYzOTQ1NzFiMWJiOGU3ZWJmYmJkMzNhZTQyMTRkMSIsImFjY291bnRJZCI6IjRjNzk0ZWJlMzY3ZjcwMjFlM2NlNTQzNTQyZTI3Mzg5ZDc2Mzk0NTcxYjFiYjhlN2ViZmJiZDMzYWU0MjE0ZDEiLCJlbWFpbCI6ImNvbGV0b24uYW5uZXR0K3c5bmV3QGltcGFjdC5jb20ifX0.CYQ2Z7QrE304gZsrPANxizOVm7TmC3gp3WJUmCl7TUQ",
4199
+ // });
4200
+ // }, []);
4201
+ // andy3
4202
+ stencilHooks_module.useEffect(() => {
4203
+ index_module.setUserIdentity({
4204
+ accountId,
4205
+ id,
4206
+ jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiZTA2MWVlMjFiNDVlZmY4YWRhMjI4NDVkNDQxYzZhMmNkNzE5MGFmMTcxOGE1NTQ1MmFkMmQ0NGIwMjA5MTVhNyIsImFjY291bnRJZCI6ImUwNjFlZTIxYjQ1ZWZmOGFkYTIyODQ1ZDQ0MWM2YTJjZDcxOTBhZjE3MThhNTU0NTJhZDJkNDRiMDIwOTE1YTciLCJlbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIn19.92Dtz49tnl8ZL9oDAkNeND8SX5OSFlt5Y7FXP92sGiA",
4207
+ });
4208
+ }, []);
4209
+ // andy
4210
+ // useEffect(() => {
4211
+ // setUserIdentity({
4212
+ // accountId,
4213
+ // id,
4214
+ // jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiMGExZTFmYTE3OGQ1MmRlZDAzZTg2YjZiZDAxYThhMDIwNDZkOGJlZjMzNjc2MzRlMTkyNzQ2ZTcxMTljNDFlMyIsImFjY291bnRJZCI6IjBhMWUxZmExNzhkNTJkZWQwM2U4NmI2YmQwMWE4YTAyMDQ2ZDhiZWYzMzY3NjM0ZTE5Mjc0NmU3MTE5YzQxZTMifX0.OO18YDc8LG3XeKJAug1oahqapmHY61RncrbRiK7Yer4",
4215
+ // });
4216
+ // }, []);
4217
+ // andy
4218
+ // useEffect(() => {
4219
+ // setUserIdentity({
4220
+ // accountId,
4221
+ // id,
4222
+ // jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSZkFUVEdOZXRqUDUwNzYxMDNERjVub0d0TDRnQ0hjYjEifQ.eyJ1c2VyIjp7ImlkIjoiODBkMjRlOGQ2MTMzYmRjZjg1OTg0NGNhMWZjNzU1MmM1N2Q1ZDA2NjFhN2Y0NmY3OTFlYTA3ODU4MjdhNzBlZCIsImFjY291bnRJZCI6IjgwZDI0ZThkNjEzM2JkY2Y4NTk4NDRjYTFmYzc1NTJjNTdkNWQwNjYxYTdmNDZmNzkxZWEwNzg1ODI3YTcwZWQifX0.8VWa3R_pSeRJeNw07AZPjCdTuTiwBYXOAc-ouVItuYs",
4223
+ // });
4224
+ // }, []);
4225
+ // sam
4226
+ // useEffect(() => {
4227
+ // setUserIdentity({
4228
+ // accountId,
4229
+ // id,
4230
+ // jwt: "eyJraWQiOiJJUk1Yc1l5NllZcXE0Njk0MzdtRzhFUlF0OFFvS0ZCYUcxIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJqdGkiOiI2NWVhNDMxOTQ3NGJjZTBkMGE4ZDkwZGYiLCJpYXQiOjE3MDk4NTE0MTcsImV4cCI6MTcwOTkzNzgxNywic3ViIjoiTTJVd1ptRmlOR1l6WlRkak4yTmtNMlZsT1RjeFlqQmpNR1U1WVRSbFkyVTBNRFl4TXpRNVl6Z3pOMll5TkdNM01UVTRNak16TURnME1tWmpPRFEyTWc9PTpNMlV3Wm1GaU5HWXpaVGRqTjJOa00yVmxPVGN4WWpCak1HVTVZVFJsWTJVME1EWXhNelE1WXpnek4yWXlOR00zTVRVNE1qTXpNRGcwTW1aak9EUTJNZz09QGFwcmgwY2ZxNnk4dGs6dXNlcnMiLCJ1c2VyIjp7ImlkIjoiM2UwZmFiNGYzZTdjN2NkM2VlOTcxYjBjMGU5YTRlY2U0MDYxMzQ5YzgzN2YyNGM3MTU4MjMzMDg0MmZjODQ2MiIsImFjY291bnRJZCI6IjNlMGZhYjRmM2U3YzdjZDNlZTk3MWIwYzBlOWE0ZWNlNDA2MTM0OWM4MzdmMjRjNzE1ODIzMzA4NDJmYzg0NjIiLCJkYXRlQmxvY2tlZCI6bnVsbH19.1pFVd0Z-46-k0bPXe2lnrX8A8YFIyJzKAcvlhV0lk7Q",
4231
+ // });
4232
+ // }, []);
4233
+ }
4234
+ setupDemo();
4163
4235
  /** END DEMO DATA */
4164
4236
  const user = index_module.H();
4165
4237
  // State for current step of form
@@ -5172,8 +5244,8 @@ const TaxAndCashMonolith = class {
5172
5244
  }
5173
5245
  render() {
5174
5246
  var _a, _b;
5175
- // const props = useTaxAndCash();
5176
- const props = index_module.isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
5247
+ const props = useTaxAndCash();
5248
+ // const props = isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
5177
5249
  // @ts-ignore
5178
5250
  if ((_a = this.demoData) === null || _a === void 0 ? void 0 : _a.showTextProps) {
5179
5251
  const textProps = utils.getProps(this);
@@ -5200,16 +5272,6 @@ const TaxAndCashMonolith = class {
5200
5272
  return index.h(sqmInvoiceTableView.LoadingView, null);
5201
5273
  }
5202
5274
  };
5203
- function useDemoTaxAndCash(props) {
5204
- const [step, setStep] = useParentState({
5205
- namespace: TAX_CONTEXT_NAMESPACE,
5206
- initialValue: "/1",
5207
- });
5208
- return cjs.cjs({
5209
- step,
5210
- setStep,
5211
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
5212
- }
5213
5275
 
5214
5276
  const style$5 = {
5215
5277
  WarningAlertContainer: {
@@ -6041,7 +6103,7 @@ const UserInfoFormView = (props) => {
6041
6103
  callbacks.setCountrySearch(e.target.value);
6042
6104
  } }), (_e = data === null || data === void 0 ? void 0 : data.countries) === null || _e === void 0 ? void 0 :
6043
6105
  _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 :
6044
- _f.map((c) => (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } })))),
6106
+ _f.map((c) => (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName)))),
6045
6107
  index.h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || states.isPartner, helpText: text.currencyHelpText }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.currency) ? {
6046
6108
  class: classes.ErrorInput,
6047
6109
  helpText: sqmInvoiceTableView.getIsRequiredErrorMessage(text.currency, text.error.fieldRequiredError),
@@ -6057,7 +6119,10 @@ const UserInfoFormView = (props) => {
6057
6119
  c.currencyCode,
6058
6120
  " - ",
6059
6121
  c.displayName))), (_j = data === null || data === void 0 ? void 0 : data.allCurrencies) === null || _j === void 0 ? void 0 :
6060
- _j.map((c) => (index.h("sl-menu-item", { value: c.currencyCode, style: { display: "none" } })))),
6122
+ _j.map((c) => (index.h("sl-menu-item", { value: c.currencyCode, style: { display: "none" } },
6123
+ c.currencyCode,
6124
+ " - ",
6125
+ c.displayName)))),
6061
6126
  index.h("div", { class: classes.CheckboxWrapper },
6062
6127
  index.h("sl-checkbox", { exportparts: "label: input-label", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
6063
6128
  e.target.value = e.target.checked;
@@ -37,7 +37,7 @@ function usePortalEmailVerification(props) {
37
37
  const result = await request(variables);
38
38
  if (result instanceof Error) {
39
39
  if (result.message)
40
- setError("Network request failed.");
40
+ setError(props.networkErrorMessage);
41
41
  return;
42
42
  }
43
43
  if ((_a = result.requestManagedIdentityVerificationEmail) === null || _a === void 0 ? void 0 : _a.success)
@@ -15,7 +15,8 @@ const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-1e6255e
15
15
  const SUBMITTED_CONTEXT = "sq:verify-submitted";
16
16
  function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyEmailText, verifyInvalidText, networkErrorMessage, continueText, }) {
17
17
  var _a, _b, _c, _d, _e, _f, _g, _h;
18
- const [submitted, setSubmitted] = stencilHooks_module.m(SUBMITTED_CONTEXT, false);
18
+ const submitted = window[SUBMITTED_CONTEXT];
19
+ const locale = index_module.N();
19
20
  const userIdent = index_module.H();
20
21
  const [request, { loading, data, errors }] = index_module.nn();
21
22
  const urlParams = new URLSearchParams(index_module.yn.location.search);
@@ -38,7 +39,7 @@ function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyE
38
39
  };
39
40
  const submit = async () => {
40
41
  var _a;
41
- setSubmitted(true);
42
+ window[SUBMITTED_CONTEXT] = true;
42
43
  console.log("submit", { submitted });
43
44
  if (oobCode) {
44
45
  const result = await request({ oobCode });
@@ -54,17 +55,18 @@ function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyE
54
55
  }
55
56
  };
56
57
  stencilHooks_module.useEffect(() => {
57
- console.log({ submitted });
58
+ console.log({ submitted, locale });
58
59
  // Already verified, begin redirect
59
60
  if (verified) {
60
61
  setTimeout(() => {
61
62
  gotoNextPage();
63
+ window[SUBMITTED_CONTEXT] = false;
62
64
  }, 3000);
63
65
  return;
64
66
  }
65
- if (userIdent && !data && !submitted)
67
+ if (userIdent && !data && !submitted && locale !== undefined)
66
68
  submit();
67
- }, [verified, submitted, data, userIdent, submitted]);
69
+ }, [verified, submitted, data, userIdent, submitted, locale]);
68
70
  return {
69
71
  states: {
70
72
  loading: loading || disableContinue,
@@ -13937,7 +13937,7 @@ const indirectDetailsSlotText = {
13937
13937
  isRegisteredSubRegionIncomeTax: "I am an individual registered for Income Tax purposes in Spain, and withholding tax will apply to any payments made to me.",
13938
13938
  qstNumber: "QST Number",
13939
13939
  subRegion: "Sub-region",
13940
- subRegionTaxNumberLabel: "Income Tax Number",
13940
+ subRegionTaxNumberLabel: "Income tax number",
13941
13941
  error: {
13942
13942
  indirectTaxNumber: "Indirect Tax is required",
13943
13943
  fieldRequiredError: "{fieldName} is required",
@@ -25,7 +25,7 @@ export function usePortalEmailVerification(props) {
25
25
  const result = await request(variables);
26
26
  if (result instanceof Error) {
27
27
  if (result.message)
28
- setError("Network request failed.");
28
+ setError(props.networkErrorMessage);
29
29
  return;
30
30
  }
31
31
  if ((_a = result.requestManagedIdentityVerificationEmail) === null || _a === void 0 ? void 0 : _a.success)
@@ -1,11 +1,11 @@
1
- import { navigation, useUserIdentity, useVerifyEmailMutation, } from "@saasquatch/component-boilerplate";
2
- import { useDomContextState } from "@saasquatch/stencil-hooks";
1
+ import { navigation, useLocale, useUserIdentity, useVerifyEmailMutation, } from "@saasquatch/component-boilerplate";
3
2
  import { useEffect } from "@saasquatch/universal-hooks";
4
3
  import { sanitizeUrlPath } from "../../utils/utils";
5
4
  const SUBMITTED_CONTEXT = "sq:verify-submitted";
6
5
  export function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyEmailText, verifyInvalidText, networkErrorMessage, continueText, }) {
7
6
  var _a, _b, _c, _d, _e, _f, _g, _h;
8
- const [submitted, setSubmitted] = useDomContextState(SUBMITTED_CONTEXT, false);
7
+ const submitted = window[SUBMITTED_CONTEXT];
8
+ const locale = useLocale();
9
9
  const userIdent = useUserIdentity();
10
10
  const [request, { loading, data, errors }] = useVerifyEmailMutation();
11
11
  const urlParams = new URLSearchParams(navigation.location.search);
@@ -28,7 +28,7 @@ export function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText,
28
28
  };
29
29
  const submit = async () => {
30
30
  var _a;
31
- setSubmitted(true);
31
+ window[SUBMITTED_CONTEXT] = true;
32
32
  console.log("submit", { submitted });
33
33
  if (oobCode) {
34
34
  const result = await request({ oobCode });
@@ -44,17 +44,18 @@ export function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText,
44
44
  }
45
45
  };
46
46
  useEffect(() => {
47
- console.log({ submitted });
47
+ console.log({ submitted, locale });
48
48
  // Already verified, begin redirect
49
49
  if (verified) {
50
50
  setTimeout(() => {
51
51
  gotoNextPage();
52
+ window[SUBMITTED_CONTEXT] = false;
52
53
  }, 3000);
53
54
  return;
54
55
  }
55
- if (userIdent && !data && !submitted)
56
+ if (userIdent && !data && !submitted && locale !== undefined)
56
57
  submit();
57
- }, [verified, submitted, data, userIdent, submitted]);
58
+ }, [verified, submitted, data, userIdent, submitted, locale]);
58
59
  return {
59
60
  states: {
60
61
  loading: loading || disableContinue,
@@ -7,7 +7,6 @@ import LoadingView from "./LoadingView";
7
7
  import { TAX_CONTEXT_NAMESPACE } from "./data";
8
8
  import { extractProps } from "./extractProps";
9
9
  import { useTaxAndCash } from "./useTaxAndCash";
10
- import { isDemo } from "@saasquatch/component-boilerplate";
11
10
  import { ErrorView } from "./ErrorView";
12
11
  /**
13
12
  * @uiName Tax and Cash
@@ -910,8 +909,8 @@ export class TaxAndCashMonolith {
910
909
  }
911
910
  render() {
912
911
  var _a, _b;
913
- // const props = useTaxAndCash();
914
- const props = isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
912
+ const props = useTaxAndCash();
913
+ // const props = isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
915
914
  // @ts-ignore
916
915
  if ((_a = this.demoData) === null || _a === void 0 ? void 0 : _a.showTextProps) {
917
916
  const textProps = getProps(this);
@@ -27,8 +27,8 @@ export function useTaxAndCash() {
27
27
  // const accountId =
28
28
  // "4c794ebe367f7021e3ce543542e27389d76394571b1bb8e7ebfbbd33ae4214d1";
29
29
  // andy3
30
- const id = "eaf8000b0073f6c916d85756c69bdc24fe1e94d1668a194724e5d929b0719f33";
31
- const accountId = "eaf8000b0073f6c916d85756c69bdc24fe1e94d1668a194724e5d929b0719f33";
30
+ const id = "e061ee21b45eff8ada22845d441c6a2cd7190af1718a55452ad2d44b020915a7";
31
+ const accountId = "e061ee21b45eff8ada22845d441c6a2cd7190af1718a55452ad2d44b020915a7";
32
32
  // // andy
33
33
  // const id = "12345";
34
34
  // const accountId = "12345";
@@ -64,7 +64,7 @@ export function useTaxAndCash() {
64
64
  setUserIdentity({
65
65
  accountId,
66
66
  id,
67
- jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiZWFmODAwMGIwMDczZjZjOTE2ZDg1NzU2YzY5YmRjMjRmZTFlOTRkMTY2OGExOTQ3MjRlNWQ5MjliMDcxOWYzMyIsImFjY291bnRJZCI6ImVhZjgwMDBiMDA3M2Y2YzkxNmQ4NTc1NmM2OWJkYzI0ZmUxZTk0ZDE2NjhhMTk0NzI0ZTVkOTI5YjA3MTlmMzMiLCJlbWFpbCI6ImFuZHkubHVvK3Rlc3RxYTIzQGltcGFjdC5jb20ifX0.1MRd0kLPLKNR6Y9dCqxaei5ySkpFwoHkqvckkiJsgaw",
67
+ jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiZTA2MWVlMjFiNDVlZmY4YWRhMjI4NDVkNDQxYzZhMmNkNzE5MGFmMTcxOGE1NTQ1MmFkMmQ0NGIwMjA5MTVhNyIsImFjY291bnRJZCI6ImUwNjFlZTIxYjQ1ZWZmOGFkYTIyODQ1ZDQ0MWM2YTJjZDcxOTBhZjE3MThhNTU0NTJhZDJkNDRiMDIwOTE1YTciLCJlbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIn19.92Dtz49tnl8ZL9oDAkNeND8SX5OSFlt5Y7FXP92sGiA",
68
68
  });
69
69
  }, []);
70
70
  // andy
@@ -92,7 +92,7 @@ export function useTaxAndCash() {
92
92
  // });
93
93
  // }, []);
94
94
  }
95
- // setupDemo();
95
+ setupDemo();
96
96
  /** END DEMO DATA */
97
97
  const user = useUserIdentity();
98
98
  // State for current step of form
@@ -10,7 +10,7 @@ export const indirectDetailsSlotText = {
10
10
  isRegisteredSubRegionIncomeTax: "I am an individual registered for Income Tax purposes in Spain, and withholding tax will apply to any payments made to me.",
11
11
  qstNumber: "QST Number",
12
12
  subRegion: "Sub-region",
13
- subRegionTaxNumberLabel: "Income Tax Number",
13
+ subRegionTaxNumberLabel: "Income tax number",
14
14
  error: {
15
15
  indirectTaxNumber: "Indirect Tax is required",
16
16
  fieldRequiredError: "{fieldName} is required",
@@ -167,7 +167,7 @@ export const UserInfoFormView = (props) => {
167
167
  callbacks.setCountrySearch(e.target.value);
168
168
  } }), (_e = data === null || data === void 0 ? void 0 : data.countries) === null || _e === void 0 ? void 0 :
169
169
  _e.map((c) => (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 :
170
- _f.map((c) => (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } })))),
170
+ _f.map((c) => (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName)))),
171
171
  h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || states.isPartner, helpText: text.currencyHelpText }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.currency) ? {
172
172
  class: classes.ErrorInput,
173
173
  helpText: getIsRequiredErrorMessage(text.currency, text.error.fieldRequiredError),
@@ -183,7 +183,10 @@ export const UserInfoFormView = (props) => {
183
183
  c.currencyCode,
184
184
  " - ",
185
185
  c.displayName))), (_j = data === null || data === void 0 ? void 0 : data.allCurrencies) === null || _j === void 0 ? void 0 :
186
- _j.map((c) => (h("sl-menu-item", { value: c.currencyCode, style: { display: "none" } })))),
186
+ _j.map((c) => (h("sl-menu-item", { value: c.currencyCode, style: { display: "none" } },
187
+ c.currencyCode,
188
+ " - ",
189
+ c.displayName)))),
187
190
  h("div", { class: classes.CheckboxWrapper },
188
191
  h("sl-checkbox", { exportparts: "label: input-label", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
189
192
  e.target.value = e.target.checked;
@@ -1,7 +1,7 @@
1
1
  import { h, r as registerInstance, c as Host, g as getElement } from './index-f16aa635.js';
2
- import { c as createCommonjsModule, a as commonjsGlobal, y, n as d, f as useEffect, k as useRef, j as useState, m as h$1, b as browser, i as useReducer, u as useMemo } from './stencil-hooks.module-aa42e74f.js';
2
+ import { c as createCommonjsModule, a as commonjsGlobal, n as d, y, f as useEffect, k as useRef, j as useState, m as h$1, b as browser, i as useReducer, u as useMemo } from './stencil-hooks.module-aa42e74f.js';
3
3
  import { i as intl } from './global-2d34c7d9.js';
4
- import { d as dist, O, g as gn, N, H, M as Me, i as isDemo, j as useCallback, b as bn } from './index.module-a46df001.js';
4
+ import { d as dist, O, g as gn, N, H, M as Me, i as isDemo, j as useCallback, b as bn, e as setUserIdentity } from './index.module-a46df001.js';
5
5
  import { j as jsonpointer } from './jsonpointer-388a7082.js';
6
6
  import { c as cjs } from './cjs-bdfb4486.js';
7
7
  import './mixins-f60a614c.js';
@@ -4155,7 +4155,79 @@ function getCurrentStep(user) {
4155
4155
  function useTaxAndCash() {
4156
4156
  var _a, _b, _c, _d;
4157
4157
  const host = O();
4158
- // setupDemo();
4158
+ function setupDemo() {
4159
+ // coleton
4160
+ // const id =
4161
+ // "4c794ebe367f7021e3ce543542e27389d76394571b1bb8e7ebfbbd33ae4214d1";
4162
+ // const accountId =
4163
+ // "4c794ebe367f7021e3ce543542e27389d76394571b1bb8e7ebfbbd33ae4214d1";
4164
+ // andy3
4165
+ const id = "e061ee21b45eff8ada22845d441c6a2cd7190af1718a55452ad2d44b020915a7";
4166
+ const accountId = "e061ee21b45eff8ada22845d441c6a2cd7190af1718a55452ad2d44b020915a7";
4167
+ // // andy
4168
+ // const id = "12345";
4169
+ // const accountId = "12345";
4170
+ // andy2
4171
+ // const id =
4172
+ // "80d24e8d6133bdcf859844ca1fc7552c57d5d0661a7f46f791ea0785827a70ed";
4173
+ // const accountId =
4174
+ // "80d24e8d6133bdcf859844ca1fc7552c57d5d0661a7f46f791ea0785827a70ed";
4175
+ // sam
4176
+ // const id =
4177
+ // "3e0fab4f3e7c7cd3ee971b0c0e9a4ece4061349c837f24c71582330842fc8462";
4178
+ // const accountId =
4179
+ // "3e0fab4f3e7c7cd3ee971b0c0e9a4ece4061349c837f24c71582330842fc8462";
4180
+ const programId = "22514";
4181
+ // const programId = "22999";
4182
+ //@ts-ignore
4183
+ window.widgetIdent = {
4184
+ tenantAlias: "aprh0cfq6y8tk",
4185
+ // tenantAlias: "aswi7zpxl6rjp",
4186
+ appDomain: "https://staging.referralsaasquatch.com",
4187
+ programId,
4188
+ };
4189
+ // coleton
4190
+ // useEffect(() => {
4191
+ // setUserIdentity({
4192
+ // accountId,
4193
+ // id,
4194
+ // jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiNGM3OTRlYmUzNjdmNzAyMWUzY2U1NDM1NDJlMjczODlkNzYzOTQ1NzFiMWJiOGU3ZWJmYmJkMzNhZTQyMTRkMSIsImFjY291bnRJZCI6IjRjNzk0ZWJlMzY3ZjcwMjFlM2NlNTQzNTQyZTI3Mzg5ZDc2Mzk0NTcxYjFiYjhlN2ViZmJiZDMzYWU0MjE0ZDEiLCJlbWFpbCI6ImNvbGV0b24uYW5uZXR0K3c5bmV3QGltcGFjdC5jb20ifX0.CYQ2Z7QrE304gZsrPANxizOVm7TmC3gp3WJUmCl7TUQ",
4195
+ // });
4196
+ // }, []);
4197
+ // andy3
4198
+ useEffect(() => {
4199
+ setUserIdentity({
4200
+ accountId,
4201
+ id,
4202
+ jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiZTA2MWVlMjFiNDVlZmY4YWRhMjI4NDVkNDQxYzZhMmNkNzE5MGFmMTcxOGE1NTQ1MmFkMmQ0NGIwMjA5MTVhNyIsImFjY291bnRJZCI6ImUwNjFlZTIxYjQ1ZWZmOGFkYTIyODQ1ZDQ0MWM2YTJjZDcxOTBhZjE3MThhNTU0NTJhZDJkNDRiMDIwOTE1YTciLCJlbWFpbCI6InRlc3R1c2VyQGV4YW1wbGUuY29tIn19.92Dtz49tnl8ZL9oDAkNeND8SX5OSFlt5Y7FXP92sGiA",
4203
+ });
4204
+ }, []);
4205
+ // andy
4206
+ // useEffect(() => {
4207
+ // setUserIdentity({
4208
+ // accountId,
4209
+ // id,
4210
+ // jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiMGExZTFmYTE3OGQ1MmRlZDAzZTg2YjZiZDAxYThhMDIwNDZkOGJlZjMzNjc2MzRlMTkyNzQ2ZTcxMTljNDFlMyIsImFjY291bnRJZCI6IjBhMWUxZmExNzhkNTJkZWQwM2U4NmI2YmQwMWE4YTAyMDQ2ZDhiZWYzMzY3NjM0ZTE5Mjc0NmU3MTE5YzQxZTMifX0.OO18YDc8LG3XeKJAug1oahqapmHY61RncrbRiK7Yer4",
4211
+ // });
4212
+ // }, []);
4213
+ // andy
4214
+ // useEffect(() => {
4215
+ // setUserIdentity({
4216
+ // accountId,
4217
+ // id,
4218
+ // jwt: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSZkFUVEdOZXRqUDUwNzYxMDNERjVub0d0TDRnQ0hjYjEifQ.eyJ1c2VyIjp7ImlkIjoiODBkMjRlOGQ2MTMzYmRjZjg1OTg0NGNhMWZjNzU1MmM1N2Q1ZDA2NjFhN2Y0NmY3OTFlYTA3ODU4MjdhNzBlZCIsImFjY291bnRJZCI6IjgwZDI0ZThkNjEzM2JkY2Y4NTk4NDRjYTFmYzc1NTJjNTdkNWQwNjYxYTdmNDZmNzkxZWEwNzg1ODI3YTcwZWQifX0.8VWa3R_pSeRJeNw07AZPjCdTuTiwBYXOAc-ouVItuYs",
4219
+ // });
4220
+ // }, []);
4221
+ // sam
4222
+ // useEffect(() => {
4223
+ // setUserIdentity({
4224
+ // accountId,
4225
+ // id,
4226
+ // jwt: "eyJraWQiOiJJUk1Yc1l5NllZcXE0Njk0MzdtRzhFUlF0OFFvS0ZCYUcxIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJqdGkiOiI2NWVhNDMxOTQ3NGJjZTBkMGE4ZDkwZGYiLCJpYXQiOjE3MDk4NTE0MTcsImV4cCI6MTcwOTkzNzgxNywic3ViIjoiTTJVd1ptRmlOR1l6WlRkak4yTmtNMlZsT1RjeFlqQmpNR1U1WVRSbFkyVTBNRFl4TXpRNVl6Z3pOMll5TkdNM01UVTRNak16TURnME1tWmpPRFEyTWc9PTpNMlV3Wm1GaU5HWXpaVGRqTjJOa00yVmxPVGN4WWpCak1HVTVZVFJsWTJVME1EWXhNelE1WXpnek4yWXlOR00zTVRVNE1qTXpNRGcwTW1aak9EUTJNZz09QGFwcmgwY2ZxNnk4dGs6dXNlcnMiLCJ1c2VyIjp7ImlkIjoiM2UwZmFiNGYzZTdjN2NkM2VlOTcxYjBjMGU5YTRlY2U0MDYxMzQ5YzgzN2YyNGM3MTU4MjMzMDg0MmZjODQ2MiIsImFjY291bnRJZCI6IjNlMGZhYjRmM2U3YzdjZDNlZTk3MWIwYzBlOWE0ZWNlNDA2MTM0OWM4MzdmMjRjNzE1ODIzMzA4NDJmYzg0NjIiLCJkYXRlQmxvY2tlZCI6bnVsbH19.1pFVd0Z-46-k0bPXe2lnrX8A8YFIyJzKAcvlhV0lk7Q",
4227
+ // });
4228
+ // }, []);
4229
+ }
4230
+ setupDemo();
4159
4231
  /** END DEMO DATA */
4160
4232
  const user = H();
4161
4233
  // State for current step of form
@@ -5168,8 +5240,8 @@ const TaxAndCashMonolith = class {
5168
5240
  }
5169
5241
  render() {
5170
5242
  var _a, _b;
5171
- // const props = useTaxAndCash();
5172
- const props = isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
5243
+ const props = useTaxAndCash();
5244
+ // const props = isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
5173
5245
  // @ts-ignore
5174
5246
  if ((_a = this.demoData) === null || _a === void 0 ? void 0 : _a.showTextProps) {
5175
5247
  const textProps = getProps(this);
@@ -5196,16 +5268,6 @@ const TaxAndCashMonolith = class {
5196
5268
  return h(LoadingView, null);
5197
5269
  }
5198
5270
  };
5199
- function useDemoTaxAndCash(props) {
5200
- const [step, setStep] = useParentState({
5201
- namespace: TAX_CONTEXT_NAMESPACE,
5202
- initialValue: "/1",
5203
- });
5204
- return cjs({
5205
- step,
5206
- setStep,
5207
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
5208
- }
5209
5271
 
5210
5272
  const style$5 = {
5211
5273
  WarningAlertContainer: {
@@ -6037,7 +6099,7 @@ const UserInfoFormView = (props) => {
6037
6099
  callbacks.setCountrySearch(e.target.value);
6038
6100
  } }), (_e = data === null || data === void 0 ? void 0 : data.countries) === null || _e === void 0 ? void 0 :
6039
6101
  _e.map((c) => (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 :
6040
- _f.map((c) => (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } })))),
6102
+ _f.map((c) => (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName)))),
6041
6103
  h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || states.isPartner, helpText: text.currencyHelpText }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.currency) ? {
6042
6104
  class: classes.ErrorInput,
6043
6105
  helpText: getIsRequiredErrorMessage(text.currency, text.error.fieldRequiredError),
@@ -6053,7 +6115,10 @@ const UserInfoFormView = (props) => {
6053
6115
  c.currencyCode,
6054
6116
  " - ",
6055
6117
  c.displayName))), (_j = data === null || data === void 0 ? void 0 : data.allCurrencies) === null || _j === void 0 ? void 0 :
6056
- _j.map((c) => (h("sl-menu-item", { value: c.currencyCode, style: { display: "none" } })))),
6118
+ _j.map((c) => (h("sl-menu-item", { value: c.currencyCode, style: { display: "none" } },
6119
+ c.currencyCode,
6120
+ " - ",
6121
+ c.displayName)))),
6057
6122
  h("div", { class: classes.CheckboxWrapper },
6058
6123
  h("sl-checkbox", { exportparts: "label: input-label", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
6059
6124
  e.target.value = e.target.checked;
@@ -33,7 +33,7 @@ function usePortalEmailVerification(props) {
33
33
  const result = await request(variables);
34
34
  if (result instanceof Error) {
35
35
  if (result.message)
36
- setError("Network request failed.");
36
+ setError(props.networkErrorMessage);
37
37
  return;
38
38
  }
39
39
  if ((_a = result.requestManagedIdentityVerificationEmail) === null || _a === void 0 ? void 0 : _a.success)
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h as h$1 } from './index-f16aa635.js';
2
- import { o as m, f as useEffect, m as h } from './stencil-hooks.module-aa42e74f.js';
3
- import { H, n as nn, y as yn, i as isDemo } from './index.module-a46df001.js';
2
+ import { f as useEffect, m as h } from './stencil-hooks.module-aa42e74f.js';
3
+ import { N, H, n as nn, y as yn, i as isDemo } from './index.module-a46df001.js';
4
4
  import { c as cjs } from './cjs-bdfb4486.js';
5
5
  import './mixins-f60a614c.js';
6
6
  import './JSS-67b5cff8.js';
@@ -11,7 +11,8 @@ import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-fb687
11
11
  const SUBMITTED_CONTEXT = "sq:verify-submitted";
12
12
  function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyEmailText, verifyInvalidText, networkErrorMessage, continueText, }) {
13
13
  var _a, _b, _c, _d, _e, _f, _g, _h;
14
- const [submitted, setSubmitted] = m(SUBMITTED_CONTEXT, false);
14
+ const submitted = window[SUBMITTED_CONTEXT];
15
+ const locale = N();
15
16
  const userIdent = H();
16
17
  const [request, { loading, data, errors }] = nn();
17
18
  const urlParams = new URLSearchParams(yn.location.search);
@@ -34,7 +35,7 @@ function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyE
34
35
  };
35
36
  const submit = async () => {
36
37
  var _a;
37
- setSubmitted(true);
38
+ window[SUBMITTED_CONTEXT] = true;
38
39
  console.log("submit", { submitted });
39
40
  if (oobCode) {
40
41
  const result = await request({ oobCode });
@@ -50,17 +51,18 @@ function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyE
50
51
  }
51
52
  };
52
53
  useEffect(() => {
53
- console.log({ submitted });
54
+ console.log({ submitted, locale });
54
55
  // Already verified, begin redirect
55
56
  if (verified) {
56
57
  setTimeout(() => {
57
58
  gotoNextPage();
59
+ window[SUBMITTED_CONTEXT] = false;
58
60
  }, 3000);
59
61
  return;
60
62
  }
61
- if (userIdent && !data && !submitted)
63
+ if (userIdent && !data && !submitted && locale !== undefined)
62
64
  submit();
63
- }, [verified, submitted, data, userIdent, submitted]);
65
+ }, [verified, submitted, data, userIdent, submitted, locale]);
64
66
  return {
65
67
  states: {
66
68
  loading: loading || disableContinue,
@@ -13933,7 +13933,7 @@ const indirectDetailsSlotText = {
13933
13933
  isRegisteredSubRegionIncomeTax: "I am an individual registered for Income Tax purposes in Spain, and withholding tax will apply to any payments made to me.",
13934
13934
  qstNumber: "QST Number",
13935
13935
  subRegion: "Sub-region",
13936
- subRegionTaxNumberLabel: "Income Tax Number",
13936
+ subRegionTaxNumberLabel: "Income tax number",
13937
13937
  error: {
13938
13938
  indirectTaxNumber: "Indirect Tax is required",
13939
13939
  fieldRequiredError: "{fieldName} is required",