@saasquatch/mint-components 1.15.0-41 → 1.15.0-43

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 (60) hide show
  1. package/dist/cjs/{extractProps-fd93ba62.js → extractProps-e9c55ba8.js} +14 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +17 -29
  5. package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -7
  6. package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +5 -6
  7. package/dist/cjs/sqm-widget-verification.cjs.entry.js +2 -3
  8. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +1 -31
  9. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +1 -1
  10. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +3 -3
  11. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +15 -59
  12. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -39
  13. package/dist/esm/{extractProps-ae1afbb3.js → extractProps-54064fb0.js} +14 -1
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/mint-components.js +1 -1
  16. package/dist/esm/sqm-banking-info-form_10.entry.js +17 -29
  17. package/dist/esm/sqm-code-verification.entry.js +1 -7
  18. package/dist/esm/sqm-tax-and-cash.entry.js +4 -5
  19. package/dist/esm/sqm-widget-verification.entry.js +1 -2
  20. package/dist/esm-es5/extractProps-54064fb0.js +1 -0
  21. package/dist/esm-es5/loader.js +1 -1
  22. package/dist/esm-es5/mint-components.js +1 -1
  23. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  24. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  25. package/dist/esm-es5/sqm-tax-and-cash.entry.js +1 -1
  26. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  27. package/dist/mint-components/mint-components.esm.js +1 -1
  28. package/dist/mint-components/p-0797a946.js +1 -0
  29. package/dist/mint-components/{p-7b731acd.entry.js → p-0f76b2dd.entry.js} +7 -7
  30. package/dist/mint-components/{p-6ef506ba.entry.js → p-32d60c34.entry.js} +2 -2
  31. package/dist/mint-components/p-5eebc8b4.system.entry.js +1 -0
  32. package/dist/mint-components/p-637c0357.system.entry.js +1 -0
  33. package/dist/mint-components/p-8568a6ef.entry.js +1 -0
  34. package/dist/mint-components/p-a8cc450b.system.entry.js +1 -0
  35. package/dist/mint-components/p-c8a7e3ba.system.entry.js +1 -0
  36. package/dist/mint-components/p-c9745c8f.system.js +1 -1
  37. package/dist/mint-components/p-e55aafe9.system.js +1 -0
  38. package/dist/mint-components/p-ee6ec12d.entry.js +11 -0
  39. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +0 -5
  40. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +0 -10
  41. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +0 -7
  42. package/dist/types/components.d.ts +0 -44
  43. package/docs/docs.docx +0 -0
  44. package/docs/raisins.json +1 -1
  45. package/grapesjs/grapesjs.js +1 -1
  46. package/package.json +1 -1
  47. package/dist/cjs/parseStates-d1effc19.js +0 -16
  48. package/dist/esm/parseStates-ed75e224.js +0 -14
  49. package/dist/esm-es5/extractProps-ae1afbb3.js +0 -1
  50. package/dist/esm-es5/parseStates-ed75e224.js +0 -1
  51. package/dist/mint-components/p-115dfc03.system.js +0 -1
  52. package/dist/mint-components/p-13f3a647.js +0 -1
  53. package/dist/mint-components/p-26468242.js +0 -1
  54. package/dist/mint-components/p-2cfe9826.system.entry.js +0 -1
  55. package/dist/mint-components/p-4841c5e9.system.entry.js +0 -1
  56. package/dist/mint-components/p-5510be1e.system.entry.js +0 -1
  57. package/dist/mint-components/p-70fddbdd.entry.js +0 -11
  58. package/dist/mint-components/p-780b981b.entry.js +0 -1
  59. package/dist/mint-components/p-a8645c1b.system.js +0 -1
  60. package/dist/mint-components/p-fda43e22.system.entry.js +0 -1
@@ -2,7 +2,6 @@ import { isDemo, useSetParent } from "@saasquatch/component-boilerplate";
2
2
  import { useState, withHooks } from "@saasquatch/stencil-hooks";
3
3
  import { Component, h, Prop } from "@stencil/core";
4
4
  import deepmerge from "deepmerge";
5
- import { parseStates } from "../../../utils/parseStates";
6
5
  import { getProps } from "../../../utils/utils";
7
6
  import { VERIFICATION_PARENT_NAMESPACE } from "../keys";
8
7
  import { WidgetCodeVerificationView, } from "./sqm-code-verification-view";
@@ -46,11 +45,6 @@ export class WidgetCodeVerification {
46
45
  * @uiName Network error message
47
46
  */
48
47
  this.networkErrorMessage = "An error occurred while verifying your email. Please refresh the page and try again.";
49
- /**
50
- * @componentState { "title": "Verification Failed", "props": { "states": { "verifyFailed": true } } }
51
- * @componentState { "title": "Loading", "props": { "states": { "loading": true } } }
52
- */
53
- this.stateController = "{}";
54
48
  withHooks(this);
55
49
  }
