magneto365.ui 2.59.5 → 2.59.6-alpha
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/dist/cjs/css/magneto.ui.lib.min.css +1 -1
- package/dist/cjs/index.js +20 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/UI/molecules/ListMenuIcons/ListMenuIcons.interface.d.ts +2 -2
- package/dist/cjs/types/components/UI/molecules/MegaMenuPopover/MegaMenuPopover.component.d.ts +2 -1
- package/dist/cjs/types/components/UI/molecules/MegaMenuPopover/MegaMenuPopover.interface.d.ts +8 -0
- package/dist/cjs/types/components/UI/organism/LoginHeader/LoginHeader.interface.d.ts +2 -2
- package/dist/cjs/types/components/UI/template/MegaMenu/MegaMenuContext.interface.d.ts +4 -1
- package/dist/esm/css/magneto.ui.lib.min.css +1 -1
- package/dist/esm/index.js +20 -14
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/UI/molecules/ListMenuIcons/ListMenuIcons.interface.d.ts +2 -2
- package/dist/esm/types/components/UI/molecules/MegaMenuPopover/MegaMenuPopover.component.d.ts +2 -1
- package/dist/esm/types/components/UI/molecules/MegaMenuPopover/MegaMenuPopover.interface.d.ts +8 -0
- package/dist/esm/types/components/UI/organism/LoginHeader/LoginHeader.interface.d.ts +2 -2
- package/dist/esm/types/components/UI/template/MegaMenu/MegaMenuContext.interface.d.ts +4 -1
- package/dist/index.d.ts +16 -5
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -2359,7 +2359,7 @@ var MegaMenuCard = function (_a) {
|
|
|
2359
2359
|
arrow));
|
|
2360
2360
|
};
|
|
2361
2361
|
|
|
2362
|
-
var style$H = {"mega-menu-jobs-tabs":"mg_mega_menu_jobs_tabs_mega-menu-jobs-
|
|
2362
|
+
var style$H = {"mega-menu-jobs-tabs":"mg_mega_menu_jobs_tabs_mega-menu-jobs-tabs_1512z","mega-menu-jobs-tabs__tab":"mg_mega_menu_jobs_tabs_mega-menu-jobs-tabs_tab_1512z","mega-menu-jobs-tabs__container":"mg_mega_menu_jobs_tabs_mega-menu-jobs-tabs_container_1512z","mega-menu-jobs-tabs__content":"mg_mega_menu_jobs_tabs_mega-menu-jobs-tabs_content_1512z","selected-tab":"mg_mega_menu_jobs_tabs_selected-tab_1512z"};
|
|
2363
2363
|
|
|
2364
2364
|
var initialContext = {
|
|
2365
2365
|
socialHeaderProps: {
|
|
@@ -2419,7 +2419,7 @@ var Component$1Z = function (_a) {
|
|
|
2419
2419
|
onClick();
|
|
2420
2420
|
}
|
|
2421
2421
|
}, [onClick]);
|
|
2422
|
-
return (React.createElement("a", { className: "".concat(className
|
|
2422
|
+
return (React.createElement("a", { className: "".concat(className ? className : styles$1O['button-link']), type: "button", onClick: handleClick, href: href, rel: rel, target: target },
|
|
2423
2423
|
suffixIcon && (React.createElement(IconItem, { size: iconSize, icon: suffixIcon, hover: true, className: styles$1O['button-link__icon'] })),
|
|
2424
2424
|
buttonText && React.createElement("p", { className: styles$1O['button-link__text'] }, buttonText),
|
|
2425
2425
|
prefixIcon && (React.createElement(IconItem, { size: iconSize, icon: prefixIcon, hover: true, className: styles$1O['button-link__icon'] }))));
|
|
@@ -2450,7 +2450,7 @@ var MegaMenuJobsTabs = function () {
|
|
|
2450
2450
|
}),
|
|
2451
2451
|
React.createElement(Divider, { direction: 'VERTICAL' }),
|
|
2452
2452
|
React.createElement("li", null,
|
|
2453
|
-
React.createElement(
|
|
2453
|
+
React.createElement(ButtonLink, { buttonText: (_a = allJobsAction === null || allJobsAction === void 0 ? void 0 : allJobsAction.label) !== null && _a !== void 0 ? _a : '', href: (_b = allJobsAction === null || allJobsAction === void 0 ? void 0 : allJobsAction.url) !== null && _b !== void 0 ? _b : '', onClick: allJobsAction === null || allJobsAction === void 0 ? void 0 : allJobsAction.onClick, prefixIcon: ArrowRight2, iconSize: 14 })))),
|
|
2454
2454
|
React.createElement(Divider, null),
|
|
2455
2455
|
React.createElement("div", { className: "".concat(style$H["mega-menu-jobs-tabs__content"]) }, content)));
|
|
2456
2456
|
};
|
|
@@ -2459,7 +2459,7 @@ var styles$1N = {"magneto-ui-mega-menu-popover__dropdown":"mg_mega_menu_popover_
|
|
|
2459
2459
|
|
|
2460
2460
|
var popoverClassName = 'magneto-ui-mega-menu-popover';
|
|
2461
2461
|
var MegaMenuPopover = function (_a) {
|
|
2462
|
-
var children = _a.children;
|
|
2462
|
+
var children = _a.children, popoverRef = _a.popoverRef;
|
|
2463
2463
|
var _b = useState(false), showContent = _b[0], setShowContent = _b[1];
|
|
2464
2464
|
var jobAction = useMegaMenuJobs().jobAction;
|
|
2465
2465
|
var handleShowContent = useCallback(function (show) { return function (event) {
|
|
@@ -2467,6 +2467,9 @@ var MegaMenuPopover = function (_a) {
|
|
|
2467
2467
|
event.stopPropagation();
|
|
2468
2468
|
setShowContent(show);
|
|
2469
2469
|
}; }, []);
|
|
2470
|
+
useImperativeHandle(popoverRef, function () { return ({
|
|
2471
|
+
setShow: function (show) { return setShowContent(show); }
|
|
2472
|
+
}); });
|
|
2470
2473
|
useEffect(function () {
|
|
2471
2474
|
var body = document.body;
|
|
2472
2475
|
if (!body)
|
|
@@ -2484,7 +2487,7 @@ var MegaMenuPopover = function (_a) {
|
|
|
2484
2487
|
} }, children))));
|
|
2485
2488
|
};
|
|
2486
2489
|
|
|
2487
|
-
var style$G = {"mega-menu-side-cards":"mg_mega_menu_side_cards_mega-menu-side-
|
|
2490
|
+
var style$G = {"mega-menu-side-cards":"mg_mega_menu_side_cards_mega-menu-side-cards_zkk49","mega-menu-side-cards__action":"mg_mega_menu_side_cards_mega-menu-side-cards_action_zkk49","mega-menu-side-cards__card":"mg_mega_menu_side_cards_mega-menu-side-cards_card_zkk49","mega-menu-side-cards__card--selected":"mg_mega_menu_side_cards_mega-menu-side-cards_card--selected_zkk49"};
|
|
2488
2491
|
|
|
2489
2492
|
var MegaMenuSideCards = function (_a) {
|
|
2490
2493
|
var jobs = _a.jobs, action = _a.action, onSelectCard = _a.onSelectCard, initValue = _a.initValue, _b = _a.maxCards, maxCards = _b === void 0 ? 10 : _b, cardsRef = _a.cardsRef;
|
|
@@ -2501,7 +2504,7 @@ var MegaMenuSideCards = function (_a) {
|
|
|
2501
2504
|
jobs.slice(0, maxCards).map(function (job, key) { return (React.createElement("li", { key: key },
|
|
2502
2505
|
React.createElement(MegaMenuCard, __assign({}, job, { showRigthArrow: selected == key, className: "".concat(style$G["mega-menu-side-cards__card"], " ").concat(selected == key ? style$G["mega-menu-side-cards__card--selected"] : ''), onClick: onSelectCard ? handleClick(key) : undefined })))); }),
|
|
2503
2506
|
action && (React.createElement("li", null,
|
|
2504
|
-
React.createElement(
|
|
2507
|
+
React.createElement(ButtonLink, { href: action.url, buttonText: action.label, onClick: action.onClick, className: "".concat(style$G["mega-menu-side-cards__action"]), prefixIcon: ArrowRightWhite })))));
|
|
2505
2508
|
};
|
|
2506
2509
|
|
|
2507
2510
|
var styles$1M = {"magneto-ui-menu-search":"mg_menu_search_magneto-ui-menu-search_1nz6y","magneto-ui-menu-search_container":"mg_menu_search_magneto-ui-menu-search_container_1nz6y","magneto-ui-menu-search_content":"mg_menu_search_magneto-ui-menu-search_content_1nz6y","open":"mg_menu_search_open_1nz6y"};
|
|
@@ -5900,15 +5903,15 @@ var MagnetoSocialMedia = function (_a) {
|
|
|
5900
5903
|
}))));
|
|
5901
5904
|
};
|
|
5902
5905
|
|
|
5903
|
-
var style$n = {"mega-menu-cards":"mg_mega_menu_cards_mega-menu-
|
|
5906
|
+
var style$n = {"mega-menu-cards":"mg_mega_menu_cards_mega-menu-cards_16j6z","mega-menu-cards__filter":"mg_mega_menu_cards_mega-menu-cards_filter_16j6z","mega-menu-cards__title":"mg_mega_menu_cards_mega-menu-cards_title_16j6z","mega-menu-cards__action":"mg_mega_menu_cards_mega-menu-cards_action_16j6z","mega-menu-cards__action--grey":"mg_mega_menu_cards_mega-menu-cards_action--grey_16j6z"};
|
|
5904
5907
|
|
|
5905
5908
|
var MegaMenuCards = function (_a) {
|
|
5906
5909
|
var _b;
|
|
5907
5910
|
var jobs = _a.jobs, action = _a.action, title = _a.title, actionTitle = _a.actionTitle, className = _a.className, filterProps = _a.filterProps, _c = _a.maxCards, maxCards = _c === void 0 ? 39 : _c;
|
|
5908
5911
|
var renderTitle = useMediaQuery(title && (React.createElement("div", { className: "".concat(style$n["mega-menu-cards__title"]) },
|
|
5909
5912
|
React.createElement("h4", null, title),
|
|
5910
|
-
actionTitle && (React.createElement(
|
|
5911
|
-
md: title && actionTitle && (React.createElement(
|
|
5913
|
+
actionTitle && (React.createElement(ButtonLink, { href: actionTitle.url, buttonText: actionTitle.label, onClick: actionTitle.onClick, prefixIcon: ArrowRight2, iconSize: 14, className: "".concat(style$n["mega-menu-cards__action--grey"]) })))), {
|
|
5914
|
+
md: title && actionTitle && (React.createElement(ButtonLink, { href: actionTitle.url, buttonText: actionTitle.label, onClick: actionTitle.onClick, prefixIcon: ArrowRight2, iconSize: 14, className: "".concat(style$n["mega-menu-cards__action--grey"]) }))
|
|
5912
5915
|
});
|
|
5913
5916
|
return (React.createElement("nav", { className: className },
|
|
5914
5917
|
renderTitle,
|
|
@@ -5916,7 +5919,7 @@ var MegaMenuCards = function (_a) {
|
|
|
5916
5919
|
React.createElement("ul", { className: "".concat(style$n["mega-menu-cards"]) }, jobs &&
|
|
5917
5920
|
jobs.slice(0, maxCards).map(function (job, key) { return (React.createElement("li", { key: key },
|
|
5918
5921
|
React.createElement(MegaMenuCard, __assign({}, job)))); })),
|
|
5919
|
-
action && (React.createElement(ButtonLink, { buttonText: action.label, href: action.url, target: (_b = action.target) !== null && _b !== void 0 ? _b : '_self', prefixIcon: ArrowRightWhite, className: "".concat(style$n["mega-menu-cards__action"]) }))));
|
|
5922
|
+
action && (React.createElement(ButtonLink, { buttonText: action.label, href: action.url, onClick: action.onClick, target: (_b = action.target) !== null && _b !== void 0 ? _b : '_self', prefixIcon: ArrowRightWhite, className: "".concat(style$n["mega-menu-cards__action"]) }))));
|
|
5920
5923
|
};
|
|
5921
5924
|
|
|
5922
5925
|
var styles$D = {"magneto-ui--date-options":"mg_date_options_magneto-ui--date-options_7fpt5","magneto-ui--date-options--wrapper":"mg_date_options_magneto-ui--date-options--wrapper_7fpt5","magneto-ui--date-options__btn":"mg_date_options_magneto-ui--date-options_btn_7fpt5","magneto-ui--date-options__btn-selected":"mg_date_options_magneto-ui--date-options_btn-selected_7fpt5"};
|
|
@@ -8241,20 +8244,23 @@ var Component$4 = function (_a) {
|
|
|
8241
8244
|
var _b = useState(false), showSearchBar = _b[0], setShowSearchBar = _b[1];
|
|
8242
8245
|
var _c = useState(false), toggleMobileDrawer = _c[0], setToggleMobileDrawer = _c[1];
|
|
8243
8246
|
var _d = useMegaMenuMain(), homeUrl = _d.homeUrl, searchBarProps = _d.searchBarProps, loginProps = _d.loginProps;
|
|
8247
|
+
var popoverRef = useMegaMenuJobs().popoverRef;
|
|
8244
8248
|
var listMenuUserProps = useLoggedInUser();
|
|
8245
|
-
var
|
|
8249
|
+
var _e = listMenuUserProps.profileImage, profileImage = _e === void 0 ? {} : _e, isAuthenticated = listMenuUserProps.isAuthenticated;
|
|
8246
8250
|
var toggleSearchBar = function () {
|
|
8247
8251
|
setShowSearchBar(!showSearchBar);
|
|
8248
8252
|
};
|
|
8249
|
-
var renderLogo = useMediaQuery(React.createElement(
|
|
8250
|
-
|
|
8253
|
+
var renderLogo = useMediaQuery(React.createElement("a", { href: homeUrl },
|
|
8254
|
+
React.createElement(LogoComponent, __assign({}, logoProps))), {
|
|
8255
|
+
sm: (React.createElement("a", { href: homeUrl },
|
|
8256
|
+
React.createElement(LogoComponent, __assign({}, logoProps, { isoView: true }))))
|
|
8251
8257
|
});
|
|
8252
8258
|
var LogoutHeaderMobileSearchbar = useMediaQuery(null, {
|
|
8253
8259
|
md: (React.createElement(React.Fragment, null, searchBarProps && (React.createElement(MobileSearchbar, __assign({}, searchBarProps, { termValue: searchBarProps.termValue, onClick: function () { return setShowSearchBar(false); }, showMobileSearchbar: showSearchBar, focusSearchInput: showSearchBar })))))
|
|
8254
8260
|
});
|
|
8255
8261
|
var renderSearchBar = useMediaQuery(React.createElement(React.Fragment, null,
|
|
8256
8262
|
searchBarProps && (React.createElement(Searchbar, __assign({ searchButtonProps: searchPropsButton, removeButtonProps: removePropsButton }, searchBarProps))),
|
|
8257
|
-
React.createElement(MegaMenuPopover,
|
|
8263
|
+
React.createElement(MegaMenuPopover, { popoverRef: popoverRef },
|
|
8258
8264
|
React.createElement(MegaMenuJobsTabs, null))), {
|
|
8259
8265
|
md: searchBarProps && (React.createElement(SearchButton, __assign({ searchValue: searchBarProps.termValue, buttonSize: 'small', onClick: toggleSearchBar, className: styles$1['mega-menu-main-header__search-button'] }, MobileSearchbarButtonProps)))
|
|
8260
8266
|
});
|