@ubnt/store.core 10.4.2 → 10.5.0-globalStoreId.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.
Files changed (167) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/lib/_virtual/_virtual_multi-entry.js +0 -1
  3. package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
  4. package/lib/_virtual/_virtual_multi-entry.mjs +1 -1
  5. package/lib/assets/express7.jpg +0 -0
  6. package/lib/assets/express72.jpg +0 -0
  7. package/lib/assets/pause.svg +3 -3
  8. package/lib/assets/pause2.svg +3 -3
  9. package/lib/assets/poe2.svg +3 -2
  10. package/lib/assets/poe3.svg +2 -3
  11. package/lib/assets/port.svg +4 -2
  12. package/lib/assets/port2.svg +2 -4
  13. package/lib/assets/ucgMax.jpg +0 -0
  14. package/lib/assets/ucgMax2.jpg +0 -0
  15. package/lib/assets/udmPro.jpg +0 -0
  16. package/lib/assets/udmPro2.jpg +0 -0
  17. package/lib/assets/udmProSpecial.jpg +0 -0
  18. package/lib/assets/udmProSpecial2.jpg +0 -0
  19. package/lib/assets/udr2.jpg +0 -0
  20. package/lib/assets/udr3.jpg +0 -0
  21. package/lib/components/Explore/ExploreData.d.ts +3 -3
  22. package/lib/components/Explore/ExploreData.js +2 -2
  23. package/lib/components/Explore/ExploreData.js.map +1 -1
  24. package/lib/components/Explore/ExploreData.mjs +3 -3
  25. package/lib/components/Explore/ExploreData.mjs.map +1 -1
  26. package/lib/components/Footer/Footer.js +14 -14
  27. package/lib/components/Footer/Footer.js.map +1 -1
  28. package/lib/components/Footer/Footer.mjs +15 -15
  29. package/lib/components/Footer/Footer.mjs.map +1 -1
  30. package/lib/components/Footer/hooks/useFooterContent.js +33 -33
  31. package/lib/components/Footer/hooks/useFooterContent.js.map +1 -1
  32. package/lib/components/Footer/hooks/useFooterContent.mjs +34 -34
  33. package/lib/components/Footer/hooks/useFooterContent.mjs.map +1 -1
  34. package/lib/components/Header/Header.stories.d.ts +2 -2
  35. package/lib/components/Header/LanguageFrame/utils/buildLanguageLink.d.ts +2 -2
  36. package/lib/components/Header/LanguageFrame/utils/buildLanguageLink.js.map +1 -1
  37. package/lib/components/Header/LanguageFrame/utils/buildLanguageLink.mjs.map +1 -1
  38. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
  39. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
  40. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
  41. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
  42. package/lib/components/Microsites/Microsites.types.d.ts +2 -2
  43. package/lib/components/Microsites/Microsites.types.js.map +1 -1
  44. package/lib/components/Microsites/Microsites.types.mjs.map +1 -1
  45. package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +9 -9
  46. package/lib/components/ModelCompareV3/assets/CameraSecurity/ai-pro.jpg.js +5 -5
  47. package/lib/components/ModelCompareV3/assets/CameraSecurity/g5-pro.jpg.js +5 -5
  48. package/lib/components/ModelCompareV3/assets/CameraSecurity/g6-bullet.jpg.js +5 -5
  49. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/express7.jpg.js +5 -5
  50. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/express7.jpg.mjs +2 -2
  51. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.js +5 -5
  52. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.mjs +2 -2
  53. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
  54. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
  55. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
  56. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
  57. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udr.jpg.js +5 -5
  58. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udr.jpg.mjs +2 -2
  59. package/lib/components/ModelCompareV3/assets/Consoles/express7.jpg.js +1 -1
  60. package/lib/components/ModelCompareV3/assets/Consoles/express7.jpg.mjs +2 -2
  61. package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.js +1 -1
  62. package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.mjs +2 -2
  63. package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
  64. package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
  65. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
  66. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
  67. package/lib/components/ModelCompareV3/assets/Consoles/udr.jpg.js +1 -1
  68. package/lib/components/ModelCompareV3/assets/Consoles/udr.jpg.mjs +2 -2
  69. package/lib/components/ModelCompareV3/assets/poe.svg.js +1 -1
  70. package/lib/components/ModelCompareV3/assets/poe.svg.mjs +2 -2
  71. package/lib/components/ModelCompareV3/assets/port.svg.js +1 -1
  72. package/lib/components/ModelCompareV3/assets/port.svg.mjs +2 -2
  73. package/lib/components/ModelCompareV3/data/CameraSecurity.js +7 -7
  74. package/lib/components/ModelCompareV3/data/CameraSecurity.mjs +4 -4
  75. package/lib/components/ModelCompareV3/data/CloudGateways.js +12 -12
  76. package/lib/components/ModelCompareV3/data/CloudGateways.mjs +8 -8
  77. package/lib/components/ModelCompareV3/data/products/e7Audience.js +2 -2
  78. package/lib/components/ModelCompareV3/data/products/e7Audience.js.map +1 -1
  79. package/lib/components/ModelCompareV3/data/products/e7Audience.mjs +3 -3
  80. package/lib/components/ModelCompareV3/data/products/e7Audience.mjs.map +1 -1
  81. package/lib/components/ModelCompareV3/data/products/express7.js +1 -1
  82. package/lib/components/ModelCompareV3/data/products/express7.mjs +1 -1
  83. package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.js +1 -1
  84. package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.js.map +1 -1
  85. package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.mjs +2 -2
  86. package/lib/components/ModelCompareV3/data/products/g3TouchEnterprise.mjs.map +1 -1
  87. package/lib/components/ModelCompareV3/data/products/g3TouchWall.js +1 -1
  88. package/lib/components/ModelCompareV3/data/products/g3TouchWall.js.map +1 -1
  89. package/lib/components/ModelCompareV3/data/products/g3TouchWall.mjs +2 -2
  90. package/lib/components/ModelCompareV3/data/products/g3TouchWall.mjs.map +1 -1
  91. package/lib/components/ModelCompareV3/data/products/u6Extender.js +1 -1
  92. package/lib/components/ModelCompareV3/data/products/u6Extender.js.map +1 -1
  93. package/lib/components/ModelCompareV3/data/products/u6Extender.mjs +2 -2
  94. package/lib/components/ModelCompareV3/data/products/u6Extender.mjs.map +1 -1
  95. package/lib/components/ModelCompareV3/data/products/u7proOutdoor.js +2 -2
  96. package/lib/components/ModelCompareV3/data/products/u7proOutdoor.js.map +1 -1
  97. package/lib/components/ModelCompareV3/data/products/u7proOutdoor.mjs +3 -3
  98. package/lib/components/ModelCompareV3/data/products/u7proOutdoor.mjs.map +1 -1
  99. package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
  100. package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
  101. package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
  102. package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
  103. package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
  104. package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
  105. package/lib/components/ModelCompareV3/data/products/udr.js +1 -1
  106. package/lib/components/ModelCompareV3/data/products/udr.mjs +1 -1
  107. package/lib/components/ModelCompareV3/data/products/umr.js +2 -2
  108. package/lib/components/ModelCompareV3/data/products/umr.js.map +1 -1
  109. package/lib/components/ModelCompareV3/data/products/umr.mjs +3 -3
  110. package/lib/components/ModelCompareV3/data/products/umr.mjs.map +1 -1
  111. package/lib/components/ModelCompareV3/data/products/umrIndustrial.js +2 -2
  112. package/lib/components/ModelCompareV3/data/products/umrIndustrial.js.map +1 -1
  113. package/lib/components/ModelCompareV3/data/products/umrIndustrial.mjs +3 -3
  114. package/lib/components/ModelCompareV3/data/products/umrIndustrial.mjs.map +1 -1
  115. package/lib/components/ModelCompareV3/data/products/umrUltra.js +1 -1
  116. package/lib/components/ModelCompareV3/data/products/umrUltra.js.map +1 -1
  117. package/lib/components/ModelCompareV3/data/products/umrUltra.mjs +2 -2
  118. package/lib/components/ModelCompareV3/data/products/umrUltra.mjs.map +1 -1
  119. package/lib/components/ModelCompareV3/data/properties/powerMethodPoe.js +1 -1
  120. package/lib/components/ModelCompareV3/data/properties/powerMethodPoe.mjs +1 -1
  121. package/lib/components/ModelCompareV3/data/properties/readerPowerMethod.js +1 -1
  122. package/lib/components/ModelCompareV3/data/properties/readerPowerMethod.mjs +1 -1
  123. package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.js +1 -1
  124. package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.mjs +1 -1
  125. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.js +2 -2
  126. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.mjs +2 -2
  127. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/poe.svg.js +1 -1
  128. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/poe.svg.mjs +2 -2
  129. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.svg.js +1 -1
  130. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.svg.mjs +2 -2
  131. package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
  132. package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
  133. package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
  134. package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
  135. package/lib/contexts/MenuContext/context.d.ts +3 -3
  136. package/lib/contexts/MenuContext/context.js.map +1 -1
  137. package/lib/contexts/MenuContext/context.mjs.map +1 -1
  138. package/lib/contexts/MenuContext/mapping.d.ts +3 -4
  139. package/lib/contexts/MenuContext/mapping.js +1 -1
  140. package/lib/contexts/MenuContext/mapping.js.map +1 -1
  141. package/lib/contexts/MenuContext/mapping.mjs +2 -2
  142. package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
  143. package/lib/contexts/MenuContext/types.d.ts +3 -3
  144. package/lib/contexts/MenuContext/types.js.map +1 -1
  145. package/lib/contexts/MenuContext/types.mjs.map +1 -1
  146. package/lib/contexts/MenuContext/utils.d.ts +3 -3
  147. package/lib/contexts/MenuContext/utils.js.map +1 -1
  148. package/lib/contexts/MenuContext/utils.mjs.map +1 -1
  149. package/lib/types/generated.d.ts +0 -35
  150. package/lib/types/generated.js +0 -18
  151. package/lib/types/generated.js.map +1 -1
  152. package/lib/types/generated.mjs +1 -18
  153. package/lib/types/generated.mjs.map +1 -1
  154. package/lib/types/index.js +0 -1
  155. package/lib/types/index.js.map +1 -1
  156. package/lib/types/index.mjs +1 -1
  157. package/lib/utils/nextjs/navigationPresets.d.ts +4 -4
  158. package/lib/utils/nextjs/navigationPresets.js +20 -20
  159. package/lib/utils/nextjs/navigationPresets.js.map +1 -1
  160. package/lib/utils/nextjs/navigationPresets.mjs +21 -21
  161. package/lib/utils/nextjs/navigationPresets.mjs.map +1 -1
  162. package/lib/utils/storeId.d.ts +1 -8
  163. package/lib/utils/storeId.js +0 -6
  164. package/lib/utils/storeId.js.map +1 -1
  165. package/lib/utils/storeId.mjs +1 -6
  166. package/lib/utils/storeId.mjs.map +1 -1
  167. package/package.json +1 -1
@@ -10,7 +10,7 @@ import '../../../hooks/index.mjs';
10
10
  import '../../../types/index.mjs';
11
11
  import { isNonNullish } from '../../../utils/typeGuards.mjs';
12
12
  import EN_TRANSLATION from '../translations/en.json.mjs';
13
- import { GlobalStoreId, StoreId } from '../../../types/generated.mjs';
13
+ import { StoreId } from '../../../types/generated.mjs';
14
14
  import { useMenu } from '../../../contexts/MenuContext/context.mjs';
15
15
  import { useTranslation } from '../../../hooks/useTranslation.mjs';
16
16
  import { Language } from '../../../types/constants.mjs';
@@ -83,37 +83,37 @@ const FOOTER_LINKS = {
83
83
  ["compliance" /* Compliance */]: ExternalUrl.COMPLIANCE
84
84
  };
85
85
  const TOC_LINKS = {
86
- [GlobalStoreId.Ca]: "https://www.ui.com/legal/ui-ca-store/termsandconditions/",
87
- [GlobalStoreId.Us]: "https://www.ui.com/legal/ui-store/termsandconditions/",
88
- [GlobalStoreId.Eu]: "https://www.ui.com/legal/ui-eu-store/termsandconditions/",
89
- [GlobalStoreId.Za]: "https://www.ui.com/legal/ui-za-store/termsandconditions/",
90
- [GlobalStoreId.Me]: "https://www.ui.com/legal/ui-me-store/termsandconditions/",
91
- [GlobalStoreId.Uk]: "https://cdn.ecomm.ui.com/terms-and-conditions/UK+Store+Terms+and+Conditions.pdf",
92
- [GlobalStoreId.In]: "https://www.ui.com/legal/ui-in-store/termsandconditions/",
93
- [GlobalStoreId.Sg]: "https://www.ui.com/legal/ui-sg-store/termsandconditions/",
94
- [GlobalStoreId.Br]: "https://www.ui.com/legal/ui-br-store/termsandconditions/",
95
- [GlobalStoreId.Mx]: "https://www.ui.com/legal/ui-mx-store/termsandconditions/",
96
- [GlobalStoreId.Jp]: "https://www.ui.com/legal/ui-jp-store/termsandconditions/",
97
- [GlobalStoreId.Tw]: "https://www.ui.com/legal/ui-tw-store/termsandconditions/",
98
- [GlobalStoreId.Ph]: "https://www.ui.com/legal/ui-ph-store/termsandconditions/",
99
- [GlobalStoreId.Cn]: "https://www.ui.com.cn/legal/ui-store/termsandconditions/"
86
+ [StoreId.Ca]: "https://www.ui.com/legal/ui-ca-store/termsandconditions/",
87
+ [StoreId.Us]: "https://www.ui.com/legal/ui-store/termsandconditions/",
88
+ [StoreId.Eu]: "https://www.ui.com/legal/ui-eu-store/termsandconditions/",
89
+ [StoreId.Za]: "https://www.ui.com/legal/ui-za-store/termsandconditions/",
90
+ [StoreId.Me]: "https://www.ui.com/legal/ui-me-store/termsandconditions/",
91
+ [StoreId.Uk]: "https://cdn.ecomm.ui.com/terms-and-conditions/UK+Store+Terms+and+Conditions.pdf",
92
+ [StoreId.In]: "https://www.ui.com/legal/ui-in-store/termsandconditions/",
93
+ [StoreId.Sg]: "https://www.ui.com/legal/ui-sg-store/termsandconditions/",
94
+ [StoreId.Br]: "https://www.ui.com/legal/ui-br-store/termsandconditions/",
95
+ [StoreId.Mx]: "https://www.ui.com/legal/ui-mx-store/termsandconditions/",
96
+ [StoreId.Jp]: "https://www.ui.com/legal/ui-jp-store/termsandconditions/",
97
+ [StoreId.Tw]: "https://www.ui.com/legal/ui-tw-store/termsandconditions/",
98
+ [StoreId.Ph]: "https://www.ui.com/legal/ui-ph-store/termsandconditions/",
99
+ [StoreId.Cn]: "https://www.ui.com.cn/legal/ui-store/termsandconditions/"
100
100
  };
