@saasquatch/mint-components 1.10.3 → 1.11.0-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.
- package/dist/cjs/{ShadowViewAddon-c3e91cee.js → ShadowViewAddon-21aa34f8.js} +32 -57
- package/dist/cjs/{email-registration-view-248652bb.js → email-registration-view-5170d9f1.js} +1 -1
- package/dist/cjs/{global-02e50f09.js → global-4a59a374.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mint-components.cjs.js +2 -2
- package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +115 -142
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +24 -65
- package/dist/cjs/sqm-empty_4.cjs.entry.js +2 -9
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-invoice-table-view-28b14d28.js → sqm-invoice-table-view-c26fb670.js} +6 -8
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
- package/dist/cjs/sqm-logout-current-user.cjs.entry.js +10 -9
- package/dist/cjs/{sqm-portal-container-view-990a85a3.js → sqm-portal-container-view-5fb2ad49.js} +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-292b5bf4.js → sqm-portal-email-verification-view-07161940.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-fde54e35.js → sqm-portal-profile-view-07b99f80.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-referred-registration.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +57 -180
- package/dist/collection/components/sqm-card-feed/sqm-card-feed.js +1 -1
- package/dist/collection/components/sqm-empty/EmptyState.stories.js +1 -1
- package/dist/collection/components/sqm-image/sqm-image-view.js +1 -1
- package/dist/collection/components/sqm-image/sqm-image.js +0 -20
- package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +24 -130
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +29 -55
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +29 -93
- package/dist/collection/components/sqm-leaderboard/useLeaderboard.js +4 -40
- package/dist/collection/components/sqm-logout-current-user/useLogoutCurrentUser.js +10 -9
- package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +7 -19
- package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +1 -1
- package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +0 -37
- package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +1 -1
- package/dist/collection/components/sqm-share-button/ShareButton.stories.js +1 -1
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +1 -1
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +2 -2
- package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +1 -1
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +1 -1
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +1 -2
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +18 -11
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +3 -19
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +3 -2
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +43 -36
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +2 -3
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +12 -12
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +32 -55
- package/dist/collection/components/tax-and-cash/utils.js +4 -7
- package/dist/collection/components/views/email-registration-view.js +1 -1
- package/dist/collection/global/global.js +1 -1
- package/dist/collection/stories/NewPortal.stories.js +1 -1
- package/dist/esm/{ShadowViewAddon-e012b2aa.js → ShadowViewAddon-90897c22.js} +32 -57
- package/dist/esm/{email-registration-view-a89a88bf.js → email-registration-view-07d80492.js} +1 -1
- package/dist/esm/{global-04c7d3b5.js → global-e7bb0343.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mint-components.js +2 -2
- package/dist/esm/sqm-banking-info-form_16.entry.js +115 -142
- package/dist/esm/sqm-big-stat_38.entry.js +24 -65
- package/dist/esm/sqm-empty_4.entry.js +2 -9
- package/dist/esm/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm/{sqm-invoice-table-view-34ac7513.js → sqm-invoice-table-view-2175569f.js} +6 -8
- package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm/sqm-logout-current-user.entry.js +10 -9
- package/dist/esm/{sqm-portal-container-view-6c582684.js → sqm-portal-container-view-ab89c6cc.js} +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-4307c992.js → sqm-portal-email-verification-view-0b32261f.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-ffe955c8.js → sqm-portal-profile-view-03026a5e.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-referred-registration.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +57 -180
- package/dist/esm-es5/ShadowViewAddon-90897c22.js +1 -0
- package/dist/esm-es5/email-registration-view-07d80492.js +1 -0
- package/dist/esm-es5/{global-04c7d3b5.js → global-e7bb0343.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-invoice-table-view-2175569f.js +1 -0
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-container-view-ab89c6cc.js +1 -0
- package/dist/esm-es5/{sqm-portal-email-verification-view-4307c992.js → sqm-portal-email-verification-view-0b32261f.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-ffe955c8.js → sqm-portal-profile-view-03026a5e.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/p-007383e1.entry.js +9 -0
- package/dist/mint-components/{p-10685090.js → p-05948592.js} +23 -23
- package/dist/mint-components/p-05a9bc83.entry.js +9 -0
- package/dist/mint-components/{p-4d233cd4.js → p-0e556260.js} +1 -1
- package/dist/mint-components/p-10036f16.js +1 -0
- package/dist/mint-components/p-227dec48.js +1 -0
- package/dist/mint-components/p-3dbf752a.system.entry.js +1 -0
- package/dist/mint-components/p-445ffcfd.system.entry.js +1 -0
- package/dist/mint-components/p-482bf487.system.js +1 -0
- package/dist/mint-components/{p-b6fc1227.system.entry.js → p-4864ed8a.system.entry.js} +1 -1
- package/dist/mint-components/p-5301a2da.system.entry.js +1 -0
- package/dist/mint-components/{p-01cfff8a.system.entry.js → p-55a782cf.system.entry.js} +1 -1
- package/dist/mint-components/{p-59fe4ad1.system.js → p-573fab0f.system.js} +1 -1
- package/dist/mint-components/{p-56f14840.entry.js → p-57e4ef5f.entry.js} +1 -1
- package/dist/mint-components/p-5956a47e.entry.js +1 -0
- package/dist/mint-components/{p-7049e9b0.entry.js → p-5d485450.entry.js} +1 -1
- package/dist/mint-components/p-64491c96.system.entry.js +1 -0
- package/dist/mint-components/{p-ce621bcc.js → p-66172a05.js} +1 -1
- package/dist/mint-components/p-6bf41e0d.system.js +1 -0
- package/dist/mint-components/p-76b69493.entry.js +174 -0
- package/dist/mint-components/{p-b4c52c5a.entry.js → p-7a572b34.entry.js} +1 -1
- package/dist/mint-components/{p-be4b748a.system.entry.js → p-8fe21979.system.entry.js} +1 -1
- package/dist/mint-components/p-922578e4.system.js +1 -0
- package/dist/mint-components/{p-3ec16698.entry.js → p-956ed10a.entry.js} +1 -1
- package/dist/mint-components/p-97198e2c.system.js +1 -0
- package/dist/mint-components/{p-4ea58025.system.entry.js → p-973f6501.system.entry.js} +1 -1
- package/dist/mint-components/{p-8704937c.js → p-9774fbc5.js} +1 -1
- package/dist/mint-components/{p-35d84041.system.entry.js → p-a61e6394.system.entry.js} +1 -1
- package/dist/mint-components/{p-1dd69917.system.entry.js → p-b8dbb809.system.entry.js} +1 -1
- package/dist/mint-components/p-be38de26.system.js +1 -0
- package/dist/mint-components/{p-ed095674.system.js → p-c7a3fd1b.system.js} +1 -1
- package/dist/mint-components/p-cf158064.entry.js +33 -0
- package/dist/mint-components/p-d51eb656.entry.js +187 -0
- package/dist/mint-components/{p-4df8f1d2.system.js → p-d7df3dfd.system.js} +1 -1
- package/dist/mint-components/{p-32d1d162.entry.js → p-dab544d9.entry.js} +1 -1
- package/dist/mint-components/{p-c7fd9e16.js → p-e704842c.js} +1 -1
- package/dist/mint-components/{p-8679ed9f.system.entry.js → p-e84a74fe.system.entry.js} +1 -1
- package/dist/mint-components/{p-7f088154.entry.js → p-ebcec043.entry.js} +1 -1
- package/dist/mint-components/p-f8f6c99d.system.entry.js +1 -0
- package/dist/types/components/sqm-card-feed/sqm-card-feed.d.ts +1 -1
- package/dist/types/components/sqm-image/sqm-image-view.d.ts +0 -1
- package/dist/types/components/sqm-image/sqm-image.d.ts +0 -5
- package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +1 -5
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +4 -6
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +6 -23
- package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +2 -4
- package/dist/types/components/sqm-portal-container/PortalContainer.stories.d.ts +0 -1
- package/dist/types/components/sqm-portal-container/sqm-portal-container-view.d.ts +0 -1
- package/dist/types/components/sqm-portal-container/sqm-portal-container.d.ts +0 -7
- package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +2 -2
- package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.d.ts +5 -3
- package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +2 -1
- package/dist/types/components/tax-and-cash/utils.d.ts +2 -2
- package/dist/types/components.d.ts +14 -66
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -2
- package/dist/esm-es5/ShadowViewAddon-e012b2aa.js +0 -1
- package/dist/esm-es5/email-registration-view-a89a88bf.js +0 -1
- package/dist/esm-es5/sqm-invoice-table-view-34ac7513.js +0 -1
- package/dist/esm-es5/sqm-portal-container-view-6c582684.js +0 -1
- package/dist/mint-components/p-1c857edb.entry.js +0 -33
- package/dist/mint-components/p-2ffefa3b.entry.js +0 -223
- package/dist/mint-components/p-31e810e9.entry.js +0 -168
- package/dist/mint-components/p-509e29e6.js +0 -1
- package/dist/mint-components/p-5de21018.system.entry.js +0 -1
- package/dist/mint-components/p-7497a4f6.system.entry.js +0 -1
- package/dist/mint-components/p-81689347.entry.js +0 -9
- package/dist/mint-components/p-84361da0.system.entry.js +0 -1
- package/dist/mint-components/p-95771f79.system.js +0 -1
- package/dist/mint-components/p-9f0629ba.system.entry.js +0 -1
- package/dist/mint-components/p-a1dba9a1.system.entry.js +0 -1
- package/dist/mint-components/p-a51533cb.system.js +0 -1
- package/dist/mint-components/p-b23d5520.js +0 -1
- package/dist/mint-components/p-bc51264d.system.js +0 -1
- package/dist/mint-components/p-d8d2de11.entry.js +0 -1
- package/dist/mint-components/p-e3735866.entry.js +0 -11
- package/dist/mint-components/p-ed17e637.system.js +0 -1
- package/dist/mint-components/p-ed6ebd60.system.js +0 -1
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-72742a0b.js');
|
|
7
|
-
const global = require('./global-
|
|
7
|
+
const global = require('./global-4a59a374.js');
|
|
8
8
|
const index_module = require('./index.module-df530553.js');
|
|
9
9
|
const jsonpointer = require('./jsonpointer-11327262.js');
|
|
10
10
|
const cjs = require('./cjs-1066ec21.js');
|
|
@@ -16,7 +16,7 @@ const useChildElements = require('./useChildElements-e0d44916.js');
|
|
|
16
16
|
const luxon = require('./luxon-05098e19.js');
|
|
17
17
|
const useReferralTable = require('./useReferralTable-a76adb0d.js');
|
|
18
18
|
const utils = require('./utils-6847bc06.js');
|
|
19
|
-
const sqmInvoiceTableView = require('./sqm-invoice-table-view-
|
|
19
|
+
const sqmInvoiceTableView = require('./sqm-invoice-table-view-c26fb670.js');
|
|
20
20
|
|
|
21
21
|
const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
|
|
22
22
|
const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
|
|
@@ -749,8 +749,7 @@ const style = {
|
|
|
749
749
|
background: "var(--sl-color-gray-200)",
|
|
750
750
|
},
|
|
751
751
|
LargeSkeleton: {
|
|
752
|
-
width: "
|
|
753
|
-
maxWidth: "320px",
|
|
752
|
+
width: "320px",
|
|
754
753
|
height: "40px",
|
|
755
754
|
borderRadius: "50px",
|
|
756
755
|
background: "var(--sl-color-gray-200)",
|
|
@@ -1639,6 +1638,13 @@ const GET_TAX_DOCUMENT = index_module.dist.gql `
|
|
|
1639
1638
|
}
|
|
1640
1639
|
}
|
|
1641
1640
|
`;
|
|
1641
|
+
const COMPLETE_TAX_DOCUMENT = index_module.dist.gql `
|
|
1642
|
+
mutation completeImpactPublisherTaxDocument($vars: UserIdInput!) {
|
|
1643
|
+
completeImpactPublisherTaxDocument(user: $vars) {
|
|
1644
|
+
success
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
`;
|
|
1642
1648
|
const DOCUSIGN_ERROR_STATES = [
|
|
1643
1649
|
"exception",
|
|
1644
1650
|
"decline",
|
|
@@ -1646,22 +1652,22 @@ const DOCUSIGN_ERROR_STATES = [
|
|
|
1646
1652
|
"fax_pending",
|
|
1647
1653
|
];
|
|
1648
1654
|
const DOCUSIGN_EXPIRED_STATES = ["ttl_expired", "session_timeout"];
|
|
1649
|
-
const DOCUSIGN_SUCCESS_STATES = ["signing_complete", "viewing_complete"];
|
|
1650
1655
|
function useDocusignForm(props) {
|
|
1651
|
-
var _a, _b, _c
|
|
1656
|
+
var _a, _b, _c;
|
|
1652
1657
|
const user = index_module.Q();
|
|
1653
1658
|
const context = index_module.In(TAX_FORM_CONTEXT_NAMESPACE);
|
|
1654
1659
|
const [step, setStep] = index_module.bn(TAX_CONTEXT_NAMESPACE);
|
|
1655
1660
|
const { data, loading: userLoading, refetch, } = index_module.Mn(USER_QUERY_NAMESPACE);
|
|
1656
1661
|
const publisher = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
|
|
1657
1662
|
const [createTaxDocument, { loading: documentLoading, data: document, errors: documentErrors },] = index_module.$e(GET_TAX_DOCUMENT);
|
|
1663
|
+
const [completeTaxDocument, { loading: completeDocumentLoading, data: completeData, errors: completeErrors, },] = index_module.$e(COMPLETE_TAX_DOCUMENT);
|
|
1658
1664
|
const [docusignStatus, setDocusignStatus] = stencilHooks_module.useState(undefined);
|
|
1659
1665
|
const [participantType, setParticipantType] = stencilHooks_module.useState(undefined);
|
|
1660
1666
|
const [errors, setErrors] = stencilHooks_module.useState({});
|
|
1661
1667
|
const [loading, setLoading] = stencilHooks_module.useState(false);
|
|
1662
1668
|
// Only look at current document if it's valid (same as required type)
|
|
1663
|
-
const existingDocumentType = sqmInvoiceTableView.validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType
|
|
1664
|
-
?
|
|
1669
|
+
const existingDocumentType = sqmInvoiceTableView.validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) && (publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument)
|
|
1670
|
+
? publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType : undefined;
|
|
1665
1671
|
const actualDocumentType = existingDocumentType ||
|
|
1666
1672
|
getDocumentType(participantType) || (publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType);
|
|
1667
1673
|
stencilHooks_module.useEffect(() => {
|
|
@@ -1675,19 +1681,14 @@ function useDocusignForm(props) {
|
|
|
1675
1681
|
}
|
|
1676
1682
|
}, [existingDocumentType]);
|
|
1677
1683
|
stencilHooks_module.useEffect(() => {
|
|
1678
|
-
var _a;
|
|
1679
1684
|
// Skip if no publisher info
|
|
1680
1685
|
if (!user || !publisher)
|
|
1681
1686
|
return;
|
|
1682
|
-
// Skip on initial load of W8 case
|
|
1683
|
-
if (((_a = publisher.requiredTaxDocumentType) === null || _a === void 0 ? void 0 : _a.startsWith("W8")) &&
|
|
1684
|
-
!publisher.currentTaxDocument &&
|
|
1685
|
-
!participantType)
|
|
1686
|
-
return;
|
|
1687
1687
|
const fetchDocument = async () => {
|
|
1688
1688
|
try {
|
|
1689
1689
|
const result = await createTaxDocument({
|
|
1690
1690
|
vars: {
|
|
1691
|
+
provider: "COMPLY_EXCHANGE",
|
|
1691
1692
|
user: {
|
|
1692
1693
|
id: user.id,
|
|
1693
1694
|
accountId: user.accountId,
|
|
@@ -1706,33 +1707,36 @@ function useDocusignForm(props) {
|
|
|
1706
1707
|
};
|
|
1707
1708
|
fetchDocument();
|
|
1708
1709
|
}, [user, publisher, participantType]);
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
try {
|
|
1712
|
-
setLoading(true);
|
|
1713
|
-
await refetch();
|
|
1714
|
-
// Skip banking info form if it already is saved
|
|
1715
|
-
// or if brandedSignup is false
|
|
1716
|
-
setStep(context.overrideNextStep ||
|
|
1717
|
-
!!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
|
|
1718
|
-
!(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
|
|
1719
|
-
? "/dashboard"
|
|
1720
|
-
: "/4");
|
|
1721
|
-
}
|
|
1722
|
-
catch (e) {
|
|
1723
|
-
setErrors({ general: true });
|
|
1724
|
-
}
|
|
1725
|
-
finally {
|
|
1726
|
-
setLoading(false);
|
|
1727
|
-
}
|
|
1728
|
-
};
|
|
1729
|
-
// Handled in view
|
|
1730
|
-
if (DOCUSIGN_ERROR_STATES.includes(docusignStatus))
|
|
1710
|
+
const completeDocument = async () => {
|
|
1711
|
+
if (!user)
|
|
1731
1712
|
return;
|
|
1732
|
-
|
|
1733
|
-
|
|
1713
|
+
try {
|
|
1714
|
+
setLoading(true);
|
|
1715
|
+
const result = await completeTaxDocument({
|
|
1716
|
+
vars: {
|
|
1717
|
+
id: user.id,
|
|
1718
|
+
accountId: user.accountId,
|
|
1719
|
+
},
|
|
1720
|
+
});
|
|
1721
|
+
console.log({ result });
|
|
1722
|
+
if (!result || result.message)
|
|
1723
|
+
throw new Error();
|
|
1724
|
+
// @ts-expect-error: no data type for result
|
|
1725
|
+
if (!result.completeImpactPublisherTaxDocument.success)
|
|
1726
|
+
throw new Error();
|
|
1727
|
+
setStep(context.overrideNextStep ||
|
|
1728
|
+
!!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
|
|
1729
|
+
!(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
|
|
1730
|
+
? "/dashboard"
|
|
1731
|
+
: "/4");
|
|
1732
|
+
}
|
|
1733
|
+
catch (e) {
|
|
1734
|
+
setErrors({ general: true });
|
|
1735
|
+
}
|
|
1736
|
+
finally {
|
|
1737
|
+
setLoading(false);
|
|
1734
1738
|
}
|
|
1735
|
-
}
|
|
1739
|
+
};
|
|
1736
1740
|
const allLoading = userLoading || documentLoading || loading;
|
|
1737
1741
|
return {
|
|
1738
1742
|
states: {
|
|
@@ -1740,7 +1744,7 @@ function useDocusignForm(props) {
|
|
|
1740
1744
|
hideSteps: context.hideSteps,
|
|
1741
1745
|
disabled: allLoading,
|
|
1742
1746
|
participantTypeDisabled: allLoading || !!existingDocumentType,
|
|
1743
|
-
loading: userLoading || loading,
|
|
1747
|
+
loading: userLoading || loading || completeDocumentLoading,
|
|
1744
1748
|
urlLoading: documentLoading,
|
|
1745
1749
|
loadingError: !!(documentErrors === null || documentErrors === void 0 ? void 0 : documentErrors.message),
|
|
1746
1750
|
formState: {
|
|
@@ -1754,10 +1758,11 @@ function useDocusignForm(props) {
|
|
|
1754
1758
|
},
|
|
1755
1759
|
data: {
|
|
1756
1760
|
taxForm: actualDocumentType,
|
|
1757
|
-
documentUrl: (
|
|
1761
|
+
documentUrl: (_c = document === null || document === void 0 ? void 0 : document.createImpactPublisherTaxDocument) === null || _c === void 0 ? void 0 : _c.documentUrl,
|
|
1758
1762
|
},
|
|
1759
1763
|
callbacks: {
|
|
1760
1764
|
setDocusignStatus,
|
|
1765
|
+
completeDocument,
|
|
1761
1766
|
setParticipantType,
|
|
1762
1767
|
},
|
|
1763
1768
|
text: props.getTextProps(),
|
|
@@ -1775,7 +1780,8 @@ function getDocumentType(p) {
|
|
|
1775
1780
|
const style$1 = {
|
|
1776
1781
|
DocusignStatusContainer: {
|
|
1777
1782
|
width: "100%",
|
|
1778
|
-
|
|
1783
|
+
minHeight: "600px",
|
|
1784
|
+
height: "900px",
|
|
1779
1785
|
display: "flex",
|
|
1780
1786
|
flexDirection: "column",
|
|
1781
1787
|
alignItems: "center",
|
|
@@ -1829,21 +1835,26 @@ const DocusignLoadingView = () => {
|
|
|
1829
1835
|
index.h("div", { class: classes.DocusignStatusContainer },
|
|
1830
1836
|
index.h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } }))));
|
|
1831
1837
|
};
|
|
1832
|
-
const DocusignIframe = ({ states, callbacks, text, }) => {
|
|
1838
|
+
const DocusignIframe = ({ states, data, callbacks, text, }) => {
|
|
1833
1839
|
if (states.urlLoading)
|
|
1834
1840
|
return index.h(DocusignLoadingView, null);
|
|
1841
|
+
// TODO: Confirm impact domain before launch
|
|
1842
|
+
const allowedDomains = [
|
|
1843
|
+
"referralsaasquatch.com",
|
|
1844
|
+
"impacttech.complysandbox.com",
|
|
1845
|
+
];
|
|
1835
1846
|
const callback = index_module.useCallback((e) => {
|
|
1836
|
-
var _a;
|
|
1837
|
-
if (!
|
|
1847
|
+
const allowed = allowedDomains.some((d) => { var _a; return (_a = e.origin) === null || _a === void 0 ? void 0 : _a.includes(d); });
|
|
1848
|
+
if (!allowed)
|
|
1838
1849
|
return;
|
|
1839
|
-
if (
|
|
1840
|
-
|
|
1841
|
-
|
|
1850
|
+
if (e.data === "Complyexchange Thank you page Exit") {
|
|
1851
|
+
callbacks.completeDocument();
|
|
1852
|
+
}
|
|
1842
1853
|
}, []);
|
|
1843
1854
|
stencilHooks_module.useEffect(() => {
|
|
1844
|
-
window.addEventListener("message", callback);
|
|
1855
|
+
window.addEventListener("message", callback, false);
|
|
1845
1856
|
return () => {
|
|
1846
|
-
window.removeEventListener("message", callback);
|
|
1857
|
+
window.removeEventListener("message", callback, false);
|
|
1847
1858
|
};
|
|
1848
1859
|
}, []);
|
|
1849
1860
|
if (DOCUSIGN_ERROR_STATES.includes(states.status)) {
|
|
@@ -1851,8 +1862,9 @@ const DocusignIframe = ({ states, callbacks, text, }) => {
|
|
|
1851
1862
|
}
|
|
1852
1863
|
if (DOCUSIGN_EXPIRED_STATES.includes(states.status))
|
|
1853
1864
|
return index.h(DocusignExpiredView, { text: text });
|
|
1854
|
-
return (index.h("iframe", { frameBorder: "0", src:
|
|
1865
|
+
return (index.h("iframe", { frameBorder: "0", src: data.documentUrl, width: "100%", height: "1000px" }));
|
|
1855
1866
|
};
|
|
1867
|
+
// NWH4QF
|
|
1856
1868
|
|
|
1857
1869
|
const style$2 = {
|
|
1858
1870
|
FormWrapper: {
|
|
@@ -1992,7 +2004,7 @@ const vanillaStyle$1 = `
|
|
|
1992
2004
|
|
|
1993
2005
|
`;
|
|
1994
2006
|
const DocusignFormView = (props) => {
|
|
1995
|
-
var _a
|
|
2007
|
+
var _a;
|
|
1996
2008
|
const { states, states: { formState, documentTypeString }, callbacks, text, slots, } = props;
|
|
1997
2009
|
const { classes } = sheet$2;
|
|
1998
2010
|
return (index.h("div", { class: classes.Container },
|
|
@@ -2018,23 +2030,7 @@ const DocusignFormView = (props) => {
|
|
|
2018
2030
|
index.h("strong", null, text.error.generalTitle),
|
|
2019
2031
|
index.h("br", null),
|
|
2020
2032
|
text.error.generalDescription)),
|
|
2021
|
-
|
|
2022
|
-
index.h("p", { class: classes.BoldText }, text.participantType),
|
|
2023
|
-
states.loading ? (index.h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } })) : (index.h("div", { style: { display: "flex", flexDirection: "column" } },
|
|
2024
|
-
index.h("sl-radio", { exportparts: "base: radio-base", value: "individualParticipant", name: "/participantType", checked: formState.participantType === "individualParticipant", disabled: states.disabled || states.participantTypeDisabled, onClick: () => {
|
|
2025
|
-
if (states.disabled || states.participantTypeDisabled)
|
|
2026
|
-
return;
|
|
2027
|
-
callbacks.setParticipantType("individualParticipant");
|
|
2028
|
-
} },
|
|
2029
|
-
index.h("span", { class: classes.RadioText }, text.individualParticipant)),
|
|
2030
|
-
index.h("sl-radio", { exportparts: "base: radio-base", value: "businessEntity", name: "/participantType", checked: formState.participantType === "businessEntity", disabled: states.disabled || states.participantTypeDisabled, onClick: () => {
|
|
2031
|
-
if (states.disabled || states.participantTypeDisabled)
|
|
2032
|
-
return;
|
|
2033
|
-
callbacks.setParticipantType("businessEntity");
|
|
2034
|
-
} },
|
|
2035
|
-
index.h("span", { class: classes.RadioText }, text.businessEntity)))),
|
|
2036
|
-
((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.participantType) && (index.h("p", { class: classes.ErrorText }, text.error.participantType)))),
|
|
2037
|
-
(states.documentType === "W9" || formState.participantType) && (index.h("div", null,
|
|
2033
|
+
index.h("div", null,
|
|
2038
2034
|
index.h("div", null,
|
|
2039
2035
|
index.h("h5", { class: classes.BoldText }, global.intl.formatMessage({ id: "tax-form-label", defaultMessage: text.taxFormLabel }, { documentType: documentTypeString })),
|
|
2040
2036
|
index.h("p", null, global.intl.formatMessage({
|
|
@@ -2049,7 +2045,7 @@ const DocusignFormView = (props) => {
|
|
|
2049
2045
|
index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "primary", open: true, class: classes.InfoAlert },
|
|
2050
2046
|
index.h("sl-icon", { class: classes.InfoIcon, slot: "icon", name: "info-circle" }),
|
|
2051
2047
|
text.docusignSessionWarning),
|
|
2052
|
-
slots.docusignIframeSlot))))
|
|
2048
|
+
slots.docusignIframeSlot))));
|
|
2053
2049
|
};
|
|
2054
2050
|
|
|
2055
2051
|
const DocusignForm = class {
|
|
@@ -2172,12 +2168,13 @@ const DocusignForm = class {
|
|
|
2172
2168
|
const _isDemo = index_module.isDemo();
|
|
2173
2169
|
const props = _isDemo ? useDocusignFormDemo(this) : useDocusignForm(this);
|
|
2174
2170
|
const docusignIframeSlot = (index.h(DocusignIframe, { states: {
|
|
2175
|
-
url: props.data.documentUrl,
|
|
2176
2171
|
status: props.states.docusignStatus,
|
|
2177
2172
|
loading: props.states.loading,
|
|
2178
2173
|
urlLoading: props.states.urlLoading,
|
|
2174
|
+
}, data: {
|
|
2175
|
+
documentUrl: props.data.documentUrl,
|
|
2179
2176
|
}, callbacks: {
|
|
2180
|
-
|
|
2177
|
+
completeDocument: props.callbacks.completeDocument,
|
|
2181
2178
|
}, text: props.text }));
|
|
2182
2179
|
return (index.h(index.Host, null, index.h(DocusignFormView, { callbacks: props.callbacks, states: props.states, text: props.text, slots: {
|
|
2183
2180
|
docusignIframeSlot: _isDemo
|
|
@@ -2525,7 +2522,7 @@ function useIndirectTaxForm(props) {
|
|
|
2525
2522
|
setFormState((p) => ({ ...p, [field]: value }));
|
|
2526
2523
|
};
|
|
2527
2524
|
const onSubmit = async (event) => {
|
|
2528
|
-
var _a, _b, _c, _d, _e
|
|
2525
|
+
var _a, _b, _c, _d, _e;
|
|
2529
2526
|
if (!option) {
|
|
2530
2527
|
setErrors({ taxDetails: true });
|
|
2531
2528
|
return;
|
|
@@ -2586,7 +2583,7 @@ function useIndirectTaxForm(props) {
|
|
|
2586
2583
|
await refetch();
|
|
2587
2584
|
const resultPublisher = (_e = (_d = (_c = result
|
|
2588
2585
|
.createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
|
|
2589
|
-
const hasValidCurrentDocument = sqmInvoiceTableView.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType
|
|
2586
|
+
const hasValidCurrentDocument = sqmInvoiceTableView.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
2590
2587
|
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
2591
2588
|
!hasValidCurrentDocument) {
|
|
2592
2589
|
// Go to docusign form
|
|
@@ -3726,8 +3723,7 @@ function getCurrentStep(user) {
|
|
|
3726
3723
|
}
|
|
3727
3724
|
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, } = user.impactConnection.publisher;
|
|
3728
3725
|
// If they do have a required document, look at current document
|
|
3729
|
-
if (requiredTaxDocumentType &&
|
|
3730
|
-
!sqmInvoiceTableView.validTaxDocument(requiredTaxDocumentType, currentTaxDocument === null || currentTaxDocument === void 0 ? void 0 : currentTaxDocument.type))
|
|
3726
|
+
if (requiredTaxDocumentType && !currentTaxDocument)
|
|
3731
3727
|
return "/3";
|
|
3732
3728
|
if (!withdrawalSettings && brandedSignup)
|
|
3733
3729
|
return "/4";
|
|
@@ -5174,7 +5170,7 @@ function getIndirectTaxType(taxInformation) {
|
|
|
5174
5170
|
return "Indirect Tax";
|
|
5175
5171
|
}
|
|
5176
5172
|
const useTaxAndCashDashboard = (props) => {
|
|
5177
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
5173
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
5178
5174
|
const setStep = index_module.wn(TAX_CONTEXT_NAMESPACE);
|
|
5179
5175
|
const setContext = index_module.wn(TAX_FORM_CONTEXT_NAMESPACE);
|
|
5180
5176
|
const [showDialog, setShowDialog] = stencilHooks_module.useState(false);
|
|
@@ -5185,8 +5181,8 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
5185
5181
|
}, []);
|
|
5186
5182
|
const { data, loading, errors: userError, } = index_module.Mn(USER_QUERY_NAMESPACE);
|
|
5187
5183
|
const publisher = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
|
|
5188
|
-
const documentType =
|
|
5189
|
-
const submissionDate = (
|
|
5184
|
+
const documentType = publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType;
|
|
5185
|
+
const submissionDate = (_c = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _c === void 0 ? void 0 : _c.dateCreated;
|
|
5190
5186
|
const dateSubmitted = submissionDate
|
|
5191
5187
|
? luxon.luxon.DateTime.fromMillis(submissionDate).toFormat("LLL dd, yyyy")
|
|
5192
5188
|
: undefined;
|
|
@@ -5207,23 +5203,23 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
5207
5203
|
});
|
|
5208
5204
|
setStep("/3");
|
|
5209
5205
|
};
|
|
5210
|
-
const provinceName = (
|
|
5206
|
+
const provinceName = (_d = sqmInvoiceTableView.INDIRECT_TAX_PROVINCES.find((p) => { var _a; return p.regionCode === ((_a = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _a === void 0 ? void 0 : _a.indirectTaxRegion); })) === null || _d === void 0 ? void 0 : _d.displayName;
|
|
5211
5207
|
return {
|
|
5212
5208
|
states: {
|
|
5213
5209
|
dateSubmitted,
|
|
5214
5210
|
documentType,
|
|
5215
5211
|
canEditPayoutInfo: publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup,
|
|
5216
5212
|
documentTypeString: sqmInvoiceTableView.taxTypeToName(documentType),
|
|
5217
|
-
status: (
|
|
5218
|
-
subRegion: getSubRegionName((
|
|
5219
|
-
subRegionTaxNumber: (
|
|
5220
|
-
qstNumber: (
|
|
5213
|
+
status: (_e = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _e === void 0 ? void 0 : _e.status,
|
|
5214
|
+
subRegion: getSubRegionName((_f = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _f === void 0 ? void 0 : _f.indirectTaxRegion),
|
|
5215
|
+
subRegionTaxNumber: (_g = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _g === void 0 ? void 0 : _g.withholdingTaxId,
|
|
5216
|
+
qstNumber: (_h = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _h === void 0 ? void 0 : _h.additionalTaxId,
|
|
5221
5217
|
indirectTaxType: getIndirectTaxType(publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation),
|
|
5222
|
-
indirectTaxNumber: (
|
|
5218
|
+
indirectTaxNumber: (_j = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _j === void 0 ? void 0 : _j.indirectTaxId,
|
|
5223
5219
|
isBusinessEntity: (publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) === "W8BENE",
|
|
5224
5220
|
province: provinceName,
|
|
5225
|
-
country: getCountryName((
|
|
5226
|
-
notRegistered: !((
|
|
5221
|
+
country: getCountryName((_k = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _k === void 0 ? void 0 : _k.indirectTaxCountryCode, locale),
|
|
5222
|
+
notRegistered: !((_l = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _l === void 0 ? void 0 : _l.indirectTaxId),
|
|
5227
5223
|
noFormNeeded: !documentType,
|
|
5228
5224
|
disabled: loading,
|
|
5229
5225
|
loading,
|
|
@@ -6600,27 +6596,6 @@ const style$6 = {
|
|
|
6600
6596
|
color: "var(--sl-color-neutral-500)",
|
|
6601
6597
|
fontSize: "var(--sl-font-size-medium)",
|
|
6602
6598
|
},
|
|
6603
|
-
PhoneInputsSection: {
|
|
6604
|
-
display: "flex",
|
|
6605
|
-
alignItems: "flex-start",
|
|
6606
|
-
flexDirection: "column",
|
|
6607
|
-
gap: "4px",
|
|
6608
|
-
"& p": {
|
|
6609
|
-
fontSize: "var(--sl-font-size-small)",
|
|
6610
|
-
color: "var(--sl-input-label-color)",
|
|
6611
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
6612
|
-
},
|
|
6613
|
-
},
|
|
6614
|
-
PhoneInputsContainer: {
|
|
6615
|
-
display: "flex",
|
|
6616
|
-
alignItems: "flex-start",
|
|
6617
|
-
gap: "4px",
|
|
6618
|
-
width: "100%",
|
|
6619
|
-
"& #phoneNumber": {
|
|
6620
|
-
width: "100%",
|
|
6621
|
-
minWidth: "0px",
|
|
6622
|
-
},
|
|
6623
|
-
},
|
|
6624
6599
|
};
|
|
6625
6600
|
const sheet$5 = JSS.createStyleSheet(style$6);
|
|
6626
6601
|
const styleString$5 = sheet$5.toString();
|
|
@@ -6646,7 +6621,7 @@ const vanillaStyle$3 = `
|
|
|
6646
6621
|
}
|
|
6647
6622
|
|
|
6648
6623
|
sl-select#phoneNumberCountryCode::part(menu) {
|
|
6649
|
-
|
|
6624
|
+
width: 450px;
|
|
6650
6625
|
}
|
|
6651
6626
|
`;
|
|
6652
6627
|
const UserInfoFormView = (props) => {
|
|
@@ -6729,39 +6704,37 @@ const UserInfoFormView = (props) => {
|
|
|
6729
6704
|
} }), (_e = data === null || data === void 0 ? void 0 : data.countries) === null || _e === void 0 ? void 0 :
|
|
6730
6705
|
_e.map((c) => (index.h("sl-menu-item", { value: c.countryCode }, c.displayName))), (_f = data === null || data === void 0 ? void 0 : data.allCountries) === null || _f === void 0 ? void 0 :
|
|
6731
6706
|
_f.map((c) => (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName)))),
|
|
6732
|
-
index.h("div", {
|
|
6733
|
-
index.h("
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
}
|
|
6764
|
-
: {}), { required: true })))),
|
|
6707
|
+
index.h("div", { style: { display: "flex", gap: "4px" } },
|
|
6708
|
+
index.h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", label: text.phoneNumber, style: { minWidth: "140px" }, value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
|
|
6709
|
+
class: classes.ErrorInput,
|
|
6710
|
+
}
|
|
6711
|
+
: {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
|
|
6712
|
+
index.h("sl-input", { class: classes.SearchInput, placeholder: text.searchForCountryText, onKeyDown: (e) => {
|
|
6713
|
+
// Stop shoelace intercepting key presses
|
|
6714
|
+
e.stopPropagation();
|
|
6715
|
+
}, "onSl-input": (e) => {
|
|
6716
|
+
callbacks.setPhoneCountrySearch(e.target.value);
|
|
6717
|
+
} }), (_h = data === null || data === void 0 ? void 0 : data.phoneCountries) === null || _h === void 0 ? void 0 :
|
|
6718
|
+
_h.map((c) => {
|
|
6719
|
+
var _a, _b;
|
|
6720
|
+
return (index.h("sl-menu-item", { style: { width: "500px" }, value: c.countryCode },
|
|
6721
|
+
index.h("div", { slot: "prefix", style: { marginRight: "8px" } }, `${(_a = PHONE_EXTENSIONS[c.countryCode]) === null || _a === void 0 ? void 0 : _a.name} `), (_b = PHONE_EXTENSIONS[c.countryCode]) === null || _b === void 0 ? void 0 :
|
|
6722
|
+
_b.dial_code));
|
|
6723
|
+
}), (_j = data === null || data === void 0 ? void 0 : data.allCountries) === null || _j === void 0 ? void 0 :
|
|
6724
|
+
_j.map((c) => {
|
|
6725
|
+
var _a, _b;
|
|
6726
|
+
return (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } },
|
|
6727
|
+
index.h("div", { slot: "prefix", style: { marginRight: "8px" } }, `${(_a = PHONE_EXTENSIONS[c.countryCode]) === null || _a === void 0 ? void 0 : _a.name} `), (_b = PHONE_EXTENSIONS[c.countryCode]) === null || _b === void 0 ? void 0 :
|
|
6728
|
+
_b.dial_code));
|
|
6729
|
+
})),
|
|
6730
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: " ", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, style: { marginTop: "2px", width: "362px" }, validationError: ({ value }) =>
|
|
6731
|
+
// Naive phone number validation
|
|
6732
|
+
sqmInvoiceTableView.validateBillingField(/[a-zA-Z]+/, value) &&
|
|
6733
|
+
sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError), disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
6734
|
+
class: classes.ErrorInput,
|
|
6735
|
+
helpText: sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
6736
|
+
}
|
|
6737
|
+
: {}), { required: true }))),
|
|
6765
6738
|
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
|
|
6766
6739
|
// Checks for non-ASCII characters
|
|
6767
6740
|
!sqmInvoiceTableView.validateBillingField(/^[\x20-\xFF]+$/, value) &&
|