@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
package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useLocale, useParentQueryValue, useSetParent } from "@saasquatch/component-boilerplate";
|
|
1
|
+
import { useLocale, useParentQueryValue, useSetParent, } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useEffect, useState } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { DateTime } from "luxon";
|
|
4
4
|
import { vatLabels } from "../countries";
|
|
@@ -40,7 +40,7 @@ function getIndirectTaxType(taxInformation) {
|
|
|
40
40
|
return "Indirect Tax";
|
|
41
41
|
}
|
|
42
42
|
export const useTaxAndCashDashboard = (props) => {
|
|
43
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
43
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
44
44
|
const setStep = useSetParent(TAX_CONTEXT_NAMESPACE);
|
|
45
45
|
const setContext = useSetParent(TAX_FORM_CONTEXT_NAMESPACE);
|
|
46
46
|
const [showDialog, setShowDialog] = useState(false);
|
|
@@ -51,8 +51,8 @@ export const useTaxAndCashDashboard = (props) => {
|
|
|
51
51
|
}, []);
|
|
52
52
|
const { data, loading, errors: userError, } = useParentQueryValue(USER_QUERY_NAMESPACE);
|
|
53
53
|
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;
|
|
54
|
-
const documentType =
|
|
55
|
-
const submissionDate = (
|
|
54
|
+
const documentType = publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType;
|
|
55
|
+
const submissionDate = (_c = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _c === void 0 ? void 0 : _c.dateCreated;
|
|
56
56
|
const dateSubmitted = submissionDate
|
|
57
57
|
? DateTime.fromMillis(submissionDate).toFormat("LLL dd, yyyy")
|
|
58
58
|
: undefined;
|
|
@@ -73,23 +73,23 @@ export const useTaxAndCashDashboard = (props) => {
|
|
|
73
73
|
});
|
|
74
74
|
setStep("/3");
|
|
75
75
|
};
|
|
76
|
-
const provinceName = (
|
|
76
|
+
const provinceName = (_d = 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;
|
|
77
77
|
return {
|
|
78
78
|
states: {
|
|
79
79
|
dateSubmitted,
|
|
80
80
|
documentType,
|
|
81
81
|
canEditPayoutInfo: publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup,
|
|
82
82
|
documentTypeString: taxTypeToName(documentType),
|
|
83
|
-
status: (
|
|
84
|
-
subRegion: getSubRegionName((
|
|
85
|
-
subRegionTaxNumber: (
|
|
86
|
-
qstNumber: (
|
|
83
|
+
status: (_e = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _e === void 0 ? void 0 : _e.status,
|
|
84
|
+
subRegion: getSubRegionName((_f = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _f === void 0 ? void 0 : _f.indirectTaxRegion),
|
|
85
|
+
subRegionTaxNumber: (_g = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _g === void 0 ? void 0 : _g.withholdingTaxId,
|
|
86
|
+
qstNumber: (_h = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _h === void 0 ? void 0 : _h.additionalTaxId,
|
|
87
87
|
indirectTaxType: getIndirectTaxType(publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation),
|
|
88
|
-
indirectTaxNumber: (
|
|
88
|
+
indirectTaxNumber: (_j = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _j === void 0 ? void 0 : _j.indirectTaxId,
|
|
89
89
|
isBusinessEntity: (publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) === "W8BENE",
|
|
90
90
|
province: provinceName,
|
|
91
|
-
country: getCountryName((
|
|
92
|
-
notRegistered: !((
|
|
91
|
+
country: getCountryName((_k = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _k === void 0 ? void 0 : _k.indirectTaxCountryCode, locale),
|
|
92
|
+
notRegistered: !((_l = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _l === void 0 ? void 0 : _l.indirectTaxId),
|
|
93
93
|
noFormNeeded: !documentType,
|
|
94
94
|
disabled: loading,
|
|
95
95
|
loading,
|
package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js
CHANGED
|
@@ -83,27 +83,6 @@ const style = {
|
|
|
83
83
|
color: "var(--sl-color-neutral-500)",
|
|
84
84
|
fontSize: "var(--sl-font-size-medium)",
|
|
85
85
|
},
|
|
86
|
-
PhoneInputsSection: {
|
|
87
|
-
display: "flex",
|
|
88
|
-
alignItems: "flex-start",
|
|
89
|
-
flexDirection: "column",
|
|
90
|
-
gap: "4px",
|
|
91
|
-
"& p": {
|
|
92
|
-
fontSize: "var(--sl-font-size-small)",
|
|
93
|
-
color: "var(--sl-input-label-color)",
|
|
94
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
PhoneInputsContainer: {
|
|
98
|
-
display: "flex",
|
|
99
|
-
alignItems: "flex-start",
|
|
100
|
-
gap: "4px",
|
|
101
|
-
width: "100%",
|
|
102
|
-
"& #phoneNumber": {
|
|
103
|
-
width: "100%",
|
|
104
|
-
minWidth: "0px",
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
86
|
};
|
|
108
87
|
const sheet = createStyleSheet(style);
|
|
109
88
|
const styleString = sheet.toString();
|
|
@@ -129,7 +108,7 @@ const vanillaStyle = `
|
|
|
129
108
|
}
|
|
130
109
|
|
|
131
110
|
sl-select#phoneNumberCountryCode::part(menu) {
|
|
132
|
-
|
|
111
|
+
width: 450px;
|
|
133
112
|
}
|
|
134
113
|
`;
|
|
135
114
|
export const UserInfoFormView = (props) => {
|
|
@@ -212,39 +191,37 @@ export const UserInfoFormView = (props) => {
|
|
|
212
191
|
} }), (_e = data === null || data === void 0 ? void 0 : data.countries) === null || _e === void 0 ? void 0 :
|
|
213
192
|
_e.map((c) => (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 :
|
|
214
193
|
_f.map((c) => (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName)))),
|
|
215
|
-
h("div", {
|
|
216
|
-
h("
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
: {}), { required: true })))),
|
|
194
|
+
h("div", { style: { display: "flex", gap: "4px" } },
|
|
195
|
+
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) ? {
|
|
196
|
+
class: classes.ErrorInput,
|
|
197
|
+
}
|
|
198
|
+
: {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
|
|
199
|
+
h("sl-input", { class: classes.SearchInput, placeholder: text.searchForCountryText, onKeyDown: (e) => {
|
|
200
|
+
// Stop shoelace intercepting key presses
|
|
201
|
+
e.stopPropagation();
|
|
202
|
+
}, "onSl-input": (e) => {
|
|
203
|
+
callbacks.setPhoneCountrySearch(e.target.value);
|
|
204
|
+
} }), (_h = data === null || data === void 0 ? void 0 : data.phoneCountries) === null || _h === void 0 ? void 0 :
|
|
205
|
+
_h.map((c) => {
|
|
206
|
+
var _a, _b;
|
|
207
|
+
return (h("sl-menu-item", { style: { width: "500px" }, value: c.countryCode },
|
|
208
|
+
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 :
|
|
209
|
+
_b.dial_code));
|
|
210
|
+
}), (_j = data === null || data === void 0 ? void 0 : data.allCountries) === null || _j === void 0 ? void 0 :
|
|
211
|
+
_j.map((c) => {
|
|
212
|
+
var _a, _b;
|
|
213
|
+
return (h("sl-menu-item", { value: c.countryCode, style: { display: "none" } },
|
|
214
|
+
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 :
|
|
215
|
+
_b.dial_code));
|
|
216
|
+
})),
|
|
217
|
+
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 }) =>
|
|
218
|
+
// Naive phone number validation
|
|
219
|
+
validateBillingField(/[a-zA-Z]+/, value) &&
|
|
220
|
+
formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError), disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
221
|
+
class: classes.ErrorInput,
|
|
222
|
+
helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
223
|
+
}
|
|
224
|
+
: {}), { required: true }))),
|
|
248
225
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
|
|
249
226
|
// Checks for non-ASCII characters
|
|
250
227
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { intl } from "../../global/global";
|
|
2
|
-
export function validTaxDocument(requiredType
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if ((requiredType === "W8BEN" || requiredType === "W8BENE") &&
|
|
6
|
-
(currentType === "W8BEN" || currentType === "W8BENE"))
|
|
2
|
+
export function validTaxDocument(requiredType) {
|
|
3
|
+
const validTypes = ["W9", "W8BENE", "W8BEN"];
|
|
4
|
+
if (validTypes.includes(requiredType))
|
|
7
5
|
return true;
|
|
8
6
|
return false;
|
|
9
7
|
}
|
|
@@ -15,9 +13,8 @@ export const taxTypeToName = (taxType) => {
|
|
|
15
13
|
case "W9":
|
|
16
14
|
return "W-9";
|
|
17
15
|
case "W8BEN":
|
|
18
|
-
return "W-8 BEN";
|
|
19
16
|
case "W8BENE":
|
|
20
|
-
return "W-8
|
|
17
|
+
return "W-8";
|
|
21
18
|
default:
|
|
22
19
|
return "";
|
|
23
20
|
}
|
|
@@ -42,7 +42,7 @@ export function EmailRegistrationView(props) {
|
|
|
42
42
|
h("div", { part: "erroralert-text" }, error)));
|
|
43
43
|
};
|
|
44
44
|
const emailValidationRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
45
|
-
return (h("div", {
|
|
45
|
+
return (h("div", { class: sheet.classes.Wrapper, style: {
|
|
46
46
|
border: `${content.hideBorder ? "none" : "1px solid #eaeaea"}`,
|
|
47
47
|
backgroundColor: content.backgroundColor,
|
|
48
48
|
"padding-top": `var(--sl-spacing-${content.paddingTop})`,
|
|
@@ -19,7 +19,7 @@ try {
|
|
|
19
19
|
// SlAlert.register();
|
|
20
20
|
registerIconLibrary("default", {
|
|
21
21
|
// same link that shoelace uses internally
|
|
22
|
-
resolver: (name) => `https://fast.ssqt.io/npm/bootstrap-icons@1.
|
|
22
|
+
resolver: (name) => `https://fast.ssqt.io/npm/bootstrap-icons@1.7.2/icons/${name}.svg`,
|
|
23
23
|
});
|
|
24
24
|
// SlAlert.register();
|
|
25
25
|
customElements.define("sl-alert", SlAlert);
|
|
@@ -152,7 +152,7 @@ export const Dashboard = () => {
|
|
|
152
152
|
gap: "xxx-large",
|
|
153
153
|
minWidth: "150px",
|
|
154
154
|
}),
|
|
155
|
-
h(ShareButtonView, Object.assign({}, twitterButtonProps), "
|
|
155
|
+
h(ShareButtonView, Object.assign({}, twitterButtonProps), "Tweet about us"),
|
|
156
156
|
h(ShareButtonView, Object.assign({}, facebookButtonProps), "Share on Facebook"),
|
|
157
157
|
h(ShareButtonView, Object.assign({}, linkedinButtonProps), "Post on Linkedin"))),
|
|
158
158
|
}))))));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, c as Host, d as getAssetPath, g as getElement } from './index-17b4da69.js';
|
|
2
2
|
import { k as useState, b as browser, u as useMemo } from './stencil-hooks.module-ac12ca1c.js';
|
|
3
|
-
import { i as intl } from './global-
|
|
3
|
+
import { i as intl } from './global-e7bb0343.js';
|
|
4
4
|
import { d as dist, H, Q, y as yn, f as $e, B, a as getEnvironmentSDK, L } from './index.module-def4aec5.js';
|
|
5
5
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
6
6
|
import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-f60a614c.js';
|
|
@@ -11,11 +11,11 @@ import { l as luxonLocale } from './utils-334c1e34.js';
|
|
|
11
11
|
import { T as TextSpanView } from './sqm-text-span-view-8d140661.js';
|
|
12
12
|
import { p as pathToRegexp } from './index-ffa26b43.js';
|
|
13
13
|
import { a as isValidColor, b as isMobile } from './utilities-3f5bba22.js';
|
|
14
|
-
import { a as PortalSectionView, P as PortalContainerView } from './sqm-portal-container-view-
|
|
14
|
+
import { a as PortalSectionView, P as PortalContainerView } from './sqm-portal-container-view-ab89c6cc.js';
|
|
15
15
|
|
|
16
16
|
const medium = {
|
|
17
17
|
facebook: { color: "#1877f2", text: "#fff", icon: "facebook" },
|
|
18
|
-
twitter: { color: "#
|
|
18
|
+
twitter: { color: "#1da1f2", text: "#fff", icon: "twitter" },
|
|
19
19
|
email: { color: "#666666", text: "#fff", icon: "envelope" },
|
|
20
20
|
direct: { color: "var(--sl-color-primary-500)", text: "#fff", icon: "send" },
|
|
21
21
|
linkedin: { color: "#0077b5", text: "#fff", icon: "linkedin" },
|
|
@@ -109,10 +109,9 @@ const style$1 = {
|
|
|
109
109
|
fontWeight: "var(--sl-font-weight-normal)",
|
|
110
110
|
},
|
|
111
111
|
"& .ellipses": {
|
|
112
|
-
textAlign: "
|
|
112
|
+
textAlign: "center",
|
|
113
113
|
padding: "0",
|
|
114
114
|
color: "var(--sl-color-neutral-500)",
|
|
115
|
-
paddingLeft: "25%",
|
|
116
115
|
},
|
|
117
116
|
"& .highlight": {
|
|
118
117
|
background: "var(--sl-color-primary-50)",
|
|
@@ -128,12 +127,6 @@ const style$1 = {
|
|
|
128
127
|
width: "auto",
|
|
129
128
|
whiteSpace: "nowrap",
|
|
130
129
|
},
|
|
131
|
-
"& .Rank": {
|
|
132
|
-
whiteSpace: "nowrap",
|
|
133
|
-
},
|
|
134
|
-
"& .fullWidth": {
|
|
135
|
-
width: "100%",
|
|
136
|
-
},
|
|
137
130
|
},
|
|
138
131
|
};
|
|
139
132
|
const sheet$1 = createStyleSheet(style$1);
|
|
@@ -144,76 +137,58 @@ const vanillaStyle = `
|
|
|
144
137
|
}
|
|
145
138
|
`;
|
|
146
139
|
function LeaderboardView(props) {
|
|
147
|
-
var _a, _b, _c;
|
|
140
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
148
141
|
const { states, data, elements } = props;
|
|
149
142
|
const { styles } = states;
|
|
150
|
-
if (states.
|
|
151
|
-
return (h("
|
|
152
|
-
}
|
|
153
|
-
if (states.loading) {
|
|
154
|
-
return (h("div", { class: sheet$1.classes.Leaderboard, style: { width: styles.width || "100%" } },
|
|
143
|
+
if (states.loading)
|
|
144
|
+
return (h("div", { class: sheet$1.classes.Leaderboard },
|
|
155
145
|
h("style", { type: "text/css" },
|
|
156
146
|
styleString$1,
|
|
157
147
|
vanillaStyle),
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
h("sl-skeleton", null))));
|
|
162
|
-
}))));
|
|
163
|
-
}
|
|
148
|
+
elements.loadingstate));
|
|
149
|
+
if (states.isEssentials)
|
|
150
|
+
return elements.essentials;
|
|
164
151
|
if (!states.hasLeaders)
|
|
165
152
|
return elements.empty;
|
|
166
153
|
let userSeenFlag = false;
|
|
167
|
-
|
|
168
|
-
if (!user.firstName && !user.lastInitial)
|
|
169
|
-
return styles.anonymousUser;
|
|
170
|
-
const { firstName, lastInitial } = user;
|
|
171
|
-
if (firstName && lastInitial)
|
|
172
|
-
return `${firstName} ${lastInitial}`;
|
|
173
|
-
if (firstName || lastInitial)
|
|
174
|
-
return firstName || lastInitial;
|
|
175
|
-
return styles.anonymousUser;
|
|
176
|
-
};
|
|
177
|
-
const getRankCellText = (userRank, isViewingUsersRow) => {
|
|
178
|
-
if (!userRank) {
|
|
179
|
-
return styles.hideNames ? `${styles.viewingUserText}` : "-";
|
|
180
|
-
}
|
|
181
|
-
const viewingUserText = ` - ${styles.viewingUserText}`;
|
|
182
|
-
return styles.rankSuffix
|
|
183
|
-
? intl.formatMessage({
|
|
184
|
-
id: "rank",
|
|
185
|
-
defaultMessage: styles.rankSuffix,
|
|
186
|
-
}, {
|
|
187
|
-
rank: userRank,
|
|
188
|
-
}) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
|
|
189
|
-
: `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
|
|
190
|
-
};
|
|
191
|
-
return (h("div", { class: sheet$1.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
|
|
154
|
+
return (h("div", { class: sheet$1.classes.Leaderboard, part: "sqm-base" },
|
|
192
155
|
h("style", { type: "text/css" },
|
|
193
156
|
styleString$1,
|
|
194
157
|
vanillaStyle),
|
|
158
|
+
h("div", null, "Leaderboards"),
|
|
195
159
|
h("table", { part: "sqm-table" },
|
|
196
160
|
h("tr", null,
|
|
197
|
-
styles.showRank &&
|
|
198
|
-
|
|
161
|
+
styles.showRank && h("th", { class: "Rank" }, styles.rankheading),
|
|
162
|
+
h("th", { class: "User" }, styles.usersheading),
|
|
199
163
|
h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
|
|
200
164
|
_a.map((user) => {
|
|
201
165
|
var _a, _b;
|
|
202
166
|
if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
|
|
203
167
|
userSeenFlag = true;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
168
|
+
return (h("tr", { class: !styles.hideViewer &&
|
|
169
|
+
user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber)
|
|
170
|
+
? "highlight"
|
|
171
|
+
: "" },
|
|
172
|
+
styles.showRank && h("td", { class: "Rank" }, user.rank),
|
|
173
|
+
h("td", { class: "User" }, user.firstName && user.lastInitial
|
|
174
|
+
? user.firstName + " " + user.lastInitial
|
|
175
|
+
: user.firstName || user.lastInitial
|
|
176
|
+
? user.firstName || user.lastInitial
|
|
177
|
+
: styles.anonymousUser),
|
|
208
178
|
h("td", { class: "Score" }, user.textValue)));
|
|
209
179
|
}),
|
|
210
180
|
!userSeenFlag && !styles.hideViewer && (h("tr", null,
|
|
211
181
|
h("td", { colSpan: 100, class: "ellipses" },
|
|
212
182
|
h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
|
|
213
183
|
!userSeenFlag && !styles.hideViewer && (h("tr", { class: "highlight" },
|
|
214
|
-
styles.showRank && (h("td", { class: "Rank" },
|
|
215
|
-
|
|
216
|
-
|
|
184
|
+
styles.showRank && (h("td", { class: "Rank" }, ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank) || "-")),
|
|
185
|
+
h("td", { class: "User" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.firstName) && ((_d = data.viewerRank) === null || _d === void 0 ? void 0 : _d.lastInitial)
|
|
186
|
+
? ((_e = data.viewerRank) === null || _e === void 0 ? void 0 : _e.firstName) +
|
|
187
|
+
" " + ((_f = data.viewerRank) === null || _f === void 0 ? void 0 : _f.lastInitial)
|
|
188
|
+
: ((_g = data.viewerRank) === null || _g === void 0 ? void 0 : _g.firstName) || ((_h = data.viewerRank) === null || _h === void 0 ? void 0 : _h.lastInitial)
|
|
189
|
+
? ((_j = data.viewerRank) === null || _j === void 0 ? void 0 : _j.firstName) || ((_k = data.viewerRank) === null || _k === void 0 ? void 0 : _k.lastInitial)
|
|
190
|
+
: styles.anonymousUser),
|
|
191
|
+
h("td", { class: "Score" }, ((_l = data.viewerRank) === null || _l === void 0 ? void 0 : _l.textValue) || "0"))))));
|
|
217
192
|
}
|
|
218
193
|
|
|
219
194
|
const style$2 = {
|
package/dist/esm/{email-registration-view-a89a88bf.js → email-registration-view-07d80492.js}
RENAMED
|
@@ -43,7 +43,7 @@ function EmailRegistrationView(props) {
|
|
|
43
43
|
h("div", { part: "erroralert-text" }, error)));
|
|
44
44
|
};
|
|
45
45
|
const emailValidationRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
46
|
-
return (h("div", {
|
|
46
|
+
return (h("div", { class: sheet.classes.Wrapper, style: {
|
|
47
47
|
border: `${content.hideBorder ? "none" : "1px solid #eaeaea"}`,
|
|
48
48
|
backgroundColor: content.backgroundColor,
|
|
49
49
|
"padding-top": `var(--sl-spacing-${content.paddingTop})`,
|
|
@@ -26646,7 +26646,7 @@ try {
|
|
|
26646
26646
|
// SlAlert.register();
|
|
26647
26647
|
registerIconLibrary("default", {
|
|
26648
26648
|
// same link that shoelace uses internally
|
|
26649
|
-
resolver: (name) => `https://fast.ssqt.io/npm/bootstrap-icons@1.
|
|
26649
|
+
resolver: (name) => `https://fast.ssqt.io/npm/bootstrap-icons@1.7.2/icons/${name}.svg`,
|
|
26650
26650
|
});
|
|
26651
26651
|
// SlAlert.register();
|
|
26652
26652
|
customElements.define("sl-alert", alert_default2);
|