@ubnt/store.core 9.9.1 → 9.10.0-konutis.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.
Files changed (210) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/lib/_virtual/_virtual_multi-entry.js +18 -2
  3. package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
  4. package/lib/_virtual/_virtual_multi-entry.mjs +4 -0
  5. package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
  6. package/lib/assets/attention.svg +5 -5
  7. package/lib/assets/attention2.svg +5 -5
  8. package/lib/assets/socialMedia/{twitter.svg.js → x.svg.js} +6 -6
  9. package/lib/assets/socialMedia/x.svg.js.map +1 -0
  10. package/lib/assets/socialMedia/x.svg.mjs +3 -0
  11. package/lib/assets/socialMedia/x.svg.mjs.map +1 -0
  12. package/lib/assets/x.svg +3 -0
  13. package/lib/components/Footer/Footer.d.ts +1 -1
  14. package/lib/components/Footer/Footer.js +192 -74
  15. package/lib/components/Footer/Footer.js.map +1 -1
  16. package/lib/components/Footer/Footer.mjs +174 -76
  17. package/lib/components/Footer/Footer.mjs.map +1 -1
  18. package/lib/components/Footer/Footer.styles.d.ts +17 -5
  19. package/lib/components/Footer/Footer.styles.js +99 -48
  20. package/lib/components/Footer/Footer.styles.js.map +1 -1
  21. package/lib/components/Footer/Footer.styles.mjs +95 -48
  22. package/lib/components/Footer/Footer.styles.mjs.map +1 -1
  23. package/lib/components/Footer/Footer.types.d.ts +40 -0
  24. package/lib/components/Footer/Footer.types.js +16 -0
  25. package/lib/components/Footer/Footer.types.js.map +1 -1
  26. package/lib/components/Footer/Footer.types.mjs +15 -0
  27. package/lib/components/Footer/Footer.types.mjs.map +1 -1
  28. package/lib/components/Footer/hooks/useFooterContent.d.ts +94 -0
  29. package/lib/components/Footer/hooks/useFooterContent.js +384 -0
  30. package/lib/components/Footer/hooks/useFooterContent.js.map +1 -0
  31. package/lib/components/Footer/hooks/useFooterContent.mjs +348 -0
  32. package/lib/components/Footer/hooks/useFooterContent.mjs.map +1 -0
  33. package/lib/components/Footer/index.js +3 -1
  34. package/lib/components/Footer/index.js.map +1 -1
  35. package/lib/components/Footer/index.mjs +1 -1
  36. package/lib/components/Footer/translations/ar.json.js +47 -0
  37. package/lib/components/Footer/translations/ar.json.js.map +1 -0
  38. package/lib/components/Footer/translations/ar.json.mjs +42 -0
  39. package/lib/components/Footer/translations/ar.json.mjs.map +1 -0
  40. package/lib/components/Footer/translations/de.json.js +47 -0
  41. package/lib/components/Footer/translations/de.json.js.map +1 -0
  42. package/lib/components/Footer/translations/de.json.mjs +42 -0
  43. package/lib/components/Footer/translations/de.json.mjs.map +1 -0
  44. package/lib/components/Footer/translations/el.json.js +47 -0
  45. package/lib/components/Footer/translations/el.json.js.map +1 -0
  46. package/lib/components/Footer/translations/el.json.mjs +42 -0
  47. package/lib/components/Footer/translations/el.json.mjs.map +1 -0
  48. package/lib/components/Footer/translations/en.json.js +46 -0
  49. package/lib/components/Footer/translations/en.json.js.map +1 -0
  50. package/lib/components/Footer/translations/en.json.mjs +41 -0
  51. package/lib/components/Footer/translations/en.json.mjs.map +1 -0
  52. package/lib/components/Footer/translations/es.json.js +47 -0
  53. package/lib/components/Footer/translations/es.json.js.map +1 -0
  54. package/lib/components/Footer/translations/es.json.mjs +42 -0
  55. package/lib/components/Footer/translations/es.json.mjs.map +1 -0
  56. package/lib/components/Footer/translations/fr.json.js +47 -0
  57. package/lib/components/Footer/translations/fr.json.js.map +1 -0
  58. package/lib/components/Footer/translations/fr.json.mjs +42 -0
  59. package/lib/components/Footer/translations/fr.json.mjs.map +1 -0
  60. package/lib/components/Footer/translations/it.json.js +47 -0
  61. package/lib/components/Footer/translations/it.json.js.map +1 -0
  62. package/lib/components/Footer/translations/it.json.mjs +42 -0
  63. package/lib/components/Footer/translations/it.json.mjs.map +1 -0
  64. package/lib/components/Footer/translations/ja.json.js +47 -0
  65. package/lib/components/Footer/translations/ja.json.js.map +1 -0
  66. package/lib/components/Footer/translations/ja.json.mjs +42 -0
  67. package/lib/components/Footer/translations/ja.json.mjs.map +1 -0
  68. package/lib/components/Footer/translations/pt-BR.json.js +47 -0
  69. package/lib/components/Footer/translations/pt-BR.json.js.map +1 -0
  70. package/lib/components/Footer/translations/pt-BR.json.mjs +42 -0
  71. package/lib/components/Footer/translations/pt-BR.json.mjs.map +1 -0
  72. package/lib/components/Footer/translations/zh-Hans.json.js +47 -0
  73. package/lib/components/Footer/translations/zh-Hans.json.js.map +1 -0
  74. package/lib/components/Footer/translations/zh-Hans.json.mjs +42 -0
  75. package/lib/components/Footer/translations/zh-Hans.json.mjs.map +1 -0
  76. package/lib/components/Footer/translations/zh-Hant-TW.json.js +47 -0
  77. package/lib/components/Footer/translations/zh-Hant-TW.json.js.map +1 -0
  78. package/lib/components/Footer/translations/zh-Hant-TW.json.mjs +42 -0
  79. package/lib/components/Footer/translations/zh-Hant-TW.json.mjs.map +1 -0
  80. package/lib/components/Header/AccountMenu/AccountMenu.js +6 -3
  81. package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
  82. package/lib/components/Header/AccountMenu/AccountMenu.mjs +6 -3
  83. package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
  84. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
  85. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js +19 -11
  86. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js.map +1 -1
  87. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs +19 -11
  88. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs.map +1 -1
  89. package/lib/components/Header/Navigation/MicrositeMenu/mapping.js +4 -0
  90. package/lib/components/Header/Navigation/MicrositeMenu/mapping.js.map +1 -1
  91. package/lib/components/Header/Navigation/MicrositeMenu/mapping.mjs +4 -0
  92. package/lib/components/Header/Navigation/MicrositeMenu/mapping.mjs.map +1 -1
  93. package/lib/components/Header/Navigation/MobileMenu/MobileMenu.js +11 -6
  94. package/lib/components/Header/Navigation/MobileMenu/MobileMenu.js.map +1 -1
  95. package/lib/components/Header/Navigation/MobileMenu/MobileMenu.mjs +11 -6
  96. package/lib/components/Header/Navigation/MobileMenu/MobileMenu.mjs.map +1 -1
  97. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +8 -4
  98. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
  99. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +8 -4
  100. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
  101. package/lib/components/Header/translations/ar.json.js +37 -34
  102. package/lib/components/Header/translations/ar.json.js.map +1 -1
  103. package/lib/components/Header/translations/ar.json.mjs +37 -35
  104. package/lib/components/Header/translations/ar.json.mjs.map +1 -1
  105. package/lib/components/Header/translations/de.json.js +37 -34
  106. package/lib/components/Header/translations/de.json.js.map +1 -1
  107. package/lib/components/Header/translations/de.json.mjs +37 -35
  108. package/lib/components/Header/translations/de.json.mjs.map +1 -1
  109. package/lib/components/Header/translations/el.json.js +37 -34
  110. package/lib/components/Header/translations/el.json.js.map +1 -1
  111. package/lib/components/Header/translations/el.json.mjs +37 -35
  112. package/lib/components/Header/translations/el.json.mjs.map +1 -1
  113. package/lib/components/Header/translations/en.json.js +36 -33
  114. package/lib/components/Header/translations/en.json.js.map +1 -1
  115. package/lib/components/Header/translations/en.json.mjs +36 -34
  116. package/lib/components/Header/translations/en.json.mjs.map +1 -1
  117. package/lib/components/Header/translations/es.json.js +37 -34
  118. package/lib/components/Header/translations/es.json.js.map +1 -1
  119. package/lib/components/Header/translations/es.json.mjs +37 -35
  120. package/lib/components/Header/translations/es.json.mjs.map +1 -1
  121. package/lib/components/Header/translations/fr.json.js +37 -34
  122. package/lib/components/Header/translations/fr.json.js.map +1 -1
  123. package/lib/components/Header/translations/fr.json.mjs +37 -35
  124. package/lib/components/Header/translations/fr.json.mjs.map +1 -1
  125. package/lib/components/Header/translations/it.json.js +37 -34
  126. package/lib/components/Header/translations/it.json.js.map +1 -1
  127. package/lib/components/Header/translations/it.json.mjs +37 -35
  128. package/lib/components/Header/translations/it.json.mjs.map +1 -1
  129. package/lib/components/Header/translations/ja.json.js +37 -34
  130. package/lib/components/Header/translations/ja.json.js.map +1 -1
  131. package/lib/components/Header/translations/ja.json.mjs +37 -35
  132. package/lib/components/Header/translations/ja.json.mjs.map +1 -1
  133. package/lib/components/Header/translations/pt-BR.json.js +37 -34
  134. package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
  135. package/lib/components/Header/translations/pt-BR.json.mjs +37 -35
  136. package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
  137. package/lib/components/Header/translations/zh-Hans.json.js +37 -34
  138. package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
  139. package/lib/components/Header/translations/zh-Hans.json.mjs +37 -35
  140. package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
  141. package/lib/components/Header/translations/zh-Hant-TW.json.js +37 -34
  142. package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
  143. package/lib/components/Header/translations/zh-Hant-TW.json.mjs +37 -35
  144. package/lib/components/Header/translations/zh-Hant-TW.json.mjs.map +1 -1
  145. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
  146. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
  147. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
  148. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
  149. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
  150. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
  151. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
  152. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
  153. package/lib/constants/url.d.ts +4 -4
  154. package/lib/constants/url.js +4 -4
  155. package/lib/constants/url.js.map +1 -1
  156. package/lib/constants/url.mjs +4 -4
  157. package/lib/constants/url.mjs.map +1 -1
  158. package/lib/contexts/MenuContext/presets.js.map +1 -1
  159. package/lib/contexts/MenuContext/presets.mjs.map +1 -1
  160. package/lib/helpers/index.d.ts +1 -0
  161. package/lib/helpers/index.js +12 -0
  162. package/lib/helpers/index.js.map +1 -1
  163. package/lib/helpers/index.mjs +1 -0
  164. package/lib/helpers/index.mjs.map +1 -1
  165. package/lib/helpers/product.d.ts +96 -0
  166. package/lib/helpers/product.js +360 -0
  167. package/lib/helpers/product.js.map +1 -0
  168. package/lib/helpers/product.mjs +348 -0
  169. package/lib/helpers/product.mjs.map +1 -0
  170. package/lib/types/index.d.ts +1 -0
  171. package/lib/types/index.js +2 -0
  172. package/lib/types/index.js.map +1 -1
  173. package/lib/types/index.mjs +1 -0
  174. package/lib/types/index.mjs.map +1 -1
  175. package/lib/types/product.d.ts +87 -0
  176. package/lib/types/product.js +14 -0
  177. package/lib/types/product.js.map +1 -0
  178. package/lib/types/product.mjs +13 -0
  179. package/lib/types/product.mjs.map +1 -0
  180. package/lib/utils/address.d.ts +61 -61
  181. package/lib/utils/array.d.ts +4 -0
  182. package/lib/utils/array.js +10 -0
  183. package/lib/utils/array.js.map +1 -1
  184. package/lib/utils/array.mjs +10 -1
  185. package/lib/utils/array.mjs.map +1 -1
  186. package/lib/utils/index.d.ts +1 -0
  187. package/lib/utils/index.js +2 -0
  188. package/lib/utils/index.js.map +1 -1
  189. package/lib/utils/index.mjs +2 -0
  190. package/lib/utils/index.mjs.map +1 -1
  191. package/lib/utils/productSort.d.ts +41 -0
  192. package/lib/utils/productSort.js +66 -0
  193. package/lib/utils/productSort.js.map +1 -0
  194. package/lib/utils/productSort.mjs +59 -0
  195. package/lib/utils/productSort.mjs.map +1 -0
  196. package/lib/utils/typeGuards.d.ts +1 -0
  197. package/lib/utils/typeGuards.js +6 -0
  198. package/lib/utils/typeGuards.js.map +1 -0
  199. package/lib/utils/typeGuards.mjs +5 -0
  200. package/lib/utils/typeGuards.mjs.map +1 -0
  201. package/package.json +1 -1
  202. package/lib/assets/socialMedia/twitter.svg.js.map +0 -1
  203. package/lib/assets/socialMedia/twitter.svg.mjs +0 -3
  204. package/lib/assets/socialMedia/twitter.svg.mjs.map +0 -1
  205. package/lib/assets/twitter.svg +0 -3
  206. package/lib/constants/footerContent.d.ts +0 -145
  207. package/lib/constants/footerContent.js +0 -313
  208. package/lib/constants/footerContent.js.map +0 -1
  209. package/lib/constants/footerContent.mjs +0 -293
  210. package/lib/constants/footerContent.mjs.map +0 -1
