Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
function use_navigation_tree_item_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[36500] Fix | Delete
[36501] Fix | Delete
function use_navigation_tree_item_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { use_navigation_tree_item_ownKeys(Object(source), true).forEach(function (key) { Object(esm_defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { use_navigation_tree_item_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[36502] Fix | Delete
[36503] Fix | Delete
/**
[36504] Fix | Delete
* WordPress dependencies
[36505] Fix | Delete
*/
[36506] Fix | Delete
[36507] Fix | Delete
/**
[36508] Fix | Delete
* Internal dependencies
[36509] Fix | Delete
*/
[36510] Fix | Delete
[36511] Fix | Delete
[36512] Fix | Delete
[36513] Fix | Delete
[36514] Fix | Delete
[36515] Fix | Delete
var use_navigation_tree_item_useNavigationTreeItem = function useNavigationTreeItem(itemId, props) {
[36516] Fix | Delete
var _useNavigationContext = context_useNavigationContext(),
[36517] Fix | Delete
activeMenu = _useNavigationContext.activeMenu,
[36518] Fix | Delete
_useNavigationContext2 = _useNavigationContext.navigationTree,
[36519] Fix | Delete
addItem = _useNavigationContext2.addItem,
[36520] Fix | Delete
removeItem = _useNavigationContext2.removeItem;
[36521] Fix | Delete
[36522] Fix | Delete
var _useNavigationGroupCo = context_useNavigationGroupContext(),
[36523] Fix | Delete
group = _useNavigationGroupCo.group;
[36524] Fix | Delete
[36525] Fix | Delete
var _useNavigationMenuCon = context_useNavigationMenuContext(),
[36526] Fix | Delete
menu = _useNavigationMenuCon.menu,
[36527] Fix | Delete
search = _useNavigationMenuCon.search;
[36528] Fix | Delete
[36529] Fix | Delete
Object(external_wp_element_["useEffect"])(function () {
[36530] Fix | Delete
var isMenuActive = activeMenu === menu;
[36531] Fix | Delete
var isItemVisible = !search || normalizedSearch(props.title, search);
[36532] Fix | Delete
addItem(itemId, use_navigation_tree_item_objectSpread(use_navigation_tree_item_objectSpread({}, props), {}, {
[36533] Fix | Delete
group: group,
[36534] Fix | Delete
menu: menu,
[36535] Fix | Delete
_isVisible: isMenuActive && isItemVisible
[36536] Fix | Delete
}));
[36537] Fix | Delete
return function () {
[36538] Fix | Delete
removeItem(itemId);
[36539] Fix | Delete
};
[36540] Fix | Delete
}, [activeMenu, search]);
[36541] Fix | Delete
};
[36542] Fix | Delete
[36543] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/item/base.js
[36544] Fix | Delete
[36545] Fix | Delete
[36546] Fix | Delete
[36547] Fix | Delete
[36548] Fix | Delete
[36549] Fix | Delete
/**
[36550] Fix | Delete
* External dependencies
[36551] Fix | Delete
*/
[36552] Fix | Delete
[36553] Fix | Delete
[36554] Fix | Delete
/**
[36555] Fix | Delete
* WordPress dependencies
[36556] Fix | Delete
*/
[36557] Fix | Delete
[36558] Fix | Delete
[36559] Fix | Delete
/**
[36560] Fix | Delete
* Internal dependencies
[36561] Fix | Delete
*/
[36562] Fix | Delete
[36563] Fix | Delete
[36564] Fix | Delete
[36565] Fix | Delete
[36566] Fix | Delete
function NavigationItemBase(props) {
[36567] Fix | Delete
var _navigationTree$getIt;
[36568] Fix | Delete
[36569] Fix | Delete
var children = props.children,
[36570] Fix | Delete
className = props.className,
[36571] Fix | Delete
restProps = Object(objectWithoutProperties["a" /* default */])(props, ["children", "className"]);
[36572] Fix | Delete
[36573] Fix | Delete
var _useState = Object(external_wp_element_["useState"])(Object(external_lodash_["uniqueId"])('item-')),
[36574] Fix | Delete
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 1),
[36575] Fix | Delete
itemId = _useState2[0];
[36576] Fix | Delete
[36577] Fix | Delete
use_navigation_tree_item_useNavigationTreeItem(itemId, props);
[36578] Fix | Delete
[36579] Fix | Delete
var _useNavigationContext = context_useNavigationContext(),
[36580] Fix | Delete
navigationTree = _useNavigationContext.navigationTree;
[36581] Fix | Delete
[36582] Fix | Delete
if (!((_navigationTree$getIt = navigationTree.getItem(itemId)) !== null && _navigationTree$getIt !== void 0 && _navigationTree$getIt._isVisible)) {
[36583] Fix | Delete
return null;
[36584] Fix | Delete
}
[36585] Fix | Delete
[36586] Fix | Delete
var classes = classnames_default()('components-navigation__item', className);
[36587] Fix | Delete
return Object(external_wp_element_["createElement"])(ItemBaseUI, Object(esm_extends["a" /* default */])({
[36588] Fix | Delete
className: classes
[36589] Fix | Delete
}, restProps), children);
[36590] Fix | Delete
}
[36591] Fix | Delete
[36592] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/item/index.js
[36593] Fix | Delete
[36594] Fix | Delete
[36595] Fix | Delete
[36596] Fix | Delete
[36597] Fix | Delete
[36598] Fix | Delete
function item_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[36599] Fix | Delete
[36600] Fix | Delete
function item_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { item_ownKeys(Object(source), true).forEach(function (key) { Object(esm_defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { item_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[36601] Fix | Delete
[36602] Fix | Delete
/**
[36603] Fix | Delete
* External dependencies
[36604] Fix | Delete
*/
[36605] Fix | Delete
[36606] Fix | Delete
[36607] Fix | Delete
/**
[36608] Fix | Delete
* WordPress dependencies
[36609] Fix | Delete
*/
[36610] Fix | Delete
[36611] Fix | Delete
[36612] Fix | Delete
[36613] Fix | Delete
/**
[36614] Fix | Delete
* Internal dependencies
[36615] Fix | Delete
*/
[36616] Fix | Delete
[36617] Fix | Delete
[36618] Fix | Delete
[36619] Fix | Delete
[36620] Fix | Delete
[36621] Fix | Delete
[36622] Fix | Delete
function NavigationItem(props) {
[36623] Fix | Delete
var badge = props.badge,
[36624] Fix | Delete
children = props.children,
[36625] Fix | Delete
className = props.className,
[36626] Fix | Delete
href = props.href,
[36627] Fix | Delete
item = props.item,
[36628] Fix | Delete
navigateToMenu = props.navigateToMenu,
[36629] Fix | Delete
_props$onClick = props.onClick,
[36630] Fix | Delete
onClick = _props$onClick === void 0 ? external_lodash_["noop"] : _props$onClick,
[36631] Fix | Delete
title = props.title,
[36632] Fix | Delete
hideIfTargetMenuEmpty = props.hideIfTargetMenuEmpty,
[36633] Fix | Delete
isText = props.isText,
[36634] Fix | Delete
restProps = Object(objectWithoutProperties["a" /* default */])(props, ["badge", "children", "className", "href", "item", "navigateToMenu", "onClick", "title", "hideIfTargetMenuEmpty", "isText"]);
[36635] Fix | Delete
[36636] Fix | Delete
var _useNavigationContext = context_useNavigationContext(),
[36637] Fix | Delete
activeItem = _useNavigationContext.activeItem,
[36638] Fix | Delete
setActiveMenu = _useNavigationContext.setActiveMenu,
[36639] Fix | Delete
isMenuEmpty = _useNavigationContext.navigationTree.isMenuEmpty; // If hideIfTargetMenuEmpty prop is true
[36640] Fix | Delete
// And the menu we are supposed to navigate to
[36641] Fix | Delete
// Is marked as empty, then we skip rendering the item
[36642] Fix | Delete
[36643] Fix | Delete
[36644] Fix | Delete
if (hideIfTargetMenuEmpty && navigateToMenu && isMenuEmpty(navigateToMenu)) {
[36645] Fix | Delete
return null;
[36646] Fix | Delete
}
[36647] Fix | Delete
[36648] Fix | Delete
var classes = classnames_default()(className, {
[36649] Fix | Delete
'is-active': item && activeItem === item
[36650] Fix | Delete
});
[36651] Fix | Delete
[36652] Fix | Delete
var onItemClick = function onItemClick(event) {
[36653] Fix | Delete
if (navigateToMenu) {
[36654] Fix | Delete
setActiveMenu(navigateToMenu);
[36655] Fix | Delete
}
[36656] Fix | Delete
[36657] Fix | Delete
onClick(event);
[36658] Fix | Delete
};
[36659] Fix | Delete
[36660] Fix | Delete
var icon = Object(external_wp_i18n_["isRTL"])() ? chevron_left["a" /* default */] : chevron_right["a" /* default */];
[36661] Fix | Delete
var baseProps = isText ? restProps : item_objectSpread({
[36662] Fix | Delete
as: build_module_button["a" /* default */],
[36663] Fix | Delete
href: href,
[36664] Fix | Delete
onClick: onItemClick
[36665] Fix | Delete
}, restProps);
[36666] Fix | Delete
return Object(external_wp_element_["createElement"])(NavigationItemBase, Object(esm_extends["a" /* default */])({}, props, {
[36667] Fix | Delete
className: classes
[36668] Fix | Delete
}), children || Object(external_wp_element_["createElement"])(ItemUI, baseProps, Object(external_wp_element_["createElement"])(NavigationItemBaseContent, {
[36669] Fix | Delete
title: title,
[36670] Fix | Delete
badge: badge
[36671] Fix | Delete
}), navigateToMenu && Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
[36672] Fix | Delete
icon: icon
[36673] Fix | Delete
})));
[36674] Fix | Delete
}
[36675] Fix | Delete
[36676] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/menu/use-navigation-tree-menu.js
[36677] Fix | Delete
[36678] Fix | Delete
[36679] Fix | Delete
function use_navigation_tree_menu_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[36680] Fix | Delete
[36681] Fix | Delete
function use_navigation_tree_menu_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { use_navigation_tree_menu_ownKeys(Object(source), true).forEach(function (key) { Object(esm_defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { use_navigation_tree_menu_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[36682] Fix | Delete
[36683] Fix | Delete
/**
[36684] Fix | Delete
* WordPress dependencies
[36685] Fix | Delete
*/
[36686] Fix | Delete
[36687] Fix | Delete
/**
[36688] Fix | Delete
* Internal dependencies
[36689] Fix | Delete
*/
[36690] Fix | Delete
[36691] Fix | Delete
[36692] Fix | Delete
[36693] Fix | Delete
var use_navigation_tree_menu_useNavigationTreeMenu = function useNavigationTreeMenu(props) {
[36694] Fix | Delete
var _useNavigationContext = context_useNavigationContext(),
[36695] Fix | Delete
_useNavigationContext2 = _useNavigationContext.navigationTree,
[36696] Fix | Delete
addMenu = _useNavigationContext2.addMenu,
[36697] Fix | Delete
removeMenu = _useNavigationContext2.removeMenu;
[36698] Fix | Delete
[36699] Fix | Delete
var key = props.menu || ROOT_MENU;
[36700] Fix | Delete
Object(external_wp_element_["useEffect"])(function () {
[36701] Fix | Delete
addMenu(key, use_navigation_tree_menu_objectSpread(use_navigation_tree_menu_objectSpread({}, props), {}, {
[36702] Fix | Delete
menu: key
[36703] Fix | Delete
}));
[36704] Fix | Delete
return function () {
[36705] Fix | Delete
removeMenu(key);
[36706] Fix | Delete
};
[36707] Fix | Delete
}, []);
[36708] Fix | Delete
};
[36709] Fix | Delete
[36710] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js
[36711] Fix | Delete
var library_search = __webpack_require__("cGtP");
[36712] Fix | Delete
[36713] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/menu/menu-title-search.js
[36714] Fix | Delete
[36715] Fix | Delete
[36716] Fix | Delete
/**
[36717] Fix | Delete
* External dependencies
[36718] Fix | Delete
*/
[36719] Fix | Delete
[36720] Fix | Delete
/**
[36721] Fix | Delete
* WordPress dependencies
[36722] Fix | Delete
*/
[36723] Fix | Delete
[36724] Fix | Delete
[36725] Fix | Delete
[36726] Fix | Delete
[36727] Fix | Delete
[36728] Fix | Delete
/**
[36729] Fix | Delete
* Internal dependencies
[36730] Fix | Delete
*/
[36731] Fix | Delete
[36732] Fix | Delete
[36733] Fix | Delete
[36734] Fix | Delete
[36735] Fix | Delete
[36736] Fix | Delete
[36737] Fix | Delete
[36738] Fix | Delete
[36739] Fix | Delete
[36740] Fix | Delete
function MenuTitleSearch(_ref) {
[36741] Fix | Delete
var debouncedSpeak = _ref.debouncedSpeak,
[36742] Fix | Delete
onCloseSearch = _ref.onCloseSearch,
[36743] Fix | Delete
onSearch = _ref.onSearch,
[36744] Fix | Delete
search = _ref.search,
[36745] Fix | Delete
title = _ref.title;
[36746] Fix | Delete
[36747] Fix | Delete
var _useNavigationContext = context_useNavigationContext(),
[36748] Fix | Delete
items = _useNavigationContext.navigationTree.items;
[36749] Fix | Delete
[36750] Fix | Delete
var _useNavigationMenuCon = context_useNavigationMenuContext(),
[36751] Fix | Delete
menu = _useNavigationMenuCon.menu;
[36752] Fix | Delete
[36753] Fix | Delete
var inputRef = Object(external_wp_element_["useRef"])(); // Wait for the slide-in animation to complete before autofocusing the input.
[36754] Fix | Delete
// This prevents scrolling to the input during the animation.
[36755] Fix | Delete
[36756] Fix | Delete
Object(external_wp_element_["useEffect"])(function () {
[36757] Fix | Delete
var delayedFocus = setTimeout(function () {
[36758] Fix | Delete
inputRef.current.focus();
[36759] Fix | Delete
}, SEARCH_FOCUS_DELAY);
[36760] Fix | Delete
return function () {
[36761] Fix | Delete
clearTimeout(delayedFocus);
[36762] Fix | Delete
};
[36763] Fix | Delete
}, []);
[36764] Fix | Delete
Object(external_wp_element_["useEffect"])(function () {
[36765] Fix | Delete
if (!search) {
[36766] Fix | Delete
return;
[36767] Fix | Delete
}
[36768] Fix | Delete
[36769] Fix | Delete
var count = Object(external_lodash_["filter"])(items, '_isVisible').length;
[36770] Fix | Delete
var resultsFoundMessage = Object(external_wp_i18n_["sprintf"])(
[36771] Fix | Delete
/* translators: %d: number of results. */
[36772] Fix | Delete
Object(external_wp_i18n_["_n"])('%d result found.', '%d results found.', count), count);
[36773] Fix | Delete
debouncedSpeak(resultsFoundMessage);
[36774] Fix | Delete
}, [items, search]);
[36775] Fix | Delete
[36776] Fix | Delete
var onClose = function onClose() {
[36777] Fix | Delete
onSearch('');
[36778] Fix | Delete
onCloseSearch();
[36779] Fix | Delete
};
[36780] Fix | Delete
[36781] Fix | Delete
function onKeyDown(event) {
[36782] Fix | Delete
if (event.keyCode === external_wp_keycodes_["ESCAPE"]) {
[36783] Fix | Delete
event.stopPropagation();
[36784] Fix | Delete
onClose();
[36785] Fix | Delete
}
[36786] Fix | Delete
}
[36787] Fix | Delete
[36788] Fix | Delete
var menuTitleId = "components-navigation__menu-title-".concat(menu);
[36789] Fix | Delete
var inputId = "components-navigation__menu-title-search-".concat(menu);
[36790] Fix | Delete
/* translators: placeholder for menu search box. %s: menu title */
[36791] Fix | Delete
[36792] Fix | Delete
var placeholder = Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('Search in %s'), title);
[36793] Fix | Delete
return Object(external_wp_element_["createElement"])(MenuTitleSearchUI, {
[36794] Fix | Delete
className: "components-navigation__menu-title-search"
[36795] Fix | Delete
}, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
[36796] Fix | Delete
icon: library_search["a" /* default */]
[36797] Fix | Delete
}), Object(external_wp_element_["createElement"])(visually_hidden["a" /* default */], {
[36798] Fix | Delete
as: "label",
[36799] Fix | Delete
htmlFor: inputId,
[36800] Fix | Delete
id: menuTitleId
[36801] Fix | Delete
}, placeholder), Object(external_wp_element_["createElement"])("input", {
[36802] Fix | Delete
autoComplete: "off",
[36803] Fix | Delete
className: "components-text-control__input",
[36804] Fix | Delete
id: inputId,
[36805] Fix | Delete
onChange: function onChange(event) {
[36806] Fix | Delete
return onSearch(event.target.value);
[36807] Fix | Delete
},
[36808] Fix | Delete
onKeyDown: onKeyDown,
[36809] Fix | Delete
placeholder: placeholder,
[36810] Fix | Delete
ref: inputRef,
[36811] Fix | Delete
type: "search",
[36812] Fix | Delete
value: search
[36813] Fix | Delete
}), Object(external_wp_element_["createElement"])(build_module_button["a" /* default */], {
[36814] Fix | Delete
isSmall: true,
[36815] Fix | Delete
isTertiary: true,
[36816] Fix | Delete
label: Object(external_wp_i18n_["__"])('Close search'),
[36817] Fix | Delete
onClick: onClose
[36818] Fix | Delete
}, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
[36819] Fix | Delete
icon: close_small["a" /* default */]
[36820] Fix | Delete
})));
[36821] Fix | Delete
}
[36822] Fix | Delete
[36823] Fix | Delete
/* harmony default export */ var menu_title_search = (with_spoken_messages(MenuTitleSearch));
[36824] Fix | Delete
[36825] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/menu/menu-title.js
[36826] Fix | Delete
[36827] Fix | Delete
[36828] Fix | Delete
[36829] Fix | Delete
/**
[36830] Fix | Delete
* WordPress dependencies
[36831] Fix | Delete
*/
[36832] Fix | Delete
[36833] Fix | Delete
[36834] Fix | Delete
[36835] Fix | Delete
/**
[36836] Fix | Delete
* Internal dependencies
[36837] Fix | Delete
*/
[36838] Fix | Delete
[36839] Fix | Delete
[36840] Fix | Delete
[36841] Fix | Delete
[36842] Fix | Delete
[36843] Fix | Delete
[36844] Fix | Delete
[36845] Fix | Delete
function NavigationMenuTitle(_ref) {
[36846] Fix | Delete
var hasSearch = _ref.hasSearch,
[36847] Fix | Delete
onSearch = _ref.onSearch,
[36848] Fix | Delete
search = _ref.search,
[36849] Fix | Delete
title = _ref.title,
[36850] Fix | Delete
titleAction = _ref.titleAction;
[36851] Fix | Delete
[36852] Fix | Delete
var _useState = Object(external_wp_element_["useState"])(false),
[36853] Fix | Delete
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
[36854] Fix | Delete
isSearching = _useState2[0],
[36855] Fix | Delete
setIsSearching = _useState2[1];
[36856] Fix | Delete
[36857] Fix | Delete
var _useNavigationMenuCon = context_useNavigationMenuContext(),
[36858] Fix | Delete
menu = _useNavigationMenuCon.menu;
[36859] Fix | Delete
[36860] Fix | Delete
var searchButtonRef = Object(external_wp_element_["useRef"])();
[36861] Fix | Delete
[36862] Fix | Delete
if (!title) {
[36863] Fix | Delete
return null;
[36864] Fix | Delete
}
[36865] Fix | Delete
[36866] Fix | Delete
var onCloseSearch = function onCloseSearch() {
[36867] Fix | Delete
setIsSearching(false); // Wait for the slide-in animation to complete before focusing the search button.
[36868] Fix | Delete
// eslint-disable-next-line @wordpress/react-no-unsafe-timeout
[36869] Fix | Delete
[36870] Fix | Delete
setTimeout(function () {
[36871] Fix | Delete
searchButtonRef.current.focus();
[36872] Fix | Delete
}, SEARCH_FOCUS_DELAY);
[36873] Fix | Delete
};
[36874] Fix | Delete
[36875] Fix | Delete
var menuTitleId = "components-navigation__menu-title-".concat(menu);
[36876] Fix | Delete
/* translators: search button label for menu search box. %s: menu title */
[36877] Fix | Delete
[36878] Fix | Delete
var searchButtonLabel = Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('Search in %s'), title);
[36879] Fix | Delete
return Object(external_wp_element_["createElement"])(MenuTitleUI, {
[36880] Fix | Delete
className: "components-navigation__menu-title"
[36881] Fix | Delete
}, !isSearching && Object(external_wp_element_["createElement"])(MenuTitleHeadingUI, {
[36882] Fix | Delete
as: "h2",
[36883] Fix | Delete
className: "components-navigation__menu-title-heading",
[36884] Fix | Delete
variant: "title.small"
[36885] Fix | Delete
}, Object(external_wp_element_["createElement"])("span", {
[36886] Fix | Delete
id: menuTitleId
[36887] Fix | Delete
}, title), (hasSearch || titleAction) && Object(external_wp_element_["createElement"])(MenuTitleActionsUI, null, titleAction, hasSearch && Object(external_wp_element_["createElement"])(build_module_button["a" /* default */], {
[36888] Fix | Delete
isSmall: true,
[36889] Fix | Delete
isTertiary: true,
[36890] Fix | Delete
label: searchButtonLabel,
[36891] Fix | Delete
onClick: function onClick() {
[36892] Fix | Delete
return setIsSearching(true);
[36893] Fix | Delete
},
[36894] Fix | Delete
ref: searchButtonRef
[36895] Fix | Delete
}, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], {
[36896] Fix | Delete
icon: library_search["a" /* default */]
[36897] Fix | Delete
})))), isSearching && Object(external_wp_element_["createElement"])("div", {
[36898] Fix | Delete
className: Object(animate["b" /* getAnimateClassName */])({
[36899] Fix | Delete
type: 'slide-in',
[36900] Fix | Delete
origin: 'left'
[36901] Fix | Delete
})
[36902] Fix | Delete
}, Object(external_wp_element_["createElement"])(menu_title_search, {
[36903] Fix | Delete
onCloseSearch: onCloseSearch,
[36904] Fix | Delete
onSearch: onSearch,
[36905] Fix | Delete
search: search,
[36906] Fix | Delete
title: title
[36907] Fix | Delete
})));
[36908] Fix | Delete
}
[36909] Fix | Delete
[36910] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/menu/search-no-results-found.js
[36911] Fix | Delete
[36912] Fix | Delete
[36913] Fix | Delete
/**
[36914] Fix | Delete
* External dependencies
[36915] Fix | Delete
*/
[36916] Fix | Delete
[36917] Fix | Delete
/**
[36918] Fix | Delete
* WordPress dependencies
[36919] Fix | Delete
*/
[36920] Fix | Delete
[36921] Fix | Delete
[36922] Fix | Delete
/**
[36923] Fix | Delete
* Internal dependencies
[36924] Fix | Delete
*/
[36925] Fix | Delete
[36926] Fix | Delete
[36927] Fix | Delete
[36928] Fix | Delete
function NavigationSearchNoResultsFound(_ref) {
[36929] Fix | Delete
var search = _ref.search;
[36930] Fix | Delete
[36931] Fix | Delete
var _useNavigationContext = context_useNavigationContext(),
[36932] Fix | Delete
items = _useNavigationContext.navigationTree.items;
[36933] Fix | Delete
[36934] Fix | Delete
var resultsCount = Object(external_lodash_["filter"])(items, '_isVisible').length;
[36935] Fix | Delete
[36936] Fix | Delete
if (!search || !!resultsCount) {
[36937] Fix | Delete
return null;
[36938] Fix | Delete
}
[36939] Fix | Delete
[36940] Fix | Delete
return Object(external_wp_element_["createElement"])(ItemBaseUI, null, Object(external_wp_element_["createElement"])(ItemUI, null, Object(external_wp_i18n_["__"])('No results found.'), " "));
[36941] Fix | Delete
}
[36942] Fix | Delete
[36943] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/navigation/menu/index.js
[36944] Fix | Delete
[36945] Fix | Delete
[36946] Fix | Delete
[36947] Fix | Delete
/**
[36948] Fix | Delete
* External dependencies
[36949] Fix | Delete
*/
[36950] Fix | Delete
[36951] Fix | Delete
/**
[36952] Fix | Delete
* WordPress dependencies
[36953] Fix | Delete
*/
[36954] Fix | Delete
[36955] Fix | Delete
[36956] Fix | Delete
/**
[36957] Fix | Delete
* Internal dependencies
[36958] Fix | Delete
*/
[36959] Fix | Delete
[36960] Fix | Delete
[36961] Fix | Delete
[36962] Fix | Delete
[36963] Fix | Delete
[36964] Fix | Delete
[36965] Fix | Delete
[36966] Fix | Delete
[36967] Fix | Delete
[36968] Fix | Delete
[36969] Fix | Delete
function NavigationMenu(props) {
[36970] Fix | Delete
var backButtonLabel = props.backButtonLabel,
[36971] Fix | Delete
children = props.children,
[36972] Fix | Delete
className = props.className,
[36973] Fix | Delete
hasSearch = props.hasSearch,
[36974] Fix | Delete
_props$menu = props.menu,
[36975] Fix | Delete
menu = _props$menu === void 0 ? ROOT_MENU : _props$menu,
[36976] Fix | Delete
onBackButtonClick = props.onBackButtonClick,
[36977] Fix | Delete
setControlledSearch = props.onSearch,
[36978] Fix | Delete
parentMenu = props.parentMenu,
[36979] Fix | Delete
controlledSearch = props.search,
[36980] Fix | Delete
isSearchDebouncing = props.isSearchDebouncing,
[36981] Fix | Delete
title = props.title,
[36982] Fix | Delete
titleAction = props.titleAction;
[36983] Fix | Delete
[36984] Fix | Delete
var _useState = Object(external_wp_element_["useState"])(''),
[36985] Fix | Delete
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
[36986] Fix | Delete
uncontrolledSearch = _useState2[0],
[36987] Fix | Delete
setUncontrolledSearch = _useState2[1];
[36988] Fix | Delete
[36989] Fix | Delete
use_navigation_tree_menu_useNavigationTreeMenu(props);
[36990] Fix | Delete
[36991] Fix | Delete
var _useNavigationContext = context_useNavigationContext(),
[36992] Fix | Delete
activeMenu = _useNavigationContext.activeMenu;
[36993] Fix | Delete
[36994] Fix | Delete
var context = {
[36995] Fix | Delete
menu: menu,
[36996] Fix | Delete
search: uncontrolledSearch
[36997] Fix | Delete
}; // Keep the children rendered to make sure invisible items are included in the navigation tree
[36998] Fix | Delete
[36999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function