PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.0-dev2
Elementor Website Builder – more than just a page builder v3.35.0-dev2
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/atomic-widgets-editor.js +821 -661 4.2.0-beta2 → 3.35.0-dev2 View file →
@@ -302,463 +302,23 @@
302 302 value: true
303 303 }));
304 304 exports["default"] = EmptyComponent;
305 305 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
306 -var _editorOneEvents = __webpack_require__(/*! elementor-editor-utils/editor-one-events */ "../assets/dev/js/editor/utils/editor-one-events.js");
307 306 /* eslint-disable jsx-a11y/no-static-element-interactions */
308 307 /* eslint-disable jsx-a11y/click-events-have-key-events */
309 -
310 308 function EmptyComponent() {
311 - var handleClick = function handleClick() {
312 - _editorOneEvents.EditorOneEventManager.sendCanvasEmptyBoxAction({
313 - targetName: 'add_container'
314 - });
315 - $e.route('panel/elements/categories');
316 - };
317 309 return /*#__PURE__*/_react.default.createElement("div", {
318 310 className: "elementor-first-add"
319 311 }, /*#__PURE__*/_react.default.createElement("div", {
320 312 className: "elementor-icon eicon-plus",
321 - onClick: handleClick
313 + onClick: function onClick() {
314 + return $e.route('panel/elements/categories');
315 + }
322 316 }));
323 317 }
324 318
325 319 /***/ }),
326 320
327 -/***/ "../assets/dev/js/editor/utils/editor-one-events.js":
328 -/*!**********************************************************!*\
329 - !*** ../assets/dev/js/editor/utils/editor-one-events.js ***!
330 - \**********************************************************/
331 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
332 -
333 -"use strict";
334 -
335 -
336 -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
337 -Object.defineProperty(exports, "__esModule", ({
338 - value: true
339 -}));
340 -exports["default"] = exports.createDebouncedWidgetPanelSearch = exports.createDebouncedFinderSearch = exports.EditorOneEventManager = void 0;
341 -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
342 -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
343 -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
344 -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
345 -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
346 -var EditorOneEventManager = exports.EditorOneEventManager = /*#__PURE__*/function () {
347 - function EditorOneEventManager() {
348 - (0, _classCallCheck2.default)(this, EditorOneEventManager);
349 - }
350 - return (0, _createClass2.default)(EditorOneEventManager, null, [{
351 - key: "getEventsManager",
352 - value: function getEventsManager() {
353 - var _elementorCommon;
354 - return (_elementorCommon = elementorCommon) === null || _elementorCommon === void 0 ? void 0 : _elementorCommon.eventsManager;
355 - }
356 - }, {
357 - key: "getConfig",
358 - value: function getConfig() {
359 - var _this$getEventsManage;
360 - return (_this$getEventsManage = this.getEventsManager()) === null || _this$getEventsManage === void 0 ? void 0 : _this$getEventsManage.config;
361 - }
362 - }, {
363 - key: "canSendEvents",
364 - value: function canSendEvents() {
365 - var _elementorCommon2;
366 - return ((_elementorCommon2 = elementorCommon) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.config) === null || _elementorCommon2 === void 0 || (_elementorCommon2 = _elementorCommon2.editor_events) === null || _elementorCommon2 === void 0 ? void 0 : _elementorCommon2.can_send_events) || false;
367 - }
368 - }, {
369 - key: "isEventsManagerAvailable",
370 - value: function isEventsManagerAvailable() {
371 - var eventsManager = this.getEventsManager();
372 - return eventsManager && 'function' === typeof eventsManager.dispatchEvent;
373 - }
374 - }, {
375 - key: "dispatchEvent",
376 - value: function dispatchEvent(eventName, payload) {
377 - if (!this.isEventsManagerAvailable() || !this.canSendEvents()) {
378 - return false;
379 - }
380 - this.getEventsManager().dispatchEvent(eventName, payload);
381 - }
382 - }, {
383 - key: "toLowerSnake",
384 - value: function toLowerSnake(value) {
385 - if (!value || 'string' !== typeof value) {
386 - return value;
387 - }
388 - return value.replace(/\s+/g, '_').toLowerCase();
389 - }
390 - }, {
391 - key: "decodeHtmlEntities",
392 - value: function decodeHtmlEntities(text) {
393 - if (!text || 'string' !== typeof text) {
394 - return text;
395 - }
396 - var doc = new DOMParser().parseFromString(text, 'text/html');
397 - return doc.body.textContent || text;
398 - }
399 - }, {
400 - key: "isInEditorContext",
401 - value: function isInEditorContext() {
402 - var _window$elementor;
403 - return 'undefined' !== typeof window.elementor && !!((_window$elementor = window.elementor) !== null && _window$elementor !== void 0 && _window$elementor.documents);
404 - }
405 - }, {
406 - key: "getFinderContext",
407 - value: function getFinderContext() {
408 - var _config$appTypes, _config$appTypes2, _config$locations, _config$locations2;
409 - var config = this.getConfig();
410 - var isEditor = this.isInEditorContext();
411 - return {
412 - windowName: isEditor ? config === null || config === void 0 || (_config$appTypes = config.appTypes) === null || _config$appTypes === void 0 ? void 0 : _config$appTypes.editor : config === null || config === void 0 || (_config$appTypes2 = config.appTypes) === null || _config$appTypes2 === void 0 ? void 0 : _config$appTypes2.wpAdmin,
413 - targetLocation: this.toLowerSnake(isEditor ? config === null || config === void 0 || (_config$locations = config.locations) === null || _config$locations === void 0 ? void 0 : _config$locations.topBar : config === null || config === void 0 || (_config$locations2 = config.locations) === null || _config$locations2 === void 0 ? void 0 : _config$locations2.sidebar)
414 - };
415 - }
416 - }, {
417 - key: "createBasePayload",
418 - value: function createBasePayload() {
419 - var _config$appTypes$edit, _config$appTypes3, _config$appTypes$edit2, _config$appTypes4;
420 - var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
421 - var config = this.getConfig();
422 - return _objectSpread({
423 - app_type: (_config$appTypes$edit = config === null || config === void 0 || (_config$appTypes3 = config.appTypes) === null || _config$appTypes3 === void 0 ? void 0 : _config$appTypes3.editor) !== null && _config$appTypes$edit !== void 0 ? _config$appTypes$edit : 'editor',
424 - window_name: (_config$appTypes$edit2 = config === null || config === void 0 || (_config$appTypes4 = config.appTypes) === null || _config$appTypes4 === void 0 ? void 0 : _config$appTypes4.editor) !== null && _config$appTypes$edit2 !== void 0 ? _config$appTypes$edit2 : 'editor'
425 - }, overrides);
426 - }
427 - }, {
428 - key: "sendTopBarPublishDropdown",
429 - value: function sendTopBarPublishDropdown(targetName) {
430 - var _config$names, _config$triggers, _config$targetTypes, _config$interactionRe, _config$locations3, _config$secondaryLoca, _config$targetTypes2;
431 - var config = this.getConfig();
432 - return this.dispatchEvent(config === null || config === void 0 || (_config$names = config.names) === null || _config$names === void 0 || (_config$names = _config$names.editorOne) === null || _config$names === void 0 ? void 0 : _config$names.topBarPublishDropdown, this.createBasePayload({
433 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers = config.triggers) === null || _config$triggers === void 0 ? void 0 : _config$triggers.click),
434 - target_type: config === null || config === void 0 || (_config$targetTypes = config.targetTypes) === null || _config$targetTypes === void 0 ? void 0 : _config$targetTypes.dropdownItem,
435 - target_name: targetName,
436 - interaction_result: config === null || config === void 0 || (_config$interactionRe = config.interactionResults) === null || _config$interactionRe === void 0 ? void 0 : _config$interactionRe.actionSelected,
437 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations3 = config.locations) === null || _config$locations3 === void 0 ? void 0 : _config$locations3.topBar),
438 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca = config.secondaryLocations) === null || _config$secondaryLoca === void 0 ? void 0 : _config$secondaryLoca.publishDropdown),
439 - location_l2: config === null || config === void 0 || (_config$targetTypes2 = config.targetTypes) === null || _config$targetTypes2 === void 0 ? void 0 : _config$targetTypes2.dropdownItem,
440 - interaction_description: 'User selected an action from the publish dropdown'
441 - }));
442 - }
443 - }, {
444 - key: "sendTopBarPageList",
445 - value: function sendTopBarPageList(targetName) {
446 - var _config$names2, _config$triggers2, _config$targetTypes3, _config$interactionRe2, _config$interactionRe3, _config$locations4, _config$secondaryLoca2, _config$targetTypes4;
447 - var isCreate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
448 - var config = this.getConfig();
449 - return this.dispatchEvent(config === null || config === void 0 || (_config$names2 = config.names) === null || _config$names2 === void 0 || (_config$names2 = _config$names2.editorOne) === null || _config$names2 === void 0 ? void 0 : _config$names2.topBarPageList, this.createBasePayload({
450 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers2 = config.triggers) === null || _config$triggers2 === void 0 ? void 0 : _config$triggers2.click),
451 - target_type: config === null || config === void 0 || (_config$targetTypes3 = config.targetTypes) === null || _config$targetTypes3 === void 0 ? void 0 : _config$targetTypes3.dropdownItem,
452 - target_name: targetName,
453 - interaction_result: isCreate ? config === null || config === void 0 || (_config$interactionRe2 = config.interactionResults) === null || _config$interactionRe2 === void 0 ? void 0 : _config$interactionRe2.create : config === null || config === void 0 || (_config$interactionRe3 = config.interactionResults) === null || _config$interactionRe3 === void 0 ? void 0 : _config$interactionRe3.navigate,
454 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations4 = config.locations) === null || _config$locations4 === void 0 ? void 0 : _config$locations4.topBar),
455 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca2 = config.secondaryLocations) === null || _config$secondaryLoca2 === void 0 ? void 0 : _config$secondaryLoca2.pageListDropdown),
456 - location_l2: config === null || config === void 0 || (_config$targetTypes4 = config.targetTypes) === null || _config$targetTypes4 === void 0 ? void 0 : _config$targetTypes4.dropdownItem,
457 - interaction_description: 'User selected an action from the page list dropdown'
458 - }));
459 - }
460 - }, {
461 - key: "sendSiteSettingsSession",
462 - value: function sendSiteSettingsSession(_ref) {
463 - var _config$names3, _config$triggers3, _config$interactionRe4, _config$locations5, _config$secondaryLoca3;
464 - var targetType = _ref.targetType,
465 - _ref$visitedItems = _ref.visitedItems,
466 - visitedItems = _ref$visitedItems === void 0 ? [] : _ref$visitedItems,
467 - _ref$savedItems = _ref.savedItems,
468 - savedItems = _ref$savedItems === void 0 ? [] : _ref$savedItems,
469 - state = _ref.state;
470 - var config = this.getConfig();
471 - return this.dispatchEvent(config === null || config === void 0 || (_config$names3 = config.names) === null || _config$names3 === void 0 || (_config$names3 = _config$names3.editorOne) === null || _config$names3 === void 0 ? void 0 : _config$names3.siteSettingsSession, this.createBasePayload({
472 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers3 = config.triggers) === null || _config$triggers3 === void 0 ? void 0 : _config$triggers3.click),
473 - target_type: targetType,
474 - target_name: 'site_settings',
475 - interaction_result: config === null || config === void 0 || (_config$interactionRe4 = config.interactionResults) === null || _config$interactionRe4 === void 0 ? void 0 : _config$interactionRe4.sessionEnd,
476 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations5 = config.locations) === null || _config$locations5 === void 0 ? void 0 : _config$locations5.leftPanel),
477 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca3 = config.secondaryLocations) === null || _config$secondaryLoca3 === void 0 ? void 0 : _config$secondaryLoca3.siteSettings),
478 - interaction_description: 'Records areas visited as part of the site setting session',
479 - metadata: {
480 - visited_items: visitedItems,
481 - saved_items: savedItems
482 - },
483 - state: state
484 - }));
485 - }
486 - }, {
487 - key: "sendELibraryNav",
488 - value: function sendELibraryNav(tabName) {
489 - var _config$names4, _config$triggers4, _config$targetTypes5, _config$interactionRe5, _config$locations6, _config$secondaryLoca4;
490 - var config = this.getConfig();
491 - return this.dispatchEvent(config === null || config === void 0 || (_config$names4 = config.names) === null || _config$names4 === void 0 || (_config$names4 = _config$names4.editorOne) === null || _config$names4 === void 0 ? void 0 : _config$names4.eLibraryNav, this.createBasePayload({
492 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers4 = config.triggers) === null || _config$triggers4 === void 0 ? void 0 : _config$triggers4.tabSelect),
493 - target_type: config === null || config === void 0 || (_config$targetTypes5 = config.targetTypes) === null || _config$targetTypes5 === void 0 ? void 0 : _config$targetTypes5.tab,
494 - target_name: this.toLowerSnake(tabName),
495 - interaction_result: config === null || config === void 0 || (_config$interactionRe5 = config.interactionResults) === null || _config$interactionRe5 === void 0 ? void 0 : _config$interactionRe5.tabChanged,
496 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations6 = config.locations) === null || _config$locations6 === void 0 ? void 0 : _config$locations6.elementorLibrary),
497 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca4 = config.secondaryLocations) === null || _config$secondaryLoca4 === void 0 ? void 0 : _config$secondaryLoca4.libraryTabs),
498 - interaction_description: 'User navigates within elementor library'
499 - }));
500 - }
501 - }, {
502 - key: "sendELibraryInsert",
503 - value: function sendELibraryInsert(_ref2) {
504 - var _config$triggers5, _config$targetTypes6, _config$interactionRe6, _config$locations7, _config$secondaryLoca5, _config$names5;
505 - var assetId = _ref2.assetId,
506 - assetName = _ref2.assetName,
507 - libraryType = _ref2.libraryType,
508 - _ref2$proRequired = _ref2.proRequired,
509 - proRequired = _ref2$proRequired === void 0 ? false : _ref2$proRequired;
510 - var config = this.getConfig();
511 - var payload = this.createBasePayload({
512 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers5 = config.triggers) === null || _config$triggers5 === void 0 ? void 0 : _config$triggers5.insert),
513 - target_type: config === null || config === void 0 || (_config$targetTypes6 = config.targetTypes) === null || _config$targetTypes6 === void 0 ? void 0 : _config$targetTypes6.button,
514 - target_name: String(assetId),
515 - interaction_result: config === null || config === void 0 || (_config$interactionRe6 = config.interactionResults) === null || _config$interactionRe6 === void 0 ? void 0 : _config$interactionRe6.assetInserted,
516 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations7 = config.locations) === null || _config$locations7 === void 0 ? void 0 : _config$locations7.elementorLibrary),
517 - location_l1: this.toLowerSnake(libraryType),
518 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca5 = config.secondaryLocations) === null || _config$secondaryLoca5 === void 0 ? void 0 : _config$secondaryLoca5.assetCard),
519 - interaction_description: 'User inserts block/pages from elementor library',
520 - metadata: {
521 - template_id: String(assetId),
522 - template_name: this.decodeHtmlEntities(assetName) || ''
523 - }
524 - });
525 - if (proRequired) {
526 - payload.state = 'pro_plan_required';
527 - }
528 - return this.dispatchEvent(config === null || config === void 0 || (_config$names5 = config.names) === null || _config$names5 === void 0 || (_config$names5 = _config$names5.editorOne) === null || _config$names5 === void 0 ? void 0 : _config$names5.eLibraryInsert, payload);
529 - }
530 - }, {
531 - key: "sendELibraryFavorite",
532 - value: function sendELibraryFavorite(_ref3) {
533 - var _config$triggers6, _config$targetTypes7, _config$interactionRe7, _config$locations8, _config$secondaryLoca6, _config$names6;
534 - var assetId = _ref3.assetId,
535 - assetName = _ref3.assetName,
536 - libraryType = _ref3.libraryType,
537 - isFavorite = _ref3.isFavorite,
538 - _ref3$proRequired = _ref3.proRequired,
539 - proRequired = _ref3$proRequired === void 0 ? false : _ref3$proRequired;
540 - var config = this.getConfig();
541 - var payload = this.createBasePayload({
542 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers6 = config.triggers) === null || _config$triggers6 === void 0 ? void 0 : _config$triggers6.click),
543 - target_type: config === null || config === void 0 || (_config$targetTypes7 = config.targetTypes) === null || _config$targetTypes7 === void 0 ? void 0 : _config$targetTypes7.toggle,
544 - target_name: String(assetId),
545 - interaction_result: config === null || config === void 0 || (_config$interactionRe7 = config.interactionResults) === null || _config$interactionRe7 === void 0 ? void 0 : _config$interactionRe7.assetFavorite,
546 - target_value: Boolean(isFavorite),
547 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations8 = config.locations) === null || _config$locations8 === void 0 ? void 0 : _config$locations8.elementorLibrary),
548 - location_l1: this.toLowerSnake(libraryType),
549 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca6 = config.secondaryLocations) === null || _config$secondaryLoca6 === void 0 ? void 0 : _config$secondaryLoca6.assetCard),
550 - interaction_description: 'User favorite block/pages from elementor library',
551 - metadata: {
552 - template_id: String(assetId),
553 - template_name: this.decodeHtmlEntities(assetName) || ''
554 - }
555 - });
556 - if (proRequired) {
557 - payload.state = 'pro_plan_required';
558 - }
559 - return this.dispatchEvent(config === null || config === void 0 || (_config$names6 = config.names) === null || _config$names6 === void 0 || (_config$names6 = _config$names6.editorOne) === null || _config$names6 === void 0 ? void 0 : _config$names6.eLibraryFavorite, payload);
560 - }
561 - }, {
562 - key: "sendELibraryGenerateAi",
563 - value: function sendELibraryGenerateAi(_ref4) {
564 - var _config$names7, _config$triggers7, _config$targetTypes8, _config$interactionRe8, _config$locations9, _config$secondaryLoca7;
565 - var assetId = _ref4.assetId,
566 - assetName = _ref4.assetName,
567 - libraryType = _ref4.libraryType;
568 - var config = this.getConfig();
569 - return this.dispatchEvent(config === null || config === void 0 || (_config$names7 = config.names) === null || _config$names7 === void 0 || (_config$names7 = _config$names7.editorOne) === null || _config$names7 === void 0 ? void 0 : _config$names7.eLibraryGenerateAi, this.createBasePayload({
570 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers7 = config.triggers) === null || _config$triggers7 === void 0 ? void 0 : _config$triggers7.click),
571 - target_type: config === null || config === void 0 || (_config$targetTypes8 = config.targetTypes) === null || _config$targetTypes8 === void 0 ? void 0 : _config$targetTypes8.button,
572 - target_name: String(assetId),
573 - interaction_result: config === null || config === void 0 || (_config$interactionRe8 = config.interactionResults) === null || _config$interactionRe8 === void 0 ? void 0 : _config$interactionRe8.aiGenerate,
574 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations9 = config.locations) === null || _config$locations9 === void 0 ? void 0 : _config$locations9.elementorLibrary),
575 - location_l1: this.toLowerSnake(libraryType),
576 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca7 = config.secondaryLocations) === null || _config$secondaryLoca7 === void 0 ? void 0 : _config$secondaryLoca7.assetCard),
577 - interaction_description: 'User generated block/page based on a library asset',
578 - metadata: {
579 - template_id: String(assetId),
580 - template_name: this.decodeHtmlEntities(assetName) || ''
581 - }
582 - }));
583 - }
584 - }, {
585 - key: "sendFinderSearchInput",
586 - value: function sendFinderSearchInput(_ref5) {
587 - var _config$triggers8, _config$targetTypes9, _config$interactionRe9, _config$interactionRe0, _config$secondaryLoca8, _config$names8;
588 - var resultsCount = _ref5.resultsCount,
589 - _ref5$searchTerm = _ref5.searchTerm,
590 - searchTerm = _ref5$searchTerm === void 0 ? null : _ref5$searchTerm;
591 - var config = this.getConfig();
592 - var hasResults = resultsCount > 0;
593 - var finderContext = this.getFinderContext();
594 - var payload = this.createBasePayload({
595 - window_name: finderContext.windowName,
596 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers8 = config.triggers) === null || _config$triggers8 === void 0 ? void 0 : _config$triggers8.typing),
597 - target_type: config === null || config === void 0 || (_config$targetTypes9 = config.targetTypes) === null || _config$targetTypes9 === void 0 ? void 0 : _config$targetTypes9.searchInput,
598 - target_name: 'finder',
599 - interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe9 = config.interactionResults) === null || _config$interactionRe9 === void 0 ? void 0 : _config$interactionRe9.resultsUpdated : config === null || config === void 0 || (_config$interactionRe0 = config.interactionResults) === null || _config$interactionRe0 === void 0 ? void 0 : _config$interactionRe0.noResults,
600 - target_location: finderContext.targetLocation,
601 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca8 = config.secondaryLocations) === null || _config$secondaryLoca8 === void 0 ? void 0 : _config$secondaryLoca8.finder),
602 - interaction_description: 'Finder search input, follows debounce behavior',
603 - metadata: {
604 - results_count: resultsCount
605 - }
606 - });
607 - if (!hasResults && searchTerm) {
608 - payload.metadata.search_term = searchTerm;
609 - }
610 - return this.dispatchEvent(config === null || config === void 0 || (_config$names8 = config.names) === null || _config$names8 === void 0 || (_config$names8 = _config$names8.editorOne) === null || _config$names8 === void 0 ? void 0 : _config$names8.finderSearchInput, payload);
611 - }
612 - }, {
613 - key: "sendFinderResultSelect",
614 - value: function sendFinderResultSelect(choice) {
615 - var _config$names9, _config$triggers9, _config$targetTypes0, _config$interactionRe1, _config$secondaryLoca9, _config$secondaryLoca0;
616 - var config = this.getConfig();
617 - var finderContext = this.getFinderContext();
618 - return this.dispatchEvent(config === null || config === void 0 || (_config$names9 = config.names) === null || _config$names9 === void 0 || (_config$names9 = _config$names9.editorOne) === null || _config$names9 === void 0 ? void 0 : _config$names9.finderResultSelect, this.createBasePayload({
619 - window_name: finderContext.windowName,
620 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers9 = config.triggers) === null || _config$triggers9 === void 0 ? void 0 : _config$triggers9.click),
621 - target_type: config === null || config === void 0 || (_config$targetTypes0 = config.targetTypes) === null || _config$targetTypes0 === void 0 ? void 0 : _config$targetTypes0.searchResult,
622 - target_name: choice,
623 - interaction_result: config === null || config === void 0 || (_config$interactionRe1 = config.interactionResults) === null || _config$interactionRe1 === void 0 ? void 0 : _config$interactionRe1.selected,
624 - target_location: finderContext.targetLocation,
625 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca9 = config.secondaryLocations) === null || _config$secondaryLoca9 === void 0 ? void 0 : _config$secondaryLoca9.finder),
626 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca0 = config.secondaryLocations) === null || _config$secondaryLoca0 === void 0 ? void 0 : _config$secondaryLoca0.finderResults),
627 - interaction_description: 'Finder search results was selected'
628 - }));
629 - }
630 - }, {
631 - key: "sendCanvasEmptyBoxAction",
632 - value: function sendCanvasEmptyBoxAction(_ref6) {
633 - var _config$triggers0, _config$targetTypes1, _config$interactionRe10, _config$locations0, _config$secondaryLoca1, _config$names0;
634 - var targetName = _ref6.targetName,
635 - _ref6$metadata = _ref6.metadata,
636 - metadata = _ref6$metadata === void 0 ? {} : _ref6$metadata,
637 - _ref6$containerCreate = _ref6.containerCreated,
638 - containerCreated = _ref6$containerCreate === void 0 ? null : _ref6$containerCreate;
639 - var config = this.getConfig();
640 - var payload = this.createBasePayload({
641 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers0 = config.triggers) === null || _config$triggers0 === void 0 ? void 0 : _config$triggers0.click),
642 - target_type: config === null || config === void 0 || (_config$targetTypes1 = config.targetTypes) === null || _config$targetTypes1 === void 0 ? void 0 : _config$targetTypes1.buttons,
643 - target_name: targetName,
644 - interaction_result: config === null || config === void 0 || (_config$interactionRe10 = config.interactionResults) === null || _config$interactionRe10 === void 0 ? void 0 : _config$interactionRe10.selected,
645 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations0 = config.locations) === null || _config$locations0 === void 0 ? void 0 : _config$locations0.canvas),
646 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca1 = config.secondaryLocations) === null || _config$secondaryLoca1 === void 0 ? void 0 : _config$secondaryLoca1.emptyBox),
647 - interaction_description: 'Empty box on canvas actions'
648 - });
649 - if (Object.keys(metadata).length > 0) {
650 - payload.metadata = metadata;
651 - }
652 - if (containerCreated !== null) {
653 - payload.state = containerCreated;
654 - }
655 - return this.dispatchEvent(config === null || config === void 0 || (_config$names0 = config.names) === null || _config$names0 === void 0 || (_config$names0 = _config$names0.editorOne) === null || _config$names0 === void 0 ? void 0 : _config$names0.canvasEmptyBoxAction, payload);
656 - }
657 - }, {
658 - key: "sendWidgetPanelSearch",
659 - value: function sendWidgetPanelSearch(_ref7) {
660 - var _config$triggers1, _config$targetTypes10, _config$interactionRe11, _config$interactionRe12, _config$locations1, _config$locations10, _config$secondaryLoca10, _config$names1;
661 - var resultsCount = _ref7.resultsCount,
662 - _ref7$userInput = _ref7.userInput,
663 - userInput = _ref7$userInput === void 0 ? null : _ref7$userInput;
664 - var config = this.getConfig();
665 - var hasResults = resultsCount > 0;
666 - var payload = this.createBasePayload({
667 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers1 = config.triggers) === null || _config$triggers1 === void 0 ? void 0 : _config$triggers1.typing),
668 - target_type: config === null || config === void 0 || (_config$targetTypes10 = config.targetTypes) === null || _config$targetTypes10 === void 0 ? void 0 : _config$targetTypes10.searchWidget,
669 - target_name: 'search_widget',
670 - interaction_result: hasResults ? config === null || config === void 0 || (_config$interactionRe11 = config.interactionResults) === null || _config$interactionRe11 === void 0 ? void 0 : _config$interactionRe11.resultsUpdated : config === null || config === void 0 || (_config$interactionRe12 = config.interactionResults) === null || _config$interactionRe12 === void 0 ? void 0 : _config$interactionRe12.noResults,
671 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations1 = config.locations) === null || _config$locations1 === void 0 ? void 0 : _config$locations1.leftPanel),
672 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$locations10 = config.locations) === null || _config$locations10 === void 0 ? void 0 : _config$locations10.widgetPanel),
673 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca10 = config.secondaryLocations) === null || _config$secondaryLoca10 === void 0 ? void 0 : _config$secondaryLoca10.searchBar),
674 - interaction_description: 'Widget search input, follows debounce behavior'
675 - });
676 - if (!hasResults && userInput) {
677 - payload.metadata = {
678 - user_input: userInput
679 - };
680 - }
681 - return this.dispatchEvent(config === null || config === void 0 || (_config$names1 = config.names) === null || _config$names1 === void 0 || (_config$names1 = _config$names1.editorOne) === null || _config$names1 === void 0 ? void 0 : _config$names1.widgetPanelSearch, payload);
682 - }
683 - }, {
684 - key: "createWpDashPayload",
685 - value: function createWpDashPayload() {
686 - var _config$appTypes$wpDa, _config$appTypes5, _config$locations11;
687 - var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
688 - var config = this.getConfig();
689 - return this.createBasePayload(_objectSpread({
690 - window_name: (_config$appTypes$wpDa = config === null || config === void 0 || (_config$appTypes5 = config.appTypes) === null || _config$appTypes5 === void 0 ? void 0 : _config$appTypes5.wpDash) !== null && _config$appTypes$wpDa !== void 0 ? _config$appTypes$wpDa : 'wpdash',
691 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations11 = config.locations) === null || _config$locations11 === void 0 ? void 0 : _config$locations11.wpDashAdmin),
692 - location_l2: ''
693 - }, overrides));
694 - }
695 - }, {
696 - key: "sendWpDashElementorMenuClick",
697 - value: function sendWpDashElementorMenuClick() {
698 - var _config$names10, _config$triggers10, _config$targetTypes11, _config$interactionRe13, _config$secondaryLoca11;
699 - var config = this.getConfig();
700 - return this.dispatchEvent(config === null || config === void 0 || (_config$names10 = config.names) === null || _config$names10 === void 0 || (_config$names10 = _config$names10.editorOne) === null || _config$names10 === void 0 ? void 0 : _config$names10.wpDashElementorMenuClick, this.createWpDashPayload({
701 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers10 = config.triggers) === null || _config$triggers10 === void 0 ? void 0 : _config$triggers10.click),
702 - target_type: config === null || config === void 0 || (_config$targetTypes11 = config.targetTypes) === null || _config$targetTypes11 === void 0 ? void 0 : _config$targetTypes11.wpDashAdminMenuItem,
703 - target_name: 'elementor_menu_item',
704 - interaction_result: config === null || config === void 0 || (_config$interactionRe13 = config.interactionResults) === null || _config$interactionRe13 === void 0 ? void 0 : _config$interactionRe13.elementorSideMenuOpened,
705 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca11 = config.secondaryLocations) === null || _config$secondaryLoca11 === void 0 ? void 0 : _config$secondaryLoca11.wpDashElementorCoreMenu),
706 - interaction_description: 'core_user_clicked_elementor_menu_item'
707 - }));
708 - }
709 - }, {
710 - key: "sendWpDashEditorSubMenuHover",
711 - value: function sendWpDashEditorSubMenuHover() {
712 - var _config$names11, _config$triggers11, _config$targetTypes12, _config$interactionRe14, _config$secondaryLoca12;
713 - var config = this.getConfig();
714 - return this.dispatchEvent(config === null || config === void 0 || (_config$names11 = config.names) === null || _config$names11 === void 0 || (_config$names11 = _config$names11.editorOne) === null || _config$names11 === void 0 ? void 0 : _config$names11.wpDashEditorSubMenuHover, this.createWpDashPayload({
715 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers11 = config.triggers) === null || _config$triggers11 === void 0 ? void 0 : _config$triggers11.hover),
716 - target_type: config === null || config === void 0 || (_config$targetTypes12 = config.targetTypes) === null || _config$targetTypes12 === void 0 ? void 0 : _config$targetTypes12.wpDashEditorMenu,
717 - target_name: 'wpdash_editor_sub_menu',
718 - interaction_result: config === null || config === void 0 || (_config$interactionRe14 = config.interactionResults) === null || _config$interactionRe14 === void 0 ? void 0 : _config$interactionRe14.editorSubMenuOpened,
719 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca12 = config.secondaryLocations) === null || _config$secondaryLoca12 === void 0 ? void 0 : _config$secondaryLoca12.wpDashElementorCoreSubMenu),
720 - interaction_description: 'core_user_hovered_sub_menu'
721 - }));
722 - }
723 - }, {
724 - key: "sendWpDashThemeBuilderClick",
725 - value: function sendWpDashThemeBuilderClick() {
726 - var _config$names12, _config$triggers12, _config$targetTypes13, _config$interactionRe15, _config$secondaryLoca13;
727 - var config = this.getConfig();
728 - return this.dispatchEvent(config === null || config === void 0 || (_config$names12 = config.names) === null || _config$names12 === void 0 || (_config$names12 = _config$names12.editorOne) === null || _config$names12 === void 0 ? void 0 : _config$names12.wpDashThemeBuilderClick, this.createWpDashPayload({
729 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers12 = config.triggers) === null || _config$triggers12 === void 0 ? void 0 : _config$triggers12.click),
730 - target_type: config === null || config === void 0 || (_config$targetTypes13 = config.targetTypes) === null || _config$targetTypes13 === void 0 ? void 0 : _config$targetTypes13.wpDashSubMenuItem,
731 - target_name: 'theme_builder_menu_item',
732 - interaction_result: config === null || config === void 0 || (_config$interactionRe15 = config.interactionResults) === null || _config$interactionRe15 === void 0 ? void 0 : _config$interactionRe15.themeBuilderPromotionWindow,
733 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca13 = config.secondaryLocations) === null || _config$secondaryLoca13 === void 0 ? void 0 : _config$secondaryLoca13.wpDashThemeBuilder),
734 - interaction_description: 'core_user_clicked_theme_builder_menu_item'
735 - }));
736 - }
737 - }]);
738 -}();
739 -var createDebouncedFinderSearch = exports.createDebouncedFinderSearch = function createDebouncedFinderSearch() {
740 - var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 300;
741 - return _.debounce(function (resultsCount, searchTerm) {
742 - EditorOneEventManager.sendFinderSearchInput({
743 - resultsCount: resultsCount,
744 - searchTerm: searchTerm
745 - });
746 - }, delay);
747 -};
748 -var createDebouncedWidgetPanelSearch = exports.createDebouncedWidgetPanelSearch = function createDebouncedWidgetPanelSearch() {
749 - var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2000;
750 - return _.debounce(function (resultsCount, userInput) {
751 - EditorOneEventManager.sendWidgetPanelSearch({
752 - resultsCount: resultsCount,
753 - userInput: userInput
754 - });
755 - }, delay);
756 -};
757 -var _default = exports["default"] = EditorOneEventManager;
758 -
759 -/***/ }),
760 -
761 321 /***/ "../assets/dev/js/editor/utils/element-types.js":
762 322 /*!******************************************************!*\
763 323 !*** ../assets/dev/js/editor/utils/element-types.js ***!
764 324 \******************************************************/
@@ -877,14 +437,10 @@
877 437 }
878 438 }, {
879 439 key: "initialize",
880 440 value: function initialize(attributes, options) {
881 - var _this$config;
882 441 var elementType = this.get('elType');
883 442 this.config = elementor.config.elements[elementType];
884 - if ((_this$config = this.config) !== null && _this$config !== void 0 && (_this$config = _this$config.meta) !== null && _this$config !== void 0 && _this$config.permanently_locked) {
885 - this.set('isLocked', true);
886 - }
887 443 var isNewElementCreate = 0 === this.get('elements').length && $e.commands.currentTrace.includes('document/elements/create');
888 444 if (isNewElementCreate) {
889 445 this.onElementCreate();
890 446 }
@@ -899,14 +455,8 @@
899 455 }, {
900 456 key: "onElementCreate",
901 457 value: function onElementCreate() {
902 458 var _this = this;
903 - if (this.get('skipDefaultChildren')) {
904 - this.unset('skipDefaultChildren', {
905 - silent: true
906 - });
907 - return;
908 - }
909 459 this.set('elements', this.getDefaultChildren().map(function (element) {
910 460 return _this.buildElement(element);
911 461 }));
912 462 }
@@ -930,10 +480,9 @@
930 480 id: id,
931 481 settings: (_element$settings = element.settings) !== null && _element$settings !== void 0 ? _element$settings : {},
932 482 elements: elements,
933 483 isLocked: element.isLocked || false,
934 - editor_settings: element.editor_settings || {},
935 - meta: element.meta || {}
484 + editor_settings: element.editor_settings || {}
936 485 };
937 486 }
938 487 }]);
939 488 }(elementor.modules.elements.models.Element);
@@ -999,8 +548,412 @@
999 548 }(elementor.modules.elements.types.Base);
1000 549
1001 550 /***/ }),
1002 551
552 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-type.js":
553 +/*!****************************************************************************************************************************!*\
554 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-type.js ***!
555 + \****************************************************************************************************************************/
556 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
557 +
558 +"use strict";
559 +
560 +
561 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
562 +Object.defineProperty(exports, "__esModule", ({
563 + value: true
564 +}));
565 +exports["default"] = void 0;
566 +var _createAtomicTabContentView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tab-content-view */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-view.js"));
567 +var createAtomicTabContentType = function createAtomicTabContentType() {
568 + return new elementor.modules.elements.types.AtomicElementBase('e-tab-content', (0, _createAtomicTabContentView.default)());
569 +};
570 +var _default = exports["default"] = createAtomicTabContentType;
571 +
572 +/***/ }),
573 +
574 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-view.js":
575 +/*!****************************************************************************************************************************!*\
576 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-view.js ***!
577 + \****************************************************************************************************************************/
578 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
579 +
580 +"use strict";
581 +
582 +
583 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
584 +Object.defineProperty(exports, "__esModule", ({
585 + value: true
586 +}));
587 +exports["default"] = void 0;
588 +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
589 +var _readOnlyError2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "../node_modules/@babel/runtime/helpers/readOnlyError.js"));
590 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
591 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
592 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
593 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
594 +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
595 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
596 +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
597 +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
598 +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
599 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
600 +function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
601 +var createAtomicTabContentView = function createAtomicTabContentView() {
602 + var AtomicElementBaseView = elementor.modules.elements.views.createAtomicElementBase('e-tab-content');
603 + return /*#__PURE__*/function (_AtomicElementBaseVie) {
604 + function AtomicTabContentView() {
605 + (0, _classCallCheck2.default)(this, AtomicTabContentView);
606 + return _callSuper(this, AtomicTabContentView, arguments);
607 + }
608 + (0, _inherits2.default)(AtomicTabContentView, _AtomicElementBaseVie);
609 + return (0, _createClass2.default)(AtomicTabContentView, [{
610 + key: "attributes",
611 + value: function attributes() {
612 + var attributes = _superPropGet(AtomicTabContentView, "attributes", this, 3)([]);
613 + return _objectSpread({
614 + 'x-bind': 'tabContent',
615 + 'x-ref': this.model.id
616 + }, attributes);
617 + }
618 + }]);
619 + }(AtomicElementBaseView);
620 +};
621 +var _default = exports["default"] = createAtomicTabContentView;
622 +
623 +/***/ }),
624 +
625 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-model.js":
626 +/*!*************************************************************************************************************!*\
627 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-model.js ***!
628 + \*************************************************************************************************************/
629 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
630 +
631 +"use strict";
632 +
633 +
634 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
635 +Object.defineProperty(exports, "__esModule", ({
636 + value: true
637 +}));
638 +exports["default"] = void 0;
639 +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
640 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
641 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
642 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
643 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
644 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
645 +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
646 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
647 +var createAtomicTabModel = function createAtomicTabModel() {
648 + var AtomicElementBaseModel = elementor.modules.elements.models.AtomicElementBase;
649 + return /*#__PURE__*/function (_AtomicElementBaseMod) {
650 + function AtomicTabModel() {
651 + (0, _classCallCheck2.default)(this, AtomicTabModel);
652 + return _callSuper(this, AtomicTabModel, arguments);
653 + }
654 + (0, _inherits2.default)(AtomicTabModel, _AtomicElementBaseMod);
655 + return (0, _createClass2.default)(AtomicTabModel, [{
656 + key: "modifyDefaultChildren",
657 + value: function modifyDefaultChildren(elements) {
658 + var _this$attributes$edit;
659 + var _elements = (0, _slicedToArray2.default)(elements, 1),
660 + paragraph = _elements[0];
661 + var position = (_this$attributes$edit = this.attributes.editor_settings) === null || _this$attributes$edit === void 0 ? void 0 : _this$attributes$edit.initial_position;
662 + paragraph.settings.paragraph = {
663 + $$type: 'html',
664 + value: "Tab ".concat(position)
665 + };
666 + return elements;
667 + }
668 + }]);
669 + }(AtomicElementBaseModel);
670 +};
671 +var _default = exports["default"] = createAtomicTabModel;
672 +
673 +/***/ }),
674 +
675 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-type.js":
676 +/*!************************************************************************************************************!*\
677 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-type.js ***!
678 + \************************************************************************************************************/
679 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
680 +
681 +"use strict";
682 +
683 +
684 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
685 +Object.defineProperty(exports, "__esModule", ({
686 + value: true
687 +}));
688 +exports["default"] = void 0;
689 +var _createAtomicTabView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tab-view */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-view.js"));
690 +var _createAtomicTabModel = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tab-model */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-model.js"));
691 +var createAtomicTabType = function createAtomicTabType() {
692 + return new elementor.modules.elements.types.AtomicElementBase('e-tab', (0, _createAtomicTabView.default)(), (0, _createAtomicTabModel.default)());
693 +};
694 +var _default = exports["default"] = createAtomicTabType;
695 +
696 +/***/ }),
697 +
698 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-view.js":
699 +/*!************************************************************************************************************!*\
700 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-view.js ***!
701 + \************************************************************************************************************/
702 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
703 +
704 +"use strict";
705 +
706 +
707 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
708 +Object.defineProperty(exports, "__esModule", ({
709 + value: true
710 +}));
711 +exports["default"] = void 0;
712 +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
713 +var _readOnlyError2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "../node_modules/@babel/runtime/helpers/readOnlyError.js"));
714 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
715 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
716 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
717 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
718 +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
719 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
720 +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
721 +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
722 +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
723 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
724 +function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
725 +var createAtomicTabView = function createAtomicTabView() {
726 + var atomicElementBaseView = elementor.modules.elements.views.createAtomicElementBase('e-tab');
727 + return /*#__PURE__*/function (_atomicElementBaseVie) {
728 + function AtomicTabView() {
729 + (0, _classCallCheck2.default)(this, AtomicTabView);
730 + return _callSuper(this, AtomicTabView, arguments);
731 + }
732 + (0, _inherits2.default)(AtomicTabView, _atomicElementBaseVie);
733 + return (0, _createClass2.default)(AtomicTabView, [{
734 + key: "attributes",
735 + value: function attributes() {
736 + var attributes = _superPropGet(AtomicTabView, "attributes", this, 3)([]);
737 + return _objectSpread({
738 + 'x-bind': 'tab',
739 + 'x-ref': this.model.id
740 + }, attributes);
741 + }
742 + }]);
743 + }(atomicElementBaseView);
744 +};
745 +var _default = exports["default"] = createAtomicTabView;
746 +
747 +/***/ }),
748 +
749 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-type.js":
750 +/*!****************************************************************************************************************************************!*\
751 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-type.js ***!
752 + \****************************************************************************************************************************************/
753 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
754 +
755 +"use strict";
756 +
757 +
758 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
759 +Object.defineProperty(exports, "__esModule", ({
760 + value: true
761 +}));
762 +exports["default"] = void 0;
763 +var _createAtomicTabsContentAreaView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tabs-content-area-view */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-view.js"));
764 +var createAtomicTabsContentAreaType = function createAtomicTabsContentAreaType() {
765 + var AtomicTabsContentAreaView = (0, _createAtomicTabsContentAreaView.default)();
766 + return new elementor.modules.elements.types.AtomicElementBase('e-tabs-content-area', AtomicTabsContentAreaView);
767 +};
768 +var _default = exports["default"] = createAtomicTabsContentAreaType;
769 +
770 +/***/ }),
771 +
772 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-view.js":
773 +/*!****************************************************************************************************************************************!*\
774 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-view.js ***!
775 + \****************************************************************************************************************************************/
776 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
777 +
778 +"use strict";
779 +
780 +
781 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
782 +Object.defineProperty(exports, "__esModule", ({
783 + value: true
784 +}));
785 +exports["default"] = void 0;
786 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
787 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
788 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
789 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
790 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
791 +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
792 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
793 +var createAtomicTabsContentAreaView = function createAtomicTabsContentAreaView() {
794 + var BaseView = elementor.modules.elements.views.createAtomicElementBase('e-tabs-content-area');
795 + return /*#__PURE__*/function (_BaseView) {
796 + function AtomicTabsContentAreaView() {
797 + (0, _classCallCheck2.default)(this, AtomicTabsContentAreaView);
798 + return _callSuper(this, AtomicTabsContentAreaView, arguments);
799 + }
800 + (0, _inherits2.default)(AtomicTabsContentAreaView, _BaseView);
801 + return (0, _createClass2.default)(AtomicTabsContentAreaView, [{
802 + key: "getChildType",
803 + value: function getChildType() {
804 + return ['e-tab-content', 'container'];
805 + }
806 + }]);
807 + }(BaseView);
808 +};
809 +var _default = exports["default"] = createAtomicTabsContentAreaView;
810 +
811 +/***/ }),
812 +
813 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-type.js":
814 +/*!************************************************************************************************************************!*\
815 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-type.js ***!
816 + \************************************************************************************************************************/
817 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
818 +
819 +"use strict";
820 +
821 +
822 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
823 +Object.defineProperty(exports, "__esModule", ({
824 + value: true
825 +}));
826 +exports["default"] = void 0;
827 +var _createAtomicTabsMenuView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tabs-menu-view */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-view.js"));
828 +var createAtomicTabsMenuType = function createAtomicTabsMenuType() {
829 + var AtomicTabsMenuView = (0, _createAtomicTabsMenuView.default)();
830 + return new elementor.modules.elements.types.AtomicElementBase('e-tabs-menu', AtomicTabsMenuView);
831 +};
832 +var _default = exports["default"] = createAtomicTabsMenuType;
833 +
834 +/***/ }),
835 +
836 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-view.js":
837 +/*!************************************************************************************************************************!*\
838 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-view.js ***!
839 + \************************************************************************************************************************/
840 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
841 +
842 +"use strict";
843 +
844 +
845 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
846 +Object.defineProperty(exports, "__esModule", ({
847 + value: true
848 +}));
849 +exports["default"] = void 0;
850 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
851 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
852 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
853 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
854 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
855 +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
856 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
857 +var createAtomicTabsMenuView = function createAtomicTabsMenuView() {
858 + var BaseView = elementor.modules.elements.views.createAtomicElementBase('e-tabs-menu');
859 + return /*#__PURE__*/function (_BaseView) {
860 + function AtomicTabsMenuView() {
861 + (0, _classCallCheck2.default)(this, AtomicTabsMenuView);
862 + return _callSuper(this, AtomicTabsMenuView, arguments);
863 + }
864 + (0, _inherits2.default)(AtomicTabsMenuView, _BaseView);
865 + return (0, _createClass2.default)(AtomicTabsMenuView, [{
866 + key: "getChildType",
867 + value: function getChildType() {
868 + return ['e-tab', 'container'];
869 + }
870 + }]);
871 + }(BaseView);
872 +};
873 +var _default = exports["default"] = createAtomicTabsMenuView;
874 +
875 +/***/ }),
876 +
877 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-type.js":
878 +/*!**************************************************************************************************************!*\
879 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-type.js ***!
880 + \**************************************************************************************************************/
881 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
882 +
883 +"use strict";
884 +
885 +
886 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
887 +Object.defineProperty(exports, "__esModule", ({
888 + value: true
889 +}));
890 +exports["default"] = void 0;
891 +var _createAtomicTabsView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tabs-view */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-view.js"));
892 +var createAtomicTabsType = function createAtomicTabsType() {
893 + return new elementor.modules.elements.types.AtomicElementBase('e-tabs', (0, _createAtomicTabsView.default)());
894 +};
895 +var _default = exports["default"] = createAtomicTabsType;
896 +
897 +/***/ }),
898 +
899 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-view.js":
900 +/*!**************************************************************************************************************!*\
901 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-view.js ***!
902 + \**************************************************************************************************************/
903 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
904 +
905 +"use strict";
906 +
907 +
908 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
909 +Object.defineProperty(exports, "__esModule", ({
910 + value: true
911 +}));
912 +exports["default"] = void 0;
913 +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
914 +var _readOnlyError2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "../node_modules/@babel/runtime/helpers/readOnlyError.js"));
915 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
916 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
917 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
918 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
919 +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
920 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
921 +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
922 +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
923 +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
924 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
925 +function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
926 +var createAtomicTabsView = function createAtomicTabsView() {
927 + var AtomicElementBaseView = elementor.modules.elements.views.createAtomicElementBase('e-tabs');
928 + return /*#__PURE__*/function (_AtomicElementBaseVie) {
929 + function AtomicTabsView() {
930 + (0, _classCallCheck2.default)(this, AtomicTabsView);
931 + return _callSuper(this, AtomicTabsView, arguments);
932 + }
933 + (0, _inherits2.default)(AtomicTabsView, _AtomicElementBaseVie);
934 + return (0, _createClass2.default)(AtomicTabsView, [{
935 + key: "attributes",
936 + value: function attributes() {
937 + var _this$model$getSettin;
938 + var defaultActiveTab = (_this$model$getSettin = this.model.getSetting('default-active-tab').value) !== null && _this$model$getSettin !== void 0 ? _this$model$getSettin : 0;
939 + var defaultActiveTabId = "".concat(this.model.id, "-tab-").concat(defaultActiveTab);
940 + var eSettings = JSON.stringify({
941 + 'default-active-tab': defaultActiveTabId
942 + });
943 + var attributes = _superPropGet(AtomicTabsView, "attributes", this, 3)([]);
944 + return _objectSpread({
945 + 'x-data': "eTabs".concat(this.model.id),
946 + 'data-e-settings': eSettings
947 + }, attributes);
948 + }
949 + }]);
950 + }(AtomicElementBaseView);
951 +};
952 +var _default = exports["default"] = createAtomicTabsView;
953 +
954 +/***/ }),
955 +
1003 956 /***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-div-block-type.js":
1004 957 /*!************************************************************************************************!*\
1005 958 !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-div-block-type.js ***!
1006 959 \************************************************************************************************/
@@ -1041,29 +994,8 @@
1041 994 var _default = exports["default"] = createFlexboxType;
1042 995
1043 996 /***/ }),
1044 997
1045 -/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-grid-type.js":
1046 -/*!*******************************************************************************************!*\
1047 - !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-grid-type.js ***!
1048 - \*******************************************************************************************/
1049 -/***/ ((__unused_webpack_module, exports) => {
1050 -
1051 -"use strict";
1052 -
1053 -
1054 -Object.defineProperty(exports, "__esModule", ({
1055 - value: true
1056 -}));
1057 -exports["default"] = void 0;
1058 -var createGridType = function createGridType() {
1059 - var GridView = elementor.modules.elements.views.createAtomicElementBase('e-grid');
1060 - return new elementor.modules.elements.types.AtomicElementBase('e-grid', GridView);
1061 -};
1062 -var _default = exports["default"] = createGridType;
1063 -
1064 -/***/ }),
1065 -
1066 998 /***/ "../modules/atomic-widgets/assets/js/editor/component.js":
1067 999 /*!***************************************************************!*\
1068 1000 !*** ../modules/atomic-widgets/assets/js/editor/component.js ***!
1069 1001 \***************************************************************/
@@ -1142,9 +1074,8 @@
1142 1074 }
1143 1075 _this = _callSuper(this, AtomicElementEmptyView, [].concat(args));
1144 1076 (0, _defineProperty2.default)(_this, "template", '<div></div>');
1145 1077 (0, _defineProperty2.default)(_this, "className", 'elementor-empty-view');
1146 - (0, _defineProperty2.default)(_this, "unmount", null);
1147 1078 return _this;
1148 1079 }
1149 1080 (0, _inherits2.default)(AtomicElementEmptyView, _Marionette$ItemView);
1150 1081 return (0, _createClass2.default)(AtomicElementEmptyView, [{
@@ -1156,17 +1087,8 @@
1156 1087 unmount = _ReactUtils$render.unmount;
1157 1088 this.unmount = unmount;
1158 1089 }
1159 1090 }, {
1160 - key: "onBeforeRender",
1161 - value: function onBeforeRender() {
1162 - // In case the element is being rendered again, we need to unmount the previous React component.
1163 - if (this.unmount) {
1164 - this.unmount();
1165 - this.unmount = null;
1166 - }
1167 - }
1168 - }, {
1169 1091 key: "onRender",
1170 1092 value: function onRender() {
1171 1093 this.$el.addClass(this.className);
1172 1094 this.renderReactDefaultElement();
@@ -1173,10 +1095,9 @@
1173 1095 }
1174 1096 }, {
1175 1097 key: "onDestroy",
1176 1098 value: function onDestroy() {
1177 - var _this$unmount;
1178 - (_this$unmount = this.unmount) === null || _this$unmount === void 0 || _this$unmount.call(this);
1099 + this.unmount();
1179 1100 }
1180 1101 }]);
1181 1102 }(Marionette.ItemView);
1182 1103
@@ -1198,26 +1119,38 @@
1198 1119 value: true
1199 1120 }));
1200 1121 exports["default"] = createAtomicElementBaseView;
1201 1122 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
1123 +var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
1202 1124 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
1125 +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
1203 1126 var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js"));
1204 1127 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
1205 1128 var _elementTypes = __webpack_require__(/*! elementor-editor/utils/element-types */ "../assets/dev/js/editor/utils/element-types.js");
1206 1129 var _atomicElementEmptyView = _interopRequireDefault(__webpack_require__(/*! ./container/atomic-element-empty-view */ "../modules/atomic-widgets/assets/js/editor/container/atomic-element-empty-view.js"));
1130 +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1131 +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1207 1132 var BaseElementView = elementor.modules.elements.views.BaseElement;
1208 1133 function createAtomicElementBaseView(type) {
1134 + var resolvedTagCache = new WeakMap();
1209 1135 var AtomicElementView = BaseElementView.extend({
1210 1136 template: Marionette.TemplateCache.get("#tmpl-elementor-".concat(type, "-content")),
1211 1137 emptyView: _atomicElementEmptyView.default,
1212 1138 _childrenRenderPromises: [],
1213 - _createElement: function _createElement(tag) {
1214 - var _elementor$$preview;
1215 - var previewDocument = (_elementor$$preview = elementor.$preview) === null || _elementor$$preview === void 0 || (_elementor$$preview = _elementor$$preview[0]) === null || _elementor$$preview === void 0 ? void 0 : _elementor$$preview.contentDocument;
1216 - if (previewDocument) {
1217 - return previewDocument.createElement(tag);
1139 + tagName: function tagName() {
1140 + var _resolvedTagCache$get;
1141 + return (_resolvedTagCache$get = resolvedTagCache.get(this.model)) !== null && _resolvedTagCache$get !== void 0 ? _resolvedTagCache$get : this._resolveTag();
1142 + },
1143 + _resolveTag: function _resolveTag() {
1144 + var _this$getResolverRend, _resolvedTag$value;
1145 + var renderContext = (_this$getResolverRend = this.getResolverRenderContext) === null || _this$getResolverRend === void 0 ? void 0 : _this$getResolverRend.call(this);
1146 + var tagSetting = this.model.getSetting('tag');
1147 + var resolvedTag = this._resolvePropValue(tagSetting, renderContext);
1148 + var tagValue = (_resolvedTag$value = resolvedTag === null || resolvedTag === void 0 ? void 0 : resolvedTag.value) !== null && _resolvedTag$value !== void 0 ? _resolvedTag$value : resolvedTag;
1149 + if (this._hasLink(renderContext)) {
1150 + return 'a';
1218 1151 }
1219 - return document.createElement(tag);
1152 + return tagValue || this.model.config.default_html_tag || 'div';
1220 1153 },
1221 1154 getChildViewContainer: function getChildViewContainer() {
1222 1155 this.childViewContainer = '';
1223 1156 return Marionette.CompositeView.prototype.getChildViewContainer.apply(this, arguments);
@@ -1241,69 +1174,202 @@
1241 1174 getResolverRenderContext: function getResolverRenderContext() {
1242 1175 var _this$_parent2, _this$_parent2$getRes;
1243 1176 return (_this$_parent2 = this._parent) === null || _this$_parent2 === void 0 || (_this$_parent2$getRes = _this$_parent2.getResolverRenderContext) === null || _this$_parent2$getRes === void 0 ? void 0 : _this$_parent2$getRes.call(_this$_parent2);
1244 1177 },
1178 + className: function className() {
1179 + return "".concat(BaseElementView.prototype.className.apply(this), " e-con e-atomic-element ").concat(this.getClassString());
1180 + },
1181 + // TODO: Copied from `views/column.js`.
1182 + ui: function ui() {
1183 + var ui = BaseElementView.prototype.ui.apply(this, arguments);
1184 + ui.percentsTooltip = '> .elementor-element-overlay .elementor-column-percents-tooltip';
1185 + return ui;
1186 + },
1187 + attributes: function attributes() {
1188 + var _this$model$getSettin, _this$model$getSettin2, _this$model$config$in, _this$model;
1189 + var attr = BaseElementView.prototype.attributes.apply(this);
1190 + var local = {};
1191 + var cssId = this.model.getSetting('_cssid');
1192 + var customAttributes = (_this$model$getSettin = (_this$model$getSettin2 = this.model.getSetting('attributes')) === null || _this$model$getSettin2 === void 0 ? void 0 : _this$model$getSettin2.value) !== null && _this$model$getSettin !== void 0 ? _this$model$getSettin : [];
1193 + var initialAttributes = (_this$model$config$in = this === null || this === void 0 || (_this$model = this.model) === null || _this$model === void 0 || (_this$model = _this$model.config) === null || _this$model === void 0 ? void 0 : _this$model.initial_attributes) !== null && _this$model$config$in !== void 0 ? _this$model$config$in : {};
1194 + if (cssId) {
1195 + local.id = cssId.value;
1196 + }
1197 + local['data-interaction-id'] = this.model.get('id');
1198 + customAttributes.forEach(function (attribute) {
1199 + var _attribute$value, _attribute$value2;
1200 + var key = (_attribute$value = attribute.value) === null || _attribute$value === void 0 || (_attribute$value = _attribute$value.key) === null || _attribute$value === void 0 ? void 0 : _attribute$value.value;
1201 + var value = (_attribute$value2 = attribute.value) === null || _attribute$value2 === void 0 || (_attribute$value2 = _attribute$value2.value) === null || _attribute$value2 === void 0 ? void 0 : _attribute$value2.value;
1202 + if (key && value) {
1203 + local[key] = value;
1204 + }
1205 + });
1206 + return _objectSpread(_objectSpread(_objectSpread({}, attr), initialAttributes), local);
1207 + },
1208 + // TODO: Copied from `views/column.js`.
1209 + attachElContent: function attachElContent() {
1210 + BaseElementView.prototype.attachElContent.apply(this, arguments);
1211 + var $tooltip = jQuery('<div>', {
1212 + class: 'elementor-column-percents-tooltip',
1213 + 'data-side': elementorCommon.config.isRTL ? 'right' : 'left'
1214 + });
1215 + this.$el.children('.elementor-element-overlay').append($tooltip);
1216 + },
1217 + // TODO: Copied from `views/column.js`.
1218 + getPercentSize: function getPercentSize(size) {
1219 + if (!size) {
1220 + size = this.el.getBoundingClientRect().width;
1221 + }
1222 + return +(size / this.$el.parent().width() * 100).toFixed(3);
1223 + },
1224 + // TODO: Copied from `views/column.js`.
1225 + getPercentsForDisplay: function getPercentsForDisplay() {
1226 + var width = +this.model.getSetting('width') || this.getPercentSize();
1227 + return width.toFixed(1) + '%';
1228 + },
1229 + renderOnChange: function renderOnChange(settings) {
1230 + var _this = this;
1231 + var changed = settings.changedAttributes();
1232 + setTimeout(function () {
1233 + _this.updateHandlesPosition();
1234 + });
1235 + if (!changed) {
1236 + return;
1237 + }
1238 + BaseElementView.prototype.renderOnChange.apply(this, settings);
1239 + if (changed.attributes) {
1240 + var $elAttrs = this.$el[0].attributes;
1241 + for (var i = $elAttrs.length - 1; i >= 0; i--) {
1242 + var attrName = $elAttrs[i].name;
1243 + if (attrName !== 'class') {
1244 + this.$el.removeAttr(attrName);
1245 + }
1246 + }
1247 + var newAttrs = this.attributes();
1248 + Object.entries(newAttrs).forEach(function (_ref5) {
1249 + var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
1250 + key = _ref6[0],
1251 + value = _ref6[1];
1252 + if (key !== 'class' && value !== undefined) {
1253 + _this.$el.attr(key, value);
1254 + }
1255 + });
1256 + return;
1257 + }
1258 + if (changed.classes) {
1259 + this.$el.attr('class', this.className());
1260 + return;
1261 + }
1262 + if (changed._cssid) {
1263 + if (changed._cssid.value) {
1264 + this.$el.attr('id', changed._cssid.value);
1265 + } else {
1266 + this.$el.removeAttr('id');
1267 + }
1268 + return;
1269 + }
1270 + this.$el.addClass(this.getClasses());
1271 + if (this.isTagChanged(changed)) {
1272 + this.rerenderEntireView();
1273 + }
1274 + },
1275 + isTagChanged: function isTagChanged(changed) {
1276 + return ((changed === null || changed === void 0 ? void 0 : changed.tag) !== undefined || (changed === null || changed === void 0 ? void 0 : changed.link) !== undefined) && this._parent && this.tagName() !== this.el.tagName;
1277 + },
1278 + rerenderEntireView: function rerenderEntireView() {
1279 + var parent = this._parent;
1280 + this._parent.removeChildView(this);
1281 + parent.addChild(this.model, AtomicElementView, this._index);
1282 + },
1245 1283 render: function render() {
1246 - var _this = this;
1284 + var _this2 = this;
1247 1285 this._currentRenderPromise = new Promise(function (resolve) {
1248 1286 // Optimize rendering by reusing existing child views instead of recreating them.
1249 - if (_this._shouldSkipFullRender()) {
1250 - _this._renderWithoutDomRecreation(resolve);
1287 + if (_this2._shouldSkipFullRender()) {
1288 + _this2._renderWithoutDomRecreation(resolve);
1251 1289 } else {
1252 - _this._renderWithDomRecreation(resolve);
1290 + _this2._renderWithDomRecreation(resolve);
1253 1291 }
1254 1292 });
1255 1293 return this;
1256 1294 },
1257 1295 _shouldSkipFullRender: function _shouldSkipFullRender() {
1258 - return this.isRendered && this._hasConnectedChildren();
1296 + var _this$children;
1297 + return this.isRendered && ((_this$children = this.children) === null || _this$children === void 0 ? void 0 : _this$children.length) > 0;
1259 1298 },
1260 - _hasConnectedChildren: function _hasConnectedChildren() {
1261 - var _this$children, _firstChild$$el$get$i, _firstChild$$el;
1262 - if (!((_this$children = this.children) !== null && _this$children !== void 0 && _this$children.length)) {
1263 - return false;
1264 - }
1265 -
1266 - // If the parent's innerHTML was replaced, all children are detached together.
1267 - var firstChild = this.children.findByIndex(0);
1268 - return (_firstChild$$el$get$i = firstChild === null || firstChild === void 0 || (_firstChild$$el = firstChild.$el) === null || _firstChild$$el === void 0 || (_firstChild$$el = _firstChild$$el.get(0)) === null || _firstChild$$el === void 0 ? void 0 : _firstChild$$el.isConnected) !== null && _firstChild$$el$get$i !== void 0 ? _firstChild$$el$get$i : false;
1269 - },
1270 1299 _renderWithoutDomRecreation: function _renderWithoutDomRecreation(resolve) {
1271 - var _this2 = this;
1300 + var _this3 = this;
1272 1301 this._beforeRender();
1273 1302 this._renderChildren();
1274 1303 this._waitForChildrenToComplete().then(function () {
1275 - _this2._afterRender();
1304 + _this3._afterRender();
1276 1305 resolve();
1277 1306 });
1278 1307 },
1279 1308 _renderWithDomRecreation: function _renderWithDomRecreation(resolve) {
1309 + var _this4 = this;
1280 1310 BaseElementView.prototype.render.apply(this, arguments);
1281 1311 this._waitForChildrenToComplete().then(function () {
1312 + _this4._applyResolvedAttributes();
1282 1313 resolve();
1283 1314 });
1284 1315 },
1285 1316 _beforeRender: function _beforeRender() {
1286 1317 this._isRendering = true;
1318 + this._invalidateTagCache();
1287 1319 this.triggerMethod('before:render', this);
1288 1320 },
1321 + _invalidateTagCache: function _invalidateTagCache() {
1322 + resolvedTagCache.delete(this.model);
1323 + },
1324 + _cacheResolvedTag: function _cacheResolvedTag(tag) {
1325 + resolvedTagCache.set(this.model, tag);
1326 + },
1289 1327 _afterRender: function _afterRender() {
1290 1328 this._isRendering = false;
1291 1329 this.isRendered = true;
1292 1330 this.triggerMethod('render', this);
1331 + this._applyResolvedAttributes();
1293 1332 },
1333 + _applyResolvedAttributes: function _applyResolvedAttributes() {
1334 + if (!this._parent) {
1335 + return;
1336 + }
1337 + if (this._shouldRecreateForTagChange()) {
1338 + return;
1339 + }
1340 + this._applyLinkAttributes();
1341 + },
1342 + _shouldRecreateForTagChange: function _shouldRecreateForTagChange() {
1343 + var resolvedTag = this.tagName();
1344 + var currentTag = this.el.tagName.toLowerCase();
1345 + if (resolvedTag === currentTag) {
1346 + return false;
1347 + }
1348 + this._cacheResolvedTag(resolvedTag);
1349 + this.rerenderEntireView();
1350 + return true;
1351 + },
1352 + _applyLinkAttributes: function _applyLinkAttributes() {
1353 + this.$el.removeAttr('href');
1354 + this.$el.removeAttr('data-action-link');
1355 + var link = this.getLink();
1356 + if (link) {
1357 + this.$el.attr(link.attr, link.value);
1358 + }
1359 + },
1294 1360 _waitForChildrenToComplete: function _waitForChildrenToComplete() {
1295 - var _this3 = this;
1361 + var _this5 = this;
1296 1362 return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
1297 1363 return _regenerator.default.wrap(function (_context) {
1298 1364 while (1) switch (_context.prev = _context.next) {
1299 1365 case 0:
1300 - if (!(_this3._childrenRenderPromises.length > 0)) {
1366 + if (!(_this5._childrenRenderPromises.length > 0)) {
1301 1367 _context.next = 1;
1302 1368 break;
1303 1369 }
1304 1370 _context.next = 1;
1305 - return Promise.all(_this3._childrenRenderPromises);
1371 + return Promise.all(_this5._childrenRenderPromises);
1306 1372 case 1:
1307 1373 case "end":
1308 1374 return _context.stop();
1309 1375 }
@@ -1322,47 +1388,27 @@
1322 1388 this._collectChildrenRenderPromises();
1323 1389 },
1324 1390 _collectChildrenRenderPromises: function _collectChildrenRenderPromises() {
1325 1391 var _this$children3,
1326 - _this4 = this;
1392 + _this6 = this;
1327 1393 this._childrenRenderPromises = [];
1328 1394 (_this$children3 = this.children) === null || _this$children3 === void 0 || _this$children3.each(function (childView) {
1329 1395 if (childView._currentRenderPromise) {
1330 - _this4._childrenRenderPromises.push(childView._currentRenderPromise);
1396 + _this6._childrenRenderPromises.push(childView._currentRenderPromise);
1331 1397 }
1332 1398 });
1333 1399 },
1334 1400 onRender: function onRender() {
1335 - var _this5 = this;
1401 + var _this7 = this;
1336 1402 this.dispatchPreviewEvent('elementor/element/render');
1337 1403 BaseElementView.prototype.onRender.apply(this, arguments);
1338 1404
1339 1405 // Defer to wait for everything to render.
1340 1406 setTimeout(function () {
1341 - if (_this5.isAtomicGridContainer()) {
1342 - _this5.reInitEmptyView();
1343 - }
1344 - _this5.droppableInitialize();
1345 - _this5.updateHandlesPosition();
1407 + _this7.droppableInitialize();
1408 + _this7.updateHandlesPosition();
1346 1409 });
1347 1410 },
1348 - destroyEmptyView: function destroyEmptyView() {
1349 - if (this.isAtomicGridContainer()) {
1350 - return;
1351 - }
1352 - return Marionette.CompositeView.prototype.destroyEmptyView.apply(this, arguments);
1353 - },
1354 - isAtomicGridContainer: function isAtomicGridContainer() {
1355 - return 'e-grid' === type;
1356 - },
1357 - reInitEmptyView: function reInitEmptyView() {
1358 - var _this$el;
1359 - if ((_this$el = this.el) !== null && _this$el !== void 0 && _this$el.querySelector(':scope > .elementor-empty-view')) {
1360 - return;
1361 - }
1362 - delete this._showingEmptyView;
1363 - this.showEmptyView();
1364 - },
1365 1411 onDestroy: function onDestroy() {
1366 1412 BaseElementView.prototype.onDestroy.apply(this, arguments);
1367 1413 this.dispatchPreviewEvent('elementor/element/destroy');
1368 1414 },
@@ -1375,8 +1421,50 @@
1375 1421 element: this.getDomElement().get(0)
1376 1422 }
1377 1423 }));
1378 1424 },
1425 + _hasLink: function _hasLink(renderContext) {
1426 + var _resolvedLink$value;
1427 + var linkSetting = this.model.getSetting('link');
1428 + var resolvedLink = this._resolvePropValue(linkSetting, renderContext);
1429 + if ('link' !== (resolvedLink === null || resolvedLink === void 0 ? void 0 : resolvedLink.$$type)) {
1430 + return false;
1431 + }
1432 + var destination = this._resolvePropValue((_resolvedLink$value = resolvedLink.value) === null || _resolvedLink$value === void 0 ? void 0 : _resolvedLink$value.destination, renderContext);
1433 + return !!(destination !== null && destination !== void 0 && destination.value);
1434 + },
1435 + getLink: function getLink() {
1436 + var _this$getResolverRend2, _resolvedLink$value2;
1437 + var renderContext = (_this$getResolverRend2 = this.getResolverRenderContext) === null || _this$getResolverRend2 === void 0 ? void 0 : _this$getResolverRend2.call(this);
1438 + var linkSetting = this.model.getSetting('link');
1439 + var resolvedLink = this._resolvePropValue(linkSetting, renderContext);
1440 + if ('link' !== (resolvedLink === null || resolvedLink === void 0 ? void 0 : resolvedLink.$$type)) {
1441 + return null;
1442 + }
1443 + var destination = this._resolvePropValue((_resolvedLink$value2 = resolvedLink.value) === null || _resolvedLink$value2 === void 0 ? void 0 : _resolvedLink$value2.destination, renderContext);
1444 + if (!(destination !== null && destination !== void 0 && destination.value)) {
1445 + return null;
1446 + }
1447 + var $$type = destination.$$type,
1448 + value = destination.value;
1449 + if ('dynamic' === $$type) {
1450 + var _value$settings;
1451 + var resolvedValue = this.handleDynamicLink(value);
1452 + if (!resolvedValue) {
1453 + return null;
1454 + }
1455 + return {
1456 + attr: 'action' === ((_value$settings = value.settings) === null || _value$settings === void 0 ? void 0 : _value$settings.group) ? 'data-action-link' : 'href',
1457 + value: resolvedValue
1458 + };
1459 + }
1460 + var isPostId = 'number' === $$type;
1461 + var hrefPrefix = isPostId ? elementor.config.home_url + '/?p=' : '';
1462 + return {
1463 + attr: 'href',
1464 + value: hrefPrefix + value
1465 + };
1466 + },
1379 1467 droppableInitialize: function droppableInitialize() {
1380 1468 this.$el.html5Droppable(this.getDroppableOptions());
1381 1469 },
1382 1470 /**
@@ -1384,9 +1472,9 @@
1384 1472 *
1385 1473 * @return {Object} groups
1386 1474 */
1387 1475 getContextMenuGroups: function getContextMenuGroups() {
1388 - var _this6 = this,
1476 + var _this8 = this,
1389 1477 _elementorCommon$conf;
1390 1478 var saveActions = [{
1391 1479 name: 'save',
1392 1480 title: __('Save as a template', 'elementor'),
@@ -1391,30 +1479,21 @@
1391 1479 name: 'save',
1392 1480 title: __('Save as a template', 'elementor'),
1393 1481 callback: this.saveAsTemplate.bind(this),
1394 1482 isEnabled: function isEnabled() {
1395 - return !_this6.getContainer().isLocked();
1483 + return !_this8.getContainer().isLocked();
1396 1484 }
1397 1485 }];
1398 1486 var isAdministrator = elementor.config.user.is_administrator;
1399 1487 var isExperimentalFeaturesEnabled = (_elementorCommon$conf = elementorCommon.config.experimentalFeatures) === null || _elementorCommon$conf === void 0 ? void 0 : _elementorCommon$conf.e_components;
1400 1488 if (isExperimentalFeaturesEnabled && isAdministrator) {
1401 - var _window$elementorV2$u, _window$elementorV, _window$elementorV$is, _window$elementorV2$u2, _window$elementorV2, _window$elementorV2$h, _window$elementorV2$u3, _window$elementorV3, _window$elementorV3$i;
1402 - var isProActive = (_window$elementorV2$u = (_window$elementorV = window.elementorV2) === null || _window$elementorV === void 0 || (_window$elementorV = _window$elementorV.utils) === null || _window$elementorV === void 0 || (_window$elementorV$is = _window$elementorV.isProActive) === null || _window$elementorV$is === void 0 ? void 0 : _window$elementorV$is.call(_window$elementorV)) !== null && _window$elementorV2$u !== void 0 ? _window$elementorV2$u : true;
1403 - var hasProInstalled = (_window$elementorV2$u2 = (_window$elementorV2 = window.elementorV2) === null || _window$elementorV2 === void 0 || (_window$elementorV2 = _window$elementorV2.utils) === null || _window$elementorV2 === void 0 || (_window$elementorV2$h = _window$elementorV2.hasProInstalled) === null || _window$elementorV2$h === void 0 ? void 0 : _window$elementorV2$h.call(_window$elementorV2)) !== null && _window$elementorV2$u2 !== void 0 ? _window$elementorV2$u2 : false;
1404 - var isProOutdated = hasProInstalled && !((_window$elementorV2$u3 = (_window$elementorV3 = window.elementorV2) === null || _window$elementorV3 === void 0 || (_window$elementorV3 = _window$elementorV3.utils) === null || _window$elementorV3 === void 0 || (_window$elementorV3$i = _window$elementorV3.isProAtLeast) === null || _window$elementorV3$i === void 0 ? void 0 : _window$elementorV3$i.call(_window$elementorV3, '4.0')) !== null && _window$elementorV2$u3 !== void 0 ? _window$elementorV2$u3 : false);
1405 - var showPromoBadge = !isProActive && !isProOutdated;
1406 - var newBadge = "<span class=\"elementor-context-menu-list__item__shortcut__new-badge\">".concat(__('New', 'elementor'), "</span>");
1407 - var badgeClass = 'elementor-context-menu-list__item__shortcut__promotion-badge';
1408 - var proBadge = "<a href=\"https://go.elementor.com/go-pro-components-Instance-create-context-menu/\" target=\"_blank\" onclick=\"event.stopPropagation()\" class=\"".concat(badgeClass, "\"><i class=\"eicon-upgrade-crown\"></i></a>");
1409 1489 saveActions.unshift({
1410 1490 name: 'save-component',
1411 1491 title: __('Create component', 'elementor'),
1412 - shortcut: isProActive || isProOutdated ? newBadge : proBadge,
1413 - hasShortcutAction: showPromoBadge,
1492 + shortcut: "<span class=\"elementor-context-menu-list__item__shortcut__new-badge\">".concat(__('New', 'elementor'), "</span>"),
1414 1493 callback: this.saveAsComponent.bind(this),
1415 1494 isEnabled: function isEnabled() {
1416 - return (isProActive || isProOutdated) && !_this6.getContainer().isLocked();
1495 + return !_this8.getContainer().isLocked();
1417 1496 }
1418 1497 });
1419 1498 }
1420 1499 var groups = BaseElementView.prototype.getContextMenuGroups.apply(this, arguments),
@@ -1433,33 +1512,8 @@
1433 1512 model: this.model
1434 1513 });
1435 1514 },
1436 1515 saveAsComponent: function saveAsComponent(openContextMenuEvent, options) {
1437 - var _window$elementorV2$u4, _window$elementorV4, _window$elementorV4$h, _window$elementorV2$u5, _window$elementorV5, _window$elementorV5$i, _window$elementorV2$u6, _window$elementorV7, _window$elementorV7$i;
1438 - var hasProInstalled = (_window$elementorV2$u4 = (_window$elementorV4 = window.elementorV2) === null || _window$elementorV4 === void 0 || (_window$elementorV4 = _window$elementorV4.utils) === null || _window$elementorV4 === void 0 || (_window$elementorV4$h = _window$elementorV4.hasProInstalled) === null || _window$elementorV4$h === void 0 ? void 0 : _window$elementorV4$h.call(_window$elementorV4)) !== null && _window$elementorV2$u4 !== void 0 ? _window$elementorV2$u4 : false;
1439 - var isProOutdated = hasProInstalled && !((_window$elementorV2$u5 = (_window$elementorV5 = window.elementorV2) === null || _window$elementorV5 === void 0 || (_window$elementorV5 = _window$elementorV5.utils) === null || _window$elementorV5 === void 0 || (_window$elementorV5$i = _window$elementorV5.isProAtLeast) === null || _window$elementorV5$i === void 0 ? void 0 : _window$elementorV5$i.call(_window$elementorV5, '4.0')) !== null && _window$elementorV2$u5 !== void 0 ? _window$elementorV2$u5 : false);
1440 - if (isProOutdated) {
1441 - var _window$elementorV6, _window$elementorV6$n;
1442 - (_window$elementorV6 = window.elementorV2) === null || _window$elementorV6 === void 0 || (_window$elementorV6 = _window$elementorV6.editorNotifications) === null || _window$elementorV6 === void 0 || (_window$elementorV6$n = _window$elementorV6.notify) === null || _window$elementorV6$n === void 0 || _window$elementorV6$n.call(_window$elementorV6, {
1443 - type: 'info',
1444 - id: 'component-create-update',
1445 - message: __('To create new components, update Elementor Pro to the latest version.', 'elementor'),
1446 - additionalActionProps: [{
1447 - size: 'small',
1448 - variant: 'contained',
1449 - color: 'info',
1450 - href: '/wp-admin/plugins.php',
1451 - target: '_blank',
1452 - children: __('Update Now', 'elementor')
1453 - }]
1454 - });
1455 - return;
1456 - }
1457 - var isProActive = (_window$elementorV2$u6 = (_window$elementorV7 = window.elementorV2) === null || _window$elementorV7 === void 0 || (_window$elementorV7 = _window$elementorV7.utils) === null || _window$elementorV7 === void 0 || (_window$elementorV7$i = _window$elementorV7.isProActive) === null || _window$elementorV7$i === void 0 ? void 0 : _window$elementorV7$i.call(_window$elementorV7)) !== null && _window$elementorV2$u6 !== void 0 ? _window$elementorV2$u6 : true;
1458 - if (!isProActive) {
1459 - return;
1460 - }
1461 -
1462 1516 // Calculate the absolute position where the context menu was opened.
1463 1517 var openMenuOriginalEvent = openContextMenuEvent.originalEvent;
1464 1518 var iframeRect = elementor.$preview[0].getBoundingClientRect();
1465 1519 var anchorPosition = {
@@ -1497,12 +1551,12 @@
1497 1551 preventInit: true
1498 1552 };
1499 1553 },
1500 1554 getDroppableOptions: function getDroppableOptions() {
1501 - var _this7 = this;
1555 + var _this9 = this;
1502 1556 var items = '> .elementor-element, > .elementor-empty-view .elementor-first-add';
1503 1557 return {
1504 - axis: this.isAtomicGridContainer() ? 'vertical' : null,
1558 + axis: null,
1505 1559 items: items,
1506 1560 groups: ['elementor-element'],
1507 1561 horizontalThreshold: 0,
1508 1562 isDroppingAllowed: this.isDroppingAllowed.bind(this),
@@ -1509,9 +1563,9 @@
1509 1563 currentElementClass: 'elementor-html5dnd-current-element',
1510 1564 placeholderClass: 'elementor-sortable-placeholder elementor-widget-placeholder',
1511 1565 hasDraggingOnChildClass: 'e-dragging-over',
1512 1566 getDropContainer: function getDropContainer() {
1513 - return _this7.getContainer();
1567 + return _this9.getContainer();
1514 1568 },
1515 1569 onDropping: function onDropping(side, event) {
1516 1570 event.stopPropagation();
1517 1571
@@ -1518,29 +1572,44 @@
1518 1572 // Triggering the drag end manually, since it won't fire above the iframe
1519 1573 elementor.getPreviewView().onPanelElementDragEnd();
1520 1574 var draggedView = elementor.channels.editor.request('element:dragged'),
1521 1575 draggedElement = draggedView === null || draggedView === void 0 ? void 0 : draggedView.getContainer().view.el,
1522 - isEmptyViewTarget = _this7.emptyViewIsCurrentlyBeingDraggedOver(),
1523 - containerElement = isEmptyViewTarget ? _this7.el : event.currentTarget.parentElement,
1576 + containerElement = event.currentTarget.parentElement,
1524 1577 elements = Array.from((containerElement === null || containerElement === void 0 ? void 0 : containerElement.querySelectorAll(':scope > .elementor-element')) || []);
1525 - var targetIndex = isEmptyViewTarget ? elements.length : elements.indexOf(event.currentTarget);
1526 - if (_this7.isPanelElement(draggedView, draggedElement)) {
1527 - if (_this7.draggingOnBottomOrRightSide(side) && !isEmptyViewTarget) {
1578 + var targetIndex = elements.indexOf(event.currentTarget);
1579 + if (_this9.isPanelElement(draggedView, draggedElement)) {
1580 + var _elementorCommon;
1581 + if (_this9.draggingOnBottomOrRightSide(side) && !_this9.emptyViewIsCurrentlyBeingDraggedOver()) {
1528 1582 targetIndex++;
1529 1583 }
1530 - _this7.onDrop(event, {
1584 + _this9.onDrop(event, {
1531 1585 at: targetIndex
1532 1586 });
1587 + if ((_elementorCommon = elementorCommon) !== null && _elementorCommon !== void 0 && (_elementorCommon = _elementorCommon.eventsManager) !== null && _elementorCommon !== void 0 && _elementorCommon.dispatchEvent) {
1588 + var selectedElement = elementor.channels.panelElements.request('element:selected');
1589 + if (selectedElement) {
1590 + var _selectedElement$mode, _selectedElement$mode2, _selectedElement$mode3, _selectedElement$mode4;
1591 + var elType = (_selectedElement$mode = (_selectedElement$mode2 = selectedElement.model) === null || _selectedElement$mode2 === void 0 ? void 0 : _selectedElement$mode2.get('elType')) !== null && _selectedElement$mode !== void 0 ? _selectedElement$mode : '';
1592 + var widgetType = (_selectedElement$mode3 = (_selectedElement$mode4 = selectedElement.model) === null || _selectedElement$mode4 === void 0 ? void 0 : _selectedElement$mode4.get('widgetType')) !== null && _selectedElement$mode3 !== void 0 ? _selectedElement$mode3 : '';
1593 + var elementName = 'widget' === elType ? widgetType : elType;
1594 + elementorCommon.eventsManager.dispatchEvent('add_element', {
1595 + location: 'editor_panel',
1596 + element_name: elementName,
1597 + element_type: elType,
1598 + widget_type: widgetType
1599 + });
1600 + }
1601 + }
1533 1602 return;
1534 1603 }
1535 - if (_this7.isParentElement(draggedView.getContainer().id)) {
1604 + if (_this9.isParentElement(draggedView.getContainer().id)) {
1536 1605 return;
1537 1606 }
1538 - if (isEmptyViewTarget) {
1539 - _this7.moveDroppedItem(draggedView, targetIndex);
1607 + if (_this9.emptyViewIsCurrentlyBeingDraggedOver()) {
1608 + _this9.moveDroppedItem(draggedView, 0);
1540 1609 return;
1541 1610 }
1542 - _this7.moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement);
1611 + _this9.moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement);
1543 1612 }
1544 1613 };
1545 1614 },
1546 1615 moveExistingElement: function moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement) {
@@ -1658,8 +1727,26 @@
1658 1727 });
1659 1728 });
1660 1729 this.addSectionView = addSectionView;
1661 1730 },
1731 + getClasses: function getClasses() {
1732 + var _window, _window$get, _this$options;
1733 + var transformer = (_window = window) === null || _window === void 0 || (_window = _window.elementorV2) === null || _window === void 0 || (_window = _window.editorCanvas) === null || _window === void 0 || (_window = _window.settingsTransformersRegistry) === null || _window === void 0 || (_window$get = _window.get) === null || _window$get === void 0 ? void 0 : _window$get.call(_window, 'classes');
1734 + if (!transformer) {
1735 + return [];
1736 + }
1737 + return transformer(((_this$options = this.options) === null || _this$options === void 0 || (_this$options = _this$options.model) === null || _this$options === void 0 || (_this$options = _this$options.getSetting('classes')) === null || _this$options === void 0 ? void 0 : _this$options.value) || []);
1738 + },
1739 + getClassString: function getClassString() {
1740 + var classes = this.getClasses();
1741 + var base = this.getBaseClass();
1742 + return [base].concat((0, _toConsumableArray2.default)(classes)).join(' ');
1743 + },
1744 + getBaseClass: function getBaseClass() {
1745 + var _this$options2, _Object$keys$;
1746 + var baseStyles = elementor.helpers.getAtomicWidgetBaseStyles((_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.model);
1747 + return (_Object$keys$ = Object.keys(baseStyles !== null && baseStyles !== void 0 ? baseStyles : {})[0]) !== null && _Object$keys$ !== void 0 ? _Object$keys$ : '';
1748 + },
1662 1749 isOverflowHidden: function isOverflowHidden() {
1663 1750 var elementStyles = window.getComputedStyle(this.el);
1664 1751 var overflowStyles = [elementStyles.overflowX, elementStyles.overflowY, elementStyles.overflow];
1665 1752 return overflowStyles.includes('hidden') || overflowStyles.includes('auto');
@@ -1684,12 +1771,74 @@
1684 1771 return true;
1685 1772 }
1686 1773 return 0 === this.model.collection.indexOf(this.model);
1687 1774 },
1688 - getInteractionId: function getInteractionId() {
1689 - var originId = this.model.get('originId');
1690 - var id = this.model.get('id');
1691 - return originId !== null && originId !== void 0 ? originId : id;
1775 + getDynamicLinkValue: function getDynamicLinkValue(name, settings) {
1776 + var simpleTransform = function simpleTransform(props) {
1777 + var transformed = Object.entries(props).map(function (_ref7) {
1778 + var _ref8 = (0, _slicedToArray2.default)(_ref7, 2),
1779 + settingKey = _ref8[0],
1780 + settingValue = _ref8[1];
1781 + var value = 'object' === (0, _typeof2.default)(settingValue) && 'value' in settingValue ? settingValue.value : settingValue;
1782 + return [settingKey, value];
1783 + });
1784 + return Object.fromEntries(transformed);
1785 + };
1786 + var getTagValue = function getTagValue() {
1787 + var _elementor$dynamicTag;
1788 + var tag = elementor.dynamicTags.createTag('v4-dynamic-tag', name, simpleTransform(settings));
1789 + if (!tag) {
1790 + return null;
1791 + }
1792 + return (_elementor$dynamicTag = elementor.dynamicTags.loadTagDataFromCache(tag)) !== null && _elementor$dynamicTag !== void 0 ? _elementor$dynamicTag : null;
1793 + };
1794 + var tagValue = getTagValue();
1795 + if (tagValue !== null) {
1796 + return tagValue;
1797 + }
1798 + return new Promise(function (resolve) {
1799 + elementor.dynamicTags.refreshCacheFromServer(function () {
1800 + resolve(getTagValue());
1801 + });
1802 + });
1803 + },
1804 + handleDynamicLink: function handleDynamicLink(linkValue) {
1805 + var _this0 = this;
1806 + var result = this.getDynamicLinkValue(linkValue.name, linkValue.settings);
1807 + if (!result) {
1808 + return null;
1809 + }
1810 + if ('string' === typeof result) {
1811 + return result;
1812 + }
1813 + result.then(function (href) {
1814 + _this0.el.removeAttribute('href');
1815 + var attribute = 'action' === linkValue.group ? 'data-action-link' : 'href';
1816 + _this0.el.setAttribute(attribute, href);
1817 + }).then(function () {
1818 + return _this0.dispatchPreviewEvent('elementor/element/render');
1819 + });
1820 + return null;
1821 + },
1822 + _resolvePropValue: function _resolvePropValue(prop, renderContext) {
1823 + var _window2, _registry$get;
1824 + if (!prop || (0, _typeof2.default)(prop) !== 'object') {
1825 + return prop;
1826 + }
1827 + if ('overridable' !== prop.$$type) {
1828 + return prop;
1829 + }
1830 + var registry = (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.elementorV2) === null || _window2 === void 0 || (_window2 = _window2.editorCanvas) === null || _window2 === void 0 ? void 0 : _window2.settingsTransformersRegistry;
1831 + var transformer = registry === null || registry === void 0 || (_registry$get = registry.get) === null || _registry$get === void 0 ? void 0 : _registry$get.call(registry, 'overridable');
1832 + if (!transformer) {
1833 + var _prop$value;
1834 + return (_prop$value = prop.value) === null || _prop$value === void 0 ? void 0 : _prop$value.origin_value;
1835 + }
1836 + var transformed = transformer(prop.value, {
1837 + key: 'overridable',
1838 + renderContext: renderContext
1839 + });
1840 + return this._resolvePropValue(transformed, renderContext);
1692 1841 }
1693 1842 });
1694 1843 return AtomicElementView;
1695 1844 }
@@ -1893,16 +2042,25 @@
1893 2042 value: true
1894 2043 }));
1895 2044 exports.getElementChildren = getElementChildren;
1896 2045 var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js"));
2046 +/**
2047 + * @typedef {import('assets/dev/js/editor/container/container')} Container
2048 + */
2049 +
2050 +/**
2051 + * return all recursively nested elements in a flat array
2052 + *
2053 + * @param {Container} model
2054 + * @return {Container[]}
2055 + */
1897 2056 function getElementChildren(model) {
1898 - var _model$get$models, _model$get;
1899 - if (!model) {
1900 - return [];
1901 - }
1902 - var childModels = (_model$get$models = (_model$get = model.get('elements')) === null || _model$get === void 0 ? void 0 : _model$get.models) !== null && _model$get$models !== void 0 ? _model$get$models : [];
1903 - var children = childModels.flatMap(getElementChildren);
1904 - return [model].concat((0, _toConsumableArray2.default)(children));
2057 + var _flatMap, _container$model$get$, _container$model;
2058 + var container = window.elementor.getContainer(model.id);
2059 + var children = (_flatMap = ((_container$model$get$ = (_container$model = container.model) === null || _container$model === void 0 || (_container$model = _container$model.get('elements')) === null || _container$model === void 0 ? void 0 : _container$model.models) !== null && _container$model$get$ !== void 0 ? _container$model$get$ : []).flatMap(function (child) {
2060 + return getElementChildren(child);
2061 + })) !== null && _flatMap !== void 0 ? _flatMap : [];
2062 + return [container].concat((0, _toConsumableArray2.default)(children));
1905 2063 }
1906 2064
1907 2065 /***/ }),
1908 2066
@@ -1958,38 +2116,38 @@
1958 2116 var _getElementChildren = __webpack_require__(/*! ./get-element-children */ "../modules/atomic-widgets/assets/js/editor/utils/get-element-children.js");
1959 2117 var _getRandomStyleId = __webpack_require__(/*! ./get-random-style-id */ "../modules/atomic-widgets/assets/js/editor/utils/get-random-style-id.js");
1960 2118 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1961 2119 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1962 -function regenerateLocalStyleIds(container) {
1963 - if (!(container !== null && container !== void 0 && container.model)) {
1964 - return;
1965 - }
1966 - var allElements = (0, _getElementChildren.getElementChildren)(container.model);
1967 - var styledElements = allElements.filter(function (model) {
1968 - var _model$get;
1969 - return model && Object.keys((_model$get = model.get('styles')) !== null && _model$get !== void 0 ? _model$get : {}).length > 0;
1970 - });
1971 - updateElementsStyleIdsInsideOut(styledElements);
1972 -}
2120 +/**
2121 + * @typedef {import('assets/dev/js/editor/container/container')} Container
2122 + */
2123 +
1973 2124 function isClassesProp(prop) {
1974 2125 return prop.$$type && 'classes' === prop.$$type && Array.isArray(prop.value) && prop.value.length > 0;
1975 2126 }
1976 -function calculateNewStylesAndSettings(element, model, settings) {
1977 - var _settings$toJSON;
1978 - var originalStyles = model.get('styles');
1979 - var settingsJson = (_settings$toJSON = settings === null || settings === void 0 ? void 0 : settings.toJSON()) !== null && _settings$toJSON !== void 0 ? _settings$toJSON : {};
1980 - var classesProps = Object.entries(settingsJson).filter(function (_ref) {
2127 +
2128 +/**
2129 + * Update the style id of the container.
2130 + *
2131 + * @param {Container} container
2132 + */
2133 +function updateStyleId(container) {
2134 + var _container$settings$t, _container$settings;
2135 + var originalStyles = container.model.get('styles');
2136 + var settings = (_container$settings$t = (_container$settings = container.settings) === null || _container$settings === void 0 ? void 0 : _container$settings.toJSON()) !== null && _container$settings$t !== void 0 ? _container$settings$t : {};
2137 + var classesProps = Object.entries(settings).filter(function (_ref) {
1981 2138 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
1982 2139 propValue = _ref2[1];
1983 2140 return isClassesProp(propValue);
1984 2141 });
1985 2142 var newStyles = {};
1986 - var changedIds = {};
2143 + var changedIds = {}; // Conversion map - {[originalId: string]: newId: string}
2144 +
1987 2145 Object.entries(originalStyles).forEach(function (_ref3) {
1988 2146 var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
1989 2147 originalStyleId = _ref4[0],
1990 2148 style = _ref4[1];
1991 - var newStyleId = (0, _getRandomStyleId.getRandomStyleId)(element, newStyles);
2149 + var newStyleId = (0, _getRandomStyleId.getRandomStyleId)(container, newStyles);
1992 2150 newStyles[newStyleId] = structuredClone(_objectSpread(_objectSpread({}, style), {}, {
1993 2151 id: newStyleId
1994 2152 }));
1995 2153 changedIds[originalStyleId] = newStyleId;
@@ -2004,47 +2162,36 @@
2004 2162 return (_changedIds$className = changedIds[className]) !== null && _changedIds$className !== void 0 ? _changedIds$className : className;
2005 2163 })
2006 2164 })];
2007 2165 }, {});
2008 - return {
2009 - newStyles: newStyles,
2010 - newSettings: Object.fromEntries(newClassesProps)
2011 - };
2012 -}
2013 -function updateStyleIdForContainer(container) {
2014 - var model = container.model,
2015 - settings = container.settings;
2016 - var _calculateNewStylesAn = calculateNewStylesAndSettings(container, model, settings),
2017 - newStyles = _calculateNewStylesAn.newStyles,
2018 - newSettings = _calculateNewStylesAn.newSettings;
2166 +
2167 + // Update classes array
2019 2168 $e.internal('document/elements/set-settings', {
2020 2169 container: container,
2021 - settings: newSettings
2170 + settings: Object.fromEntries(newClassesProps)
2022 2171 });
2023 - model.set('styles', newStyles);
2024 -}
2025 -function updateStyleIdForModel(model) {
2026 - var settings = model.get('settings');
2027 - var _calculateNewStylesAn2 = calculateNewStylesAndSettings(model, model, settings),
2028 - newStyles = _calculateNewStylesAn2.newStyles,
2029 - newSettings = _calculateNewStylesAn2.newSettings;
2030 - settings.set(newSettings);
2031 - model.set('styles', newStyles);
2032 -}
2033 -function updateStyleId(model) {
2034 - var container = window.elementor.getContainer(model.get('id'));
2035 2172
2036 - // If view exists, update the styles via the container
2037 - if (container) {
2038 - updateStyleIdForContainer(container);
2039 - return;
2040 - }
2041 - updateStyleIdForModel(model);
2173 + // Update local styles
2174 + container.model.set('styles', newStyles);
2042 2175 }
2043 2176 function updateElementsStyleIdsInsideOut(styledElements) {
2044 2177 styledElements === null || styledElements === void 0 || styledElements.reverse().forEach(updateStyleId);
2045 2178 }
2046 2179
2180 +/**
2181 + * Get a container - iterate over its children, find all styled atomic widgets and update their style ids
2182 + *
2183 + * @param {Container} container
2184 + */
2185 +function regenerateLocalStyleIds(container) {
2186 + var allElements = (0, _getElementChildren.getElementChildren)(container);
2187 + var styledElements = allElements.filter(function (element) {
2188 + var _element$model$get;
2189 + return Object.keys((_element$model$get = element.model.get('styles')) !== null && _element$model$get !== void 0 ? _element$model$get : {}).length > 0;
2190 + });
2191 + updateElementsStyleIdsInsideOut(styledElements);
2192 +}
2193 +
2047 2194 /***/ }),
2048 2195
2049 2196 /***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js":
2050 2197 /*!***************************************************************!*\
@@ -2369,8 +2516,21 @@
2369 2516 module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
2370 2517
2371 2518 /***/ }),
2372 2519
2520 +/***/ "../node_modules/@babel/runtime/helpers/readOnlyError.js":
2521 +/*!***************************************************************!*\
2522 + !*** ../node_modules/@babel/runtime/helpers/readOnlyError.js ***!
2523 + \***************************************************************/
2524 +/***/ ((module) => {
2525 +
2526 +function _readOnlyError(r) {
2527 + throw new TypeError('"' + r + '" is read-only');
2528 +}
2529 +module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports;
2530 +
2531 +/***/ }),
2532 +
2373 2533 /***/ "../node_modules/@babel/runtime/helpers/regenerator.js":
2374 2534 /*!*************************************************************!*\
2375 2535 !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***!
2376 2536 \*************************************************************/
@@ -2983,9 +3143,13 @@
2983 3143 var _createAtomicElementBaseView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-element-base-view */ "../modules/atomic-widgets/assets/js/editor/create-atomic-element-base-view.js"));
2984 3144 var _atomicElementBaseModel = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-base-model */ "../modules/atomic-widgets/assets/js/editor/atomic-element-base-model.js"));
2985 3145 var _createDivBlockType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/create-div-block-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-div-block-type.js"));
2986 3146 var _createFlexboxType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/create-flexbox-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-flexbox-type.js"));
2987 -var _createGridType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/create-grid-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-grid-type.js"));
3147 +var _createAtomicTabsType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/atomic-tabs/create-atomic-tabs-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-type.js"));
3148 +var _createAtomicTabContentType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/atomic-tab-content/create-atomic-tab-content-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-content/create-atomic-tab-content-type.js"));
3149 +var _createAtomicTabType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/atomic-tab/create-atomic-tab-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-type.js"));
3150 +var _createAtomicTabsMenuType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-menu/create-atomic-tabs-menu-type.js"));
3151 +var _createAtomicTabsContentAreaType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs-content-area/create-atomic-tabs-content-area-type.js"));
2988 3152 function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
2989 3153 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
2990 3154 var Module = /*#__PURE__*/function (_elementorModules$edi) {
2991 3155 function Module() {
@@ -3009,19 +3173,15 @@
3009 3173 }
3010 3174 }, {
3011 3175 key: "registerAtomicElements",
3012 3176 value: function registerAtomicElements() {
3013 - this.registerAtomicElementTypeIfAbsent((0, _createDivBlockType.default)());
3014 - this.registerAtomicElementTypeIfAbsent((0, _createFlexboxType.default)());
3015 - this.registerAtomicElementTypeIfAbsent((0, _createGridType.default)());
3016 - }
3017 - }, {
3018 - key: "registerAtomicElementTypeIfAbsent",
3019 - value: function registerAtomicElementTypeIfAbsent(elementType) {
3020 - if (elementor.elementsManager.getElementTypeClass(elementType.getType())) {
3021 - return;
3022 - }
3023 - elementor.elementsManager.registerElementType(elementType);
3177 + elementor.elementsManager.registerElementType((0, _createDivBlockType.default)());
3178 + elementor.elementsManager.registerElementType((0, _createFlexboxType.default)());
3179 + elementor.elementsManager.registerElementType((0, _createAtomicTabsType.default)());
3180 + elementor.elementsManager.registerElementType((0, _createAtomicTabContentType.default)());
3181 + elementor.elementsManager.registerElementType((0, _createAtomicTabType.default)());
3182 + elementor.elementsManager.registerElementType((0, _createAtomicTabsMenuType.default)());
3183 + elementor.elementsManager.registerElementType((0, _createAtomicTabsContentAreaType.default)());
3024 3184 }
3025 3185 }]);
3026 3186 }(elementorModules.editor.utils.Module);
3027 3187 new Module();