packages
1 week ago
012778ff5828d0d1739f.bundle.js
2 weeks ago
02ab54a3328c55e115ea.bundle.min.js
2 weeks ago
0352e30f394e8e1dd4dc.bundle.js
2 months ago
06dbd869189450c5db6c.bundle.js
2 weeks ago
0982f37bec0944fbcb10.bundle.js
4 months ago
0bc41c4656ca54cf2aca.bundle.min.js
4 months ago
14bcbc91620c14a7112c.bundle.min.js
2 weeks ago
1564d2bfa4591bf857f3.bundle.min.js
4 months ago
197583acd246fea0e25d.bundle.js
5 months ago
20866d9d9e34bf3cb0a7.bundle.min.js
2 weeks ago
2140afa714e988f1069e.bundle.js
2 months ago
220e9c3d1caa01726b1a.bundle.js
2 weeks ago
29c342e9c10e3f13f498.bundle.js
2 weeks ago
2bac2875cdf51a1f8140.bundle.min.js
2 weeks 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
3c838288a9b7ddd2aea4.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
435080452e81c388e779.bundle.min.js
2 months ago
4927500be197e062162e.bundle.min.js
2 months ago
4c96eab5a48ee097dcb2.bundle.js
2 weeks ago
59845ab5a628d2b79f57.bundle.js
2 weeks ago
5b575dffd21b0cec15a5.bundle.js
2 weeks ago
6117d083decd13b6ed73.bundle.js
2 months ago
6844b6c0a66040e3ca12.bundle.js
2 months ago
687979ffbcfd58352c29.bundle.min.js
2 weeks ago
6936b079b4e7c28cd901.bundle.min.js
2 weeks ago
6a19e86dd8c1f9165dbe.bundle.js
5 months ago
6caa76d2f6eec6c4e665.bundle.js
3 months ago
6d09ff0398a56a60654b.bundle.min.js
3 months ago
6f779545aaa23e951088.bundle.min.js
2 months ago
73f63f9507c306870586.bundle.min.js
2 weeks ago
7698e0d50a8ad7ecc822.bundle.js
2 weeks ago
77b60be7dc925a32f560.bundle.min.js
2 weeks ago
78dd4dee6173d40eb75a.bundle.min.js
2 months ago
7dae73b622bebe8a5d94.bundle.js
4 months ago
8277989eebcfba278cb0.bundle.min.js
7 months ago
831aea236b1ddda24f0c.bundle.js
2 weeks ago
845418a5488e9937fc99.bundle.min.js
2 weeks ago
8ad22e7ba800b096313c.bundle.min.js
2 weeks ago
8c20eb5e96967d3016b2.bundle.js
2 weeks 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
9b0cc3aa93cf287cd0a2.bundle.min.js
2 weeks 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
9ffe53753902b9aca176.bundle.js
2 weeks ago
a0f667abb781daab8e48.bundle.js
2 weeks ago
a9c3d5b02d26399aebfb.bundle.js
2 weeks 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 weeks ago
admin-modules.js
5 months ago
admin-modules.min.js
5 months ago
admin-modules.min.js.LICENSE.txt
9 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 weeks ago
admin.min.js
2 weeks ago
admin.min.js.LICENSE.txt
9 months ago
admin.strings.js
5 months ago
aee13673e923469c3275.bundle.min.js
4 months ago
af05aac2eb23e7438265.bundle.js
2 weeks ago
ai-admin.js
5 months ago
ai-admin.min.js
5 months ago
ai-admin.min.js.LICENSE.txt
9 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
9 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
9 months ago
ai-layout.strings.js
1 week ago
ai-media-library.js
5 months ago
ai-media-library.min.js
5 months ago
ai-media-library.min.js.LICENSE.txt
9 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
9 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
9 months ago
ai.strings.js
1 week ago
alert.b4336601ffdb6086d1b5.bundle.min.js
2 weeks ago
alert.fd509aa768e7b35a8e32.bundle.js
5 months ago
announcements-app.js
2 weeks ago
announcements-app.min.js
2 weeks ago
announcements-app.min.js.LICENSE.txt
9 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 week ago
app-packages.js
4 months ago
app-packages.min.js
4 months ago
app-packages.min.js.LICENSE.txt
9 months ago
app-packages.strings.js
1 week ago
app.js
2 weeks ago
app.min.js
2 weeks ago
app.min.js.LICENSE.txt
9 months ago
app.strings.js
1 week ago
atomic-widgets-action-link-handler.js
2 weeks ago
atomic-widgets-action-link-handler.min.js
2 weeks ago
atomic-widgets-editor.js
2 weeks ago
atomic-widgets-editor.min.js
2 weeks ago
atomic-widgets-editor.min.js.LICENSE.txt
4 months ago
atomic-widgets-editor.strings.js
2 months ago
atomic-widgets-form-handler.js
1 week ago
atomic-widgets-form-handler.min.js
1 week ago
atomic-widgets-form-handler.min.js.LICENSE.txt
2 weeks ago
b4d39e5186d768f79598.bundle.js
2 weeks ago
b96d70044d0d67c2df19.bundle.min.js
7 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
bf2fa9f81b3d78f5858f.bundle.min.js
2 weeks ago
c13d205fa26f8af1ce7c.bundle.js
5 months ago
c73a7d15e48e3305780a.bundle.min.js
2 weeks ago
cf6ec600fcf4e08ba6d3.bundle.js
4 months ago
checklist.js
5 months ago
checklist.min.js
5 months ago
checklist.min.js.LICENSE.txt
9 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
2 weeks ago
common.min.js
2 weeks ago
common.min.js.LICENSE.txt
9 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
d39cd4cb3d5b09b11c14.bundle.min.js
2 weeks 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
d8a330693f9211e2166e.bundle.min.js
2 weeks ago
daedc6797eaad5c82711.bundle.min.js
7 months ago
de7511b88f9ec0968921.bundle.js
2 weeks 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
df4ff09f2b412abf0cd3.bundle.js
2 weeks ago
dff865a4d52c12bcf996.bundle.min.js
2 weeks ago
e-home-screen.js
2 weeks ago
e-home-screen.min.js
2 weeks ago
e-home-screen.min.js.LICENSE.txt
2 weeks ago
e-home-screen.strings.js
2 weeks 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
e459c6c89c0c0899c850.bundle.js
5 months ago
e9a764dcd37c06162942.bundle.js
2 weeks ago
eb5018119ee87fd6a7fc.bundle.min.js
2 months ago
ec1ee92b2a471389c7b9.bundle.min.js
2 weeks ago
editor-document.js
5 months ago
editor-document.min.js
7 months ago
editor-document.strings.js
1 week 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 weeks ago
editor-interactions.min.js
2 weeks 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
9 months ago
editor-modules.strings.js
1 week 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 weeks ago
editor-one-top-bar.min.js
2 weeks 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
2 weeks ago
editor.min.js
2 weeks ago
editor.min.js.LICENSE.txt
5 months ago
editor.strings.js
2 weeks 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
9 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
f3b4453f66034a6655a7.bundle.min.js
2 weeks 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
2 weeks ago
frontend.min.js
2 weeks 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 week ago
import-export-customization-admin.js
2 weeks ago
import-export-customization-admin.min.js
2 weeks ago
import-export-customization-admin.min.js.LICENSE.txt
7 months ago
import-export-customization-admin.strings.js
1 week ago
interactions-shared-utils.js
2 weeks ago
interactions-shared-utils.min.js
2 weeks ago
interactions-shared-utils.strings.js
2 months ago
interactions.js
2 weeks ago
interactions.min.js
2 weeks 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
9 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
9 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
5 months ago
nested-tabs.js
5 months ago
nested-tabs.min.js
5 months ago
nested-tabs.min.js.LICENSE.txt
9 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
5 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
9 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
3 months ago
tabs-handler.js
2 weeks ago
tabs-handler.min.js
2 weeks ago
tabs-preview-handler.js
2 weeks ago
tabs-preview-handler.min.js
2 weeks 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
9 months ago
web-cli.strings.js
5 months ago
webpack.runtime.js
2 weeks ago
webpack.runtime.min.js
2 weeks 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
gutenberg.js
197 lines
| 1 | /******/ (() => { // webpackBootstrap |
| 2 | /******/ "use strict"; |
| 3 | /******/ var __webpack_modules__ = ({ |
| 4 | |
| 5 | /***/ "@wordpress/i18n": |
| 6 | /*!**************************!*\ |
| 7 | !*** external "wp.i18n" ***! |
| 8 | \**************************/ |
| 9 | /***/ ((module) => { |
| 10 | |
| 11 | module.exports = wp.i18n; |
| 12 | |
| 13 | /***/ }) |
| 14 | |
| 15 | /******/ }); |
| 16 | /************************************************************************/ |
| 17 | /******/ // The module cache |
| 18 | /******/ var __webpack_module_cache__ = {}; |
| 19 | /******/ |
| 20 | /******/ // The require function |
| 21 | /******/ function __webpack_require__(moduleId) { |
| 22 | /******/ // Check if module is in cache |
| 23 | /******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 24 | /******/ if (cachedModule !== undefined) { |
| 25 | /******/ return cachedModule.exports; |
| 26 | /******/ } |
| 27 | /******/ // Create a new module (and put it into the cache) |
| 28 | /******/ var module = __webpack_module_cache__[moduleId] = { |
| 29 | /******/ // no module.id needed |
| 30 | /******/ // no module.loaded needed |
| 31 | /******/ exports: {} |
| 32 | /******/ }; |
| 33 | /******/ |
| 34 | /******/ // Execute the module function |
| 35 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 36 | /******/ |
| 37 | /******/ // Return the exports of the module |
| 38 | /******/ return module.exports; |
| 39 | /******/ } |
| 40 | /******/ |
| 41 | /************************************************************************/ |
| 42 | // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk. |
| 43 | (() => { |
| 44 | /*!*******************************************!*\ |
| 45 | !*** ../assets/dev/js/admin/gutenberg.js ***! |
| 46 | \*******************************************/ |
| 47 | /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 48 | |
| 49 | |
| 50 | /* global ElementorGutenbergSettings */ |
| 51 | (function ($) { |
| 52 | 'use strict'; |
| 53 | |
| 54 | var ElementorGutenbergApp = { |
| 55 | cacheElements: function cacheElements() { |
| 56 | var self = this; |
| 57 | self.isElementorMode = ElementorGutenbergSettings.isElementorMode; |
| 58 | self.cache = {}; |
| 59 | self.cache.$gutenberg = $('#editor'); |
| 60 | self.cache.$switchMode = $($('#elementor-gutenberg-button-switch-mode').html()); |
| 61 | self.cache.$switchModeButton = self.cache.$switchMode.find('#elementor-switch-mode-button'); |
| 62 | self.bindEvents(); |
| 63 | self.toggleStatus(); |
| 64 | wp.data.subscribe(function () { |
| 65 | setTimeout(function () { |
| 66 | self.buildPanel(); |
| 67 | }, 1); |
| 68 | }); |
| 69 | }, |
| 70 | buildPanel: function buildPanel() { |
| 71 | var self = this; |
| 72 | if (!self.cache.$gutenberg.find('#elementor-switch-mode').length) { |
| 73 | self.cache.$gutenberg.find('.edit-post-header-toolbar').append(self.cache.$switchMode); |
| 74 | } |
| 75 | if (this.hasIframe()) { |
| 76 | this.handleIframe(); |
| 77 | } |
| 78 | if (!$('#elementor-editor').length) { |
| 79 | self.cache.$editorPanel = $($('#elementor-gutenberg-panel').html()); |
| 80 | var editorButtonParent = self.cache.$gutenberg.find('.block-editor-writing-flow'); |
| 81 | if (!editorButtonParent.length) { |
| 82 | editorButtonParent = self.cache.$gutenberg.find('.is-desktop-preview'); |
| 83 | } |
| 84 | self.cache.$gurenbergBlockList = editorButtonParent; |
| 85 | self.cache.$gurenbergBlockList.append(self.cache.$editorPanel); |
| 86 | self.cache.$editorPanelButton = self.cache.$editorPanel.find('#elementor-go-to-edit-page-link'); |
| 87 | self.cache.$editorPanelButton.on('click', function (event) { |
| 88 | event.preventDefault(); |
| 89 | self.handleEditButtonClick(); |
| 90 | }); |
| 91 | } |
| 92 | }, |
| 93 | handleIframe: function handleIframe() { |
| 94 | this.hideIframeContent(); |
| 95 | this.buildPanelTopBar(); |
| 96 | }, |
| 97 | // Sometimes Gutenberg uses iframe instead of div. |
| 98 | hasIframe: function hasIframe() { |
| 99 | return !!this.cache.$gutenberg.find('iframe[name="editor-canvas"]').length; |
| 100 | }, |
| 101 | hideIframeContent: function hideIframeContent() { |
| 102 | if (!this.isElementorMode) { |
| 103 | return; |
| 104 | } |
| 105 | var style = "<style>\n\t\t\t\t.editor-post-text-editor,\n\t\t\t\t.block-editor-block-list__layout {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\tbody {\n\t\t\t\t\tpadding: 0 !important;\n\t\t\t\t}\n\t\t\t</style>"; |
| 106 | this.cache.$gutenberg.find('iframe[name="editor-canvas"]').contents().find('body').append(style); |
| 107 | }, |
| 108 | buildPanelTopBar: function buildPanelTopBar() { |
| 109 | var self = this; |
| 110 | if (!$('#elementor-edit-mode-button').length && this.isElementorMode) { |
| 111 | self.cache.$editorBtnTop = $($('#elementor-gutenberg-button-tmpl').html()); |
| 112 | self.cache.$gutenberg.find('.edit-post-header-toolbar').append(self.cache.$editorBtnTop); |
| 113 | $('#elementor-edit-mode-button').on('click', function (event) { |
| 114 | event.preventDefault(); |
| 115 | self.handleEditButtonClick(false); |
| 116 | }); |
| 117 | } |
| 118 | }, |
| 119 | handleEditButtonClick: function handleEditButtonClick() { |
| 120 | var withAnimation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; |
| 121 | var self = this; |
| 122 | if (withAnimation) { |
| 123 | self.animateLoader(); |
| 124 | } |
| 125 | |
| 126 | // A new post is initialized as an 'auto-draft'. |
| 127 | // if the post is not a new post it should not save it to avoid some saving conflict between elementor and gutenberg. |
| 128 | var isNewPost = 'auto-draft' === wp.data.select('core/editor').getCurrentPost().status; |
| 129 | if (isNewPost) { |
| 130 | var documentTitle = wp.data.select('core/editor').getEditedPostAttribute('title'); |
| 131 | if (!documentTitle) { |
| 132 | wp.data.dispatch('core/editor').editPost({ |
| 133 | title: 'Elementor #' + $('#post_ID').val() |
| 134 | }); |
| 135 | } |
| 136 | wp.data.dispatch('core/editor').savePost(); |
| 137 | } |
| 138 | self.redirectWhenSave(); |
| 139 | }, |
| 140 | bindEvents: function bindEvents() { |
| 141 | var self = this; |
| 142 | self.cache.$switchModeButton.on('click', function () { |
| 143 | if (self.isElementorMode) { |
| 144 | elementorCommon.dialogsManager.createWidget('confirm', { |
| 145 | message: __('Please note that you are switching to WordPress default editor. Your current layout, design and content might break.', 'elementor'), |
| 146 | headerMessage: __('Back to WordPress Editor', 'elementor'), |
| 147 | strings: { |
| 148 | confirm: __('Continue', 'elementor'), |
| 149 | cancel: __('Cancel', 'elementor') |
| 150 | }, |
| 151 | defaultOption: 'confirm', |
| 152 | onConfirm: function onConfirm() { |
| 153 | var wpEditor = wp.data.dispatch('core/editor'); |
| 154 | wpEditor.editPost({ |
| 155 | gutenberg_elementor_mode: false |
| 156 | }); |
| 157 | wpEditor.savePost(); |
| 158 | self.isElementorMode = !self.isElementorMode; |
| 159 | self.toggleStatus(); |
| 160 | } |
| 161 | }).show(); |
| 162 | } else { |
| 163 | self.isElementorMode = !self.isElementorMode; |
| 164 | self.toggleStatus(); |
| 165 | self.cache.$editorPanelButton.trigger('click'); |
| 166 | } |
| 167 | }); |
| 168 | }, |
| 169 | redirectWhenSave: function redirectWhenSave() { |
| 170 | var self = this; |
| 171 | setTimeout(function () { |
| 172 | if (wp.data.select('core/editor').isSavingPost()) { |
| 173 | self.redirectWhenSave(); |
| 174 | } else { |
| 175 | location.href = ElementorGutenbergSettings.editLink; |
| 176 | } |
| 177 | }, 300); |
| 178 | }, |
| 179 | animateLoader: function animateLoader() { |
| 180 | this.cache.$editorPanelButton.addClass('elementor-animate'); |
| 181 | }, |
| 182 | toggleStatus: function toggleStatus() { |
| 183 | jQuery('body').toggleClass('elementor-editor-active', this.isElementorMode).toggleClass('elementor-editor-inactive', !this.isElementorMode); |
| 184 | }, |
| 185 | init: function init() { |
| 186 | this.cacheElements(); |
| 187 | } |
| 188 | }; |
| 189 | $(function () { |
| 190 | ElementorGutenbergApp.init(); |
| 191 | }); |
| 192 | })(jQuery); |
| 193 | })(); |
| 194 | |
| 195 | /******/ })() |
| 196 | ; |
| 197 | //# sourceMappingURL=gutenberg.js.map |