@@ -21,6 +21,7 @@ var product$1 = require('./product.js');
21
21
  var asset$1 = require('./asset.js');
22
22
  var imageOptimizer$1 = require('./imageOptimizer.js');
23
23
  var styles$1 = require('./styles.js');
24
+ var storeId$1 = require('./storeId.js');
24
25
  "use strict";
25
26
  exports.url = url$1;
26
27
  exports.money = misc;
@@ -43,4 +44,5 @@ exports.product = product$1;
43
44
  exports.asset = asset$1;
44
45
  exports.imageOptimizer = imageOptimizer$1;
45
46
  exports.styles = styles$1;
47
+ exports.storeId = storeId$1;
46
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -40,5 +40,7 @@ import * as imageOptimizer$1 from './imageOptimizer.mjs';
40
40
  export { imageOptimizer$1 as imageOptimizer };
41
41
  import * as styles$1 from './styles.mjs';
42
42
  export { styles$1 as styles };
43
+ import * as storeId$1 from './storeId.mjs';
44
+ export { storeId$1 as storeId };
43
45
  "use strict";
44
46
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,41 @@
1
+ import type { Nullish, StorefrontProduct, StoreId, UnionToAllPossibleTuples } from "../types";
2
+ import { DisplayProductStatus } from "../types";
3
+ /**
4
+ * Narrow MinimalProProductFragment type even more to the union of fields that are needed to sort product
5
+ */
6
+ type ProductMinFieldsForSorting = Pick<StorefrontProduct, "status" | "tags" | "minDisplayPrice"> & {
7
+ variants: {
8
+ availableInOtherStores: Array<{
9
+ __typename: string;
10
+ }>;
11
+ }[];
12
+ linkedProducts?: {
13
+ status: StorefrontProduct["status"];
14
+ }[];
15
+ };
16
+ export declare enum Sort {
17
+ HighestPrice = "highest-price",
18
+ LowestPrice = "lowest-price",
19
+ Availability = "availability"
20
+ }
21
+ export declare enum SortOrder {
22
+ Asc = "Asc",
23
+ Desc = "Desc"
24
+ }
25
+ /**
26
+ * Variants statuses sorted in ascending order from least preferable to most, so if some new status comes in, then the
27
+ * lookup for `.indexOf()` would return `-1`, thus being "worse" then DisplayProductStatus.SoldOut and moved to the very
28
+ * back of list
29
+ */
30
+ export declare const sortedStatusesByPriorityAsc: UnionToAllPossibleTuples<DisplayProductStatus>;
31
+ export declare const sortByAvailabilityDesc: (current: ProductMinFieldsForSorting, next: ProductMinFieldsForSorting) => number;
32
+ export declare const sortByPrice: (order: SortOrder) => (current: ProductMinFieldsForSorting, next: ProductMinFieldsForSorting) => number;
33
+ /**
34
+ * Sorts products based on the given sort type.
35
+ * @param currentSort - sort type
36
+ * @param sortByWeightTag - if false, then sort by weight tag is
37
+ * ignored (e.g. for `Related Add-ons` where
38
+ * we don't want to sort by weight tag)
39
+ */
40
+ export declare const sortProducts: (currentSort: Nullish<string | Sort>, storeId?: StoreId, sortByWeightTag?: boolean) => (current: ProductMinFieldsForSorting, next: ProductMinFieldsForSorting) => number;
41
+ export {};
@@ -0,0 +1,66 @@
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
+ case "highest-price" /* HighestPrice */:
42
+ case "lowest-price" /* LowestPrice */:
43
+ {
44
+ return sortByPrice(currentSort === "highest-price" /* HighestPrice */ ? "Desc" /* Desc */ : "Asc" /* Asc */)(current, next);
45
+ }
46
+ case "availability" /* Availability */:
47
+ {
48
+ return sortByAvailabilityDesc(current, next);
49
+ }
50
+ default:
51
+ {
52
+ const sorts = [sortByAvailabilityDesc];
53
+ if (sortByWeightTag) {
54
+ sorts.push(product$1.sortByTagWeight(product$1.SortSiteId.Store, storeId));
55
+ }
56
+ return array.combineSorts(sorts)(current, next);
57
+ }
58
+ }
59
+ };
60
+ exports.Sort = Sort;
61
+ exports.SortOrder = SortOrder;
62
+ exports.sortByAvailabilityDesc = sortByAvailabilityDesc;
63
+ exports.sortByPrice = sortByPrice;
64
+ exports.sortProducts = sortProducts;
65
+ exports.sortedStatusesByPriorityAsc = sortedStatusesByPriorityAsc;
66
+ //# sourceMappingURL=productSort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productSort.js","sources":["../../src/utils/productSort.ts"],"sourcesContent":["import type { Nullish, StorefrontProduct, StoreId, UnionToAllPossibleTuples } 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 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/**\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 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 };"],"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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"}
@@ -0,0 +1,59 @@
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
+ case "highest-price" /* HighestPrice */:
40
+ case "lowest-price" /* LowestPrice */:
41
+ {
42
+ return sortByPrice(currentSort === "highest-price" /* HighestPrice */ ? "Desc" /* Desc */ : "Asc" /* Asc */)(current, next);
43
+ }
44
+ case "availability" /* Availability */:
45
+ {
46
+ return sortByAvailabilityDesc(current, next);
47
+ }
48
+ default:
49
+ {
50
+ const sorts = [sortByAvailabilityDesc];
51
+ if (sortByWeightTag) {
52
+ sorts.push(sortByTagWeight(SortSiteId.Store, storeId));
53
+ }
54
+ return combineSorts(sorts)(current, next);
55
+ }
56
+ }
57
+ };
58
+ export { Sort, SortOrder, sortByAvailabilityDesc, sortByPrice, sortProducts, sortedStatusesByPriorityAsc };
59
+ //# sourceMappingURL=productSort.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productSort.mjs","sources":["../../src/utils/productSort.ts"],"sourcesContent":["import type { Nullish, StorefrontProduct, StoreId, UnionToAllPossibleTuples } 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 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/**\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 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 };"],"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":";;;;;AAsBY,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,KAAqB,IAAA,CACpBJ,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;AAUW,MAAAC,YAAA,GAAeA,CACxBC,WACA,EAAAC,OAAA,EACAC,kBAAkB,IAEpB,KAAA,CAACZ,SAAqCC,IAAqC,KAAA;EACzE,QAAQS,WAAa;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;"}
@@ -0,0 +1 @@
1
+ export declare const isNonNullish: <T>(entry: T | null | undefined) => entry is T;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+ "use strict";
3
+
4
+ const isNonNullish = entry => entry !== null && entry !== void 0;
5
+ exports.isNonNullish = isNonNullish;
6
+ //# sourceMappingURL=typeGuards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeGuards.js","sources":["../../src/utils/typeGuards.ts"],"sourcesContent":["export const isNonNullish = <T>(entry: T | null | undefined): entry is T =>\n entry !== null && entry !== undefined;\n"],"names":["isNonNullish","entry"],"mappings":";;;AAAO,MAAMA,YAAe,GAAIC,KAC9B,IAAAA,KAAA,KAAU,QAAQA,KAAU,KAAA,KAAA,CAAA;"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ const isNonNullish = entry => entry !== null && entry !== void 0;
4
+ export { isNonNullish };
5
+ //# sourceMappingURL=typeGuards.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeGuards.mjs","sources":["../../src/utils/typeGuards.ts"],"sourcesContent":["export const isNonNullish = <T>(entry: T | null | undefined): entry is T =>\n entry !== null && entry !== undefined;\n"],"names":["isNonNullish","entry"],"mappings":";;AAAO,MAAMA,YAAe,GAAIC,KAC9B,IAAAA,KAAA,KAAU,QAAQA,KAAU,KAAA,KAAA,CAAA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubnt/store.core",
3
- "version": "9.9.1",
3
+ "version": "9.10.0-konutis.1",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "scripts": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"twitter.svg.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,3 +0,0 @@
1
- export * from "../twitter.svg";
2
- export { default } from "../twitter.svg";
3
- //# sourceMappingURL=twitter.svg.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"twitter.svg.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,3 +0,0 @@
1
- <svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path opacity="0.9" fill-rule="evenodd" clip-rule="evenodd" d="M17.417 1.64946C17.1818 1.99671 16.9136 2.32588 16.6123 2.63697C16.311 2.94805 15.9913 3.22657 15.6532 3.47255V3.68958V3.92832C15.6532 5.08583 15.4328 6.25782 14.9918 7.44427C14.5509 8.63073 13.9005 9.70504 13.0407 10.6672C12.1809 11.6294 11.1153 12.4144 9.84391 13.0221C8.57254 13.6297 7.11378 13.9336 5.46761 13.9336C4.46816 13.9336 3.50545 13.7961 2.57948 13.5212C1.65351 13.2463 0.793686 12.8557 0 12.3492C0.132281 12.3637 0.271911 12.3782 0.41889 12.3927C0.565869 12.4071 0.705498 12.4144 0.83778 12.4144C1.67556 12.4144 2.47292 12.2805 3.22986 12.0128C3.9868 11.7452 4.67393 11.3726 5.29124 10.8951C4.51225 10.8806 3.81778 10.6455 3.20781 10.1898C2.59785 9.73398 2.17529 9.15884 1.94012 8.46433C2.0577 8.4788 2.17161 8.49327 2.28185 8.50774C2.39208 8.52221 2.50599 8.52944 2.62357 8.52944C2.78525 8.52944 2.94325 8.51859 3.09758 8.49689C3.25191 8.47518 3.40991 8.44263 3.57159 8.39922C2.74851 8.24006 2.06138 7.83855 1.51021 7.19468C0.959038 6.55082 0.683453 5.80205 0.683453 4.94838V4.92668V4.90497C0.933316 5.03519 1.1942 5.14009 1.46611 5.21967C1.73802 5.29925 2.02096 5.33904 2.31492 5.33904C1.82989 5.02072 1.44407 4.60474 1.15746 4.09109C0.870851 3.57745 0.727545 3.01677 0.727545 2.40908C0.727545 2.09076 0.767964 1.7833 0.848803 1.48668C0.929641 1.19007 1.0509 0.911543 1.21258 0.651102C1.65351 1.17198 2.14589 1.65308 2.68971 2.09438C3.23353 2.53568 3.81778 2.91188 4.44244 3.22296C5.0671 3.53404 5.72483 3.78363 6.41563 3.97173C7.10643 4.15982 7.82662 4.27557 8.57622 4.31898C8.54682 4.18876 8.52477 4.05854 8.51007 3.92832C8.49538 3.7981 8.48803 3.66064 8.48803 3.51595C8.48803 2.54653 8.8371 1.71819 9.53525 1.03091C10.2334 0.343637 11.0749 0 12.0596 0C12.574 0 13.0554 0.0976648 13.5037 0.292996C13.952 0.488327 14.3378 0.759619 14.6611 1.10687C15.0727 1.02006 15.4695 0.907926 15.8517 0.770471C16.2338 0.633016 16.5939 0.463006 16.932 0.260441C16.7997 0.665571 16.5976 1.03453 16.3257 1.36732C16.0538 1.7001 15.7341 1.97501 15.3666 2.19204C15.7341 2.14864 16.0868 2.08353 16.4249 1.99671C16.7629 1.9099 17.0936 1.79415 17.417 1.64946Z" fill="#838691"/>
3
- </svg>
@@ -1,145 +0,0 @@
1
- import { ExternalUrl } from "../constants/url";
2
- import { StoreId } from "../types";
3
- export declare enum FooterHeaderId {
4
- Company = "company",
5
- Training = "training",
6
- Buy = "buy",
7
- Tools = "tools",
8
- Social = "social",
9
- Terms = "terms"
10
- }
11
- export declare enum FooterLinkId {
12
- Careers = "careers",
13
- Contact = "contact",
14
- Investors = "investors",
15
- Courses = "courses",
16
- Calendar = "calendar",
17
- Trainers = "trainers",
18
- BecomeTrainer = "becomeTrainer",
19
- Find = "find",
20
- Stock = "stock",
21
- BecomeDistributor = "becomeDistributor",
22
- DesignCenter = "designCenter",
23
- Wifiman = "wifiman",
24
- UISP = "uisp",
25
- UispDesignCenter = "uispDesignCenter",
26
- Facebook = "facebook",
27
- Twitter = "twitter",
28
- Youtube = "youtube",
29
- Instagram = "instagram",
30
- Conditions = "conditions",
31
- Service = "service",
32
- Privacy = "privacy",
33
- Return = "return",
34
- Cookie = "cookie"
35
- }
36
- export declare const FooterLinks: {
37
- careers: ExternalUrl;
38
- contact: ExternalUrl;
39
- investors: ExternalUrl;
40
- courses: ExternalUrl;
41
- calendar: ExternalUrl;
42
- trainers: ExternalUrl;
43
- becomeTrainer: ExternalUrl;
44
- find: ExternalUrl;
45
- stock: ExternalUrl;
46
- becomeDistributor: ExternalUrl;
47
- designCenter: ExternalUrl;
48
- wifiman: ExternalUrl;
49
- uisp: ExternalUrl;
50
- uispDesignCenter: ExternalUrl;
51
- facebook: ExternalUrl;
52
- twitter: ExternalUrl;
53
- youtube: ExternalUrl;
54
- instagram: ExternalUrl;
55
- service: ExternalUrl;
56
- privacy: ExternalUrl;
57
- return: ExternalUrl;
58
- };
59
- export declare const FOOTER_CONTENT: {
60
- company: {
61
- header: {
62
- id: FooterHeaderId;
63
- label: string;
64
- };
65
- items: {
66
- id: FooterLinkId;
67
- label: string;
68
- src: ExternalUrl;
69
- target: string;
70
- }[];
71
- };
72
- training: {
73
- header: {
74
- id: FooterHeaderId;
75
- label: string;
76
- };
77
- items: {
78
- id: FooterLinkId;
79
- label: string;
80
- src: ExternalUrl;
81
- target: string;
82
- }[];
83
- };
84
- buy: {
85
- header: {
86
- id: FooterHeaderId;
87
- label: string;
88
- };
89
- items: {
90
- id: FooterLinkId;
91
- label: string;
92
- src: ExternalUrl;
93
- target: string;
94
- }[];
95
- };
96
- tools: {
97
- header: {
98
- id: FooterHeaderId;
99
- label: string;
100
- };
101
- items: {
102
- id: FooterLinkId;
103
- label: string;
104
- src: ExternalUrl;
105
- target: string;
106
- }[];
107
- };
108
- };
109
- export declare const SOCIAL_CONTENT: {
110
- header: {
111
- id: FooterHeaderId;
112
- label: "footer.header.social";
113
- };
114
- items: {
115
- id: FooterLinkId;
116
- label: string;
117
- src: ExternalUrl;
118
- icon: string | import("next/image").StaticImageData;
119
- target: string;
120
- }[];
121
- };
122
- export declare const findTermsAndConditionsURL: (storeId: StoreId | null | undefined) => string;
123
- export declare const findReturnPolicyURL: (storeId: StoreId | null | undefined) => string;
124
- export declare const contentForTerms: (storeId?: StoreId) => {
125
- header: {
126
- id: FooterHeaderId;
127
- label: "footer.header.terms";
128
- };
129
- items: ({
130
- id: FooterLinkId;
131
- label: string;
132
- src: string;
133
- target: string;
134
- } | {
135
- id: FooterLinkId;
136
- label: string;
137
- src?: undefined;
138
- target?: undefined;
139
- })[];
140
- };
141
- /**
142
- * One-trust cookie policy related id & class that connects with their SDK's
143
- */
144
- export declare const COOKIE_POLICY_BTN_ID = "ot-sdk-btn";
145
- export declare const COOKIE_POLICY_BTN_ID_CLASSNAME = "ot-sdk-show-settings";