PluginProbe
Elementor Website Builder – more than just a page builder / 3.13.2
Elementor Website Builder – more than just a page builder v3.13.2
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 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | assets/js/import-export-admin.js +77 -69 4.1.0-dev23.13.2 View file →
@@ -1,7 +1,19 @@
1 +/*! elementor - v3.13.2 - 11-05-2023 */
1 2 /******/ (() => { // webpackBootstrap
2 3 /******/ var __webpack_modules__ = ({
3 4
5 +/***/ "@wordpress/i18n":
6 +/*!**************************!*\
7 + !*** external "wp.i18n" ***!
8 + \**************************/
9 +/***/ ((module) => {
10 +
11 +"use strict";
12 +module.exports = wp.i18n;
13 +
14 +/***/ }),
15 +
4 16 /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
5 17 /*!****************************************************************!*\
6 18 !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
7 19 \****************************************************************/
@@ -6,10 +18,12 @@
6 18 !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
7 19 \****************************************************************/
8 20 /***/ ((module) => {
9 21
10 -function _classCallCheck(a, n) {
11 - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
22 +function _classCallCheck(instance, Constructor) {
23 + if (!(instance instanceof Constructor)) {
24 + throw new TypeError("Cannot call a class as a function");
25 + }
12 26 }
13 27 module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
14 28
15 29 /***/ }),
@@ -20,18 +34,24 @@
20 34 \*************************************************************/
21 35 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
22 36
23 37 var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
24 -function _defineProperties(e, r) {
25 - for (var t = 0; t < r.length; t++) {
26 - var o = r[t];
27 - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
38 +function _defineProperties(target, props) {
39 + for (var i = 0; i < props.length; i++) {
40 + var descriptor = props[i];
41 + descriptor.enumerable = descriptor.enumerable || false;
42 + descriptor.configurable = true;
43 + if ("value" in descriptor) descriptor.writable = true;
44 + Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
28 45 }
29 46 }
30 -function _createClass(e, r, t) {
31 - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
32 - writable: !1
33 - }), e;
47 +function _createClass(Constructor, protoProps, staticProps) {
48 + if (protoProps) _defineProperties(Constructor.prototype, protoProps);
49 + if (staticProps) _defineProperties(Constructor, staticProps);
50 + Object.defineProperty(Constructor, "prototype", {
51 + writable: false
52 + });
53 + return Constructor;
34 54 }
35 55 module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
36 56
37 57 /***/ }),
@@ -42,15 +62,21 @@
42 62 \****************************************************************/
43 63 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
44 64
45 65 var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
46 -function _defineProperty(e, r, t) {
47 - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
48 - value: t,
49 - enumerable: !0,
50 - configurable: !0,
51 - writable: !0
52 - }) : e[r] = t, e;
66 +function _defineProperty(obj, key, value) {
67 + key = toPropertyKey(key);
68 + if (key in obj) {
69 + Object.defineProperty(obj, key, {
70 + value: value,
71 + enumerable: true,
72 + configurable: true,
73 + writable: true
74 + });
75 + } else {
76 + obj[key] = value;
77 + }
78 + return obj;
53 79 }
54 80 module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
55 81
56 82 /***/ }),
@@ -60,11 +86,11 @@
60 86 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
61 87 \***********************************************************************/
62 88 /***/ ((module) => {
63 89
64 -function _interopRequireDefault(e) {
65 - return e && e.__esModule ? e : {
66 - "default": e
90 +function _interopRequireDefault(obj) {
91 + return obj && obj.__esModule ? obj : {
92 + "default": obj
67 93 };
68 94 }
69 95 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
70 96
@@ -76,19 +102,19 @@
76 102 \*************************************************************/
77 103 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
78 104
79 105 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
80 -function toPrimitive(t, r) {
81 - if ("object" != _typeof(t) || !t) return t;
82 - var e = t[Symbol.toPrimitive];
83 - if (void 0 !== e) {
84 - var i = e.call(t, r || "default");
85 - if ("object" != _typeof(i)) return i;
106 +function _toPrimitive(input, hint) {
107 + if (_typeof(input) !== "object" || input === null) return input;
108 + var prim = input[Symbol.toPrimitive];
109 + if (prim !== undefined) {
110 + var res = prim.call(input, hint || "default");
111 + if (_typeof(res) !== "object") return res;
86 112 throw new TypeError("@@toPrimitive must return a primitive value.");
87 113 }
88 - return ("string" === r ? String : Number)(t);
114 + return (hint === "string" ? String : Number)(input);
89 115 }
90 -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
116 +module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
91 117
92 118 /***/ }),
93 119
94 120 /***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js":
@@ -98,13 +124,13 @@
98 124 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
99 125
100 126 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
101 127 var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js");
102 -function toPropertyKey(t) {
103 - var i = toPrimitive(t, "string");
104 - return "symbol" == _typeof(i) ? i : i + "";
128 +function _toPropertyKey(arg) {
129 + var key = toPrimitive(arg, "string");
130 + return _typeof(key) === "symbol" ? key : String(key);
105 131 }
106 -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
132 +module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
107 133
108 134 /***/ }),
109 135
110 136 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
@@ -112,30 +138,19 @@
112 138 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
113 139 \********************************************************/
114 140 /***/ ((module) => {
115 141
116 -function _typeof(o) {
142 +function _typeof(obj) {
117 143 "@babel/helpers - typeof";
118 144
119 - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
120 - return typeof o;
121 - } : function (o) {
122 - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
123 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
145 + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
146 + return typeof obj;
147 + } : function (obj) {
148 + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
149 + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
124 150 }
125 151 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
126 152
127 -/***/ }),
128 -
129 -/***/ "@wordpress/i18n":
130 -/*!**************************!*\
131 - !*** external "wp.i18n" ***!
132 - \**************************/
133 -/***/ ((module) => {
134 -
135 -"use strict";
136 -module.exports = wp.i18n;
137 -
138 153 /***/ })
139 154
140 155 /******/ });
141 156 /************************************************************************/
@@ -163,9 +178,10 @@
163 178 /******/ return module.exports;
164 179 /******/ }
165 180 /******/
166 181 /************************************************************************/
167 -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
182 +var __webpack_exports__ = {};
183 +// This entry need to be wrapped in an IIFE because it need to be in strict mode.
168 184 (() => {
169 185 "use strict";
170 186 /*!*******************************************************!*\
171 187 !*** ../app/modules/import-export/assets/js/admin.js ***!
@@ -208,32 +224,23 @@
208 224 this.revertButton = document.getElementById('elementor-import-export__revert_kit');
209 225 if (this.revertButton) {
210 226 this.revertButton.addEventListener('click', this.onRevertButtonClick.bind(this));
211 227 this.maybeAddRevertBtnMargin();
212 - this.maybeScrollToRevertButton();
213 228 }
214 229 this.maybeShowReferrerKitDialog();
215 230 }
216 - return (0, _createClass2.default)(Admin, [{
217 - key: "shouldScrollToRevert",
218 - value: function shouldScrollToRevert() {
219 - var urlParams = new URLSearchParams(window.location.search);
220 - return !!urlParams.get('scroll_to_revert');
221 - }
222 - }, {
231 +
232 + /**
233 + * Add bottom margin to revert btn if referred from Kit library
234 + */
235 + (0, _createClass2.default)(Admin, [{
223 236 key: "maybeAddRevertBtnMargin",
224 237 value: function maybeAddRevertBtnMargin() {
225 - if (!this.shouldScrollToRevert()) {
238 + var referrerKitId = new URLSearchParams(this.revertButton.href).get('referrer_kit');
239 + if (!referrerKitId) {
226 240 return;
227 241 }
228 242 this.revertButton.style.marginBottom = this.calculateMargin();
229 - }
230 - }, {
231 - key: "maybeScrollToRevertButton",
232 - value: function maybeScrollToRevertButton() {
233 - if (!this.shouldScrollToRevert()) {
234 - return;
235 - }
236 243 this.scrollToBottom();
237 244 }
238 245
239 246 /**
@@ -274,9 +281,9 @@
274 281 event.preventDefault();
275 282 elementorCommon.dialogsManager.createWidget('confirm', {
276 283 headerMessage: __('Are you sure?', 'elementor'),
277 284 // Translators: %s is the name of the active Kit
278 - message: __('Removing %s will permanently delete changes made to the Websites Template\'s content and site settings', 'elementor').replace('%s', this.activeKitName),
285 + message: __('Removing %s will permanently delete changes made to the Kit\'s content and site settings', 'elementor').replace('%s', this.activeKitName),
279 286 strings: {
280 287 confirm: __('Delete', 'elementor'),
281 288 cancel: __('Cancel', 'elementor')
282 289 },
@@ -301,12 +308,12 @@
301 308 return;
302 309 }
303 310 if (0 === referrerKitId.length) {
304 311 this.createKitDeletedWidget({
305 - message: __('Try a different Website Template or build your site from scratch.', 'elementor'),
312 + message: __('Try a different Kit or build your site from scratch.', 'elementor'),
306 313 strings: {
307 314 confirm: __('OK', 'elementor'),
308 - cancel: __('Library', 'elementor')
315 + cancel: __('Kit Library', 'elementor')
309 316 },
310 317 onCancel: function onCancel() {
311 318 location.href = elementorImportExport.appUrl;
312 319 }
@@ -410,8 +417,9 @@
410 417 value: function clearCache() {
411 418 sessionStorage.removeItem(this.KIT_DATA_KEY);
412 419 }
413 420 }]);
421 + return Admin;
414 422 }();
415 423 window.addEventListener('load', function () {
416 424 new Admin();
417 425 });