@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
@@ -1,10 +1,11 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { intl } from "../../../global/global";
3
3
  import { createStyleSheet } from "../../../styling/JSS";
4
- import { GeneralLoadingView } from "../TaxForm.stories";
5
- import { FORM_STEPS } from "../sqm-tax-and-cash/data";
6
- import { formatErrorMessage, validateBillingField } from "../utils";
4
+ // import { GeneralLoadingView } from "../TaxForm.stories";
5
+ import { FORM_STEPS } from "../data";
7
6
  import { PHONE_EXTENSIONS } from "../phoneExtensions";
7
+ import LoadingView from "../sqm-tax-and-cash/LoadingView";
8
+ import { formatErrorMessage, validateBillingField } from "../utils";
8
9
  const style = {
9
10
  FormWrapper: {},
10
11
  ErrorInput: {
@@ -170,7 +171,7 @@ export const UserInfoFormView = (props) => {
170
171
  supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
171
172
  })),
172
173
  h("br", null))),
173
- states.loading ? (h(GeneralLoadingView, null)) : (h("div", null,
174
+ states.loading ? (h(LoadingView, null)) : (h("div", null,
174
175
  h("div", { class: classes.TextContainer },
175
176
  h("div", null,
176
177
  !states.hideSteps && (h("p", null, intl.formatMessage({
@@ -1,9 +1,10 @@
1
1
  import { isDemo, useSetParent } from "@saasquatch/component-boilerplate";
2
2
  import { withHooks } from "@saasquatch/stencil-hooks";
3
- import { Component, Host, Prop, State, h } from "@stencil/core";
3
+ import { Component, h, Prop, State } from "@stencil/core";
4
4
  import deepmerge from "deepmerge";
5
+ import { parseStates } from "../../../utils/parseStates";
5
6
  import { getProps } from "../../../utils/utils";
6
- import { TAX_CONTEXT_NAMESPACE } from "../sqm-tax-and-cash/data";
7
+ import { TAX_CONTEXT_NAMESPACE } from "../data";
7
8
  import { UserInfoFormView } from "./sqm-user-info-form-view";
8
9
  import { useUserInfoForm } from "./useUserInfoForm";
9
10
  /**
@@ -163,6 +164,13 @@ export class TaxForm {
163
164
  * @uiName Support link text
164
165
  */
165
166
  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 = "{}";
166
174
  withHooks(this);
167
175
  }
168
176
  disconnectedCallback() { }
@@ -183,13 +191,12 @@ export class TaxForm {
183
191
  }
184
192
  render() {
185
193
  const props = isDemo() ? useDemoUserInfoForm(this) : useUserInfoForm(this);
186
- return (h(Host, null,
187
- h(UserInfoFormView, { data: props.data,
188
- // @ts-ignore
189
- states: props.states, callbacks: {
190
- ...props.callbacks,
191
- onSubmit: props.onSubmit,
192
- }, text: props.text, refs: props.refs })));
194
+ return (h(UserInfoFormView, { data: props.data,
195
+ // @ts-ignore
196
+ states: props.states, callbacks: {
197
+ ...props.callbacks,
198
+ onSubmit: props.onSubmit,
199
+ }, text: props.text, refs: props.refs }));
193
200
  }
194
201
  static get is() { return "sqm-user-info-form"; }
195
202
  static get encapsulation() { return "shadow"; }
@@ -887,6 +894,36 @@ export class TaxForm {
887
894
  "reflect": false,
888
895
  "defaultValue": "\"support team\""
889
896
  },
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
+ },
890
927
  "demoData": {
891
928
  "type": "unknown",
892
929
  "mutable": false,
@@ -924,9 +961,10 @@ export class TaxForm {
924
961
  }
925
962
  function useDemoUserInfoForm(props) {
926
963
  const setStep = useSetParent(TAX_CONTEXT_NAMESPACE);
964
+ // @ts-ignore
927
965
  return deepmerge({
928
966
  setStep,
929
- onSubmit: () => {
967
+ onSubmit: async () => {
930
968
  setStep("/2");
931
969
  },
932
970
  onRadioClick: () => { },
@@ -966,5 +1004,5 @@ function useDemoUserInfoForm(props) {
966
1004
  },
967
1005
  },
968
1006
  },
969
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
1007
+ }, props.demoData || parseStates(props.stateController) || {}, { arrayMerge: (_, a) => a });
970
1008
  }
@@ -1,9 +1,9 @@
1
+ import { useParent, useParentQueryValue, useParentValue, } from "@saasquatch/component-boilerplate";
1
2
  import { useEffect, useMemo, useRef, useState, } from "@saasquatch/universal-hooks";
2
3
  import jsonpointer from "jsonpointer";
3
- import { CURRENCIES_NAMESPACE, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../sqm-tax-and-cash/data";
4
- import { objectIsFull } from "../utils";
5
- import { useParent, useParentQueryValue, useParentValue, } from "@saasquatch/component-boilerplate";
4
+ import { CURRENCIES_NAMESPACE, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../data";
6
5
  import { ADDRESS_REGIONS } from "../subregions";
6
+ import { objectIsFull } from "../utils";
7
7
  export function useUserInfoForm(props) {
8
8
  var _a, _b, _c, _d;
9
9
  const currencyRef = useRef(undefined);
@@ -0,0 +1,12 @@
1
+ export 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
+ }