101
101
  const CONTACT_LINKS = {
102
- [GlobalStoreId.Us]: ExternalUrl.CONTACT,
103
- [GlobalStoreId.Tw]: "https://tw.ui.com/contact/"
102
+ [StoreId.Us]: ExternalUrl.CONTACT,
103
+ [StoreId.Tw]: "https://tw.ui.com/contact/"
104
104
  };
105
105
  const BECOME_DISTRIBUTOR_LINKS = {
106
- [GlobalStoreId.Us]: ExternalUrl.BECOME_DISTRIBUTOR,
107
- [GlobalStoreId.Tw]: "https://tw.ui.com/distributors/become-authorized-distributor/"
106
+ [StoreId.Us]: ExternalUrl.BECOME_DISTRIBUTOR,
107
+ [StoreId.Tw]: "https://tw.ui.com/distributors/become-authorized-distributor/"
108
108
  };
109
109
  const TOS_LINKS = {
110
- [GlobalStoreId.Us]: ExternalUrl.TERMS_SERVICE
110
+ [StoreId.Us]: ExternalUrl.TERMS_SERVICE
111
111
  };
112
112
  const FACEBOOK_LINKS = {
113
- [GlobalStoreId.Us]: ExternalUrl.FACEBOOK,
114
- [GlobalStoreId.Jp]: "https://www.facebook.com/UbiquitiJapan"
113
+ [StoreId.Us]: ExternalUrl.FACEBOOK,
114
+ [StoreId.Jp]: "https://www.facebook.com/UbiquitiJapan"
115
115
  };