56
50
  disconnectedCallback() { }
@@ -234,30 +228,6 @@ export class WidgetCodeVerification {
234
228
  "reflect": false,
235
229
  "defaultValue": "\"An error occurred while verifying your email. Please refresh the page and try again.\""
236
230
  },
237
- "stateController": {
238
- "type": "string",
239
- "mutable": false,
240
- "complexType": {
241
- "original": "string",
242
- "resolved": "string",
243
- "references": {}
244
- },
245
- "required": false,
246
- "optional": false,
247
- "docs": {
248
- "tags": [{
249
- "text": "{ \"title\": \"Verification Failed\", \"props\": { \"states\": { \"verifyFailed\": true } } }",
250
- "name": "componentState"
251
- }, {
252
- "text": "{ \"title\": \"Loading\", \"props\": { \"states\": { \"loading\": true } } }",
253
- "name": "componentState"
254
- }],
255
- "text": ""
256
- },
257
- "attribute": "state-controller",
258
- "reflect": false,
259
- "defaultValue": "\"{}\""
260
- },
261
231
  "demoData": {
262
232
  "type": "unknown",
263
233
  "mutable": false,
@@ -327,5 +297,5 @@ function useDemoWidgetCodeVerification(props) {
327
297
  submitCode: async () => setVerifiedContext(true),
328
298
  },
329
299
  text: props.getTextProps(),
330
- }, props.demoData || parseStates(props.stateController) || {}, { arrayMerge: (_, a) => a });
300
+ }, props.demoData || {}, { arrayMerge: (_, a) => a });
331
301
  }
@@ -913,7 +913,7 @@ export class IndirectTaxForm {
913
913
  }
