@ubnt/store.core 9.20.0-alpha.4 → 9.20.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/lib/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- package/lib/assets/ucgMax.jpg +0 -0
- package/lib/assets/ucgMax2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
- package/lib/components/MicrositeHeader/MicrositeHeader.js +7 -14
- package/lib/components/MicrositeHeader/MicrositeHeader.js.map +1 -1
- package/lib/components/MicrositeHeader/MicrositeHeader.mjs +8 -15
- package/lib/components/MicrositeHeader/MicrositeHeader.mjs.map +1 -1
- package/lib/components/MicrositeHeader/components/DropdownMenu/index.js +6 -0
- package/lib/components/MicrositeHeader/components/DropdownMenu/index.mjs +3 -0
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.js +155 -0
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.js.map +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.mjs +145 -0
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.mjs.map +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.js +174 -0
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.js.map +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.mjs +155 -0
- package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.mjs.map +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.js +45 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.js.map +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.mjs +37 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.mjs.map +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.js +6 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.mjs +3 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.js +113 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.js.map +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.mjs +111 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.mjs.map +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.js +6 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.js.map +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.mjs +3 -0
- package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.mjs.map +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/index.js +6 -0
- package/lib/components/MicrositeHeader/components/Navigation/index.js.map +1 -0
- package/lib/components/MicrositeHeader/components/Navigation/index.mjs +3 -0
- package/lib/components/MicrositeHeader/components/Navigation/index.mjs.map +1 -0
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +9 -9
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/constants/icons/options/colors/black.svg.js +5 -5
- package/lib/constants/icons/options/colors/index.js +3 -3
- package/lib/constants/icons/options/styles/black.svg.js +5 -5
- package/lib/constants/icons/options/styles/index.js +3 -3
- package/lib/constants/optionIcons.js +6 -6
- package/lib/constants/optionIcons.mjs +4 -4
- package/package.json +1 -1
- package/lib/components/MicrositeHeader/MicrositeHeader.styles.js +0 -29
- package/lib/components/MicrositeHeader/MicrositeHeader.styles.js.map +0 -1
- package/lib/components/MicrositeHeader/MicrositeHeader.styles.mjs +0 -20
- package/lib/components/MicrositeHeader/MicrositeHeader.styles.mjs.map +0 -1
- package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.js +0 -209
- package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.js.map +0 -1
- package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.mjs +0 -198
- package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.mjs.map +0 -1
- package/lib/components/MicrositeHeader/components/FirstLevelMenu/index.js +0 -6
- package/lib/components/MicrositeHeader/components/FirstLevelMenu/index.mjs +0 -3
- package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.js +0 -71
- package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.js.map +0 -1
- package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.mjs +0 -69
- package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.mjs.map +0 -1
- package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.styles.js +0 -104
- package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.styles.js.map +0 -1
- package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.styles.mjs +0 -89
- package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.styles.mjs.map +0 -1
- package/lib/components/MicrositeHeader/components/SecondLevelMenu/index.js +0 -6
- package/lib/components/MicrositeHeader/components/SecondLevelMenu/index.mjs +0 -3
- /package/lib/components/MicrositeHeader/components/{FirstLevelMenu → DropdownMenu}/index.js.map +0 -0
- /package/lib/components/MicrositeHeader/components/{FirstLevelMenu → DropdownMenu}/index.mjs.map +0 -0
- /package/lib/components/MicrositeHeader/components/{SecondLevelMenu → Navigation/_components/NavigationItem}/index.js.map +0 -0
- /package/lib/components/MicrositeHeader/components/{SecondLevelMenu → Navigation/_components/NavigationItem}/index.mjs.map +0 -0
package/CHANGELOG.md
CHANGED
package/lib/assets/close2.svg
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.2175 18.6475C4.9275 18.9375 4.9275 19.4175 5.2175 19.7075C5.5075 19.9975 5.9875 19.9975 6.2775 19.7075L12.4675 13.5175L18.6575 19.7075C18.9475 19.9975 19.4275 19.9975 19.7175 19.7075C20.0075 19.4175 20.0075 18.9375 19.7175 18.6475L13.5275 12.4675L19.7175 6.2775C20.0075 5.9875 20.0075 5.5075 19.7175 5.2175C19.4275 4.9275 18.9475 4.9275 18.6575 5.2175L12.4675 11.4075L6.2775 5.2175C5.9875 4.9275 5.5075 4.9275 5.2175 5.2175C4.9275 5.5075 4.9275 5.9875 5.2175 6.2775L11.4075 12.4675L5.2175 18.6475Z" fill="currentColor"/>
|
|
1
|
+
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.7175 18.6475C5.4275 18.9375 5.4275 19.4175 5.7175 19.7075C6.0075 19.9975 6.4875 19.9975 6.7775 19.7075L12.9675 13.5175L19.1575 19.7075C19.4475 19.9975 19.9275 19.9975 20.2175 19.7075C20.5075 19.4175 20.5075 18.9375 20.2175 18.6475L14.0275 12.4675L20.2175 6.2775C20.5075 5.9875 20.5075 5.5075 20.2175 5.2175C19.9275 4.9275 19.4475 4.9275 19.1575 5.2175L12.9675 11.4075L6.7775 5.2175C6.4875 4.9275 6.0075 4.9275 5.7175 5.2175C5.4275 5.5075 5.4275 5.9875 5.7175 6.2775L11.9075 12.4675L5.7175 18.6475Z" fill="#36373C"/>
|
|
4
3
|
</svg>
|
package/lib/assets/close3.svg
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.2175 18.6475C4.9275 18.9375 4.9275 19.4175 5.2175 19.7075C5.5075 19.9975 5.9875 19.9975 6.2775 19.7075L12.4675 13.5175L18.6575 19.7075C18.9475 19.9975 19.4275 19.9975 19.7175 19.7075C20.0075 19.4175 20.0075 18.9375 19.7175 18.6475L13.5275 12.4675L19.7175 6.2775C20.0075 5.9875 20.0075 5.5075 19.7175 5.2175C19.4275 4.9275 18.9475 4.9275 18.6575 5.2175L12.4675 11.4075L6.2775 5.2175C5.9875 4.9275 5.5075 4.9275 5.2175 5.2175C4.9275 5.5075 4.9275 5.9875 5.2175 6.2775L11.4075 12.4675L5.2175 18.6475Z" fill="currentColor"/>
|
|
3
4
|
</svg>
|
package/lib/assets/ucgMax.jpg
CHANGED
|
Binary file
|
package/lib/assets/ucgMax2.jpg
CHANGED
|
Binary file
|
package/lib/assets/udmProMax.jpg
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -14,7 +14,7 @@ var FeaturesSection_styles = require('./FeaturesSection.styles.js');
|
|
|
14
14
|
var useLockBodyScrollCustom = require('../../hooks/useLockBodyScrollCustom.js');
|
|
15
15
|
var Container = require('../Container/Container.js');
|
|
16
16
|
var StyleableSvgImage = require('../StyleableSvgImage/StyleableSvgImage.js');
|
|
17
|
-
var CloseSvg = require("../../assets/
|
|
17
|
+
var CloseSvg = require("../../assets/close3.svg");
|
|
18
18
|
function _interopDefault(e) {
|
|
19
19
|
return e && e.__esModule ? e : {
|
|
20
20
|
default: e
|
|
@@ -12,7 +12,7 @@ import { WrapOuter, OverlayWrap, OverlayClose, Wrap, MetaWrap, SubHeading, Headi
|
|
|
12
12
|
import { useLockBodyScrollCustom } from '../../hooks/useLockBodyScrollCustom.mjs';
|
|
13
13
|
import { Container } from '../Container/Container.mjs';
|
|
14
14
|
import { StyleableSvgImage } from '../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
15
|
-
import CloseSvg__default from "../../assets/
|
|
15
|
+
import CloseSvg__default from "../../assets/close3.svg";
|
|
16
16
|
"use strict";
|
|
17
17
|
const FEATURES_DEFAULT_PLAYBACK = 500;
|
|
18
18
|
const parseTime = time => parseFloat(time.toFixed(3));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../assets/
|
|
2
|
-
export { default } from "../../../assets/
|
|
1
|
+
export * from "../../../assets/close3.svg";
|
|
2
|
+
export { default } from "../../../assets/close3.svg";
|
|
3
3
|
//# sourceMappingURL=close.svg.mjs.map
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
require('../../contexts/MicrositeMenuContext/index.js');
|
|
6
|
-
require('./components/
|
|
7
|
-
var MicrositeHeader_styles = require('./MicrositeHeader.styles.js');
|
|
6
|
+
require('./components/Navigation/index.js');
|
|
8
7
|
var context = require('../../contexts/MicrositeMenuContext/context.js');
|
|
9
|
-
var
|
|
8
|
+
var Navigation = require('./components/Navigation/Navigation.js');
|
|
10
9
|
"use strict";
|
|
11
10
|
const MicrositeHeader = ({
|
|
12
11
|
onMenuItemClick,
|
|
@@ -18,17 +17,11 @@ const MicrositeHeader = ({
|
|
|
18
17
|
const firstLevelItems = react.useMemo(() => menu.items, [menu.items]);
|
|
19
18
|
const firstLevelActiveItem = react.useMemo(() => firstLevelItems?.find(item => item.active), [firstLevelItems]);
|
|
20
19
|
const secondLevelItems = react.useMemo(() => firstLevelActiveItem?.variant !== "dropdown" ? firstLevelActiveItem?.items : void 0, [firstLevelActiveItem]);
|
|
21
|
-
return /* @__PURE__ */jsxRuntime.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
isLastMenu: !secondLevelItems?.length
|
|
27
|
-
}), secondLevelItems?.length && /* @__PURE__ */jsxRuntime.jsx(SecondLevelMenu.SecondLevelMenu, {
|
|
28
|
-
items: secondLevelItems,
|
|
29
|
-
groups: firstLevelActiveItem?.groups,
|
|
30
|
-
onMenuItemClick
|
|
31
|
-
})]
|
|
20
|
+
return /* @__PURE__ */jsxRuntime.jsx(Navigation.Navigation, {
|
|
21
|
+
menu,
|
|
22
|
+
onLanguageChange,
|
|
23
|
+
onMenuItemClick,
|
|
24
|
+
isLastMenu: !secondLevelItems?.length
|
|
32
25
|
});
|
|
33
26
|
};
|
|
34
27
|
exports.MicrositeHeader = MicrositeHeader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MicrositeHeader.js","sources":["../../../src/components/MicrositeHeader/MicrositeHeader.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { useMicrositeMenu } from \"../../contexts/MicrositeMenuContext\";\nimport { SecondLevelMenu } from \"./components/SecondLevelMenu\";\
|
|
1
|
+
{"version":3,"file":"MicrositeHeader.js","sources":["../../../src/components/MicrositeHeader/MicrositeHeader.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { useMicrositeMenu } from \"../../contexts/MicrositeMenuContext\";\nimport { Navigation } from \"./components/Navigation\";\n// import { SecondLevelMenu } from \"./components/SecondLevelMenu\";\n// import * as S from \"./MicrositeHeader.styles\";\nimport type { MicrositeHeaderProps } from \"./MicrositeHeader.types\";\n\nexport const MicrositeHeader = ({\n onMenuItemClick,\n onLanguageChange,\n}: MicrositeHeaderProps) => {\n const { menu } = useMicrositeMenu();\n\n // #############################################################################\n // Level items\n // #############################################################################\n const firstLevelItems = useMemo(() => menu.items, [menu.items]);\n\n const firstLevelActiveItem = useMemo(\n () => firstLevelItems?.find((item) => item.active),\n [firstLevelItems],\n );\n\n const secondLevelItems = useMemo(\n () =>\n firstLevelActiveItem?.variant !== \"dropdown\"\n ? firstLevelActiveItem?.items\n : undefined,\n [firstLevelActiveItem],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <Navigation\n menu={menu}\n onLanguageChange={onLanguageChange}\n onMenuItemClick={onMenuItemClick}\n isLastMenu={!secondLevelItems?.length}\n />\n );\n};\n"],"names":["MicrositeHeader","onMenuItemClick","onLanguageChange","menu","useMicrositeMenu","firstLevelItems","useMemo","items","firstLevelActiveItem","find","item","active","secondLevelItems","variant","jsx","Navigation","isLastMenu","length"],"mappings":";;;;;;;;;AAQO,MAAMA,kBAAkBA,CAAC;EAC9BC,eAAA;EACAC;AACF,CAA4B,KAAA;EACpB,MAAA;IAAEC;GAAK,GAAIC,OAAAA,CAAAA,gBAAiB,EAAA;EAK5B,MAAAC,eAAA,GAAkBC,cAAQ,MAAMH,IAAA,CAAKI,OAAO,CAACJ,IAAA,CAAKI,KAAK,CAAC,CAAA;EAE9D,MAAMC,oBAAuB,GAAAF,KAAA,CAAAA,OAAA,CAC3B,MAAMD,eAAiB,EAAAI,IAAA,CAAMC,IAAA,IAASA,KAAKC,MAAM,CAAA,EACjD,CAACN,eAAe,CAAA,CAClB;EAEA,MAAMO,gBAAmB,GAAAN,KAAA,CAAAA,OAAA,CACvB,MACEE,oBAAA,EAAsBK,OAAY,KAAA,UAAA,GAC9BL,sBAAsBD,KACtB,GAAA,KAAA,CAAA,EACN,CAACC,oBAAoB,CAAA,CACvB;EAME,sBAAAM,UAAA,CAAAA,GAAA,CAACC,UAAA,CAAAA,UAAA,EAAA;IACCZ,IAAA;IACAD,gBAAA;IACAD,eAAA;IACAe,UAAA,EAAY,CAACJ,gBAAkB,EAAAK;EAAA,CAAA,CACjC;AAEJ,CAAA;"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import '../../contexts/MicrositeMenuContext/index.mjs';
|
|
4
|
-
import './components/
|
|
5
|
-
import { HeaderWrap, FirstLevelMenu } from './MicrositeHeader.styles.mjs';
|
|
4
|
+
import './components/Navigation/index.mjs';
|
|
6
5
|
import { useMicrositeMenu } from '../../contexts/MicrositeMenuContext/context.mjs';
|
|
7
|
-
import {
|
|
6
|
+
import { Navigation } from './components/Navigation/Navigation.mjs';
|
|
8
7
|
"use strict";
|
|
9
8
|
const MicrositeHeader = ({
|
|
10
9
|
onMenuItemClick,
|
|
@@ -16,17 +15,11 @@ const MicrositeHeader = ({
|
|
|
16
15
|
const firstLevelItems = useMemo(() => menu.items, [menu.items]);
|
|
17
16
|
const firstLevelActiveItem = useMemo(() => firstLevelItems?.find(item => item.active), [firstLevelItems]);
|
|
18
17
|
const secondLevelItems = useMemo(() => firstLevelActiveItem?.variant !== "dropdown" ? firstLevelActiveItem?.items : void 0, [firstLevelActiveItem]);
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
isLastMenu: !secondLevelItems?.length
|
|
25
|
-
}), secondLevelItems?.length && /* @__PURE__ */jsx(SecondLevelMenu, {
|
|
26
|
-
items: secondLevelItems,
|
|
27
|
-
groups: firstLevelActiveItem?.groups,
|
|
28
|
-
onMenuItemClick
|
|
29
|
-
})]
|
|
18
|
+
return /* @__PURE__ */jsx(Navigation, {
|
|
19
|
+
menu,
|
|
20
|
+
onLanguageChange,
|
|
21
|
+
onMenuItemClick,
|
|
22
|
+
isLastMenu: !secondLevelItems?.length
|
|
30
23
|
});
|
|
31
24
|
};
|
|
32
25
|
export { MicrositeHeader };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MicrositeHeader.mjs","sources":["../../../src/components/MicrositeHeader/MicrositeHeader.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { useMicrositeMenu } from \"../../contexts/MicrositeMenuContext\";\nimport { SecondLevelMenu } from \"./components/SecondLevelMenu\";\
|
|
1
|
+
{"version":3,"file":"MicrositeHeader.mjs","sources":["../../../src/components/MicrositeHeader/MicrositeHeader.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { useMicrositeMenu } from \"../../contexts/MicrositeMenuContext\";\nimport { Navigation } from \"./components/Navigation\";\n// import { SecondLevelMenu } from \"./components/SecondLevelMenu\";\n// import * as S from \"./MicrositeHeader.styles\";\nimport type { MicrositeHeaderProps } from \"./MicrositeHeader.types\";\n\nexport const MicrositeHeader = ({\n onMenuItemClick,\n onLanguageChange,\n}: MicrositeHeaderProps) => {\n const { menu } = useMicrositeMenu();\n\n // #############################################################################\n // Level items\n // #############################################################################\n const firstLevelItems = useMemo(() => menu.items, [menu.items]);\n\n const firstLevelActiveItem = useMemo(\n () => firstLevelItems?.find((item) => item.active),\n [firstLevelItems],\n );\n\n const secondLevelItems = useMemo(\n () =>\n firstLevelActiveItem?.variant !== \"dropdown\"\n ? firstLevelActiveItem?.items\n : undefined,\n [firstLevelActiveItem],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <Navigation\n menu={menu}\n onLanguageChange={onLanguageChange}\n onMenuItemClick={onMenuItemClick}\n isLastMenu={!secondLevelItems?.length}\n />\n );\n};\n"],"names":["MicrositeHeader","onMenuItemClick","onLanguageChange","menu","useMicrositeMenu","firstLevelItems","useMemo","items","firstLevelActiveItem","find","item","active","secondLevelItems","variant","jsx","Navigation","isLastMenu","length"],"mappings":";;;;;;;AAQO,MAAMA,kBAAkBA,CAAC;EAC9BC,eAAA;EACAC;AACF,CAA4B,KAAA;EACpB,MAAA;IAAEC;GAAK,GAAIC,gBAAiB,EAAA;EAK5B,MAAAC,eAAA,GAAkBC,QAAQ,MAAMH,IAAA,CAAKI,OAAO,CAACJ,IAAA,CAAKI,KAAK,CAAC,CAAA;EAE9D,MAAMC,oBAAuB,GAAAF,OAAA,CAC3B,MAAMD,eAAiB,EAAAI,IAAA,CAAMC,IAAA,IAASA,KAAKC,MAAM,CAAA,EACjD,CAACN,eAAe,CAAA,CAClB;EAEA,MAAMO,gBAAmB,GAAAN,OAAA,CACvB,MACEE,oBAAA,EAAsBK,OAAY,KAAA,UAAA,GAC9BL,sBAAsBD,KACtB,GAAA,KAAA,CAAA,EACN,CAACC,oBAAoB,CAAA,CACvB;EAME,sBAAAM,GAAA,CAACC,UAAA,EAAA;IACCZ,IAAA;IACAD,gBAAA;IACAD,eAAA;IACAe,UAAA,EAAY,CAACJ,gBAAkB,EAAAK;EAAA,CAAA,CACjC;AAEJ,CAAA;"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
require('../../../../constants/icons/header/index.js');
|
|
6
|
+
var url = require('../../../../constants/url.js');
|
|
7
|
+
require('../../../../contexts/MenuContext/index.js');
|
|
8
|
+
var mapping = require('../../../../contexts/MenuContext/mapping.js');
|
|
9
|
+
require('../../../../contexts/MicrositeMenuContext/index.js');
|
|
10
|
+
var types = require('../../../../contexts/MicrositeMenuContext/types.js');
|
|
11
|
+
var Header_styles = require('../../../Header/Header.styles.js');
|
|
12
|
+
var MenuItem = require('../../../Header/MenuItem/MenuItem.js');
|
|
13
|
+
require('../../../StyleableSvgImage/index.js');
|
|
14
|
+
require('../DropdownMenu/index.js');
|
|
15
|
+
require('./_components/NavigationItem/index.js');
|
|
16
|
+
require('./_components/SubNavigation/index.js');
|
|
17
|
+
var Navigation_styles = require('./Navigation.styles.js');
|
|
18
|
+
var context = require('../../../../contexts/MicrositeMenuContext/context.js');
|
|
19
|
+
var context$1 = require('../../../../contexts/MenuContext/context.js');
|
|
20
|
+
var StyleableSvgImage = require('../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
21
|
+
var logoUnifi = require("../../../../assets/logoUnifi.svg");
|
|
22
|
+
var NavigationItem = require('./_components/NavigationItem/NavigationItem.js');
|
|
23
|
+
var DropdownMenu = require('../DropdownMenu/DropdownMenu.js');
|
|
24
|
+
var SubNavigation = require('./_components/SubNavigation/SubNavigation.js');
|
|
25
|
+
var globe = require("../../../../assets/globe.svg");
|
|
26
|
+
var accountLogo = require("../../../../assets/account.svg");
|
|
27
|
+
function _interopDefault(e) {
|
|
28
|
+
return e && e.__esModule ? e : {
|
|
29
|
+
default: e
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
var logoUnifi__default = /*#__PURE__*/_interopDefault(logoUnifi);
|
|
33
|
+
var globe__default = /*#__PURE__*/_interopDefault(globe);
|
|
34
|
+
var accountLogo__default = /*#__PURE__*/_interopDefault(accountLogo);
|
|
35
|
+
"use strict";
|
|
36
|
+
var Motif = /* @__PURE__ */(Motif2 => {
|
|
37
|
+
Motif2["Dark"] = "dark";
|
|
38
|
+
Motif2["Light"] = "light";
|
|
39
|
+
return Motif2;
|
|
40
|
+
})(Motif || {});
|
|
41
|
+
const Navigation = ({
|
|
42
|
+
menu,
|
|
43
|
+
onModalOpen,
|
|
44
|
+
// onLanguageChange,
|
|
45
|
+
onMenuItemClick,
|
|
46
|
+
// className,
|
|
47
|
+
account
|
|
48
|
+
// isLastMenu,
|
|
49
|
+
}) => {
|
|
50
|
+
const wrapperRef = react.useRef(null);
|
|
51
|
+
const [hasScrollOffset, setHasScrollOffset] = react.useState(false);
|
|
52
|
+
const {
|
|
53
|
+
activeModal,
|
|
54
|
+
setActiveModal
|
|
55
|
+
} = context.useMicrositeMenu();
|
|
56
|
+
const {
|
|
57
|
+
createSiteUrl
|
|
58
|
+
} = context$1.useMenu();
|
|
59
|
+
const [selectedMenu, setSelectedMenu] = react.useState(null);
|
|
60
|
+
const motif = react.useMemo(() => {
|
|
61
|
+
return hasScrollOffset || !!selectedMenu ? "dark" /* Dark */ : "light" /* Light */;
|
|
62
|
+
}, [hasScrollOffset, selectedMenu]);
|
|
63
|
+
react.useEffect(() => {
|
|
64
|
+
if (!wrapperRef?.current) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const observer = new IntersectionObserver(([entry]) => setHasScrollOffset(!entry?.isIntersecting), {
|
|
68
|
+
rootMargin: "-48px 0px 0px"
|
|
69
|
+
});
|
|
70
|
+
observer.observe(wrapperRef.current);
|
|
71
|
+
return () => {
|
|
72
|
+
observer.disconnect();
|
|
73
|
+
};
|
|
74
|
+
}, []);
|
|
75
|
+
const handleModalOpen = react.useCallback((e, id) => {
|
|
76
|
+
e.stopPropagation();
|
|
77
|
+
if (activeModal !== id) {
|
|
78
|
+
onModalOpen?.();
|
|
79
|
+
}
|
|
80
|
+
setActiveModal(activeModal === id ? null : id);
|
|
81
|
+
}, [activeModal, setActiveModal, onModalOpen]);
|
|
82
|
+
return /* @__PURE__ */jsxRuntime.jsx(Navigation_styles.Container, {
|
|
83
|
+
ref: wrapperRef,
|
|
84
|
+
children: /* @__PURE__ */jsxRuntime.jsx(Navigation_styles.Wrap, {
|
|
85
|
+
$isLastMenu: true,
|
|
86
|
+
$hasScrollOffset: hasScrollOffset || !!selectedMenu,
|
|
87
|
+
children: /* @__PURE__ */jsxRuntime.jsxs(Navigation_styles.InnerWrap, {
|
|
88
|
+
children: [/* @__PURE__ */jsxRuntime.jsxs(Navigation_styles.LeftWrap, {
|
|
89
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(Navigation_styles.LogoAnchor, {
|
|
90
|
+
$motif: motif,
|
|
91
|
+
href: menu?.url ?? "",
|
|
92
|
+
onClick: e => onMenuItemClick?.(e, menu?.url ?? ""),
|
|
93
|
+
children: /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
|
|
94
|
+
src: logoUnifi__default["default"],
|
|
95
|
+
width: 46,
|
|
96
|
+
height: 14
|
|
97
|
+
})
|
|
98
|
+
}), /* @__PURE__ */jsxRuntime.jsxs(Navigation_styles.ItemsWrap, {
|
|
99
|
+
onMouseLeave: () => setSelectedMenu(null),
|
|
100
|
+
children: [(menu?.items ?? []).map((item, index) => /* @__PURE__ */jsxRuntime.jsx(NavigationItem.NavigationItem, {
|
|
101
|
+
item,
|
|
102
|
+
theme: motif,
|
|
103
|
+
isActive: item.id === selectedMenu?.id,
|
|
104
|
+
onMouseEnter: () => setSelectedMenu(item ?? null)
|
|
105
|
+
}, `${item.id}-${item.label}-${index}`)), selectedMenu?.variant === "dropdown" ? /* @__PURE__ */jsxRuntime.jsx(DropdownMenu.DropdownMenu, {
|
|
106
|
+
items: selectedMenu?.items ?? [],
|
|
107
|
+
show: !!selectedMenu?.id,
|
|
108
|
+
onMenuItemClick,
|
|
109
|
+
onClose: () => setSelectedMenu(null)
|
|
110
|
+
}) : /* @__PURE__ */jsxRuntime.jsx(SubNavigation.SubNavigation, {
|
|
111
|
+
items: selectedMenu?.items ?? [],
|
|
112
|
+
show: !!selectedMenu?.id
|
|
113
|
+
})]
|
|
114
|
+
})]
|
|
115
|
+
}), /* @__PURE__ */jsxRuntime.jsxs(Navigation_styles.RightWrap, {
|
|
116
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(Navigation_styles.RightItem, {
|
|
117
|
+
href: url.ExternalUrl.SUPPORT,
|
|
118
|
+
$motif: motif,
|
|
119
|
+
children: "Support"
|
|
120
|
+
}), /* @__PURE__ */jsxRuntime.jsx(MenuItem.MenuButton, {
|
|
121
|
+
href: createSiteUrl([mapping.SiteId.Store, "/"]),
|
|
122
|
+
hideOnMobile: true,
|
|
123
|
+
motif: "light",
|
|
124
|
+
dataTestId: "support-btn",
|
|
125
|
+
openInNewTab: true,
|
|
126
|
+
children: "Store"
|
|
127
|
+
}), /* @__PURE__ */jsxRuntime.jsx(Navigation_styles.ActionIcon, {
|
|
128
|
+
"aria-hidden": "true",
|
|
129
|
+
$motif: motif,
|
|
130
|
+
onClick: e => handleModalOpen(e, types.ModalId.Language),
|
|
131
|
+
children: /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
|
|
132
|
+
src: globe__default["default"],
|
|
133
|
+
width: 20,
|
|
134
|
+
height: 19,
|
|
135
|
+
renderedHeight: 18
|
|
136
|
+
})
|
|
137
|
+
}), account?.loading ? /* @__PURE__ */jsxRuntime.jsx(Header_styles.SkeletonCircleLoader, {
|
|
138
|
+
diameter: 18
|
|
139
|
+
}) : /* @__PURE__ */jsxRuntime.jsx(Navigation_styles.ActionIcon, {
|
|
140
|
+
"aria-hidden": "true",
|
|
141
|
+
$motif: motif,
|
|
142
|
+
onClick: e => handleModalOpen(e, types.ModalId.Account),
|
|
143
|
+
children: /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
|
|
144
|
+
src: accountLogo__default["default"],
|
|
145
|
+
width: 18,
|
|
146
|
+
height: 19
|
|
147
|
+
})
|
|
148
|
+
})]
|
|
149
|
+
})]
|
|
150
|
+
})
|
|
151
|
+
})
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
exports.Navigation = Navigation;
|
|
155
|
+
//# sourceMappingURL=Navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Navigation.js","sources":["../../../../../src/components/MicrositeHeader/components/Navigation/Navigation.tsx"],"sourcesContent":["import type React from \"react\";\nimport { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\n\nimport {\n account as accountLogo,\n globe,\n logoUnifi,\n} from \"../../../../../src/constants/icons/header\";\nimport { ExternalUrl } from \"../../../../constants/url\";\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { SiteId } from \"../../../../contexts/MenuContext/mapping\";\nimport { useMicrositeMenu } from \"../../../../contexts/MicrositeMenuContext\";\nimport {\n ModalId,\n type ParsedMicrositeHeaderItem,\n} from \"../../../../contexts/MicrositeMenuContext/types\";\nimport { SkeletonCircleLoader } from \"../../../Header/Header.styles\";\nimport { MenuButton } from \"../../../Header/MenuItem/MenuItem\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport { DropdownMenu } from \"../DropdownMenu\";\nimport type { FirstLevelMenuProps } from \"../FirstLevelMenu/FirstLevelMenu.types\";\nimport { NavigationItem } from \"./_components/NavigationItem\";\nimport { SubNavigation } from \"./_components/SubNavigation\";\nimport * as S from \"./Navigation.styles\";\n\nenum Motif {\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport const Navigation: React.FC<FirstLevelMenuProps> = ({\n menu,\n onModalOpen,\n // onLanguageChange,\n onMenuItemClick,\n // className,\n account,\n // isLastMenu,\n}) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n\n const [hasScrollOffset, setHasScrollOffset] = useState(false);\n const { activeModal, setActiveModal } = useMicrositeMenu();\n const { createSiteUrl } = useMenu();\n\n const [selectedMenu, setSelectedMenu] =\n useState<ParsedMicrositeHeaderItem | null>(null);\n\n const motif = useMemo<Motif>(() => {\n return hasScrollOffset || !!selectedMenu ? Motif.Dark : Motif.Light;\n }, [hasScrollOffset, selectedMenu]);\n\n useEffect(() => {\n if (!wrapperRef?.current) {\n return;\n }\n\n const observer = new IntersectionObserver(\n ([entry]) => setHasScrollOffset(!entry?.isIntersecting ?? true),\n { rootMargin: \"-48px 0px 0px\" },\n );\n\n observer.observe(wrapperRef.current);\n\n return () => {\n observer.disconnect();\n };\n }, []);\n\n // const handleModalClose = useCallback(() => {\n // setActiveModal(null);\n // }, [setActiveModal]);\n\n const handleModalOpen = useCallback(\n (e: React.MouseEvent<HTMLElement>, id: ModalId) => {\n e.stopPropagation();\n\n // Callback to for example remove all toasts on modal open\n if (activeModal !== id) {\n onModalOpen?.();\n }\n\n setActiveModal(activeModal === id ? null : id);\n },\n [activeModal, setActiveModal, onModalOpen],\n );\n\n return (\n <S.Container ref={wrapperRef}>\n <S.Wrap $isLastMenu $hasScrollOffset={hasScrollOffset || !!selectedMenu}>\n <S.InnerWrap>\n <S.LeftWrap>\n <S.LogoAnchor\n $motif={motif}\n href={menu?.url ?? \"\"}\n onClick={(e) => onMenuItemClick?.(e, menu?.url ?? \"\")}\n >\n <StyleableSvgImage src={logoUnifi} width={46} height={14} />\n </S.LogoAnchor>\n\n <S.ItemsWrap onMouseLeave={() => setSelectedMenu(null)}>\n {(menu?.items ?? []).map((item, index) => (\n <NavigationItem\n key={`${item.id}-${item.label}-${index}`}\n item={item}\n theme={motif}\n isActive={item.id === selectedMenu?.id}\n onMouseEnter={() => setSelectedMenu(item ?? null)}\n />\n ))}\n\n {selectedMenu?.variant === \"dropdown\" ? (\n <DropdownMenu\n items={selectedMenu?.items ?? []}\n show={!!selectedMenu?.id}\n onMenuItemClick={onMenuItemClick}\n onClose={() => setSelectedMenu(null)}\n />\n ) : (\n <SubNavigation\n items={selectedMenu?.items ?? []}\n show={!!selectedMenu?.id}\n />\n )}\n </S.ItemsWrap>\n </S.LeftWrap>\n <S.RightWrap>\n <S.RightItem href={ExternalUrl.SUPPORT} $motif={motif}>\n Support\n </S.RightItem>\n <MenuButton\n href={createSiteUrl([SiteId.Store, \"/\"])}\n hideOnMobile\n motif={\"light\"}\n dataTestId=\"support-btn\"\n // Special request by Sam to open the link in new tab - only on ui.com/uisp.com microsites\n openInNewTab={true}\n >\n {/* TODO: Translate */}\n Store\n </MenuButton>\n <S.ActionIcon\n aria-hidden=\"true\"\n $motif={motif}\n onClick={(e) => handleModalOpen(e, ModalId.Language)}\n >\n <StyleableSvgImage\n src={globe}\n width={20}\n height={19}\n renderedHeight={18}\n />\n </S.ActionIcon>\n {account?.loading ? (\n <SkeletonCircleLoader diameter={18} />\n ) : (\n <S.ActionIcon\n aria-hidden=\"true\"\n $motif={motif}\n onClick={(e) => handleModalOpen(e, ModalId.Account)}\n >\n <StyleableSvgImage src={accountLogo} width={18} height={19} />\n </S.ActionIcon>\n )}\n </S.RightWrap>\n </S.InnerWrap>\n </S.Wrap>\n </S.Container>\n );\n};\n"],"names":["Motif","Navigation","menu","onModalOpen","onMenuItemClick","account","wrapperRef","useRef","hasScrollOffset","setHasScrollOffset","useState","activeModal","setActiveModal","useMicrositeMenu","createSiteUrl","useMenu","selectedMenu","setSelectedMenu","motif","useMemo","useEffect","current","observer","IntersectionObserver","entry","isIntersecting","rootMargin","observe","disconnect","handleModalOpen","useCallback","e","id","stopPropagation","jsx","S.Container","Container","ref","children","S.Wrap","$isLastMenu","$hasScrollOffset","jsxs","S.InnerWrap","S.LeftWrap","S.LogoAnchor","LogoAnchor","$motif","href","url","onClick","StyleableSvgImage","src","logoUnifi","width","height","S.ItemsWrap","ItemsWrap","onMouseLeave","items","map","item","index","NavigationItem","theme","isActive","onMouseEnter","label","variant","DropdownMenu","show","onClose","SubNavigation","S.RightWrap","S.RightItem","ExternalUrl","SUPPORT","MenuButton","SiteId","Store","hideOnMobile","dataTestId","openInNewTab","S.ActionIcon","ActionIcon","ModalId","Language","globe","renderedHeight","loading","SkeletonCircleLoader","diameter","Account","accountLogo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAKA,KAAA,GAAA,gBAAAA,MAAL,IAAA;EACEA,OAAA,MAAO,CAAA,GAAA,MAAA;EACPA,OAAA,OAAQ,CAAA,GAAA,OAAA;EAFLA,OAAAA,MAAAA;AAAA,CAAA,EAAAA,KAAA,IAAA,CAAA,CAAA,CAAA;AAKE,MAAMC,aAA4CA,CAAC;EACxDC,IAAA;EACAC,WAAA;EAAA;EAEAC,eAAA;EAAA;EAEAC;EAAA;AAEF,CAAM,KAAA;EACE,MAAAC,UAAA,GAAaC,aAA8B,IAAI,CAAA;EAErD,MAAM,CAACC,eAAA,EAAiBC,kBAAkB,CAAA,GAAIC,eAAS,KAAK,CAAA;EAC5D,MAAM;IAAEC,WAAA;IAAaC;EAAe,CAAA,GAAIC,OAAiB,CAAAA,gBAAA,CAAA,CAAA;EACnD,MAAA;IAAEC;GAAc,GAAIC,SAAAA,CAAAA,OAAQ,EAAA;EAElC,MAAM,CAACC,YAAA,EAAcC,eAAe,CAAA,GAClCP,eAA2C,IAAI,CAAA;EAE3C,MAAAQ,KAAA,GAAQC,KAAAA,CAAAA,QAAe,MAAM;IACjC,OAAOX,eAAmB,IAAA,CAAC,CAACQ,YAAA,GAAe,MAAa,CAAA,aAAA,OAAA,CAAA;EAAA,CACvD,EAAA,CAACR,eAAiB,EAAAQ,YAAY,CAAC,CAAA;EAElCI,KAAAA,CAAAA,SAAA,CAAU,MAAM;IACV,IAAA,CAACd,YAAYe,OAAS,EAAA;MACxB;IACF;IA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,CAAAA,iBAAA,EAAA;cAAAC,GAAA,EAAKyC;cAAavC,KAAO,EAAA,EAAA;cAAIC,QAAQ;aAAI;UAAA,CAC9D,CAAA;SAEJ,CAAA;OACF;KACF;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useState, useMemo, useEffect, useCallback } from 'react';
|
|
3
|
+
import '../../../../constants/icons/header/index.mjs';
|
|
4
|
+
import { ExternalUrl } from '../../../../constants/url.mjs';
|
|
5
|
+
import '../../../../contexts/MenuContext/index.mjs';
|
|
6
|
+
import { SiteId } from '../../../../contexts/MenuContext/mapping.mjs';
|
|
7
|
+
import '../../../../contexts/MicrositeMenuContext/index.mjs';
|
|
8
|
+
import { ModalId } from '../../../../contexts/MicrositeMenuContext/types.mjs';
|
|
9
|
+
import { SkeletonCircleLoader } from '../../../Header/Header.styles.mjs';
|
|
10
|
+
import { MenuButton } from '../../../Header/MenuItem/MenuItem.mjs';
|
|
11
|
+
import '../../../StyleableSvgImage/index.mjs';
|
|
12
|
+
import '../DropdownMenu/index.mjs';
|
|
13
|
+
import './_components/NavigationItem/index.mjs';
|
|
14
|
+
import './_components/SubNavigation/index.mjs';
|
|
15
|
+
import { Container, Wrap, InnerWrap, LeftWrap, LogoAnchor, ItemsWrap, RightWrap, RightItem, ActionIcon } from './Navigation.styles.mjs';
|
|
16
|
+
import { useMicrositeMenu } from '../../../../contexts/MicrositeMenuContext/context.mjs';
|
|
17
|
+
import { useMenu } from '../../../../contexts/MenuContext/context.mjs';
|
|
18
|
+
import { StyleableSvgImage } from '../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
19
|
+
import logoUnifi__default from "../../../../assets/logoUnifi.svg";
|
|
20
|
+
import { NavigationItem } from './_components/NavigationItem/NavigationItem.mjs';
|
|
21
|
+
import { DropdownMenu } from '../DropdownMenu/DropdownMenu.mjs';
|
|
22
|
+
import { SubNavigation } from './_components/SubNavigation/SubNavigation.mjs';
|
|
23
|
+
import globe__default from "../../../../assets/globe.svg";
|
|
24
|
+
import accountLogo__default from "../../../../assets/account.svg";
|
|
25
|
+
"use strict";
|
|
26
|
+
var Motif = /* @__PURE__ */(Motif2 => {
|
|
27
|
+
Motif2["Dark"] = "dark";
|
|
28
|
+
Motif2["Light"] = "light";
|
|
29
|
+
return Motif2;
|
|
30
|
+
})(Motif || {});
|
|
31
|
+
const Navigation = ({
|
|
32
|
+
menu,
|
|
33
|
+
onModalOpen,
|
|
34
|
+
// onLanguageChange,
|
|
35
|
+
onMenuItemClick,
|
|
36
|
+
// className,
|
|
37
|
+
account
|
|
38
|
+
// isLastMenu,
|
|
39
|
+
}) => {
|
|
40
|
+
const wrapperRef = useRef(null);
|
|
41
|
+
const [hasScrollOffset, setHasScrollOffset] = useState(false);
|
|
42
|
+
const {
|
|
43
|
+
activeModal,
|
|
44
|
+
setActiveModal
|
|
45
|
+
} = useMicrositeMenu();
|
|
46
|
+
const {
|
|
47
|
+
createSiteUrl
|
|
48
|
+
} = useMenu();
|
|
49
|
+
const [selectedMenu, setSelectedMenu] = useState(null);
|
|
50
|
+
const motif = useMemo(() => {
|
|
51
|
+
return hasScrollOffset || !!selectedMenu ? "dark" /* Dark */ : "light" /* Light */;
|
|
52
|
+
}, [hasScrollOffset, selectedMenu]);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (!wrapperRef?.current) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const observer = new IntersectionObserver(([entry]) => setHasScrollOffset(!entry?.isIntersecting), {
|
|
58
|
+
rootMargin: "-48px 0px 0px"
|
|
59
|
+
});
|
|
60
|
+
observer.observe(wrapperRef.current);
|
|
61
|
+
return () => {
|
|
62
|
+
observer.disconnect();
|
|
63
|
+
};
|
|
64
|
+
}, []);
|
|
65
|
+
const handleModalOpen = useCallback((e, id) => {
|
|
66
|
+
e.stopPropagation();
|
|
67
|
+
if (activeModal !== id) {
|
|
68
|
+
onModalOpen?.();
|
|
69
|
+
}
|
|
70
|
+
setActiveModal(activeModal === id ? null : id);
|
|
71
|
+
}, [activeModal, setActiveModal, onModalOpen]);
|
|
72
|
+
return /* @__PURE__ */jsx(Container, {
|
|
73
|
+
ref: wrapperRef,
|
|
74
|
+
children: /* @__PURE__ */jsx(Wrap, {
|
|
75
|
+
$isLastMenu: true,
|
|
76
|
+
$hasScrollOffset: hasScrollOffset || !!selectedMenu,
|
|
77
|
+
children: /* @__PURE__ */jsxs(InnerWrap, {
|
|
78
|
+
children: [/* @__PURE__ */jsxs(LeftWrap, {
|
|
79
|
+
children: [/* @__PURE__ */jsx(LogoAnchor, {
|
|
80
|
+
$motif: motif,
|
|
81
|
+
href: menu?.url ?? "",
|
|
82
|
+
onClick: e => onMenuItemClick?.(e, menu?.url ?? ""),
|
|
83
|
+
children: /* @__PURE__ */jsx(StyleableSvgImage, {
|
|
84
|
+
src: logoUnifi__default,
|
|
85
|
+
width: 46,
|
|
86
|
+
height: 14
|
|
87
|
+
})
|
|
88
|
+
}), /* @__PURE__ */jsxs(ItemsWrap, {
|
|
89
|
+
onMouseLeave: () => setSelectedMenu(null),
|
|
90
|
+
children: [(menu?.items ?? []).map((item, index) => /* @__PURE__ */jsx(NavigationItem, {
|
|
91
|
+
item,
|
|
92
|
+
theme: motif,
|
|
93
|
+
isActive: item.id === selectedMenu?.id,
|
|
94
|
+
onMouseEnter: () => setSelectedMenu(item ?? null)
|
|
95
|
+
}, `${item.id}-${item.label}-${index}`)), selectedMenu?.variant === "dropdown" ? /* @__PURE__ */jsx(DropdownMenu, {
|
|
96
|
+
items: selectedMenu?.items ?? [],
|
|
97
|
+
show: !!selectedMenu?.id,
|
|
98
|
+
onMenuItemClick,
|
|
99
|
+
onClose: () => setSelectedMenu(null)
|
|
100
|
+
}) : /* @__PURE__ */jsx(SubNavigation, {
|
|
101
|
+
items: selectedMenu?.items ?? [],
|
|
102
|
+
show: !!selectedMenu?.id
|
|
103
|
+
})]
|
|
104
|
+
})]
|
|
105
|
+
}), /* @__PURE__ */jsxs(RightWrap, {
|
|
106
|
+
children: [/* @__PURE__ */jsx(RightItem, {
|
|
107
|
+
href: ExternalUrl.SUPPORT,
|
|
108
|
+
$motif: motif,
|
|
109
|
+
children: "Support"
|
|
110
|
+
}), /* @__PURE__ */jsx(MenuButton, {
|
|
111
|
+
href: createSiteUrl([SiteId.Store, "/"]),
|
|
112
|
+
hideOnMobile: true,
|
|
113
|
+
motif: "light",
|
|
114
|
+
dataTestId: "support-btn",
|
|
115
|
+
openInNewTab: true,
|
|
116
|
+
children: "Store"
|
|
117
|
+
}), /* @__PURE__ */jsx(ActionIcon, {
|
|
118
|
+
"aria-hidden": "true",
|
|
119
|
+
$motif: motif,
|
|
120
|
+
onClick: e => handleModalOpen(e, ModalId.Language),
|
|
121
|
+
children: /* @__PURE__ */jsx(StyleableSvgImage, {
|
|
122
|
+
src: globe__default,
|
|
123
|
+
width: 20,
|
|
124
|
+
height: 19,
|
|
125
|
+
renderedHeight: 18
|
|
126
|
+
})
|
|
127
|
+
}), account?.loading ? /* @__PURE__ */jsx(SkeletonCircleLoader, {
|
|
128
|
+
diameter: 18
|
|
129
|
+
}) : /* @__PURE__ */jsx(ActionIcon, {
|
|
130
|
+
"aria-hidden": "true",
|
|
131
|
+
$motif: motif,
|
|
132
|
+
onClick: e => handleModalOpen(e, ModalId.Account),
|
|
133
|
+
children: /* @__PURE__ */jsx(StyleableSvgImage, {
|
|
134
|
+
src: accountLogo__default,
|
|
135
|
+
width: 18,
|
|
136
|
+
height: 19
|
|
137
|
+
})
|
|
138
|
+
})]
|
|
139
|
+
})]
|
|
140
|
+
})
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
export { Navigation };
|
|
145
|
+
//# sourceMappingURL=Navigation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Navigation.mjs","sources":["../../../../../src/components/MicrositeHeader/components/Navigation/Navigation.tsx"],"sourcesContent":["import type React from \"react\";\nimport { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\n\nimport {\n account as accountLogo,\n globe,\n logoUnifi,\n} from \"../../../../../src/constants/icons/header\";\nimport { ExternalUrl } from \"../../../../constants/url\";\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { SiteId } from \"../../../../contexts/MenuContext/mapping\";\nimport { useMicrositeMenu } from \"../../../../contexts/MicrositeMenuContext\";\nimport {\n ModalId,\n type ParsedMicrositeHeaderItem,\n} from \"../../../../contexts/MicrositeMenuContext/types\";\nimport { SkeletonCircleLoader } from \"../../../Header/Header.styles\";\nimport { MenuButton } from \"../../../Header/MenuItem/MenuItem\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport { DropdownMenu } from \"../DropdownMenu\";\nimport type { FirstLevelMenuProps } from \"../FirstLevelMenu/FirstLevelMenu.types\";\nimport { NavigationItem } from \"./_components/NavigationItem\";\nimport { SubNavigation } from \"./_components/SubNavigation\";\nimport * as S from \"./Navigation.styles\";\n\nenum Motif {\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport const Navigation: React.FC<FirstLevelMenuProps> = ({\n menu,\n onModalOpen,\n // onLanguageChange,\n onMenuItemClick,\n // className,\n account,\n // isLastMenu,\n}) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n\n const [hasScrollOffset, setHasScrollOffset] = useState(false);\n const { activeModal, setActiveModal } = useMicrositeMenu();\n const { createSiteUrl } = useMenu();\n\n const [selectedMenu, setSelectedMenu] =\n useState<ParsedMicrositeHeaderItem | null>(null);\n\n const motif = useMemo<Motif>(() => {\n return hasScrollOffset || !!selectedMenu ? Motif.Dark : Motif.Light;\n }, [hasScrollOffset, selectedMenu]);\n\n useEffect(() => {\n if (!wrapperRef?.current) {\n return;\n }\n\n const observer = new IntersectionObserver(\n ([entry]) => setHasScrollOffset(!entry?.isIntersecting ?? true),\n { rootMargin: \"-48px 0px 0px\" },\n );\n\n observer.observe(wrapperRef.current);\n\n return () => {\n observer.disconnect();\n };\n }, []);\n\n // const handleModalClose = useCallback(() => {\n // setActiveModal(null);\n // }, [setActiveModal]);\n\n const handleModalOpen = useCallback(\n (e: React.MouseEvent<HTMLElement>, id: ModalId) => {\n e.stopPropagation();\n\n // Callback to for example remove all toasts on modal open\n if (activeModal !== id) {\n onModalOpen?.();\n }\n\n setActiveModal(activeModal === id ? null : id);\n },\n [activeModal, setActiveModal, onModalOpen],\n );\n\n return (\n <S.Container ref={wrapperRef}>\n <S.Wrap $isLastMenu $hasScrollOffset={hasScrollOffset || !!selectedMenu}>\n <S.InnerWrap>\n <S.LeftWrap>\n <S.LogoAnchor\n $motif={motif}\n href={menu?.url ?? \"\"}\n onClick={(e) => onMenuItemClick?.(e, menu?.url ?? \"\")}\n >\n <StyleableSvgImage src={logoUnifi} width={46} height={14} />\n </S.LogoAnchor>\n\n <S.ItemsWrap onMouseLeave={() => setSelectedMenu(null)}>\n {(menu?.items ?? []).map((item, index) => (\n <NavigationItem\n key={`${item.id}-${item.label}-${index}`}\n item={item}\n theme={motif}\n isActive={item.id === selectedMenu?.id}\n onMouseEnter={() => setSelectedMenu(item ?? null)}\n />\n ))}\n\n {selectedMenu?.variant === \"dropdown\" ? (\n <DropdownMenu\n items={selectedMenu?.items ?? []}\n show={!!selectedMenu?.id}\n onMenuItemClick={onMenuItemClick}\n onClose={() => setSelectedMenu(null)}\n />\n ) : (\n <SubNavigation\n items={selectedMenu?.items ?? []}\n show={!!selectedMenu?.id}\n />\n )}\n </S.ItemsWrap>\n </S.LeftWrap>\n <S.RightWrap>\n <S.RightItem href={ExternalUrl.SUPPORT} $motif={motif}>\n Support\n </S.RightItem>\n <MenuButton\n href={createSiteUrl([SiteId.Store, \"/\"])}\n hideOnMobile\n motif={\"light\"}\n dataTestId=\"support-btn\"\n // Special request by Sam to open the link in new tab - only on ui.com/uisp.com microsites\n openInNewTab={true}\n >\n {/* TODO: Translate */}\n Store\n </MenuButton>\n <S.ActionIcon\n aria-hidden=\"true\"\n $motif={motif}\n onClick={(e) => handleModalOpen(e, ModalId.Language)}\n >\n <StyleableSvgImage\n src={globe}\n width={20}\n height={19}\n renderedHeight={18}\n />\n </S.ActionIcon>\n {account?.loading ? (\n <SkeletonCircleLoader diameter={18} />\n ) : (\n <S.ActionIcon\n aria-hidden=\"true\"\n $motif={motif}\n onClick={(e) => handleModalOpen(e, ModalId.Account)}\n >\n <StyleableSvgImage src={accountLogo} width={18} height={19} />\n </S.ActionIcon>\n )}\n </S.RightWrap>\n </S.InnerWrap>\n </S.Wrap>\n </S.Container>\n );\n};\n"],"names":["Motif","Navigation","menu","onModalOpen","onMenuItemClick","account","wrapperRef","useRef","hasScrollOffset","setHasScrollOffset","useState","activeModal","setActiveModal","useMicrositeMenu","createSiteUrl","useMenu","selectedMenu","setSelectedMenu","motif","useMemo","useEffect","current","observer","IntersectionObserver","entry","isIntersecting","rootMargin","observe","disconnect","handleModalOpen","useCallback","e","id","stopPropagation","jsx","S.Container","ref","children","S.Wrap","$isLastMenu","$hasScrollOffset","jsxs","S.InnerWrap","S.LeftWrap","S.LogoAnchor","$motif","href","url","onClick","StyleableSvgImage","src","logoUnifi","width","height","S.ItemsWrap","onMouseLeave","items","map","item","index","NavigationItem","theme","isActive","onMouseEnter","label","variant","DropdownMenu","show","onClose","SubNavigation","S.RightWrap","S.RightItem","ExternalUrl","SUPPORT","MenuButton","SiteId","Store","hideOnMobile","dataTestId","openInNewTab","S.ActionIcon","ModalId","Language","globe","renderedHeight","loading","SkeletonCircleLoader","diameter","Account","accountLogo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAKA,KAAA,GAAA,gBAAAA,MAAL,IAAA;EACEA,OAAA,MAAO,CAAA,GAAA,MAAA;EACPA,OAAA,OAAQ,CAAA,GAAA,OAAA;EAFLA,OAAAA,MAAAA;AAAA,CAAA,EAAAA,KAAA,IAAA,CAAA,CAAA,CAAA;AAKE,MAAMC,aAA4CA,CAA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