@ubnt/store.core 9.29.0-beta.9 → 9.29.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/CHANGELOG.md +0 -105
- package/lib/_virtual/_virtual_multi-entry.js +2 -15
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +0 -2
- package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/assets/plus5.svg +9 -9
- package/lib/assets/plus6.svg +9 -9
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.mjs +2 -2
- package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
- package/lib/constants/icons/options/colors/black.svg.js +5 -5
- package/lib/constants/icons/options/colors/index.js +3 -3
- package/lib/constants/icons/options/styles/black.svg.js +5 -5
- package/lib/constants/icons/options/styles/index.js +3 -3
- package/lib/constants/optionIcons.js +6 -6
- package/lib/constants/optionIcons.mjs +4 -4
- package/lib/constants/proStoreCategories/mapping/filters.d.ts +0 -1
- package/lib/constants/proStoreCategories/mapping/filters.js +0 -1
- package/lib/constants/proStoreCategories/mapping/filters.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/filters.mjs +0 -1
- package/lib/constants/proStoreCategories/mapping/filters.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +0 -1
- package/lib/constants/proStoreCategories/mapping/index.js +47 -36
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +47 -36
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/redirects.js +0 -8
- package/lib/constants/proStoreCategories/mapping/redirects.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/redirects.mjs +0 -8
- package/lib/constants/proStoreCategories/mapping/redirects.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/uisp.d.ts +0 -1
- package/lib/constants/proStoreCategories/mapping/uisp.js +0 -1
- package/lib/constants/proStoreCategories/mapping/uisp.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/uisp.mjs +0 -1
- package/lib/constants/proStoreCategories/mapping/uisp.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +3 -1
- package/lib/constants/proStoreCategories/mapping/unifi.js +3 -1
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +3 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +0 -4
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +1 -4
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +0 -4
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +1 -4
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +0 -4
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +1 -4
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +0 -1
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +0 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +0 -4
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +1 -4
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +0 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +0 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.js +0 -4
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +1 -4
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +0 -4
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +1 -4
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +0 -4
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +1 -4
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +0 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +0 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +0 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +0 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/constants/proStoreFilters/mapping.d.ts +2 -4
- package/lib/constants/proStoreFilters/mapping.js +0 -6
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +0 -6
- package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
- package/lib/helpers/index.d.ts +0 -1
- package/lib/helpers/index.js +0 -11
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +0 -1
- package/lib/helpers/index.mjs.map +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/index.js +0 -2
- package/lib/types/index.js.map +1 -1
- package/lib/types/index.mjs +0 -1
- package/lib/types/index.mjs.map +1 -1
- package/lib/utils/address.d.ts +62 -278
- package/lib/utils/address.js +8 -11
- package/lib/utils/address.js.map +1 -1
- package/lib/utils/address.mjs +8 -11
- package/lib/utils/address.mjs.map +1 -1
- package/lib/utils/array.d.ts +0 -4
- package/lib/utils/array.js +0 -10
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/array.mjs +1 -10
- package/lib/utils/array.mjs.map +1 -1
- package/lib/utils/money/constants.d.ts +0 -7
- package/lib/utils/money/constants.js +1 -9
- package/lib/utils/money/constants.js.map +1 -1
- package/lib/utils/money/constants.mjs +2 -10
- package/lib/utils/money/constants.mjs.map +1 -1
- package/lib/utils/money/tax.private.d.ts +8 -0
- package/lib/utils/money/tax.private.js +14 -5
- package/lib/utils/money/tax.private.js.map +1 -1
- package/lib/utils/money/tax.private.mjs +16 -8
- package/lib/utils/money/tax.private.mjs.map +1 -1
- package/package.json +51 -51
- package/lib/helpers/product.d.ts +0 -87
- package/lib/helpers/product.js +0 -346
- package/lib/helpers/product.js.map +0 -1
- package/lib/helpers/product.mjs +0 -335
- package/lib/helpers/product.mjs.map +0 -1
- package/lib/helpers/product.test.d.ts +0 -1
- package/lib/types/product.d.ts +0 -87
- package/lib/types/product.js +0 -14
- package/lib/types/product.js.map +0 -1
- package/lib/types/product.mjs +0 -13
- package/lib/types/product.mjs.map +0 -1
- package/lib/utils/productSort.d.ts +0 -41
- package/lib/utils/productSort.js +0 -67
- package/lib/utils/productSort.js.map +0 -1
- package/lib/utils/productSort.mjs +0 -60
- package/lib/utils/productSort.mjs.map +0 -1
- package/lib/utils/validations/lastNameSuperRefinement.d.ts +0 -11
- package/lib/utils/validations/lastNameSuperRefinement.js +0 -25
- package/lib/utils/validations/lastNameSuperRefinement.js.map +0 -1
- package/lib/utils/validations/lastNameSuperRefinement.mjs +0 -21
- package/lib/utils/validations/lastNameSuperRefinement.mjs.map +0 -1
package/lib/utils/productSort.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('../types/index.js');
|
|
4
|
-
var array = require('./array.js');
|
|
5
|
-
var product$1 = require('./product.js');
|
|
6
|
-
var product = require('../types/product.js');
|
|
7
|
-
"use strict";
|
|
8
|
-
var Sort = /* @__PURE__ */(Sort2 => {
|
|
9
|
-
Sort2["HighestPrice"] = "highest-price";
|
|
10
|
-
Sort2["LowestPrice"] = "lowest-price";
|
|
11
|
-
Sort2["Availability"] = "availability";
|
|
12
|
-
return Sort2;
|
|
13
|
-
})(Sort || {});
|
|
14
|
-
var SortOrder = /* @__PURE__ */(SortOrder2 => {
|
|
15
|
-
SortOrder2["Asc"] = "Asc";
|
|
16
|
-
SortOrder2["Desc"] = "Desc";
|
|
17
|
-
return SortOrder2;
|
|
18
|
-
})(SortOrder || {});
|
|
19
|
-
const sortedStatusesByPriorityAsc = [product.DisplayProductStatus.Unavailable, product.DisplayProductStatus.ComingSoon, product.DisplayProductStatus.SoldOut, product.DisplayProductStatus.RegionNotAvailable, product.DisplayProductStatus.Backorder, product.DisplayProductStatus.Available];
|
|
20
|
-
const getProductStatusPriority = product$1 => {
|
|
21
|
-
let sortStatus = product$1.status;
|
|
22
|
-
if (product$1.variants.some(variant => variant.availableInOtherStores.length) || product$1.linkedProducts && product$1.linkedProducts.some(linkedProduct => linkedProduct.status === product.DisplayProductStatus.Available)) {
|
|
23
|
-
sortStatus = product.DisplayProductStatus.Available;
|
|
24
|
-
}
|
|
25
|
-
return sortedStatusesByPriorityAsc.indexOf(sortStatus);
|
|
26
|
-
};
|
|
27
|
-
const sortByAvailabilityDesc = (current, next) => {
|
|
28
|
-
return array.normalizeSortResult(getProductStatusPriority(next) - getProductStatusPriority(current));
|
|
29
|
-
};
|
|
30
|
-
const sortByPrice = order => (current, next) => {
|
|
31
|
-
const currentProductPrice = current.minDisplayPrice.amount;
|
|
32
|
-
const nextProductPrice = next.minDisplayPrice.amount;
|
|
33
|
-
if (order === "Desc" /* Desc */) {
|
|
34
|
-
return nextProductPrice - currentProductPrice;
|
|
35
|
-
} else {
|
|
36
|
-
return currentProductPrice - nextProductPrice;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const sortProducts = (currentSort, storeId, sortByWeightTag = true) => (current, next) => {
|
|
40
|
-
switch (currentSort) {
|
|
41
|
-
// Sort by price
|
|
42
|
-
case "highest-price" /* HighestPrice */:
|
|
43
|
-
case "lowest-price" /* LowestPrice */:
|
|
44
|
-
{
|
|
45
|
-
return sortByPrice(currentSort === "highest-price" /* HighestPrice */ ? "Desc" /* Desc */ : "Asc" /* Asc */)(current, next);
|
|
46
|
-
}
|
|
47
|
-
case "availability" /* Availability */:
|
|
48
|
-
{
|
|
49
|
-
return sortByAvailabilityDesc(current, next);
|
|
50
|
-
}
|
|
51
|
-
default:
|
|
52
|
-
{
|
|
53
|
-
const sorts = [sortByAvailabilityDesc];
|
|
54
|
-
if (sortByWeightTag) {
|
|
55
|
-
sorts.push(product$1.sortByTagWeight(product$1.SortSiteId.Store, storeId));
|
|
56
|
-
}
|
|
57
|
-
return array.combineSorts(sorts)(current, next);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
exports.Sort = Sort;
|
|
62
|
-
exports.SortOrder = SortOrder;
|
|
63
|
-
exports.sortByAvailabilityDesc = sortByAvailabilityDesc;
|
|
64
|
-
exports.sortByPrice = sortByPrice;
|
|
65
|
-
exports.sortProducts = sortProducts;
|
|
66
|
-
exports.sortedStatusesByPriorityAsc = sortedStatusesByPriorityAsc;
|
|
67
|
-
//# sourceMappingURL=productSort.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"productSort.js","sources":["../../src/utils/productSort.ts"],"sourcesContent":["import type {\n Nullish,\n StorefrontProduct,\n StoreId,\n UnionToAllPossibleTuples,\n} from \"../types\";\nimport { DisplayProductStatus } from \"../types\";\nimport { combineSorts, normalizeSortResult } from \"./array\";\nimport { sortByTagWeight, SortSiteId } from \"./product\";\n\n/**\n * Narrow MinimalProProductFragment type even more to the union of fields that are needed to sort product\n */\ntype ProductMinFieldsForSorting = Pick<\n StorefrontProduct,\n \"status\" | \"tags\" | \"minDisplayPrice\"\n> & {\n variants: {\n // We only need bare minimum from array to compare array length\n // FIXME: move it to backend as a boolean field so we don't need to fetch entire array to reduce it to a boolean ourselves\n availableInOtherStores: Array<{ __typename: string }>;\n }[];\n linkedProducts?: {\n status: StorefrontProduct[\"status\"];\n }[];\n};\n\nexport enum Sort {\n HighestPrice = \"highest-price\",\n LowestPrice = \"lowest-price\",\n Availability = \"availability\",\n}\n\nexport enum SortOrder {\n Asc = \"Asc\",\n Desc = \"Desc\",\n}\n\n/**\n * Variants statuses sorted in ascending order from least preferable to most, so if some new status comes in, then the\n * lookup for `.indexOf()` would return `-1`, thus being \"worse\" then DisplayProductStatus.SoldOut and moved to the very\n * back of list\n */\nexport const sortedStatusesByPriorityAsc: UnionToAllPossibleTuples<DisplayProductStatus> =\n [\n DisplayProductStatus.Unavailable,\n DisplayProductStatus.ComingSoon,\n DisplayProductStatus.SoldOut,\n DisplayProductStatus.RegionNotAvailable,\n DisplayProductStatus.Backorder,\n DisplayProductStatus.Available,\n ];\n/**\n * Due to currently variant status being nullable for historical reasons we need to have a fallback state\n * TODO: remove once display status is StorefrontProductVariant.status is non-nullable\n */\nconst getProductStatusPriority = (\n product: ProductMinFieldsForSorting,\n): number => {\n let sortStatus = product.status;\n\n // Virtually set sort status as available if it has alternative stores\n if (\n product.variants.some((variant) => variant.availableInOtherStores.length) ||\n (product.linkedProducts &&\n product.linkedProducts.some(\n (linkedProduct) =>\n linkedProduct.status === DisplayProductStatus.Available,\n ))\n ) {\n sortStatus = DisplayProductStatus.Available;\n }\n\n return sortedStatusesByPriorityAsc.indexOf(sortStatus);\n};\n\nexport const sortByAvailabilityDesc = (\n current: ProductMinFieldsForSorting,\n next: ProductMinFieldsForSorting,\n): number => {\n return normalizeSortResult(\n getProductStatusPriority(next) - getProductStatusPriority(current),\n );\n};\n\nexport const sortByPrice =\n (order: SortOrder) =>\n (\n current: ProductMinFieldsForSorting,\n next: ProductMinFieldsForSorting,\n ): number => {\n const currentProductPrice = current.minDisplayPrice.amount;\n\n const nextProductPrice = next.minDisplayPrice.amount;\n\n if (order === SortOrder.Desc) {\n return nextProductPrice - currentProductPrice;\n } else {\n return currentProductPrice - nextProductPrice;\n }\n };\n\n/**\n * Sorts products based on the given sort type.\n * @param currentSort - sort type\n * @param sortByWeightTag - if false, then sort by weight tag is\n * ignored (e.g. for `Related Add-ons` where\n * we don't want to sort by weight tag)\n */\nexport const sortProducts =\n (\n currentSort: Nullish<string | Sort>,\n storeId?: StoreId,\n sortByWeightTag = true,\n ) =>\n (current: ProductMinFieldsForSorting, next: ProductMinFieldsForSorting) => {\n switch (currentSort) {\n // Sort by price\n case Sort.HighestPrice:\n case Sort.LowestPrice: {\n return sortByPrice(\n currentSort === Sort.HighestPrice ? SortOrder.Desc : SortOrder.Asc,\n )(current, next);\n }\n\n case Sort.Availability: {\n return sortByAvailabilityDesc(current, next);\n }\n\n default: {\n const sorts = [sortByAvailabilityDesc];\n\n // Add sorting by tag weight\n if (sortByWeightTag) {\n sorts.push(sortByTagWeight(SortSiteId.Store, storeId));\n }\n\n // Do additional sorting by tag weight only after initial sorting resulting in \"same group\"\n return combineSorts(sorts)(current, next);\n }\n }\n };\n"],"names":["Sort","SortOrder","sortedStatusesByPriorityAsc","DisplayProductStatus","Unavailable","ComingSoon","SoldOut","RegionNotAvailable","Backorder","Available","getProductStatusPriority","product","sortStatus","status","variants","some","variant","availableInOtherStores","length","linkedProducts","linkedProduct","indexOf","sortByAvailabilityDesc","current","next","normalizeSortResult","sortByPrice","order","currentProductPrice","minDisplayPrice","amount","nextProductPrice","sortProducts","currentSort","storeId","sortByWeightTag","sorts","push","sortByTagWeight","SortSiteId","Store","combineSorts"],"mappings":"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"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import '../types/index.mjs';
|
|
2
|
-
import { normalizeSortResult, combineSorts } from './array.mjs';
|
|
3
|
-
import { sortByTagWeight, SortSiteId } from './product.mjs';
|
|
4
|
-
import { DisplayProductStatus } from '../types/product.mjs';
|
|
5
|
-
"use strict";
|
|
6
|
-
var Sort = /* @__PURE__ */(Sort2 => {
|
|
7
|
-
Sort2["HighestPrice"] = "highest-price";
|
|
8
|
-
Sort2["LowestPrice"] = "lowest-price";
|
|
9
|
-
Sort2["Availability"] = "availability";
|
|
10
|
-
return Sort2;
|
|
11
|
-
})(Sort || {});
|
|
12
|
-
var SortOrder = /* @__PURE__ */(SortOrder2 => {
|
|
13
|
-
SortOrder2["Asc"] = "Asc";
|
|
14
|
-
SortOrder2["Desc"] = "Desc";
|
|
15
|
-
return SortOrder2;
|
|
16
|
-
})(SortOrder || {});
|
|
17
|
-
const sortedStatusesByPriorityAsc = [DisplayProductStatus.Unavailable, DisplayProductStatus.ComingSoon, DisplayProductStatus.SoldOut, DisplayProductStatus.RegionNotAvailable, DisplayProductStatus.Backorder, DisplayProductStatus.Available];
|
|
18
|
-
const getProductStatusPriority = product => {
|
|
19
|
-
let sortStatus = product.status;
|
|
20
|
-
if (product.variants.some(variant => variant.availableInOtherStores.length) || product.linkedProducts && product.linkedProducts.some(linkedProduct => linkedProduct.status === DisplayProductStatus.Available)) {
|
|
21
|
-
sortStatus = DisplayProductStatus.Available;
|
|
22
|
-
}
|
|
23
|
-
return sortedStatusesByPriorityAsc.indexOf(sortStatus);
|
|
24
|
-
};
|
|
25
|
-
const sortByAvailabilityDesc = (current, next) => {
|
|
26
|
-
return normalizeSortResult(getProductStatusPriority(next) - getProductStatusPriority(current));
|
|
27
|
-
};
|
|
28
|
-
const sortByPrice = order => (current, next) => {
|
|
29
|
-
const currentProductPrice = current.minDisplayPrice.amount;
|
|
30
|
-
const nextProductPrice = next.minDisplayPrice.amount;
|
|
31
|
-
if (order === "Desc" /* Desc */) {
|
|
32
|
-
return nextProductPrice - currentProductPrice;
|
|
33
|
-
} else {
|
|
34
|
-
return currentProductPrice - nextProductPrice;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
const sortProducts = (currentSort, storeId, sortByWeightTag = true) => (current, next) => {
|
|
38
|
-
switch (currentSort) {
|
|
39
|
-
// Sort by price
|
|
40
|
-
case "highest-price" /* HighestPrice */:
|
|
41
|
-
case "lowest-price" /* LowestPrice */:
|
|
42
|
-
{
|
|
43
|
-
return sortByPrice(currentSort === "highest-price" /* HighestPrice */ ? "Desc" /* Desc */ : "Asc" /* Asc */)(current, next);
|
|
44
|
-
}
|
|
45
|
-
case "availability" /* Availability */:
|
|
46
|
-
{
|
|
47
|
-
return sortByAvailabilityDesc(current, next);
|
|
48
|
-
}
|
|
49
|
-
default:
|
|
50
|
-
{
|
|
51
|
-
const sorts = [sortByAvailabilityDesc];
|
|
52
|
-
if (sortByWeightTag) {
|
|
53
|
-
sorts.push(sortByTagWeight(SortSiteId.Store, storeId));
|
|
54
|
-
}
|
|
55
|
-
return combineSorts(sorts)(current, next);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
export { Sort, SortOrder, sortByAvailabilityDesc, sortByPrice, sortProducts, sortedStatusesByPriorityAsc };
|
|
60
|
-
//# sourceMappingURL=productSort.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"productSort.mjs","sources":["../../src/utils/productSort.ts"],"sourcesContent":["import type {\n Nullish,\n StorefrontProduct,\n StoreId,\n UnionToAllPossibleTuples,\n} from \"../types\";\nimport { DisplayProductStatus } from \"../types\";\nimport { combineSorts, normalizeSortResult } from \"./array\";\nimport { sortByTagWeight, SortSiteId } from \"./product\";\n\n/**\n * Narrow MinimalProProductFragment type even more to the union of fields that are needed to sort product\n */\ntype ProductMinFieldsForSorting = Pick<\n StorefrontProduct,\n \"status\" | \"tags\" | \"minDisplayPrice\"\n> & {\n variants: {\n // We only need bare minimum from array to compare array length\n // FIXME: move it to backend as a boolean field so we don't need to fetch entire array to reduce it to a boolean ourselves\n availableInOtherStores: Array<{ __typename: string }>;\n }[];\n linkedProducts?: {\n status: StorefrontProduct[\"status\"];\n }[];\n};\n\nexport enum Sort {\n HighestPrice = \"highest-price\",\n LowestPrice = \"lowest-price\",\n Availability = \"availability\",\n}\n\nexport enum SortOrder {\n Asc = \"Asc\",\n Desc = \"Desc\",\n}\n\n/**\n * Variants statuses sorted in ascending order from least preferable to most, so if some new status comes in, then the\n * lookup for `.indexOf()` would return `-1`, thus being \"worse\" then DisplayProductStatus.SoldOut and moved to the very\n * back of list\n */\nexport const sortedStatusesByPriorityAsc: UnionToAllPossibleTuples<DisplayProductStatus> =\n [\n DisplayProductStatus.Unavailable,\n DisplayProductStatus.ComingSoon,\n DisplayProductStatus.SoldOut,\n DisplayProductStatus.RegionNotAvailable,\n DisplayProductStatus.Backorder,\n DisplayProductStatus.Available,\n ];\n/**\n * Due to currently variant status being nullable for historical reasons we need to have a fallback state\n * TODO: remove once display status is StorefrontProductVariant.status is non-nullable\n */\nconst getProductStatusPriority = (\n product: ProductMinFieldsForSorting,\n): number => {\n let sortStatus = product.status;\n\n // Virtually set sort status as available if it has alternative stores\n if (\n product.variants.some((variant) => variant.availableInOtherStores.length) ||\n (product.linkedProducts &&\n product.linkedProducts.some(\n (linkedProduct) =>\n linkedProduct.status === DisplayProductStatus.Available,\n ))\n ) {\n sortStatus = DisplayProductStatus.Available;\n }\n\n return sortedStatusesByPriorityAsc.indexOf(sortStatus);\n};\n\nexport const sortByAvailabilityDesc = (\n current: ProductMinFieldsForSorting,\n next: ProductMinFieldsForSorting,\n): number => {\n return normalizeSortResult(\n getProductStatusPriority(next) - getProductStatusPriority(current),\n );\n};\n\nexport const sortByPrice =\n (order: SortOrder) =>\n (\n current: ProductMinFieldsForSorting,\n next: ProductMinFieldsForSorting,\n ): number => {\n const currentProductPrice = current.minDisplayPrice.amount;\n\n const nextProductPrice = next.minDisplayPrice.amount;\n\n if (order === SortOrder.Desc) {\n return nextProductPrice - currentProductPrice;\n } else {\n return currentProductPrice - nextProductPrice;\n }\n };\n\n/**\n * Sorts products based on the given sort type.\n * @param currentSort - sort type\n * @param sortByWeightTag - if false, then sort by weight tag is\n * ignored (e.g. for `Related Add-ons` where\n * we don't want to sort by weight tag)\n */\nexport const sortProducts =\n (\n currentSort: Nullish<string | Sort>,\n storeId?: StoreId,\n sortByWeightTag = true,\n ) =>\n (current: ProductMinFieldsForSorting, next: ProductMinFieldsForSorting) => {\n switch (currentSort) {\n // Sort by price\n case Sort.HighestPrice:\n case Sort.LowestPrice: {\n return sortByPrice(\n currentSort === Sort.HighestPrice ? SortOrder.Desc : SortOrder.Asc,\n )(current, next);\n }\n\n case Sort.Availability: {\n return sortByAvailabilityDesc(current, next);\n }\n\n default: {\n const sorts = [sortByAvailabilityDesc];\n\n // Add sorting by tag weight\n if (sortByWeightTag) {\n sorts.push(sortByTagWeight(SortSiteId.Store, storeId));\n }\n\n // Do additional sorting by tag weight only after initial sorting resulting in \"same group\"\n return combineSorts(sorts)(current, next);\n }\n }\n };\n"],"names":["Sort","SortOrder","sortedStatusesByPriorityAsc","DisplayProductStatus","Unavailable","ComingSoon","SoldOut","RegionNotAvailable","Backorder","Available","getProductStatusPriority","product","sortStatus","status","variants","some","variant","availableInOtherStores","length","linkedProducts","linkedProduct","indexOf","sortByAvailabilityDesc","current","next","normalizeSortResult","sortByPrice","order","currentProductPrice","minDisplayPrice","amount","nextProductPrice","sortProducts","currentSort","storeId","sortByWeightTag","sorts","push","sortByTagWeight","SortSiteId","Store","combineSorts"],"mappings":";;;;;AA2BY,IAAAA,IAAA,GAAA,gBAAAA,KAAL,IAAA;EACLA,MAAA,cAAe,CAAA,GAAA,eAAA;EACfA,MAAA,aAAc,CAAA,GAAA,cAAA;EACdA,MAAA,cAAe,CAAA,GAAA,cAAA;EAHLA,OAAAA,KAAAA;AAAA,CAAA,EAAAA,IAAA,IAAA,CAAA,CAAA,CAAA;AAMA,IAAAC,SAAA,GAAA,gBAAAA,UAAL,IAAA;EACLA,WAAA,KAAM,CAAA,GAAA,KAAA;EACNA,WAAA,MAAO,CAAA,GAAA,MAAA;EAFGA,OAAAA,UAAAA;AAAA,CAAA,EAAAA,SAAA,IAAA,CAAA,CAAA,CAAA;AAUL,MAAMC,2BACX,GAAA,CACEC,oBAAqB,CAAAC,WAAA,EACrBD,oBAAqB,CAAAE,UAAA,EACrBF,oBAAqB,CAAAG,OAAA,EACrBH,oBAAqB,CAAAI,kBAAA,EACrBJ,oBAAqB,CAAAK,SAAA,EACrBL,oBAAqB,CAAAM,SAAA,CACvB;AAKF,MAAMC,wBAAA,GACJC,OACW,IAAA;EACX,IAAIC,aAAaD,OAAQ,CAAAE,MAAA;EAGzB,IACEF,OAAQ,CAAAG,QAAA,CAASC,IAAK,CAACC,OAAY,IAAAA,OAAA,CAAQC,sBAAuB,CAAAC,MAAM,CACvE,IAAAP,OAAA,CAAQQ,cACP,IAAAR,OAAA,CAAQQ,cAAe,CAAAJ,IAAA,CACpBK,aAAA,IACCA,aAAc,CAAAP,MAAA,KAAWV,oBAAqB,CAAAM,SAAA,CAEpD,EAAA;IACAG,UAAA,GAAaT,oBAAqB,CAAAM,SAAA;EACpC;EAEO,OAAAP,2BAAA,CAA4BmB,QAAQT,UAAU,CAAA;AACvD,CAAA;AAEa,MAAAU,sBAAA,GAAyBA,CACpCC,OAAA,EACAC,IACW,KAAA;EACJ,OAAAC,mBAAA,CACLf,wBAAyB,CAAAc,IAAI,CAAI,GAAAd,wBAAA,CAAyBa,OAAO,CAAA,CACnE;AACF,CAAA;AAEO,MAAMG,WACX,GAACC,KACD,IAAA,CACEJ,SACAC,IACW,KAAA;EACL,MAAAI,mBAAA,GAAsBL,QAAQM,eAAgB,CAAAC,MAAA;EAE9C,MAAAC,gBAAA,GAAmBP,KAAKK,eAAgB,CAAAC,MAAA;EAE9C,IAAIH,UAAU,MAAgB,CAAA,YAAA;IAC5B,OAAOI,gBAAmB,GAAAH,mBAAA;EAAA,CACrB,MAAA;IACL,OAAOA,mBAAsB,GAAAG,gBAAA;EAC/B;AACF,CAAA;AASW,MAAAC,YAAA,GACXA,CACEC,WACA,EAAAC,OAAA,EACAC,kBAAkB,IAEpB,KAAA,CAACZ,SAAqCC,IAAqC,KAAA;EACzE,QAAQS,WAAa;IAAA;IAEnB,KAAK,eAAA,CAAA;IACL,KAAK,cAAkB,CAAA;MAAA;QACd,OAAAP,WAAA,CACLO,WAAA,KAAgB,gBAAoB,qBAAA,MAAiB,cAAA,KAAA,CAAA,SAAA,CACvD,CAAEV,SAASC,IAAI,CAAA;MACjB;IAEA,KAAK,cAAmB,CAAA;MAAA;QACf,OAAAF,sBAAA,CAAuBC,SAASC,IAAI,CAAA;MAC7C;IAEA;MAAS;QACD,MAAAY,KAAA,GAAQ,CAACd,sBAAsB,CAAA;QAGrC,IAAIa,eAAiB,EAAA;UACnBC,KAAA,CAAMC,IAAK,CAAAC,eAAA,CAAgBC,UAAW,CAAAC,KAAA,EAAON,OAAO,CAAC,CAAA;QACvD;QAGA,OAAOO,YAAa,CAAAL,KAAK,CAAE,CAAAb,OAAA,EAASC,IAAI,CAAA;MAC1C;EACF;AACF,CAAA;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type SuperRefinement } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
* Actually it is 35, but because we need to add extra space between
|
|
4
|
-
* first_name and last_name, reduce by 1 character
|
|
5
|
-
*/
|
|
6
|
-
export declare const UPS_SHIPPING_LABEL_MAX_FULL_NAME = 34;
|
|
7
|
-
export declare const FIRST_NAME_MAX_LENGTH = 17;
|
|
8
|
-
export declare const createLastNameSuperRefinement: SuperRefinement<{
|
|
9
|
-
firstName: string;
|
|
10
|
-
lastName: string;
|
|
11
|
-
}>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var zod = require('zod');
|
|
4
|
-
"use strict";
|
|
5
|
-
const UPS_SHIPPING_LABEL_MAX_FULL_NAME = 34;
|
|
6
|
-
const FIRST_NAME_MAX_LENGTH = 17;
|
|
7
|
-
const createLastNameSuperRefinement = ({
|
|
8
|
-
firstName,
|
|
9
|
-
lastName
|
|
10
|
-
}, ctx) => {
|
|
11
|
-
const returnMaxLastNameLength = Math.max(Math.max(UPS_SHIPPING_LABEL_MAX_FULL_NAME - firstName.length, 0), FIRST_NAME_MAX_LENGTH);
|
|
12
|
-
if (lastName.length > returnMaxLastNameLength) {
|
|
13
|
-
return ctx.addIssue({
|
|
14
|
-
path: ["lastName"],
|
|
15
|
-
code: zod.ZodIssueCode.too_big,
|
|
16
|
-
type: "string",
|
|
17
|
-
maximum: returnMaxLastNameLength,
|
|
18
|
-
inclusive: true
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.FIRST_NAME_MAX_LENGTH = FIRST_NAME_MAX_LENGTH;
|
|
23
|
-
exports.UPS_SHIPPING_LABEL_MAX_FULL_NAME = UPS_SHIPPING_LABEL_MAX_FULL_NAME;
|
|
24
|
-
exports.createLastNameSuperRefinement = createLastNameSuperRefinement;
|
|
25
|
-
//# sourceMappingURL=lastNameSuperRefinement.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lastNameSuperRefinement.js","sources":["../../../src/utils/validations/lastNameSuperRefinement.ts"],"sourcesContent":["import { type SuperRefinement, ZodIssueCode } from \"zod\";\n\n/**\n * Actually it is 35, but because we need to add extra space between\n * first_name and last_name, reduce by 1 character\n */\nexport const UPS_SHIPPING_LABEL_MAX_FULL_NAME = 34;\nexport const FIRST_NAME_MAX_LENGTH = 17;\n\nexport const createLastNameSuperRefinement: SuperRefinement<{\n firstName: string;\n lastName: string;\n}> = ({ firstName, lastName }, ctx) => {\n const returnMaxLastNameLength = Math.max(\n Math.max(UPS_SHIPPING_LABEL_MAX_FULL_NAME - firstName.length, 0),\n FIRST_NAME_MAX_LENGTH,\n );\n\n if (lastName.length > returnMaxLastNameLength) {\n return ctx.addIssue({\n path: [\"lastName\"],\n code: ZodIssueCode.too_big,\n type: \"string\",\n maximum: returnMaxLastNameLength,\n inclusive: true,\n });\n }\n};\n"],"names":["UPS_SHIPPING_LABEL_MAX_FULL_NAME","FIRST_NAME_MAX_LENGTH","createLastNameSuperRefinement","firstName","lastName","ctx","returnMaxLastNameLength","Math","max","length","addIssue","path","code","ZodIssueCode","too_big","type","maximum","inclusive"],"mappings":";;;;AAMO,MAAMA,gCAAmC,GAAA,EAAA;AACzC,MAAMC,qBAAwB,GAAA,EAAA;AAE9B,MAAMC,gCAGRA,CAAC;EAAEC,SAAW;EAAAC;AAAA,GAAYC,GAAQ,KAAA;EACrC,MAAMC,0BAA0BC,IAAK,CAAAC,GAAA,CACnCD,IAAK,CAAAC,GAAA,CAAIR,gCAAmC,GAAAG,SAAA,CAAUM,QAAQ,CAAC,CAAA,EAC/DR,qBAAA,CACF;EAEI,IAAAG,QAAA,CAASK,SAASH,uBAAyB,EAAA;IAC7C,OAAOD,IAAIK,QAAS,CAAA;MAClBC,IAAA,EAAM,CAAC,UAAU,CAAA;MACjBC,MAAMC,GAAa,CAAAA,YAAA,CAAAC,OAAA;MACnBC,IAAM,EAAA,QAAA;MACNC,OAAS,EAAAV,uBAAA;MACTW,SAAW,EAAA;IAAA,CACZ,CAAA;EACH;AACF,CAAA;;;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ZodIssueCode } from 'zod';
|
|
2
|
-
"use strict";
|
|
3
|
-
const UPS_SHIPPING_LABEL_MAX_FULL_NAME = 34;
|
|
4
|
-
const FIRST_NAME_MAX_LENGTH = 17;
|
|
5
|
-
const createLastNameSuperRefinement = ({
|
|
6
|
-
firstName,
|
|
7
|
-
lastName
|
|
8
|
-
}, ctx) => {
|
|
9
|
-
const returnMaxLastNameLength = Math.max(Math.max(UPS_SHIPPING_LABEL_MAX_FULL_NAME - firstName.length, 0), FIRST_NAME_MAX_LENGTH);
|
|
10
|
-
if (lastName.length > returnMaxLastNameLength) {
|
|
11
|
-
return ctx.addIssue({
|
|
12
|
-
path: ["lastName"],
|
|
13
|
-
code: ZodIssueCode.too_big,
|
|
14
|
-
type: "string",
|
|
15
|
-
maximum: returnMaxLastNameLength,
|
|
16
|
-
inclusive: true
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export { FIRST_NAME_MAX_LENGTH, UPS_SHIPPING_LABEL_MAX_FULL_NAME, createLastNameSuperRefinement };
|
|
21
|
-
//# sourceMappingURL=lastNameSuperRefinement.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lastNameSuperRefinement.mjs","sources":["../../../src/utils/validations/lastNameSuperRefinement.ts"],"sourcesContent":["import { type SuperRefinement, ZodIssueCode } from \"zod\";\n\n/**\n * Actually it is 35, but because we need to add extra space between\n * first_name and last_name, reduce by 1 character\n */\nexport const UPS_SHIPPING_LABEL_MAX_FULL_NAME = 34;\nexport const FIRST_NAME_MAX_LENGTH = 17;\n\nexport const createLastNameSuperRefinement: SuperRefinement<{\n firstName: string;\n lastName: string;\n}> = ({ firstName, lastName }, ctx) => {\n const returnMaxLastNameLength = Math.max(\n Math.max(UPS_SHIPPING_LABEL_MAX_FULL_NAME - firstName.length, 0),\n FIRST_NAME_MAX_LENGTH,\n );\n\n if (lastName.length > returnMaxLastNameLength) {\n return ctx.addIssue({\n path: [\"lastName\"],\n code: ZodIssueCode.too_big,\n type: \"string\",\n maximum: returnMaxLastNameLength,\n inclusive: true,\n });\n }\n};\n"],"names":["UPS_SHIPPING_LABEL_MAX_FULL_NAME","FIRST_NAME_MAX_LENGTH","createLastNameSuperRefinement","firstName","lastName","ctx","returnMaxLastNameLength","Math","max","length","addIssue","path","code","ZodIssueCode","too_big","type","maximum","inclusive"],"mappings":";;AAMO,MAAMA,gCAAmC,GAAA,EAAA;AACzC,MAAMC,qBAAwB,GAAA,EAAA;AAE9B,MAAMC,gCAGRA,CAAC;EAAEC,SAAW;EAAAC;AAAA,GAAYC,GAAQ,KAAA;EACrC,MAAMC,0BAA0BC,IAAK,CAAAC,GAAA,CACnCD,IAAK,CAAAC,GAAA,CAAIR,gCAAmC,GAAAG,SAAA,CAAUM,QAAQ,CAAC,CAAA,EAC/DR,qBAAA,CACF;EAEI,IAAAG,QAAA,CAASK,SAASH,uBAAyB,EAAA;IAC7C,OAAOD,IAAIK,QAAS,CAAA;MAClBC,IAAA,EAAM,CAAC,UAAU,CAAA;MACjBC,MAAMC,YAAa,CAAAC,OAAA;MACnBC,IAAM,EAAA,QAAA;MACNC,OAAS,EAAAV,uBAAA;MACTW,SAAW,EAAA;IAAA,CACZ,CAAA;EACH;AACF,CAAA;"}
|