@saasquatch/mint-components 2.3.0-6 → 2.3.0-7
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/sqm-banking-info-form_10.cjs.entry.js +28 -721
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +4 -4
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +16 -31
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +253 -76
- package/dist/cjs/{sqm-user-info-form-view-0e1ddbe4.js → sqm-user-info-form-view-42323dc5.js} +743 -38
- package/dist/cjs/{useIndirectTaxForm-c3c1ec56.js → useIndirectTaxForm-d1cd23f7.js} +5 -5
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +16 -31
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +6 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +13 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.js +151 -0
- package/dist/esm/sqm-banking-info-form_10.entry.js +16 -709
- package/dist/esm/sqm-big-stat_47.entry.js +2 -2
- package/dist/esm/sqm-email-verification_2.entry.js +16 -31
- package/dist/esm/sqm-stencilbook.entry.js +217 -40
- package/dist/esm/{sqm-user-info-form-view-e1ba6009.js → sqm-user-info-form-view-dc473cb8.js} +721 -17
- package/dist/esm/{useIndirectTaxForm-b2888ea5.js → useIndirectTaxForm-27668ad4.js} +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-user-info-form-view-dc473cb8.js +1 -0
- package/dist/esm-es5/subregions-24c1c137.js +1 -0
- package/dist/esm-es5/{useIndirectTaxForm-b2888ea5.js → useIndirectTaxForm-27668ad4.js} +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-1f387c7b.system.js +1 -1
- package/dist/mint-components/{p-abe9f5b1.js → p-2e462dd9.js} +5 -5
- package/dist/mint-components/{p-b419f9ac.entry.js → p-3c052d3d.entry.js} +1 -1
- package/dist/mint-components/p-3f68e4e3.js +1 -0
- package/dist/mint-components/{p-a38eece5.system.entry.js → p-4575f71b.system.entry.js} +1 -1
- package/dist/mint-components/{p-e7f09044.entry.js → p-459c4251.entry.js} +6 -31
- package/dist/mint-components/p-547f8243.system.entry.js +1 -0
- package/dist/mint-components/p-66cb8bec.system.js +1 -0
- package/dist/mint-components/p-b21c53cb.system.entry.js +1 -0
- package/dist/mint-components/p-c2903e7d.entry.js +83 -0
- package/dist/mint-components/p-cb58a2c6.js +1 -0
- package/dist/mint-components/p-d30c8cb3.entry.js +9 -0
- package/dist/mint-components/p-df74f653.system.entry.js +1 -0
- package/dist/mint-components/p-ec58628f.system.js +1 -0
- package/dist/mint-components/{p-58c24352.system.js → p-ed945efe.system.js} +1 -1
- package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -1
- package/dist/types/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.d.ts +19 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm-es5/sqm-user-info-form-view-e1ba6009.js +0 -1
- package/dist/esm-es5/utils-4f5cd04c.js +0 -1
- package/dist/mint-components/p-12d11abc.system.entry.js +0 -1
- package/dist/mint-components/p-1e6a2945.js +0 -1
- package/dist/mint-components/p-88e427ac.system.entry.js +0 -1
- package/dist/mint-components/p-a0eb0331.entry.js +0 -9
- package/dist/mint-components/p-b222bace.system.entry.js +0 -1
- package/dist/mint-components/p-b96ed8eb.js +0 -1
- package/dist/mint-components/p-cdabd9de.system.js +0 -1
- package/dist/mint-components/p-ebc519bc.system.js +0 -1
- package/dist/mint-components/p-ffcebe78.entry.js +0 -83
- package/dist/cjs/{utils-a3b3d05b.js → subregions-e7273457.js} +44 -44
- package/dist/esm/{utils-4f5cd04c.js → subregions-24c1c137.js} +44 -44
|
@@ -4,6 +4,50 @@ const index = require('./index-8277cbb3.js');
|
|
|
4
4
|
const global = require('./global-b7b1b8fe.js');
|
|
5
5
|
const JSS = require('./JSS-8503a151.js');
|
|
6
6
|
|
|
7
|
+
function validTaxDocument(requiredType) {
|
|
8
|
+
const validTypes = ["W9", "W8BENE", "W8BEN"];
|
|
9
|
+
if (validTypes.includes(requiredType))
|
|
10
|
+
return true;
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
const objectIsFull = (obj) => {
|
|
14
|
+
return !Object.keys(obj).find((k) => obj[k] == undefined);
|
|
15
|
+
};
|
|
16
|
+
const taxTypeToName = (taxType) => {
|
|
17
|
+
switch (taxType) {
|
|
18
|
+
case "W9":
|
|
19
|
+
return "W-9";
|
|
20
|
+
case "W8BEN":
|
|
21
|
+
case "W8BENE":
|
|
22
|
+
return "W-8";
|
|
23
|
+
default:
|
|
24
|
+
return "";
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
function validateBillingField(regex, value) {
|
|
28
|
+
const trimmed = value.trim();
|
|
29
|
+
const idx = trimmed.search(regex);
|
|
30
|
+
return idx > -1;
|
|
31
|
+
}
|
|
32
|
+
const formatErrorMessage = (fieldName, errorMessage) => {
|
|
33
|
+
return global.intl.formatMessage({
|
|
34
|
+
id: fieldName,
|
|
35
|
+
defaultMessage: errorMessage,
|
|
36
|
+
}, {
|
|
37
|
+
fieldName,
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
function getCountryObj({ countryCode, locale, }) {
|
|
41
|
+
// @ts-ignore DisplayNames not in Intl type
|
|
42
|
+
const displayName = new Intl.DisplayNames([locale], {
|
|
43
|
+
type: "region",
|
|
44
|
+
}).of(countryCode);
|
|
45
|
+
return {
|
|
46
|
+
countryCode,
|
|
47
|
+
displayName,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
7
51
|
const style = {
|
|
8
52
|
Container: {
|
|
9
53
|
display: "flex",
|
|
@@ -422,50 +466,6 @@ const ADDRESS_REGIONS = {
|
|
|
422
466
|
},
|
|
423
467
|
};
|
|
424
468
|
|
|
425
|
-
function validTaxDocument(requiredType) {
|
|
426
|
-
const validTypes = ["W9", "W8BENE", "W8BEN"];
|
|
427
|
-
if (validTypes.includes(requiredType))
|
|
428
|
-
return true;
|
|
429
|
-
return false;
|
|
430
|
-
}
|
|
431
|
-
const objectIsFull = (obj) => {
|
|
432
|
-
return !Object.keys(obj).find((k) => obj[k] == undefined);
|
|
433
|
-
};
|
|
434
|
-
const taxTypeToName = (taxType) => {
|
|
435
|
-
switch (taxType) {
|
|
436
|
-
case "W9":
|
|
437
|
-
return "W-9";
|
|
438
|
-
case "W8BEN":
|
|
439
|
-
case "W8BENE":
|
|
440
|
-
return "W-8";
|
|
441
|
-
default:
|
|
442
|
-
return "";
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
function validateBillingField(regex, value) {
|
|
446
|
-
const trimmed = value.trim();
|
|
447
|
-
const idx = trimmed.search(regex);
|
|
448
|
-
return idx > -1;
|
|
449
|
-
}
|
|
450
|
-
const formatErrorMessage = (fieldName, errorMessage) => {
|
|
451
|
-
return global.intl.formatMessage({
|
|
452
|
-
id: fieldName,
|
|
453
|
-
defaultMessage: errorMessage,
|
|
454
|
-
}, {
|
|
455
|
-
fieldName,
|
|
456
|
-
});
|
|
457
|
-
};
|
|
458
|
-
function getCountryObj({ countryCode, locale, }) {
|
|
459
|
-
// @ts-ignore DisplayNames not in Intl type
|
|
460
|
-
const displayName = new Intl.DisplayNames([locale], {
|
|
461
|
-
type: "region",
|
|
462
|
-
}).of(countryCode);
|
|
463
|
-
return {
|
|
464
|
-
countryCode,
|
|
465
|
-
displayName,
|
|
466
|
-
};
|
|
467
|
-
}
|
|
468
|
-
|
|
469
469
|
exports.ADDRESS_REGIONS = ADDRESS_REGIONS;
|
|
470
470
|
exports.INDIRECT_TAX_PROVINCES = INDIRECT_TAX_PROVINCES;
|
|
471
471
|
exports.INDIRECT_TAX_SPAIN_REGIONS = INDIRECT_TAX_SPAIN_REGIONS;
|
|
@@ -2,6 +2,50 @@ import { h } from './index-38ad4957.js';
|
|
|
2
2
|
import { i as intl } from './global-75e96214.js';
|
|
3
3
|
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
4
4
|
|
|
5
|
+
function validTaxDocument(requiredType) {
|
|
6
|
+
const validTypes = ["W9", "W8BENE", "W8BEN"];
|
|
7
|
+
if (validTypes.includes(requiredType))
|
|
8
|
+
return true;
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
const objectIsFull = (obj) => {
|
|
12
|
+
return !Object.keys(obj).find((k) => obj[k] == undefined);
|
|
13
|
+
};
|
|
14
|
+
const taxTypeToName = (taxType) => {
|
|
15
|
+
switch (taxType) {
|
|
16
|
+
case "W9":
|
|
17
|
+
return "W-9";
|
|
18
|
+
case "W8BEN":
|
|
19
|
+
case "W8BENE":
|
|
20
|
+
return "W-8";
|
|
21
|
+
default:
|
|
22
|
+
return "";
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
function validateBillingField(regex, value) {
|
|
26
|
+
const trimmed = value.trim();
|
|
27
|
+
const idx = trimmed.search(regex);
|
|
28
|
+
return idx > -1;
|
|
29
|
+
}
|
|
30
|
+
const formatErrorMessage = (fieldName, errorMessage) => {
|
|
31
|
+
return intl.formatMessage({
|
|
32
|
+
id: fieldName,
|
|
33
|
+
defaultMessage: errorMessage,
|
|
34
|
+
}, {
|
|
35
|
+
fieldName,
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
function getCountryObj({ countryCode, locale, }) {
|
|
39
|
+
// @ts-ignore DisplayNames not in Intl type
|
|
40
|
+
const displayName = new Intl.DisplayNames([locale], {
|
|
41
|
+
type: "region",
|
|
42
|
+
}).of(countryCode);
|
|
43
|
+
return {
|
|
44
|
+
countryCode,
|
|
45
|
+
displayName,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
5
49
|
const style = {
|
|
6
50
|
Container: {
|
|
7
51
|
display: "flex",
|
|
@@ -420,48 +464,4 @@ const ADDRESS_REGIONS = {
|
|
|
420
464
|
},
|
|
421
465
|
};
|
|
422
466
|
|
|
423
|
-
function validTaxDocument(requiredType) {
|
|
424
|
-
const validTypes = ["W9", "W8BENE", "W8BEN"];
|
|
425
|
-
if (validTypes.includes(requiredType))
|
|
426
|
-
return true;
|
|
427
|
-
return false;
|
|
428
|
-
}
|
|
429
|
-
const objectIsFull = (obj) => {
|
|
430
|
-
return !Object.keys(obj).find((k) => obj[k] == undefined);
|
|
431
|
-
};
|
|
432
|
-
const taxTypeToName = (taxType) => {
|
|
433
|
-
switch (taxType) {
|
|
434
|
-
case "W9":
|
|
435
|
-
return "W-9";
|
|
436
|
-
case "W8BEN":
|
|
437
|
-
case "W8BENE":
|
|
438
|
-
return "W-8";
|
|
439
|
-
default:
|
|
440
|
-
return "";
|
|
441
|
-
}
|
|
442
|
-
};
|
|
443
|
-
function validateBillingField(regex, value) {
|
|
444
|
-
const trimmed = value.trim();
|
|
445
|
-
const idx = trimmed.search(regex);
|
|
446
|
-
return idx > -1;
|
|
447
|
-
}
|
|
448
|
-
const formatErrorMessage = (fieldName, errorMessage) => {
|
|
449
|
-
return intl.formatMessage({
|
|
450
|
-
id: fieldName,
|
|
451
|
-
defaultMessage: errorMessage,
|
|
452
|
-
}, {
|
|
453
|
-
fieldName,
|
|
454
|
-
});
|
|
455
|
-
};
|
|
456
|
-
function getCountryObj({ countryCode, locale, }) {
|
|
457
|
-
// @ts-ignore DisplayNames not in Intl type
|
|
458
|
-
const displayName = new Intl.DisplayNames([locale], {
|
|
459
|
-
type: "region",
|
|
460
|
-
}).of(countryCode);
|
|
461
|
-
return {
|
|
462
|
-
countryCode,
|
|
463
|
-
displayName,
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
|
|
467
467
|
export { ADDRESS_REGIONS as A, INDIRECT_TAX_SPAIN_REGIONS as I, LoadingView as L, INDIRECT_TAX_PROVINCES as a, validTaxDocument as b, formatErrorMessage as f, getCountryObj as g, objectIsFull as o, taxTypeToName as t, validateBillingField as v };
|