| 1 |
/* |
| 2 |
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). |
| 3 |
* This devtool is neither made for production nor for readable output files. |
| 4 |
* It uses "eval()" calls to create a separate source file in the browser devtools. |
| 5 |
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) |
| 6 |
* or disable the default devtool with "devtool: false". |
| 7 |
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). |
| 8 |
*/ |
| 9 |
/******/ (() => { // webpackBootstrap |
| 10 |
/******/ "use strict"; |
| 11 |
/******/ var __webpack_modules__ = ({ |
| 12 |
|
| 13 |
/***/ "./dev/admin/wp-adminify-menu-editor.js": |
| 14 |
/*!**********************************************!*\ |
| 15 |
!*** ./dev/admin/wp-adminify-menu-editor.js ***! |
| 16 |
\**********************************************/ |
| 17 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 18 |
|
| 19 |
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _shared_icon_libraries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/icon-libraries */ \"./dev/shared/icon-libraries.js\");\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n// JS codes by WP Adminify\n\n\njQuery(function ($) {\n \"use strict\";\n\n // Shared with the other icon pickers — see dev/shared/icon-libraries.js.\n // Copied so the assets-manager removal below cannot mutate the shared object.\n var MenuEditonIconsLibrary = Object.assign({}, _shared_icon_libraries__WEBPACK_IMPORTED_MODULE_0__.ICON_LIBRARIES);\n var icons_libraries = {\n \"wp-adminify-simple-line-icons\": \"Simple Line Icons\"\n };\n Object.entries(icons_libraries).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n if (PXLBSADMINIFY_MENU_EDITOR.assets_manager.includes(key)) {\n delete MenuEditonIconsLibrary[value];\n }\n });\n $(\".icon-picker-wrap\").ai_icon_picker({\n iconLibrary: MenuEditonIconsLibrary\n });\n\n // Store global roles data (loaded once from first select)\n var globalRolesData = [];\n $('select[name=\"hidden_for\"]').first().find('optgroup:first option').each(function () {\n var val = $(this).val();\n var txt = $(this).text();\n if (val && txt) {\n globalRolesData.push({\n id: val,\n text: txt\n });\n }\n });\n\n // Initialize Select2 for role/user multiselect with AJAX user search\n function initSelect2($elements) {\n var $selects = $elements || $('select[name=\"hidden_for\"]');\n $selects.each(function () {\n var $select = $(this);\n\n // Skip if already initialized\n if ($select.hasClass('select2-hidden-accessible')) {\n return;\n }\n\n // Use global roles data for all selects\n var rolesData = globalRolesData.length > 0 ? globalRolesData : [];\n\n // If globalRolesData is empty, try to get from this select\n if (rolesData.length === 0) {\n $select.find('optgroup:first option').each(function () {\n var val = $(this).val();\n var txt = $(this).text();\n if (val && txt) {\n rolesData.push({\n id: val,\n text: txt\n });\n }\n });\n }\n $select.select2({\n placeholder: 'Select roles or users...',\n allowClear: true,\n width: '100%',\n dropdownParent: $select.closest('.column, .adminify_sub_menu_item, .adminify_menu_item').length ? $select.closest('.column, .adminify_sub_menu_item, .adminify_menu_item') : $(document.body),\n ajax: {\n url: PXLBSADMINIFY_MENU_EDITOR.ajax_url,\n dataType: 'json',\n delay: 300,\n data: function data(params) {\n return {\n action: 'pxlbsadminify_search_users',\n security: PXLBSADMINIFY_MENU_EDITOR.security,\n search: params.term || ''\n };\n },\n processResults: function processResults(data, params) {\n var searchTerm = (params.term || '').toLowerCase();\n var results = [];\n\n // Get currently selected values\n var selectedValues = $select.val() || [];\n\n // Always filter and show matching roles from loaded data\n var matchedRoles = rolesData.filter(function (role) {\n return searchTerm === '' || role.text.toLowerCase().indexOf(searchTerm) !== -1;\n }).map(function (role) {\n return {\n id: role.id,\n text: role.text,\n disabled: selectedValues.indexOf(role.id) !== -1\n };\n });\n if (matchedRoles.length > 0) {\n results.push({\n text: 'Roles',\n children: matchedRoles\n });\n }\n\n // Add users from AJAX response (only returned when 3+ characters typed)\n if (data.results && data.results.length > 0) {\n var usersWithDisabled = data.results.map(function (user) {\n return {\n id: user.id,\n text: user.text,\n disabled: selectedValues.indexOf(user.id) !== -1\n };\n });\n results.push({\n text: \"Users (\".concat((data === null || data === void 0 ? void 0 : data.total_users) || 1, \")\"),\n children: usersWithDisabled\n });\n }\n\n // Show hint if 1-2 characters typed (to search more users)\n if (searchTerm.length > 0 && searchTerm.length < 3) {\n results.push({\n text: 'Type ' + (3 - searchTerm.length) + ' more character(s) to search more users...',\n children: [],\n disabled: true,\n isHint: true\n });\n }\n return {\n results: results\n };\n },\n cache: false // Disable cache to always check selected state\n },\n minimumInputLength: 0,\n templateResult: function templateResult(item) {\n if (item.loading) {\n return 'Searching...';\n }\n // Check if this is a hint message\n if (item.isHint) {\n return $('<span class=\"select2-search-hint\">' + item.text + '</span>');\n }\n // Disabled selected items with 50% opacity\n if (item.disabled) {\n return $('<span class=\"select2-option-disabled\">' + item.text + '</span>');\n }\n return item.text;\n },\n templateSelection: function templateSelection(item) {\n return item.text || item.id;\n }\n });\n });\n }\n initSelect2();\n\n // Reset Menu Settings\n $(\".adminify_reset_menu_settings\").on(\"click\", function (e) {\n e.preventDefault();\n $.ajax({\n url: PXLBSADMINIFY_MENU_EDITOR.ajax_url,\n type: \"post\",\n data: {\n action: \"pxlbsadminify_reset_menu_settings\",\n security: PXLBSADMINIFY_MENU_EDITOR.security\n },\n success: function success(response) {\n if (response) {\n var data = JSON.parse(response);\n if (data.error) {\n $(\"#adminify-data-saved-message\").addClass(\"notification is-warning\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n $(\"#adminify-data-saved-message\").text(data.message);\n setTimeout(function () {\n $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n $(\"#adminify-data-saved-message\").removeClass(\"notification is-warning\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n }, 1500);\n } else {\n $(\"#adminify-data-saved-message\").addClass(\"notification is-primary\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n $(\"#adminify-data-saved-message\").text(data.message);\n setTimeout(function () {\n $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n $(\"#adminify-data-saved-message\").removeClass(\"notification is-primary\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n location.reload();\n }, 1500);\n }\n }\n }\n });\n });\n\n // Export Menu Settings\n $(\".adminify_export_menu_settings\").on(\"click\", function (e) {\n $.ajax({\n url: PXLBSADMINIFY_MENU_EDITOR.ajax_url,\n type: \"post\",\n data: {\n action: \"pxlbsadminify_export_menu_settings\",\n security: PXLBSADMINIFY_MENU_EDITOR.security\n },\n success: function success(response) {\n var data = response;\n var today = new Date();\n var dd = String(today.getDate()).padStart(2, \"0\");\n var mm = String(today.getMonth() + 1).padStart(2, \"0\"); // January is 0!\n var yyyy = today.getFullYear();\n var date_today = mm + \"_\" + dd + \"_\" + yyyy;\n var filename = \"wpadminify_menu_settings_\" + date_today + \".json\";\n var dataStr = \"data:text/json;charset=utf-8,\" + encodeURIComponent(data);\n var dlAnchorElem = document.getElementById(\"adminify_download_settings\");\n dlAnchorElem.setAttribute(\"href\", dataStr);\n dlAnchorElem.setAttribute(\"download\", filename);\n dlAnchorElem.click();\n }\n });\n });\n $(\".adminify_import_menu_settings\").on(\"click\", function (e) {\n e.preventDefault();\n $(\"#adminify_import_menu\").trigger(\"click\");\n });\n\n // Import Menu Settings\n $(\"#adminify_import_menu\").on(\"change\", function (e) {\n e.preventDefault();\n var thefile = $(\"#adminify_import_menu\")[0].files[0];\n if (thefile.type != \"application/json\") {\n window.alert(\"Please select a valid JSON file.\");\n return;\n }\n if (thefile.size > 100000) {\n window.alert(\"File is to big.\");\n return;\n }\n var file = document.getElementById(\"adminify_import_menu\").files[0];\n var reader = new FileReader();\n reader.readAsText(file, \"UTF-8\");\n reader.onload = function (evt) {\n var json_settings = evt.target.result,\n parsed = JSON.parse(json_settings);\n if (parsed != null) {\n $.ajax({\n url: PXLBSADMINIFY_MENU_EDITOR.ajax_url,\n type: \"post\",\n data: {\n action: \"pxlbsadminify_import_menu_settings\",\n security: PXLBSADMINIFY_MENU_EDITOR.security,\n settings: parsed\n },\n success: function success(response) {\n // var message = response;\n if (response) {\n var data = JSON.parse(response);\n if (data.error) {\n $(\"#adminify-data-saved-message\").addClass(\"notification is-warning\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n $(\"#adminify-data-saved-message\").text(data.message);\n setTimeout(function () {\n $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n $(\"#adminify-data-saved-message\").removeClass(\"notification is-warning\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n }, 1500);\n } else {\n $(\"#adminify-data-saved-message\").addClass(\"notification is-primary\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n $(\"#adminify-data-saved-message\").text(data.message);\n setTimeout(function () {\n $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n $(\"#adminify-data-saved-message\").removeClass(\"notification is-primary\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n location.reload();\n }, 1500);\n }\n }\n }\n });\n }\n };\n });\n\n // menu editor accordin title design conflict by third plugin (instagram-feed)) issue fixed\n $(\".adminify_menu_item, .adminify_sub_menu_item\").each(function (index, element) {\n if (!$(element).find(\"> a\").is(\".menu-editor-title, .accordion-button, .p-4\")) {\n $(element).find(\"> a\").attr({\n \"class\": \"menu-editor-title accordion-button p-4\"\n });\n }\n });\n var menuSettings = {};\n var removed_items = [];\n function adminify_menu_items_object() {\n // Menu Items\n $(\".adminify_menu_item\").each(function (index, element) {\n var menu_name = $(element).attr(\"name\");\n var menu_object = menuSettings[menu_name] = {};\n menuSettings[menu_name][\"order\"] = $(element).index();\n // menu_object[\"order\"] = $(element).index();\n $(element).find(\".adminify_top_level_settings .menu_setting\").each(function (index, item) {\n var setting_name = $(item).attr(\"name\"),\n value = \"\";\n if (setting_name === \"separator\") {\n if ($(item).prop(\"checked\") == true) {\n value = 1;\n } else {\n value = 0;\n }\n } else if (setting_name === \"external_link\") {\n if ($(item).prop(\"checked\") == true) {\n value = 1;\n } else {\n value = 0;\n }\n } else {\n value = $(item).val();\n }\n menu_object[setting_name] = value;\n });\n if (menu_name.includes(\"adminify-custom-menu-\")) {\n if (menu_object.link === \"\") {\n menu_object.link = \"#\".concat(menu_name);\n }\n }\n\n // pro code start\n // Top Level Live Text Changes\n var menu_id = $(element).attr(\"id\");\n $(\"#\" + menu_id + ' input[name=\"name\"]').on(\"keyup\", function () {\n var data_menu_id = $(this).data(\"top-menu-id\");\n $(\"#adminify-main-topmenu-\" + data_menu_id).text($(this).val());\n });\n // pro code end\n\n // Sub Level Menu Items\n if ($(element).find(\".adminify_sub_menu_item\").length > 0) {\n var submenu_object = menu_object[\"submenu\"] = {};\n $(element).find(\".adminify_sub_menu_item\").each(function (index, subitem) {\n var sub_menu_name = $(subitem).attr(\"name\");\n var submenu_item = submenu_object[sub_menu_name] = {};\n submenu_item[\"order\"] = $(subitem).index();\n $(subitem).find(\".sub_menu_setting\").each(function (index, subsubitem) {\n var sub_setting_name = $(subsubitem).attr(\"name\");\n var sub_value = $(subsubitem).val();\n if (sub_setting_name === \"external_link\") {\n if ($(subsubitem).prop(\"checked\") == true) {\n sub_value = 1;\n } else {\n sub_value = 0;\n }\n }\n submenu_item[sub_setting_name] = sub_value;\n });\n if (sub_menu_name.includes(\"adminify-custom-submenu-\")) {\n if (submenu_item.link === \"\") {\n submenu_item.link = \"#\".concat(sub_menu_name);\n }\n }\n });\n\n // pro code start\n // Sub Menu Level Live Text Changes\n var sub_menu_id = $(element).attr(\"id\");\n $(\"#\" + sub_menu_id + ' input[name=\"name\"]').on(\"keyup\", function () {\n var data_sub_menu_id = $(this).data(\"sub-menu-id\");\n $(\"#adminify-main-submenu-\" + data_sub_menu_id).text($(this).val());\n });\n // pro code end\n }\n });\n\n // removed parent menu items, `parent.remove()` actually doesn't remove item from this menuSettings object.\n if (removed_items.length) {\n removed_items.forEach(function (item) {\n if (item in menuSettings) {\n delete menuSettings[item];\n }\n });\n }\n }\n\n // Live Changes\n adminify_menu_items_object();\n\n // Save Settings\n $(\".adminify_menu_save_settings, .adminify-save-ajax\").on(\"click\", function (e) {\n e.preventDefault();\n adminify_menu_items_object();\n $.ajax({\n url: PXLBSADMINIFY_MENU_EDITOR.ajax_url,\n type: \"POST\",\n dataType: \"json\",\n data: {\n action: \"pxlbsadminify_save_menu_settings\",\n security: PXLBSADMINIFY_MENU_EDITOR.security,\n options: menuSettings\n },\n success: function success(response) {\n if (response) {\n var data = response;\n if (data.error) {\n $(\"#adminify-data-saved-message\").addClass(\"notification is-warning\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n $(\"#adminify-data-saved-message\").text(data.message);\n setTimeout(function () {\n $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n $(\"#adminify-data-saved-message\").removeClass(\"notification is-warning\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n }, 1500);\n } else {\n $(\"#adminify-data-saved-message\").addClass(\"notification is-primary\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"block\");\n $(\"#adminify-data-saved-message\").text(data.message);\n setTimeout(function () {\n $(\"#adminify-data-saved-message\").fadeOut(\"fast\");\n $(\"#adminify-data-saved-message\").removeClass(\"notification is-primary\");\n $(\"#adminify-data-saved-message\").css(\"display\", \"none\");\n }, 1500);\n }\n }\n }\n });\n });\n\n // Menu Item Sort\n $(\".wp-adminify--menu--editor--settings\").sortable({\n handle: \".menu-editor-title svg\"\n });\n\n // Menu Item Submenu Sort\n $(\".wp-adminify--menu--editor--settings > .adminify_menu_item > .accordion-body > .tab-content > .tab-pane--submenu\").sortable({\n handle: \".menu-editor-title svg\"\n });\n\n // Submenu Item Tabs\n $(\".tab-content > div:not(.wp-adminify-page-speed-wrapper > div,.remove-add-new-menu)\").hide();\n $(\".tab-content > div:first-of-type\").show();\n $(\"body\").on(\"click\", \".nav-tabs a:not(.wp-adminify-page-speed-wrapper a)\", function (e // $('.nav-tabs a:not(.wp-adminify-page-speed-wrapper a)').click(function (e)\n ) {\n e.preventDefault();\n var $this = $(this),\n tabgroup = \"#\" + $this.parents(\".nav-tabs\").data(\"tab-content\"),\n others = $this.closest(\"li\").siblings().children(\"a\"),\n target = $this.attr(\"href\");\n others.removeClass(\"active\");\n $this.addClass(\"active\");\n $(tabgroup).children(\"div\").hide();\n $(target).show();\n $(target).siblings().hide();\n\n // Reinitialize Select2 on visible tab if not already initialized\n setTimeout(function () {\n $(target).find('select[name=\"hidden_for\"]').each(function () {\n var $sel = $(this);\n if (!$sel.hasClass('select2-hidden-accessible')) {\n initSelect2($sel);\n }\n });\n }, 50);\n });\n\n /**\n * Add New Menu Item to Menu Editor\n */\n if (PXLBSADMINIFY_MENU_EDITOR.can_use_premium) {\n $(\".wp-adminify--menu--editor--settings\").on(\"click\", \".adminify-add-new-menu-editor-item\", function (e) {\n e.preventDefault();\n var $this = $(this),\n $submenu = $(this).hasClass(\"submenu\") || false,\n $repeater = $this.closest(\".wp-adminify--menu--editor--settings\").find(\".adminify_menu_item\"),\n count = $repeater.length,\n $clone = $repeater.first().clone();\n\n // var randomNumber = Math.floor(Math.random() * 26) + Date.now();\n var randomNumber = Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(2);\n\n // Set name, id attribute for newly created custom menu item\n var uniqueId = \"adminify-custom-menu-\" + randomNumber;\n var menuNewId = $clone.attr(\"id\").slice(0, 25) + uniqueId;\n if ($submenu) {\n $clone.attr(\"class\", \"adminify-accordion adminify_sub_menu_item\");\n $clone.find(\".accordion-body\").attr(\"class\", \"accordion-body\");\n $clone.find(\".menu_setting\").attr(\"class\", \"sub_menu_setting\");\n $clone.find(\".tabs.tabbable,.tab-pane--submenu\").remove();\n $clone.find(\".tab-content .tab-pane:nth-child(1)\").show();\n $clone.find(\"select.sub_menu_setting\").addClass(\"adminify-menu-settings\");\n $clone.find(\".icon-picker-wrap\").siblings(\"label\").html(\"Set Custom Icon <i>(Not available for Submenu.)</i>\");\n $clone.find(\".icon-picker-wrap\").removeClass(\"is-clickable\").addClass(\"is-clickable-no\");\n $clone.find(\".menu-editor-form .columns:nth-child(3)\").remove();\n count += $(this).siblings().length + 2;\n uniqueId = \"adminify-custom-submenu-\" + randomNumber;\n menuNewId = \"wp-adminify-sub-menu-menu\" + uniqueId;\n }\n $this.siblings().find(\".menu-editor-title\").removeClass(\"show\");\n $this.siblings().find(\".accordion-body\").removeClass(\"show\").hide();\n var newTitle = \"Custom Menu\";\n $clone.attr({\n id: menuNewId,\n name: uniqueId\n });\n var svg_drag_icon = $(\"<svg class = \\\"drag-icon is-pulled-left mr-2 ui-sortable-handle\\\" width = \\\"24\\\" height = \\\"24\\\" viewBox = \\\"0 0 24 24\\\" fill = \\\"none\\\" xmlns = \\\"http://www.w3.org/2000/svg\\\" >\\n\\t\\t\\t\\t\\t<path d = \\\"M12 14C13.1046 14 14 13.1046 14 12C14 10.8954 13.1046 10 12 10C10.8954 10 10 10.8954 10 12C10 13.1046 10.8954 14 12 14Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d = \\\"M12 7C13.1046 7 14 6.10457 14 5C14 3.89543 13.1046 3 12 3C10.8954 3 10 3.89543 10 5C10 6.10457 10.8954 7 12 7Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d = \\\"M12 21C13.1046 21 14 20.1046 14 19C14 17.8954 13.1046 17 12 17C10.8954 17 10 17.8954 10 19C10 20.1046 10.8954 21 12 21Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d = \\\"M5 14C6.10457 14 7 13.1046 7 12C7 10.8954 6.10457 10 5 10C3.89543 10 3 10.8954 3 12C3 13.1046 3.89543 14 5 14Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d = \\\"M5 7C6.10457 7 7 6.10457 7 5C7 3.89543 6.10457 3 5 3C3.89543 3 3 3.89543 3 5C3 6.10457 3.89543 7 5 7Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d = \\\"M5 21C6.10457 21 7 20.1046 7 19C7 17.8954 6.10457 17 5 17C3.89543 17 3 17.8954 3 19C3 20.1046 3.89543 21 5 21Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d = \\\"M19 14C20.1046 14 21 13.1046 21 12C21 10.8954 20.1046 10 19 10C17.8954 10 17 10.8954 17 12C17 13.1046 17.8954 14 19 14Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d = \\\"M19 7C20.1046 7 21 6.10457 21 5C21 3.89543 20.1046 3 19 3C17.8954 3 17 3.89543 17 5C17 6.10457 17.8954 7 19 7Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t<path d = \\\"M19 21C20.1046 21 21 20.1046 21 19C21 17.8954 20.1046 17 19 17C17.8954 17 17 17.8954 17 19C17 20.1046 17.8954 21 19 21Z\\\" fill = \\\"#4E4B66\\\" fill - opacity = \\\"0.72\\\" > </path>\\n\\t\\t\\t\\t\\t</svg >\");\n $clone.find(\"> .menu-editor-title\").html(svg_drag_icon).append(newTitle);\n $clone.find(\".nav-tabs li\").each(function (index) {\n var id = \"#tab-\" + uniqueId + \"-\" + index;\n $(this).find(\".nav-link\").attr(\"href\", id);\n });\n var default_icon = $(\" <img width=\\\"24\\\" height=\\\"24\\\" src = \\\"\".concat(PXLBSADMINIFY_MENU_EDITOR.icon_picker_logo, \"\\\"/> \"));\n $clone.find(\".icon-picker .select-icon\").addClass(\"custom-icon\");\n $clone.find(\".icon-picker .select-icon i\").attr(\"class\", \"\").html(default_icon);\n $clone.find(\".tab-content .tab-pane\").each(function (index) {\n if ($(this).attr(\"id\") !== undefined) {\n var id = \"tab-\" + uniqueId + \"-\" + index;\n $(this).attr(\"id\", id);\n }\n if ($(this).hasClass(\"tab-pane--submenu\") == true) {\n $(this).find(\".adminify_sub_menu_item\").each(function () {\n $(this).remove();\n });\n $(this).prepend($(\"<span>No submenu items are left.</span>\"));\n }\n });\n $clone.find(\".menu-editor-form .column\").each(function () {\n $(this).find(\"label\").attr(\"for\", uniqueId);\n $(this).find('[name=\"name\"]').attr({\n \"data-top-menu-id\": uniqueId,\n placeholder: newTitle,\n value: newTitle\n });\n $(this).find('[name=\"separator\"]').attr({\n id: uniqueId\n });\n });\n $clone.find('[name=\"separator\"]').prop(\"checked\", false).val(0);\n $clone.find(\".adminify-menu-settings.menu_setting\").prop('selectedIndex', -1);\n\n // Reinitialize Select2 for the cloned element with AJAX\n var $clonedSelect = $clone.find('select[name=\"hidden_for\"]');\n\n // Remove ALL Select2 related elements and attributes from the clone\n // This prevents conflicts with the original Select2 instances\n $clone.find('.select2-container').remove();\n $clone.find('[data-select2-id]').removeAttr('data-select2-id');\n $clone.find('.select2').removeClass('select2');\n\n // Clean up the select element specifically\n $clonedSelect.removeClass('select2-hidden-accessible');\n $clonedSelect.removeAttr('data-select2-id');\n $clonedSelect.removeAttr('aria-hidden');\n $clonedSelect.removeAttr('tabindex');\n $clonedSelect.css('display', ''); // Reset display\n\n // Clear selections and options in Users optgroup\n $clonedSelect.find('option:selected').prop('selected', false);\n $clonedSelect.find('.adminify-users-optgroup').empty();\n\n // Small delay to ensure DOM is ready before initializing Select2\n setTimeout(function () {\n initSelect2($clonedSelect);\n }, 10);\n var remove_icon = $(\"<div class = \\\"remove-add-new-menu\\\" > <span data-id = \\\"\".concat(uniqueId, \"\\\"> <i class=\\\"icon-close\\\"> </i> Delete </span > </div>\"));\n $clone.find(\".tab-content .tab-pane:nth-child(1)\").append(remove_icon);\n $clone.find(\".menu-editor-title\").addClass(\"show\");\n $clone.find(\".accordion-body\").addClass(\"show\").css(\"display\", \"block\");\n $this.prev(\"span\").remove();\n $clone.insertBefore($this);\n\n // Refresh all existing Select2 instances to prevent corruption\n // This ensures original Select2 instances still work after cloning\n $('select[name=\"hidden_for\"].select2-hidden-accessible').each(function () {\n var $existingSelect = $(this);\n // Check if Select2 container exists and is visible\n var $container = $existingSelect.next('.select2-container');\n if ($container.length === 0) {\n // Container missing, reinitialize\n $existingSelect.removeClass('select2-hidden-accessible');\n $existingSelect.removeAttr('data-select2-id');\n initSelect2($existingSelect);\n }\n });\n });\n\n // remove add new icon\n $(\"body\").on(\"click\", \".remove-add-new-menu span\", function (e) {\n var $this = $(this);\n var id = $this.data(\"id\");\n var parent = $this.parent(\".remove-add-new-menu\").parent(\".tab-pane\").parent(\".tab-content\").parent(\".accordion-body\").parent(\".accordion\");\n if (parent.hasClass(\"adminify_sub_menu_item\")) {\n var num_of_element = parent.siblings(\".adminify_sub_menu_item\").length;\n if (num_of_element < 1) {\n parent.parent(\".tab-pane--submenu\").prepend($(\"<span> No submenu items are left.</span>\"));\n }\n }\n if (parent.attr(\"name\") === id) {\n parent.remove(); // this doesn't atually remove the items from menuSettings object L276\n removed_items = [].concat(_toConsumableArray(removed_items), [id]);\n }\n });\n }\n\n /**\n * The custom icon uploader (browse button, file input and drag & drop) now\n * lives in the picker itself - dev/vendors/adminify-icon-picker - so every\n * screen that uses the picker gets it, not just the Menu Editor.\n */\n});\n\n//# sourceURL=webpack://adminify/./dev/admin/wp-adminify-menu-editor.js?"); |
| 20 |
|
| 21 |
/***/ }), |
| 22 |
|
| 23 |
/***/ "./dev/shared/icon-libraries.js": |
| 24 |
/*!**************************************!*\ |
| 25 |
!*** ./dev/shared/icon-libraries.js ***! |
| 26 |
\**************************************/ |
| 27 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 28 |
|
| 29 |
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ICON_LIBRARIES: () => (/* binding */ ICON_LIBRARIES)\n/* harmony export */ });\n/**\n * Icon libraries shared by every WP Adminify icon picker.\n *\n * The picker itself (assets/vendors/adminify-icon-picker) only ships Dashicons.\n * Anything else is handed to it through the `iconLibrary` option, so the list\n * lives here rather than inside a single consumer's bundle.\n */\nvar ICON_LIBRARIES = {\n \"Simple Line Icons\": {\n \"\": {\n prefix: \"icon-\",\n \"list-icon\": \"icon-heart\",\n \"icon-style\": \"simple-line-icons\",\n icons: [\"icon-user\", \"icon-people\", \"icon-user-female\", \"icon-user-follow\", \"icon-user-following\", \"icon-user-unfollow\", \"icon-login\", \"icon-logout\", \"icon-emotsmile\", \"icon-phone\", \"icon-call-end\", \"icon-call-in\", \"icon-call-out\", \"icon-map\", \"icon-location-pin\", \"icon-direction\", \"icon-directions\", \"icon-compass\", \"icon-layers\", \"icon-menu\", \"icon-list\", \"icon-options-vertical\", \"icon-options\", \"icon-arrow-down\", \"icon-arrow-left\", \"icon-arrow-right\", \"icon-arrow-up\", \"icon-arrow-up-circle\", \"icon-arrow-left-circle\", \"icon-arrow-right-circle\", \"icon-arrow-down-circle\", \"icon-check\", \"icon-clock\", \"icon-plus\", \"icon-minus\", \"icon-close\", \"icon-event\", \"icon-exclamation\", \"icon-organization\", \"icon-trophy\", \"icon-screen-smartphone\", \"icon-screen-desktop\", \"icon-plane\", \"icon-notebook\", \"icon-mustache\", \"icon-mouse\", \"icon-magnet\", \"icon-energy\", \"icon-disc\", \"icon-cursor\", \"icon-cursor-move\", \"icon-crop\", \"icon-chemistry\", \"icon-speedometer\", \"icon-shield\", \"icon-screen-tablet\", \"icon-magic-wand\", \"icon-hourglass\", \"icon-graduation\", \"icon-ghost\", \"icon-game-controller\", \"icon-fire\", \"icon-eyeglass\", \"icon-envelope-open\", \"icon-envelope-letter\", \"icon-bell\", \"icon-badge\", \"icon-anchor\", \"icon-wallet\", \"icon-vector\", \"icon-speech\", \"icon-puzzle\", \"icon-printer\", \"icon-present\", \"icon-playlist\", \"icon-pin\", \"icon-picture\", \"icon-handbag\", \"icon-globe-alt\", \"icon-globe\", \"icon-folder-alt\", \"icon-folder\", \"icon-film\", \"icon-feed\", \"icon-drop\", \"icon-drawer\", \"icon-docs\", \"icon-doc\", \"icon-diamond\", \"icon-cup\", \"icon-calculator\", \"icon-bubbles\", \"icon-briefcase\", \"icon-book-open\", \"icon-basket-loaded\", \"icon-basket\", \"icon-bag\", \"icon-action-undo\", \"icon-action-redo\", \"icon-wrench\", \"icon-umbrella\", \"icon-trash\", \"icon-tag\", \"icon-support\", \"icon-frame\", \"icon-size-fullscreen\", \"icon-size-actual\", \"icon-shuffle\", \"icon-share-alt\", \"icon-share\", \"icon-rocket\", \"icon-question\", \"icon-pie-chart\", \"icon-pencil\", \"icon-note\", \"icon-loop\", \"icon-home\", \"icon-grid\", \"icon-graph\", \"icon-microphone\", \"icon-music-tone-alt\", \"icon-music-tone\", \"icon-earphones-alt\", \"icon-earphones\", \"icon-equalizer\", \"icon-like\", \"icon-dislike\", \"icon-control-start\", \"icon-control-rewind\", \"icon-control-play\", \"icon-control-pause\", \"icon-control-forward\", \"icon-control-end\", \"icon-volume-1\", \"icon-volume-2\", \"icon-volume-off\", \"icon-calendar\", \"icon-bulb\", \"icon-chart\", \"icon-ban\", \"icon-bubble\", \"icon-camrecorder\", \"icon-camera\", \"icon-cloud-download\", \"icon-cloud-upload\", \"icon-envelope\", \"icon-eye\", \"icon-flag\", \"icon-heart\", \"icon-info\", \"icon-key\", \"icon-link\", \"icon-lock\", \"icon-lock-open\", \"icon-magnifier\", \"icon-magnifier-add\", \"icon-magnifier-remove\", \"icon-paper-clip\", \"icon-paper-plane\", \"icon-power\", \"icon-refresh\", \"icon-reload\", \"icon-settings\", \"icon-star\", \"icon-symbol-female\", \"icon-symbol-male\", \"icon-target\", \"icon-credit-card\", \"icon-paypal\", \"icon-social-tumblr\", \"icon-social-twitter\", \"icon-social-facebook\", \"icon-social-instagram\", \"icon-social-linkedin\", \"icon-social-pinterest\", \"icon-social-github\", \"icon-social-google\", \"icon-social-reddit\", \"icon-social-skype\", \"icon-social-dribbble\", \"icon-social-behance\", \"icon-social-foursqare\", \"icon-social-soundcloud\", \"icon-social-spotify\", \"icon-social-stumbleupon\", \"icon-social-youtube\", \"icon-social-dropbox\", \"icon-social-vkontakte\", \"icon-social-steam\"]\n }\n }\n};\n\n//# sourceURL=webpack://adminify/./dev/shared/icon-libraries.js?"); |
| 30 |
|
| 31 |
/***/ }) |
| 32 |
|
| 33 |
/******/ }); |
| 34 |
/************************************************************************/ |
| 35 |
/******/ // The module cache |
| 36 |
/******/ var __webpack_module_cache__ = {}; |
| 37 |
/******/ |
| 38 |
/******/ // The require function |
| 39 |
/******/ function __webpack_require__(moduleId) { |
| 40 |
/******/ // Check if module is in cache |
| 41 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 42 |
/******/ if (cachedModule !== undefined) { |
| 43 |
/******/ return cachedModule.exports; |
| 44 |
/******/ } |
| 45 |
/******/ // Create a new module (and put it into the cache) |
| 46 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
| 47 |
/******/ // no module.id needed |
| 48 |
/******/ // no module.loaded needed |
| 49 |
/******/ exports: {} |
| 50 |
/******/ }; |
| 51 |
/******/ |
| 52 |
/******/ // Execute the module function |
| 53 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 54 |
/******/ |
| 55 |
/******/ // Return the exports of the module |
| 56 |
/******/ return module.exports; |
| 57 |
/******/ } |
| 58 |
/******/ |
| 59 |
/************************************************************************/ |
| 60 |
/******/ /* webpack/runtime/define property getters */ |
| 61 |
/******/ (() => { |
| 62 |
/******/ // define getter functions for harmony exports |
| 63 |
/******/ __webpack_require__.d = (exports, definition) => { |
| 64 |
/******/ for(var key in definition) { |
| 65 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
| 66 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
| 67 |
/******/ } |
| 68 |
/******/ } |
| 69 |
/******/ }; |
| 70 |
/******/ })(); |
| 71 |
/******/ |
| 72 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 73 |
/******/ (() => { |
| 74 |
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
| 75 |
/******/ })(); |
| 76 |
/******/ |
| 77 |
/******/ /* webpack/runtime/make namespace object */ |
| 78 |
/******/ (() => { |
| 79 |
/******/ // define __esModule on exports |
| 80 |
/******/ __webpack_require__.r = (exports) => { |
| 81 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
| 82 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 83 |
/******/ } |
| 84 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 85 |
/******/ }; |
| 86 |
/******/ })(); |
| 87 |
/******/ |
| 88 |
/************************************************************************/ |
| 89 |
/******/ |
| 90 |
/******/ // startup |
| 91 |
/******/ // Load entry module and return exports |
| 92 |
/******/ // This entry module can't be inlined because the eval devtool is used. |
| 93 |
/******/ var __webpack_exports__ = __webpack_require__("./dev/admin/wp-adminify-menu-editor.js"); |
| 94 |
/******/ |
| 95 |
/******/ })() |
| 96 |
; |