@ubnt/store.core 9.23.0-alpha.14 → 9.23.0-alpha.16
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 +10 -2
- package/lib/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- 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/Header/Header.types.d.ts +2 -0
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.d.ts +4 -0
- package/lib/components/Header/ProHeader/ProHeader.js +20 -16
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +19 -17
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +3 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.js +7 -0
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +7 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/BuildingBridge.js +2 -1
- package/lib/components/ModelCompareV3/data/BuildingBridge.js.map +1 -1
- package/lib/components/ModelCompareV3/data/BuildingBridge.mjs +2 -1
- package/lib/components/ModelCompareV3/data/BuildingBridge.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/buildingBridge.js +12 -2
- package/lib/components/ModelCompareV3/data/products/buildingBridge.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/buildingBridge.mjs +12 -2
- package/lib/components/ModelCompareV3/data/products/buildingBridge.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/buildingBridgeXG.js +12 -2
- package/lib/components/ModelCompareV3/data/products/buildingBridgeXG.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/buildingBridgeXG.mjs +12 -2
- package/lib/components/ModelCompareV3/data/products/buildingBridgeXG.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udb.js +11 -3
- package/lib/components/ModelCompareV3/data/products/udb.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udb.mjs +11 -3
- package/lib/components/ModelCompareV3/data/products/udb.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udbPro.js +10 -1
- package/lib/components/ModelCompareV3/data/products/udbPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udbPro.mjs +10 -1
- package/lib/components/ModelCompareV3/data/products/udbPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/ar.json.js +28 -29
- package/lib/components/ModelCompareV3/translations/ar.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/ar.json.mjs +28 -29
- package/lib/components/ModelCompareV3/translations/ar.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/de.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/de.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/de.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/de.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/el.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/el.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/el.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/el.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/en.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/en.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/es.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/es.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/es.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/es.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/fr.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/fr.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/fr.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/fr.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/it.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/it.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/it.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/it.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/ja.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/ja.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/ja.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/ja.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/pt-BR.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/pt-BR.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/pt-BR.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/pt-BR.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.d.ts +2 -2
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
- package/lib/components/Search/Input/Input.d.ts +1 -1
- package/lib/components/Search/Input/Input.js +3 -3
- package/lib/components/Search/Input/Input.js.map +1 -1
- package/lib/components/Search/Input/Input.mjs +3 -3
- package/lib/components/Search/Input/Input.mjs.map +1 -1
- package/lib/components/Search/Input/Input.types.d.ts +2 -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/CHANGELOG.md
CHANGED
|
@@ -6,13 +6,21 @@
|
|
|
6
6
|
|
|
7
7
|
## Releases
|
|
8
8
|
|
|
9
|
+
### 9.23.0-alpha.16
|
|
10
|
+
|
|
11
|
+
- [Feat] [NEP-3663](https://ubiquiti.atlassian.net/browse/NEP-3663) increase header line loader z index; remove search input id; add new search props
|
|
12
|
+
|
|
13
|
+
### 9.23.0-alpha.15
|
|
14
|
+
|
|
15
|
+
- [Feat] [MIC-431](https://ubiquiti.atlassian.net/browse/MIC-431) Update content
|
|
16
|
+
|
|
9
17
|
### 9.23.0-alpha.14
|
|
10
18
|
|
|
11
|
-
- [Feat] [MIC-431](https://ubiquiti.atlassian.net/browse/MIC-431) Update
|
|
19
|
+
- [Feat] [MIC-431](https://ubiquiti.atlassian.net/browse/MIC-431) Update content
|
|
12
20
|
|
|
13
21
|
### 9.23.0-alpha.13
|
|
14
22
|
|
|
15
|
-
- [Feat] [MIC-431](https://ubiquiti.atlassian.net/browse/MIC-431) Update
|
|
23
|
+
- [Feat] [MIC-431](https://ubiquiti.atlassian.net/browse/MIC-431) Update content
|
|
16
24
|
|
|
17
25
|
### 9.23.0-alpha.12
|
|
18
26
|
|
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/minus4.svg
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<mask id="
|
|
3
|
-
<g clip-path="url(#
|
|
4
|
-
<path d="
|
|
1
|
+
<svg width="11" height="10" viewBox="0 0 11 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<mask id="mask0_658_406" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="11" height="10">
|
|
3
|
+
<g clip-path="url(#clip0_658_406)">
|
|
4
|
+
<path d="M10.2546 4.35H0.587891V5.31667H10.2546V4.35Z" fill="#838691"/>
|
|
5
5
|
</g>
|
|
6
6
|
</mask>
|
|
7
|
-
<g mask="url(#
|
|
8
|
-
<rect x="0.
|
|
7
|
+
<g mask="url(#mask0_658_406)">
|
|
8
|
+
<rect x="0.587891" width="9.66667" height="9.66667" fill="#838691"/>
|
|
9
9
|
</g>
|
|
10
10
|
<defs>
|
|
11
|
-
<clipPath id="
|
|
12
|
-
<rect width="
|
|
11
|
+
<clipPath id="clip0_658_406">
|
|
12
|
+
<rect width="9.66667" height="9.66667" fill="white" transform="translate(0.587891)"/>
|
|
13
13
|
</clipPath>
|
|
14
14
|
</defs>
|
|
15
15
|
</svg>
|
package/lib/assets/minus5.svg
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<mask id="
|
|
3
|
-
<g clip-path="url(#
|
|
4
|
-
<path d="
|
|
1
|
+
<svg width="6" height="6" viewBox="0 0 6 6" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<mask id="mask0_426_15898" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="6" height="6">
|
|
3
|
+
<g clip-path="url(#clip0_426_15898)">
|
|
4
|
+
<path d="M5.16287 2.9397H0.697754V3.38621H5.16287V2.9397Z" fill="#838691"/>
|
|
5
5
|
</g>
|
|
6
6
|
</mask>
|
|
7
|
-
<g mask="url(#
|
|
8
|
-
<rect x="0.
|
|
7
|
+
<g mask="url(#mask0_426_15898)">
|
|
8
|
+
<rect x="0.697754" y="0.930176" width="4.46512" height="4.46512" fill="#838691"/>
|
|
9
9
|
</g>
|
|
10
10
|
<defs>
|
|
11
|
-
<clipPath id="
|
|
12
|
-
<rect width="
|
|
11
|
+
<clipPath id="clip0_426_15898">
|
|
12
|
+
<rect width="4.46512" height="4.46512" fill="white" transform="translate(0.697754 0.930176)"/>
|
|
13
13
|
</clipPath>
|
|
14
14
|
</defs>
|
|
15
15
|
</svg>
|
|
@@ -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
|
|
@@ -252,6 +252,8 @@ export type ProHeaderProps = Pick<HeaderProps, "className" | "motif" | "cart" |
|
|
|
252
252
|
onLanguageChange?: (e: React.MouseEvent<HTMLElement>, link: string, language: Language) => void;
|
|
253
253
|
searchValue?: string;
|
|
254
254
|
onSearch?: (searchTerm: string) => void;
|
|
255
|
+
searchInputWidth?: number;
|
|
256
|
+
searchInputChildren?: ReactNode;
|
|
255
257
|
onSearchFocus?: () => void;
|
|
256
258
|
onSearchBlur?: () => void;
|
|
257
259
|
onSearchClick?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.types.js","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport type { ReactNode } from \"react\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport interface HeaderLogo {\n url?: string;\n hide?: boolean;\n productLine?: ProductLine;\n onClick?: (e: React.MouseEvent<HTMLElement>, href: string) => void;\n currentStore?: {\n flag: ReactNode;\n name: string;\n };\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n\n // Logo overrides\n logo?: HeaderLogo;\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n handleStorePickerClick?: () => void;\n /** @deprecated Not used in favour of `logo.currentStore.name` */\n currentCountryName?: string;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for menu\n categories: ProHeaderCategories;\n hideInlineCategories?: boolean;\n\n // Logo overrides\n logo?: HeaderLogo;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;;AAkBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Header.types.js","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport type { ReactNode } from \"react\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport interface HeaderLogo {\n url?: string;\n hide?: boolean;\n productLine?: ProductLine;\n onClick?: (e: React.MouseEvent<HTMLElement>, href: string) => void;\n currentStore?: {\n flag: ReactNode;\n name: string;\n };\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n\n // Logo overrides\n logo?: HeaderLogo;\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n handleStorePickerClick?: () => void;\n /** @deprecated Not used in favour of `logo.currentStore.name` */\n currentCountryName?: string;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n searchInputWidth?: number;\n searchInputChildren?: ReactNode;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for menu\n categories: ProHeaderCategories;\n hideInlineCategories?: boolean;\n\n // Logo overrides\n logo?: HeaderLogo;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;;AAkBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.types.mjs","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport type { ReactNode } from \"react\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport interface HeaderLogo {\n url?: string;\n hide?: boolean;\n productLine?: ProductLine;\n onClick?: (e: React.MouseEvent<HTMLElement>, href: string) => void;\n currentStore?: {\n flag: ReactNode;\n name: string;\n };\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n\n // Logo overrides\n logo?: HeaderLogo;\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n handleStorePickerClick?: () => void;\n /** @deprecated Not used in favour of `logo.currentStore.name` */\n currentCountryName?: string;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for menu\n categories: ProHeaderCategories;\n hideInlineCategories?: boolean;\n\n // Logo overrides\n logo?: HeaderLogo;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;AAkBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Header.types.mjs","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport type { ReactNode } from \"react\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport interface HeaderLogo {\n url?: string;\n hide?: boolean;\n productLine?: ProductLine;\n onClick?: (e: React.MouseEvent<HTMLElement>, href: string) => void;\n currentStore?: {\n flag: ReactNode;\n name: string;\n };\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n\n // Logo overrides\n logo?: HeaderLogo;\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n handleStorePickerClick?: () => void;\n /** @deprecated Not used in favour of `logo.currentStore.name` */\n currentCountryName?: string;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n searchInputWidth?: number;\n searchInputChildren?: ReactNode;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for menu\n categories: ProHeaderCategories;\n hideInlineCategories?: boolean;\n\n // Logo overrides\n logo?: HeaderLogo;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;AAkBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Language, ProductLine } from "../../../types";
|
|
2
|
+
export declare const PRO_HEADER_MOBILE_UP: `(min-width: ${number}px)`;
|
|
3
|
+
export declare const PRO_HEADER_MOBILE_AND_DOWN: `(max-width: ${number}px)`;
|
|
2
4
|
export declare const ProHeader: import("react").NamedExoticComponent<Pick<import("../Header.types").HeaderProps, "className" | "motif" | "cart" | "account" | "translations" | "onModalOpen" | "onCartClick" | "showLineLoader" | "accountMenu"> & {
|
|
3
5
|
embedConfig?: import("../Header.types").HeaderEmbedConfig;
|
|
4
6
|
handleStorePickerClick?: () => void;
|
|
@@ -13,6 +15,8 @@ export declare const ProHeader: import("react").NamedExoticComponent<Pick<import
|
|
|
13
15
|
onLanguageChange?: (e: React.MouseEvent<HTMLElement>, link: string, language: Language) => void;
|
|
14
16
|
searchValue?: string;
|
|
15
17
|
onSearch?: (searchTerm: string) => void;
|
|
18
|
+
searchInputWidth?: number;
|
|
19
|
+
searchInputChildren?: import("react").ReactNode;
|
|
16
20
|
onSearchFocus?: () => void;
|
|
17
21
|
onSearchBlur?: () => void;
|
|
18
22
|
onSearchClick?: () => void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var LineLoader = require('@ubnt/ui-components/LineLoader');
|
|
5
4
|
var merge = require('lodash/merge');
|
|
6
5
|
var react = require('react');
|
|
7
6
|
var reactUse = require('react-use');
|
|
@@ -70,8 +69,8 @@ var EAIcon__default = /*#__PURE__*/_interopDefault(EAIcon);
|
|
|
70
69
|
var _externalAssets_DtGmfNK5__default = /*#__PURE__*/_interopDefault(_externalAssets_DtGmfNK5);
|
|
71
70
|
var _externalAssets_CzDCu21b__default = /*#__PURE__*/_interopDefault(_externalAssets_CzDCu21b);
|
|
72
71
|
"use strict";
|
|
73
|
-
const
|
|
74
|
-
const
|
|
72
|
+
const PRO_HEADER_MOBILE_UP = layout.BREAKPOINTS.TABLET_UP;
|
|
73
|
+
const PRO_HEADER_MOBILE_AND_DOWN = layout.BREAKPOINTS.TABLET_AND_DOWN;
|
|
75
74
|
const DEFAULT_PRODUCT_LINE_OPTIONS = [{
|
|
76
75
|
value: generated.ProductLine.Unifi,
|
|
77
76
|
label: "UniFi"
|
|
@@ -89,6 +88,8 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
89
88
|
onCartClick,
|
|
90
89
|
showLineLoader,
|
|
91
90
|
searchValue,
|
|
91
|
+
searchInputWidth,
|
|
92
|
+
searchInputChildren,
|
|
92
93
|
onSearch,
|
|
93
94
|
handleStorePickerClick,
|
|
94
95
|
earlyAccess,
|
|
@@ -108,7 +109,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
108
109
|
onLanguageChange,
|
|
109
110
|
logo
|
|
110
111
|
}) {
|
|
111
|
-
const isMobile = reactUse.useMedia(
|
|
112
|
+
const isMobile = reactUse.useMedia(PRO_HEADER_MOBILE_AND_DOWN, false);
|
|
112
113
|
const rootRef = react.useRef(null);
|
|
113
114
|
const wrapRef = react.useRef(null);
|
|
114
115
|
const containerRef = react.useRef(null);
|
|
@@ -393,7 +394,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
393
394
|
})
|
|
394
395
|
})
|
|
395
396
|
}), embedConfig?.moveAvatarIconToLeft && avatarHtml, !!logo?.currentStore && /* @__PURE__ */jsxRuntime.jsxs(ProHeader_styles.CurrentStoreWrap, {
|
|
396
|
-
hideBreakpoint:
|
|
397
|
+
hideBreakpoint: PRO_HEADER_MOBILE_AND_DOWN,
|
|
397
398
|
onClick: handleStorePickerClick,
|
|
398
399
|
children: [/* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.CurrentStoreFlag, {
|
|
399
400
|
children: logo.currentStore.flag
|
|
@@ -401,7 +402,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
401
402
|
})]
|
|
402
403
|
})
|
|
403
404
|
}), /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.CenterWrap, {
|
|
404
|
-
hideBreakpoint:
|
|
405
|
+
hideBreakpoint: PRO_HEADER_MOBILE_AND_DOWN,
|
|
405
406
|
children: isSearching ? /* @__PURE__ */jsxRuntime.jsxs(ProHeader_styles.SearchWrap, {
|
|
406
407
|
children: [/* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.Search, {
|
|
407
408
|
setInputRef: onDesktopSearchReveal,
|
|
@@ -411,10 +412,11 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
411
412
|
value: searchValue ?? "",
|
|
412
413
|
showCancel: !!searchValue,
|
|
413
414
|
onCancelClick: handleSearchClear,
|
|
414
|
-
width: 420,
|
|
415
|
+
width: searchInputWidth ?? 420,
|
|
415
416
|
onFocus: handleSearchFocus,
|
|
416
417
|
onBlur: handleSearchBlur,
|
|
417
|
-
focusedWidth: searchFocusWidth
|
|
418
|
+
focusedWidth: searchFocusWidth,
|
|
419
|
+
children: searchInputChildren
|
|
418
420
|
}), /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.SearchCancel, {
|
|
419
421
|
onClick: handleSearchCancel,
|
|
420
422
|
children: formatMessage("Cancel")
|
|
@@ -451,7 +453,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
451
453
|
}), /* @__PURE__ */jsxRuntime.jsxs(ProHeader_styles.RightWrap, {
|
|
452
454
|
$addSpaceOnDesktop: !!embedConfig?.fullWidthHeader,
|
|
453
455
|
children: [isSearching && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProductLineSelectorWrap, {
|
|
454
|
-
hideBreakpoint:
|
|
456
|
+
hideBreakpoint: PRO_HEADER_MOBILE_AND_DOWN,
|
|
455
457
|
children: productLineOptions.filter(productLine => productLine.value !== productLineValue).map(productLine => /* @__PURE__ */jsxRuntime.jsx(MenuItem.MenuItem, {
|
|
456
458
|
motif,
|
|
457
459
|
onClick: () => handleProductLineChange?.(productLine.value),
|
|
@@ -501,7 +503,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
501
503
|
})
|
|
502
504
|
})
|
|
503
505
|
}), !embedConfig && !handlePurchaseHistoryClick && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.VerticalDivider, {
|
|
504
|
-
hideBreakpoint:
|
|
506
|
+
hideBreakpoint: PRO_HEADER_MOBILE_AND_DOWN
|
|
505
507
|
}), isMultiLanguage && !embedConfig?.hideLanguagePicker && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProIconWrap, {
|
|
506
508
|
motif,
|
|
507
509
|
"data-test-id": "language-picker-btn",
|
|
@@ -512,7 +514,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
512
514
|
height: Header_styles.HEADER_ICON_SIZE
|
|
513
515
|
})
|
|
514
516
|
}), handlePurchaseHistoryClick && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProIconWrap, {
|
|
515
|
-
hideBreakpoint:
|
|
517
|
+
hideBreakpoint: PRO_HEADER_MOBILE_AND_DOWN,
|
|
516
518
|
motif,
|
|
517
519
|
onClick: handlePurchaseHistoryClick,
|
|
518
520
|
children: /* @__PURE__ */jsxRuntime.jsx(Header_styles.SvgIcon, {
|
|
@@ -521,7 +523,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
521
523
|
height: Header_styles.HEADER_ICON_SIZE
|
|
522
524
|
})
|
|
523
525
|
}), earlyAccess && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProIconWrap, {
|
|
524
|
-
hideBreakpoint:
|
|
526
|
+
hideBreakpoint: PRO_HEADER_MOBILE_AND_DOWN,
|
|
525
527
|
motif,
|
|
526
528
|
onClick: earlyAccess.onClick,
|
|
527
529
|
children: earlyAccess.loading ? /* @__PURE__ */jsxRuntime.jsx(Header_styles.SkeletonCircleLoader, {
|
|
@@ -533,10 +535,10 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
533
535
|
renderedHeight: Header_styles.HEADER_ICON_SIZE * 0.8
|
|
534
536
|
})
|
|
535
537
|
}), !embedConfig?.moveAvatarIconToLeft ? !accountMenu ? avatarHtml : accountMenu : null, /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.VerticalDivider, {
|
|
536
|
-
hideBreakpoint:
|
|
538
|
+
hideBreakpoint: PRO_HEADER_MOBILE_UP
|
|
537
539
|
})]
|
|
538
540
|
}), /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.ProIconWrap, {
|
|
539
|
-
hideBreakpoint:
|
|
541
|
+
hideBreakpoint: PRO_HEADER_MOBILE_UP,
|
|
540
542
|
motif,
|
|
541
543
|
onClick: handleHamburgerClick,
|
|
542
544
|
children: activeModal === types.ModalId.ProMobileMenu ? /* @__PURE__ */jsxRuntime.jsx(Header_styles.SvgIcon, {
|
|
@@ -596,7 +598,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
596
598
|
account
|
|
597
599
|
})
|
|
598
600
|
})
|
|
599
|
-
})), !isSsr && /* @__PURE__ */jsxRuntime.jsx(
|
|
601
|
+
})), !isSsr && /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.LineLoader, {
|
|
600
602
|
placement: "bottom",
|
|
601
603
|
isLoading: !!showLineLoader
|
|
602
604
|
})]
|
|
@@ -617,7 +619,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
617
619
|
}), /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.SearchTabWrap, {
|
|
618
620
|
$show: activeModal === types.ModalId.Search,
|
|
619
621
|
$isStickyEmbed: !!embedConfig,
|
|
620
|
-
hideBreakpoint:
|
|
622
|
+
hideBreakpoint: PRO_HEADER_MOBILE_UP,
|
|
621
623
|
children: /* @__PURE__ */jsxRuntime.jsx(ProHeader_styles.Search, {
|
|
622
624
|
setInputRef: setMobileSearchInputEl,
|
|
623
625
|
onValueChange: handleSearchValueChange,
|
|
@@ -633,5 +635,7 @@ const ProHeader = react.memo(function ProHeader2({
|
|
|
633
635
|
})]
|
|
634
636
|
});
|
|
635
637
|
});
|
|
638
|
+
exports.PRO_HEADER_MOBILE_AND_DOWN = PRO_HEADER_MOBILE_AND_DOWN;
|
|
639
|
+
exports.PRO_HEADER_MOBILE_UP = PRO_HEADER_MOBILE_UP;
|
|
636
640
|
exports.ProHeader = ProHeader;
|
|
637
641
|
//# sourceMappingURL=ProHeader.js.map
|