@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.
- package/dist/cjs/{ShadowViewAddon-14a02da4.js → AutoColor-3b59126f.js} +1137 -1137
- package/dist/cjs/ErrorView-b2fcf954.js +35 -0
- package/dist/cjs/IndirectTaxDetailsView-409dae6f.js +646 -0
- package/dist/cjs/data-6d96b89c.js +137 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/parseStates-d1effc19.js +16 -0
- package/dist/cjs/{sqm-banking-info-form_17.cjs.entry.js → sqm-banking-info-form_10.cjs.entry.js} +209 -1885
- package/dist/cjs/sqm-big-stat_41.cjs.entry.js +30 -30
- package/dist/cjs/sqm-code-verification.cjs.entry.js +349 -0
- package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +84 -0
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +12390 -11094
- package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +1221 -0
- package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +11 -3
- package/dist/cjs/sqm-widget-verification.cjs.entry.js +17 -6
- package/dist/cjs/utils-8257e7ab.js +105 -0
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +78 -78
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +37 -3
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +39 -5
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +41 -6
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +12 -8
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +26 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +75 -41
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +62 -3
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +3 -3
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +5 -4
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +49 -11
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +3 -3
- package/dist/collection/utils/parseStates.js +12 -0
- package/dist/esm/{ShadowViewAddon-23a6afab.js → AutoColor-d8d7f31d.js} +1141 -1141
- package/dist/esm/ErrorView-48e2b969.js +33 -0
- package/dist/esm/IndirectTaxDetailsView-c321099a.js +639 -0
- package/dist/esm/data-a05c78ae.js +121 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/parseStates-ed75e224.js +14 -0
- package/dist/esm/{sqm-banking-info-form_17.entry.js → sqm-banking-info-form_10.entry.js} +133 -1802
- package/dist/esm/sqm-big-stat_41.entry.js +1 -1
- package/dist/esm/sqm-code-verification.entry.js +345 -0
- package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +76 -0
- package/dist/esm/sqm-stencilbook.entry.js +10501 -9205
- package/dist/esm/sqm-tax-and-cash.entry.js +1217 -0
- package/dist/esm/sqm-widget-verification-controller.entry.js +12 -4
- package/dist/esm/sqm-widget-verification.entry.js +17 -6
- package/dist/esm/utils-7c96856c.js +97 -0
- package/dist/esm-es5/AutoColor-d8d7f31d.js +1 -0
- package/dist/esm-es5/ErrorView-48e2b969.js +1 -0
- package/dist/esm-es5/IndirectTaxDetailsView-c321099a.js +1 -0
- package/dist/esm-es5/data-a05c78ae.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/parseStates-ed75e224.js +1 -0
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -0
- package/dist/esm-es5/sqm-big-stat_41.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -0
- package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tax-and-cash.entry.js +1 -0
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
- package/dist/esm-es5/utils-7c96856c.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-0603a39f.js +1 -0
- package/dist/mint-components/p-0a37a288.system.entry.js +1 -0
- package/dist/mint-components/p-0b8f6a39.entry.js +11 -0
- package/dist/mint-components/p-115dfc03.system.js +1 -0
- package/dist/mint-components/p-13f3a647.js +1 -0
- package/dist/mint-components/p-1a7453c6.system.js +1 -0
- package/dist/mint-components/p-33d79be3.entry.js +93 -0
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/p-3a62a7e2.system.js +1 -0
- package/dist/mint-components/p-4a46897f.system.js +1 -0
- package/dist/mint-components/p-4d11920f.entry.js +1 -0
- package/dist/mint-components/p-5510be1e.system.entry.js +1 -0
- package/dist/mint-components/p-6ef506ba.entry.js +16 -0
- package/dist/mint-components/{p-33ed6f1c.system.entry.js → p-70adcf4f.system.entry.js} +1 -1
- package/dist/mint-components/p-70d3d873.system.entry.js +1 -0
- package/dist/mint-components/p-7e0bf3de.system.entry.js +1 -0
- package/dist/mint-components/p-83acd617.js +1 -0
- package/dist/mint-components/p-84a78d09.entry.js +1 -0
- package/dist/mint-components/{p-01010af0.entry.js → p-84ed9923.entry.js} +5 -5
- package/dist/mint-components/p-889ec1df.system.entry.js +1 -0
- package/dist/mint-components/p-8a784f2a.system.entry.js +1 -0
- package/dist/mint-components/p-93e4a3c3.system.js +1 -0
- package/dist/mint-components/p-98a48fc4.system.entry.js +1 -0
- package/dist/mint-components/p-9acb5038.js +1 -0
- package/dist/mint-components/p-a38ca165.entry.js +9 -0
- package/dist/mint-components/p-c75a3b4a.js +103 -0
- package/dist/mint-components/p-d75c462c.entry.js +1 -0
- package/dist/mint-components/p-ea7f379d.js +394 -0
- package/dist/mint-components/p-f8175201.system.js +1 -0
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +6 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +5 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +5 -0
- package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +0 -1
- package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +2 -2
- package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +4 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +11 -10
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +10 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +7 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -1
- package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
- package/dist/types/components.d.ts +96 -89
- package/dist/types/global/android.d.ts +7 -0
- package/dist/types/global/demo.d.ts +2 -0
- package/dist/types/stories/features.d.ts +4 -0
- package/dist/types/stories/templates.d.ts +4 -0
- package/dist/types/utils/parseStates.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -1
- package/dist/cjs/sqm-invoice-table-view-baded4af.js +0 -2067
- package/dist/esm/sqm-invoice-table-view-af69cd33.js +0 -2050
- package/dist/esm-es5/ShadowViewAddon-23a6afab.js +0 -1
- package/dist/esm-es5/sqm-banking-info-form_17.entry.js +0 -1
- package/dist/esm-es5/sqm-invoice-table-view-af69cd33.js +0 -1
- package/dist/mint-components/p-33c96e14.entry.js +0 -16
- package/dist/mint-components/p-38b5f028.system.entry.js +0 -1
- package/dist/mint-components/p-6427e963.entry.js +0 -1
- package/dist/mint-components/p-7e7cbccf.system.js +0 -1
- package/dist/mint-components/p-9320582e.system.js +0 -1
- package/dist/mint-components/p-962f3200.js +0 -1
- package/dist/mint-components/p-9cf80e85.system.entry.js +0 -1
- package/dist/mint-components/p-b93fd99c.system.entry.js +0 -1
- package/dist/mint-components/p-c36506f6.system.entry.js +0 -1
- package/dist/mint-components/p-d3d74266.js +0 -394
- package/dist/mint-components/p-f29eda2f.entry.js +0 -205
- package/dist/mint-components/p-f2cc6a6f.entry.js +0 -9
- /package/dist/collection/components/tax-and-cash/{sqm-tax-and-cash/data.js → data.js} +0 -0
- /package/dist/types/components/tax-and-cash/{sqm-tax-and-cash/data.d.ts → data.d.ts} +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { isDemo, useParentState, useSetParent, } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
3
3
|
import { Component, h, Prop } from "@stencil/core";
|
|
4
|
+
import deepmerge from "deepmerge";
|
|
5
|
+
import { parseStates } from "../../utils/parseStates";
|
|
4
6
|
import { getProps } from "../../utils/utils";
|
|
5
7
|
import { extractProps } from "../tax-and-cash/sqm-tax-and-cash/extractProps";
|
|
6
8
|
import { SHOW_CODE_NAMESPACE, VERIFICATION_EMAIL_NAMESPACE, VERIFICATION_PARENT_NAMESPACE, } from "./keys";
|
|
@@ -107,6 +109,11 @@ export class WidgetVerification {
|
|
|
107
109
|
* @uiGroup Code Verification Step
|
|
108
110
|
*/
|
|
109
111
|
this.codeStep_networkErrorMessage = "An error occurred while verifying your email. Please refresh the page and try again.";
|
|
112
|
+
/**
|
|
113
|
+
* @componentState { "title": "Email Step", "props": { "showCode": false } }
|
|
114
|
+
* @componentState { "title": "Code Step", "props": { "showCode": true } }
|
|
115
|
+
*/
|
|
116
|
+
this.stateController = "{}";
|
|
110
117
|
withHooks(this);
|
|
111
118
|
}
|
|
112
119
|
disconnectedCallback() { }
|
|
@@ -115,10 +122,10 @@ export class WidgetVerification {
|
|
|
115
122
|
return extractProps(props, prefix);
|
|
116
123
|
}
|
|
117
124
|
render() {
|
|
118
|
-
const
|
|
119
|
-
? useDemoWidgetVerificationInternal()
|
|
125
|
+
const props = isDemo()
|
|
126
|
+
? useDemoWidgetVerificationInternal(this)
|
|
120
127
|
: useWidgetVerification();
|
|
121
|
-
if (loading)
|
|
128
|
+
if (props.loading)
|
|
122
129
|
return h("sl-spinner", null);
|
|
123
130
|
const generalText = this.getStepTextProps("general_");
|
|
124
131
|
return (h("div", null,
|
|
@@ -128,7 +135,7 @@ export class WidgetVerification {
|
|
|
128
135
|
fontSize: "var(--sl-font-size-medium)",
|
|
129
136
|
margin: "0",
|
|
130
137
|
} }, generalText.verifyEmailDescription),
|
|
131
|
-
showCode ? (h("sqm-code-verification", Object.assign({ onVerification: onVerification }, this.getStepTextProps("codeStep_")))) : (h("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"))))));
|
|
138
|
+
props.showCode ? (h("sqm-code-verification", Object.assign({ onVerification: props.onVerification }, this.getStepTextProps("codeStep_"), extractProps(props, "sqm-code-verification_")))) : (h("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"), extractProps(props, "sqm-email-verification_"))))));
|
|
132
139
|
}
|
|
133
140
|
static get is() { return "sqm-widget-verification"; }
|
|
134
141
|
static get encapsulation() { return "shadow"; }
|
|
@@ -516,10 +523,34 @@ export class WidgetVerification {
|
|
|
516
523
|
"attribute": "code-step_network-error-message",
|
|
517
524
|
"reflect": false,
|
|
518
525
|
"defaultValue": "\"An error occurred while verifying your email. Please refresh the page and try again.\""
|
|
526
|
+
},
|
|
527
|
+
"stateController": {
|
|
528
|
+
"type": "string",
|
|
529
|
+
"mutable": false,
|
|
530
|
+
"complexType": {
|
|
531
|
+
"original": "string",
|
|
532
|
+
"resolved": "string",
|
|
533
|
+
"references": {}
|
|
534
|
+
},
|
|
535
|
+
"required": false,
|
|
536
|
+
"optional": false,
|
|
537
|
+
"docs": {
|
|
538
|
+
"tags": [{
|
|
539
|
+
"text": "{ \"title\": \"Email Step\", \"props\": { \"showCode\": false } }",
|
|
540
|
+
"name": "componentState"
|
|
541
|
+
}, {
|
|
542
|
+
"text": "{ \"title\": \"Code Step\", \"props\": { \"showCode\": true } }",
|
|
543
|
+
"name": "componentState"
|
|
544
|
+
}],
|
|
545
|
+
"text": ""
|
|
546
|
+
},
|
|
547
|
+
"attribute": "state-controller",
|
|
548
|
+
"reflect": false,
|
|
549
|
+
"defaultValue": "\"{}\""
|
|
519
550
|
}
|
|
520
551
|
}; }
|
|
521
552
|
}
|
|
522
|
-
function useDemoWidgetVerificationInternal() {
|
|
553
|
+
function useDemoWidgetVerificationInternal(props) {
|
|
523
554
|
const [showCode, setShowCode] = useParentState({
|
|
524
555
|
namespace: SHOW_CODE_NAMESPACE,
|
|
525
556
|
initialValue: false,
|
|
@@ -529,8 +560,12 @@ function useDemoWidgetVerificationInternal() {
|
|
|
529
560
|
initialValue: undefined,
|
|
530
561
|
});
|
|
531
562
|
const setContext = useSetParent(VERIFICATION_PARENT_NAMESPACE);
|
|
563
|
+
const states = parseStates(props.stateController);
|
|
564
|
+
const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-widget-verification"
|
|
565
|
+
? { ...prev, ...states[key] }
|
|
566
|
+
: { ...prev, [`${key}_stateController`]: states[key] }, {});
|
|
532
567
|
const onVerification = () => {
|
|
533
568
|
setContext(true);
|
|
534
569
|
};
|
|
535
|
-
return { showCode, onVerification, loading: false };
|
|
570
|
+
return deepmerge({ showCode, onVerification, loading: false }, formatted || {}, { arrayMerge: (_, a) => a });
|
|
536
571
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import {
|
|
2
|
+
import { ErrorView } from "./sqm-tax-and-cash/ErrorView";
|
|
3
3
|
import LoadingView from "./sqm-tax-and-cash/LoadingView";
|
|
4
|
+
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "./subregions";
|
|
4
5
|
import { taxTypeToName } from "./utils";
|
|
5
|
-
import { ErrorView } from "./sqm-tax-and-cash/ErrorView";
|
|
6
6
|
export default {
|
|
7
7
|
title: "Components/Tax Form",
|
|
8
8
|
};
|
|
@@ -1217,9 +1217,13 @@ export const TaxAndCashDashboardDisabled = () => {
|
|
|
1217
1217
|
},
|
|
1218
1218
|
} }));
|
|
1219
1219
|
};
|
|
1220
|
-
export const TaxAndCashTextProps = () => {
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1220
|
+
// export const TaxAndCashTextProps = () => {
|
|
1221
|
+
// return (
|
|
1222
|
+
// <sqm-tax-and-cash
|
|
1223
|
+
// demoData={{
|
|
1224
|
+
// // @ts-ignore
|
|
1225
|
+
// showTextProps: true,
|
|
1226
|
+
// }}
|
|
1227
|
+
// ></sqm-tax-and-cash>
|
|
1228
|
+
// );
|
|
1229
|
+
// };
|
package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { intl } from "../../../global/global";
|
|
3
3
|
import { createStyleSheet } from "../../../styling/JSS";
|
|
4
|
-
import { FORM_STEPS } from "../
|
|
4
|
+
import { FORM_STEPS } from "../data";
|
|
5
5
|
const style = {
|
|
6
6
|
FormWrapper: {
|
|
7
7
|
display: "flex",
|
package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js
CHANGED
|
@@ -4,13 +4,13 @@ import { useEffect } from "@saasquatch/universal-hooks";
|
|
|
4
4
|
import { Component, Host, Prop, State, h } from "@stencil/core";
|
|
5
5
|
import deepmerge from "deepmerge";
|
|
6
6
|
import { intl } from "../../../global/global";
|
|
7
|
+
import { createStyleSheet } from "../../../styling/JSS";
|
|
7
8
|
import { getProps } from "../../../utils/utils";
|
|
8
|
-
import { TAX_CONTEXT_NAMESPACE } from "../
|
|
9
|
+
import { TAX_CONTEXT_NAMESPACE } from "../data";
|
|
9
10
|
import { getFormMap } from "./formDefinitions";
|
|
10
11
|
import { mockPaymentOptions } from "./mockData";
|
|
11
12
|
import { BankingInfoFormView, } from "./sqm-banking-info-form-view";
|
|
12
13
|
import { getFormInputs, paypalFeeMap, useBankingInfoForm, } from "./useBankingInfoForm";
|
|
13
|
-
import { createStyleSheet } from "../../../styling/JSS";
|
|
14
14
|
/**
|
|
15
15
|
* @uiName Banking Information Form
|
|
16
16
|
* @exampleGroup Common Components
|
|
@@ -3,8 +3,8 @@ import { useEffect, useRef, useState } from "@saasquatch/universal-hooks";
|
|
|
3
3
|
import { gql } from "graphql-request";
|
|
4
4
|
import JSONPointer from "jsonpointer";
|
|
5
5
|
import { intl } from "../../../global/global";
|
|
6
|
-
import { FINANCE_NETWORK_SETTINGS_NAMESPACE, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../sqm-tax-and-cash/data";
|
|
7
6
|
import { VERIFICATION_EVENT_KEY } from "../../sqm-widget-verification/keys";
|
|
7
|
+
import { FINANCE_NETWORK_SETTINGS_NAMESPACE, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../data";
|
|
8
8
|
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
9
9
|
// Hardcoded in Impact backend
|
|
10
10
|
export const paypalFeeMap = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { intl } from "../../../global/global";
|
|
3
3
|
import { createStyleSheet } from "../../../styling/JSS";
|
|
4
|
-
import { FORM_STEPS } from "../
|
|
4
|
+
import { FORM_STEPS } from "../data";
|
|
5
5
|
const style = {
|
|
6
6
|
FormWrapper: {
|
|
7
7
|
display: "flex",
|
|
@@ -3,7 +3,7 @@ import { withHooks } from "@saasquatch/stencil-hooks";
|
|
|
3
3
|
import { Component, Element, Host, Prop, State, h } from "@stencil/core";
|
|
4
4
|
import deepmerge from "deepmerge";
|
|
5
5
|
import { getProps } from "../../../utils/utils";
|
|
6
|
-
import { TAX_CONTEXT_NAMESPACE } from "../
|
|
6
|
+
import { TAX_CONTEXT_NAMESPACE } from "../data";
|
|
7
7
|
import { DocusignIframe, } from "./docusign-iframe/DocusignIframe";
|
|
8
8
|
import { DocusignFormView } from "./sqm-docusign-form-view";
|
|
9
9
|
import { useDocusignForm } from "./useDocusignForm";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMutation, useParent, useParentQueryValue, useParentValue, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useEffect, useState } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { gql } from "graphql-request";
|
|
4
|
-
import { TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../
|
|
5
|
-
import { taxTypeToName, validTaxDocument } from "../utils";
|
|
4
|
+
import { TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../data";
|
|
6
5
|
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
6
|
+
import { taxTypeToName, validTaxDocument } from "../utils";
|
|
7
7
|
const GET_TAX_DOCUMENT = gql `
|
|
8
8
|
mutation createImpactPublisherTaxDocument(
|
|
9
9
|
$vars: CreateImpactPublisherTaxDocumentInput!
|
package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { createStyleSheet } from "../../../styling/JSS";
|
|
3
2
|
import { intl } from "../../../global/global";
|
|
4
|
-
import {
|
|
3
|
+
import { createStyleSheet } from "../../../styling/JSS";
|
|
4
|
+
import { FORM_STEPS } from "../data";
|
|
5
5
|
const style = {
|
|
6
6
|
FormWrapper: {
|
|
7
7
|
display: "flex",
|
package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useState } from "@saasquatch/universal-hooks";
|
|
|
4
4
|
import { Component, Host, Prop, h } from "@stencil/core";
|
|
5
5
|
import deepmerge from "deepmerge";
|
|
6
6
|
import { getProps } from "../../../utils/utils";
|
|
7
|
-
import { TAX_CONTEXT_NAMESPACE } from "../
|
|
7
|
+
import { TAX_CONTEXT_NAMESPACE } from "../data";
|
|
8
8
|
import { OtherRegionSlotView } from "../sqm-user-info-form/small-views/IndirectTaxDetailsView";
|
|
9
9
|
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
|
|
10
10
|
import { IndirectTaxFormView } from "./sqm-indirect-tax-form-view";
|
|
@@ -2,10 +2,10 @@ import { useLocale, useMutation, useParent, useParentQueryValue, useParentValue,
|
|
|
2
2
|
import { useEffect, useMemo, useRef, useState, } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { gql } from "graphql-request";
|
|
4
4
|
import JSONPointer from "jsonpointer";
|
|
5
|
-
import { COUNTRIES_QUERY_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../
|
|
5
|
+
import { COUNTRIES_QUERY_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../data";
|
|
6
|
+
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
6
7
|
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
|
|
7
8
|
import { getCountryObj, validTaxDocument } from "../utils";
|
|
8
|
-
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
9
9
|
const CONNECT_PARTNER = gql `
|
|
10
10
|
mutation createImpactConnection($vars: ImpactConnectionInput!) {
|
|
11
11
|
createImpactConnection(impactConnectionInput: $vars) {
|
package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js
CHANGED
|
@@ -2,9 +2,9 @@ import { isDemo } from "@saasquatch/component-boilerplate";
|
|
|
2
2
|
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
3
3
|
import { Component, Host, Prop, h } from "@stencil/core";
|
|
4
4
|
import deepmerge from "deepmerge";
|
|
5
|
+
import { getProps } from "../../../utils/utils";
|
|
5
6
|
import { PayoutDetailsCardView } from "./sqm-payout-details-card-view";
|
|
6
7
|
import { usePayoutDetailsCard } from "./usePayoutDetailsCard";
|
|
7
|
-
import { getProps } from "../../../utils/utils";
|
|
8
8
|
/**
|
|
9
9
|
* @uiName Payout Details Card
|
|
10
10
|
* @exampleGroup Tax and Cash Components
|
|
@@ -31,6 +31,10 @@ export class PayoutDetailsCard {
|
|
|
31
31
|
* @uiName Payout missing information subtext
|
|
32
32
|
*/
|
|
33
33
|
this.payoutMissingInformationText = "Missing banking information, go to Impact.com to resolve.";
|
|
34
|
+
/**
|
|
35
|
+
* @componentState { "title": "Loading", "props": { "states": { "loading": true } } }
|
|
36
|
+
*/
|
|
37
|
+
this.stateController = "{}";
|
|
34
38
|
withHooks(this);
|
|
35
39
|
}
|
|
36
40
|
disconnectedCallback() { }
|
|
@@ -134,6 +138,27 @@ export class PayoutDetailsCard {
|
|
|
134
138
|
"reflect": false,
|
|
135
139
|
"defaultValue": "\"Missing banking information, go to Impact.com to resolve.\""
|
|
136
140
|
},
|
|
141
|
+
"stateController": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "string",
|
|
146
|
+
"resolved": "string",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": true,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [{
|
|
153
|
+
"text": "{ \"title\": \"Loading\", \"props\": { \"states\": { \"loading\": true } } }",
|
|
154
|
+
"name": "componentState"
|
|
155
|
+
}],
|
|
156
|
+
"text": ""
|
|
157
|
+
},
|
|
158
|
+
"attribute": "state-controller",
|
|
159
|
+
"reflect": false,
|
|
160
|
+
"defaultValue": "\"{}\""
|
|
161
|
+
},
|
|
137
162
|
"demoData": {
|
|
138
163
|
"type": "unknown",
|
|
139
164
|
"mutable": false,
|
package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { useParentQueryValue } from "@saasquatch/component-boilerplate";
|
|
1
2
|
import { DateTime } from "luxon";
|
|
2
3
|
import { intl } from "../../../global/global";
|
|
3
|
-
import { USER_QUERY_NAMESPACE } from "../
|
|
4
|
-
import { useParentQueryValue } from "@saasquatch/component-boilerplate";
|
|
4
|
+
import { USER_QUERY_NAMESPACE } from "../data";
|
|
5
5
|
export function usePayoutDetailsCard(props) {
|
|
6
6
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
7
7
|
const { data, loading } = useParentQueryValue(USER_QUERY_NAMESPACE);
|
|
@@ -2,11 +2,12 @@ import { isDemo, useParentState } from "@saasquatch/component-boilerplate";
|
|
|
2
2
|
import { withHooks } from "@saasquatch/stencil-hooks";
|
|
3
3
|
import { Component, Prop, h } from "@stencil/core";
|
|
4
4
|
import deepmerge from "deepmerge";
|
|
5
|
+
import { parseStates } from "../../../utils/parseStates";
|
|
5
6
|
import { getProps } from "../../../utils/utils";
|
|
7
|
+
import { TAX_CONTEXT_NAMESPACE } from "../data";
|
|
6
8
|
import { ErrorView } from "./ErrorView";
|
|
7
|
-
import LoadingView from "./LoadingView";
|
|
8
|
-
import { TAX_CONTEXT_NAMESPACE } from "./data";
|
|
9
9
|
import { extractProps } from "./extractProps";
|
|
10
|
+
import LoadingView from "./LoadingView";
|
|
10
11
|
import { useTaxAndCash } from "./useTaxAndCash";
|
|
11
12
|
/**
|
|
12
13
|
* @uiName Tax and Cash
|
|
@@ -973,6 +974,15 @@ export class TaxAndCashMonolith {
|
|
|
973
974
|
* @uiGroup General Form Properties
|
|
974
975
|
*/
|
|
975
976
|
this.supportLink = "support team";
|
|
977
|
+
/**
|
|
978
|
+
* @uiName Monolith States
|
|
979
|
+
* @componentState { "title": "Step 1", "props": { "step": "/1" } }
|
|
980
|
+
* @componentState { "title": "Step 2", "props": { "step": "/2" } }
|
|
981
|
+
* @componentState { "title": "Step 3", "props": { "step": "/3" } }
|
|
982
|
+
* @componentState { "title": "Step 4", "props": { "step": "/4" } }
|
|
983
|
+
* @componentState { "title": "Dashboard", "props": { "step": "/dashboard" } }
|
|
984
|
+
*/
|
|
985
|
+
this.stateController = "{}";
|
|
976
986
|
withHooks(this);
|
|
977
987
|
}
|
|
978
988
|
disconnectedCallback() { }
|
|
@@ -1017,21 +1027,23 @@ export class TaxAndCashMonolith {
|
|
|
1017
1027
|
h("hr", null)));
|
|
1018
1028
|
})));
|
|
1019
1029
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1030
|
+
const getStep = () => {
|
|
1031
|
+
switch (props.step) {
|
|
1032
|
+
case "/1":
|
|
1033
|
+
return (h("sqm-user-info-form", Object.assign({}, this.getGeneralStepTextProps("step1_"), extractProps(props, "sqm-user-info-form_"))));
|
|
1034
|
+
case "/2":
|
|
1035
|
+
return (h("sqm-indirect-tax-form", Object.assign({}, this.getGeneralStepTextProps("step2_"))));
|
|
1036
|
+
case "/3":
|
|
1037
|
+
return (h("sqm-docusign-form", Object.assign({}, this.getGeneralStepTextProps("step3_"))));
|
|
1038
|
+
case "/4":
|
|
1039
|
+
return (h("sqm-banking-info-form", Object.assign({}, this.getGeneralStepTextProps("step4_"))));
|
|
1040
|
+
case "/dashboard":
|
|
1041
|
+
return (h("sqm-tax-and-cash-dashboard", Object.assign({}, this.getGeneralStepTextProps("dashboard_"), extractProps(props, "sqm-tax-and-cash-dashboard_"))));
|
|
1042
|
+
case "/error":
|
|
1043
|
+
return (h(ErrorView, { loadingErrorAlertHeader: this.loadingErrorAlertHeader, loadingErrorAlertDescription: this.loadingErrorAlertDescription }));
|
|
1044
|
+
}
|
|
1045
|
+
};
|
|
1046
|
+
return getStep() || h(LoadingView, null);
|
|
1035
1047
|
}
|
|
1036
1048
|
static get is() { return "sqm-tax-and-cash"; }
|
|
1037
1049
|
static get encapsulation() { return "shadow"; }
|
|
@@ -5014,20 +5026,55 @@ export class TaxAndCashMonolith {
|
|
|
5014
5026
|
"reflect": false,
|
|
5015
5027
|
"defaultValue": "\"support team\""
|
|
5016
5028
|
},
|
|
5029
|
+
"stateController": {
|
|
5030
|
+
"type": "string",
|
|
5031
|
+
"mutable": false,
|
|
5032
|
+
"complexType": {
|
|
5033
|
+
"original": "string",
|
|
5034
|
+
"resolved": "string",
|
|
5035
|
+
"references": {}
|
|
5036
|
+
},
|
|
5037
|
+
"required": false,
|
|
5038
|
+
"optional": false,
|
|
5039
|
+
"docs": {
|
|
5040
|
+
"tags": [{
|
|
5041
|
+
"text": "Monolith States",
|
|
5042
|
+
"name": "uiName"
|
|
5043
|
+
}, {
|
|
5044
|
+
"text": "{ \"title\": \"Step 1\", \"props\": { \"step\": \"/1\" } }",
|
|
5045
|
+
"name": "componentState"
|
|
5046
|
+
}, {
|
|
5047
|
+
"text": "{ \"title\": \"Step 2\", \"props\": { \"step\": \"/2\" } }",
|
|
5048
|
+
"name": "componentState"
|
|
5049
|
+
}, {
|
|
5050
|
+
"text": "{ \"title\": \"Step 3\", \"props\": { \"step\": \"/3\" } }",
|
|
5051
|
+
"name": "componentState"
|
|
5052
|
+
}, {
|
|
5053
|
+
"text": "{ \"title\": \"Step 4\", \"props\": { \"step\": \"/4\" } }",
|
|
5054
|
+
"name": "componentState"
|
|
5055
|
+
}, {
|
|
5056
|
+
"text": "{ \"title\": \"Dashboard\", \"props\": { \"step\": \"/dashboard\" } }",
|
|
5057
|
+
"name": "componentState"
|
|
5058
|
+
}],
|
|
5059
|
+
"text": ""
|
|
5060
|
+
},
|
|
5061
|
+
"attribute": "state-controller",
|
|
5062
|
+
"reflect": false,
|
|
5063
|
+
"defaultValue": "\"{}\""
|
|
5064
|
+
},
|
|
5017
5065
|
"demoData": {
|
|
5018
5066
|
"type": "unknown",
|
|
5019
5067
|
"mutable": false,
|
|
5020
5068
|
"complexType": {
|
|
5021
|
-
"original": "DemoData<
|
|
5022
|
-
"resolved": "{ loading?: boolean; setStep?: (value: string) => void; step?: string; context?: TaxContext; namespace?: string; }",
|
|
5069
|
+
"original": "DemoData<TaxAndCashMonolith>",
|
|
5070
|
+
"resolved": "{ step1_firstName?: string; step1_lastName?: string; step1_email?: string; step1_country?: string; step1_phoneNumber?: string; step1_address?: string; step1_city?: string; step1_state?: string; step1_province?: string; step1_region?: string; step1_postalCode?: string; step1_currency?: string; step1_currencyHelpText?: string; step1_allowBankingCollection?: string; step1_personalInformation?: string; step1_termsAndConditionsLabel?: string; step1_termsAndConditionsLink?: string; step1_searchForCurrencyText?: string; step2_indirectTax?: string; step2_indirectTaxDescription?: string; step2_indirectTaxDetails?: string; step2_otherRegion?: string; step2_otherRegionSubtext?: string; step2_notRegistered?: string; step2_notRegisteredSubtext?: string; step2_selectedRegion?: string; step2_indirectTaxNumber?: string; step2_province?: string; step2_indirectTaxNumberError?: string; step2_qstNumber?: string; step2_isRegisteredQST?: string; step2_isRegisteredSubRegionIncomeTax?: string; step2_subRegion?: string; step2_subRegionTaxNumberLabel?: string; step2_cannotChangeInfoAlert?: string; step3_taxForm?: string; step3_taxFormLabel?: string; step3_participantType?: string; step3_businessEntity?: string; step3_individualParticipant?: string; step3_taxFormDescription?: string; step3_taxFormDescriptionIndividualParticipant?: string; step3_taxFormDescriptionBusinessEntity?: string; step3_docusignExpired?: string; step3_docusignSessionWarning?: string; step3_docusignError?: string; step3_refreshButton?: string; step3_exitButton?: string; step4_taxAndPayouts?: string; step4_directlyToBankAccount?: string; step4_toPayPalAccount?: string; step4_paymentScheduleBalanceThreshold?: string; step4_paymentScheduleFixedDay?: string; step4_paymentDaySelectLabel?: string; step4_paymentThresholdSelectLabel?: string; step4_paymentDayFirstOfMonthLabelText?: string; step4_paymentDayFifteenthOfMonthLabelText?: string; step4_paymentMethod?: string; step4_paymentSchedule?: string; step4_paymentMethodSubtext?: string; step4_payPalInputLabel?: string; step4_bankLocationLabel?: string; step4_beneficiaryAccountNameLabel?: string; step4_bankAccountTypeLabel?: string; step4_checkingSelectItemLabel?: string; step4_savingsSelectItemLabel?: string; step4_bankAccountNumberLabel?: string; step4_ibanLabel?: string; step4_swiftCodeLabel?: string; step4_routingCodeLabel?: string; step4_bankNameLabel?: string; step4_classificationEntityLabel?: string; step4_businessSelectItemLabel?: string; step4_individualSelectItemLabel?: string; step4_foreignSelectItemLabel?: string; step4_classificationCPFLabel?: string; step4_patronymicNameLabel?: string; step4_voCodeLabel?: string; step4_agencyCodeLabel?: string; step4_branchCodeLabel?: string; step4_classificationLabel?: string; step4_taxPayerIdLabel?: string; step4_bankAddressLabel?: string; step4_bankCityLabel?: string; step4_bankStateLabel?: string; step4_bankPostalCodeLabel?: string; step4_eftWithdrawalLabel?: string; step4_fxWireProcessingFeeLabel?: string; step4_verifyEmailHeaderText?: string; step4_verifyEmailDescriptionText?: string; dashboard_statusTextActive?: string; dashboard_statusTextNotActive?: string; dashboard_statusTextNotVerified?: string; dashboard_badgeTextSubmittedOn?: string; dashboard_badgeTextSubmittedOnW8?: string; dashboard_badgeTextAwaitingReview?: string; dashboard_taxAlertHeaderNotActiveW9?: string; dashboard_taxAlertHeaderNotActiveW8?: string; dashboard_taxAlertNotActiveMessageW9?: string; dashboard_taxAlertNotActiveMessageW8?: string; dashboard_invalidForm?: string; dashboard_bankingInformationSectionHeader?: string; dashboard_taxDocumentSectionHeader?: string; dashboard_taxDocumentSectionSubHeader?: string; dashboard_noFormNeededSubtext?: string; dashboard_indirectTaxInfoSectionHeader?: string; dashboard_indirectTaxInfoCanada?: string; dashboard_indirectTaxInfoOtherCountry?: string; dashboard_indirectTaxInfoSpain?: string; dashboard_indirectTaxTooltipSupport?: string; dashboard_indirectTaxDetails?: string; dashboard_newFormButton?: string; dashboard_editPaymentInformationButton?: string; dashboard_notRegisteredForTax?: string; dashboard_qstNumber?: string; dashboard_subRegionTaxNumber?: string; dashboard_statusBadgeText?: string; dashboard_thresholdPayoutText?: string; dashboard_accountText?: string; dashboard_invoiceColumnTitle?: string; dashboard_dateColumnTitle?: string; dashboard_earningsColumnTitle?: string; dashboard_indirectTaxColumnTitle?: string; dashboard_payoutFromImpact?: string; dashboard_earningsAfterTaxColumnTitle?: string; dashboard_payoutHoldAlertHeader?: string; dashboard_payoutHoldAlertDescription?: string; dashboard_payoutMissingInformationText?: string; dashboard_invoiceDescription?: string; dashboard_invoicePrevLabel?: string; dashboard_invoiceMoreLabel?: string; dashboard_invoiceHeader?: string; dashboard_invoiceEmptyStateHeader?: string; dashboard_invoiceEmptyStateText?: string; dashboard_replaceTaxFormModalHeader?: string; dashboard_replaceTaxFormModalBodyText?: string; dashboard_verificationRequiredHeader?: string; dashboard_verificationRequiredDescription?: string; dashboard_verificationRequiredInternalHeader?: string; dashboard_verificationRequiredInternalDescription?: string; dashboard_verificationReviewInternalHeader?: string; dashboard_verificationReviewInternalDescription?: string; dashboard_verificationFailedInternalHeader?: string; dashboard_verificationFailedInternalDescription?: string; dashboard_verificationRequiredButtonText?: string; formStep?: string; generalErrorTitle?: string; generalErrorDescription?: string; fieldRequiredError?: string; invalidCharacterError?: string; fieldInvalidError?: string; continueButton?: string; backButton?: string; cancelButton?: string; isPartnerAlertHeader?: string; isPartnerAlertDescription?: string; searchForCountryText?: string; loadingErrorAlertHeader?: string; loadingErrorAlertDescription?: string; taxAndPayoutsDescription?: string; supportLink?: string; stateController?: string; demoData?: Partial<Pick<TaxAndCashMonolith, \"step1_firstName\" | \"step1_lastName\" | \"step1_email\" | \"step1_country\" | \"step1_phoneNumber\" | \"step1_address\" | \"step1_city\" | \"step1_state\" | \"step1_province\" | \"step1_region\" | \"step1_postalCode\" | \"step1_currency\" | \"step1_currencyHelpText\" | \"step1_allowBankingCollection\" | \"step1_personalInformation\" | \"step1_termsAndConditionsLabel\" | \"step1_termsAndConditionsLink\" | \"step1_searchForCurrencyText\" | \"step2_indirectTax\" | \"step2_indirectTaxDescription\" | \"step2_indirectTaxDetails\" | \"step2_otherRegion\" | \"step2_otherRegionSubtext\" | \"step2_notRegistered\" | \"step2_notRegisteredSubtext\" | \"step2_selectedRegion\" | \"step2_indirectTaxNumber\" | \"step2_province\" | \"step2_indirectTaxNumberError\" | \"step2_qstNumber\" | \"step2_isRegisteredQST\" | \"step2_isRegisteredSubRegionIncomeTax\" | \"step2_subRegion\" | \"step2_subRegionTaxNumberLabel\" | \"step2_cannotChangeInfoAlert\" | \"step3_taxForm\" | \"step3_taxFormLabel\" | \"step3_participantType\" | \"step3_businessEntity\" | \"step3_individualParticipant\" | \"step3_taxFormDescription\" | \"step3_taxFormDescriptionIndividualParticipant\" | \"step3_taxFormDescriptionBusinessEntity\" | \"step3_docusignExpired\" | \"step3_docusignSessionWarning\" | \"step3_docusignError\" | \"step3_refreshButton\" | \"step3_exitButton\" | \"step4_taxAndPayouts\" | \"step4_directlyToBankAccount\" | \"step4_toPayPalAccount\" | \"step4_paymentScheduleBalanceThreshold\" | \"step4_paymentScheduleFixedDay\" | \"step4_paymentDaySelectLabel\" | \"step4_paymentThresholdSelectLabel\" | \"step4_paymentDayFirstOfMonthLabelText\" | \"step4_paymentDayFifteenthOfMonthLabelText\" | \"step4_paymentMethod\" | \"step4_paymentSchedule\" | \"step4_paymentMethodSubtext\" | \"step4_payPalInputLabel\" | \"step4_bankLocationLabel\" | \"step4_beneficiaryAccountNameLabel\" | \"step4_bankAccountTypeLabel\" | \"step4_checkingSelectItemLabel\" | \"step4_savingsSelectItemLabel\" | \"step4_bankAccountNumberLabel\" | \"step4_ibanLabel\" | \"step4_swiftCodeLabel\" | \"step4_routingCodeLabel\" | \"step4_bankNameLabel\" | \"step4_classificationEntityLabel\" | \"step4_businessSelectItemLabel\" | \"step4_individualSelectItemLabel\" | \"step4_foreignSelectItemLabel\" | \"step4_classificationCPFLabel\" | \"step4_patronymicNameLabel\" | \"step4_voCodeLabel\" | \"step4_agencyCodeLabel\" | \"step4_branchCodeLabel\" | \"step4_classificationLabel\" | \"step4_taxPayerIdLabel\" | \"step4_bankAddressLabel\" | \"step4_bankCityLabel\" | \"step4_bankStateLabel\" | \"step4_bankPostalCodeLabel\" | \"step4_eftWithdrawalLabel\" | \"step4_fxWireProcessingFeeLabel\" | \"step4_verifyEmailHeaderText\" | \"step4_verifyEmailDescriptionText\" | \"dashboard_statusTextActive\" | \"dashboard_statusTextNotActive\" | \"dashboard_statusTextNotVerified\" | \"dashboard_badgeTextSubmittedOn\" | \"dashboard_badgeTextSubmittedOnW8\" | \"dashboard_badgeTextAwaitingReview\" | \"dashboard_taxAlertHeaderNotActiveW9\" | \"dashboard_taxAlertHeaderNotActiveW8\" | \"dashboard_taxAlertNotActiveMessageW9\" | \"dashboard_taxAlertNotActiveMessageW8\" | \"dashboard_invalidForm\" | \"dashboard_bankingInformationSectionHeader\" | \"dashboard_taxDocumentSectionHeader\" | \"dashboard_taxDocumentSectionSubHeader\" | \"dashboard_noFormNeededSubtext\" | \"dashboard_indirectTaxInfoSectionHeader\" | \"dashboard_indirectTaxInfoCanada\" | \"dashboard_indirectTaxInfoOtherCountry\" | \"dashboard_indirectTaxInfoSpain\" | \"dashboard_indirectTaxTooltipSupport\" | \"dashboard_indirectTaxDetails\" | \"dashboard_newFormButton\" | \"dashboard_editPaymentInformationButton\" | \"dashboard_notRegisteredForTax\" | \"dashboard_qstNumber\" | \"dashboard_subRegionTaxNumber\" | \"dashboard_statusBadgeText\" | \"dashboard_thresholdPayoutText\" | \"dashboard_accountText\" | \"dashboard_invoiceColumnTitle\" | \"dashboard_dateColumnTitle\" | \"dashboard_earningsColumnTitle\" | \"dashboard_indirectTaxColumnTitle\" | \"dashboard_payoutFromImpact\" | \"dashboard_earningsAfterTaxColumnTitle\" | \"dashboard_payoutHoldAlertHeader\" | \"dashboard_payoutHoldAlertDescription\" | \"dashboard_payoutMissingInformationText\" | \"dashboard_invoiceDescription\" | \"dashboard_invoicePrevLabel\" | \"dashboard_invoiceMoreLabel\" | \"dashboard_invoiceHeader\" | \"dashboard_invoiceEmptyStateHeader\" | \"dashboard_invoiceEmptyStateText\" | \"dashboard_replaceTaxFormModalHeader\" | \"dashboard_replaceTaxFormModalBodyText\" | \"dashboard_verificationRequiredHeader\" | \"dashboard_verificationRequiredDescription\" | \"dashboard_verificationRequiredInternalHeader\" | \"dashboard_verificationRequiredInternalDescription\" | \"dashboard_verificationReviewInternalHeader\" | \"dashboard_verificationReviewInternalDescription\" | \"dashboard_verificationFailedInternalHeader\" | \"dashboard_verificationFailedInternalDescription\" | \"dashboard_verificationRequiredButtonText\" | \"formStep\" | \"generalErrorTitle\" | \"generalErrorDescription\" | \"fieldRequiredError\" | \"invalidCharacterError\" | \"fieldInvalidError\" | \"continueButton\" | \"backButton\" | \"cancelButton\" | \"isPartnerAlertHeader\" | \"isPartnerAlertDescription\" | \"searchForCountryText\" | \"loadingErrorAlertHeader\" | \"loadingErrorAlertDescription\" | \"taxAndPayoutsDescription\" | \"supportLink\" | \"stateController\" | \"demoData\" | \"disconnectedCallback\" | \"getGeneralStepTextProps\" | \"render\">>; disconnectedCallback?: () => void; getGeneralStepTextProps?: (prefix: string) => PickPrefix<TaxAndCashMonolith, string> & { generalErrorTitle: string; generalErrorDescription: string; fieldRequiredError: string; invalidCharacterError: string; fieldInvalidError: string; continueButton: string; backButton: string; cancelButton: string; isPartnerAlertHeader: string; isPartnerAlertDescription: string; loadingErrorAlertHeader: string; loadingErrorAlertDescription: string; taxAndPayoutsDescription: string; searchForCountryText: string; formStep: string; supportLink: string; }; render?: () => any; }",
|
|
5023
5071
|
"references": {
|
|
5024
5072
|
"DemoData": {
|
|
5025
5073
|
"location": "import",
|
|
5026
5074
|
"path": "../../../global/demo"
|
|
5027
5075
|
},
|
|
5028
|
-
"
|
|
5029
|
-
"location": "
|
|
5030
|
-
"path": "./useTaxAndCash"
|
|
5076
|
+
"TaxAndCashMonolith": {
|
|
5077
|
+
"location": "global"
|
|
5031
5078
|
}
|
|
5032
5079
|
}
|
|
5033
5080
|
},
|
|
@@ -5037,24 +5084,6 @@ export class TaxAndCashMonolith {
|
|
|
5037
5084
|
"tags": [{
|
|
5038
5085
|
"text": undefined,
|
|
5039
5086
|
"name": "undocumented"
|
|
5040
|
-
}, {
|
|
5041
|
-
"text": "object",
|
|
5042
|
-
"name": "uiType"
|
|
5043
|
-
}, {
|
|
5044
|
-
"text": "Step 1 - { \"step\": \"/1\" }",
|
|
5045
|
-
"name": "demo"
|
|
5046
|
-
}, {
|
|
5047
|
-
"text": "Step 2 - { \"step\": \"/2\" }",
|
|
5048
|
-
"name": "demo"
|
|
5049
|
-
}, {
|
|
5050
|
-
"text": "Step 3 - { \"step\": \"/3\" }",
|
|
5051
|
-
"name": "demo"
|
|
5052
|
-
}, {
|
|
5053
|
-
"text": "Step 3 - { \"step\": \"/4\" }",
|
|
5054
|
-
"name": "demo"
|
|
5055
|
-
}, {
|
|
5056
|
-
"text": "Dashboard - { \"step\": \"/dashboard\" }",
|
|
5057
|
-
"name": "demo"
|
|
5058
5087
|
}],
|
|
5059
5088
|
"text": ""
|
|
5060
5089
|
}
|
|
@@ -5066,8 +5095,13 @@ function useDemoTaxAndCash(props) {
|
|
|
5066
5095
|
namespace: TAX_CONTEXT_NAMESPACE,
|
|
5067
5096
|
initialValue: "/1",
|
|
5068
5097
|
});
|
|
5098
|
+
console.log("PROPS", props);
|
|
5099
|
+
const states = parseStates(props.stateController);
|
|
5100
|
+
const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-tax-and-cash"
|
|
5101
|
+
? { ...prev, ...states[key] }
|
|
5102
|
+
: { ...prev, [`${key}_stateController`]: states[key] }, {});
|
|
5069
5103
|
return deepmerge({
|
|
5070
5104
|
step,
|
|
5071
5105
|
setStep,
|
|
5072
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
5106
|
+
}, props.demoData || formatted || {}, { arrayMerge: (_, a) => a });
|
|
5073
5107
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getContextValueName, useHost, useLocale, useParentQuery, useParentState, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useEffect, useMemo } from "@saasquatch/universal-hooks";
|
|
3
|
+
import { COUNTRIES_NAMESPACE, COUNTRIES_QUERY_NAMESPACE, CURRENCIES_NAMESPACE, CURRENCIES_QUERY_NAMESPACE, FINANCE_NETWORK_SETTINGS_NAMESPACE, GET_COUNTRIES, GET_CURRENCIES, GET_FINANCE_NETWORK_SETTINGS, GET_USER, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../data";
|
|
3
4
|
import { getCountryObj } from "../utils";
|
|
4
|
-
import { COUNTRIES_NAMESPACE, COUNTRIES_QUERY_NAMESPACE, CURRENCIES_NAMESPACE, CURRENCIES_QUERY_NAMESPACE, FINANCE_NETWORK_SETTINGS_NAMESPACE, GET_COUNTRIES, GET_CURRENCIES, GET_FINANCE_NETWORK_SETTINGS, GET_USER, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "./data";
|
|
5
5
|
function getCurrentStep(user) {
|
|
6
6
|
var _a, _b;
|
|
7
7
|
if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
|
|
@@ -2,6 +2,7 @@ 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";
|
|
5
6
|
import { getProps } from "../../../utils/utils";
|
|
6
7
|
import { TaxAndCashDashboardView } from "./sqm-tax-and-cash-dashboard-view";
|
|
7
8
|
import { useTaxAndCashDashboard, } from "./useTaxAndCashDashboard";
|
|
@@ -314,6 +315,16 @@ export class TaxAndCashDashboard {
|
|
|
314
315
|
* @uiName Cancel button label
|
|
315
316
|
*/
|
|
316
317
|
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 = "{}";
|
|
317
328
|
withHooks(this);
|
|
318
329
|
}
|
|
319
330
|
disconnectedCallback() { }
|
|
@@ -1691,6 +1702,45 @@ export class TaxAndCashDashboard {
|
|
|
1691
1702
|
"reflect": false,
|
|
1692
1703
|
"defaultValue": "\"Cancel\""
|
|
1693
1704
|
},
|
|
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
|
+
},
|
|
1694
1744
|
"demoData": {
|
|
1695
1745
|
"type": "unknown",
|
|
1696
1746
|
"mutable": false,
|
|
@@ -1724,6 +1774,8 @@ export class TaxAndCashDashboard {
|
|
|
1724
1774
|
}; }
|
|
1725
1775
|
}
|
|
1726
1776
|
function useDemoTaxAndCashDashboard(props) {
|
|
1777
|
+
const states = parseStates(props.stateController);
|
|
1778
|
+
console.log({ states });
|
|
1727
1779
|
return deepmerge({
|
|
1728
1780
|
states: {
|
|
1729
1781
|
dateSubmitted: "today",
|
|
@@ -1731,16 +1783,23 @@ function useDemoTaxAndCashDashboard(props) {
|
|
|
1731
1783
|
documentTypeString: "W9",
|
|
1732
1784
|
status: "ACTIVE",
|
|
1733
1785
|
country: "United States",
|
|
1734
|
-
indirectTaxNumber: 55555555,
|
|
1786
|
+
indirectTaxNumber: "55555555",
|
|
1735
1787
|
indirectTaxType: "Indirect Tax",
|
|
1736
1788
|
noFormNeeded: true,
|
|
1737
1789
|
disabled: false,
|
|
1738
1790
|
loading: false,
|
|
1739
1791
|
showNewFormDialog: false,
|
|
1740
1792
|
hasHold: false,
|
|
1741
|
-
showVerifyIdentity: false,
|
|
1742
1793
|
payoutStatus: "DONE",
|
|
1743
1794
|
veriffLoading: false,
|
|
1795
|
+
canEditPayoutInfo: true,
|
|
1796
|
+
subRegion: "CA",
|
|
1797
|
+
subRegionTaxNumber: undefined,
|
|
1798
|
+
qstNumber: undefined,
|
|
1799
|
+
isBusinessEntity: false,
|
|
1800
|
+
province: undefined,
|
|
1801
|
+
notRegistered: false,
|
|
1802
|
+
loadingError: false,
|
|
1744
1803
|
},
|
|
1745
1804
|
callbacks: {
|
|
1746
1805
|
onClick: () => console.debug("check step"),
|
|
@@ -1750,5 +1809,5 @@ function useDemoTaxAndCashDashboard(props) {
|
|
|
1750
1809
|
onVerifyClick: () => console.log("verify"),
|
|
1751
1810
|
},
|
|
1752
1811
|
text: props.getTextProps(),
|
|
1753
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
1812
|
+
}, props.demoData || states || {}, { arrayMerge: (_, a) => a });
|
|
1754
1813
|
}
|
package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js
CHANGED
|
@@ -2,11 +2,11 @@ import { useLocale, useParentQueryValue, useSetParent, } from "@saasquatch/compo
|
|
|
2
2
|
import { useEffect, useState } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { DateTime } from "luxon";
|
|
4
4
|
import { vatLabels } from "../countries";
|
|
5
|
-
import { TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../
|
|
6
|
-
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
|
|
7
|
-
import { taxTypeToName } from "../utils";
|
|
5
|
+
import { TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../data";
|
|
8
6
|
import { getStatus } from "../sqm-payout-status-alert/usePayoutStatus";
|
|
7
|
+
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
|
|
9
8
|
import { useVeriffApp, VERIFF_COMPLETE_EVENT_KEY } from "../useVeriffApp";
|
|
9
|
+
import { taxTypeToName } from "../utils";
|
|
10
10
|
function getCountryName(countryCode, locale) {
|
|
11
11
|
if (!countryCode)
|
|
12
12
|
return undefined;
|