@scayle/storefront-core 7.22.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/CHANGELOG.md +480 -0
- package/LICENSE +21 -0
- package/README.md +29 -0
- package/dist/bapi/init.cjs +30 -0
- package/dist/bapi/init.d.ts +14 -0
- package/dist/bapi/init.mjs +23 -0
- package/dist/cache/cache.cjs +1 -0
- package/dist/cache/cache.d.ts +8 -0
- package/dist/cache/cache.mjs +0 -0
- package/dist/cache/cached.cjs +89 -0
- package/dist/cache/cached.d.ts +24 -0
- package/dist/cache/cached.mjs +92 -0
- package/dist/cache/index.cjs +38 -0
- package/dist/cache/index.d.ts +3 -0
- package/dist/cache/index.mjs +3 -0
- package/dist/cache/providers/redis.cjs +94 -0
- package/dist/cache/providers/redis.d.ts +28 -0
- package/dist/cache/providers/redis.mjs +86 -0
- package/dist/cache/providers/unstorage.cjs +54 -0
- package/dist/cache/providers/unstorage.d.ts +16 -0
- package/dist/cache/providers/unstorage.mjs +49 -0
- package/dist/cache/types.cjs +11 -0
- package/dist/cache/types.d.ts +6 -0
- package/dist/cache/types.mjs +4 -0
- package/dist/constants/basket.cjs +13 -0
- package/dist/constants/basket.d.ts +8 -0
- package/dist/constants/basket.mjs +6 -0
- package/dist/constants/cache.cjs +8 -0
- package/dist/constants/cache.d.ts +1 -0
- package/dist/constants/cache.mjs +1 -0
- package/dist/constants/hash.cjs +11 -0
- package/dist/constants/hash.d.ts +6 -0
- package/dist/constants/hash.mjs +4 -0
- package/dist/constants/httpStatus.cjs +636 -0
- package/dist/constants/httpStatus.d.ts +632 -0
- package/dist/constants/httpStatus.mjs +629 -0
- package/dist/constants/index.cjs +93 -0
- package/dist/constants/index.d.ts +8 -0
- package/dist/constants/index.mjs +8 -0
- package/dist/constants/product.cjs +11 -0
- package/dist/constants/product.d.ts +6 -0
- package/dist/constants/product.mjs +4 -0
- package/dist/constants/promotion.cjs +10 -0
- package/dist/constants/promotion.d.ts +2 -0
- package/dist/constants/promotion.mjs +2 -0
- package/dist/constants/sorting.cjs +24 -0
- package/dist/constants/sorting.d.ts +20 -0
- package/dist/constants/sorting.mjs +17 -0
- package/dist/constants/withParameters.cjs +138 -0
- package/dist/constants/withParameters.d.ts +30 -0
- package/dist/constants/withParameters.mjs +132 -0
- package/dist/errors/BAPIError.cjs +16 -0
- package/dist/errors/BAPIError.d.ts +6 -0
- package/dist/errors/BAPIError.mjs +9 -0
- package/dist/errors/baseError.cjs +17 -0
- package/dist/errors/baseError.d.ts +5 -0
- package/dist/errors/baseError.mjs +10 -0
- package/dist/errors/index.cjs +27 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.mjs +2 -0
- package/dist/helpers/advancedAttributeHelpers.cjs +26 -0
- package/dist/helpers/advancedAttributeHelpers.d.ts +12 -0
- package/dist/helpers/advancedAttributeHelpers.mjs +21 -0
- package/dist/helpers/arrayHelpers.cjs +10 -0
- package/dist/helpers/arrayHelpers.d.ts +1 -0
- package/dist/helpers/arrayHelpers.mjs +3 -0
- package/dist/helpers/attributeHelpers.cjs +24 -0
- package/dist/helpers/attributeHelpers.d.ts +5 -0
- package/dist/helpers/attributeHelpers.mjs +17 -0
- package/dist/helpers/autobind.cjs +44 -0
- package/dist/helpers/autobind.d.ts +39 -0
- package/dist/helpers/autobind.mjs +35 -0
- package/dist/helpers/basketHelpers.cjs +12 -0
- package/dist/helpers/basketHelpers.d.ts +2 -0
- package/dist/helpers/basketHelpers.mjs +5 -0
- package/dist/helpers/categoryHelper.cjs +61 -0
- package/dist/helpers/categoryHelper.d.ts +7 -0
- package/dist/helpers/categoryHelper.mjs +44 -0
- package/dist/helpers/filterHelper.cjs +156 -0
- package/dist/helpers/filterHelper.d.ts +82 -0
- package/dist/helpers/filterHelper.mjs +147 -0
- package/dist/helpers/formHelpers.cjs +114 -0
- package/dist/helpers/formHelpers.d.ts +48 -0
- package/dist/helpers/formHelpers.mjs +106 -0
- package/dist/helpers/imageHelpers.cjs +20 -0
- package/dist/helpers/imageHelpers.d.ts +4 -0
- package/dist/helpers/imageHelpers.mjs +14 -0
- package/dist/helpers/index.cjs +192 -0
- package/dist/helpers/index.d.ts +17 -0
- package/dist/helpers/index.mjs +17 -0
- package/dist/helpers/localization.cjs +13 -0
- package/dist/helpers/localization.d.ts +7 -0
- package/dist/helpers/localization.mjs +6 -0
- package/dist/helpers/objectHelpers.cjs +19 -0
- package/dist/helpers/objectHelpers.d.ts +1 -0
- package/dist/helpers/objectHelpers.mjs +6 -0
- package/dist/helpers/orderHelpers.cjs +10 -0
- package/dist/helpers/orderHelpers.d.ts +67 -0
- package/dist/helpers/orderHelpers.mjs +4 -0
- package/dist/helpers/product.fixture.cjs +770 -0
- package/dist/helpers/product.fixture.d.ts +415 -0
- package/dist/helpers/product.fixture.mjs +838 -0
- package/dist/helpers/productDisruptorHelper.cjs +37 -0
- package/dist/helpers/productDisruptorHelper.d.ts +10 -0
- package/dist/helpers/productDisruptorHelper.mjs +23 -0
- package/dist/helpers/productHelpers.cjs +188 -0
- package/dist/helpers/productHelpers.d.ts +41 -0
- package/dist/helpers/productHelpers.mjs +170 -0
- package/dist/helpers/sanitizationHelpers.cjs +15 -0
- package/dist/helpers/sanitizationHelpers.d.ts +2 -0
- package/dist/helpers/sanitizationHelpers.mjs +6 -0
- package/dist/helpers/sortingHelper.cjs +67 -0
- package/dist/helpers/sortingHelper.d.ts +69 -0
- package/dist/helpers/sortingHelper.mjs +66 -0
- package/dist/helpers/stringHelpers.cjs +8 -0
- package/dist/helpers/stringHelpers.d.ts +2 -0
- package/dist/helpers/stringHelpers.mjs +2 -0
- package/dist/index.cjs +85 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.mjs +8 -0
- package/dist/rpc/methods/basket/basket.cjs +183 -0
- package/dist/rpc/methods/basket/basket.d.ts +23 -0
- package/dist/rpc/methods/basket/basket.mjs +181 -0
- package/dist/rpc/methods/brands.cjs +34 -0
- package/dist/rpc/methods/brands.d.ts +5 -0
- package/dist/rpc/methods/brands.mjs +16 -0
- package/dist/rpc/methods/categories.cjs +102 -0
- package/dist/rpc/methods/categories.d.ts +21 -0
- package/dist/rpc/methods/categories.mjs +64 -0
- package/dist/rpc/methods/cbd.cjs +45 -0
- package/dist/rpc/methods/cbd.d.ts +4 -0
- package/dist/rpc/methods/cbd.mjs +36 -0
- package/dist/rpc/methods/checkout/index.cjs +38 -0
- package/dist/rpc/methods/checkout/index.d.ts +3 -0
- package/dist/rpc/methods/checkout/index.mjs +3 -0
- package/dist/rpc/methods/checkout/order.cjs +55 -0
- package/dist/rpc/methods/checkout/order.d.ts +4 -0
- package/dist/rpc/methods/checkout/order.mjs +43 -0
- package/dist/rpc/methods/checkout/shopUser.cjs +126 -0
- package/dist/rpc/methods/checkout/shopUser.d.ts +7 -0
- package/dist/rpc/methods/checkout/shopUser.mjs +109 -0
- package/dist/rpc/methods/checkout/shopUserAddresses.cjs +25 -0
- package/dist/rpc/methods/checkout/shopUserAddresses.d.ts +3 -0
- package/dist/rpc/methods/checkout/shopUserAddresses.mjs +19 -0
- package/dist/rpc/methods/index.cjs +159 -0
- package/dist/rpc/methods/index.d.ts +14 -0
- package/dist/rpc/methods/index.mjs +14 -0
- package/dist/rpc/methods/navigationTrees.cjs +33 -0
- package/dist/rpc/methods/navigationTrees.d.ts +5 -0
- package/dist/rpc/methods/navigationTrees.mjs +10 -0
- package/dist/rpc/methods/products.cjs +261 -0
- package/dist/rpc/methods/products.d.ts +13 -0
- package/dist/rpc/methods/products.mjs +217 -0
- package/dist/rpc/methods/promotion.cjs +53 -0
- package/dist/rpc/methods/promotion.d.ts +4 -0
- package/dist/rpc/methods/promotion.mjs +38 -0
- package/dist/rpc/methods/search.cjs +38 -0
- package/dist/rpc/methods/search.d.ts +10 -0
- package/dist/rpc/methods/search.mjs +22 -0
- package/dist/rpc/methods/session.cjs +274 -0
- package/dist/rpc/methods/session.d.ts +20 -0
- package/dist/rpc/methods/session.mjs +309 -0
- package/dist/rpc/methods/shopConfiguration.cjs +15 -0
- package/dist/rpc/methods/shopConfiguration.d.ts +4 -0
- package/dist/rpc/methods/shopConfiguration.mjs +6 -0
- package/dist/rpc/methods/user.cjs +89 -0
- package/dist/rpc/methods/user.d.ts +20 -0
- package/dist/rpc/methods/user.mjs +56 -0
- package/dist/rpc/methods/variants.cjs +29 -0
- package/dist/rpc/methods/variants.d.ts +8 -0
- package/dist/rpc/methods/variants.mjs +12 -0
- package/dist/rpc/methods/wishlist.cjs +85 -0
- package/dist/rpc/methods/wishlist.d.ts +13 -0
- package/dist/rpc/methods/wishlist.mjs +61 -0
- package/dist/server.cjs +39 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.mjs +4 -0
- package/dist/types/api/auth.cjs +1 -0
- package/dist/types/api/auth.d.ts +63 -0
- package/dist/types/api/auth.mjs +0 -0
- package/dist/types/api/context.cjs +1 -0
- package/dist/types/api/context.d.ts +61 -0
- package/dist/types/api/context.mjs +0 -0
- package/dist/types/api/rpc.cjs +1 -0
- package/dist/types/api/rpc.d.ts +4 -0
- package/dist/types/api/rpc.mjs +0 -0
- package/dist/types/bapi/basket.cjs +1 -0
- package/dist/types/bapi/basket.d.ts +25 -0
- package/dist/types/bapi/basket.mjs +0 -0
- package/dist/types/bapi/brand.cjs +1 -0
- package/dist/types/bapi/brand.d.ts +2 -0
- package/dist/types/bapi/brand.mjs +0 -0
- package/dist/types/bapi/category.cjs +1 -0
- package/dist/types/bapi/category.d.ts +6 -0
- package/dist/types/bapi/category.mjs +0 -0
- package/dist/types/bapi/filter.cjs +1 -0
- package/dist/types/bapi/filter.d.ts +49 -0
- package/dist/types/bapi/filter.mjs +0 -0
- package/dist/types/bapi/navigation.cjs +1 -0
- package/dist/types/bapi/navigation.d.ts +10 -0
- package/dist/types/bapi/navigation.mjs +0 -0
- package/dist/types/bapi/order.cjs +1 -0
- package/dist/types/bapi/order.d.ts +554 -0
- package/dist/types/bapi/order.mjs +0 -0
- package/dist/types/bapi/pagination.cjs +1 -0
- package/dist/types/bapi/pagination.d.ts +13 -0
- package/dist/types/bapi/pagination.mjs +0 -0
- package/dist/types/bapi/product.cjs +1 -0
- package/dist/types/bapi/product.d.ts +84 -0
- package/dist/types/bapi/product.mjs +0 -0
- package/dist/types/bapi/productFilter.cjs +1 -0
- package/dist/types/bapi/productFilter.d.ts +7 -0
- package/dist/types/bapi/productFilter.mjs +0 -0
- package/dist/types/bapi/promotion.cjs +1 -0
- package/dist/types/bapi/promotion.d.ts +2 -0
- package/dist/types/bapi/promotion.mjs +0 -0
- package/dist/types/bapi/redirects.cjs +1 -0
- package/dist/types/bapi/redirects.d.ts +1 -0
- package/dist/types/bapi/redirects.mjs +0 -0
- package/dist/types/bapi/router.cjs +1 -0
- package/dist/types/bapi/router.d.ts +1 -0
- package/dist/types/bapi/router.mjs +0 -0
- package/dist/types/bapi/search.cjs +1 -0
- package/dist/types/bapi/search.d.ts +21 -0
- package/dist/types/bapi/search.mjs +0 -0
- package/dist/types/bapi/sorting.cjs +5 -0
- package/dist/types/bapi/sorting.d.ts +10 -0
- package/dist/types/bapi/sorting.mjs +1 -0
- package/dist/types/bapi/wishlist.cjs +1 -0
- package/dist/types/bapi/wishlist.d.ts +9 -0
- package/dist/types/bapi/wishlist.mjs +0 -0
- package/dist/types/breadcrumb.cjs +1 -0
- package/dist/types/breadcrumb.d.ts +4 -0
- package/dist/types/breadcrumb.mjs +0 -0
- package/dist/types/index.cjs +236 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.mjs +21 -0
- package/dist/types/promises.cjs +1 -0
- package/dist/types/promises.d.ts +2 -0
- package/dist/types/promises.mjs +0 -0
- package/dist/types/user.cjs +1 -0
- package/dist/types/user.d.ts +100 -0
- package/dist/types/user.mjs +0 -0
- package/dist/utils/compression.cjs +24 -0
- package/dist/utils/compression.d.ts +2 -0
- package/dist/utils/compression.mjs +16 -0
- package/dist/utils/hash.cjs +68 -0
- package/dist/utils/hash.d.ts +8 -0
- package/dist/utils/hash.mjs +61 -0
- package/dist/utils/index.cjs +27 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.mjs +2 -0
- package/dist/utils/keys.cjs +67 -0
- package/dist/utils/keys.d.ts +24 -0
- package/dist/utils/keys.mjs +56 -0
- package/dist/utils/log.cjs +93 -0
- package/dist/utils/log.d.ts +43 -0
- package/dist/utils/log.mjs +75 -0
- package/dist/utils/rpc.cjs +41 -0
- package/dist/utils/rpc.d.ts +6 -0
- package/dist/utils/rpc.mjs +35 -0
- package/dist/utils/timeout.cjs +17 -0
- package/dist/utils/timeout.d.ts +2 -0
- package/dist/utils/timeout.mjs +9 -0
- package/dist/utils/user.cjs +75 -0
- package/dist/utils/user.d.ts +14 -0
- package/dist/utils/user.mjs +65 -0
- package/package.json +97 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { FilterTypes } from "@aboutyou/backbone";
|
|
2
|
+
import { group, isEmpty } from "radash";
|
|
3
|
+
import { getSortByValue } from "./sortingHelper.mjs";
|
|
4
|
+
export const transformToWhereCondition = (conditions) => {
|
|
5
|
+
const where = { attributes: [] };
|
|
6
|
+
Object.keys(conditions).forEach((key) => {
|
|
7
|
+
const value = conditions[key];
|
|
8
|
+
if (["sort", "term"].includes(key)) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (key === "minPrice" || key === "maxPrice") {
|
|
12
|
+
where[key] = value;
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const condition = ["true", "false"].includes(value) ? {
|
|
16
|
+
key,
|
|
17
|
+
type: "boolean",
|
|
18
|
+
value: value === "true"
|
|
19
|
+
} : {
|
|
20
|
+
key,
|
|
21
|
+
type: "attributes",
|
|
22
|
+
values: Array.isArray(conditions[key]) ? conditions[key] : [conditions[key]]
|
|
23
|
+
};
|
|
24
|
+
where.attributes.push(condition);
|
|
25
|
+
});
|
|
26
|
+
return where;
|
|
27
|
+
};
|
|
28
|
+
export const groupFilterableValuesByKey = (filters, filterableKeys) => {
|
|
29
|
+
const enabledFilters = filterableKeys ? filters.filter((filter) => filterableKeys.includes(filter.slug)) : filters;
|
|
30
|
+
const availableFilters = [];
|
|
31
|
+
enabledFilters.forEach((filter) => {
|
|
32
|
+
;
|
|
33
|
+
filter.values.forEach((value) => {
|
|
34
|
+
if (filter.type === "boolean" && value.name === false) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const filterValue = _getFilterValueByType(value, filter.type);
|
|
38
|
+
availableFilters.push({
|
|
39
|
+
key: filter.slug,
|
|
40
|
+
displayName: filter.type === "boolean" ? filter.name : value.name,
|
|
41
|
+
count: value.productCount,
|
|
42
|
+
value: filterValue,
|
|
43
|
+
whereCondition: {
|
|
44
|
+
[filter.slug]: filterValue
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
return availableFilters.sort(
|
|
50
|
+
(a, b) => a.displayName < b.displayName ? -1 : 1
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
export const transformStateToFilters = (state) => {
|
|
54
|
+
return Object.values(state).reduce(
|
|
55
|
+
(objectToReturn, filter) => Object.assign(objectToReturn, generateFilterKeyAndValue(filter)),
|
|
56
|
+
{}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
const generateFilterKeyAndValue = (filter) => {
|
|
60
|
+
return filter.reduce(
|
|
61
|
+
(objectToReturn, f) => Object.assign(
|
|
62
|
+
objectToReturn,
|
|
63
|
+
objectToReturn[f.key] ? objectToReturn[f.key].push(f.value) : { [f.key]: [f.value] }
|
|
64
|
+
),
|
|
65
|
+
{}
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
export const mergeFilters = (filters) => {
|
|
69
|
+
const mergedFilter = {};
|
|
70
|
+
filters.forEach((item) => {
|
|
71
|
+
if (!mergedFilter[item.key]) {
|
|
72
|
+
mergedFilter[item.key] = item.value;
|
|
73
|
+
} else {
|
|
74
|
+
mergedFilter[item.key] = [mergedFilter[item.key], item.value].flat();
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return mergedFilter;
|
|
78
|
+
};
|
|
79
|
+
export const getActiveFilters = (filters, activeFilters) => {
|
|
80
|
+
return [].concat(...Object.values(filters)).filter((item) => isFilterActive(activeFilters, item)) || [];
|
|
81
|
+
};
|
|
82
|
+
export const groupFiltersByKey = (filters) => {
|
|
83
|
+
return Object.entries(group(filters, (it) => it.key));
|
|
84
|
+
};
|
|
85
|
+
export const transformMinAndMaxPriceToFilter = (prices) => {
|
|
86
|
+
const [min = 0, max = 1e5] = prices;
|
|
87
|
+
return {
|
|
88
|
+
minPrice: min,
|
|
89
|
+
maxPrice: max
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
export const transformSortToFilter = (sort) => {
|
|
93
|
+
return getSortByValue(sort);
|
|
94
|
+
};
|
|
95
|
+
export const getGroupedFilterableValues = (keys, filterableValues) => {
|
|
96
|
+
return keys.reduce((acc, key) => {
|
|
97
|
+
acc[key] = groupFilterableValuesByKey(filterableValues, [key]);
|
|
98
|
+
return acc;
|
|
99
|
+
}, {});
|
|
100
|
+
};
|
|
101
|
+
export const isFilterActive = (filters, filterToCheck) => {
|
|
102
|
+
const key = filterToCheck.key;
|
|
103
|
+
return filters[key] && (filters[key].toString() === filterToCheck.value.toString() || Array.isArray(filters[key]) && filters[key].includes(filterToCheck.value));
|
|
104
|
+
};
|
|
105
|
+
export const getFilterablePriceValue = (filterableValues, key = "min") => {
|
|
106
|
+
const prices = filterableValues.prices[0];
|
|
107
|
+
if (!prices) {
|
|
108
|
+
return key === "min" ? 0 : 1e4;
|
|
109
|
+
}
|
|
110
|
+
return prices.value[key];
|
|
111
|
+
};
|
|
112
|
+
const _getFilterValueByType = (value, type) => {
|
|
113
|
+
switch (type) {
|
|
114
|
+
case FilterTypes.BOOLEAN:
|
|
115
|
+
return value.name;
|
|
116
|
+
case FilterTypes.RANGE:
|
|
117
|
+
return { min: value.min, max: value.max };
|
|
118
|
+
default:
|
|
119
|
+
return value.id;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
export const serializeFilters = (filter) => {
|
|
123
|
+
if (isEmpty(filter)) {
|
|
124
|
+
return void 0;
|
|
125
|
+
}
|
|
126
|
+
return Object.assign(
|
|
127
|
+
{},
|
|
128
|
+
...Object.entries(filter).map(([filterName, filterValue]) => ({
|
|
129
|
+
[filterName]: Array.isArray(filterValue) ? filterValue.join(",") : String(filterValue)
|
|
130
|
+
}))
|
|
131
|
+
);
|
|
132
|
+
};
|
|
133
|
+
export const deserializeFilters = (serializedFilter) => {
|
|
134
|
+
const toNumberIfNumeric = (value) => {
|
|
135
|
+
const number = +value;
|
|
136
|
+
if (!isNaN(number)) {
|
|
137
|
+
return number;
|
|
138
|
+
}
|
|
139
|
+
return value;
|
|
140
|
+
};
|
|
141
|
+
return Object.assign(
|
|
142
|
+
{},
|
|
143
|
+
...Object.entries(serializedFilter).map(([filterName, filterValue]) => ({
|
|
144
|
+
[filterName]: typeof filterValue === "string" && filterValue.includes(",") ? filterValue.split(",").map(toNumberIfNumeric) : toNumberIfNumeric(filterValue)
|
|
145
|
+
}))
|
|
146
|
+
);
|
|
147
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.phoneValidator = exports.getPayloadPhone = exports.getPayloadDate = exports.formatPhone = exports.formatDate = exports.dateValidator = exports.convertPhone = exports.convertDate = void 0;
|
|
7
|
+
const getPayloadDate = date => {
|
|
8
|
+
if (!date) {
|
|
9
|
+
return date;
|
|
10
|
+
}
|
|
11
|
+
const inputDateParts = date.split(".");
|
|
12
|
+
return `${inputDateParts[2]}-${inputDateParts[1]}-${inputDateParts[0]}`;
|
|
13
|
+
};
|
|
14
|
+
exports.getPayloadDate = getPayloadDate;
|
|
15
|
+
const dateValidator = date => {
|
|
16
|
+
if (!date) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
const formattedDate = getPayloadDate(date);
|
|
20
|
+
if (!formattedDate) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
const inputDateParts = formattedDate.split("-").map(datePart => +datePart);
|
|
24
|
+
const [year, month, day] = inputDateParts;
|
|
25
|
+
if (day <= 0 || day > 31 || month <= 0 || month > 12 || year < 1900) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
const convertedDate = new Date(formattedDate);
|
|
29
|
+
return year === convertedDate.getFullYear() && month === convertedDate.getMonth() + 1 && day === convertedDate.getDate();
|
|
30
|
+
};
|
|
31
|
+
exports.dateValidator = dateValidator;
|
|
32
|
+
const formatDate = date => {
|
|
33
|
+
if (!date) {
|
|
34
|
+
return "";
|
|
35
|
+
}
|
|
36
|
+
const [datePart] = date.split("T", 2);
|
|
37
|
+
const splitDateArray = datePart?.split("-", 3);
|
|
38
|
+
if (splitDateArray?.length !== 3) {
|
|
39
|
+
return "";
|
|
40
|
+
}
|
|
41
|
+
const [yyyy, mm, dd] = splitDateArray;
|
|
42
|
+
return `${dd.padStart(2, "0")}.${mm.padStart(2, "0")}.${yyyy}`;
|
|
43
|
+
};
|
|
44
|
+
exports.formatDate = formatDate;
|
|
45
|
+
const convertDate = date => {
|
|
46
|
+
if (!date) {
|
|
47
|
+
return "";
|
|
48
|
+
}
|
|
49
|
+
const splitDateArray = date?.split(".", 3);
|
|
50
|
+
if (splitDateArray?.length !== 3) {
|
|
51
|
+
return "";
|
|
52
|
+
}
|
|
53
|
+
const [dd, mm, yyyy] = splitDateArray;
|
|
54
|
+
return `${dd.padStart(2, "0")}.${mm.padStart(2, "0")}.${yyyy}`;
|
|
55
|
+
};
|
|
56
|
+
exports.convertDate = convertDate;
|
|
57
|
+
const getPayloadPhone = phone => {
|
|
58
|
+
if (!phone) {
|
|
59
|
+
return phone;
|
|
60
|
+
}
|
|
61
|
+
const inputPhoneParts = phone.split(" ");
|
|
62
|
+
return `${inputPhoneParts[0].replace("+", "00")}/${[...(inputPhoneParts?.[1]?.trim() || []), ...(inputPhoneParts?.[2]?.trim() || [])].join("")}`;
|
|
63
|
+
};
|
|
64
|
+
exports.getPayloadPhone = getPayloadPhone;
|
|
65
|
+
const phoneValidator = phone => {
|
|
66
|
+
if (!phone) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
const inputPhoneParts = getPayloadPhone(phone)?.split("/") || [];
|
|
70
|
+
if (inputPhoneParts.length <= 1) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
return inputPhoneParts[1]?.length > 4;
|
|
74
|
+
};
|
|
75
|
+
exports.phoneValidator = phoneValidator;
|
|
76
|
+
const formatPhone = phone => {
|
|
77
|
+
if (!phone) {
|
|
78
|
+
return "";
|
|
79
|
+
}
|
|
80
|
+
const inputPhoneParts = phone.split("/");
|
|
81
|
+
if (inputPhoneParts.length === 1) {
|
|
82
|
+
return phone;
|
|
83
|
+
}
|
|
84
|
+
const internationalCode = `+${+inputPhoneParts[0]}`;
|
|
85
|
+
const number = `${inputPhoneParts[1].substring(0, 4)} ${inputPhoneParts[1].substring(4, inputPhoneParts[1].length)}`;
|
|
86
|
+
return `${internationalCode} ${number}`;
|
|
87
|
+
};
|
|
88
|
+
exports.formatPhone = formatPhone;
|
|
89
|
+
const convertPhone = (phone, internationalPrefix = "49") => {
|
|
90
|
+
if (!phone) {
|
|
91
|
+
return phone;
|
|
92
|
+
}
|
|
93
|
+
const phoneNumber = [];
|
|
94
|
+
if (phone.startsWith(`+${internationalPrefix}`) || phone.startsWith(`00${internationalPrefix}`)) {
|
|
95
|
+
phoneNumber.push(`+${internationalPrefix}`);
|
|
96
|
+
const remaining = phone.startsWith(`+${internationalPrefix}`) ? phone.split(`+${internationalPrefix}`)[1]?.split(" ")?.join("") : phone.split(`00${internationalPrefix}`)[1]?.split(" ")?.join("");
|
|
97
|
+
phoneNumber.push(remaining.substring(0, 4));
|
|
98
|
+
phoneNumber.push(remaining.substring(4, remaining.length));
|
|
99
|
+
return phoneNumber.join(" ");
|
|
100
|
+
} else if (phone.startsWith("0")) {
|
|
101
|
+
phoneNumber.push(`+${internationalPrefix}`);
|
|
102
|
+
const remaining = phone.substring(1)?.split(" ")?.join("");
|
|
103
|
+
phoneNumber.push(remaining.substring(0, 4));
|
|
104
|
+
phoneNumber.push(remaining.substring(4, remaining.length));
|
|
105
|
+
return phoneNumber.join(" ");
|
|
106
|
+
} else {
|
|
107
|
+
phoneNumber.push(`+${internationalPrefix}`);
|
|
108
|
+
const remaining = phone?.split(" ")?.join("");
|
|
109
|
+
phoneNumber.push(remaining.substring(0, 4));
|
|
110
|
+
phoneNumber.push(remaining.substring(4, phone.length));
|
|
111
|
+
return phoneNumber.join(" ");
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
exports.convertPhone = convertPhone;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns date in YYYY-MM-DD format
|
|
3
|
+
* @param date in DD.MM.YYYY format
|
|
4
|
+
* @returns formatted date string
|
|
5
|
+
*/
|
|
6
|
+
export declare const getPayloadDate: (date: string | undefined) => string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Validates a date string
|
|
9
|
+
* @param date in DD.MM.YYYY format
|
|
10
|
+
* @returns boolean
|
|
11
|
+
*/
|
|
12
|
+
export declare const dateValidator: (date: string | undefined) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @param date in YYYY-MM-DD or YYYY-MM-DDThh:mm:ss+xx:yy format
|
|
15
|
+
* @returns formatted date string in DD.MM.YYYY format
|
|
16
|
+
*/
|
|
17
|
+
export declare const formatDate: (date: string | undefined) => string;
|
|
18
|
+
/**
|
|
19
|
+
* Returns formatted date after adding 0 padding to day and month
|
|
20
|
+
* @param date in in DD.MM.YYYY format
|
|
21
|
+
* @returns formatted date string
|
|
22
|
+
*/
|
|
23
|
+
export declare const convertDate: (date: string | undefined) => string;
|
|
24
|
+
/**
|
|
25
|
+
* Returns phone number in 0000/1234567890 format
|
|
26
|
+
* @param phone in +00 1234 567890 format
|
|
27
|
+
* @returns formatted phone number string
|
|
28
|
+
*/
|
|
29
|
+
export declare const getPayloadPhone: (phone: string | undefined) => string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Returns phone number in 0000/1234567890 format
|
|
32
|
+
* @param phone in +00 1234 567890 format
|
|
33
|
+
* @returns formatted phone number string
|
|
34
|
+
*/
|
|
35
|
+
export declare const phoneValidator: (phone: string | undefined) => boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Returns phone number in +00 1234 567890 format
|
|
38
|
+
* @param phone in 0000/1234567890 format
|
|
39
|
+
* @returns formatted phone number string
|
|
40
|
+
*/
|
|
41
|
+
export declare const formatPhone: (phone: string | undefined) => string;
|
|
42
|
+
/**
|
|
43
|
+
* Returns phone number in +00 1234 567890 format
|
|
44
|
+
* @param phone in unknown format
|
|
45
|
+
* @param internationalPrefix international dial code, defaults to 49 (Germany)
|
|
46
|
+
* @returns formatted phone number string
|
|
47
|
+
*/
|
|
48
|
+
export declare const convertPhone: (phone: string | undefined, internationalPrefix?: string) => string | undefined;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export const getPayloadDate = (date) => {
|
|
2
|
+
if (!date) {
|
|
3
|
+
return date;
|
|
4
|
+
}
|
|
5
|
+
const inputDateParts = date.split(".");
|
|
6
|
+
return `${inputDateParts[2]}-${inputDateParts[1]}-${inputDateParts[0]}`;
|
|
7
|
+
};
|
|
8
|
+
export const dateValidator = (date) => {
|
|
9
|
+
if (!date) {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
const formattedDate = getPayloadDate(date);
|
|
13
|
+
if (!formattedDate) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const inputDateParts = formattedDate.split("-").map((datePart) => +datePart);
|
|
17
|
+
const [year, month, day] = inputDateParts;
|
|
18
|
+
if (day <= 0 || day > 31 || month <= 0 || month > 12 || year < 1900) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
const convertedDate = new Date(formattedDate);
|
|
22
|
+
return year === convertedDate.getFullYear() && month === convertedDate.getMonth() + 1 && day === convertedDate.getDate();
|
|
23
|
+
};
|
|
24
|
+
export const formatDate = (date) => {
|
|
25
|
+
if (!date) {
|
|
26
|
+
return "";
|
|
27
|
+
}
|
|
28
|
+
const [datePart] = date.split("T", 2);
|
|
29
|
+
const splitDateArray = datePart?.split("-", 3);
|
|
30
|
+
if (splitDateArray?.length !== 3) {
|
|
31
|
+
return "";
|
|
32
|
+
}
|
|
33
|
+
const [yyyy, mm, dd] = splitDateArray;
|
|
34
|
+
return `${dd.padStart(2, "0")}.${mm.padStart(2, "0")}.${yyyy}`;
|
|
35
|
+
};
|
|
36
|
+
export const convertDate = (date) => {
|
|
37
|
+
if (!date) {
|
|
38
|
+
return "";
|
|
39
|
+
}
|
|
40
|
+
const splitDateArray = date?.split(".", 3);
|
|
41
|
+
if (splitDateArray?.length !== 3) {
|
|
42
|
+
return "";
|
|
43
|
+
}
|
|
44
|
+
const [dd, mm, yyyy] = splitDateArray;
|
|
45
|
+
return `${dd.padStart(2, "0")}.${mm.padStart(2, "0")}.${yyyy}`;
|
|
46
|
+
};
|
|
47
|
+
export const getPayloadPhone = (phone) => {
|
|
48
|
+
if (!phone) {
|
|
49
|
+
return phone;
|
|
50
|
+
}
|
|
51
|
+
const inputPhoneParts = phone.split(" ");
|
|
52
|
+
return `${inputPhoneParts[0].replace("+", "00")}/${[
|
|
53
|
+
...inputPhoneParts?.[1]?.trim() || [],
|
|
54
|
+
...inputPhoneParts?.[2]?.trim() || []
|
|
55
|
+
].join("")}`;
|
|
56
|
+
};
|
|
57
|
+
export const phoneValidator = (phone) => {
|
|
58
|
+
if (!phone) {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
const inputPhoneParts = getPayloadPhone(phone)?.split("/") || [];
|
|
62
|
+
if (inputPhoneParts.length <= 1) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
return inputPhoneParts[1]?.length > 4;
|
|
66
|
+
};
|
|
67
|
+
export const formatPhone = (phone) => {
|
|
68
|
+
if (!phone) {
|
|
69
|
+
return "";
|
|
70
|
+
}
|
|
71
|
+
const inputPhoneParts = phone.split("/");
|
|
72
|
+
if (inputPhoneParts.length === 1) {
|
|
73
|
+
return phone;
|
|
74
|
+
}
|
|
75
|
+
const internationalCode = `+${+inputPhoneParts[0]}`;
|
|
76
|
+
const number = `${inputPhoneParts[1].substring(
|
|
77
|
+
0,
|
|
78
|
+
4
|
|
79
|
+
)} ${inputPhoneParts[1].substring(4, inputPhoneParts[1].length)}`;
|
|
80
|
+
return `${internationalCode} ${number}`;
|
|
81
|
+
};
|
|
82
|
+
export const convertPhone = (phone, internationalPrefix = "49") => {
|
|
83
|
+
if (!phone) {
|
|
84
|
+
return phone;
|
|
85
|
+
}
|
|
86
|
+
const phoneNumber = [];
|
|
87
|
+
if (phone.startsWith(`+${internationalPrefix}`) || phone.startsWith(`00${internationalPrefix}`)) {
|
|
88
|
+
phoneNumber.push(`+${internationalPrefix}`);
|
|
89
|
+
const remaining = phone.startsWith(`+${internationalPrefix}`) ? phone.split(`+${internationalPrefix}`)[1]?.split(" ")?.join("") : phone.split(`00${internationalPrefix}`)[1]?.split(" ")?.join("");
|
|
90
|
+
phoneNumber.push(remaining.substring(0, 4));
|
|
91
|
+
phoneNumber.push(remaining.substring(4, remaining.length));
|
|
92
|
+
return phoneNumber.join(" ");
|
|
93
|
+
} else if (phone.startsWith("0")) {
|
|
94
|
+
phoneNumber.push(`+${internationalPrefix}`);
|
|
95
|
+
const remaining = phone.substring(1)?.split(" ")?.join("");
|
|
96
|
+
phoneNumber.push(remaining.substring(0, 4));
|
|
97
|
+
phoneNumber.push(remaining.substring(4, remaining.length));
|
|
98
|
+
return phoneNumber.join(" ");
|
|
99
|
+
} else {
|
|
100
|
+
phoneNumber.push(`+${internationalPrefix}`);
|
|
101
|
+
const remaining = phone?.split(" ")?.join("");
|
|
102
|
+
phoneNumber.push(remaining.substring(0, 4));
|
|
103
|
+
phoneNumber.push(remaining.substring(4, phone.length));
|
|
104
|
+
return phoneNumber.join(" ");
|
|
105
|
+
}
|
|
106
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getImageFromList = void 0;
|
|
7
|
+
exports.isImageType = isImageType;
|
|
8
|
+
var _backbone = require("@aboutyou/backbone");
|
|
9
|
+
var _attributeHelpers = require("./attributeHelpers.cjs");
|
|
10
|
+
function isImageType(type, image) {
|
|
11
|
+
const attributeValue = (0, _backbone.getFirstAttributeValue)(image.attributes, "imageType");
|
|
12
|
+
if (attributeValue) {
|
|
13
|
+
return attributeValue.value === type;
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
const getImageFromList = (images, imageType, imageView, fallback = true) => {
|
|
18
|
+
return images?.find(i => (0, _attributeHelpers.getAttributeValue)(i.attributes, "imageType") === imageType && (0, _attributeHelpers.getAttributeValue)(i.attributes, "imageView") === imageView) ?? (fallback ? images[0] : null);
|
|
19
|
+
};
|
|
20
|
+
exports.getImageFromList = getImageFromList;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ProductImageType } from '../constants/product';
|
|
2
|
+
import { Product, ProductImage } from '../index';
|
|
3
|
+
export declare function isImageType(type: ProductImageType, image: ProductImage): boolean;
|
|
4
|
+
export declare const getImageFromList: (images: Product['images'], imageType: string, imageView: string, fallback?: boolean) => ProductImage | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getFirstAttributeValue } from "@aboutyou/backbone";
|
|
2
|
+
import { getAttributeValue } from "./attributeHelpers.mjs";
|
|
3
|
+
export function isImageType(type, image) {
|
|
4
|
+
const attributeValue = getFirstAttributeValue(image.attributes, "imageType");
|
|
5
|
+
if (attributeValue) {
|
|
6
|
+
return attributeValue.value === type;
|
|
7
|
+
}
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
export const getImageFromList = (images, imageType, imageView, fallback = true) => {
|
|
11
|
+
return images?.find(
|
|
12
|
+
(i) => getAttributeValue(i.attributes, "imageType") === imageType && getAttributeValue(i.attributes, "imageView") === imageView
|
|
13
|
+
) ?? (fallback ? images[0] : null);
|
|
14
|
+
};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _advancedAttributeHelpers = require("./advancedAttributeHelpers.cjs");
|
|
7
|
+
Object.keys(_advancedAttributeHelpers).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _advancedAttributeHelpers[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _advancedAttributeHelpers[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _arrayHelpers = require("./arrayHelpers.cjs");
|
|
18
|
+
Object.keys(_arrayHelpers).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _arrayHelpers[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _arrayHelpers[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _attributeHelpers = require("./attributeHelpers.cjs");
|
|
29
|
+
Object.keys(_attributeHelpers).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _attributeHelpers[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _attributeHelpers[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _autobind = require("./autobind.cjs");
|
|
40
|
+
Object.keys(_autobind).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _autobind[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _autobind[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _basketHelpers = require("./basketHelpers.cjs");
|
|
51
|
+
Object.keys(_basketHelpers).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _basketHelpers[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _basketHelpers[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var _categoryHelper = require("./categoryHelper.cjs");
|
|
62
|
+
Object.keys(_categoryHelper).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _categoryHelper[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _categoryHelper[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var _filterHelper = require("./filterHelper.cjs");
|
|
73
|
+
Object.keys(_filterHelper).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _filterHelper[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _filterHelper[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
var _formHelpers = require("./formHelpers.cjs");
|
|
84
|
+
Object.keys(_formHelpers).forEach(function (key) {
|
|
85
|
+
if (key === "default" || key === "__esModule") return;
|
|
86
|
+
if (key in exports && exports[key] === _formHelpers[key]) return;
|
|
87
|
+
Object.defineProperty(exports, key, {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () {
|
|
90
|
+
return _formHelpers[key];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
var _imageHelpers = require("./imageHelpers.cjs");
|
|
95
|
+
Object.keys(_imageHelpers).forEach(function (key) {
|
|
96
|
+
if (key === "default" || key === "__esModule") return;
|
|
97
|
+
if (key in exports && exports[key] === _imageHelpers[key]) return;
|
|
98
|
+
Object.defineProperty(exports, key, {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () {
|
|
101
|
+
return _imageHelpers[key];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
var _localization = require("./localization.cjs");
|
|
106
|
+
Object.keys(_localization).forEach(function (key) {
|
|
107
|
+
if (key === "default" || key === "__esModule") return;
|
|
108
|
+
if (key in exports && exports[key] === _localization[key]) return;
|
|
109
|
+
Object.defineProperty(exports, key, {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () {
|
|
112
|
+
return _localization[key];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
var _objectHelpers = require("./objectHelpers.cjs");
|
|
117
|
+
Object.keys(_objectHelpers).forEach(function (key) {
|
|
118
|
+
if (key === "default" || key === "__esModule") return;
|
|
119
|
+
if (key in exports && exports[key] === _objectHelpers[key]) return;
|
|
120
|
+
Object.defineProperty(exports, key, {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _objectHelpers[key];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
var _orderHelpers = require("./orderHelpers.cjs");
|
|
128
|
+
Object.keys(_orderHelpers).forEach(function (key) {
|
|
129
|
+
if (key === "default" || key === "__esModule") return;
|
|
130
|
+
if (key in exports && exports[key] === _orderHelpers[key]) return;
|
|
131
|
+
Object.defineProperty(exports, key, {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: function () {
|
|
134
|
+
return _orderHelpers[key];
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
var _productDisruptorHelper = require("./productDisruptorHelper.cjs");
|
|
139
|
+
Object.keys(_productDisruptorHelper).forEach(function (key) {
|
|
140
|
+
if (key === "default" || key === "__esModule") return;
|
|
141
|
+
if (key in exports && exports[key] === _productDisruptorHelper[key]) return;
|
|
142
|
+
Object.defineProperty(exports, key, {
|
|
143
|
+
enumerable: true,
|
|
144
|
+
get: function () {
|
|
145
|
+
return _productDisruptorHelper[key];
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
var _productHelpers = require("./productHelpers.cjs");
|
|
150
|
+
Object.keys(_productHelpers).forEach(function (key) {
|
|
151
|
+
if (key === "default" || key === "__esModule") return;
|
|
152
|
+
if (key in exports && exports[key] === _productHelpers[key]) return;
|
|
153
|
+
Object.defineProperty(exports, key, {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function () {
|
|
156
|
+
return _productHelpers[key];
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
var _sanitizationHelpers = require("./sanitizationHelpers.cjs");
|
|
161
|
+
Object.keys(_sanitizationHelpers).forEach(function (key) {
|
|
162
|
+
if (key === "default" || key === "__esModule") return;
|
|
163
|
+
if (key in exports && exports[key] === _sanitizationHelpers[key]) return;
|
|
164
|
+
Object.defineProperty(exports, key, {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function () {
|
|
167
|
+
return _sanitizationHelpers[key];
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
var _sortingHelper = require("./sortingHelper.cjs");
|
|
172
|
+
Object.keys(_sortingHelper).forEach(function (key) {
|
|
173
|
+
if (key === "default" || key === "__esModule") return;
|
|
174
|
+
if (key in exports && exports[key] === _sortingHelper[key]) return;
|
|
175
|
+
Object.defineProperty(exports, key, {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: function () {
|
|
178
|
+
return _sortingHelper[key];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
var _stringHelpers = require("./stringHelpers.cjs");
|
|
183
|
+
Object.keys(_stringHelpers).forEach(function (key) {
|
|
184
|
+
if (key === "default" || key === "__esModule") return;
|
|
185
|
+
if (key in exports && exports[key] === _stringHelpers[key]) return;
|
|
186
|
+
Object.defineProperty(exports, key, {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function () {
|
|
189
|
+
return _stringHelpers[key];
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './advancedAttributeHelpers';
|
|
2
|
+
export * from './arrayHelpers';
|
|
3
|
+
export * from './attributeHelpers';
|
|
4
|
+
export * from './autobind';
|
|
5
|
+
export * from './basketHelpers';
|
|
6
|
+
export * from './categoryHelper';
|
|
7
|
+
export * from './filterHelper';
|
|
8
|
+
export * from './formHelpers';
|
|
9
|
+
export * from './imageHelpers';
|
|
10
|
+
export * from './localization';
|
|
11
|
+
export * from './objectHelpers';
|
|
12
|
+
export * from './orderHelpers';
|
|
13
|
+
export * from './productDisruptorHelper';
|
|
14
|
+
export * from './productHelpers';
|
|
15
|
+
export * from './sanitizationHelpers';
|
|
16
|
+
export * from './sortingHelper';
|
|
17
|
+
export * from './stringHelpers';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from "./advancedAttributeHelpers.mjs";
|
|
2
|
+
export * from "./arrayHelpers.mjs";
|
|
3
|
+
export * from "./attributeHelpers.mjs";
|
|
4
|
+
export * from "./autobind.mjs";
|
|
5
|
+
export * from "./basketHelpers.mjs";
|
|
6
|
+
export * from "./categoryHelper.mjs";
|
|
7
|
+
export * from "./filterHelper.mjs";
|
|
8
|
+
export * from "./formHelpers.mjs";
|
|
9
|
+
export * from "./imageHelpers.mjs";
|
|
10
|
+
export * from "./localization.mjs";
|
|
11
|
+
export * from "./objectHelpers.mjs";
|
|
12
|
+
export * from "./orderHelpers.mjs";
|
|
13
|
+
export * from "./productDisruptorHelper.mjs";
|
|
14
|
+
export * from "./productHelpers.mjs";
|
|
15
|
+
export * from "./sanitizationHelpers.mjs";
|
|
16
|
+
export * from "./sortingHelper.mjs";
|
|
17
|
+
export * from "./stringHelpers.mjs";
|