| @@ -1,4 +1,5 @@ | ||
| 1 | +/*! elementor - v3.13.2 - 11-05-2023 */ | |
| 1 | 2 | /******/ (() => { // webpackBootstrap |
| 2 | 3 | /******/ var __webpack_modules__ = ({ |
| 3 | 4 | |
| 4 | 5 | /***/ "../assets/dev/js/admin/new-template/behaviors/lock-pro.js": |
| @@ -16,14 +17,14 @@ | ||
| 16 | 17 | })); |
| 17 | 18 | exports["default"] = void 0; |
| 18 | 19 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 19 | 20 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 20 | -var LockPro = exports["default"] = /*#__PURE__*/function () { | |
| 21 | +var LockPro = /*#__PURE__*/function () { | |
| 21 | 22 | function LockPro(elements) { |
| 22 | 23 | (0, _classCallCheck2.default)(this, LockPro); |
| 23 | 24 | this.elements = elements; |
| 24 | 25 | } |
| 25 | - return (0, _createClass2.default)(LockPro, [{ | |
| 26 | + (0, _createClass2.default)(LockPro, [{ | |
| 26 | 27 | key: "bindEvents", |
| 27 | 28 | value: function bindEvents() { |
| 28 | 29 | var _this$elements = this.elements, |
| 29 | 30 | form = _this$elements.form, |
| @@ -117,9 +118,11 @@ | ||
| 117 | 118 | value: function replaceLockLinkPlaceholders(link) { |
| 118 | 119 | return link.replace(/%%utm_source%%/g, 'wp-add-new').replace(/%%utm_medium%%/g, 'wp-dash'); |
| 119 | 120 | } |
| 120 | 121 | }]); |
| 122 | + return LockPro; | |
| 121 | 123 | }(); |
| 124 | +exports["default"] = LockPro; | |
| 122 | 125 | |
| 123 | 126 | /***/ }), |
| 124 | 127 | |
| 125 | 128 | /***/ "../assets/dev/js/admin/new-template/layout.js": |
| @@ -147,26 +150,17 @@ | ||
| 147 | 150 | }; |
| 148 | 151 | }, |
| 149 | 152 | initialize: function initialize() { |
| 150 | 153 | elementorModules.common.views.modal.Layout.prototype.initialize.apply(this, arguments); |
| 154 | + var lookupControlIdPrefix = 'elementor-new-template__form__'; | |
| 155 | + var templateTypeSelectId = "".concat(lookupControlIdPrefix, "template-type"); | |
| 151 | 156 | this.showLogo(); |
| 152 | 157 | this.showContentView(); |
| 153 | 158 | this.initElements(); |
| 154 | 159 | this.lockProBehavior = new _lockPro.default(this.elements); |
| 155 | 160 | this.lockProBehavior.bindEvents(); |
| 156 | - this.setupDynamicControlsVisibility(); | |
| 157 | - }, | |
| 158 | - setupDynamicControlsVisibility: function setupDynamicControlsVisibility() { | |
| 159 | - // eslint-disable-next-line camelcase | |
| 160 | - var isFormControlsDefined = 'undefined' !== typeof elementor_new_template_form_controls; | |
| 161 | - if (!isFormControlsDefined) { | |
| 162 | - return; | |
| 163 | - } | |
| 164 | - var CONTROL_ID_PREFIX = 'elementor-new-template__form__'; | |
| 165 | - var templateTypeSelectId = "".concat(CONTROL_ID_PREFIX, "template-type"); | |
| 166 | 161 | var dynamicControlsVisibilityListener = function dynamicControlsVisibilityListener() { |
| 167 | - // eslint-disable-next-line camelcase | |
| 168 | - elementorAdmin.templateControls.setDynamicControlsVisibility(CONTROL_ID_PREFIX, elementor_new_template_form_controls); | |
| 162 | + elementorAdmin.templateControls.setDynamicControlsVisibility(lookupControlIdPrefix, elementor_new_template_form_controls); | |
| 169 | 163 | }; |
| 170 | 164 | this.getModal().onShow = function () { |
| 171 | 165 | dynamicControlsVisibilityListener(); |
| 172 | 166 | document.getElementById(templateTypeSelectId).addEventListener('change', dynamicControlsVisibilityListener); |
| @@ -213,8 +207,19 @@ | ||
| 213 | 207 | }); |
| 214 | 208 | |
| 215 | 209 | /***/ }), |
| 216 | 210 | |
| 211 | +/***/ "@wordpress/i18n": | |
| 212 | +/*!**************************!*\ | |
| 213 | + !*** external "wp.i18n" ***! | |
| 214 | + \**************************/ | |
| 215 | +/***/ ((module) => { | |
| 216 | + | |
| 217 | +"use strict"; | |
| 218 | +module.exports = wp.i18n; | |
| 219 | + | |
| 220 | +/***/ }), | |
| 221 | + | |
| 217 | 222 | /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": |
| 218 | 223 | /*!****************************************************************!*\ |
| 219 | 224 | !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 220 | 225 | \****************************************************************/ |
| @@ -219,10 +224,12 @@ | ||
| 219 | 224 | !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 220 | 225 | \****************************************************************/ |
| 221 | 226 | /***/ ((module) => { |
| 222 | 227 | |
| 223 | -function _classCallCheck(a, n) { | |
| 224 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 228 | +function _classCallCheck(instance, Constructor) { | |
| 229 | + if (!(instance instanceof Constructor)) { | |
| 230 | + throw new TypeError("Cannot call a class as a function"); | |
| 231 | + } | |
| 225 | 232 | } |
| 226 | 233 | module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 227 | 234 | |
| 228 | 235 | /***/ }), |
| @@ -233,18 +240,24 @@ | ||
| 233 | 240 | \*************************************************************/ |
| 234 | 241 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 235 | 242 | |
| 236 | 243 | var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 237 | -function _defineProperties(e, r) { | |
| 238 | - for (var t = 0; t < r.length; t++) { | |
| 239 | - var o = r[t]; | |
| 240 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 244 | +function _defineProperties(target, props) { | |
| 245 | + for (var i = 0; i < props.length; i++) { | |
| 246 | + var descriptor = props[i]; | |
| 247 | + descriptor.enumerable = descriptor.enumerable || false; | |
| 248 | + descriptor.configurable = true; | |
| 249 | + if ("value" in descriptor) descriptor.writable = true; | |
| 250 | + Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor); | |
| 241 | 251 | } |
| 242 | 252 | } |
| 243 | -function _createClass(e, r, t) { | |
| 244 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 245 | - writable: !1 | |
| 246 | - }), e; | |
| 253 | +function _createClass(Constructor, protoProps, staticProps) { | |
| 254 | + if (protoProps) _defineProperties(Constructor.prototype, protoProps); | |
| 255 | + if (staticProps) _defineProperties(Constructor, staticProps); | |
| 256 | + Object.defineProperty(Constructor, "prototype", { | |
| 257 | + writable: false | |
| 258 | + }); | |
| 259 | + return Constructor; | |
| 247 | 260 | } |
| 248 | 261 | module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 249 | 262 | |
| 250 | 263 | /***/ }), |
| @@ -254,11 +267,11 @@ | ||
| 254 | 267 | !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 255 | 268 | \***********************************************************************/ |
| 256 | 269 | /***/ ((module) => { |
| 257 | 270 | |
| 258 | -function _interopRequireDefault(e) { | |
| 259 | - return e && e.__esModule ? e : { | |
| 260 | - "default": e | |
| 271 | +function _interopRequireDefault(obj) { | |
| 272 | + return obj && obj.__esModule ? obj : { | |
| 273 | + "default": obj | |
| 261 | 274 | }; |
| 262 | 275 | } |
| 263 | 276 | module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 264 | 277 | |
| @@ -270,19 +283,19 @@ | ||
| 270 | 283 | \*************************************************************/ |
| 271 | 284 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 272 | 285 | |
| 273 | 286 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 274 | -function toPrimitive(t, r) { | |
| 275 | - if ("object" != _typeof(t) || !t) return t; | |
| 276 | - var e = t[Symbol.toPrimitive]; | |
| 277 | - if (void 0 !== e) { | |
| 278 | - var i = e.call(t, r || "default"); | |
| 279 | - if ("object" != _typeof(i)) return i; | |
| 287 | +function _toPrimitive(input, hint) { | |
| 288 | + if (_typeof(input) !== "object" || input === null) return input; | |
| 289 | + var prim = input[Symbol.toPrimitive]; | |
| 290 | + if (prim !== undefined) { | |
| 291 | + var res = prim.call(input, hint || "default"); | |
| 292 | + if (_typeof(res) !== "object") return res; | |
| 280 | 293 | throw new TypeError("@@toPrimitive must return a primitive value."); |
| 281 | 294 | } |
| 282 | - return ("string" === r ? String : Number)(t); | |
| 295 | + return (hint === "string" ? String : Number)(input); | |
| 283 | 296 | } |
| 284 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 297 | +module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 285 | 298 | |
| 286 | 299 | /***/ }), |
| 287 | 300 | |
| 288 | 301 | /***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": |
| @@ -292,13 +305,13 @@ | ||
| 292 | 305 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 293 | 306 | |
| 294 | 307 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 295 | 308 | var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); |
| 296 | -function toPropertyKey(t) { | |
| 297 | - var i = toPrimitive(t, "string"); | |
| 298 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 309 | +function _toPropertyKey(arg) { | |
| 310 | + var key = toPrimitive(arg, "string"); | |
| 311 | + return _typeof(key) === "symbol" ? key : String(key); | |
| 299 | 312 | } |
| 300 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 313 | +module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 301 | 314 | |
| 302 | 315 | /***/ }), |
| 303 | 316 | |
| 304 | 317 | /***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| @@ -306,30 +319,19 @@ | ||
| 306 | 319 | !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 307 | 320 | \********************************************************/ |
| 308 | 321 | /***/ ((module) => { |
| 309 | 322 | |
| 310 | -function _typeof(o) { | |
| 323 | +function _typeof(obj) { | |
| 311 | 324 | "@babel/helpers - typeof"; |
| 312 | 325 | |
| 313 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 314 | - return typeof o; | |
| 315 | - } : function (o) { | |
| 316 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 317 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 326 | + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { | |
| 327 | + return typeof obj; | |
| 328 | + } : function (obj) { | |
| 329 | + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | |
| 330 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); | |
| 318 | 331 | } |
| 319 | 332 | module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 320 | 333 | |
| 321 | -/***/ }), | |
| 322 | - | |
| 323 | -/***/ "@wordpress/i18n": | |
| 324 | -/*!**************************!*\ | |
| 325 | - !*** external "wp.i18n" ***! | |
| 326 | - \**************************/ | |
| 327 | -/***/ ((module) => { | |
| 328 | - | |
| 329 | -"use strict"; | |
| 330 | -module.exports = wp.i18n; | |
| 331 | - | |
| 332 | 334 | /***/ }) |
| 333 | 335 | |
| 334 | 336 | /******/ }); |
| 335 | 337 | /************************************************************************/ |
| @@ -358,9 +360,9 @@ | ||
| 358 | 360 | /******/ } |
| 359 | 361 | /******/ |
| 360 | 362 | /************************************************************************/ |
| 361 | 363 | var __webpack_exports__ = {}; |
| 362 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 364 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 363 | 365 | (() => { |
| 364 | 366 | "use strict"; |
| 365 | 367 | /*!***********************************************************!*\ |
| 366 | 368 | !*** ../assets/dev/js/admin/new-template/new-template.js ***! |
| @@ -371,9 +373,9 @@ | ||
| 371 | 373 | var NewTemplateModule = elementorModules.ViewModule.extend({ |
| 372 | 374 | getDefaultSettings: function getDefaultSettings() { |
| 373 | 375 | return { |
| 374 | 376 | selectors: { |
| 375 | - addButton: 'a.page-title-action[href*="post-new.php?post_type=elementor_library"], #elementor-template-library-add-new' | |
| 377 | + addButton: '.page-title-action:first, #elementor-template-library-add-new' | |
| 376 | 378 | } |
| 377 | 379 | }; |
| 378 | 380 | }, |
| 379 | 381 | getDefaultElements: function getDefaultElements() { |
| @@ -387,10 +389,9 @@ | ||
| 387 | 389 | elementorCommon.elements.$window.on('hashchange', this.showModalByHash.bind(this)); |
| 388 | 390 | }, |
| 389 | 391 | showModalByHash: function showModalByHash() { |
| 390 | 392 | if ('#add_new' === location.hash) { |
| 391 | - var _this$layout; | |
| 392 | - (_this$layout = this.layout) === null || _this$layout === void 0 || _this$layout.showModal(); | |
| 393 | + this.layout.showModal(); | |
| 393 | 394 | location.hash = ''; |
| 394 | 395 | } |
| 395 | 396 | }, |
| 396 | 397 | onInit: function onInit() { |
| @@ -398,11 +399,10 @@ | ||
| 398 | 399 | this.layout = new NewTemplateLayout(); |
| 399 | 400 | this.showModalByHash(); |
| 400 | 401 | }, |
| 401 | 402 | onAddButtonClick: function onAddButtonClick(event) { |
| 402 | - var _this$layout2; | |
| 403 | 403 | event.preventDefault(); |
| 404 | - (_this$layout2 = this.layout) === null || _this$layout2 === void 0 || _this$layout2.showModal(); | |
| 404 | + this.layout.showModal(); | |
| 405 | 405 | } |
| 406 | 406 | }); |
| 407 | 407 | jQuery(function () { |
| 408 | 408 | window.elementorNewTemplate = new NewTemplateModule(); |