116
- const getRegionalLink = (links, storeId = GlobalStoreId.Us) => {
116
+ const getRegionalLink = (links, storeId = StoreId.Us) => {
117
117
  const link = links[storeId];
118
118
  if (link) {
119
119
  return link;
@@ -122,7 +122,7 @@ const getRegionalLink = (links, storeId = GlobalStoreId.Us) => {
122
122
  };
123
123
  const useFooterContent = () => {
124
124
  const {
125
- storeId: globalStoreId,
125
+ storeId: StoreId2,
126
126
  context,
127
127
  createSiteUrl
128
128
  } = useMenu();
@@ -145,9 +145,9 @@ const useFooterContent = () => {
145
145
  });
146
146
  const urls = useMemo(() => {
147
147
  return {
148
- termsAndConditions: getRegionalLink(TOC_LINKS, globalStoreId)
148
+ termsAndConditions: getRegionalLink(TOC_LINKS, StoreId2)
149
149
  };
150
- }, [globalStoreId]);
150
+ }, [StoreId2]);
151
151
  const footerContent = useMemo(() => ({
152
152
  company: {
153
153
  header: {
@@ -162,7 +162,7 @@ const useFooterContent = () => {
162
162
  }, {
163
163
  id: "contact" /* Contact */,
164
164
  label: formatMessage("footer.link.contact"),
165
- src: getRegionalLink(CONTACT_LINKS, globalStoreId),
165
+ src: getRegionalLink(CONTACT_LINKS, StoreId2),
166
166
  target: "_blank"
167
167
  }, {
168
168
  id: "investors" /* Investors */,
@@ -221,7 +221,7 @@ const useFooterContent = () => {
221
221
  }, {
222
222
  id: "becomeDistributor" /* BecomeDistributor */,
223
223
  label: formatMessage("footer.link.distributor.become"),
224
- src: getRegionalLink(BECOME_DISTRIBUTOR_LINKS, globalStoreId),
224
+ src: getRegionalLink(BECOME_DISTRIBUTOR_LINKS, StoreId2),
225
225
  target: "_blank"
226
226
  }].filter(isNonNullish)
227
227
  },
@@ -257,7 +257,7 @@ const useFooterContent = () => {
257
257
  target: "_blank"
258
258
  }].filter(isNonNullish)
259
259
  }
260
- }), [context, createSiteUrl, formatMessage, globalStoreId]);
260
+ }), [context, createSiteUrl, formatMessage, StoreId2]);
261
261
  const socialContent = useMemo(() => ({
262
262
  header: {
263
263
  id: "social" /* Social */,
@@ -266,7 +266,7 @@ const useFooterContent = () => {
266
266
  items: [{
267
267
  id: "facebook" /* Facebook */,
268
268
  label: "Facebook",
269
- src: getRegionalLink(FACEBOOK_LINKS, globalStoreId),
269
+ src: getRegionalLink(FACEBOOK_LINKS, StoreId2),
270
270
  icon: FacebookIcon__default,
271
271
  target: "_blank"
272
272
  }, {
@@ -288,7 +288,7 @@ const useFooterContent = () => {
288
288
  icon: InstagramIcon__default,
289
289
  target: "_blank"
290
290
  }].filter(isNonNullish)
291
- }), [formatMessage, globalStoreId]);
291
+ }), [formatMessage, StoreId2]);
292
292
  const termsContent = useMemo(() => ({
293
293
  header: {
294
294
  id: "terms" /* Terms */,
@@ -304,7 +304,7 @@ const useFooterContent = () => {
304
304
  } : null, {
305
305
  id: "service" /* Service */,
306
306
  label: formatMessage("footer.link.terms.service"),
307
- src: getRegionalLink(TOS_LINKS, globalStoreId),
307
+ src: getRegionalLink(TOS_LINKS, StoreId2),
308
308
  target: "_blank"
309
309
  }, {
310
310
  id: "privacy" /* Privacy */,
@@ -327,7 +327,7 @@ const useFooterContent = () => {
327
327
  * Currently the same URL as per request of @kaspars.kristapsons
328
328
  * @see https://ui.enterprise.slack.com/files/U03KX6R6519/F0594F39XGS/screenshot_2023-05-23_at_20.49.36.png
329
329
  */
330
- src: getRegionalLink(TOC_LINKS, globalStoreId),
330
+ src: getRegionalLink(TOC_LINKS, StoreId2),
331
331
  target: "_blank"
332
332
  } : null, {
333
333
  id: "cookie" /* Cookie */,
@@ -341,7 +341,7 @@ const useFooterContent = () => {
341
341
  src: createSiteUrl([SiteId.Store, "/faq"]),
342
342
  target: "_blank"
343
343
  } : null].filter(isNonNullish)
344
- }), [context, createSiteUrl, formatMessage, globalStoreId, urls.termsAndConditions]);
344
+ }), [context, createSiteUrl, formatMessage, StoreId2, urls.termsAndConditions]);
345
345
  return {
346
346
  footerContent,
347
347
  socialContent,
@@ -1 +1 @@
1
- {"version":3,"file":"useFooterContent.mjs","sources":["../../../../src/components/Footer/hooks/useFooterContent.ts"],"sourcesContent":["import type { StaticImageData } from \"next/image\";\nimport { useMemo } from \"react\";\n\nimport FacebookIcon from \"../../../assets/socialMedia/facebook.svg\";\nimport InstagramIcon from \"../../../assets/socialMedia/instagram.svg\";\nimport XIcon from \"../../../assets/socialMedia/x.svg\";\nimport YoutubeIcon from \"../../../assets/socialMedia/youtube.svg\";\nimport { ExternalUrl } from \"../../../constants/url\";\nimport { useMenu } from \"../../../contexts/MenuContext\";\nimport { Language, SiteId } from \"../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../hooks\";\nimport { GlobalStoreId, StoreId } from \"../../../types\";\nimport { isNonNullish } from \"../../../utils/typeGuards\";\nimport EN_TRANSLATION from \"../translations/en.json\";\n\nexport enum FooterHeaderId {\n Company = \"company\",\n Training = \"training\",\n Buy = \"buy\",\n Tools = \"tools\",\n Social = \"social\",\n Terms = \"terms\",\n}\n\nexport enum FooterLinkId {\n Careers = \"careers\",\n Contact = \"contact\",\n Investors = \"investors\",\n Courses = \"courses\",\n Calendar = \"calendar\",\n Trainers = \"trainers\",\n BecomeTrainer = \"becomeTrainer\",\n FindDistributor = \"findDistributor\",\n BecomeDistributor = \"becomeDistributor\",\n DesignCenter = \"designCenter\",\n WiFiman = \"wifiman\",\n UISP = \"uisp\",\n UispDesignCenter = \"uispDesignCenter\",\n Facebook = \"facebook\",\n X = \"x\", // Twitter\n Youtube = \"youtube\",\n Instagram = \"instagram\",\n Conditions = \"conditions\",\n Service = \"service\",\n Privacy = \"privacy\",\n Return = \"return\",\n Cookie = \"cookie\",\n Legal = \"legal\",\n Store = \"store\",\n Faq = \"faq\",\n Downloads = \"downloads\",\n Compliance = \"compliance\",\n}\n\nexport const FOOTER_LINKS = {\n [FooterLinkId.Careers]: ExternalUrl.CAREERS,\n [FooterLinkId.Contact]: ExternalUrl.CONTACT,\n [FooterLinkId.Investors]: ExternalUrl.INVESTORS,\n [FooterLinkId.Courses]: ExternalUrl.COURSES,\n [FooterLinkId.Calendar]: ExternalUrl.CALENDAR,\n [FooterLinkId.Trainers]: ExternalUrl.PARTNERS,\n [FooterLinkId.BecomeTrainer]: ExternalUrl.TRAINERS,\n [FooterLinkId.FindDistributor]: ExternalUrl.FIND_DISTRIBUTOR,\n [FooterLinkId.BecomeDistributor]: ExternalUrl.BECOME_DISTRIBUTOR,\n [FooterLinkId.DesignCenter]: ExternalUrl.DESIGN_CENTER,\n [FooterLinkId.WiFiman]: ExternalUrl.WIFIMAN,\n [FooterLinkId.UISP]: ExternalUrl.UISP,\n [FooterLinkId.UispDesignCenter]: ExternalUrl.UISP_DESIGN_CENTER,\n [FooterLinkId.Facebook]: ExternalUrl.FACEBOOK,\n [FooterLinkId.X]: ExternalUrl.X, // Twitter\n [FooterLinkId.Youtube]: ExternalUrl.YOUTUBE,\n [FooterLinkId.Instagram]: ExternalUrl.INSTAGRAM,\n [FooterLinkId.Service]: ExternalUrl.TERMS_SERVICE,\n [FooterLinkId.Privacy]: ExternalUrl.PRIVACY_POLICY,\n [FooterLinkId.Return]: ExternalUrl.RETURN_POLICY,\n [FooterLinkId.Compliance]: ExternalUrl.COMPLIANCE,\n};\n\ntype FooterItem = {\n id: FooterLinkId;\n label: string;\n src: string;\n target?: string;\n icon?: string | StaticImageData;\n};\n\ntype FooterSection = {\n header: {\n id: FooterHeaderId;\n label: string;\n };\n items: FooterItem[];\n};\n\ntype FooterSections = {\n company: FooterSection;\n training: FooterSection;\n buy: FooterSection;\n tools: FooterSection;\n};\n\ntype FullRegionalLinks = Record<GlobalStoreId, string>;\n\n/**\n * Regional links type where US should always be present since\n * it's the default fallback\n */\n\ntype RegionalLinks = {\n [GlobalStoreId.Us]: string;\n} & Partial<FullRegionalLinks>;\n\n// Terms and Conditions links\nconst TOC_LINKS: FullRegionalLinks = {\n [GlobalStoreId.Ca]:\n \"https://www.ui.com/legal/ui-ca-store/termsandconditions/\",\n [GlobalStoreId.Us]: \"https://www.ui.com/legal/ui-store/termsandconditions/\",\n [GlobalStoreId.Eu]:\n \"https://www.ui.com/legal/ui-eu-store/termsandconditions/\",\n [GlobalStoreId.Za]:\n \"https://www.ui.com/legal/ui-za-store/termsandconditions/\",\n [GlobalStoreId.Me]:\n \"https://www.ui.com/legal/ui-me-store/termsandconditions/\",\n [GlobalStoreId.Uk]:\n \"https://cdn.ecomm.ui.com/terms-and-conditions/UK+Store+Terms+and+Conditions.pdf\",\n [GlobalStoreId.In]:\n \"https://www.ui.com/legal/ui-in-store/termsandconditions/\",\n [GlobalStoreId.Sg]:\n \"https://www.ui.com/legal/ui-sg-store/termsandconditions/\",\n [GlobalStoreId.Br]:\n \"https://www.ui.com/legal/ui-br-store/termsandconditions/\",\n [GlobalStoreId.Mx]:\n \"https://www.ui.com/legal/ui-mx-store/termsandconditions/\",\n [GlobalStoreId.Jp]:\n \"https://www.ui.com/legal/ui-jp-store/termsandconditions/\",\n [GlobalStoreId.Tw]:\n \"https://www.ui.com/legal/ui-tw-store/termsandconditions/\",\n [GlobalStoreId.Ph]:\n \"https://www.ui.com/legal/ui-ph-store/termsandconditions/\",\n [GlobalStoreId.Cn]:\n \"https://www.ui.com.cn/legal/ui-store/termsandconditions/\",\n};\n\n// Contact links\nconst CONTACT_LINKS: RegionalLinks = {\n [GlobalStoreId.Us]: ExternalUrl.CONTACT,\n\n [GlobalStoreId.Tw]: \"https://tw.ui.com/contact/\",\n};\n\n// Become Distributor links\nconst BECOME_DISTRIBUTOR_LINKS: RegionalLinks = {\n [GlobalStoreId.Us]: ExternalUrl.BECOME_DISTRIBUTOR,\n\n [GlobalStoreId.Tw]:\n \"https://tw.ui.com/distributors/become-authorized-distributor/\",\n};\n\n// Terms of Service links\nconst TOS_LINKS: RegionalLinks = {\n [GlobalStoreId.Us]: ExternalUrl.TERMS_SERVICE,\n};\n\n// Facebook links\nconst FACEBOOK_LINKS: RegionalLinks = {\n [GlobalStoreId.Us]: ExternalUrl.FACEBOOK,\n\n [GlobalStoreId.Jp]: \"https://www.facebook.com/UbiquitiJapan\",\n};\n\n/**\n * Util to get the regional link based on the given storeId\n * NOTE: We always fallback to US if given storeId is not found\n */\nconst getRegionalLink = (\n links: RegionalLinks,\n storeId: GlobalStoreId = GlobalStoreId.Us,\n) => {\n const link = links[storeId];\n\n if (link) {\n return link;\n }\n\n return links[StoreId.Us];\n};\n\nexport const useFooterContent = (): {\n footerContent: FooterSections;\n socialContent: FooterSection;\n termsContent: FooterSection;\n\n urls: {\n termsAndConditions: string;\n };\n} => {\n const { storeId: globalStoreId, context, createSiteUrl } = useMenu();\n\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"../translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"../translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"../translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"../translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"../translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"../translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"../translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"../translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"../translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"../translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n const urls = useMemo(() => {\n return {\n termsAndConditions: getRegionalLink(TOC_LINKS, globalStoreId),\n };\n }, [globalStoreId]);\n\n // #############################################################################\n // Footer main content\n // #############################################################################\n const footerContent = useMemo(\n () => ({\n company: {\n header: {\n id: FooterHeaderId.Company,\n label: formatMessage(\"footer.header.company\"),\n },\n items: [\n {\n id: FooterLinkId.Careers,\n label: formatMessage(\"footer.link.careers\"),\n src: FOOTER_LINKS[FooterLinkId.Careers],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Contact,\n label: formatMessage(\"footer.link.contact\"),\n src: getRegionalLink(CONTACT_LINKS, globalStoreId),\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Investors,\n label: formatMessage(\"footer.link.investors\"),\n src: FOOTER_LINKS[FooterLinkId.Investors],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Compliance,\n label: formatMessage(\"footer.link.compliance\"),\n src: FOOTER_LINKS[FooterLinkId.Compliance],\n target: \"_blank\",\n },\n ].filter(isNonNullish),\n },\n training: {\n header: {\n id: FooterHeaderId.Training,\n label: formatMessage(\"footer.header.training\"),\n },\n items: [\n {\n id: FooterLinkId.Courses,\n label: formatMessage(\"footer.link.courses\"),\n src: FOOTER_LINKS[FooterLinkId.Courses],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Calendar,\n label: formatMessage(\"footer.link.calendar\"),\n src: FOOTER_LINKS[FooterLinkId.Calendar],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Trainers,\n label: formatMessage(\"footer.link.trainers\"),\n src: FOOTER_LINKS[FooterLinkId.Trainers],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.BecomeTrainer,\n label: formatMessage(\"footer.link.becomeTrainer\"),\n src: FOOTER_LINKS[FooterLinkId.BecomeTrainer],\n target: \"_blank\",\n },\n ].filter(isNonNullish),\n },\n buy: {\n header: {\n id: FooterHeaderId.Buy,\n label: formatMessage(\"footer.header.buy\"),\n },\n items: [\n context !== SiteId.Store\n ? {\n id: FooterLinkId.Store,\n label: formatMessage(\"footer.link.store\"),\n src: createSiteUrl([SiteId.Store, \"/\"]),\n target: \"_blank\",\n }\n : null,\n {\n id: FooterLinkId.FindDistributor,\n label: formatMessage(\"footer.link.distributor.find\"),\n src: FOOTER_LINKS[FooterLinkId.FindDistributor],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.BecomeDistributor,\n label: formatMessage(\"footer.link.distributor.become\"),\n src: getRegionalLink(BECOME_DISTRIBUTOR_LINKS, globalStoreId),\n target: \"_blank\",\n },\n ].filter(isNonNullish),\n },\n tools: {\n header: {\n id: FooterHeaderId.Tools,\n label: formatMessage(\"footer.header.tools\"),\n },\n items: [\n {\n id: FooterLinkId.WiFiman,\n label: formatMessage(\"footer.link.wifiman\"),\n src: FOOTER_LINKS[FooterLinkId.WiFiman],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.UISP,\n label: formatMessage(\"footer.link.uisp\"),\n src: FOOTER_LINKS[FooterLinkId.UISP],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.DesignCenter,\n label: formatMessage(\"footer.link.designCenter\"),\n src: FOOTER_LINKS[FooterLinkId.DesignCenter],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.UispDesignCenter,\n label: formatMessage(\"footer.link.uispDesignCenter\"),\n src: FOOTER_LINKS[FooterLinkId.UispDesignCenter],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Downloads,\n label: formatMessage(\"footer.link.downloads\"),\n src: ExternalUrl.UI_DOWNLOADS,\n target: \"_blank\",\n },\n ].filter(isNonNullish),\n },\n }),\n [context, createSiteUrl, formatMessage, globalStoreId],\n );\n\n // #############################################################################\n // Social content\n // #############################################################################\n const socialContent = useMemo(\n (): FooterSection => ({\n header: {\n id: FooterHeaderId.Social,\n label: formatMessage(\"footer.header.social\"),\n },\n items: [\n {\n id: FooterLinkId.Facebook,\n label: \"Facebook\",\n src: getRegionalLink(FACEBOOK_LINKS, globalStoreId),\n icon: FacebookIcon,\n target: \"_blank\",\n },\n {\n id: FooterLinkId.X,\n label: \"X\",\n src: FOOTER_LINKS[FooterLinkId.X],\n icon: XIcon,\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Youtube,\n label: \"Youtube\",\n src: FOOTER_LINKS[FooterLinkId.Youtube],\n icon: YoutubeIcon,\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Instagram,\n label: \"Instagram\",\n src: FOOTER_LINKS[FooterLinkId.Instagram],\n icon: InstagramIcon,\n target: \"_blank\",\n },\n ].filter(isNonNullish),\n }),\n [formatMessage, globalStoreId],\n );\n\n // #############################################################################\n // Terms content\n // #############################################################################\n const termsContent = useMemo(\n (): FooterSection => ({\n header: {\n id: FooterHeaderId.Terms,\n label: formatMessage(\"footer.header.terms\"),\n },\n items: [\n // Show \"Terms and Conditions\" only on store\n context === SiteId.Store\n ? {\n id: FooterLinkId.Conditions,\n label: formatMessage(\"footer.link.terms.conditions\"),\n src: urls.termsAndConditions,\n target: \"_blank\",\n }\n : null,\n {\n id: FooterLinkId.Service,\n label: formatMessage(\"footer.link.terms.service\"),\n src: getRegionalLink(TOS_LINKS, globalStoreId),\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Privacy,\n label: formatMessage(\"footer.link.terms.policy.privacy\"),\n src: FOOTER_LINKS[FooterLinkId.Privacy],\n target: \"_blank\",\n },\n\n // Show \"Legal\" only on non-store sites\n context !== SiteId.Store\n ? {\n id: FooterLinkId.Legal,\n label: formatMessage(\"footer.link.legal\"),\n src: \"https://www.ui.com/legal/\",\n target: \"_blank\",\n }\n : null,\n\n // Show \"Return Policy\" only on store\n context === SiteId.Store\n ? {\n id: FooterLinkId.Return,\n label: formatMessage(\"footer.link.terms.policy.return\"),\n /**\n * Currently the same URL as per request of @kaspars.kristapsons\n * @see https://ui.enterprise.slack.com/files/U03KX6R6519/F0594F39XGS/screenshot_2023-05-23_at_20.49.36.png\n */\n src: getRegionalLink(TOC_LINKS, globalStoreId),\n target: \"_blank\",\n }\n : null,\n {\n id: FooterLinkId.Cookie,\n label: formatMessage(\"footer.link.terms.cookie\"),\n src: \"\",\n },\n // Show \"FAQ\" only on store\n context === SiteId.Store\n ? {\n id: FooterLinkId.Faq,\n label: formatMessage(\"footer.link.terms.faq\"),\n src: createSiteUrl([SiteId.Store, \"/faq\"]),\n target: \"_blank\",\n }\n : null,\n ].filter(isNonNullish),\n }),\n [\n context,\n createSiteUrl,\n formatMessage,\n globalStoreId,\n urls.termsAndConditions,\n ],\n );\n\n // #############################################################################\n // Return\n // #############################################################################\n return {\n footerContent,\n socialContent,\n termsContent,\n\n urls,\n };\n};\n\n/**\n * One-trust cookie policy related id & class that connects with their SDK's\n */\nexport const COOKIE_POLICY_BTN_ID = \"ot-sdk-btn\";\nexport const COOKIE_POLICY_BTN_ID_CLASSNAME = \"ot-sdk-show-settings\";\n"],"names":["FooterHeaderId","FooterLinkId","FOOTER_LINKS","ExternalUrl","CAREERS","CONTACT","INVESTORS","COURSES","CALENDAR","PARTNERS","TRAINERS","FIND_DISTRIBUTOR","BECOME_DISTRIBUTOR","DESIGN_CENTER","WIFIMAN","UISP","UISP_DESIGN_CENTER","FACEBOOK","X","YOUTUBE","INSTAGRAM","TERMS_SERVICE","PRIVACY_POLICY","RETURN_POLICY","COMPLIANCE","TOC_LINKS","GlobalStoreId","Ca","Us","Eu","Za","Me","Uk","In","Sg","Br","Mx","Jp","Tw","Ph","Cn","CONTACT_LINKS","BECOME_DISTRIBUTOR_LINKS","TOS_LINKS","FACEBOOK_LINKS","getRegionalLink","links","storeId","link","StoreId","useFooterContent","globalStoreId","context","createSiteUrl","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","urls","useMemo","termsAndConditions","footerContent","company","header","id","label","items","src","target","filter","isNonNullish","training","buy","SiteId","Store","tools","UI_DOWNLOADS","socialContent","icon","FacebookIcon","XIcon","YoutubeIcon","InstagramIcon","termsContent","COOKIE_POLICY_BTN_ID","COOKIE_POLICY_BTN_ID_CLASSNAME"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAeY,IAAAA,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A,EAAKrC,eAAgB,CAAApB,SAAA,EAAW0B,aAAa,CAAA;MAC7CgC,MAAQ,EAAA;IAAA,CAEV,GAAA,IAAA,EACJ;MACEJ,EAAI,EAAA,QAAA,CAAA;MACJC,KAAA,EAAOzB,cAAc,0BAA0B,CAAA;MAC/C2B,GAAK,EAAA;IACP,CAAA;IAAA;IAEA9B,OAAA,KAAYoC,OAAOC,KACf,GAAA;MACEV,EAAI,EAAA,KAAA,CAAA;MACJC,KAAA,EAAOzB,cAAc,uBAAuB,CAAA;MAC5C2B,KAAK7B,aAAc,CAAA,CAACmC,MAAO,CAAAC,KAAA,EAAO,MAAM,CAAC,CAAA;MACzCN,MAAQ,EAAA;IAAA,CAEV,GAAA,IAAA,CACN,CAAEC,OAAOC,YAAY;EAAA,CACvB,CAAA,EACA,CACEjC,OAAA,EACAC,aAAA,EACAE,aAAA,EACAJ,aAAA,EACAsB,IAAK,CAAAE,kBAAA,CAET,CAAA;EAKO,OAAA;IACLC,aAAA;IACAgB,aAAA;IACAM,YAAA;IAEAzB;EACF,CAAA;AACF,CAAA;AAKO,MAAM0B,oBAAuB,GAAA,YAAA;AAC7B,MAAMC,8BAAiC,GAAA,sBAAA;"}
1
+ {"version":3,"file":"useFooterContent.mjs","sources":["../../../../src/components/Footer/hooks/useFooterContent.ts"],"sourcesContent":["import type { StaticImageData } from \"next/image\";\nimport { useMemo } from \"react\";\n\nimport FacebookIcon from \"../../../assets/socialMedia/facebook.svg\";\nimport InstagramIcon from \"../../../assets/socialMedia/instagram.svg\";\nimport XIcon from \"../../../assets/socialMedia/x.svg\";\nimport YoutubeIcon from \"../../../assets/socialMedia/youtube.svg\";\nimport { ExternalUrl } from \"../../../constants/url\";\nimport { useMenu } from \"../../../contexts/MenuContext\";\nimport { Language, SiteId } from \"../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../hooks\";\nimport { StoreId } from \"../../../types\";\nimport { isNonNullish } from \"../../../utils/typeGuards\";\nimport EN_TRANSLATION from \"../translations/en.json\";\n\nexport enum FooterHeaderId {\n Company = \"company\",\n Training = \"training\",\n Buy = \"buy\",\n Tools = \"tools\",\n Social = \"social\",\n Terms = \"terms\",\n}\n\nexport enum FooterLinkId {\n Careers = \"careers\",\n Contact = \"contact\",\n Investors = \"investors\",\n Courses = \"courses\",\n Calendar = \"calendar\",\n Trainers = \"trainers\",\n BecomeTrainer = \"becomeTrainer\",\n FindDistributor = \"findDistributor\",\n BecomeDistributor = \"becomeDistributor\",\n DesignCenter = \"designCenter\",\n WiFiman = \"wifiman\",\n UISP = \"uisp\",\n UispDesignCenter = \"uispDesignCenter\",\n Facebook = \"facebook\",\n X = \"x\", // Twitter\n Youtube = \"youtube\",\n Instagram = \"instagram\",\n Conditions = \"conditions\",\n Service = \"service\",\n Privacy = \"privacy\",\n Return = \"return\",\n Cookie = \"cookie\",\n Legal = \"legal\",\n Store = \"store\",\n Faq = \"faq\",\n Downloads = \"downloads\",\n Compliance = \"compliance\",\n}\n\nexport const FOOTER_LINKS = {\n [FooterLinkId.Careers]: ExternalUrl.CAREERS,\n [FooterLinkId.Contact]: ExternalUrl.CONTACT,\n [FooterLinkId.Investors]: ExternalUrl.INVESTORS,\n [FooterLinkId.Courses]: ExternalUrl.COURSES,\n [FooterLinkId.Calendar]: ExternalUrl.CALENDAR,\n [FooterLinkId.Trainers]: ExternalUrl.PARTNERS,\n [FooterLinkId.BecomeTrainer]: ExternalUrl.TRAINERS,\n [FooterLinkId.FindDistributor]: ExternalUrl.FIND_DISTRIBUTOR,\n [FooterLinkId.BecomeDistributor]: ExternalUrl.BECOME_DISTRIBUTOR,\n [FooterLinkId.DesignCenter]: ExternalUrl.DESIGN_CENTER,\n [FooterLinkId.WiFiman]: ExternalUrl.WIFIMAN,\n [FooterLinkId.UISP]: ExternalUrl.UISP,\n [FooterLinkId.UispDesignCenter]: ExternalUrl.UISP_DESIGN_CENTER,\n [FooterLinkId.Facebook]: ExternalUrl.FACEBOOK,\n [FooterLinkId.X]: ExternalUrl.X, // Twitter\n [FooterLinkId.Youtube]: ExternalUrl.YOUTUBE,\n [FooterLinkId.Instagram]: ExternalUrl.INSTAGRAM,\n [FooterLinkId.Service]: ExternalUrl.TERMS_SERVICE,\n [FooterLinkId.Privacy]: ExternalUrl.PRIVACY_POLICY,\n [FooterLinkId.Return]: ExternalUrl.RETURN_POLICY,\n [FooterLinkId.Compliance]: ExternalUrl.COMPLIANCE,\n};\n\ntype FooterItem = {\n id: FooterLinkId;\n label: string;\n src: string;\n target?: string;\n icon?: string | StaticImageData;\n};\n\ntype FooterSection = {\n header: {\n id: FooterHeaderId;\n label: string;\n };\n items: FooterItem[];\n};\n\ntype FooterSections = {\n company: FooterSection;\n training: FooterSection;\n buy: FooterSection;\n tools: FooterSection;\n};\n\ntype FullRegionalLinks = Record<StoreId, string>;\n\n/**\n * Regional links type where US should always be present since\n * it's the default fallback\n */\n\ntype RegionalLinks = {\n [StoreId.Us]: string;\n} & Partial<FullRegionalLinks>;\n\n// Terms and Conditions links\nconst TOC_LINKS: FullRegionalLinks = {\n [StoreId.Ca]: \"https://www.ui.com/legal/ui-ca-store/termsandconditions/\",\n [StoreId.Us]: \"https://www.ui.com/legal/ui-store/termsandconditions/\",\n [StoreId.Eu]: \"https://www.ui.com/legal/ui-eu-store/termsandconditions/\",\n [StoreId.Za]: \"https://www.ui.com/legal/ui-za-store/termsandconditions/\",\n [StoreId.Me]: \"https://www.ui.com/legal/ui-me-store/termsandconditions/\",\n [StoreId.Uk]:\n \"https://cdn.ecomm.ui.com/terms-and-conditions/UK+Store+Terms+and+Conditions.pdf\",\n [StoreId.In]: \"https://www.ui.com/legal/ui-in-store/termsandconditions/\",\n [StoreId.Sg]: \"https://www.ui.com/legal/ui-sg-store/termsandconditions/\",\n [StoreId.Br]: \"https://www.ui.com/legal/ui-br-store/termsandconditions/\",\n [StoreId.Mx]: \"https://www.ui.com/legal/ui-mx-store/termsandconditions/\",\n [StoreId.Jp]: \"https://www.ui.com/legal/ui-jp-store/termsandconditions/\",\n [StoreId.Tw]: \"https://www.ui.com/legal/ui-tw-store/termsandconditions/\",\n [StoreId.Ph]: \"https://www.ui.com/legal/ui-ph-store/termsandconditions/\",\n [StoreId.Cn]: \"https://www.ui.com.cn/legal/ui-store/termsandconditions/\",\n};\n\n// Contact links\nconst CONTACT_LINKS: RegionalLinks = {\n [StoreId.Us]: ExternalUrl.CONTACT,\n\n [StoreId.Tw]: \"https://tw.ui.com/contact/\",\n};\n\n// Become Distributor links\nconst BECOME_DISTRIBUTOR_LINKS: RegionalLinks = {\n [StoreId.Us]: ExternalUrl.BECOME_DISTRIBUTOR,\n\n [StoreId.Tw]: \"https://tw.ui.com/distributors/become-authorized-distributor/\",\n};\n\n// Terms of Service links\nconst TOS_LINKS: RegionalLinks = {\n [StoreId.Us]: ExternalUrl.TERMS_SERVICE,\n};\n\n// Facebook links\nconst FACEBOOK_LINKS: RegionalLinks = {\n [StoreId.Us]: ExternalUrl.FACEBOOK,\n\n [StoreId.Jp]: \"https://www.facebook.com/UbiquitiJapan\",\n};\n\n/**\n * Util to get the regional link based on the given storeId\n * NOTE: We always fallback to US if given storeId is not found\n */\nconst getRegionalLink = (\n links: RegionalLinks,\n storeId: StoreId = StoreId.Us,\n) => {\n const link = links[storeId];\n\n if (link) {\n return link;\n }\n\n return links[StoreId.Us];\n};\n\nexport const useFooterContent = (): {\n footerContent: FooterSections;\n socialContent: FooterSection;\n termsContent: FooterSection;\n\n urls: {\n termsAndConditions: string;\n };\n} => {\n const { storeId: StoreId, context, createSiteUrl } = useMenu();\n\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"../translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"../translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"../translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"../translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"../translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"../translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"../translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"../translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"../translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"../translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n const urls = useMemo(() => {\n return {\n termsAndConditions: getRegionalLink(TOC_LINKS, StoreId),\n };\n }, [StoreId]);\n\n // #############################################################################\n // Footer main content\n // #############################################################################\n const footerContent = useMemo(\n () => ({\n company: {\n header: {\n id: FooterHeaderId.Company,\n label: formatMessage(\"footer.header.company\"),\n },\n items: [\n {\n id: FooterLinkId.Careers,\n label: formatMessage(\"footer.link.careers\"),\n src: FOOTER_LINKS[FooterLinkId.Careers],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Contact,\n label: formatMessage(\"footer.link.contact\"),\n src: getRegionalLink(CONTACT_LINKS, StoreId),\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Investors,\n label: formatMessage(\"footer.link.investors\"),\n src: FOOTER_LINKS[FooterLinkId.Investors],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Compliance,\n label: formatMessage(\"footer.link.compliance\"),\n src: FOOTER_LINKS[FooterLinkId.Compliance],\n target: \"_blank\",\n },\n ].filter(isNonNullish),\n },\n training: {\n header: {\n id: FooterHeaderId.Training,\n label: formatMessage(\"footer.header.training\"),\n },\n items: [\n {\n id: FooterLinkId.Courses,\n label: formatMessage(\"footer.link.courses\"),\n src: FOOTER_LINKS[FooterLinkId.Courses],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Calendar,\n label: formatMessage(\"footer.link.calendar\"),\n src: FOOTER_LINKS[FooterLinkId.Calendar],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Trainers,\n label: formatMessage(\"footer.link.trainers\"),\n src: FOOTER_LINKS[FooterLinkId.Trainers],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.BecomeTrainer,\n label: formatMessage(\"footer.link.becomeTrainer\"),\n src: FOOTER_LINKS[FooterLinkId.BecomeTrainer],\n target: \"_blank\",\n },\n ].filter(isNonNullish),\n },\n buy: {\n header: {\n id: FooterHeaderId.Buy,\n label: formatMessage(\"footer.header.buy\"),\n },\n items: [\n context !== SiteId.Store\n ? {\n id: FooterLinkId.Store,\n label: formatMessage(\"footer.link.store\"),\n src: createSiteUrl([SiteId.Store, \"/\"]),\n target: \"_blank\",\n }\n : null,\n {\n id: FooterLinkId.FindDistributor,\n label: formatMessage(\"footer.link.distributor.find\"),\n src: FOOTER_LINKS[FooterLinkId.FindDistributor],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.BecomeDistributor,\n label: formatMessage(\"footer.link.distributor.become\"),\n src: getRegionalLink(BECOME_DISTRIBUTOR_LINKS, StoreId),\n target: \"_blank\",\n },\n ].filter(isNonNullish),\n },\n tools: {\n header: {\n id: FooterHeaderId.Tools,\n label: formatMessage(\"footer.header.tools\"),\n },\n items: [\n {\n id: FooterLinkId.WiFiman,\n label: formatMessage(\"footer.link.wifiman\"),\n src: FOOTER_LINKS[FooterLinkId.WiFiman],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.UISP,\n label: formatMessage(\"footer.link.uisp\"),\n src: FOOTER_LINKS[FooterLinkId.UISP],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.DesignCenter,\n label: formatMessage(\"footer.link.designCenter\"),\n src: FOOTER_LINKS[FooterLinkId.DesignCenter],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.UispDesignCenter,\n label: formatMessage(\"footer.link.uispDesignCenter\"),\n src: FOOTER_LINKS[FooterLinkId.UispDesignCenter],\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Downloads,\n label: formatMessage(\"footer.link.downloads\"),\n src: ExternalUrl.UI_DOWNLOADS,\n target: \"_blank\",\n },\n ].filter(isNonNullish),\n },\n }),\n [context, createSiteUrl, formatMessage, StoreId],\n );\n\n // #############################################################################\n // Social content\n // #############################################################################\n const socialContent = useMemo(\n (): FooterSection => ({\n header: {\n id: FooterHeaderId.Social,\n label: formatMessage(\"footer.header.social\"),\n },\n items: [\n {\n id: FooterLinkId.Facebook,\n label: \"Facebook\",\n src: getRegionalLink(FACEBOOK_LINKS, StoreId),\n icon: FacebookIcon,\n target: \"_blank\",\n },\n {\n id: FooterLinkId.X,\n label: \"X\",\n src: FOOTER_LINKS[FooterLinkId.X],\n icon: XIcon,\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Youtube,\n label: \"Youtube\",\n src: FOOTER_LINKS[FooterLinkId.Youtube],\n icon: YoutubeIcon,\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Instagram,\n label: \"Instagram\",\n src: FOOTER_LINKS[FooterLinkId.Instagram],\n icon: InstagramIcon,\n target: \"_blank\",\n },\n ].filter(isNonNullish),\n }),\n [formatMessage, StoreId],\n );\n\n // #############################################################################\n // Terms content\n // #############################################################################\n const termsContent = useMemo(\n (): FooterSection => ({\n header: {\n id: FooterHeaderId.Terms,\n label: formatMessage(\"footer.header.terms\"),\n },\n items: [\n // Show \"Terms and Conditions\" only on store\n context === SiteId.Store\n ? {\n id: FooterLinkId.Conditions,\n label: formatMessage(\"footer.link.terms.conditions\"),\n src: urls.termsAndConditions,\n target: \"_blank\",\n }\n : null,\n {\n id: FooterLinkId.Service,\n label: formatMessage(\"footer.link.terms.service\"),\n src: getRegionalLink(TOS_LINKS, StoreId),\n target: \"_blank\",\n },\n {\n id: FooterLinkId.Privacy,\n label: formatMessage(\"footer.link.terms.policy.privacy\"),\n src: FOOTER_LINKS[FooterLinkId.Privacy],\n target: \"_blank\",\n },\n\n // Show \"Legal\" only on non-store sites\n context !== SiteId.Store\n ? {\n id: FooterLinkId.Legal,\n label: formatMessage(\"footer.link.legal\"),\n src: \"https://www.ui.com/legal/\",\n target: \"_blank\",\n }\n : null,\n\n // Show \"Return Policy\" only on store\n context === SiteId.Store\n ? {\n id: FooterLinkId.Return,\n label: formatMessage(\"footer.link.terms.policy.return\"),\n /**\n * Currently the same URL as per request of @kaspars.kristapsons\n * @see https://ui.enterprise.slack.com/files/U03KX6R6519/F0594F39XGS/screenshot_2023-05-23_at_20.49.36.png\n */\n src: getRegionalLink(TOC_LINKS, StoreId),\n target: \"_blank\",\n }\n : null,\n {\n id: FooterLinkId.Cookie,\n label: formatMessage(\"footer.link.terms.cookie\"),\n src: \"\",\n },\n // Show \"FAQ\" only on store\n context === SiteId.Store\n ? {\n id: FooterLinkId.Faq,\n label: formatMessage(\"footer.link.terms.faq\"),\n src: createSiteUrl([SiteId.Store, \"/faq\"]),\n target: \"_blank\",\n }\n : null,\n ].filter(isNonNullish),\n }),\n [context, createSiteUrl, formatMessage, StoreId, urls.termsAndConditions],\n );\n\n // #############################################################################\n // Return\n // #############################################################################\n return {\n footerContent,\n socialContent,\n termsContent,\n\n urls,\n };\n};\n\n/**\n * One-trust cookie policy related id & class that connects with their SDK's\n */\nexport const COOKIE_POLICY_BTN_ID = \"ot-sdk-btn\";\nexport const COOKIE_POLICY_BTN_ID_CLASSNAME = \"ot-sdk-show-settings\";\n"],"names":["FooterHeaderId","FooterLinkId","FOOTER_LINKS","ExternalUrl","CAREERS","CONTACT","INVESTORS","COURSES","CALENDAR","PARTNERS","TRAINERS","FIND_DISTRIBUTOR","BECOME_DISTRIBUTOR","DESIGN_CENTER","WIFIMAN","UISP","UISP_DESIGN_CENTER","FACEBOOK","X","YOUTUBE","INSTAGRAM","TERMS_SERVICE","PRIVACY_POLICY","RETURN_POLICY","COMPLIANCE","TOC_LINKS","StoreId","Ca","Us","Eu","Za","Me","Uk","In","Sg","Br","Mx","Jp","Tw","Ph","Cn","CONTACT_LINKS","BECOME_DISTRIBUTOR_LINKS","TOS_LINKS","FACEBOOK_LINKS","getRegionalLink","links","storeId","link","useFooterContent","context","createSiteUrl","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","urls","useMemo","termsAndConditions","footerContent","company","header","id","label","items","src","target","filter","isNonNullish","training","buy","SiteId","Store","tools","UI_DOWNLOADS","socialContent","icon","FacebookIcon","XIcon","YoutubeIcon","InstagramIcon","termsContent","COOKIE_POLICY_BTN_ID","COOKIE_POLICY_BTN_ID_CLASSNAME"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAeY,IAAAA,cAAA,GAAA,gBAAAA,eAAL,IAAA;EACLA,gBAAA,SAAU,CAAA,GAAA,SAAA;EACVA,gBAAA,UAAW,CAAA,GAAA,UAAA;EACXA,gBAAA,KAAM,CAAA,GAAA,KAAA;EACNA,gBAAA,OAAQ,CAAA,GAAA,OAAA;EACRA,gBAAA,QAAS,CAAA,GAAA,QAAA;EACTA,gBAAA,OAAQ,CAAA,GAAA,OAAA;EANEA,OAAAA,eAAAA;AAAA,CAAA,EAAAA,cAAA,IAAA,CAAA,CAAA,CAAA;AASA,IAAAC,YAAA,GAAA,gBAAAA,aAAL,IAAA;EACLA,cAAA,SAAU,CAAA,GAAA,SAAA;EACVA,cAAA,SAAU,CAAA,GAAA,SAAA;EACVA,cAAA,WAAY,CAAA,GAAA,WAAA;EACZA,cAAA,SAAU,CAAA,GAAA,SAAA;EACVA,cAAA,UAAW,CAAA,GAAA,UAAA;EACXA,cAAA,UAAW,CAAA,GAAA,UAAA;EACXA,cAAA,eAAgB,CAAA,GAAA,eAAA;EAChBA,cAAA,iBAAkB,CAAA,GAAA,iBAAA;EAClBA,cAAA,mBAAoB,CAAA,GAAA,mBAAA;EACpBA,cAAA,cAAe,CAAA,GAAA,cAAA;EACfA,cAAA,SAAU,CAAA,GAAA,SAAA;EACVA,cAAA,MAAO,CAAA,GAAA,MAAA;EACPA,cAAA,kBAAmB,CAAA,GAAA,kBAAA;EACnBA,cAAA,UAAW,CAAA,GAAA,UAAA;EACXA,cAAA,GAAI,CAAA,GAAA,GAAA;EACJA,cAAA,SA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AYoC,OAAOC,KACf,GAAA;MACEV,EAAI,EAAA,OAAA,CAAA;MACJC,KAAA,EAAOzB,cAAc,mBAAmB,CAAA;MACxC2B,GAAK,EAAA,2BAAA;MACLC,MAAQ,EAAA;IAAA,CAEV,GAAA,IAAA;IAAA;IAGJ/B,OAAA,KAAYoC,OAAOC,KACf,GAAA;MACEV,EAAI,EAAA,QAAA,CAAA;MACJC,KAAA,EAAOzB,cAAc,iCAAiC,CAAA;MAAA;AAAA;AAAA;AAAA;MAKtD2B,GAAA,EAAKnC,eAAgB,CAAApB,SAAA,EAAWC,QAAO,CAAA;MACvCuD,MAAQ,EAAA;IAAA,CAEV,GAAA,IAAA,EACJ;MACEJ,EAAI,EAAA,QAAA,CAAA;MACJC,KAAA,EAAOzB,cAAc,0BAA0B,CAAA;MAC/C2B,GAAK,EAAA;IACP,CAAA;IAAA;IAEA9B,OAAA,KAAYoC,OAAOC,KACf,GAAA;MACEV,EAAI,EAAA,KAAA,CAAA;MACJC,KAAA,EAAOzB,cAAc,uBAAuB,CAAA;MAC5C2B,KAAK7B,aAAc,CAAA,CAACmC,MAAO,CAAAC,KAAA,EAAO,MAAM,CAAC,CAAA;MACzCN,MAAQ,EAAA;IAAA,CAEV,GAAA,IAAA,CACN,CAAEC,OAAOC,YAAY;EAAA,CACvB,CAAA,EACA,CAACjC,OAAS,EAAAC,aAAA,EAAeE,aAAe3B,EAAAA,QAAAA,EAAS6C,KAAKE,kBAAkB,CAC1E,CAAA;EAKO,OAAA;IACLC,aAAA;IACAgB,aAAA;IACAM,YAAA;IAEAzB;EACF,CAAA;AACF,CAAA;AAKO,MAAM0B,oBAAuB,GAAA,YAAA;AAC7B,MAAMC,8BAAiC,GAAA,sBAAA;"}
@@ -1,7 +1,7 @@
1
1
  import type { ComponentProps } from "react";
2
2
  import { SiteId } from "../../contexts/MenuContext/mapping";
3
3
  import type { GlobalSiteConfig } from "../../contexts/MenuContext/types";
4
- import { GlobalStoreId, ProductLine } from "../../types";
4
+ import { ProductLine, StoreId } from "../../types";
5
5
  import { Language } from "../../types/constants";
6
6
  import { GlobalHeader } from "./Header";
7
7
  /**
@@ -11,7 +11,7 @@ import { GlobalHeader } from "./Header";
11
11
  */
12
12
  type CustomHeaderProps = ComponentProps<typeof GlobalHeader> & {
13
13
  context: SiteId;
14
- storeId?: GlobalStoreId;
14
+ storeId?: StoreId;
15
15
  simulateAppropriateSubnavigations?: boolean;
16
16
  pathname?: string;
17
17
  globalSiteConfig?: GlobalSiteConfig;
@@ -1,2 +1,2 @@
1
- import type { GlobalStoreId, Language } from "../../../../types";
2
- export declare const buildLanguageLink: (contextStoreId: GlobalStoreId, languageKey: Language, href?: string) => string | undefined;
1
+ import type { Language, StoreId } from "../../../../types";
2
+ export declare const buildLanguageLink: (contextStoreId: StoreId, languageKey: Language, href?: string) => string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"buildLanguageLink.js","sources":["../../../../../src/components/Header/LanguageFrame/utils/buildLanguageLink.ts"],"sourcesContent":["import type { GlobalStoreId, Language } from \"../../../../types\";\nimport { isLanguage } from \"../../../../utils/language\";\nimport { isStoreId } from \"../../../../utils/storeId\";\nimport { partsToPathname, pathnameToParts } from \"../../../../utils/url\";\n\nexport const buildLanguageLink = (\n contextStoreId: GlobalStoreId,\n languageKey: Language,\n href?: string,\n) => {\n try {\n // URL constructor throws Type error if URL is invalid\n const currentURL = new URL(href || window.location.href);\n\n // Get array with parts of pathname\n const pathParts = pathnameToParts(currentURL.pathname);\n\n /**\n * Check if store id and language are in the path /:storeId/:language/\n * remove from path array if so\n */\n const partsToRemove =\n (isStoreId(pathParts[0]) ? 1 : 0) + (isLanguage(pathParts[1]) ? 1 : 0);\n\n // Get the rest of the path\n const restOfPath = pathParts.slice(partsToRemove);\n\n // Build the new path array\n const newPathParts = [\n contextStoreId, // Use the storeId from the context\n languageKey,\n ...restOfPath,\n ];\n\n currentURL.pathname = partsToPathname(newPathParts);\n\n // Add language to the search params to trigger the language cookie update in all sites\n currentURL.searchParams.set(\"l\", languageKey);\n\n // Reconstruct the path and build the new URL\n return currentURL.toString().replace(currentURL.origin, \"\");\n } catch {\n // Fail silently\n return undefined;\n }\n};\n"],"names":["buildLanguageLink","contextStoreId","languageKey","href","currentURL","URL","window","location","pathParts","pathnameToParts","pathname","partsToRemove","isStoreId","isLanguage","restOfPath","slice","newPathParts","partsToPathname","searchParams","set","toString","replace","origin"],"mappings":";;;;;;AAKO,MAAMA,iBAAoB,GAAAA,CAC/BC,cACA,EAAAC,WAAA,EACAC,IACG,KAAA;EACC,IAAA;IAEF,MAAMC,aAAa,IAAIC,GAAA,CAAIF,IAAQ,IAAAG,MAAA,CAAOC,SAASJ,IAAI,CAAA;IAGjD,MAAAK,SAAA,GAAYC,GAAAA,CAAAA,eAAgB,CAAAL,UAAA,CAAWM,QAAQ,CAAA;IAMrD,MAAMC,aACH,GAAA,CAAAC,OAAAA,CAAAA,SAAA,CAAUJ,SAAU,CAAA,CAAC,CAAC,CAAA,GAAI,CAAI,GAAA,CAAA,KAAMK,QAAAA,CAAAA,UAAW,CAAAL,SAAA,CAAU,CAAC,CAAC,IAAI,CAAI,GAAA,CAAA,CAAA;IAGhE,MAAAM,UAAA,GAAaN,SAAU,CAAAO,KAAA,CAAMJ,aAAa,CAAA;IAGhD,MAAMK,YAAe,GAAA,CACnBf,cAAA;IAAA;IACAC,WAAA,EACA,GAAGY,UAAA,CACL;IAEWV,UAAA,CAAAM,QAAA,GAAWO,oBAAgBD,YAAY,CAAA;IAGvCZ,UAAA,CAAAc,YAAA,CAAaC,GAAI,CAAA,GAAA,EAAKjB,WAAW,CAAA;IAG5C,OAAOE,WAAWgB,QAAS,CAAA,CAAA,CAAEC,OAAQ,CAAAjB,UAAA,CAAWkB,QAAQ,EAAE,CAAA;EAAA,CACpD,CAAA,MAAA;IAEC,OAAA,KAAA,CAAA;EAAA;AAEX,CAAA;"}
1
+ {"version":3,"file":"buildLanguageLink.js","sources":["../../../../../src/components/Header/LanguageFrame/utils/buildLanguageLink.ts"],"sourcesContent":["import type { Language, StoreId } from \"../../../../types\";\nimport { isLanguage } from \"../../../../utils/language\";\nimport { isStoreId } from \"../../../../utils/storeId\";\nimport { partsToPathname, pathnameToParts } from \"../../../../utils/url\";\n\nexport const buildLanguageLink = (\n contextStoreId: StoreId,\n languageKey: Language,\n href?: string,\n) => {\n try {\n // URL constructor throws Type error if URL is invalid\n const currentURL = new URL(href || window.location.href);\n\n // Get array with parts of pathname\n const pathParts = pathnameToParts(currentURL.pathname);\n\n /**\n * Check if store id and language are in the path /:storeId/:language/\n * remove from path array if so\n */\n const partsToRemove =\n (isStoreId(pathParts[0]) ? 1 : 0) + (isLanguage(pathParts[1]) ? 1 : 0);\n\n // Get the rest of the path\n const restOfPath = pathParts.slice(partsToRemove);\n\n // Build the new path array\n const newPathParts = [\n contextStoreId, // Use the storeId from the context\n languageKey,\n ...restOfPath,\n ];\n\n currentURL.pathname = partsToPathname(newPathParts);\n\n // Add language to the search params to trigger the language cookie update in all sites\n currentURL.searchParams.set(\"l\", languageKey);\n\n // Reconstruct the path and build the new URL\n return currentURL.toString().replace(currentURL.origin, \"\");\n } catch {\n // Fail silently\n return undefined;\n }\n};\n"],"names":["buildLanguageLink","contextStoreId","languageKey","href","currentURL","URL","window","location","pathParts","pathnameToParts","pathname","partsToRemove","isStoreId","isLanguage","restOfPath","slice","newPathParts","partsToPathname","searchParams","set","toString","replace","origin"],"mappings":";;;;;;AAKO,MAAMA,iBAAoB,GAAAA,CAC/BC,cACA,EAAAC,WAAA,EACAC,IACG,KAAA;EACC,IAAA;IAEF,MAAMC,aAAa,IAAIC,GAAA,CAAIF,IAAQ,IAAAG,MAAA,CAAOC,SAASJ,IAAI,CAAA;IAGjD,MAAAK,SAAA,GAAYC,GAAAA,CAAAA,eAAgB,CAAAL,UAAA,CAAWM,QAAQ,CAAA;IAMrD,MAAMC,aACH,GAAA,CAAAC,OAAAA,CAAAA,SAAA,CAAUJ,SAAU,CAAA,CAAC,CAAC,CAAA,GAAI,CAAI,GAAA,CAAA,KAAMK,QAAAA,CAAAA,UAAW,CAAAL,SAAA,CAAU,CAAC,CAAC,IAAI,CAAI,GAAA,CAAA,CAAA;IAGhE,MAAAM,UAAA,GAAaN,SAAU,CAAAO,KAAA,CAAMJ,aAAa,CAAA;IAGhD,MAAMK,YAAe,GAAA,CACnBf,cAAA;IAAA;IACAC,WAAA,EACA,GAAGY,UAAA,CACL;IAEWV,UAAA,CAAAM,QAAA,GAAWO,oBAAgBD,YAAY,CAAA;IAGvCZ,UAAA,CAAAc,YAAA,CAAaC,GAAI,CAAA,GAAA,EAAKjB,WAAW,CAAA;IAG5C,OAAOE,WAAWgB,QAAS,CAAA,CAAA,CAAEC,OAAQ,CAAAjB,UAAA,CAAWkB,QAAQ,EAAE,CAAA;EAAA,CACpD,CAAA,MAAA;IAEC,OAAA,KAAA,CAAA;EAAA;AAEX,CAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildLanguageLink.mjs","sources":["../../../../../src/components/Header/LanguageFrame/utils/buildLanguageLink.ts"],"sourcesContent":["import type { GlobalStoreId, Language } from \"../../../../types\";\nimport { isLanguage } from \"../../../../utils/language\";\nimport { isStoreId } from \"../../../../utils/storeId\";\nimport { partsToPathname, pathnameToParts } from \"../../../../utils/url\";\n\nexport const buildLanguageLink = (\n contextStoreId: GlobalStoreId,\n languageKey: Language,\n href?: string,\n) => {\n try {\n // URL constructor throws Type error if URL is invalid\n const currentURL = new URL(href || window.location.href);\n\n // Get array with parts of pathname\n const pathParts = pathnameToParts(currentURL.pathname);\n\n /**\n * Check if store id and language are in the path /:storeId/:language/\n * remove from path array if so\n */\n const partsToRemove =\n (isStoreId(pathParts[0]) ? 1 : 0) + (isLanguage(pathParts[1]) ? 1 : 0);\n\n // Get the rest of the path\n const restOfPath = pathParts.slice(partsToRemove);\n\n // Build the new path array\n const newPathParts = [\n contextStoreId, // Use the storeId from the context\n languageKey,\n ...restOfPath,\n ];\n\n currentURL.pathname = partsToPathname(newPathParts);\n\n // Add language to the search params to trigger the language cookie update in all sites\n currentURL.searchParams.set(\"l\", languageKey);\n\n // Reconstruct the path and build the new URL\n return currentURL.toString().replace(currentURL.origin, \"\");\n } catch {\n // Fail silently\n return undefined;\n }\n};\n"],"names":["buildLanguageLink","contextStoreId","languageKey","href","currentURL","URL","window","location","pathParts","pathnameToParts","pathname","partsToRemove","isStoreId","isLanguage","restOfPath","slice","newPathParts","partsToPathname","searchParams","set","toString","replace","origin"],"mappings":";;;;AAKO,MAAMA,iBAAoB,GAAAA,CAC/BC,cACA,EAAAC,WAAA,EACAC,IACG,KAAA;EACC,IAAA;IAEF,MAAMC,aAAa,IAAIC,GAAA,CAAIF,IAAQ,IAAAG,MAAA,CAAOC,SAASJ,IAAI,CAAA;IAGjD,MAAAK,SAAA,GAAYC,eAAgB,CAAAL,UAAA,CAAWM,QAAQ,CAAA;IAMrD,MAAMC,aACH,GAAA,CAAAC,SAAA,CAAUJ,SAAU,CAAA,CAAC,CAAC,CAAA,GAAI,CAAI,GAAA,CAAA,KAAMK,UAAW,CAAAL,SAAA,CAAU,CAAC,CAAC,IAAI,CAAI,GAAA,CAAA,CAAA;IAGhE,MAAAM,UAAA,GAAaN,SAAU,CAAAO,KAAA,CAAMJ,aAAa,CAAA;IAGhD,MAAMK,YAAe,GAAA,CACnBf,cAAA;IAAA;IACAC,WAAA,EACA,GAAGY,UAAA,CACL;IAEWV,UAAA,CAAAM,QAAA,GAAWO,gBAAgBD,YAAY,CAAA;IAGvCZ,UAAA,CAAAc,YAAA,CAAaC,GAAI,CAAA,GAAA,EAAKjB,WAAW,CAAA;IAG5C,OAAOE,WAAWgB,QAAS,CAAA,CAAA,CAAEC,OAAQ,CAAAjB,UAAA,CAAWkB,QAAQ,EAAE,CAAA;EAAA,CACpD,CAAA,MAAA;IAEC,OAAA,KAAA,CAAA;EAAA;AAEX,CAAA;"}
1
+ {"version":3,"file":"buildLanguageLink.mjs","sources":["../../../../../src/components/Header/LanguageFrame/utils/buildLanguageLink.ts"],"sourcesContent":["import type { Language, StoreId } from \"../../../../types\";\nimport { isLanguage } from \"../../../../utils/language\";\nimport { isStoreId } from \"../../../../utils/storeId\";\nimport { partsToPathname, pathnameToParts } from \"../../../../utils/url\";\n\nexport const buildLanguageLink = (\n contextStoreId: StoreId,\n languageKey: Language,\n href?: string,\n) => {\n try {\n // URL constructor throws Type error if URL is invalid\n const currentURL = new URL(href || window.location.href);\n\n // Get array with parts of pathname\n const pathParts = pathnameToParts(currentURL.pathname);\n\n /**\n * Check if store id and language are in the path /:storeId/:language/\n * remove from path array if so\n */\n const partsToRemove =\n (isStoreId(pathParts[0]) ? 1 : 0) + (isLanguage(pathParts[1]) ? 1 : 0);\n\n // Get the rest of the path\n const restOfPath = pathParts.slice(partsToRemove);\n\n // Build the new path array\n const newPathParts = [\n contextStoreId, // Use the storeId from the context\n languageKey,\n ...restOfPath,\n ];\n\n currentURL.pathname = partsToPathname(newPathParts);\n\n // Add language to the search params to trigger the language cookie update in all sites\n currentURL.searchParams.set(\"l\", languageKey);\n\n // Reconstruct the path and build the new URL\n return currentURL.toString().replace(currentURL.origin, \"\");\n } catch {\n // Fail silently\n return undefined;\n }\n};\n"],"names":["buildLanguageLink","contextStoreId","languageKey","href","currentURL","URL","window","location","pathParts","pathnameToParts","pathname","partsToRemove","isStoreId","isLanguage","restOfPath","slice","newPathParts","partsToPathname","searchParams","set","toString","replace","origin"],"mappings":";;;;AAKO,MAAMA,iBAAoB,GAAAA,CAC/BC,cACA,EAAAC,WAAA,EACAC,IACG,KAAA;EACC,IAAA;IAEF,MAAMC,aAAa,IAAIC,GAAA,CAAIF,IAAQ,IAAAG,MAAA,CAAOC,SAASJ,IAAI,CAAA;IAGjD,MAAAK,SAAA,GAAYC,eAAgB,CAAAL,UAAA,CAAWM,QAAQ,CAAA;IAMrD,MAAMC,aACH,GAAA,CAAAC,SAAA,CAAUJ,SAAU,CAAA,CAAC,CAAC,CAAA,GAAI,CAAI,GAAA,CAAA,KAAMK,UAAW,CAAAL,SAAA,CAAU,CAAC,CAAC,IAAI,CAAI,GAAA,CAAA,CAAA;IAGhE,MAAAM,UAAA,GAAaN,SAAU,CAAAO,KAAA,CAAMJ,aAAa,CAAA;IAGhD,MAAMK,YAAe,GAAA,CACnBf,cAAA;IAAA;IACAC,WAAA,EACA,GAAGY,UAAA,CACL;IAEWV,UAAA,CAAAM,QAAA,GAAWO,gBAAgBD,YAAY,CAAA;IAGvCZ,UAAA,CAAAc,YAAA,CAAaC,GAAI,CAAA,GAAA,EAAKjB,WAAW,CAAA;IAG5C,OAAOE,WAAWgB,QAAS,CAAA,CAAA,CAAEC,OAAQ,CAAAjB,UAAA,CAAWkB,QAAQ,EAAE,CAAA;EAAA,CACpD,CAAA,MAAA;IAEC,OAAA,KAAA,CAAA;EAAA;AAEX,CAAA;"}
@@ -11,7 +11,7 @@ require('./assets/play.svg.js');
11
11
  var MicrositeVideoSlideshow_styles = require('./MicrositeVideoSlideshow.styles.js');
12
12
  var MicrositeSectionWrap = require('../MicrositeSectionWrap/MicrositeSectionWrap.js');
13
13
  var PlayIcon = require("../../assets/play.svg");
14
- var PauseIcon = require("../../assets/pause.svg");
14
+ var PauseIcon = require("../../assets/pause2.svg");
15
15
  var ActiveIconBox = require("../../assets/active-icon-box.svg");
16
16
  function _interopDefault(e) {
17
17
  return e && e.__esModule ? e : {
@@ -9,7 +9,7 @@ import './assets/play.svg.mjs';
9
9
  import { VideoBlock, Video, VideoControls, VideoInnerWrap, ProgressCircle, PlayIcon, PauseIcon, SlideRow, Slide, FeatureIconWrap, FeatureIconActiveBackground, FeatureIcon, FeatureTitle, MicrositeBuyButton } from './MicrositeVideoSlideshow.styles.mjs';
10
10
  import { MicrositeSectionWrap } from '../MicrositeSectionWrap/MicrositeSectionWrap.mjs';
11
11
  import PlayIcon__default from "../../assets/play.svg";
12
- import PauseIcon__default from "../../assets/pause.svg";
12
+ import PauseIcon__default from "../../assets/pause2.svg";
13
13
  import ActiveIconBox__default from "../../assets/active-icon-box.svg";
14
14
  "use strict";
15
15
  const MicrositeVideoSlideshow = ({
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', {
4
4
  value: true
5
5
  });
6
- var PauseIcon = require("../../../assets/pause.svg");
6
+ var PauseIcon = require("../../../assets/pause2.svg");
7
7
  function _interopDefault(e) {
8
8
  return e && e.__esModule ? e : {
9
9
  default: e
@@ -1,3 +1,3 @@
1
- export * from "../../../assets/pause.svg";
2
- export { default } from "../../../assets/pause.svg";
1
+ export * from "../../../assets/pause2.svg";
2
+ export { default } from "../../../assets/pause2.svg";
3
3
  //# sourceMappingURL=pause.svg.mjs.map
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import type { GlobalStoreId } from "../../types";
2
+ import type { StoreId } from "../../types";
3
3
  import type { ExploreProductProps, ExploreSectionId } from "../Explore/ExploreData";
4
4
  import type { MicrositeColumnFeatureProgressBarProps } from "../MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.types";
5
5
  import type { MicrositeFeatureChecklistProps } from "../MicrositeFeatureChecklist";
@@ -116,7 +116,7 @@ export type MicrositePageBlocks = HeroBlockProps | ((IntroductionBlockProps | Mi
116
116
  */
117
117
  export interface MicrositesPageProps {
118
118
  blocks: MicrositePageBlocks[];
119
- storeId?: GlobalStoreId;
119
+ storeId?: StoreId;
120
120
  className?: string;
121
121
  }
122
122
  export type MicrositesPageContextValue = {
@@ -1 +1 @@
1
- {"version":3,"file":"Microsites.types.js","sources":["../../../src/components/Microsites/Microsites.types.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type { GlobalStoreId } from \"../../types\";\nimport type {\n ExploreProductProps,\n ExploreSectionId,\n} from \"../Explore/ExploreData\";\nimport type { MicrositeColumnFeatureProgressBarProps } from \"../MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.types\";\nimport type { MicrositeFeatureChecklistProps } from \"../MicrositeFeatureChecklist\";\nimport type { MicrositeFeatureIconProps } from \"../MicrositeFeatureIcons/MicrositeFeatureIcons.types\";\nimport type { MicrositeFeatureListProps } from \"../MicrositeFeatureList/MicrositeFeatureList.types\";\nimport type { MicrositeHeroProps } from \"../MicrositeHero/MicrositeHero.types\";\nimport type { MicrositeIntroductionBlockProps } from \"../MicrositeIntroductionBlock/MicrositeIntroductionBlock.types\";\nimport type { MicrositeMediaGridProps } from \"../MicrositeMediaGrid/MicrositeMediaGrid.types\";\nimport type { MicrositeSubSubNavigationProps } from \"../MicrositeSubSubNavigation/MicrositeSubSubNavigation.types\";\nimport type { MicrositeVideoSlideshowProps } from \"../MicrositeVideoSlideshow/MicrositeVideoSlideshow.types\";\nimport type { ModelCompareV3SectionId } from \"../ModelCompareV3/data\";\n\nexport enum MicrositeBlockType {\n Hero = \"hero\",\n SubSubNavigation = \"sub-sub-navigation\",\n Introduction = \"introduction\",\n FeatureIcons = \"feature-icons\",\n MediaGrid = \"media-grid\",\n ColumnFeatures = \"column-features\",\n VideoSlideshow = \"video-slideshow\",\n Deployment = \"deployment\",\n Compare = \"compare\",\n CompareV3 = \"compare-v3\",\n Explore = \"explore\",\n FeatureList = \"feature-list\",\n FeatureChecklist = \"feature-checklist\",\n CustomContent = \"custom-content\",\n}\n\nexport interface HeroBlockProps {\n type: MicrositeBlockType.Hero;\n data: MicrositeHeroProps;\n wrapId?: string;\n}\n\ntype SectionWrapProps = {\n title?: ReactNode;\n subTitle?: string;\n action?: ReactNode;\n afterAction?: ReactNode;\n};\n\nexport interface IntroductionBlockProps {\n type: MicrositeBlockType.Introduction;\n data: SectionWrapProps & MicrositeIntroductionBlockProps;\n}\n\nexport interface FeatureIconsProps {\n type: MicrositeBlockType.FeatureIcons;\n data: MicrositeFeatureIconProps;\n}\n\nexport interface ColumnFeaturesProps {\n type: MicrositeBlockType.ColumnFeatures;\n data: MicrositeColumnFeatureProgressBarProps;\n}\n\nexport interface MediaGridBlockProps {\n type: MicrositeBlockType.MediaGrid;\n data: SectionWrapProps & MicrositeMediaGridProps;\n}\n\nexport interface VideoSlideshowProps {\n type: MicrositeBlockType.VideoSlideshow;\n data: MicrositeVideoSlideshowProps;\n}\n\nexport interface DeploymentSectionProps {\n type: MicrositeBlockType.Deployment;\n data: SectionWrapProps & {\n image: {\n src: string;\n width: number;\n height: number;\n };\n /** Removes max-width constrain */\n fullWidth?: boolean;\n };\n}\n\n// TODO: Remove V3 when V2 and V1 is deprecated\nexport interface CompareSectionV3Props {\n type: MicrositeBlockType.CompareV3;\n data: SectionWrapProps & {\n id: ModelCompareV3SectionId;\n };\n}\n\nexport interface ExploreSectionProps {\n type: MicrositeBlockType.Explore;\n data: SectionWrapProps &\n Pick<ExploreProductProps, \"flipped\"> & {\n exploreSectionId: ExploreSectionId;\n };\n}\n\nexport interface FeatureListProps {\n type: MicrositeBlockType.FeatureList;\n data: MicrositeFeatureListProps;\n}\n\nexport interface FeatureChecklistProps {\n type: MicrositeBlockType.FeatureChecklist;\n data: SectionWrapProps & MicrositeFeatureChecklistProps;\n}\n\nexport interface CustomContent {\n type: MicrositeBlockType.CustomContent;\n data: SectionWrapProps & { content: ReactNode };\n}\n\nexport interface MicrositeSubSubNavigation {\n type: MicrositeBlockType.SubSubNavigation;\n data: MicrositeSubSubNavigationProps;\n}\n\nexport type MicrositePageBlocks =\n | HeroBlockProps\n | ((\n | IntroductionBlockProps\n | MicrositeSubSubNavigation\n | FeatureIconsProps\n | ColumnFeaturesProps\n | FeatureListProps\n | MediaGridBlockProps\n | DeploymentSectionProps\n | CompareSectionV3Props\n | ExploreSectionProps\n | VideoSlideshowProps\n | FeatureChecklistProps\n | CustomContent\n ) & {\n /**\n * Custom class name for the blocks that uses wrap\n */\n wrapClassName?: string;\n /**\n * Custom html ID for the blocks that uses wrap.\n */\n wrapId?: string;\n });\n\n/**\n * General microsite page props interface\n * Extend on each page if modification is needed\n */\nexport interface MicrositesPageProps {\n blocks: MicrositePageBlocks[];\n storeId?: GlobalStoreId;\n className?: string;\n}\n\nexport type MicrositesPageContextValue = {\n activeFullscreenType: MicrositeBlockType | null;\n setActiveFullscreenType: (type: MicrositeBlockType | null) => void;\n};\n"],"names":["MicrositeBlockType"],"mappings":";;;AAkBY,IAAAA,kBAAA,GAAA,gBAAAA,mBAAL,IAAA;EACLA,oBAAA,MAAO,CAAA,GAAA,MAAA;EACPA,oBAAA,kBAAmB,CAAA,GAAA,oBAAA;EACnBA,oBAAA,cAAe,CAAA,GAAA,cAAA;EACfA,oBAAA,cAAe,CAAA,GAAA,eAAA;EACfA,oBAAA,WAAY,CAAA,GAAA,YAAA;EACZA,oBAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,oBAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,oBAAA,YAAa,CAAA,GAAA,YAAA;EACbA,oBAAA,SAAU,CAAA,GAAA,SAAA;EACVA,oBAAA,WAAY,CAAA,GAAA,YAAA;EACZA,oBAAA,SAAU,CAAA,GAAA,SAAA;EACVA,oBAAA,aAAc,CAAA,GAAA,cAAA;EACdA,oBAAA,kBAAmB,CAAA,GAAA,mBAAA;EACnBA,oBAAA,eAAgB,CAAA,GAAA,gBAAA;EAdNA,OAAAA,mBAAAA;AAAA,CAAA,EAAAA,kBAAA,IAAA,CAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"Microsites.types.js","sources":["../../../src/components/Microsites/Microsites.types.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type { StoreId } from \"../../types\";\nimport type {\n ExploreProductProps,\n ExploreSectionId,\n} from \"../Explore/ExploreData\";\nimport type { MicrositeColumnFeatureProgressBarProps } from \"../MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.types\";\nimport type { MicrositeFeatureChecklistProps } from \"../MicrositeFeatureChecklist\";\nimport type { MicrositeFeatureIconProps } from \"../MicrositeFeatureIcons/MicrositeFeatureIcons.types\";\nimport type { MicrositeFeatureListProps } from \"../MicrositeFeatureList/MicrositeFeatureList.types\";\nimport type { MicrositeHeroProps } from \"../MicrositeHero/MicrositeHero.types\";\nimport type { MicrositeIntroductionBlockProps } from \"../MicrositeIntroductionBlock/MicrositeIntroductionBlock.types\";\nimport type { MicrositeMediaGridProps } from \"../MicrositeMediaGrid/MicrositeMediaGrid.types\";\nimport type { MicrositeSubSubNavigationProps } from \"../MicrositeSubSubNavigation/MicrositeSubSubNavigation.types\";\nimport type { MicrositeVideoSlideshowProps } from \"../MicrositeVideoSlideshow/MicrositeVideoSlideshow.types\";\nimport type { ModelCompareV3SectionId } from \"../ModelCompareV3/data\";\n\nexport enum MicrositeBlockType {\n Hero = \"hero\",\n SubSubNavigation = \"sub-sub-navigation\",\n Introduction = \"introduction\",\n FeatureIcons = \"feature-icons\",\n MediaGrid = \"media-grid\",\n ColumnFeatures = \"column-features\",\n VideoSlideshow = \"video-slideshow\",\n Deployment = \"deployment\",\n Compare = \"compare\",\n CompareV3 = \"compare-v3\",\n Explore = \"explore\",\n FeatureList = \"feature-list\",\n FeatureChecklist = \"feature-checklist\",\n CustomContent = \"custom-content\",\n}\n\nexport interface HeroBlockProps {\n type: MicrositeBlockType.Hero;\n data: MicrositeHeroProps;\n wrapId?: string;\n}\n\ntype SectionWrapProps = {\n title?: ReactNode;\n subTitle?: string;\n action?: ReactNode;\n afterAction?: ReactNode;\n};\n\nexport interface IntroductionBlockProps {\n type: MicrositeBlockType.Introduction;\n data: SectionWrapProps & MicrositeIntroductionBlockProps;\n}\n\nexport interface FeatureIconsProps {\n type: MicrositeBlockType.FeatureIcons;\n data: MicrositeFeatureIconProps;\n}\n\nexport interface ColumnFeaturesProps {\n type: MicrositeBlockType.ColumnFeatures;\n data: MicrositeColumnFeatureProgressBarProps;\n}\n\nexport interface MediaGridBlockProps {\n type: MicrositeBlockType.MediaGrid;\n data: SectionWrapProps & MicrositeMediaGridProps;\n}\n\nexport interface VideoSlideshowProps {\n type: MicrositeBlockType.VideoSlideshow;\n data: MicrositeVideoSlideshowProps;\n}\n\nexport interface DeploymentSectionProps {\n type: MicrositeBlockType.Deployment;\n data: SectionWrapProps & {\n image: {\n src: string;\n width: number;\n height: number;\n };\n /** Removes max-width constrain */\n fullWidth?: boolean;\n };\n}\n\n// TODO: Remove V3 when V2 and V1 is deprecated\nexport interface CompareSectionV3Props {\n type: MicrositeBlockType.CompareV3;\n data: SectionWrapProps & {\n id: ModelCompareV3SectionId;\n };\n}\n\nexport interface ExploreSectionProps {\n type: MicrositeBlockType.Explore;\n data: SectionWrapProps &\n Pick<ExploreProductProps, \"flipped\"> & {\n exploreSectionId: ExploreSectionId;\n };\n}\n\nexport interface FeatureListProps {\n type: MicrositeBlockType.FeatureList;\n data: MicrositeFeatureListProps;\n}\n\nexport interface FeatureChecklistProps {\n type: MicrositeBlockType.FeatureChecklist;\n data: SectionWrapProps & MicrositeFeatureChecklistProps;\n}\n\nexport interface CustomContent {\n type: MicrositeBlockType.CustomContent;\n data: SectionWrapProps & { content: ReactNode };\n}\n\nexport interface MicrositeSubSubNavigation {\n type: MicrositeBlockType.SubSubNavigation;\n data: MicrositeSubSubNavigationProps;\n}\n\nexport type MicrositePageBlocks =\n | HeroBlockProps\n | ((\n | IntroductionBlockProps\n | MicrositeSubSubNavigation\n | FeatureIconsProps\n | ColumnFeaturesProps\n | FeatureListProps\n | MediaGridBlockProps\n | DeploymentSectionProps\n | CompareSectionV3Props\n | ExploreSectionProps\n | VideoSlideshowProps\n | FeatureChecklistProps\n | CustomContent\n ) & {\n /**\n * Custom class name for the blocks that uses wrap\n */\n wrapClassName?: string;\n /**\n * Custom html ID for the blocks that uses wrap.\n */\n wrapId?: string;\n });\n\n/**\n * General microsite page props interface\n * Extend on each page if modification is needed\n */\nexport interface MicrositesPageProps {\n blocks: MicrositePageBlocks[];\n storeId?: StoreId;\n className?: string;\n}\n\nexport type MicrositesPageContextValue = {\n activeFullscreenType: MicrositeBlockType | null;\n setActiveFullscreenType: (type: MicrositeBlockType | null) => void;\n};\n"],"names":["MicrositeBlockType"],"mappings":";;;AAkBY,IAAAA,kBAAA,GAAA,gBAAAA,mBAAL,IAAA;EACLA,oBAAA,MAAO,CAAA,GAAA,MAAA;EACPA,oBAAA,kBAAmB,CAAA,GAAA,oBAAA;EACnBA,oBAAA,cAAe,CAAA,GAAA,cAAA;EACfA,oBAAA,cAAe,CAAA,GAAA,eAAA;EACfA,oBAAA,WAAY,CAAA,GAAA,YAAA;EACZA,oBAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,oBAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,oBAAA,YAAa,CAAA,GAAA,YAAA;EACbA,oBAAA,SAAU,CAAA,GAAA,SAAA;EACVA,oBAAA,WAAY,CAAA,GAAA,YAAA;EACZA,oBAAA,SAAU,CAAA,GAAA,SAAA;EACVA,oBAAA,aAAc,CAAA,GAAA,cAAA;EACdA,oBAAA,kBAAmB,CAAA,GAAA,mBAAA;EACnBA,oBAAA,eAAgB,CAAA,GAAA,gBAAA;EAdNA,OAAAA,mBAAAA;AAAA,CAAA,EAAAA,kBAAA,IAAA,CAAA,CAAA,CAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Microsites.types.mjs","sources":["../../../src/components/Microsites/Microsites.types.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type { GlobalStoreId } from \"../../types\";\nimport type {\n ExploreProductProps,\n ExploreSectionId,\n} from \"../Explore/ExploreData\";\nimport type { MicrositeColumnFeatureProgressBarProps } from \"../MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.types\";\nimport type { MicrositeFeatureChecklistProps } from \"../MicrositeFeatureChecklist\";\nimport type { MicrositeFeatureIconProps } from \"../MicrositeFeatureIcons/MicrositeFeatureIcons.types\";\nimport type { MicrositeFeatureListProps } from \"../MicrositeFeatureList/MicrositeFeatureList.types\";\nimport type { MicrositeHeroProps } from \"../MicrositeHero/MicrositeHero.types\";\nimport type { MicrositeIntroductionBlockProps } from \"../MicrositeIntroductionBlock/MicrositeIntroductionBlock.types\";\nimport type { MicrositeMediaGridProps } from \"../MicrositeMediaGrid/MicrositeMediaGrid.types\";\nimport type { MicrositeSubSubNavigationProps } from \"../MicrositeSubSubNavigation/MicrositeSubSubNavigation.types\";\nimport type { MicrositeVideoSlideshowProps } from \"../MicrositeVideoSlideshow/MicrositeVideoSlideshow.types\";\nimport type { ModelCompareV3SectionId } from \"../ModelCompareV3/data\";\n\nexport enum MicrositeBlockType {\n Hero = \"hero\",\n SubSubNavigation = \"sub-sub-navigation\",\n Introduction = \"introduction\",\n FeatureIcons = \"feature-icons\",\n MediaGrid = \"media-grid\",\n ColumnFeatures = \"column-features\",\n VideoSlideshow = \"video-slideshow\",\n Deployment = \"deployment\",\n Compare = \"compare\",\n CompareV3 = \"compare-v3\",\n Explore = \"explore\",\n FeatureList = \"feature-list\",\n FeatureChecklist = \"feature-checklist\",\n CustomContent = \"custom-content\",\n}\n\nexport interface HeroBlockProps {\n type: MicrositeBlockType.Hero;\n data: MicrositeHeroProps;\n wrapId?: string;\n}\n\ntype SectionWrapProps = {\n title?: ReactNode;\n subTitle?: string;\n action?: ReactNode;\n afterAction?: ReactNode;\n};\n\nexport interface IntroductionBlockProps {\n type: MicrositeBlockType.Introduction;\n data: SectionWrapProps & MicrositeIntroductionBlockProps;\n}\n\nexport interface FeatureIconsProps {\n type: MicrositeBlockType.FeatureIcons;\n data: MicrositeFeatureIconProps;\n}\n\nexport interface ColumnFeaturesProps {\n type: MicrositeBlockType.ColumnFeatures;\n data: MicrositeColumnFeatureProgressBarProps;\n}\n\nexport interface MediaGridBlockProps {\n type: MicrositeBlockType.MediaGrid;\n data: SectionWrapProps & MicrositeMediaGridProps;\n}\n\nexport interface VideoSlideshowProps {\n type: MicrositeBlockType.VideoSlideshow;\n data: MicrositeVideoSlideshowProps;\n}\n\nexport interface DeploymentSectionProps {\n type: MicrositeBlockType.Deployment;\n data: SectionWrapProps & {\n image: {\n src: string;\n width: number;\n height: number;\n };\n /** Removes max-width constrain */\n fullWidth?: boolean;\n };\n}\n\n// TODO: Remove V3 when V2 and V1 is deprecated\nexport interface CompareSectionV3Props {\n type: MicrositeBlockType.CompareV3;\n data: SectionWrapProps & {\n id: ModelCompareV3SectionId;\n };\n}\n\nexport interface ExploreSectionProps {\n type: MicrositeBlockType.Explore;\n data: SectionWrapProps &\n Pick<ExploreProductProps, \"flipped\"> & {\n exploreSectionId: ExploreSectionId;\n };\n}\n\nexport interface FeatureListProps {\n type: MicrositeBlockType.FeatureList;\n data: MicrositeFeatureListProps;\n}\n\nexport interface FeatureChecklistProps {\n type: MicrositeBlockType.FeatureChecklist;\n data: SectionWrapProps & MicrositeFeatureChecklistProps;\n}\n\nexport interface CustomContent {\n type: MicrositeBlockType.CustomContent;\n data: SectionWrapProps & { content: ReactNode };\n}\n\nexport interface MicrositeSubSubNavigation {\n type: MicrositeBlockType.SubSubNavigation;\n data: MicrositeSubSubNavigationProps;\n}\n\nexport type MicrositePageBlocks =\n | HeroBlockProps\n | ((\n | IntroductionBlockProps\n | MicrositeSubSubNavigation\n | FeatureIconsProps\n | ColumnFeaturesProps\n | FeatureListProps\n | MediaGridBlockProps\n | DeploymentSectionProps\n | CompareSectionV3Props\n | ExploreSectionProps\n | VideoSlideshowProps\n | FeatureChecklistProps\n | CustomContent\n ) & {\n /**\n * Custom class name for the blocks that uses wrap\n */\n wrapClassName?: string;\n /**\n * Custom html ID for the blocks that uses wrap.\n */\n wrapId?: string;\n });\n\n/**\n * General microsite page props interface\n * Extend on each page if modification is needed\n */\nexport interface MicrositesPageProps {\n blocks: MicrositePageBlocks[];\n storeId?: GlobalStoreId;\n className?: string;\n}\n\nexport type MicrositesPageContextValue = {\n activeFullscreenType: MicrositeBlockType | null;\n setActiveFullscreenType: (type: MicrositeBlockType | null) => void;\n};\n"],"names":["MicrositeBlockType"],"mappings":";;AAkBY,IAAAA,kBAAA,GAAA,gBAAAA,mBAAL,IAAA;EACLA,oBAAA,MAAO,CAAA,GAAA,MAAA;EACPA,oBAAA,kBAAmB,CAAA,GAAA,oBAAA;EACnBA,oBAAA,cAAe,CAAA,GAAA,cAAA;EACfA,oBAAA,cAAe,CAAA,GAAA,eAAA;EACfA,oBAAA,WAAY,CAAA,GAAA,YAAA;EACZA,oBAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,oBAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,oBAAA,YAAa,CAAA,GAAA,YAAA;EACbA,oBAAA,SAAU,CAAA,GAAA,SAAA;EACVA,oBAAA,WAAY,CAAA,GAAA,YAAA;EACZA,oBAAA,SAAU,CAAA,GAAA,SAAA;EACVA,oBAAA,aAAc,CAAA,GAAA,cAAA;EACdA,oBAAA,kBAAmB,CAAA,GAAA,mBAAA;EACnBA,oBAAA,eAAgB,CAAA,GAAA,gBAAA;EAdNA,OAAAA,mBAAAA;AAAA,CAAA,EAAAA,kBAAA,IAAA,CAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"Microsites.types.mjs","sources":["../../../src/components/Microsites/Microsites.types.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type { StoreId } from \"../../types\";\nimport type {\n ExploreProductProps,\n ExploreSectionId,\n} from \"../Explore/ExploreData\";\nimport type { MicrositeColumnFeatureProgressBarProps } from \"../MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.types\";\nimport type { MicrositeFeatureChecklistProps } from \"../MicrositeFeatureChecklist\";\nimport type { MicrositeFeatureIconProps } from \"../MicrositeFeatureIcons/MicrositeFeatureIcons.types\";\nimport type { MicrositeFeatureListProps } from \"../MicrositeFeatureList/MicrositeFeatureList.types\";\nimport type { MicrositeHeroProps } from \"../MicrositeHero/MicrositeHero.types\";\nimport type { MicrositeIntroductionBlockProps } from \"../MicrositeIntroductionBlock/MicrositeIntroductionBlock.types\";\nimport type { MicrositeMediaGridProps } from \"../MicrositeMediaGrid/MicrositeMediaGrid.types\";\nimport type { MicrositeSubSubNavigationProps } from \"../MicrositeSubSubNavigation/MicrositeSubSubNavigation.types\";\nimport type { MicrositeVideoSlideshowProps } from \"../MicrositeVideoSlideshow/MicrositeVideoSlideshow.types\";\nimport type { ModelCompareV3SectionId } from \"../ModelCompareV3/data\";\n\nexport enum MicrositeBlockType {\n Hero = \"hero\",\n SubSubNavigation = \"sub-sub-navigation\",\n Introduction = \"introduction\",\n FeatureIcons = \"feature-icons\",\n MediaGrid = \"media-grid\",\n ColumnFeatures = \"column-features\",\n VideoSlideshow = \"video-slideshow\",\n Deployment = \"deployment\",\n Compare = \"compare\",\n CompareV3 = \"compare-v3\",\n Explore = \"explore\",\n FeatureList = \"feature-list\",\n FeatureChecklist = \"feature-checklist\",\n CustomContent = \"custom-content\",\n}\n\nexport interface HeroBlockProps {\n type: MicrositeBlockType.Hero;\n data: MicrositeHeroProps;\n wrapId?: string;\n}\n\ntype SectionWrapProps = {\n title?: ReactNode;\n subTitle?: string;\n action?: ReactNode;\n afterAction?: ReactNode;\n};\n\nexport interface IntroductionBlockProps {\n type: MicrositeBlockType.Introduction;\n data: SectionWrapProps & MicrositeIntroductionBlockProps;\n}\n\nexport interface FeatureIconsProps {\n type: MicrositeBlockType.FeatureIcons;\n data: MicrositeFeatureIconProps;\n}\n\nexport interface ColumnFeaturesProps {\n type: MicrositeBlockType.ColumnFeatures;\n data: MicrositeColumnFeatureProgressBarProps;\n}\n\nexport interface MediaGridBlockProps {\n type: MicrositeBlockType.MediaGrid;\n data: SectionWrapProps & MicrositeMediaGridProps;\n}\n\nexport interface VideoSlideshowProps {\n type: MicrositeBlockType.VideoSlideshow;\n data: MicrositeVideoSlideshowProps;\n}\n\nexport interface DeploymentSectionProps {\n type: MicrositeBlockType.Deployment;\n data: SectionWrapProps & {\n image: {\n src: string;\n width: number;\n height: number;\n };\n /** Removes max-width constrain */\n fullWidth?: boolean;\n };\n}\n\n// TODO: Remove V3 when V2 and V1 is deprecated\nexport interface CompareSectionV3Props {\n type: MicrositeBlockType.CompareV3;\n data: SectionWrapProps & {\n id: ModelCompareV3SectionId;\n };\n}\n\nexport interface ExploreSectionProps {\n type: MicrositeBlockType.Explore;\n data: SectionWrapProps &\n Pick<ExploreProductProps, \"flipped\"> & {\n exploreSectionId: ExploreSectionId;\n };\n}\n\nexport interface FeatureListProps {\n type: MicrositeBlockType.FeatureList;\n data: MicrositeFeatureListProps;\n}\n\nexport interface FeatureChecklistProps {\n type: MicrositeBlockType.FeatureChecklist;\n data: SectionWrapProps & MicrositeFeatureChecklistProps;\n}\n\nexport interface CustomContent {\n type: MicrositeBlockType.CustomContent;\n data: SectionWrapProps & { content: ReactNode };\n}\n\nexport interface MicrositeSubSubNavigation {\n type: MicrositeBlockType.SubSubNavigation;\n data: MicrositeSubSubNavigationProps;\n}\n\nexport type MicrositePageBlocks =\n | HeroBlockProps\n | ((\n | IntroductionBlockProps\n | MicrositeSubSubNavigation\n | FeatureIconsProps\n | ColumnFeaturesProps\n | FeatureListProps\n | MediaGridBlockProps\n | DeploymentSectionProps\n | CompareSectionV3Props\n | ExploreSectionProps\n | VideoSlideshowProps\n | FeatureChecklistProps\n | CustomContent\n ) & {\n /**\n * Custom class name for the blocks that uses wrap\n */\n wrapClassName?: string;\n /**\n * Custom html ID for the blocks that uses wrap.\n */\n wrapId?: string;\n });\n\n/**\n * General microsite page props interface\n * Extend on each page if modification is needed\n */\nexport interface MicrositesPageProps {\n blocks: MicrositePageBlocks[];\n storeId?: StoreId;\n className?: string;\n}\n\nexport type MicrositesPageContextValue = {\n activeFullscreenType: MicrositeBlockType | null;\n setActiveFullscreenType: (type: MicrositeBlockType | null) => void;\n};\n"],"names":["MicrositeBlockType"],"mappings":";;AAkBY,IAAAA,kBAAA,GAAA,gBAAAA,mBAAL,IAAA;EACLA,oBAAA,MAAO,CAAA,GAAA,MAAA;EACPA,oBAAA,kBAAmB,CAAA,GAAA,oBAAA;EACnBA,oBAAA,cAAe,CAAA,GAAA,cAAA;EACfA,oBAAA,cAAe,CAAA,GAAA,eAAA;EACfA,oBAAA,WAAY,CAAA,GAAA,YAAA;EACZA,oBAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,oBAAA,gBAAiB,CAAA,GAAA,iBAAA;EACjBA,oBAAA,YAAa,CAAA,GAAA,YAAA;EACbA,oBAAA,SAAU,CAAA,GAAA,SAAA;EACVA,oBAAA,WAAY,CAAA,GAAA,YAAA;EACZA,oBAAA,SAAU,CAAA,GAAA,SAAA;EACVA,oBAAA,aAAc,CAAA,GAAA,cAAA;EACdA,oBAAA,kBAAmB,CAAA,GAAA,mBAAA;EACnBA,oBAAA,eAAgB,CAAA,GAAA,gBAAA;EAdNA,OAAAA,mBAAAA;AAAA,CAAA,EAAAA,kBAAA,IAAA,CAAA,CAAA,CAAA;"}
@@ -1,7 +1,7 @@
1
1
  import type { StaticImageData } from "next/image";
2
2
  import type { ReactNode } from "react";
3
3
  import type { SiteUrl } from "../../contexts/MenuContext/mapping";
4
- import type { GlobalStoreId } from "../../types";
4
+ import type { StoreId } from "../../types";
5
5
  import type { BadgeVariants } from "../Badge/Badge.types";
6
6
  import type { en as EN_TRANSLATION } from "./translations";
7
7
  export type TranslationKey = keyof typeof EN_TRANSLATION;
@@ -511,19 +511,19 @@ export declare enum ProductGroupId {
511
511
  }
512
512
  type TranslationValue = {
513
513
  type: "translation";
514
- value: ((storeId: GlobalStoreId) => TranslationKey) | TranslationKey;
514
+ value: ((storeId: StoreId) => TranslationKey) | TranslationKey;
515
515
  };
516
516
  type StringValue = {
517
517
  type: "string";
518
- value: ((storeId: GlobalStoreId) => string) | string;
518
+ value: ((storeId: StoreId) => string) | string;
519
519
  };
520
520
  type BooleanValue = {
521
521
  type: "boolean";
522
- value: ((storeId: GlobalStoreId) => boolean) | boolean;
522
+ value: ((storeId: StoreId) => boolean) | boolean;
523
523
  };
524
524
  type CustomValue = {
525
525
  type: "custom";
526
- value: ((storeId: GlobalStoreId) => ReactNode) | ReactNode;
526
+ value: ((storeId: StoreId) => ReactNode) | ReactNode;
527
527
  };
528
528
  export type PropertyValue = {
529
529
  /**
@@ -564,7 +564,7 @@ export type Product = {
564
564
  /**
565
565
  * Renders "Buy Now" button
566
566
  */
567
- storePathParts?: StorePathParts | ((storeId: GlobalStoreId) => StorePathParts | undefined);
567
+ storePathParts?: StorePathParts | ((storeId: StoreId) => StorePathParts | undefined);
568
568
  /**
569
569
  * By sku (name) we can find product in the store
570
570
  */
@@ -580,8 +580,8 @@ export type Product = {
580
580
  *
581
581
  * Can be list of store IDs to show badge only for specific stores or `true` to show for all stores
582
582
  */
583
- isComingSoon?: GlobalStoreId[] | boolean;
584
- comingSoonButtonText?: TranslationKey | ((storeId: GlobalStoreId) => TranslationKey | undefined);
583
+ isComingSoon?: StoreId[] | boolean;
584
+ comingSoonButtonText?: TranslationKey | ((storeId: StoreId) => TranslationKey | undefined);
585
585
  /** Add "New" badge */
586
586
  isNew?: boolean;
587
587
  /**
@@ -602,7 +602,7 @@ export type Product = {
602
602
  /**
603
603
  * Footnotes
604
604
  */
605
- footnotes?: (TranslationKey | ((storeId: GlobalStoreId) => TranslationKey | undefined))[];
605
+ footnotes?: (TranslationKey | ((storeId: StoreId) => TranslationKey | undefined))[];
606
606
  productNote?: TranslationKey;
607
607
  };
608
608
  export type MutatedProduct = Omit<Product, "propertyValues" | "footnotes"> & {
@@ -3,24 +3,24 @@
3
3
  Object.defineProperty(exports, '__esModule', {
4
4
  value: true
5
5
  });
6
- var _externalAssets_C67ZjbP3 = require("../../../../assets/ai-pro.jpg");
6
+ var _externalAssets_DE_KEpbN = require("../../../../assets/ai-pro.jpg");
7
7
  function _interopDefault(e) {
8
8
  return e && e.__esModule ? e : {
9
9
  default: e
10
10
  };
11
11
  }
12
- var _externalAssets_C67ZjbP3__default = /*#__PURE__*/_interopDefault(_externalAssets_C67ZjbP3);
12
+ var _externalAssets_DE_KEpbN__default = /*#__PURE__*/_interopDefault(_externalAssets_DE_KEpbN);
13
13
  Object.defineProperty(exports, "default", {
14
14
  enumerable: true,
15
15
  get: function () {
16
- return _externalAssets_C67ZjbP3__default["default"];
16
+ return _externalAssets_DE_KEpbN__default["default"];
17
17
  }
18
18
  });
19
- Object.keys(_externalAssets_C67ZjbP3).forEach(function (k) {
19
+ Object.keys(_externalAssets_DE_KEpbN).forEach(function (k) {
20
20
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
21
21
  enumerable: true,
22
22
  get: function () {
23
- return _externalAssets_C67ZjbP3[k];
23
+ return _externalAssets_DE_KEpbN[k];
24
24
  }
25
25
  });
26
26
  });
@@ -3,24 +3,24 @@
3
3
  Object.defineProperty(exports, '__esModule', {
4
4
  value: true
5
5
  });
6
- var _externalAssets_Bj5Sy_P0 = require("../../../../assets/g5-pro.jpg");
6
+ var _externalAssets_Bhte2WyU = require("../../../../assets/g5-pro.jpg");
7
7
  function _interopDefault(e) {
8
8
  return e && e.__esModule ? e : {
9
9
  default: e
10
10
  };
11
11
  }
12
- var _externalAssets_Bj5Sy_P0__default = /*#__PURE__*/_interopDefault(_externalAssets_Bj5Sy_P0);
12
+ var _externalAssets_Bhte2WyU__default = /*#__PURE__*/_interopDefault(_externalAssets_Bhte2WyU);
13
13
  Object.defineProperty(exports, "default", {
14
14
  enumerable: true,
15
15
  get: function () {
16
- return _externalAssets_Bj5Sy_P0__default["default"];
16
+ return _externalAssets_Bhte2WyU__default["default"];
17
17
  }
18
18
  });
19
- Object.keys(_externalAssets_Bj5Sy_P0).forEach(function (k) {
19
+ Object.keys(_externalAssets_Bhte2WyU).forEach(function (k) {
20
20
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
21
21
  enumerable: true,
22
22
  get: function () {
23
- return _externalAssets_Bj5Sy_P0[k];
23
+ return _externalAssets_Bhte2WyU[k];
24
24
  }
25
25
  });
26
26
  });