914
914
  function useDemoIndirectTaxForm(props) {
915
915
  const setStep = useSetParent(TAX_CONTEXT_NAMESPACE);
916
- const [option, setOption] = useState(null);
916
+ const [option, setOption] = useState("otherRegion");
917
917
  const [demoFormState, setDemoFormState] = useState({});
918
918
  return deepmerge({
919
919
  states: {
@@ -1032,11 +1032,11 @@ export class TaxAndCashMonolith {
1032
1032
  case "/1":
1033
1033
  return (h("sqm-user-info-form", Object.assign({}, this.getGeneralStepTextProps("step1_"), extractProps(props, "sqm-user-info-form_"))));
1034
1034
  case "/2":
1035
- return (h("sqm-indirect-tax-form", Object.assign({}, this.getGeneralStepTextProps("step2_"))));
1035
+ return (h("sqm-indirect-tax-form", Object.assign({}, this.getGeneralStepTextProps("step2_"), extractProps(props, "sqm-indirect-tax-form_"))));
1036
1036
  case "/3":
1037
- return (h("sqm-docusign-form", Object.assign({}, this.getGeneralStepTextProps("step3_"))));
1037
+ return (h("sqm-docusign-form", Object.assign({}, this.getGeneralStepTextProps("step3_"), extractProps(props, "sqm-docusign-form_"))));
1038
1038
  case "/4":
1039
- return (h("sqm-banking-info-form", Object.assign({}, this.getGeneralStepTextProps("step4_"))));
1039
+ return (h("sqm-banking-info-form", Object.assign({}, this.getGeneralStepTextProps("step4_"), extractProps(props, "sqm-banking-info-form_"))));
1040
1040
  case "/dashboard":
1041
1041
  return (h("sqm-tax-and-cash-dashboard", Object.assign({}, this.getGeneralStepTextProps("dashboard_"), extractProps(props, "sqm-tax-and-cash-dashboard_"))));
1042
1042
  case "/error":
@@ -2,7 +2,6 @@ import { isDemo } from "@saasquatch/component-boilerplate";
2
2
  import { withHooks } from "@saasquatch/stencil-hooks";
3
3
  import { Component, h, Host, Prop } from "@stencil/core";
4
4
  import deepmerge from "deepmerge";
5
- import { parseStates } from "../../../utils/parseStates";
6
5
  import { getProps } from "../../../utils/utils";
7
6
  import { TaxAndCashDashboardView } from "./sqm-tax-and-cash-dashboard-view";
8
7
  import { useTaxAndCashDashboard, } from "./useTaxAndCashDashboard";
@@ -315,16 +314,6 @@ export class TaxAndCashDashboard {
315
314
  * @uiName Cancel button label
316
315
  */
317
316
  this.cancelButton = "Cancel";
318
- /**
319
- * @parentState { "parent": "sqm-tax-and-cash", "title": "Dashboard" }
320
- * @componentState { "title": "Default", "props": { } }
321
- * @componentState { "title": "Verification Required", "props": { "states": { "payoutStatus": "VERIFICATION:REQUIRED" } } }
322
- * @componentState { "title": "Internal Verification Required", "props": { "states": { "payoutStatus": "VERIFICATION:INTERNAL" } } }
323
- * @componentState { "title": "Review in progress", "props": { "states": { "payoutStatus": "VERIFICATION:REVIEW" } } }
324
- * @componentState { "title": "Verification failed", "props": { "states": { "payoutStatus": "VERIFICATION:FAILED" } } }
325
- * @componentState { "title": "Payout hold", "props": { "states": { "payoutStatus": "HOLD" } } }
326
- */
327
- this.stateController = "{}";
328
317
  withHooks(this);
329
318
  }
330
319
  disconnectedCallback() { }
@@ -1702,45 +1691,6 @@ export class TaxAndCashDashboard {
1702
1691
  "reflect": false,
1703
1692
  "defaultValue": "\"Cancel\""
1704
1693
  },
1705
- "stateController": {
1706
- "type": "string",
1707
- "mutable": false,
1708
- "complexType": {
1709
- "original": "string",
1710
- "resolved": "string",
1711
- "references": {}
1712
- },
1713
- "required": false,
1714
- "optional": true,
1715
- "docs": {
1716
- "tags": [{
1717
- "text": "{ \"parent\": \"sqm-tax-and-cash\", \"title\": \"Dashboard\" }",
1718
- "name": "parentState"
1719
- }, {
1720
- "text": "{ \"title\": \"Default\", \"props\": { } }",
1721
- "name": "componentState"
1722
- }, {
1723
- "text": "{ \"title\": \"Verification Required\", \"props\": { \"states\": { \"payoutStatus\": \"VERIFICATION:REQUIRED\" } } }",
1724
- "name": "componentState"
1725
- }, {
1726
- "text": "{ \"title\": \"Internal Verification Required\", \"props\": { \"states\": { \"payoutStatus\": \"VERIFICATION:INTERNAL\" } } }",
1727
- "name": "componentState"
1728
- }, {
1729
- "text": "{ \"title\": \"Review in progress\", \"props\": { \"states\": { \"payoutStatus\": \"VERIFICATION:REVIEW\" } } }",
1730
- "name": "componentState"
1731
- }, {
1732
- "text": "{ \"title\": \"Verification failed\", \"props\": { \"states\": { \"payoutStatus\": \"VERIFICATION:FAILED\" } } }",
1733
- "name": "componentState"
1734
- }, {
1735
- "text": "{ \"title\": \"Payout hold\", \"props\": { \"states\": { \"payoutStatus\": \"HOLD\" } } }",
1736
- "name": "componentState"
1737
- }],
1738
- "text": ""
1739
- },
1740
- "attribute": "state-controller",
1741
- "reflect": false,
1742
- "defaultValue": "\"{}\""
1743
- },
1744
1694
  "demoData": {
1745
1695
  "type": "unknown",
1746
1696
  "mutable": false,
@@ -1774,32 +1724,31 @@ export class TaxAndCashDashboard {
1774
1724
  }; }
1775
1725
  }
1776
1726
  function useDemoTaxAndCashDashboard(props) {
1777
- const states = parseStates(props.stateController);
1778
- console.log({ states });
1727
+ // const states = parseStates(props.stateController);
1779
1728
  return deepmerge({
1780
1729
  states: {
1781
1730
  dateSubmitted: "today",
1782
1731
  documentType: "W9",
1783
1732
  documentTypeString: "W9",
1784
- status: "ACTIVE",
1785
1733
  country: "United States",
1786
1734
  indirectTaxNumber: "55555555",
1787
1735
  indirectTaxType: "Indirect Tax",
1788
- noFormNeeded: true,
1736
+ noFormNeeded: false,
1789
1737
  disabled: false,
1790
1738
  loading: false,
1791
1739
  showNewFormDialog: false,
1792
1740
  hasHold: false,
1793
- payoutStatus: "DONE",
1794
- veriffLoading: false,
1795
- canEditPayoutInfo: true,
1796
1741
  subRegion: "CA",
1797
1742
  subRegionTaxNumber: undefined,
1798
1743
  qstNumber: undefined,
1799
1744
  isBusinessEntity: false,
1800
1745
  province: undefined,
1801
- notRegistered: false,
1746
+ notRegistered: true,
1802
1747
  loadingError: false,
1748
+ payoutStatus: "DONE",
1749
+ veriffLoading: false,
1750
+ canEditPayoutInfo: true,
1751
+ status: "ACTIVE",
1803
1752
  },
1804
1753
  callbacks: {
1805
1754
  onClick: () => console.debug("check step"),
@@ -1809,5 +1758,12 @@ function useDemoTaxAndCashDashboard(props) {
1809
1758
  onVerifyClick: () => console.log("verify"),
1810
1759
  },
1811
1760
  text: props.getTextProps(),
1812
- }, props.demoData || states || {}, { arrayMerge: (_, a) => a });
1761
+ slots: {
1762
+ payoutDetailsCardSlot: (h("sqm-payout-details-card", { demoData: {
1763
+ states: {
1764
+ badgeStatus: "nextPayout",
1765
+ },
1766
+ } })),
1767
+ },
1768
+ }, props.demoData || {}, { arrayMerge: (_, a) => a });
1813
1769
  }
@@ -2,7 +2,6 @@ import { isDemo, useSetParent } from "@saasquatch/component-boilerplate";
2
2
  import { withHooks } from "@saasquatch/stencil-hooks";
3
3
  import { Component, h, Prop, State } from "@stencil/core";
4
4
  import deepmerge from "deepmerge";
5
- import { parseStates } from "../../../utils/parseStates";
6
5
  import { getProps } from "../../../utils/utils";
7
6
  import { TAX_CONTEXT_NAMESPACE } from "../data";
8
7
  import { UserInfoFormView } from "./sqm-user-info-form-view";
@@ -164,13 +163,6 @@ export class TaxForm {
164
163
  * @uiName Support link text
165
164
  */
166
165
  this.supportLink = "support team";
167
- /**
168
- * @uiName States
169
- * @parentState { "parent": "sqm-tax-and-cash", "title": "Step 1" }
170
- * @componentState { "title": "Errors", "props": { "states": { "loadingError": true, "formState": { "errors": { "email": true, "firstName": true, "lastName": true, "countryCode": true, "currency": true } } } } }
171
- * @componentState { "title": "Loading", "props": { "states": { "loading": true } } }
172
- */
173
- this.stateController = "{}";
174
166
  withHooks(this);
175
167
  }
176
168
  disconnectedCallback() { }
@@ -894,36 +886,6 @@ export class TaxForm {
894
886
  "reflect": false,
895
887
  "defaultValue": "\"support team\""
896
888
  },
897
- "stateController": {
898
- "type": "string",
899
- "mutable": false,
900
- "complexType": {
901
- "original": "string",
902
- "resolved": "string",
903
- "references": {}
904
- },
905
- "required": false,
906
- "optional": false,
907
- "docs": {
908
- "tags": [{
909
- "text": "States",
910
- "name": "uiName"
911
- }, {
912
- "text": "{ \"parent\": \"sqm-tax-and-cash\", \"title\": \"Step 1\" }",
913
- "name": "parentState"
914
- }, {
915
- "text": "{ \"title\": \"Errors\", \"props\": { \"states\": { \"loadingError\": true, \"formState\": { \"errors\": { \"email\": true, \"firstName\": true, \"lastName\": true, \"countryCode\": true, \"currency\": true } } } } }",
916
- "name": "componentState"
917
- }, {
918
- "text": "{ \"title\": \"Loading\", \"props\": { \"states\": { \"loading\": true } } }",
919
- "name": "componentState"
920
- }],
921
- "text": ""
922
- },
923
- "attribute": "state-controller",
924
- "reflect": false,
925
- "defaultValue": "\"{}\""
926
- },
927
889
  "demoData": {
928
890
  "type": "unknown",
929
891
  "mutable": false,
@@ -1004,5 +966,5 @@ function useDemoUserInfoForm(props) {
1004
966
  },
1005
967
  },
1006
968
  },
1007
- }, props.demoData || parseStates(props.stateController) || {}, { arrayMerge: (_, a) => a });
969
+ }, props.demoData || {}, { arrayMerge: (_, a) => a });
1008
970
  }
@@ -1,3 +1,16 @@
1
+ function parseStates(states) {
2
+ if (typeof states === "string") {
3
+ try {
4
+ return JSON.parse(states);
5
+ }
6
+ catch (e) {
7
+ return undefined;
8
+ }
9
+ }
10
+ if (typeof states === "object")
11
+ return states;
12
+ }
13
+
1
14
  /**
2
15
  * Util function for getting just the props with a certain prefix.
3
16
  * @param props Text props on stencil component
@@ -16,4 +29,4 @@ function extractProps(props, prefix) {
16
29
  return formattedProps;
17
30
  }
18
31
 
19
- export { extractProps as e };
32
+ export { extractProps as e, parseStates as p };