packages
1 month ago
00f53f1b378f6c98c043.bundle.min.js
4 months ago
0352e30f394e8e1dd4dc.bundle.js
2 months ago
0982f37bec0944fbcb10.bundle.js
4 months ago
0bc41c4656ca54cf2aca.bundle.min.js
4 months ago
137ba3baf43f287996c2.bundle.min.js
4 months ago
1564d2bfa4591bf857f3.bundle.min.js
4 months ago
197583acd246fea0e25d.bundle.js
5 months ago
1f7fa1d64dd4cef4a3c0.bundle.js
4 months ago
2140afa714e988f1069e.bundle.js
2 months ago
32f7c5e8db4c8976b254.bundle.js
2 months ago
35423d812dc1d52fdb27.bundle.min.js
4 months ago
397f2d183c19202777d6.bundle.min.js
3 months ago
397f2d183c19202777d6.bundle.min.js.LICENSE.txt
3 months ago
3c18b6eb4e735ca7e8bf.bundle.js
4 months ago
3c838288a9b7ddd2aea4.bundle.min.js
4 months ago
3d1613aca86991103452.bundle.min.js
4 months ago
3d410a099008411bb011.bundle.js
5 months ago
3df4dbb5d612dbdab477.bundle.min.js
2 months ago
40d841f4b4ce7b1928f5.bundle.js
4 months ago
4246c56134ca9ba65163.bundle.js
4 months ago
435080452e81c388e779.bundle.min.js
2 months ago
4812775bcbc0ff8a9043.bundle.min.js
4 months ago
4886b33c17731474e197.bundle.min.js
4 months ago
4927500be197e062162e.bundle.min.js
2 months ago
52ff17c2f566e528dc72.bundle.js
2 months ago
5b13d0f77c0ac139c979.bundle.js
4 months ago
5b74c81f4d425912a202.bundle.min.js
2 months ago
6117d083decd13b6ed73.bundle.js
2 months ago
64b3c0850f66b46478fb.bundle.min.js
2 months ago
6844b6c0a66040e3ca12.bundle.js
2 months ago
6a19e86dd8c1f9165dbe.bundle.js
5 months ago
6caa76d2f6eec6c4e665.bundle.js
3 months ago
6cb9e42b9b73a76315e0.bundle.js
4 months ago
6d09ff0398a56a60654b.bundle.min.js
3 months ago
6f779545aaa23e951088.bundle.min.js
2 months ago
72459a35b6570acc77f3.bundle.js
4 months ago
7745b82dc4a05385ef1f.bundle.js
4 months ago
78dd4dee6173d40eb75a.bundle.min.js
2 months ago
7dae73b622bebe8a5d94.bundle.js
4 months ago
7f2c78456ab3f406f3df.bundle.js
4 months ago
8277989eebcfba278cb0.bundle.min.js
7 months ago
84288e5699f5d8b8b23e.bundle.min.js
4 months ago
877227b9d759b63096a9.bundle.js
4 months ago
8ac2c6e532225b54dba2.bundle.js
4 months ago
8b4f35f99eb521b37d0c.bundle.js
4 months ago
8e5b42844d27eada9b53.bundle.min.js
2 months ago
8e80438d29fc79b648e5.bundle.js
2 months ago
8e8b47ad5b4e4d038c80.bundle.js
4 months ago
8ecfd8495b7ec419862a.bundle.js
4 months ago
979a9c03fe10da23400d.bundle.js
2 months ago
9832c866a8fe9b51f9d2.bundle.min.js
4 months ago
9b97a73ee8fdc5fb7dc3.bundle.js
3 months ago
9bd390911e34b349d8cb.bundle.min.js
2 months ago
9dcd9e88237da6496816.bundle.min.js
4 months ago
9e7e356552c03a622b0f.bundle.js
2 months ago
a2ea929f439e819b924b.bundle.min.js
4 months ago
a9f41949787209626737.bundle.min.js
4 months ago
ac53273f887639e3c6ea.bundle.min.js
4 months ago
accordion.8b0db5058afeb74622f5.bundle.min.js
7 months ago
accordion.b9a0ab19c7c872c405d7.bundle.js
5 months ago
admin-feedback.js
7 months ago
admin-feedback.min.js
7 months ago
admin-feedback.strings.js
2 months ago
admin-modules.js
5 months ago
admin-modules.min.js
5 months ago
admin-modules.min.js.LICENSE.txt
10 months ago
admin-modules.strings.js
1 month ago
admin-notifications.js
7 months ago
admin-notifications.min.js
7 months ago
admin-notifications.strings.js
5 months ago
admin-top-bar.js
2 months ago
admin-top-bar.min.js
2 months ago
admin-top-bar.strings.js
5 months ago
admin.js
2 months ago
admin.min.js
2 months ago
admin.min.js.LICENSE.txt
10 months ago
admin.strings.js
5 months ago
aee13673e923469c3275.bundle.min.js
4 months ago
ai-admin.js
5 months ago
ai-admin.min.js
5 months ago
ai-admin.min.js.LICENSE.txt
10 months ago
ai-admin.strings.js
5 months ago
ai-gutenberg.js
5 months ago
ai-gutenberg.min.js
5 months ago
ai-gutenberg.min.js.LICENSE.txt
10 months ago
ai-gutenberg.strings.js
5 months ago
ai-layout.js
3 months ago
ai-layout.min.js
3 months ago
ai-layout.min.js.LICENSE.txt
10 months ago
ai-layout.strings.js
2 months ago
ai-media-library.js
5 months ago
ai-media-library.min.js
5 months ago
ai-media-library.min.js.LICENSE.txt
10 months ago
ai-media-library.strings.js
5 months ago
ai-unify-product-images.js
5 months ago
ai-unify-product-images.min.js
5 months ago
ai-unify-product-images.min.js.LICENSE.txt
10 months ago
ai-unify-product-images.strings.js
5 months ago
ai.js
5 months ago
ai.min.js
5 months ago
ai.min.js.LICENSE.txt
10 months ago
ai.strings.js
1 month ago
alert.42cc1d522ef5c60bf874.bundle.min.js
7 months ago
alert.fd509aa768e7b35a8e32.bundle.js
5 months ago
announcements-app.js
2 months ago
announcements-app.min.js
2 months ago
announcements-app.min.js.LICENSE.txt
10 months ago
announcements-app.strings.js
5 months ago
app-loader.js
5 months ago
app-loader.min.js
7 months ago
app-loader.strings.js
1 month ago
app-packages.js
4 months ago
app-packages.min.js
4 months ago
app-packages.min.js.LICENSE.txt
10 months ago
app-packages.strings.js
1 month ago
app.js
2 months ago
app.min.js
2 months ago
app.min.js.LICENSE.txt
10 months ago
app.strings.js
1 month ago
atomic-widgets-editor.js
1 month ago
atomic-widgets-editor.min.js
1 month ago
atomic-widgets-editor.min.js.LICENSE.txt
4 months ago
atomic-widgets-editor.strings.js
2 months ago
atomic-widgets-frontend-handler.js
1 month ago
atomic-widgets-frontend-handler.min.js
1 month ago
b09b262748a4be8417ce.bundle.js
4 months ago
b668f6906820570e60b5.bundle.min.js
4 months ago
b96d70044d0d67c2df19.bundle.min.js
7 months ago
b97ced1683f62f5686fa.bundle.min.js
4 months ago
bcb5135af6b817bc9708.bundle.min.js
2 months ago
beta-tester.js
7 months ago
beta-tester.min.js
7 months ago
beta-tester.strings.js
5 months ago
bff204c1ab0d15e0a69b.bundle.min.js
4 months ago
c13d205fa26f8af1ce7c.bundle.js
5 months ago
cf6ec600fcf4e08ba6d3.bundle.js
4 months ago
checklist.js
5 months ago
checklist.min.js
5 months ago
checklist.min.js.LICENSE.txt
10 months ago
checklist.strings.js
5 months ago
cloud-library-screenshot.js
5 months ago
cloud-library-screenshot.min.js
5 months ago
cloud-library-screenshot.min.js.LICENSE.txt
7 months ago
cloud-library-screenshot.strings.js
5 months ago
common-modules.js
2 months ago
common-modules.min.js
2 months ago
common-modules.strings.js
5 months ago
common.js
1 month ago
common.min.js
1 month ago
common.min.js.LICENSE.txt
10 months ago
common.strings.js
5 months ago
contact-buttons.086261d3e9c4d8037686.bundle.js
5 months ago
contact-buttons.e98d0220ce8c38404e7e.bundle.min.js
7 months ago
container-converter.js
7 months ago
container-converter.min.js
7 months ago
container-converter.strings.js
5 months ago
container-editor-handlers.a2e8e48d28c5544fb183.bundle.min.js
4 months ago
container-editor-handlers.e7e069c4e656425c51f8.bundle.js
4 months ago
counter.12335f45aaa79d244f24.bundle.min.js
7 months ago
counter.7310c276bc7865a3d438.bundle.js
5 months ago
d245aa80c28d9ec3617d.bundle.js
2 months ago
d42de03ef4a0f50e39ca.bundle.min.js
4 months ago
d4c67aa71d8173f6201f.bundle.js
2 months ago
d52aa05c75af56327744.bundle.js
5 months ago
d67ddd6f08b08392c42f.bundle.js
5 months ago
daedc6797eaad5c82711.bundle.min.js
7 months ago
db27207322ef9be952ee.bundle.js
4 months ago
design-system-sync.js
1 month ago
design-system-sync.min.js
1 month ago
design-system-sync.strings.js
2 months ago
dev-tools.js
7 months ago
dev-tools.min.js
7 months ago
dev-tools.strings.js
5 months ago
df2f2a2ae20e0181ec2d.bundle.js
2 months ago
e-home-screen.js
2 months ago
e-home-screen.min.js
2 months ago
e-home-screen.strings.js
2 months ago
e-react-promotions.js
1 month ago
e-react-promotions.min.js
1 month ago
e-react-promotions.min.js.LICENSE.txt
1 month ago
e-react-promotions.strings.js
5 months ago
e-wc-product-editor.js
5 months ago
e-wc-product-editor.min.js
7 months ago
e-wc-product-editor.min.js.LICENSE.txt
1 year ago
e-wc-product-editor.strings.js
5 months ago
e1cb4d726bb59646c677.bundle.min.js
7 months ago
e3b540e2c02813e75f38.bundle.min.js
4 months ago
e459c6c89c0c0899c850.bundle.js
5 months ago
e7d71f4e1d39edbc1fb6.bundle.js
4 months ago
eb5018119ee87fd6a7fc.bundle.min.js
2 months ago
editor-document.js
5 months ago
editor-document.min.js
7 months ago
editor-document.strings.js
1 month ago
editor-environment-v2.js
7 months ago
editor-environment-v2.min.js
7 months ago
editor-environment-v2.strings.js
5 months ago
editor-interactions.js
2 months ago
editor-interactions.min.js
2 months ago
editor-interactions.strings.js
5 months ago
editor-loader-v1.js
7 months ago
editor-loader-v1.min.js
7 months ago
editor-loader-v1.strings.js
5 months ago
editor-loader-v2.js
7 months ago
editor-loader-v2.min.js
7 months ago
editor-loader-v2.strings.js
5 months ago
editor-modules.js
2 months ago
editor-modules.min.js
2 months ago
editor-modules.min.js.LICENSE.txt
10 months ago
editor-modules.strings.js
1 month ago
editor-notifications.js
7 months ago
editor-notifications.min.js
7 months ago
editor-notifications.strings.js
5 months ago
editor-one-admin.js
5 months ago
editor-one-admin.min.js
5 months ago
editor-one-admin.strings.js
5 months ago
editor-one-menu.js
4 months ago
editor-one-menu.min.js
4 months ago
editor-one-menu.strings.js
5 months ago
editor-one-sidebar-navigation.js
2 months ago
editor-one-sidebar-navigation.min.js
2 months ago
editor-one-sidebar-navigation.min.js.LICENSE.txt
5 months ago
editor-one-sidebar-navigation.strings.js
5 months ago
editor-one-top-bar.js
2 months ago
editor-one-top-bar.min.js
2 months ago
editor-one-top-bar.min.js.LICENSE.txt
4 months ago
editor-one-top-bar.strings.js
4 months ago
editor-v4-opt-in-alphachip.js
2 months ago
editor-v4-opt-in-alphachip.min.js
2 months ago
editor-v4-opt-in-alphachip.strings.js
2 months ago
editor-v4-opt-in.js
2 months ago
editor-v4-opt-in.min.js
2 months ago
editor-v4-opt-in.min.js.LICENSE.txt
5 months ago
editor-v4-opt-in.strings.js
2 months ago
editor.js
1 month ago
editor.min.js
1 month ago
editor.min.js.LICENSE.txt
5 months ago
editor.strings.js
5 months ago
ef2100ac3eda1a957819.bundle.min.js
7 months ago
ef35c83e4628f0a5c328.bundle.js
4 months ago
element-manager-admin.js
2 months ago
element-manager-admin.min.js
2 months ago
element-manager-admin.min.js.LICENSE.txt
10 months ago
element-manager-admin.strings.js
2 months ago
elementor-admin-bar.js
7 months ago
elementor-admin-bar.min.js
7 months ago
elementor-admin-bar.strings.js
5 months ago
f56b0d1257a5346afe64.bundle.min.js
2 months ago
fdda4547e887fbda71b3.bundle.js
2 months ago
fdf69f4e1f300fb27472.bundle.min.js
2 months ago
floating-bars.740d06d17cea5cebdb61.bundle.min.js
7 months ago
floating-bars.a6e6a043444b62f64f82.bundle.js
5 months ago
floating-elements-modal.js
2 months ago
floating-elements-modal.min.js
2 months ago
floating-elements-modal.strings.js
5 months ago
frontend-modules.js
2 months ago
frontend-modules.min.js
2 months ago
frontend.js
3 months ago
frontend.min.js
3 months ago
gutenberg.js
7 months ago
gutenberg.min.js
7 months ago
gutenberg.strings.js
2 months ago
image-carousel.6167d20b95b33386757b.bundle.min.js
7 months ago
image-carousel.8b25f3674c29b829a867.bundle.js
5 months ago
import-export-admin.js
5 months ago
import-export-admin.min.js
5 months ago
import-export-admin.strings.js
1 month ago
import-export-customization-admin.js
2 months ago
import-export-customization-admin.min.js
2 months ago
import-export-customization-admin.min.js.LICENSE.txt
7 months ago
import-export-customization-admin.strings.js
1 month ago
interactions-shared-utils.js
2 months ago
interactions-shared-utils.min.js
2 months ago
interactions-shared-utils.strings.js
2 months ago
interactions.js
1 month ago
interactions.min.js
1 month ago
interactions.strings.js
5 months ago
kit-elements-defaults-editor.js
5 months ago
kit-elements-defaults-editor.min.js
5 months ago
kit-elements-defaults-editor.min.js.LICENSE.txt
10 months ago
kit-elements-defaults-editor.strings.js
5 months ago
kit-library.a394510096bc447f636d.bundle.min.js
2 months ago
kit-library.b768952e1d4177aa68d8.bundle.js
2 months ago
lightbox.570c05c5a283cfb6b223.bundle.min.js
3 months ago
lightbox.d9ea72d232a14f514ee2.bundle.js
3 months ago
media-hints.js
7 months ago
media-hints.min.js
7 months ago
media-hints.strings.js
5 months ago
nested-accordion.294d40984397351fd0f5.bundle.min.js
4 months ago
nested-accordion.4340b64226322f36bcc0.bundle.js
4 months ago
nested-accordion.js
5 months ago
nested-accordion.min.js
5 months ago
nested-accordion.min.js.LICENSE.txt
10 months ago
nested-accordion.strings.js
5 months ago
nested-elements.js
3 months ago
nested-elements.min.js
3 months ago
nested-elements.strings.js
5 months ago
nested-tabs.7a338e6d7e060c473993.bundle.js
5 months ago
nested-tabs.a2401356d329f179475e.bundle.min.js
6 months ago
nested-tabs.js
5 months ago
nested-tabs.min.js
5 months ago
nested-tabs.min.js.LICENSE.txt
10 months ago
nested-tabs.strings.js
5 months ago
nested-title-keyboard-handler.0c2b498e3e0695a1dc19.bundle.js
5 months ago
nested-title-keyboard-handler.2a67d3cc630e11815acc.bundle.min.js
6 months ago
new-template.js
4 months ago
new-template.min.js
4 months ago
new-template.strings.js
5 months ago
notes.js
7 months ago
notes.min.js
7 months ago
notes.strings.js
5 months ago
pro-free-trial-popup.js
7 months ago
pro-free-trial-popup.min.js
7 months ago
pro-free-trial-popup.strings.js
5 months ago
pro-install-events.js
7 months ago
pro-install-events.min.js
7 months ago
pro-install-events.strings.js
5 months ago
progress.0ea083b809812c0e3aa1.bundle.min.js
7 months ago
progress.b1057ba870016558bce1.bundle.js
5 months ago
responsive-bar.js
7 months ago
responsive-bar.min.js
7 months ago
responsive-bar.strings.js
5 months ago
section-editor-handlers.53ffedef32043348b99b.bundle.min.js
7 months ago
section-editor-handlers.d65899d232b5339510d7.bundle.js
5 months ago
section-frontend-handlers.c3950c6b190ca134bc8d.bundle.js
5 months ago
section-frontend-handlers.d85ab872da118940910d.bundle.min.js
7 months ago
shared-editor-handlers.3023894100138e442ab0.bundle.js
4 months ago
shared-editor-handlers.cacdcbed391abf4b48b0.bundle.min.js
4 months ago
shared-frontend-handlers.03caa53373b56d3bab67.bundle.min.js
7 months ago
shared-frontend-handlers.3b079824c37a5fe2bdaa.bundle.js
5 months ago
styleguide-app-initiator.js
5 months ago
styleguide-app-initiator.min.js
5 months ago
styleguide-app-initiator.min.js.LICENSE.txt
10 months ago
styleguide-app-initiator.strings.js
5 months ago
styleguide-app.04340244193733d78622.bundle.min.js
7 months ago
styleguide-app.36ecabae74d9b87fc5a8.bundle.js
5 months ago
styleguide.js
7 months ago
styleguide.min.js
7 months ago
styleguide.strings.js
4 months ago
tabs-handler.js
2 months ago
tabs-handler.min.js
2 months ago
tabs-preview-handler.js
5 months ago
tabs-preview-handler.min.js
5 months ago
tabs.18344b05d8d1ea0702bc.bundle.min.js
7 months ago
tabs.40498fa771d612162c53.bundle.js
5 months ago
text-editor.0c9960167105139d27c9.bundle.js
5 months ago
text-editor.45609661e409413f1cef.bundle.min.js
7 months ago
text-path.6db73cc0a10a70f128eb.bundle.js
3 months ago
text-path.a67c1f3a78d208bc7e1b.bundle.min.js
3 months ago
toggle.2a177a3ef4785d3dfbc5.bundle.min.js
7 months ago
toggle.b75e66d2aca6f6ee742e.bundle.js
5 months ago
video.6e96510afa701d1f2ebc.bundle.js
5 months ago
video.86d44e46e43d0807e708.bundle.min.js
7 months ago
web-cli.js
5 months ago
web-cli.min.js
5 months ago
web-cli.min.js.LICENSE.txt
10 months ago
web-cli.strings.js
5 months ago
webpack.runtime.js
3 months ago
webpack.runtime.min.js
3 months ago
wp-audio.0ba9114964acf4c37ca2.bundle.js
5 months ago
wp-audio.c9624cb6e5dc9de86abd.bundle.min.js
7 months ago
youtube-handler.js
5 months ago
youtube-handler.min.js
5 months ago
editor-one-menu.js
737 lines
| 1 | /******/ (() => { // webpackBootstrap |
| 2 | /******/ var __webpack_modules__ = ({ |
| 3 | |
| 4 | /***/ "../modules/editor-one/assets/js/admin-menu/classes/flyout-interaction-handler.js": |
| 5 | /*!****************************************************************************************!*\ |
| 6 | !*** ../modules/editor-one/assets/js/admin-menu/classes/flyout-interaction-handler.js ***! |
| 7 | \****************************************************************************************/ |
| 8 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 9 | |
| 10 | "use strict"; |
| 11 | |
| 12 | |
| 13 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 14 | Object.defineProperty(exports, "__esModule", ({ |
| 15 | value: true |
| 16 | })); |
| 17 | exports.FlyoutInteractionHandler = void 0; |
| 18 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 19 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 20 | var FlyoutInteractionHandler = exports.FlyoutInteractionHandler = /*#__PURE__*/function () { |
| 21 | function FlyoutInteractionHandler() { |
| 22 | (0, _classCallCheck2.default)(this, FlyoutInteractionHandler); |
| 23 | this.activeMenu = null; |
| 24 | this.activeParent = null; |
| 25 | this.closeTimeout = null; |
| 26 | this.lastMousePos = null; |
| 27 | this.exitPoint = null; |
| 28 | this.mouseMoveHandler = null; |
| 29 | } |
| 30 | return (0, _createClass2.default)(FlyoutInteractionHandler, [{ |
| 31 | key: "handle", |
| 32 | value: function handle() { |
| 33 | this.setupFlyoutMenus(); |
| 34 | this.setupMobileSupport(); |
| 35 | } |
| 36 | }, { |
| 37 | key: "setupFlyoutMenus", |
| 38 | value: function setupFlyoutMenus() { |
| 39 | var _this = this; |
| 40 | var menuItems = document.querySelectorAll('#adminmenu li.elementor-has-flyout'); |
| 41 | menuItems.forEach(function (parentLi) { |
| 42 | var flyoutMenu = parentLi.querySelector('.elementor-submenu-flyout'); |
| 43 | if (!flyoutMenu) { |
| 44 | return; |
| 45 | } |
| 46 | _this.attachHoverEvents(parentLi, flyoutMenu); |
| 47 | _this.attachFocusEvents(parentLi, flyoutMenu); |
| 48 | _this.attachKeyboardEvents(parentLi, flyoutMenu); |
| 49 | }); |
| 50 | } |
| 51 | }, { |
| 52 | key: "attachHoverEvents", |
| 53 | value: function attachHoverEvents(parentLi, flyoutMenu) { |
| 54 | var _this2 = this; |
| 55 | parentLi.addEventListener('mouseenter', function () { |
| 56 | // If moving to a new parent that is NOT part of the current active tree |
| 57 | if (_this2.activeMenu && !_this2.activeMenu.contains(parentLi) && _this2.activeMenu !== flyoutMenu) { |
| 58 | // If we are moving to a sibling or unrelated menu, close the current one immediately |
| 59 | // UNLESS we are in the safe zone triangle of the parent |
| 60 | if (!_this2.isCursorInSafeZone()) { |
| 61 | _this2.hideFlyout(_this2.activeMenu); |
| 62 | } |
| 63 | } |
| 64 | _this2.clearCloseTimeout(); |
| 65 | _this2.showFlyout(parentLi, flyoutMenu); |
| 66 | }); |
| 67 | parentLi.addEventListener('mouseleave', function (event) { |
| 68 | _this2.exitPoint = { |
| 69 | x: event.clientX, |
| 70 | y: event.clientY |
| 71 | }; |
| 72 | _this2.scheduleClose(parentLi, flyoutMenu); |
| 73 | }); |
| 74 | flyoutMenu.addEventListener('mouseenter', function () { |
| 75 | _this2.clearCloseTimeout(); |
| 76 | _this2.stopMouseTracking(); |
| 77 | }); |
| 78 | flyoutMenu.addEventListener('mouseleave', function (event) { |
| 79 | _this2.exitPoint = { |
| 80 | x: event.clientX, |
| 81 | y: event.clientY |
| 82 | }; |
| 83 | _this2.scheduleClose(parentLi, flyoutMenu); |
| 84 | }); |
| 85 | } |
| 86 | }, { |
| 87 | key: "attachFocusEvents", |
| 88 | value: function attachFocusEvents(parentLi, flyoutMenu) { |
| 89 | var _this3 = this; |
| 90 | var parentLink = parentLi.querySelector(':scope > a'); |
| 91 | if (parentLink) { |
| 92 | parentLink.addEventListener('focus', function () { |
| 93 | _this3.showFlyout(parentLi, flyoutMenu); |
| 94 | }); |
| 95 | } |
| 96 | flyoutMenu.addEventListener('focusout', function (event) { |
| 97 | if (!parentLi.contains(event.relatedTarget)) { |
| 98 | _this3.hideFlyout(flyoutMenu); |
| 99 | } |
| 100 | }); |
| 101 | } |
| 102 | }, { |
| 103 | key: "attachKeyboardEvents", |
| 104 | value: function attachKeyboardEvents(parentLi, flyoutMenu) { |
| 105 | var _this4 = this; |
| 106 | parentLi.addEventListener('keydown', function (event) { |
| 107 | _this4.handleKeyNavigation(event, parentLi, flyoutMenu); |
| 108 | }); |
| 109 | } |
| 110 | }, { |
| 111 | key: "showFlyout", |
| 112 | value: function showFlyout(parentLi, flyoutMenu) { |
| 113 | if (this.activeMenu && this.activeMenu !== flyoutMenu) { |
| 114 | this.hideFlyout(this.activeMenu); |
| 115 | } |
| 116 | this.exitPoint = null; |
| 117 | this.positionFlyout(parentLi, flyoutMenu); |
| 118 | flyoutMenu.classList.add('elementor-submenu-flyout-visible'); |
| 119 | this.activeMenu = flyoutMenu; |
| 120 | this.activeParent = parentLi; |
| 121 | } |
| 122 | }, { |
| 123 | key: "hideFlyout", |
| 124 | value: function hideFlyout(flyoutMenu) { |
| 125 | flyoutMenu.classList.remove('elementor-submenu-flyout-visible'); |
| 126 | if (this.activeMenu === flyoutMenu) { |
| 127 | this.activeMenu = null; |
| 128 | this.activeParent = null; |
| 129 | this.exitPoint = null; |
| 130 | this.stopMouseTracking(); |
| 131 | } |
| 132 | } |
| 133 | }, { |
| 134 | key: "scheduleClose", |
| 135 | value: function scheduleClose(parentLi, flyoutMenu) { |
| 136 | var _this5 = this; |
| 137 | this.clearCloseTimeout(); |
| 138 | this.startMouseTracking(parentLi, flyoutMenu); |
| 139 | this.closeTimeout = setTimeout(function () { |
| 140 | _this5.checkAndClose(flyoutMenu); |
| 141 | }, 300); |
| 142 | } |
| 143 | }, { |
| 144 | key: "checkAndClose", |
| 145 | value: function checkAndClose(flyoutMenu) { |
| 146 | var _this6 = this; |
| 147 | if (!this.activeMenu) { |
| 148 | return; |
| 149 | } |
| 150 | if (!this.isCursorInSafeZone()) { |
| 151 | this.hideFlyout(flyoutMenu); |
| 152 | } else { |
| 153 | this.closeTimeout = setTimeout(function () { |
| 154 | _this6.checkAndClose(flyoutMenu); |
| 155 | }, 300); |
| 156 | } |
| 157 | } |
| 158 | }, { |
| 159 | key: "clearCloseTimeout", |
| 160 | value: function clearCloseTimeout() { |
| 161 | if (this.closeTimeout) { |
| 162 | clearTimeout(this.closeTimeout); |
| 163 | this.closeTimeout = null; |
| 164 | } |
| 165 | } |
| 166 | }, { |
| 167 | key: "startMouseTracking", |
| 168 | value: function startMouseTracking() { |
| 169 | var _this7 = this; |
| 170 | this.stopMouseTracking(); |
| 171 | this.mouseMoveHandler = function (event) { |
| 172 | _this7.lastMousePos = { |
| 173 | x: event.clientX, |
| 174 | y: event.clientY |
| 175 | }; |
| 176 | }; |
| 177 | document.addEventListener('mousemove', this.mouseMoveHandler); |
| 178 | } |
| 179 | }, { |
| 180 | key: "stopMouseTracking", |
| 181 | value: function stopMouseTracking() { |
| 182 | if (this.mouseMoveHandler) { |
| 183 | document.removeEventListener('mousemove', this.mouseMoveHandler); |
| 184 | this.mouseMoveHandler = null; |
| 185 | } |
| 186 | this.lastMousePos = null; |
| 187 | } |
| 188 | }, { |
| 189 | key: "isCursorInSafeZone", |
| 190 | value: function isCursorInSafeZone() { |
| 191 | if (!this.lastMousePos || !this.activeMenu || !this.activeParent) { |
| 192 | return false; |
| 193 | } |
| 194 | var cursor = this.lastMousePos; |
| 195 | var parentRect = this.activeParent.getBoundingClientRect(); |
| 196 | if (this.isPointInRect(cursor, parentRect)) { |
| 197 | return true; |
| 198 | } |
| 199 | var flyoutRect = this.activeMenu.getBoundingClientRect(); |
| 200 | if (this.isPointInRect(cursor, flyoutRect)) { |
| 201 | return true; |
| 202 | } |
| 203 | return this.isPointInTriangle(cursor, parentRect, flyoutRect); |
| 204 | } |
| 205 | }, { |
| 206 | key: "isPointInRect", |
| 207 | value: function isPointInRect(point, rect) { |
| 208 | return point.x >= rect.left && point.x <= rect.right && point.y >= rect.top && point.y <= rect.bottom; |
| 209 | } |
| 210 | }, { |
| 211 | key: "isPointInTriangle", |
| 212 | value: function isPointInTriangle(cursor, parentRect, flyoutRect) { |
| 213 | var exitX = this.exitPoint ? this.exitPoint.x : parentRect.right; |
| 214 | var distParent = Math.abs(exitX - parentRect.right); |
| 215 | var distFlyout = Math.abs(exitX - flyoutRect.left); |
| 216 | var triangleApex, baseTop, baseBottom; |
| 217 | |
| 218 | // Determine direction: Moving towards Flyout (default) or towards Parent (backwards) |
| 219 | if (distParent < distFlyout) { |
| 220 | // Moving towards Flyout |
| 221 | triangleApex = this.exitPoint || { |
| 222 | x: parentRect.right, |
| 223 | y: parentRect.top + parentRect.height / 2 |
| 224 | }; |
| 225 | baseTop = { |
| 226 | x: flyoutRect.left, |
| 227 | y: flyoutRect.top - 100 |
| 228 | }; |
| 229 | baseBottom = { |
| 230 | x: flyoutRect.left, |
| 231 | y: flyoutRect.bottom + 100 |
| 232 | }; |
| 233 | } else { |
| 234 | // Moving towards Parent |
| 235 | triangleApex = this.exitPoint || { |
| 236 | x: flyoutRect.left, |
| 237 | y: flyoutRect.top + flyoutRect.height / 2 |
| 238 | }; |
| 239 | baseTop = { |
| 240 | x: parentRect.right, |
| 241 | y: parentRect.top - 100 |
| 242 | }; |
| 243 | baseBottom = { |
| 244 | x: parentRect.right, |
| 245 | y: parentRect.bottom + 100 |
| 246 | }; |
| 247 | } |
| 248 | return this.pointInTriangle(cursor, triangleApex, baseTop, baseBottom); |
| 249 | } |
| 250 | }, { |
| 251 | key: "pointInTriangle", |
| 252 | value: function pointInTriangle(p, v1, v2, v3) { |
| 253 | var sign = function sign(p1, p2, p3) { |
| 254 | return (p1.x - p3.x) * (p2.y - p3.y) - (p2.x - p3.x) * (p1.y - p3.y); |
| 255 | }; |
| 256 | var d1 = sign(p, v1, v2); |
| 257 | var d2 = sign(p, v2, v3); |
| 258 | var d3 = sign(p, v3, v1); |
| 259 | var hasNeg = 0 > d1 || 0 > d2 || 0 > d3; |
| 260 | var hasPos = 0 < d1 || 0 < d2 || 0 < d3; |
| 261 | return !(hasNeg && hasPos); |
| 262 | } |
| 263 | }, { |
| 264 | key: "positionFlyout", |
| 265 | value: function positionFlyout(parentLi, flyoutMenu) { |
| 266 | var windowHeight = window.innerHeight; |
| 267 | var flyoutHeight = flyoutMenu.offsetHeight; |
| 268 | var parentRect = parentLi.getBoundingClientRect(); |
| 269 | var relativeTop = parentRect.top; |
| 270 | if (relativeTop + flyoutHeight > windowHeight) { |
| 271 | var newTop = windowHeight - flyoutHeight - relativeTop; |
| 272 | if (newTop < -relativeTop) { |
| 273 | newTop = -relativeTop + 10; |
| 274 | } |
| 275 | flyoutMenu.style.top = newTop + 'px'; |
| 276 | } else { |
| 277 | delete flyoutMenu.style.top; |
| 278 | } |
| 279 | } |
| 280 | }, { |
| 281 | key: "handleKeyNavigation", |
| 282 | value: function handleKeyNavigation(event, parentLi, flyoutMenu) { |
| 283 | var allLinks = flyoutMenu.querySelectorAll('a'); |
| 284 | var focusedLink = flyoutMenu.querySelector('a:focus'); |
| 285 | var currentIndex = Array.from(allLinks).indexOf(focusedLink); |
| 286 | var isVisible = flyoutMenu.classList.contains('elementor-submenu-flyout-visible'); |
| 287 | switch (event.key) { |
| 288 | case 'ArrowRight': |
| 289 | if (!isVisible) { |
| 290 | var _allLinks$; |
| 291 | event.preventDefault(); |
| 292 | this.showFlyout(parentLi, flyoutMenu); |
| 293 | (_allLinks$ = allLinks[0]) === null || _allLinks$ === void 0 || _allLinks$.focus(); |
| 294 | } |
| 295 | break; |
| 296 | case 'ArrowLeft': |
| 297 | if (isVisible) { |
| 298 | var _parentLi$querySelect; |
| 299 | event.preventDefault(); |
| 300 | this.hideFlyout(flyoutMenu); |
| 301 | (_parentLi$querySelect = parentLi.querySelector(':scope > a')) === null || _parentLi$querySelect === void 0 || _parentLi$querySelect.focus(); |
| 302 | } |
| 303 | break; |
| 304 | case 'ArrowDown': |
| 305 | if (isVisible && currentIndex >= 0) { |
| 306 | var _allLinks$nextIndex; |
| 307 | event.preventDefault(); |
| 308 | var nextIndex = (currentIndex + 1) % allLinks.length; |
| 309 | (_allLinks$nextIndex = allLinks[nextIndex]) === null || _allLinks$nextIndex === void 0 || _allLinks$nextIndex.focus(); |
| 310 | } |
| 311 | break; |
| 312 | case 'ArrowUp': |
| 313 | if (isVisible && currentIndex >= 0) { |
| 314 | var _allLinks$prevIndex; |
| 315 | event.preventDefault(); |
| 316 | var prevIndex = (currentIndex - 1 + allLinks.length) % allLinks.length; |
| 317 | (_allLinks$prevIndex = allLinks[prevIndex]) === null || _allLinks$prevIndex === void 0 || _allLinks$prevIndex.focus(); |
| 318 | } |
| 319 | break; |
| 320 | case 'Escape': |
| 321 | if (isVisible) { |
| 322 | var _parentLi$querySelect2; |
| 323 | event.preventDefault(); |
| 324 | this.hideFlyout(flyoutMenu); |
| 325 | (_parentLi$querySelect2 = parentLi.querySelector(':scope > a')) === null || _parentLi$querySelect2 === void 0 || _parentLi$querySelect2.focus(); |
| 326 | } |
| 327 | break; |
| 328 | } |
| 329 | } |
| 330 | }, { |
| 331 | key: "setupMobileSupport", |
| 332 | value: function setupMobileSupport() { |
| 333 | var _this8 = this; |
| 334 | if (window.innerWidth > 782) { |
| 335 | return; |
| 336 | } |
| 337 | var menuLinks = document.querySelectorAll('#adminmenu li.elementor-has-flyout > a'); |
| 338 | menuLinks.forEach(function (link) { |
| 339 | link.addEventListener('click', function (event) { |
| 340 | _this8.handleMobileClick(event, link); |
| 341 | }); |
| 342 | }); |
| 343 | document.addEventListener('click', function (event) { |
| 344 | _this8.handleDocumentClick(event); |
| 345 | }); |
| 346 | } |
| 347 | }, { |
| 348 | key: "handleMobileClick", |
| 349 | value: function handleMobileClick(event, link) { |
| 350 | var parentLi = link.parentElement; |
| 351 | var flyoutMenu = parentLi.querySelector('.elementor-submenu-flyout'); |
| 352 | if (!flyoutMenu) { |
| 353 | return; |
| 354 | } |
| 355 | if (parentLi.classList.contains('elementor-flyout-open')) { |
| 356 | return; |
| 357 | } |
| 358 | event.preventDefault(); |
| 359 | document.querySelectorAll('#adminmenu li.elementor-has-flyout').forEach(function (item) { |
| 360 | item.classList.remove('elementor-flyout-open'); |
| 361 | }); |
| 362 | parentLi.classList.add('elementor-flyout-open'); |
| 363 | } |
| 364 | }, { |
| 365 | key: "handleDocumentClick", |
| 366 | value: function handleDocumentClick(event) { |
| 367 | if (!event.target.closest('#adminmenu li.elementor-has-flyout')) { |
| 368 | document.querySelectorAll('#adminmenu li.elementor-has-flyout').forEach(function (item) { |
| 369 | item.classList.remove('elementor-flyout-open'); |
| 370 | }); |
| 371 | } |
| 372 | } |
| 373 | }]); |
| 374 | }(); |
| 375 | |
| 376 | /***/ }), |
| 377 | |
| 378 | /***/ "../modules/editor-one/assets/js/admin-menu/classes/flyout-menu-renderer.js": |
| 379 | /*!**********************************************************************************!*\ |
| 380 | !*** ../modules/editor-one/assets/js/admin-menu/classes/flyout-menu-renderer.js ***! |
| 381 | \**********************************************************************************/ |
| 382 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 383 | |
| 384 | "use strict"; |
| 385 | |
| 386 | |
| 387 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 388 | Object.defineProperty(exports, "__esModule", ({ |
| 389 | value: true |
| 390 | })); |
| 391 | exports.FlyoutMenuRenderer = void 0; |
| 392 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 393 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 394 | var FlyoutMenuRenderer = exports.FlyoutMenuRenderer = /*#__PURE__*/function () { |
| 395 | function FlyoutMenuRenderer(config) { |
| 396 | (0, _classCallCheck2.default)(this, FlyoutMenuRenderer); |
| 397 | this.config = config; |
| 398 | } |
| 399 | return (0, _createClass2.default)(FlyoutMenuRenderer, [{ |
| 400 | key: "render", |
| 401 | value: function render() { |
| 402 | var editorFlyout = this.config.editorFlyout; |
| 403 | if (!editorFlyout || !editorFlyout.items || !editorFlyout.items.length) { |
| 404 | return false; |
| 405 | } |
| 406 | var editorLi = this.findEditorInMenu("#toplevel_page_elementor-home"); |
| 407 | if (!editorLi) { |
| 408 | return false; |
| 409 | } |
| 410 | editorLi.classList.add('elementor-has-flyout'); |
| 411 | var editorFlyoutUl = document.createElement('ul'); |
| 412 | editorFlyoutUl.className = 'elementor-submenu-flyout elementor-level-3'; |
| 413 | editorFlyout.items.forEach(function (item) { |
| 414 | if (item.has_divider_before) { |
| 415 | var dividerLi = document.createElement('li'); |
| 416 | dividerLi.className = 'elementor-flyout-divider'; |
| 417 | dividerLi.setAttribute('role', 'separator'); |
| 418 | editorFlyoutUl.appendChild(dividerLi); |
| 419 | } |
| 420 | var li = document.createElement('li'); |
| 421 | li.setAttribute('data-group-id', item.group_id || ''); |
| 422 | var a = document.createElement('a'); |
| 423 | a.href = item.url; |
| 424 | a.textContent = item.label; |
| 425 | li.appendChild(a); |
| 426 | editorFlyoutUl.appendChild(li); |
| 427 | }); |
| 428 | editorLi.appendChild(editorFlyoutUl); |
| 429 | return true; |
| 430 | } |
| 431 | }, { |
| 432 | key: "findEditorInMenu", |
| 433 | value: function findEditorInMenu(menuSelector) { |
| 434 | var menuItem = document.querySelector(menuSelector); |
| 435 | if (!menuItem) { |
| 436 | return null; |
| 437 | } |
| 438 | var submenu = menuItem.querySelector('.wp-submenu'); |
| 439 | if (!submenu) { |
| 440 | return null; |
| 441 | } |
| 442 | var editorItem = submenu.querySelector('a[href$="page=elementor"]'); |
| 443 | if (!editorItem) { |
| 444 | return null; |
| 445 | } |
| 446 | return editorItem.closest('li'); |
| 447 | } |
| 448 | }]); |
| 449 | }(); |
| 450 | |
| 451 | /***/ }), |
| 452 | |
| 453 | /***/ "../modules/editor-one/assets/js/admin-menu/classes/sidebar-menu-handler.js": |
| 454 | /*!**********************************************************************************!*\ |
| 455 | !*** ../modules/editor-one/assets/js/admin-menu/classes/sidebar-menu-handler.js ***! |
| 456 | \**********************************************************************************/ |
| 457 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 458 | |
| 459 | "use strict"; |
| 460 | |
| 461 | |
| 462 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 463 | Object.defineProperty(exports, "__esModule", ({ |
| 464 | value: true |
| 465 | })); |
| 466 | exports.SidebarMenuHandler = void 0; |
| 467 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 468 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 469 | var SidebarMenuHandler = exports.SidebarMenuHandler = /*#__PURE__*/function () { |
| 470 | function SidebarMenuHandler() { |
| 471 | (0, _classCallCheck2.default)(this, SidebarMenuHandler); |
| 472 | this.elementorHomeMenu = this.findElementorHomeMenu(); |
| 473 | if (this.elementorHomeMenu) { |
| 474 | this.deactivateOtherMenus(); |
| 475 | this.activateElementorMenu(); |
| 476 | this.highlightSubmenu(); |
| 477 | } |
| 478 | } |
| 479 | return (0, _createClass2.default)(SidebarMenuHandler, [{ |
| 480 | key: "findElementorHomeMenu", |
| 481 | value: function findElementorHomeMenu() { |
| 482 | return document.querySelector('#toplevel_page_elementor-home'); |
| 483 | } |
| 484 | }, { |
| 485 | key: "deactivateOtherMenus", |
| 486 | value: function deactivateOtherMenus() { |
| 487 | var _this = this; |
| 488 | document.querySelectorAll('#adminmenu li.wp-has-current-submenu').forEach(function (item) { |
| 489 | if (item !== _this.elementorHomeMenu) { |
| 490 | item.classList.remove('wp-has-current-submenu', 'wp-menu-open', 'selected'); |
| 491 | item.classList.add('wp-not-current-submenu'); |
| 492 | var link = item.querySelector(':scope > a'); |
| 493 | if (link) { |
| 494 | link.classList.remove('wp-has-current-submenu', 'wp-menu-open', 'current'); |
| 495 | } |
| 496 | } |
| 497 | }); |
| 498 | } |
| 499 | }, { |
| 500 | key: "activateElementorMenu", |
| 501 | value: function activateElementorMenu() { |
| 502 | this.elementorHomeMenu.classList.remove('wp-not-current-submenu'); |
| 503 | this.elementorHomeMenu.classList.add('wp-has-current-submenu', 'wp-menu-open', 'selected'); |
| 504 | var elementorLink = this.elementorHomeMenu.querySelector(':scope > a.menu-top'); |
| 505 | if (elementorLink) { |
| 506 | elementorLink.classList.add('wp-has-current-submenu', 'wp-menu-open'); |
| 507 | } |
| 508 | } |
| 509 | }, { |
| 510 | key: "highlightSubmenu", |
| 511 | value: function highlightSubmenu() { |
| 512 | var currentUrl = new URL(window.location.href); |
| 513 | var searchParams = currentUrl.searchParams; |
| 514 | var page = searchParams.get('page'); |
| 515 | var targetSlug = 'elementor'; |
| 516 | if ('elementor' === page || 'elementor-home' === page) { |
| 517 | targetSlug = 'elementor'; |
| 518 | } else if ('e-form-submissions' === page) { |
| 519 | targetSlug = 'e-form-submissions'; |
| 520 | } else if ('elementor-theme-builder' === page) { |
| 521 | targetSlug = 'elementor-theme-builder'; |
| 522 | } |
| 523 | var submenuItems = this.elementorHomeMenu.querySelectorAll('.wp-submenu li'); |
| 524 | submenuItems.forEach(function (item) { |
| 525 | var link = item.querySelector('a'); |
| 526 | if (!link) { |
| 527 | return; |
| 528 | } |
| 529 | item.classList.remove('current'); |
| 530 | link.classList.remove('current'); |
| 531 | link.setAttribute('aria-current', ''); |
| 532 | var linkUrl = new URL(link.href, window.location.origin); |
| 533 | var linkPage = linkUrl.searchParams.get('page'); |
| 534 | if (linkPage === targetSlug) { |
| 535 | item.classList.add('current'); |
| 536 | link.classList.add('current'); |
| 537 | link.setAttribute('aria-current', 'page'); |
| 538 | } |
| 539 | }); |
| 540 | } |
| 541 | }]); |
| 542 | }(); |
| 543 | |
| 544 | /***/ }), |
| 545 | |
| 546 | /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": |
| 547 | /*!****************************************************************!*\ |
| 548 | !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 549 | \****************************************************************/ |
| 550 | /***/ ((module) => { |
| 551 | |
| 552 | function _classCallCheck(a, n) { |
| 553 | if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); |
| 554 | } |
| 555 | module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 556 | |
| 557 | /***/ }), |
| 558 | |
| 559 | /***/ "../node_modules/@babel/runtime/helpers/createClass.js": |
| 560 | /*!*************************************************************!*\ |
| 561 | !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! |
| 562 | \*************************************************************/ |
| 563 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 564 | |
| 565 | var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 566 | function _defineProperties(e, r) { |
| 567 | for (var t = 0; t < r.length; t++) { |
| 568 | var o = r[t]; |
| 569 | o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); |
| 570 | } |
| 571 | } |
| 572 | function _createClass(e, r, t) { |
| 573 | return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { |
| 574 | writable: !1 |
| 575 | }), e; |
| 576 | } |
| 577 | module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 578 | |
| 579 | /***/ }), |
| 580 | |
| 581 | /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": |
| 582 | /*!***********************************************************************!*\ |
| 583 | !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 584 | \***********************************************************************/ |
| 585 | /***/ ((module) => { |
| 586 | |
| 587 | function _interopRequireDefault(e) { |
| 588 | return e && e.__esModule ? e : { |
| 589 | "default": e |
| 590 | }; |
| 591 | } |
| 592 | module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 593 | |
| 594 | /***/ }), |
| 595 | |
| 596 | /***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": |
| 597 | /*!*************************************************************!*\ |
| 598 | !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! |
| 599 | \*************************************************************/ |
| 600 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 601 | |
| 602 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 603 | function toPrimitive(t, r) { |
| 604 | if ("object" != _typeof(t) || !t) return t; |
| 605 | var e = t[Symbol.toPrimitive]; |
| 606 | if (void 0 !== e) { |
| 607 | var i = e.call(t, r || "default"); |
| 608 | if ("object" != _typeof(i)) return i; |
| 609 | throw new TypeError("@@toPrimitive must return a primitive value."); |
| 610 | } |
| 611 | return ("string" === r ? String : Number)(t); |
| 612 | } |
| 613 | module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 614 | |
| 615 | /***/ }), |
| 616 | |
| 617 | /***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": |
| 618 | /*!***************************************************************!*\ |
| 619 | !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! |
| 620 | \***************************************************************/ |
| 621 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 622 | |
| 623 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 624 | var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); |
| 625 | function toPropertyKey(t) { |
| 626 | var i = toPrimitive(t, "string"); |
| 627 | return "symbol" == _typeof(i) ? i : i + ""; |
| 628 | } |
| 629 | module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 630 | |
| 631 | /***/ }), |
| 632 | |
| 633 | /***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 634 | /*!********************************************************!*\ |
| 635 | !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 636 | \********************************************************/ |
| 637 | /***/ ((module) => { |
| 638 | |
| 639 | function _typeof(o) { |
| 640 | "@babel/helpers - typeof"; |
| 641 | |
| 642 | return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { |
| 643 | return typeof o; |
| 644 | } : function (o) { |
| 645 | return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 646 | }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); |
| 647 | } |
| 648 | module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 649 | |
| 650 | /***/ }) |
| 651 | |
| 652 | /******/ }); |
| 653 | /************************************************************************/ |
| 654 | /******/ // The module cache |
| 655 | /******/ var __webpack_module_cache__ = {}; |
| 656 | /******/ |
| 657 | /******/ // The require function |
| 658 | /******/ function __webpack_require__(moduleId) { |
| 659 | /******/ // Check if module is in cache |
| 660 | /******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 661 | /******/ if (cachedModule !== undefined) { |
| 662 | /******/ return cachedModule.exports; |
| 663 | /******/ } |
| 664 | /******/ // Create a new module (and put it into the cache) |
| 665 | /******/ var module = __webpack_module_cache__[moduleId] = { |
| 666 | /******/ // no module.id needed |
| 667 | /******/ // no module.loaded needed |
| 668 | /******/ exports: {} |
| 669 | /******/ }; |
| 670 | /******/ |
| 671 | /******/ // Execute the module function |
| 672 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 673 | /******/ |
| 674 | /******/ // Return the exports of the module |
| 675 | /******/ return module.exports; |
| 676 | /******/ } |
| 677 | /******/ |
| 678 | /************************************************************************/ |
| 679 | var __webpack_exports__ = {}; |
| 680 | // This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 681 | (() => { |
| 682 | "use strict"; |
| 683 | /*!*********************************************************!*\ |
| 684 | !*** ../modules/editor-one/assets/js/admin-menu/app.js ***! |
| 685 | \*********************************************************/ |
| 686 | |
| 687 | |
| 688 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 689 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 690 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 691 | var _flyoutMenuRenderer = __webpack_require__(/*! ./classes/flyout-menu-renderer */ "../modules/editor-one/assets/js/admin-menu/classes/flyout-menu-renderer.js"); |
| 692 | var _sidebarMenuHandler = __webpack_require__(/*! ./classes/sidebar-menu-handler */ "../modules/editor-one/assets/js/admin-menu/classes/sidebar-menu-handler.js"); |
| 693 | var _flyoutInteractionHandler = __webpack_require__(/*! ./classes/flyout-interaction-handler */ "../modules/editor-one/assets/js/admin-menu/classes/flyout-interaction-handler.js"); |
| 694 | var EditorOneMenu = /*#__PURE__*/function () { |
| 695 | function EditorOneMenu() { |
| 696 | var _window; |
| 697 | (0, _classCallCheck2.default)(this, EditorOneMenu); |
| 698 | this.config = ((_window = window) === null || _window === void 0 ? void 0 : _window.editorOneMenuConfig) || {}; |
| 699 | } |
| 700 | return (0, _createClass2.default)(EditorOneMenu, [{ |
| 701 | key: "init", |
| 702 | value: function init() { |
| 703 | if (this.isSidebarNavigationActive()) { |
| 704 | new _sidebarMenuHandler.SidebarMenuHandler(); |
| 705 | return; |
| 706 | } |
| 707 | this.buildFlyoutMenus(); |
| 708 | } |
| 709 | }, { |
| 710 | key: "isSidebarNavigationActive", |
| 711 | value: function isSidebarNavigationActive() { |
| 712 | return document.body.classList.contains('e-has-sidebar-navigation'); |
| 713 | } |
| 714 | }, { |
| 715 | key: "buildFlyoutMenus", |
| 716 | value: function buildFlyoutMenus() { |
| 717 | var renderer = new _flyoutMenuRenderer.FlyoutMenuRenderer(this.config); |
| 718 | if (renderer.render()) { |
| 719 | new _flyoutInteractionHandler.FlyoutInteractionHandler().handle(); |
| 720 | } |
| 721 | } |
| 722 | }]); |
| 723 | }(); |
| 724 | var initEditorOneMenu = function initEditorOneMenu() { |
| 725 | var editorOneMenu = new EditorOneMenu(); |
| 726 | editorOneMenu.init(); |
| 727 | }; |
| 728 | if ('loading' === document.readyState) { |
| 729 | document.addEventListener('DOMContentLoaded', initEditorOneMenu); |
| 730 | } else { |
| 731 | initEditorOneMenu(); |
| 732 | } |
| 733 | })(); |
| 734 | |
| 735 | /******/ })() |
| 736 | ; |
| 737 | //# sourceMappingURL=editor-one-menu.js.map |