PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.4
Elementor Website Builder – more than just a page builder v3.0.4
4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 All 454 releases
← All changes | assets/js/gutenberg.js +684 -100 4.2.0-beta2 → 3.0.4 View file →
@@ -1,54 +1,642 @@
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 -/************************************************************************/
1 +/*! elementor - v3.0.4 - 30-08-2020 */
2 +/******/ (function(modules) { // webpackBootstrap
17 3 /******/ // The module cache
18 -/******/ var __webpack_module_cache__ = {};
19 -/******/
4 +/******/ var installedModules = {};
5 +/******/
20 6 /******/ // The require function
21 7 /******/ function __webpack_require__(moduleId) {
8 +/******/
22 9 /******/ // Check if module is in cache
23 -/******/ var cachedModule = __webpack_module_cache__[moduleId];
24 -/******/ if (cachedModule !== undefined) {
25 -/******/ return cachedModule.exports;
10 +/******/ if(installedModules[moduleId]) {
11 +/******/ return installedModules[moduleId].exports;
26 12 /******/ }
27 13 /******/ // 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
14 +/******/ var module = installedModules[moduleId] = {
15 +/******/ i: moduleId,
16 +/******/ l: false,
31 17 /******/ exports: {}
32 18 /******/ };
33 -/******/
19 +/******/
34 20 /******/ // Execute the module function
35 -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
36 -/******/
21 +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22 +/******/
23 +/******/ // Flag the module as loaded
24 +/******/ module.l = true;
25 +/******/
37 26 /******/ // Return the exports of the module
38 27 /******/ return module.exports;
39 28 /******/ }
40 -/******/
29 +/******/
30 +/******/
31 +/******/ // expose the modules object (__webpack_modules__)
32 +/******/ __webpack_require__.m = modules;
33 +/******/
34 +/******/ // expose the module cache
35 +/******/ __webpack_require__.c = installedModules;
36 +/******/
37 +/******/ // define getter function for harmony exports
38 +/******/ __webpack_require__.d = function(exports, name, getter) {
39 +/******/ if(!__webpack_require__.o(exports, name)) {
40 +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41 +/******/ }
42 +/******/ };
43 +/******/
44 +/******/ // define __esModule on exports
45 +/******/ __webpack_require__.r = function(exports) {
46 +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47 +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48 +/******/ }
49 +/******/ Object.defineProperty(exports, '__esModule', { value: true });
50 +/******/ };
51 +/******/
52 +/******/ // create a fake namespace object
53 +/******/ // mode & 1: value is a module id, require it
54 +/******/ // mode & 2: merge all properties of value into the ns
55 +/******/ // mode & 4: return value when already ns object
56 +/******/ // mode & 8|1: behave like require
57 +/******/ __webpack_require__.t = function(value, mode) {
58 +/******/ if(mode & 1) value = __webpack_require__(value);
59 +/******/ if(mode & 8) return value;
60 +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61 +/******/ var ns = Object.create(null);
62 +/******/ __webpack_require__.r(ns);
63 +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64 +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65 +/******/ return ns;
66 +/******/ };
67 +/******/
68 +/******/ // getDefaultExport function for compatibility with non-harmony modules
69 +/******/ __webpack_require__.n = function(module) {
70 +/******/ var getter = module && module.__esModule ?
71 +/******/ function getDefault() { return module['default']; } :
72 +/******/ function getModuleExports() { return module; };
73 +/******/ __webpack_require__.d(getter, 'a', getter);
74 +/******/ return getter;
75 +/******/ };
76 +/******/
77 +/******/ // Object.prototype.hasOwnProperty.call
78 +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79 +/******/
80 +/******/ // __webpack_public_path__
81 +/******/ __webpack_require__.p = "";
82 +/******/
83 +/******/
84 +/******/ // Load entry module and return exports
85 +/******/ return __webpack_require__(__webpack_require__.s = 740);
86 +/******/ })
41 87 /************************************************************************/
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")["__"];
88 +/******/ ({
48 89
90 +/***/ 102:
91 +/***/ (function(module, exports) {
49 92
50 -/* global ElementorGutenbergSettings */
93 +module.exports = function (bitmap, value) {
94 + return {
95 + enumerable: !(bitmap & 1),
96 + configurable: !(bitmap & 2),
97 + writable: !(bitmap & 4),
98 + value: value
99 + };
100 +};
101 +
102 +
103 +/***/ }),
104 +
105 +/***/ 109:
106 +/***/ (function(module, exports, __webpack_require__) {
107 +
108 +var isObject = __webpack_require__(30);
109 +var document = __webpack_require__(17).document;
110 +// typeof document.createElement is 'object' in old IE
111 +var is = isObject(document) && isObject(document.createElement);
112 +module.exports = function (it) {
113 + return is ? document.createElement(it) : {};
114 +};
115 +
116 +
117 +/***/ }),
118 +
119 +/***/ 110:
120 +/***/ (function(module, exports) {
121 +
122 +module.exports = false;
123 +
124 +
125 +/***/ }),
126 +
127 +/***/ 12:
128 +/***/ (function(module, exports, __webpack_require__) {
129 +
130 +var store = __webpack_require__(66)('wks');
131 +var uid = __webpack_require__(67);
132 +var Symbol = __webpack_require__(17).Symbol;
133 +var USE_SYMBOL = typeof Symbol == 'function';
134 +
135 +var $exports = module.exports = function (name) {
136 + return store[name] || (store[name] =
137 + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
138 +};
139 +
140 +$exports.store = store;
141 +
142 +
143 +/***/ }),
144 +
145 +/***/ 120:
146 +/***/ (function(module, exports, __webpack_require__) {
147 +
148 +// fallback for non-array-like ES3 and non-enumerable old V8 strings
149 +var cof = __webpack_require__(46);
150 +// eslint-disable-next-line no-prototype-builtins
151 +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
152 + return cof(it) == 'String' ? it.split('') : Object(it);
153 +};
154 +
155 +
156 +/***/ }),
157 +
158 +/***/ 123:
159 +/***/ (function(module, exports, __webpack_require__) {
160 +
161 +// 7.1.1 ToPrimitive(input [, PreferredType])
162 +var isObject = __webpack_require__(30);
163 +// instead of the ES6 spec version, we didn't implement @@toPrimitive case
164 +// and the second argument - flag - preferred type is a string
165 +module.exports = function (it, S) {
166 + if (!isObject(it)) return it;
167 + var fn, val;
168 + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
169 + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
170 + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
171 + throw TypeError("Can't convert object to primitive value");
172 +};
173 +
174 +
175 +/***/ }),
176 +
177 +/***/ 129:
178 +/***/ (function(module, exports, __webpack_require__) {
179 +
180 +module.exports = !__webpack_require__(27) && !__webpack_require__(33)(function () {
181 + return Object.defineProperty(__webpack_require__(109)('div'), 'a', { get: function () { return 7; } }).a != 7;
182 +});
183 +
184 +
185 +/***/ }),
186 +
187 +/***/ 143:
188 +/***/ (function(module, exports, __webpack_require__) {
189 +
190 +module.exports = __webpack_require__(66)('native-function-to-string', Function.toString);
191 +
192 +
193 +/***/ }),
194 +
195 +/***/ 17:
196 +/***/ (function(module, exports) {
197 +
198 +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
199 +var global = module.exports = typeof window != 'undefined' && window.Math == Math
200 + ? window : typeof self != 'undefined' && self.Math == Math ? self
201 + // eslint-disable-next-line no-new-func
202 + : Function('return this')();
203 +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
204 +
205 +
206 +/***/ }),
207 +
208 +/***/ 18:
209 +/***/ (function(module, exports, __webpack_require__) {
210 +
211 +var isObject = __webpack_require__(30);
212 +module.exports = function (it) {
213 + if (!isObject(it)) throw TypeError(it + ' is not an object!');
214 + return it;
215 +};
216 +
217 +
218 +/***/ }),
219 +
220 +/***/ 181:
221 +/***/ (function(module, exports, __webpack_require__) {
222 +
223 +// 0 -> Array#forEach
224 +// 1 -> Array#map
225 +// 2 -> Array#filter
226 +// 3 -> Array#some
227 +// 4 -> Array#every
228 +// 5 -> Array#find
229 +// 6 -> Array#findIndex
230 +var ctx = __webpack_require__(73);
231 +var IObject = __webpack_require__(120);
232 +var toObject = __webpack_require__(96);
233 +var toLength = __webpack_require__(43);
234 +var asc = __webpack_require__(216);
235 +module.exports = function (TYPE, $create) {
236 + var IS_MAP = TYPE == 1;
237 + var IS_FILTER = TYPE == 2;
238 + var IS_SOME = TYPE == 3;
239 + var IS_EVERY = TYPE == 4;
240 + var IS_FIND_INDEX = TYPE == 6;
241 + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
242 + var create = $create || asc;
243 + return function ($this, callbackfn, that) {
244 + var O = toObject($this);
245 + var self = IObject(O);
246 + var f = ctx(callbackfn, that, 3);
247 + var length = toLength(self.length);
248 + var index = 0;
249 + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
250 + var val, res;
251 + for (;length > index; index++) if (NO_HOLES || index in self) {
252 + val = self[index];
253 + res = f(val, index, O);
254 + if (TYPE) {
255 + if (IS_MAP) result[index] = res; // map
256 + else if (res) switch (TYPE) {
257 + case 3: return true; // some
258 + case 5: return val; // find
259 + case 6: return index; // findIndex
260 + case 2: result.push(val); // filter
261 + } else if (IS_EVERY) return false; // every
262 + }
263 + }
264 + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
265 + };
266 +};
267 +
268 +
269 +/***/ }),
270 +
271 +/***/ 216:
272 +/***/ (function(module, exports, __webpack_require__) {
273 +
274 +// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
275 +var speciesConstructor = __webpack_require__(217);
276 +
277 +module.exports = function (original, length) {
278 + return new (speciesConstructor(original))(length);
279 +};
280 +
281 +
282 +/***/ }),
283 +
284 +/***/ 217:
285 +/***/ (function(module, exports, __webpack_require__) {
286 +
287 +var isObject = __webpack_require__(30);
288 +var isArray = __webpack_require__(218);
289 +var SPECIES = __webpack_require__(12)('species');
290 +
291 +module.exports = function (original) {
292 + var C;
293 + if (isArray(original)) {
294 + C = original.constructor;
295 + // cross-realm fallback
296 + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
297 + if (isObject(C)) {
298 + C = C[SPECIES];
299 + if (C === null) C = undefined;
300 + }
301 + } return C === undefined ? Array : C;
302 +};
303 +
304 +
305 +/***/ }),
306 +
307 +/***/ 218:
308 +/***/ (function(module, exports, __webpack_require__) {
309 +
310 +// 7.2.2 IsArray(argument)
311 +var cof = __webpack_require__(46);
312 +module.exports = Array.isArray || function isArray(arg) {
313 + return cof(arg) == 'Array';
314 +};
315 +
316 +
317 +/***/ }),
318 +
319 +/***/ 26:
320 +/***/ (function(module, exports, __webpack_require__) {
321 +
322 +"use strict";
323 +
324 +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
325 +var $export = __webpack_require__(37);
326 +var $find = __webpack_require__(181)(5);
327 +var KEY = 'find';
328 +var forced = true;
329 +// Shouldn't skip holes
330 +if (KEY in []) Array(1)[KEY](function () { forced = false; });
331 +$export($export.P + $export.F * forced, 'Array', {
332 + find: function find(callbackfn /* , that = undefined */) {
333 + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
334 + }
335 +});
336 +__webpack_require__(85)(KEY);
337 +
338 +
339 +/***/ }),
340 +
341 +/***/ 27:
342 +/***/ (function(module, exports, __webpack_require__) {
343 +
344 +// Thank's IE8 for his funny defineProperty
345 +module.exports = !__webpack_require__(33)(function () {
346 + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
347 +});
348 +
349 +
350 +/***/ }),
351 +
352 +/***/ 29:
353 +/***/ (function(module, exports, __webpack_require__) {
354 +
355 +var dP = __webpack_require__(45);
356 +var createDesc = __webpack_require__(102);
357 +module.exports = __webpack_require__(27) ? function (object, key, value) {
358 + return dP.f(object, key, createDesc(1, value));
359 +} : function (object, key, value) {
360 + object[key] = value;
361 + return object;
362 +};
363 +
364 +
365 +/***/ }),
366 +
367 +/***/ 30:
368 +/***/ (function(module, exports) {
369 +
370 +module.exports = function (it) {
371 + return typeof it === 'object' ? it !== null : typeof it === 'function';
372 +};
373 +
374 +
375 +/***/ }),
376 +
377 +/***/ 33:
378 +/***/ (function(module, exports) {
379 +
380 +module.exports = function (exec) {
381 + try {
382 + return !!exec();
383 + } catch (e) {
384 + return true;
385 + }
386 +};
387 +
388 +
389 +/***/ }),
390 +
391 +/***/ 35:
392 +/***/ (function(module, exports, __webpack_require__) {
393 +
394 +var global = __webpack_require__(17);
395 +var hide = __webpack_require__(29);
396 +var has = __webpack_require__(61);
397 +var SRC = __webpack_require__(67)('src');
398 +var $toString = __webpack_require__(143);
399 +var TO_STRING = 'toString';
400 +var TPL = ('' + $toString).split(TO_STRING);
401 +
402 +__webpack_require__(55).inspectSource = function (it) {
403 + return $toString.call(it);
404 +};
405 +
406 +(module.exports = function (O, key, val, safe) {
407 + var isFunction = typeof val == 'function';
408 + if (isFunction) has(val, 'name') || hide(val, 'name', key);
409 + if (O[key] === val) return;
410 + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
411 + if (O === global) {
412 + O[key] = val;
413 + } else if (!safe) {
414 + delete O[key];
415 + hide(O, key, val);
416 + } else if (O[key]) {
417 + O[key] = val;
418 + } else {
419 + hide(O, key, val);
420 + }
421 +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
422 +})(Function.prototype, TO_STRING, function toString() {
423 + return typeof this == 'function' && this[SRC] || $toString.call(this);
424 +});
425 +
426 +
427 +/***/ }),
428 +
429 +/***/ 37:
430 +/***/ (function(module, exports, __webpack_require__) {
431 +
432 +var global = __webpack_require__(17);
433 +var core = __webpack_require__(55);
434 +var hide = __webpack_require__(29);
435 +var redefine = __webpack_require__(35);
436 +var ctx = __webpack_require__(73);
437 +var PROTOTYPE = 'prototype';
438 +
439 +var $export = function (type, name, source) {
440 + var IS_FORCED = type & $export.F;
441 + var IS_GLOBAL = type & $export.G;
442 + var IS_STATIC = type & $export.S;
443 + var IS_PROTO = type & $export.P;
444 + var IS_BIND = type & $export.B;
445 + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
446 + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
447 + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
448 + var key, own, out, exp;
449 + if (IS_GLOBAL) source = name;
450 + for (key in source) {
451 + // contains in native
452 + own = !IS_FORCED && target && target[key] !== undefined;
453 + // export native or passed
454 + out = (own ? target : source)[key];
455 + // bind timers to global for call from export context
456 + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
457 + // extend global
458 + if (target) redefine(target, key, out, type & $export.U);
459 + // export
460 + if (exports[key] != out) hide(exports, key, exp);
461 + if (IS_PROTO && expProto[key] != out) expProto[key] = out;
462 + }
463 +};
464 +global.core = core;
465 +// type bitmap
466 +$export.F = 1; // forced
467 +$export.G = 2; // global
468 +$export.S = 4; // static
469 +$export.P = 8; // proto
470 +$export.B = 16; // bind
471 +$export.W = 32; // wrap
472 +$export.U = 64; // safe
473 +$export.R = 128; // real proto method for `library`
474 +module.exports = $export;
475 +
476 +
477 +/***/ }),
478 +
479 +/***/ 42:
480 +/***/ (function(module, exports) {
481 +
482 +// 7.2.1 RequireObjectCoercible(argument)
483 +module.exports = function (it) {
484 + if (it == undefined) throw TypeError("Can't call method on " + it);
485 + return it;
486 +};
487 +
488 +
489 +/***/ }),
490 +
491 +/***/ 43:
492 +/***/ (function(module, exports, __webpack_require__) {
493 +
494 +// 7.1.15 ToLength
495 +var toInteger = __webpack_require__(57);
496 +var min = Math.min;
497 +module.exports = function (it) {
498 + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
499 +};
500 +
501 +
502 +/***/ }),
503 +
504 +/***/ 45:
505 +/***/ (function(module, exports, __webpack_require__) {
506 +
507 +var anObject = __webpack_require__(18);
508 +var IE8_DOM_DEFINE = __webpack_require__(129);
509 +var toPrimitive = __webpack_require__(123);
510 +var dP = Object.defineProperty;
511 +
512 +exports.f = __webpack_require__(27) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
513 + anObject(O);
514 + P = toPrimitive(P, true);
515 + anObject(Attributes);
516 + if (IE8_DOM_DEFINE) try {
517 + return dP(O, P, Attributes);
518 + } catch (e) { /* empty */ }
519 + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
520 + if ('value' in Attributes) O[P] = Attributes.value;
521 + return O;
522 +};
523 +
524 +
525 +/***/ }),
526 +
527 +/***/ 46:
528 +/***/ (function(module, exports) {
529 +
530 +var toString = {}.toString;
531 +
532 +module.exports = function (it) {
533 + return toString.call(it).slice(8, -1);
534 +};
535 +
536 +
537 +/***/ }),
538 +
539 +/***/ 55:
540 +/***/ (function(module, exports) {
541 +
542 +var core = module.exports = { version: '2.6.11' };
543 +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
544 +
545 +
546 +/***/ }),
547 +
548 +/***/ 57:
549 +/***/ (function(module, exports) {
550 +
551 +// 7.1.4 ToInteger
552 +var ceil = Math.ceil;
553 +var floor = Math.floor;
554 +module.exports = function (it) {
555 + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
556 +};
557 +
558 +
559 +/***/ }),
560 +
561 +/***/ 61:
562 +/***/ (function(module, exports) {
563 +
564 +var hasOwnProperty = {}.hasOwnProperty;
565 +module.exports = function (it, key) {
566 + return hasOwnProperty.call(it, key);
567 +};
568 +
569 +
570 +/***/ }),
571 +
572 +/***/ 66:
573 +/***/ (function(module, exports, __webpack_require__) {
574 +
575 +var core = __webpack_require__(55);
576 +var global = __webpack_require__(17);
577 +var SHARED = '__core-js_shared__';
578 +var store = global[SHARED] || (global[SHARED] = {});
579 +
580 +(module.exports = function (key, value) {
581 + return store[key] || (store[key] = value !== undefined ? value : {});
582 +})('versions', []).push({
583 + version: core.version,
584 + mode: __webpack_require__(110) ? 'pure' : 'global',
585 + copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
586 +});
587 +
588 +
589 +/***/ }),
590 +
591 +/***/ 67:
592 +/***/ (function(module, exports) {
593 +
594 +var id = 0;
595 +var px = Math.random();
596 +module.exports = function (key) {
597 + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
598 +};
599 +
600 +
601 +/***/ }),
602 +
603 +/***/ 73:
604 +/***/ (function(module, exports, __webpack_require__) {
605 +
606 +// optional / simple context binding
607 +var aFunction = __webpack_require__(91);
608 +module.exports = function (fn, that, length) {
609 + aFunction(fn);
610 + if (that === undefined) return fn;
611 + switch (length) {
612 + case 1: return function (a) {
613 + return fn.call(that, a);
614 + };
615 + case 2: return function (a, b) {
616 + return fn.call(that, a, b);
617 + };
618 + case 3: return function (a, b, c) {
619 + return fn.call(that, a, b, c);
620 + };
621 + }
622 + return function (/* ...args */) {
623 + return fn.apply(that, arguments);
624 + };
625 +};
626 +
627 +
628 +/***/ }),
629 +
630 +/***/ 740:
631 +/***/ (function(module, exports, __webpack_require__) {
632 +
633 +"use strict";
634 +
635 +
636 +__webpack_require__(26);
637 +
638 +/* global jQuery, ElementorGutenbergSettings */
51 639 (function ($) {
52 640 'use strict';
53 641
54 642 var ElementorGutenbergApp = {
@@ -68,86 +656,45 @@
68 656 });
69 657 },
70 658 buildPanel: function buildPanel() {
71 659 var self = this;
660 +
72 661 if (!self.cache.$gutenberg.find('#elementor-switch-mode').length) {
73 662 self.cache.$gutenberg.find('.edit-post-header-toolbar').append(self.cache.$switchMode);
74 663 }
75 - if (this.hasIframe()) {
76 - this.handleIframe();
77 - }
664 +
78 665 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);
666 + self.cache.$editorPanel = $($('#elementor-gutenberg-panel').html()); // TODO: `editor-block-list__layout` class for WP < 5.3 support.
667 +
668 + self.cache.$gurenbergBlockList = self.cache.$gutenberg.find('.editor-block-list__layout, .editor-post-text-editor, .block-editor-block-list__layout');
669 + self.cache.$gurenbergBlockList.after(self.cache.$editorPanel);
86 670 self.cache.$editorPanelButton = self.cache.$editorPanel.find('#elementor-go-to-edit-page-link');
87 671 self.cache.$editorPanelButton.on('click', function (event) {
88 672 event.preventDefault();
89 - self.handleEditButtonClick();
673 + self.animateLoader();
674 + var documentTitle = wp.data.select('core/editor').getEditedPostAttribute('title');
675 +
676 + if (!documentTitle) {
677 + wp.data.dispatch('core/editor').editPost({
678 + title: 'Elementor #' + $('#post_ID').val()
679 + });
680 + }
681 +
682 + wp.data.dispatch('core/editor').savePost();
683 + self.redirectWhenSave();
90 684 });
91 685 }
92 686 },
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 687 bindEvents: function bindEvents() {
141 688 var self = this;
142 689 self.cache.$switchModeButton.on('click', function () {
143 690 if (self.isElementorMode) {
144 691 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'),
692 + message: elementorAdmin.translate('back_to_wordpress_editor_message'),
693 + headerMessage: elementorAdmin.translate('back_to_wordpress_editor_header'),
147 694 strings: {
148 - confirm: __('Continue', 'elementor'),
149 - cancel: __('Cancel', 'elementor')
695 + confirm: elementorAdmin.translate('yes'),
696 + cancel: elementorAdmin.translate('cancel')
150 697 },
151 698 defaultOption: 'confirm',
152 699 onConfirm: function onConfirm() {
153 700 var wpEditor = wp.data.dispatch('core/editor');
@@ -189,9 +736,46 @@
189 736 $(function () {
190 737 ElementorGutenbergApp.init();
191 738 });
192 739 })(jQuery);
193 -})();
194 740
195 -/******/ })()
196 -;
741 +/***/ }),
742 +
743 +/***/ 85:
744 +/***/ (function(module, exports, __webpack_require__) {
745 +
746 +// 22.1.3.31 Array.prototype[@@unscopables]
747 +var UNSCOPABLES = __webpack_require__(12)('unscopables');
748 +var ArrayProto = Array.prototype;
749 +if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(29)(ArrayProto, UNSCOPABLES, {});
750 +module.exports = function (key) {
751 + ArrayProto[UNSCOPABLES][key] = true;
752 +};
753 +
754 +
755 +/***/ }),
756 +
757 +/***/ 91:
758 +/***/ (function(module, exports) {
759 +
760 +module.exports = function (it) {
761 + if (typeof it != 'function') throw TypeError(it + ' is not a function!');
762 + return it;
763 +};
764 +
765 +
766 +/***/ }),
767 +
768 +/***/ 96:
769 +/***/ (function(module, exports, __webpack_require__) {
770 +
771 +// 7.1.13 ToObject(argument)
772 +var defined = __webpack_require__(42);
773 +module.exports = function (it) {
774 + return Object(defined(it));
775 +};
776 +
777 +
778 +/***/ })
779 +
780 +/******/ });
197 781 //# sourceMappingURL=gutenberg.js.map