@saasquatch/mint-components 1.8.4-0 → 1.8.4-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3728,29 +3728,7 @@ function getCurrentStep(user) {
3728
3728
  function useTaxAndCash() {
3729
3729
  var _a, _b, _c, _d, _e;
3730
3730
  const host = index_module._();
3731
- /*************************/
3732
- // TODO: REMOVE THIS
3733
- function DEMO_SETUP() {
3734
- const idAndAccountId = "bbaba67b2db8e113b0c7e3f0ec379a29f392b1e8d9d25771c9273dd2b66174ea";
3735
- const jwt = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiYmJhYmE2N2IyZGI4ZTExM2IwYzdlM2YwZWMzNzlhMjlmMzkyYjFlOGQ5ZDI1NzcxYzkyNzNkZDJiNjYxNzRlYSIsImFjY291bnRJZCI6ImJiYWJhNjdiMmRiOGUxMTNiMGM3ZTNmMGVjMzc5YTI5ZjM5MmIxZThkOWQyNTc3MWM5MjczZGQyYjY2MTc0ZWEiLCJlbWFpbCI6ImNvbGV0b24uYW5uZXR0K2Zhc3Rmb2xsb3dAaW1wYWN0LmNvbSJ9fQ.rMiVOFx5whc-fTT1T4p0CcM1R5TkeL2DC1eGgF2jidc";
3736
- const programId = "24474";
3737
- const tenantAlias = "aprh0cfq6y8tk";
3738
- const appDomain = "https://staging.referralsaasquatch.com";
3739
- // @ts-ignore
3740
- window.widgetIdent = {
3741
- tenantAlias,
3742
- appDomain,
3743
- programId,
3744
- };
3745
- stencilHooks_module.useEffect(() => {
3746
- index_module.setUserIdentity({
3747
- accountId: idAndAccountId,
3748
- id: idAndAccountId,
3749
- jwt,
3750
- });
3751
- }, []);
3752
- }
3753
- DEMO_SETUP();
3731
+ // DEMO_SETUP();
3754
3732
  /********************/
3755
3733
  const user = index_module.Q();
3756
3734
  const locale = index_module.L();
@@ -4754,8 +4732,8 @@ const TaxAndCashMonolith = class {
4754
4732
  render() {
4755
4733
  var _a, _b;
4756
4734
  // TODO: REMOVE THIS
4757
- const props = useTaxAndCash();
4758
- // const props = isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
4735
+ // const props = useTaxAndCash();
4736
+ const props = index_module.isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
4759
4737
  // @ts-ignore
4760
4738
  if ((_a = this.demoData) === null || _a === void 0 ? void 0 : _a.showTextProps) {
4761
4739
  const textProps = utils.getProps(this);
@@ -4782,6 +4760,16 @@ const TaxAndCashMonolith = class {
4782
4760
  return index.h(sqmInvoiceTableView.LoadingView, null);
4783
4761
  }
4784
4762
  };
4763
+ function useDemoTaxAndCash(props) {
4764
+ const [step, setStep] = index_module.Cn({
4765
+ namespace: TAX_CONTEXT_NAMESPACE,
4766
+ initialValue: "/1",
4767
+ });
4768
+ return cjs.cjs({
4769
+ step,
4770
+ setStep,
4771
+ }, props.demoData || {}, { arrayMerge: (_, a) => a });
4772
+ }
4785
4773
 
4786
4774
  const style$5 = {
4787
4775
  WarningAlertContainer: {
@@ -6,7 +6,7 @@ import LoadingView from "./LoadingView";
6
6
  import { TAX_CONTEXT_NAMESPACE } from "./data";
7
7
  import { extractProps } from "./extractProps";
8
8
  import { useTaxAndCash } from "./useTaxAndCash";
9
- import { useParentState } from "@saasquatch/component-boilerplate";
9
+ import { isDemo, useParentState } from "@saasquatch/component-boilerplate";
10
10
  import { ErrorView } from "./ErrorView";
11
11
  /**
12
12
  * @uiName Tax and Cash
@@ -873,8 +873,8 @@ export class TaxAndCashMonolith {
873
873
  render() {
874
874
  var _a, _b;
875
875
  // TODO: REMOVE THIS
876
- const props = useTaxAndCash();
877
- // const props = isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
876
+ // const props = useTaxAndCash();
877
+ const props = isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
878
878
  // @ts-ignore
879
879
  if ((_a = this.demoData) === null || _a === void 0 ? void 0 : _a.showTextProps) {
880
880
  const textProps = getProps(this);
@@ -41,7 +41,7 @@ export function useTaxAndCash() {
41
41
  });
42
42
  }, []);
43
43
  }
44
- DEMO_SETUP();
44
+ // DEMO_SETUP();
45
45
  /********************/
46
46
  const user = useUserIdentity();
47
47
  const locale = useLocale();
@@ -1,4 +1,4 @@
1
- import { u as useMemo, d as c, s, c as createCommonjsModule, a as commonjsGlobal, e as getDefaultExportFromCjs, f as useEffect, h, i as d, j as useReducer, y, k as useState, m as useRef } from './stencil-hooks.module-8032b139.js';
1
+ import { u as useMemo, d as c, s, c as createCommonjsModule, a as commonjsGlobal, e as getDefaultExportFromCjs, f as useEffect, h, y, i as d, j as useReducer, k as useState, m as useRef } from './stencil-hooks.module-8032b139.js';
2
2
 
3
3
  const useCallback = (fn, inputs) => useMemo(() => fn, inputs);
4
4
 
@@ -1,7 +1,7 @@
1
1
  import { h, r as registerInstance, c as Host, g as getElement } from './index-17b4da69.js';
2
2
  import { m as useRef, k as useState, f as useEffect, n as h$1, u as useMemo, b as browser, j as useReducer } from './stencil-hooks.module-8032b139.js';
3
3
  import { i as intl } from './global-35b8d91c.js';
4
- import { d as dist, L, Q, t as bn, I as In, M as Mn, f as $e, i as isDemo, w as wn, u as useCallback, k as kn, v as Pn, _, C as Cn, F as Fn, b as setUserIdentity } from './index.module-6242dccd.js';
4
+ import { d as dist, L, Q, t as bn, I as In, M as Mn, f as $e, i as isDemo, w as wn, u as useCallback, k as kn, v as Pn, _, C as Cn, F as Fn } from './index.module-6242dccd.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';
@@ -3724,29 +3724,7 @@ function getCurrentStep(user) {
3724
3724
  function useTaxAndCash() {
3725
3725
  var _a, _b, _c, _d, _e;
3726
3726
  const host = _();
3727
- /*************************/
3728
- // TODO: REMOVE THIS
3729
- function DEMO_SETUP() {
3730
- const idAndAccountId = "bbaba67b2db8e113b0c7e3f0ec379a29f392b1e8d9d25771c9273dd2b66174ea";
3731
- const jwt = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoiYmJhYmE2N2IyZGI4ZTExM2IwYzdlM2YwZWMzNzlhMjlmMzkyYjFlOGQ5ZDI1NzcxYzkyNzNkZDJiNjYxNzRlYSIsImFjY291bnRJZCI6ImJiYWJhNjdiMmRiOGUxMTNiMGM3ZTNmMGVjMzc5YTI5ZjM5MmIxZThkOWQyNTc3MWM5MjczZGQyYjY2MTc0ZWEiLCJlbWFpbCI6ImNvbGV0b24uYW5uZXR0K2Zhc3Rmb2xsb3dAaW1wYWN0LmNvbSJ9fQ.rMiVOFx5whc-fTT1T4p0CcM1R5TkeL2DC1eGgF2jidc";
3732
- const programId = "24474";
3733
- const tenantAlias = "aprh0cfq6y8tk";
3734
- const appDomain = "https://staging.referralsaasquatch.com";
3735
- // @ts-ignore
3736
- window.widgetIdent = {
3737
- tenantAlias,
3738
- appDomain,
3739
- programId,
3740
- };
3741
- useEffect(() => {
3742
- setUserIdentity({
3743
- accountId: idAndAccountId,
3744
- id: idAndAccountId,
3745
- jwt,
3746
- });
3747
- }, []);
3748
- }
3749
- DEMO_SETUP();
3727
+ // DEMO_SETUP();
3750
3728
  /********************/
3751
3729
  const user = Q();
3752
3730
  const locale = L();
@@ -4750,8 +4728,8 @@ const TaxAndCashMonolith = class {
4750
4728
  render() {
4751
4729
  var _a, _b;
4752
4730
  // TODO: REMOVE THIS
4753
- const props = useTaxAndCash();
4754
- // const props = isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
4731
+ // const props = useTaxAndCash();
4732
+ const props = isDemo() ? useDemoTaxAndCash(this) : useTaxAndCash();
4755
4733
  // @ts-ignore
4756
4734
  if ((_a = this.demoData) === null || _a === void 0 ? void 0 : _a.showTextProps) {
4757
4735
  const textProps = getProps(this);
@@ -4778,6 +4756,16 @@ const TaxAndCashMonolith = class {
4778
4756
  return h(LoadingView, null);
4779
4757
  }
4780
4758
  };
4759
+ function useDemoTaxAndCash(props) {
4760
+ const [step, setStep] = Cn({
4761
+ namespace: TAX_CONTEXT_NAMESPACE,
4762
+ initialValue: "/1",
4763
+ });
4764
+ return cjs({
4765
+ step,
4766
+ setStep,
4767
+ }, props.demoData || {}, { arrayMerge: (_, a) => a });
4768
+ }
4781
4769
 
4782
4770
  const style$5 = {
4783
4771
  WarningAlertContainer: {