PluginProbe
Elementor Website Builder – more than just a page builder / 3.33.0-beta1
Elementor Website Builder – more than just a page builder v3.33.0-beta1
4.3.4 4.3.3 4.3.2 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 All 457 releases
← All changes | assets/js/atomic-widgets-editor.js +581 -1098 4.1.4 → 3.33.0-beta1 View file →
@@ -302,467 +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 - try {
381 - return this.getEventsManager().dispatchEvent(eventName, payload);
382 - } catch (error) {
383 - return false;
384 - }
385 - }
386 - }, {
387 - key: "toLowerSnake",
388 - value: function toLowerSnake(value) {
389 - if (!value || 'string' !== typeof value) {
390 - return value;
391 - }
392 - return value.replace(/\s+/g, '_').toLowerCase();
393 - }
394 - }, {
395 - key: "decodeHtmlEntities",
396 - value: function decodeHtmlEntities(text) {
397 - if (!text || 'string' !== typeof text) {
398 - return text;
399 - }
400 - var doc = new DOMParser().parseFromString(text, 'text/html');
401 - return doc.body.textContent || text;
402 - }
403 - }, {
404 - key: "isInEditorContext",
405 - value: function isInEditorContext() {
406 - var _window$elementor;
407 - return 'undefined' !== typeof window.elementor && !!((_window$elementor = window.elementor) !== null && _window$elementor !== void 0 && _window$elementor.documents);
408 - }
409 - }, {
410 - key: "getFinderContext",
411 - value: function getFinderContext() {
412 - var _config$appTypes, _config$appTypes2, _config$locations, _config$locations2;
413 - var config = this.getConfig();
414 - var isEditor = this.isInEditorContext();
415 - return {
416 - 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,
417 - 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)
418 - };
419 - }
420 - }, {
421 - key: "createBasePayload",
422 - value: function createBasePayload() {
423 - var _config$appTypes$edit, _config$appTypes3, _config$appTypes$edit2, _config$appTypes4;
424 - var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
425 - var config = this.getConfig();
426 - return _objectSpread({
427 - 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',
428 - 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'
429 - }, overrides);
430 - }
431 - }, {
432 - key: "sendTopBarPublishDropdown",
433 - value: function sendTopBarPublishDropdown(targetName) {
434 - var _config$names, _config$triggers, _config$targetTypes, _config$interactionRe, _config$locations3, _config$secondaryLoca, _config$targetTypes2;
435 - var config = this.getConfig();
436 - 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({
437 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers = config.triggers) === null || _config$triggers === void 0 ? void 0 : _config$triggers.click),
438 - target_type: config === null || config === void 0 || (_config$targetTypes = config.targetTypes) === null || _config$targetTypes === void 0 ? void 0 : _config$targetTypes.dropdownItem,
439 - target_name: targetName,
440 - interaction_result: config === null || config === void 0 || (_config$interactionRe = config.interactionResults) === null || _config$interactionRe === void 0 ? void 0 : _config$interactionRe.actionSelected,
441 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations3 = config.locations) === null || _config$locations3 === void 0 ? void 0 : _config$locations3.topBar),
442 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca = config.secondaryLocations) === null || _config$secondaryLoca === void 0 ? void 0 : _config$secondaryLoca.publishDropdown),
443 - location_l2: config === null || config === void 0 || (_config$targetTypes2 = config.targetTypes) === null || _config$targetTypes2 === void 0 ? void 0 : _config$targetTypes2.dropdownItem,
444 - interaction_description: 'User selected an action from the publish dropdown'
445 - }));
446 - }
447 - }, {
448 - key: "sendTopBarPageList",
449 - value: function sendTopBarPageList(targetName) {
450 - var _config$names2, _config$triggers2, _config$targetTypes3, _config$interactionRe2, _config$interactionRe3, _config$locations4, _config$secondaryLoca2, _config$targetTypes4;
451 - var isCreate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
452 - var config = this.getConfig();
453 - 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({
454 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers2 = config.triggers) === null || _config$triggers2 === void 0 ? void 0 : _config$triggers2.click),
455 - target_type: config === null || config === void 0 || (_config$targetTypes3 = config.targetTypes) === null || _config$targetTypes3 === void 0 ? void 0 : _config$targetTypes3.dropdownItem,
456 - target_name: targetName,
457 - 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,
458 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations4 = config.locations) === null || _config$locations4 === void 0 ? void 0 : _config$locations4.topBar),
459 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca2 = config.secondaryLocations) === null || _config$secondaryLoca2 === void 0 ? void 0 : _config$secondaryLoca2.pageListDropdown),
460 - location_l2: config === null || config === void 0 || (_config$targetTypes4 = config.targetTypes) === null || _config$targetTypes4 === void 0 ? void 0 : _config$targetTypes4.dropdownItem,
461 - interaction_description: 'User selected an action from the page list dropdown'
462 - }));
463 - }
464 - }, {
465 - key: "sendSiteSettingsSession",
466 - value: function sendSiteSettingsSession(_ref) {
467 - var _config$names3, _config$triggers3, _config$interactionRe4, _config$locations5, _config$secondaryLoca3;
468 - var targetType = _ref.targetType,
469 - _ref$visitedItems = _ref.visitedItems,
470 - visitedItems = _ref$visitedItems === void 0 ? [] : _ref$visitedItems,
471 - _ref$savedItems = _ref.savedItems,
472 - savedItems = _ref$savedItems === void 0 ? [] : _ref$savedItems,
473 - state = _ref.state;
474 - var config = this.getConfig();
475 - 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({
476 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers3 = config.triggers) === null || _config$triggers3 === void 0 ? void 0 : _config$triggers3.click),
477 - target_type: targetType,
478 - target_name: 'site_settings',
479 - interaction_result: config === null || config === void 0 || (_config$interactionRe4 = config.interactionResults) === null || _config$interactionRe4 === void 0 ? void 0 : _config$interactionRe4.sessionEnd,
480 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations5 = config.locations) === null || _config$locations5 === void 0 ? void 0 : _config$locations5.leftPanel),
481 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca3 = config.secondaryLocations) === null || _config$secondaryLoca3 === void 0 ? void 0 : _config$secondaryLoca3.siteSettings),
482 - interaction_description: 'Records areas visited as part of the site setting session',
483 - metadata: {
484 - visited_items: visitedItems,
485 - saved_items: savedItems
486 - },
487 - state: state
488 - }));
489 - }
490 - }, {
491 - key: "sendELibraryNav",
492 - value: function sendELibraryNav(tabName) {
493 - var _config$names4, _config$triggers4, _config$targetTypes5, _config$interactionRe5, _config$locations6, _config$secondaryLoca4;
494 - var config = this.getConfig();
495 - 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({
496 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers4 = config.triggers) === null || _config$triggers4 === void 0 ? void 0 : _config$triggers4.tabSelect),
497 - target_type: config === null || config === void 0 || (_config$targetTypes5 = config.targetTypes) === null || _config$targetTypes5 === void 0 ? void 0 : _config$targetTypes5.tab,
498 - target_name: this.toLowerSnake(tabName),
499 - interaction_result: config === null || config === void 0 || (_config$interactionRe5 = config.interactionResults) === null || _config$interactionRe5 === void 0 ? void 0 : _config$interactionRe5.tabChanged,
500 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations6 = config.locations) === null || _config$locations6 === void 0 ? void 0 : _config$locations6.elementorLibrary),
501 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca4 = config.secondaryLocations) === null || _config$secondaryLoca4 === void 0 ? void 0 : _config$secondaryLoca4.libraryTabs),
502 - interaction_description: 'User navigates within elementor library'
503 - }));
504 - }
505 - }, {
506 - key: "sendELibraryInsert",
507 - value: function sendELibraryInsert(_ref2) {
508 - var _config$triggers5, _config$targetTypes6, _config$interactionRe6, _config$locations7, _config$secondaryLoca5, _config$names5;
509 - var assetId = _ref2.assetId,
510 - assetName = _ref2.assetName,
511 - libraryType = _ref2.libraryType,
512 - _ref2$proRequired = _ref2.proRequired,
513 - proRequired = _ref2$proRequired === void 0 ? false : _ref2$proRequired;
514 - var config = this.getConfig();
515 - var payload = this.createBasePayload({
516 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers5 = config.triggers) === null || _config$triggers5 === void 0 ? void 0 : _config$triggers5.insert),
517 - target_type: config === null || config === void 0 || (_config$targetTypes6 = config.targetTypes) === null || _config$targetTypes6 === void 0 ? void 0 : _config$targetTypes6.button,
518 - target_name: String(assetId),
519 - interaction_result: config === null || config === void 0 || (_config$interactionRe6 = config.interactionResults) === null || _config$interactionRe6 === void 0 ? void 0 : _config$interactionRe6.assetInserted,
520 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations7 = config.locations) === null || _config$locations7 === void 0 ? void 0 : _config$locations7.elementorLibrary),
521 - location_l1: this.toLowerSnake(libraryType),
522 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca5 = config.secondaryLocations) === null || _config$secondaryLoca5 === void 0 ? void 0 : _config$secondaryLoca5.assetCard),
523 - interaction_description: 'User inserts block/pages from elementor library',
524 - metadata: {
525 - template_id: String(assetId),
526 - template_name: this.decodeHtmlEntities(assetName) || ''
527 - }
528 - });
529 - if (proRequired) {
530 - payload.state = 'pro_plan_required';
531 - }
532 - 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);
533 - }
534 - }, {
535 - key: "sendELibraryFavorite",
536 - value: function sendELibraryFavorite(_ref3) {
537 - var _config$triggers6, _config$targetTypes7, _config$interactionRe7, _config$locations8, _config$secondaryLoca6, _config$names6;
538 - var assetId = _ref3.assetId,
539 - assetName = _ref3.assetName,
540 - libraryType = _ref3.libraryType,
541 - isFavorite = _ref3.isFavorite,
542 - _ref3$proRequired = _ref3.proRequired,
543 - proRequired = _ref3$proRequired === void 0 ? false : _ref3$proRequired;
544 - var config = this.getConfig();
545 - var payload = this.createBasePayload({
546 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers6 = config.triggers) === null || _config$triggers6 === void 0 ? void 0 : _config$triggers6.click),
547 - target_type: config === null || config === void 0 || (_config$targetTypes7 = config.targetTypes) === null || _config$targetTypes7 === void 0 ? void 0 : _config$targetTypes7.toggle,
548 - target_name: String(assetId),
549 - interaction_result: config === null || config === void 0 || (_config$interactionRe7 = config.interactionResults) === null || _config$interactionRe7 === void 0 ? void 0 : _config$interactionRe7.assetFavorite,
550 - target_value: Boolean(isFavorite),
551 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations8 = config.locations) === null || _config$locations8 === void 0 ? void 0 : _config$locations8.elementorLibrary),
552 - location_l1: this.toLowerSnake(libraryType),
553 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca6 = config.secondaryLocations) === null || _config$secondaryLoca6 === void 0 ? void 0 : _config$secondaryLoca6.assetCard),
554 - interaction_description: 'User favorite block/pages from elementor library',
555 - metadata: {
556 - template_id: String(assetId),
557 - template_name: this.decodeHtmlEntities(assetName) || ''
558 - }
559 - });
560 - if (proRequired) {
561 - payload.state = 'pro_plan_required';
562 - }
563 - 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);
564 - }
565 - }, {
566 - key: "sendELibraryGenerateAi",
567 - value: function sendELibraryGenerateAi(_ref4) {
568 - var _config$names7, _config$triggers7, _config$targetTypes8, _config$interactionRe8, _config$locations9, _config$secondaryLoca7;
569 - var assetId = _ref4.assetId,
570 - assetName = _ref4.assetName,
571 - libraryType = _ref4.libraryType;
572 - var config = this.getConfig();
573 - 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({
574 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers7 = config.triggers) === null || _config$triggers7 === void 0 ? void 0 : _config$triggers7.click),
575 - target_type: config === null || config === void 0 || (_config$targetTypes8 = config.targetTypes) === null || _config$targetTypes8 === void 0 ? void 0 : _config$targetTypes8.button,
576 - target_name: String(assetId),
577 - interaction_result: config === null || config === void 0 || (_config$interactionRe8 = config.interactionResults) === null || _config$interactionRe8 === void 0 ? void 0 : _config$interactionRe8.aiGenerate,
578 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations9 = config.locations) === null || _config$locations9 === void 0 ? void 0 : _config$locations9.elementorLibrary),
579 - location_l1: this.toLowerSnake(libraryType),
580 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca7 = config.secondaryLocations) === null || _config$secondaryLoca7 === void 0 ? void 0 : _config$secondaryLoca7.assetCard),
581 - interaction_description: 'User generated block/page based on a library asset',
582 - metadata: {
583 - template_id: String(assetId),
584 - template_name: this.decodeHtmlEntities(assetName) || ''
585 - }
586 - }));
587 - }
588 - }, {
589 - key: "sendFinderSearchInput",
590 - value: function sendFinderSearchInput(_ref5) {
591 - var _config$triggers8, _config$targetTypes9, _config$interactionRe9, _config$interactionRe0, _config$secondaryLoca8, _config$names8;
592 - var resultsCount = _ref5.resultsCount,
593 - _ref5$searchTerm = _ref5.searchTerm,
594 - searchTerm = _ref5$searchTerm === void 0 ? null : _ref5$searchTerm;
595 - var config = this.getConfig();
596 - var hasResults = resultsCount > 0;
597 - var finderContext = this.getFinderContext();
598 - var payload = this.createBasePayload({
599 - window_name: finderContext.windowName,
600 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers8 = config.triggers) === null || _config$triggers8 === void 0 ? void 0 : _config$triggers8.typing),
601 - target_type: config === null || config === void 0 || (_config$targetTypes9 = config.targetTypes) === null || _config$targetTypes9 === void 0 ? void 0 : _config$targetTypes9.searchInput,
602 - target_name: 'finder',
603 - 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,
604 - target_location: finderContext.targetLocation,
605 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca8 = config.secondaryLocations) === null || _config$secondaryLoca8 === void 0 ? void 0 : _config$secondaryLoca8.finder),
606 - interaction_description: 'Finder search input, follows debounce behavior',
607 - metadata: {
608 - results_count: resultsCount
609 - }
610 - });
611 - if (!hasResults && searchTerm) {
612 - payload.metadata.search_term = searchTerm;
613 - }
614 - 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);
615 - }
616 - }, {
617 - key: "sendFinderResultSelect",
618 - value: function sendFinderResultSelect(choice) {
619 - var _config$names9, _config$triggers9, _config$targetTypes0, _config$interactionRe1, _config$secondaryLoca9, _config$secondaryLoca0;
620 - var config = this.getConfig();
621 - var finderContext = this.getFinderContext();
622 - 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({
623 - window_name: finderContext.windowName,
624 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers9 = config.triggers) === null || _config$triggers9 === void 0 ? void 0 : _config$triggers9.click),
625 - target_type: config === null || config === void 0 || (_config$targetTypes0 = config.targetTypes) === null || _config$targetTypes0 === void 0 ? void 0 : _config$targetTypes0.searchResult,
626 - target_name: choice,
627 - interaction_result: config === null || config === void 0 || (_config$interactionRe1 = config.interactionResults) === null || _config$interactionRe1 === void 0 ? void 0 : _config$interactionRe1.selected,
628 - target_location: finderContext.targetLocation,
629 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca9 = config.secondaryLocations) === null || _config$secondaryLoca9 === void 0 ? void 0 : _config$secondaryLoca9.finder),
630 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca0 = config.secondaryLocations) === null || _config$secondaryLoca0 === void 0 ? void 0 : _config$secondaryLoca0.finderResults),
631 - interaction_description: 'Finder search results was selected'
632 - }));
633 - }
634 - }, {
635 - key: "sendCanvasEmptyBoxAction",
636 - value: function sendCanvasEmptyBoxAction(_ref6) {
637 - var _config$triggers0, _config$targetTypes1, _config$interactionRe10, _config$locations0, _config$secondaryLoca1, _config$names0;
638 - var targetName = _ref6.targetName,
639 - _ref6$metadata = _ref6.metadata,
640 - metadata = _ref6$metadata === void 0 ? {} : _ref6$metadata,
641 - _ref6$containerCreate = _ref6.containerCreated,
642 - containerCreated = _ref6$containerCreate === void 0 ? null : _ref6$containerCreate;
643 - var config = this.getConfig();
644 - var payload = this.createBasePayload({
645 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers0 = config.triggers) === null || _config$triggers0 === void 0 ? void 0 : _config$triggers0.click),
646 - target_type: config === null || config === void 0 || (_config$targetTypes1 = config.targetTypes) === null || _config$targetTypes1 === void 0 ? void 0 : _config$targetTypes1.buttons,
647 - target_name: targetName,
648 - interaction_result: config === null || config === void 0 || (_config$interactionRe10 = config.interactionResults) === null || _config$interactionRe10 === void 0 ? void 0 : _config$interactionRe10.selected,
649 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations0 = config.locations) === null || _config$locations0 === void 0 ? void 0 : _config$locations0.canvas),
650 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca1 = config.secondaryLocations) === null || _config$secondaryLoca1 === void 0 ? void 0 : _config$secondaryLoca1.emptyBox),
651 - interaction_description: 'Empty box on canvas actions'
652 - });
653 - if (Object.keys(metadata).length > 0) {
654 - payload.metadata = metadata;
655 - }
656 - if (containerCreated !== null) {
657 - payload.state = containerCreated;
658 - }
659 - 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);
660 - }
661 - }, {
662 - key: "sendWidgetPanelSearch",
663 - value: function sendWidgetPanelSearch(_ref7) {
664 - var _config$triggers1, _config$targetTypes10, _config$interactionRe11, _config$interactionRe12, _config$locations1, _config$locations10, _config$secondaryLoca10, _config$names1;
665 - var resultsCount = _ref7.resultsCount,
666 - _ref7$userInput = _ref7.userInput,
667 - userInput = _ref7$userInput === void 0 ? null : _ref7$userInput;
668 - var config = this.getConfig();
669 - var hasResults = resultsCount > 0;
670 - var payload = this.createBasePayload({
671 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers1 = config.triggers) === null || _config$triggers1 === void 0 ? void 0 : _config$triggers1.typing),
672 - target_type: config === null || config === void 0 || (_config$targetTypes10 = config.targetTypes) === null || _config$targetTypes10 === void 0 ? void 0 : _config$targetTypes10.searchWidget,
673 - target_name: 'search_widget',
674 - 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,
675 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations1 = config.locations) === null || _config$locations1 === void 0 ? void 0 : _config$locations1.leftPanel),
676 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$locations10 = config.locations) === null || _config$locations10 === void 0 ? void 0 : _config$locations10.widgetPanel),
677 - location_l2: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca10 = config.secondaryLocations) === null || _config$secondaryLoca10 === void 0 ? void 0 : _config$secondaryLoca10.searchBar),
678 - interaction_description: 'Widget search input, follows debounce behavior'
679 - });
680 - if (!hasResults && userInput) {
681 - payload.metadata = {
682 - user_input: userInput
683 - };
684 - }
685 - 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);
686 - }
687 - }, {
688 - key: "createWpDashPayload",
689 - value: function createWpDashPayload() {
690 - var _config$appTypes$wpDa, _config$appTypes5, _config$locations11;
691 - var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
692 - var config = this.getConfig();
693 - return this.createBasePayload(_objectSpread({
694 - 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',
695 - target_location: this.toLowerSnake(config === null || config === void 0 || (_config$locations11 = config.locations) === null || _config$locations11 === void 0 ? void 0 : _config$locations11.wpDashAdmin),
696 - location_l2: ''
697 - }, overrides));
698 - }
699 - }, {
700 - key: "sendWpDashElementorMenuClick",
701 - value: function sendWpDashElementorMenuClick() {
702 - var _config$names10, _config$triggers10, _config$targetTypes11, _config$interactionRe13, _config$secondaryLoca11;
703 - var config = this.getConfig();
704 - 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({
705 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers10 = config.triggers) === null || _config$triggers10 === void 0 ? void 0 : _config$triggers10.click),
706 - target_type: config === null || config === void 0 || (_config$targetTypes11 = config.targetTypes) === null || _config$targetTypes11 === void 0 ? void 0 : _config$targetTypes11.wpDashAdminMenuItem,
707 - target_name: 'elementor_menu_item',
708 - interaction_result: config === null || config === void 0 || (_config$interactionRe13 = config.interactionResults) === null || _config$interactionRe13 === void 0 ? void 0 : _config$interactionRe13.elementorSideMenuOpened,
709 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca11 = config.secondaryLocations) === null || _config$secondaryLoca11 === void 0 ? void 0 : _config$secondaryLoca11.wpDashElementorCoreMenu),
710 - interaction_description: 'core_user_clicked_elementor_menu_item'
711 - }));
712 - }
713 - }, {
714 - key: "sendWpDashEditorSubMenuHover",
715 - value: function sendWpDashEditorSubMenuHover() {
716 - var _config$names11, _config$triggers11, _config$targetTypes12, _config$interactionRe14, _config$secondaryLoca12;
717 - var config = this.getConfig();
718 - 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({
719 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers11 = config.triggers) === null || _config$triggers11 === void 0 ? void 0 : _config$triggers11.hover),
720 - target_type: config === null || config === void 0 || (_config$targetTypes12 = config.targetTypes) === null || _config$targetTypes12 === void 0 ? void 0 : _config$targetTypes12.wpDashEditorMenu,
721 - target_name: 'wpdash_editor_sub_menu',
722 - interaction_result: config === null || config === void 0 || (_config$interactionRe14 = config.interactionResults) === null || _config$interactionRe14 === void 0 ? void 0 : _config$interactionRe14.editorSubMenuOpened,
723 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca12 = config.secondaryLocations) === null || _config$secondaryLoca12 === void 0 ? void 0 : _config$secondaryLoca12.wpDashElementorCoreSubMenu),
724 - interaction_description: 'core_user_hovered_sub_menu'
725 - }));
726 - }
727 - }, {
728 - key: "sendWpDashThemeBuilderClick",
729 - value: function sendWpDashThemeBuilderClick() {
730 - var _config$names12, _config$triggers12, _config$targetTypes13, _config$interactionRe15, _config$secondaryLoca13;
731 - var config = this.getConfig();
732 - 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({
733 - interaction_type: this.toLowerSnake(config === null || config === void 0 || (_config$triggers12 = config.triggers) === null || _config$triggers12 === void 0 ? void 0 : _config$triggers12.click),
734 - target_type: config === null || config === void 0 || (_config$targetTypes13 = config.targetTypes) === null || _config$targetTypes13 === void 0 ? void 0 : _config$targetTypes13.wpDashSubMenuItem,
735 - target_name: 'theme_builder_menu_item',
736 - interaction_result: config === null || config === void 0 || (_config$interactionRe15 = config.interactionResults) === null || _config$interactionRe15 === void 0 ? void 0 : _config$interactionRe15.themeBuilderPromotionWindow,
737 - location_l1: this.toLowerSnake(config === null || config === void 0 || (_config$secondaryLoca13 = config.secondaryLocations) === null || _config$secondaryLoca13 === void 0 ? void 0 : _config$secondaryLoca13.wpDashThemeBuilder),
738 - interaction_description: 'core_user_clicked_theme_builder_menu_item'
739 - }));
740 - }
741 - }]);
742 -}();
743 -var createDebouncedFinderSearch = exports.createDebouncedFinderSearch = function createDebouncedFinderSearch() {
744 - var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 300;
745 - return _.debounce(function (resultsCount, searchTerm) {
746 - EditorOneEventManager.sendFinderSearchInput({
747 - resultsCount: resultsCount,
748 - searchTerm: searchTerm
749 - });
750 - }, delay);
751 -};
752 -var createDebouncedWidgetPanelSearch = exports.createDebouncedWidgetPanelSearch = function createDebouncedWidgetPanelSearch() {
753 - var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2000;
754 - return _.debounce(function (resultsCount, userInput) {
755 - EditorOneEventManager.sendWidgetPanelSearch({
756 - resultsCount: resultsCount,
757 - userInput: userInput
758 - });
759 - }, delay);
760 -};
761 -var _default = exports["default"] = EditorOneEventManager;
762 -
763 -/***/ }),
764 -
765 321 /***/ "../assets/dev/js/editor/utils/element-types.js":
766 322 /*!******************************************************!*\
767 323 !*** ../assets/dev/js/editor/utils/element-types.js ***!
768 324 \******************************************************/
@@ -881,14 +437,10 @@
881 437 }
882 438 }, {
883 439 key: "initialize",
884 440 value: function initialize(attributes, options) {
885 - var _this$config;
886 441 var elementType = this.get('elType');
887 442 this.config = elementor.config.elements[elementType];
888 - if ((_this$config = this.config) !== null && _this$config !== void 0 && (_this$config = _this$config.meta) !== null && _this$config !== void 0 && _this$config.permanently_locked) {
889 - this.set('isLocked', true);
890 - }
891 443 var isNewElementCreate = 0 === this.get('elements').length && $e.commands.currentTrace.includes('document/elements/create');
892 444 if (isNewElementCreate) {
893 445 this.onElementCreate();
894 446 }
@@ -897,34 +449,22 @@
897 449 }, {
898 450 key: "getDefaultChildren",
899 451 value: function getDefaultChildren() {
900 452 var defaultChildren = this.config.default_children;
901 - return this.modifyDefaultChildren(defaultChildren);
453 + return defaultChildren;
902 454 }
903 455 }, {
904 456 key: "onElementCreate",
905 457 value: function onElementCreate() {
906 458 var _this = this;
907 - if (this.get('skipDefaultChildren')) {
908 - this.unset('skipDefaultChildren', {
909 - silent: true
910 - });
911 - return;
912 - }
913 459 this.set('elements', this.getDefaultChildren().map(function (element) {
914 460 return _this.buildElement(element);
915 461 }));
916 462 }
917 463 }, {
918 - key: "modifyDefaultChildren",
919 - value: function modifyDefaultChildren(element) {
920 - return element;
921 - }
922 - }, {
923 464 key: "buildElement",
924 465 value: function buildElement(element) {
925 - var _this2 = this,
926 - _element$settings;
466 + var _this2 = this;
927 467 var id = elementorCommon.helpers.getUniqueId();
928 468 var elements = (element.elements || []).map(function (el) {
929 469 return _this2.buildElement(el);
930 470 });
@@ -931,13 +471,12 @@
931 471 return {
932 472 elType: element.elType,
933 473 widgetType: element.widgetType,
934 474 id: id,
935 - settings: (_element$settings = element.settings) !== null && _element$settings !== void 0 ? _element$settings : {},
475 + settings: element.settings || {},
936 476 elements: elements,
937 477 isLocked: element.isLocked || false,
938 - editor_settings: element.editor_settings || {},
939 - meta: element.meta || {}
478 + editor_settings: element.editor_settings || {}
940 479 };
941 480 }
942 481 }]);
943 482 }(elementor.modules.elements.models.Element);
@@ -1003,8 +542,355 @@
1003 542 }(elementor.modules.elements.types.Base);
1004 543
1005 544 /***/ }),
1006 545
546 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-panel/create-atomic-tab-panel-type.js":
547 +/*!************************************************************************************************************************!*\
548 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-panel/create-atomic-tab-panel-type.js ***!
549 + \************************************************************************************************************************/
550 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
551 +
552 +"use strict";
553 +
554 +
555 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
556 +Object.defineProperty(exports, "__esModule", ({
557 + value: true
558 +}));
559 +exports["default"] = void 0;
560 +var _createAtomicTabPanelView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tab-panel-view */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-panel/create-atomic-tab-panel-view.js"));
561 +var createAtomicTabPanelType = function createAtomicTabPanelType() {
562 + return new elementor.modules.elements.types.AtomicElementBase('e-tab-panel', (0, _createAtomicTabPanelView.default)());
563 +};
564 +var _default = exports["default"] = createAtomicTabPanelType;
565 +
566 +/***/ }),
567 +
568 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-panel/create-atomic-tab-panel-view.js":
569 +/*!************************************************************************************************************************!*\
570 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-panel/create-atomic-tab-panel-view.js ***!
571 + \************************************************************************************************************************/
572 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
573 +
574 +"use strict";
575 +
576 +
577 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
578 +Object.defineProperty(exports, "__esModule", ({
579 + value: true
580 +}));
581 +exports["default"] = void 0;
582 +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
583 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
584 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
585 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
586 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
587 +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
588 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
589 +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; }
590 +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; }
591 +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)); }
592 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
593 +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; }
594 +var createAtomicTabPanelView = function createAtomicTabPanelView() {
595 + var AtomicElementBaseView = elementor.modules.elements.views.createAtomicElementBase('e-tab-panel');
596 + return /*#__PURE__*/function (_AtomicElementBaseVie) {
597 + function AtomicTabPanelView() {
598 + (0, _classCallCheck2.default)(this, AtomicTabPanelView);
599 + return _callSuper(this, AtomicTabPanelView, arguments);
600 + }
601 + (0, _inherits2.default)(AtomicTabPanelView, _AtomicElementBaseVie);
602 + return (0, _createClass2.default)(AtomicTabPanelView, [{
603 + key: "attributes",
604 + value: function attributes() {
605 + var tabId = this.model.getSetting('tab-id');
606 + return tabId !== null && tabId !== void 0 && tabId.value ? _objectSpread({
607 + 'data-tab-id': tabId.value,
608 + 'aria-labelledby': tabId.value
609 + }, _superPropGet(AtomicTabPanelView, "attributes", this, 3)([])) : _superPropGet(AtomicTabPanelView, "attributes", this, 3)([]);
610 + }
611 + }]);
612 + }(AtomicElementBaseView);
613 +};
614 +var _default = exports["default"] = createAtomicTabPanelView;
615 +
616 +/***/ }),
617 +
618 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-type.js":
619 +/*!************************************************************************************************************!*\
620 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-type.js ***!
621 + \************************************************************************************************************/
622 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
623 +
624 +"use strict";
625 +
626 +
627 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
628 +Object.defineProperty(exports, "__esModule", ({
629 + value: true
630 +}));
631 +exports["default"] = void 0;
632 +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"));
633 +var createAtomicTabType = function createAtomicTabType() {
634 + return new elementor.modules.elements.types.AtomicElementBase('e-tab', (0, _createAtomicTabView.default)());
635 +};
636 +var _default = exports["default"] = createAtomicTabType;
637 +
638 +/***/ }),
639 +
640 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-view.js":
641 +/*!************************************************************************************************************!*\
642 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab/create-atomic-tab-view.js ***!
643 + \************************************************************************************************************/
644 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
645 +
646 +"use strict";
647 +
648 +
649 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
650 +Object.defineProperty(exports, "__esModule", ({
651 + value: true
652 +}));
653 +exports["default"] = void 0;
654 +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
655 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
656 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
657 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
658 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
659 +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
660 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
661 +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; }
662 +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; }
663 +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)); }
664 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
665 +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; }
666 +var createAtomicTabView = function createAtomicTabView() {
667 + var atomicElementBaseView = elementor.modules.elements.views.createAtomicElementBase('e-tab');
668 + return /*#__PURE__*/function (_atomicElementBaseVie) {
669 + function AtomicTabView() {
670 + (0, _classCallCheck2.default)(this, AtomicTabView);
671 + return _callSuper(this, AtomicTabView, arguments);
672 + }
673 + (0, _inherits2.default)(AtomicTabView, _atomicElementBaseVie);
674 + return (0, _createClass2.default)(AtomicTabView, [{
675 + key: "attributes",
676 + value: function attributes() {
677 + var tabPanelId = this.model.getSetting('tab-panel-id');
678 + return tabPanelId !== null && tabPanelId !== void 0 && tabPanelId.value ? _objectSpread({
679 + 'aria-controls': tabPanelId.value
680 + }, _superPropGet(AtomicTabView, "attributes", this, 3)([])) : _superPropGet(AtomicTabView, "attributes", this, 3)([]);
681 + }
682 + }]);
683 + }(atomicElementBaseView);
684 +};
685 +var _default = exports["default"] = createAtomicTabView;
686 +
687 +/***/ }),
688 +
689 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-model.js":
690 +/*!***************************************************************************************************************!*\
691 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-model.js ***!
692 + \***************************************************************************************************************/
693 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
694 +
695 +"use strict";
696 +
697 +
698 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
699 +Object.defineProperty(exports, "__esModule", ({
700 + value: true
701 +}));
702 +exports["default"] = void 0;
703 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
704 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
705 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
706 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
707 +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
708 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
709 +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)); }
710 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
711 +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; }
712 +var createAtomicTabsModel = function createAtomicTabsModel() {
713 + var AtomicElementBaseModel = elementor.modules.elements.models.AtomicElementBase;
714 + return /*#__PURE__*/function (_AtomicElementBaseMod) {
715 + function AtomicTabsModel() {
716 + (0, _classCallCheck2.default)(this, AtomicTabsModel);
717 + return _callSuper(this, AtomicTabsModel, arguments);
718 + }
719 + (0, _inherits2.default)(AtomicTabsModel, _AtomicElementBaseMod);
720 + return (0, _createClass2.default)(AtomicTabsModel, [{
721 + key: "onElementCreate",
722 + value: function onElementCreate() {
723 + _superPropGet(AtomicTabsModel, "onElementCreate", this, 3)([]);
724 + var tabs = this.getChildrenByType(this.get('elements'), 'e-tab');
725 + var tabPanels = this.getChildrenByType(this.get('elements'), 'e-tab-panel');
726 + var currentSettings = this.get('settings') || {};
727 + currentSettings['default-active-tab'] = {
728 + $$type: 'string',
729 + value: tabs[0].id
730 + };
731 + this.set('settings', currentSettings);
732 +
733 + // TODO: maybe move this part to a dedicated "afterDefaultChildrenSet" method
734 + tabs.forEach(function (tab, index) {
735 + tab.settings._cssid = {
736 + $$type: 'string',
737 + value: tab.id
738 + };
739 + tab.settings['tab-panel-id'] = {
740 + $$type: 'string',
741 + value: tabPanels[index].id
742 + };
743 + var tabPanel = tabPanels[index];
744 + tabPanel.settings._cssid = {
745 + $$type: 'string',
746 + value: tabPanels[index].id
747 + };
748 + tabPanel.settings['tab-id'] = {
749 + $$type: 'string',
750 + value: tab.id
751 + };
752 + });
753 + }
754 + }, {
755 + key: "getChildrenByType",
756 + value: function getChildrenByType(elements, type) {
757 + var foundElements = [];
758 + var _searchRecursively = function searchRecursively(collection) {
759 + collection.forEach(function (element) {
760 + if (type === element.elType) {
761 + foundElements.push(element);
762 + }
763 + var childElements = element.elements;
764 + if (childElements && childElements.length > 0) {
765 + _searchRecursively(childElements);
766 + }
767 + });
768 + };
769 + _searchRecursively(elements);
770 + return foundElements;
771 + }
772 + }]);
773 + }(AtomicElementBaseModel);
774 +};
775 +var _default = exports["default"] = createAtomicTabsModel;
776 +
777 +/***/ }),
778 +
779 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-type.js":
780 +/*!**************************************************************************************************************!*\
781 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-type.js ***!
782 + \**************************************************************************************************************/
783 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
784 +
785 +"use strict";
786 +
787 +
788 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
789 +Object.defineProperty(exports, "__esModule", ({
790 + value: true
791 +}));
792 +exports["default"] = void 0;
793 +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"));
794 +var _createAtomicTabsModel = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-tabs-model */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-model.js"));
795 +var createAtomicTabsType = function createAtomicTabsType() {
796 + return new elementor.modules.elements.types.AtomicElementBase('e-tabs', (0, _createAtomicTabsView.default)(), (0, _createAtomicTabsModel.default)());
797 +};
798 +var _default = exports["default"] = createAtomicTabsType;
799 +
800 +/***/ }),
801 +
802 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-view.js":
803 +/*!**************************************************************************************************************!*\
804 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tabs/create-atomic-tabs-view.js ***!
805 + \**************************************************************************************************************/
806 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
807 +
808 +"use strict";
809 +
810 +
811 +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
812 +Object.defineProperty(exports, "__esModule", ({
813 + value: true
814 +}));
815 +exports["default"] = void 0;
816 +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
817 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
818 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
819 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
820 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
821 +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
822 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
823 +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; }
824 +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; }
825 +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)); }
826 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
827 +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; }
828 +var createAtomicTabsView = function createAtomicTabsView() {
829 + var AtomicElementBaseView = elementor.modules.elements.views.createAtomicElementBase('e-tabs');
830 + return /*#__PURE__*/function (_AtomicElementBaseVie) {
831 + function AtomicTabsView() {
832 + (0, _classCallCheck2.default)(this, AtomicTabsView);
833 + return _callSuper(this, AtomicTabsView, arguments);
834 + }
835 + (0, _inherits2.default)(AtomicTabsView, _AtomicElementBaseVie);
836 + return (0, _createClass2.default)(AtomicTabsView, [{
837 + key: "attributes",
838 + value: function attributes() {
839 + var defaultActiveTab = this.model.getSetting('default-active-tab');
840 + return defaultActiveTab !== null && defaultActiveTab !== void 0 && defaultActiveTab.value ? _objectSpread({
841 + 'data-active-tab': defaultActiveTab.value
842 + }, _superPropGet(AtomicTabsView, "attributes", this, 3)([])) : _superPropGet(AtomicTabsView, "attributes", this, 3)([]);
843 + }
844 + }]);
845 + }(AtomicElementBaseView);
846 +};
847 +var _default = exports["default"] = createAtomicTabsView;
848 +
849 +/***/ }),
850 +
851 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-atomic-tabs-content-type.js":
852 +/*!**********************************************************************************************************!*\
853 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-atomic-tabs-content-type.js ***!
854 + \**********************************************************************************************************/
855 +/***/ ((__unused_webpack_module, exports) => {
856 +
857 +"use strict";
858 +
859 +
860 +Object.defineProperty(exports, "__esModule", ({
861 + value: true
862 +}));
863 +exports["default"] = void 0;
864 +var createAtomicTabsContentType = function createAtomicTabsContentType() {
865 + var AtomicTabsContentView = elementor.modules.elements.views.createAtomicElementBase('e-tabs-content');
866 + return new elementor.modules.elements.types.AtomicElementBase('e-tabs-content', AtomicTabsContentView);
867 +};
868 +var _default = exports["default"] = createAtomicTabsContentType;
869 +
870 +/***/ }),
871 +
872 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-atomic-tabs-list-type.js":
873 +/*!*******************************************************************************************************!*\
874 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-atomic-tabs-list-type.js ***!
875 + \*******************************************************************************************************/
876 +/***/ ((__unused_webpack_module, exports) => {
877 +
878 +"use strict";
879 +
880 +
881 +Object.defineProperty(exports, "__esModule", ({
882 + value: true
883 +}));
884 +exports["default"] = void 0;
885 +var createAtomicTabsListType = function createAtomicTabsListType() {
886 + var AtomicTabsListView = elementor.modules.elements.views.createAtomicElementBase('e-tabs-list');
887 + return new elementor.modules.elements.types.AtomicElementBase('e-tabs-list', AtomicTabsListView);
888 +};
889 +var _default = exports["default"] = createAtomicTabsListType;
890 +
891 +/***/ }),
892 +
1007 893 /***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-div-block-type.js":
1008 894 /*!************************************************************************************************!*\
1009 895 !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-div-block-type.js ***!
1010 896 \************************************************************************************************/
@@ -1125,9 +1011,8 @@
1125 1011 }
1126 1012 _this = _callSuper(this, AtomicElementEmptyView, [].concat(args));
1127 1013 (0, _defineProperty2.default)(_this, "template", '<div></div>');
1128 1014 (0, _defineProperty2.default)(_this, "className", 'elementor-empty-view');
1129 - (0, _defineProperty2.default)(_this, "unmount", null);
1130 1015 return _this;
1131 1016 }
1132 1017 (0, _inherits2.default)(AtomicElementEmptyView, _Marionette$ItemView);
1133 1018 return (0, _createClass2.default)(AtomicElementEmptyView, [{
@@ -1139,17 +1024,8 @@
1139 1024 unmount = _ReactUtils$render.unmount;
1140 1025 this.unmount = unmount;
1141 1026 }
1142 1027 }, {
1143 - key: "onBeforeRender",
1144 - value: function onBeforeRender() {
1145 - // In case the element is being rendered again, we need to unmount the previous React component.
1146 - if (this.unmount) {
1147 - this.unmount();
1148 - this.unmount = null;
1149 - }
1150 - }
1151 - }, {
1152 1028 key: "onRender",
1153 1029 value: function onRender() {
1154 1030 this.$el.addClass(this.className);
1155 1031 this.renderReactDefaultElement();
@@ -1156,10 +1032,9 @@
1156 1032 }
1157 1033 }, {
1158 1034 key: "onDestroy",
1159 1035 value: function onDestroy() {
1160 - var _this$unmount;
1161 - (_this$unmount = this.unmount) === null || _this$unmount === void 0 || _this$unmount.call(this);
1036 + this.unmount();
1162 1037 }
1163 1038 }]);
1164 1039 }(Marionette.ItemView);
1165 1040
@@ -1180,27 +1055,28 @@
1180 1055 Object.defineProperty(exports, "__esModule", ({
1181 1056 value: true
1182 1057 }));
1183 1058 exports["default"] = createAtomicElementBaseView;
1184 -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
1185 -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
1059 +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
1186 1060 var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js"));
1187 1061 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
1062 +var _atomicElementEmptyView = _interopRequireDefault(__webpack_require__(/*! ./container/atomic-element-empty-view */ "../modules/atomic-widgets/assets/js/editor/container/atomic-element-empty-view.js"));
1188 1063 var _elementTypes = __webpack_require__(/*! elementor-editor/utils/element-types */ "../assets/dev/js/editor/utils/element-types.js");
1189 -var _atomicElementEmptyView = _interopRequireDefault(__webpack_require__(/*! ./container/atomic-element-empty-view */ "../modules/atomic-widgets/assets/js/editor/container/atomic-element-empty-view.js"));
1064 +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; }
1065 +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; }
1190 1066 var BaseElementView = elementor.modules.elements.views.BaseElement;
1191 1067 function createAtomicElementBaseView(type) {
1192 1068 var AtomicElementView = BaseElementView.extend({
1193 1069 template: Marionette.TemplateCache.get("#tmpl-elementor-".concat(type, "-content")),
1194 1070 emptyView: _atomicElementEmptyView.default,
1195 - _childrenRenderPromises: [],
1196 - _createElement: function _createElement(tag) {
1197 - var _elementor$$preview;
1198 - 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;
1199 - if (previewDocument) {
1200 - return previewDocument.createElement(tag);
1071 + tagName: function tagName() {
1072 + if (this.haveLink()) {
1073 + return 'a';
1201 1074 }
1202 - return document.createElement(tag);
1075 + var tagControl = this.model.getSetting('tag');
1076 + var tagControlValue = (tagControl === null || tagControl === void 0 ? void 0 : tagControl.value) || tagControl;
1077 + var defaultTag = this.model.config.default_html_tag;
1078 + return tagControlValue || defaultTag;
1203 1079 },
1204 1080 getChildViewContainer: function getChildViewContainer() {
1205 1081 this.childViewContainer = '';
1206 1082 return Marionette.CompositeView.prototype.getChildViewContainer.apply(this, arguments);
@@ -1216,114 +1092,127 @@
1216 1092 return elType;
1217 1093 });
1218 1094 return ['widget', 'container'].concat((0, _toConsumableArray2.default)(atomicElements));
1219 1095 },
1220 - getRenderContext: function getRenderContext() {
1221 - var _this$_parent, _this$_parent$getRend;
1222 - return (_this$_parent = this._parent) === null || _this$_parent === void 0 || (_this$_parent$getRend = _this$_parent.getRenderContext) === null || _this$_parent$getRend === void 0 ? void 0 : _this$_parent$getRend.call(_this$_parent);
1096 + className: function className() {
1097 + return "".concat(BaseElementView.prototype.className.apply(this), " e-con e-atomic-element ").concat(this.getClassString());
1223 1098 },
1224 - getResolverRenderContext: function getResolverRenderContext() {
1225 - var _this$_parent2, _this$_parent2$getRes;
1226 - 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);
1099 + // TODO: Copied from `views/column.js`.
1100 + ui: function ui() {
1101 + var ui = BaseElementView.prototype.ui.apply(this, arguments);
1102 + ui.percentsTooltip = '> .elementor-element-overlay .elementor-column-percents-tooltip';
1103 + return ui;
1227 1104 },
1228 - render: function render() {
1229 - var _this = this;
1230 - this._currentRenderPromise = new Promise(function (resolve) {
1231 - // Optimize rendering by reusing existing child views instead of recreating them.
1232 - if (_this._shouldSkipFullRender()) {
1233 - _this._renderWithoutDomRecreation(resolve);
1234 - } else {
1235 - _this._renderWithDomRecreation(resolve);
1105 + attributes: function attributes() {
1106 + var _this$model$getSettin, _this$model$getSettin2, _this$model$config$in, _this$model;
1107 + var attr = BaseElementView.prototype.attributes.apply(this);
1108 + var local = {};
1109 + var cssId = this.model.getSetting('_cssid');
1110 + 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 : [];
1111 + 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 : {};
1112 + if (cssId) {
1113 + local.id = cssId.value;
1114 + }
1115 + var href = this.getHref();
1116 + if (href) {
1117 + local.href = href;
1118 + }
1119 + customAttributes.forEach(function (attribute) {
1120 + var _attribute$value, _attribute$value2;
1121 + 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;
1122 + 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;
1123 + if (key && value) {
1124 + local[key] = value;
1236 1125 }
1237 1126 });
1238 - return this;
1127 + return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, attr), initialAttributes), customAttributes), local);
1239 1128 },
1240 - _shouldSkipFullRender: function _shouldSkipFullRender() {
1241 - return this.isRendered && this._hasConnectedChildren();
1129 + // TODO: Copied from `views/column.js`.
1130 + attachElContent: function attachElContent() {
1131 + BaseElementView.prototype.attachElContent.apply(this, arguments);
1132 + var $tooltip = jQuery('<div>', {
1133 + class: 'elementor-column-percents-tooltip',
1134 + 'data-side': elementorCommon.config.isRTL ? 'right' : 'left'
1135 + });
1136 + this.$el.children('.elementor-element-overlay').append($tooltip);
1242 1137 },
1243 - _hasConnectedChildren: function _hasConnectedChildren() {
1244 - var _this$children, _firstChild$$el$get$i, _firstChild$$el;
1245 - if (!((_this$children = this.children) !== null && _this$children !== void 0 && _this$children.length)) {
1246 - return false;
1138 + // TODO: Copied from `views/column.js`.
1139 + getPercentSize: function getPercentSize(size) {
1140 + if (!size) {
1141 + size = this.el.getBoundingClientRect().width;
1247 1142 }
1248 -
1249 - // If the parent's innerHTML was replaced, all children are detached together.
1250 - var firstChild = this.children.findByIndex(0);
1251 - 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;
1143 + return +(size / this.$el.parent().width() * 100).toFixed(3);
1252 1144 },
1253 - _renderWithoutDomRecreation: function _renderWithoutDomRecreation(resolve) {
1254 - var _this2 = this;
1255 - this._beforeRender();
1256 - this._renderChildren();
1257 - this._waitForChildrenToComplete().then(function () {
1258 - _this2._afterRender();
1259 - resolve();
1260 - });
1145 + // TODO: Copied from `views/column.js`.
1146 + getPercentsForDisplay: function getPercentsForDisplay() {
1147 + var width = +this.model.getSetting('width') || this.getPercentSize();
1148 + return width.toFixed(1) + '%';
1261 1149 },
1262 - _renderWithDomRecreation: function _renderWithDomRecreation(resolve) {
1263 - BaseElementView.prototype.render.apply(this, arguments);
1264 - this._waitForChildrenToComplete().then(function () {
1265 - resolve();
1150 + renderOnChange: function renderOnChange(settings) {
1151 + var _this = this;
1152 + var changed = settings.changedAttributes();
1153 + setTimeout(function () {
1154 + _this.updateHandlesPosition();
1266 1155 });
1267 - },
1268 - _beforeRender: function _beforeRender() {
1269 - this._isRendering = true;
1270 - this.triggerMethod('before:render', this);
1271 - },
1272 - _afterRender: function _afterRender() {
1273 - this._isRendering = false;
1274 - this.isRendered = true;
1275 - this.triggerMethod('render', this);
1276 - },
1277 - _waitForChildrenToComplete: function _waitForChildrenToComplete() {
1278 - var _this3 = this;
1279 - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
1280 - return _regenerator.default.wrap(function (_context) {
1281 - while (1) switch (_context.prev = _context.next) {
1282 - case 0:
1283 - if (!(_this3._childrenRenderPromises.length > 0)) {
1284 - _context.next = 1;
1285 - break;
1286 - }
1287 - _context.next = 1;
1288 - return Promise.all(_this3._childrenRenderPromises);
1289 - case 1:
1290 - case "end":
1291 - return _context.stop();
1156 + if (!changed) {
1157 + return;
1158 + }
1159 + BaseElementView.prototype.renderOnChange.apply(this, settings);
1160 + if (changed.attributes) {
1161 + var _this$model$getSettin3;
1162 + var preserveAttrs = ['id', 'class', 'href'];
1163 + var $elAttrs = this.$el[0].attributes;
1164 + for (var i = $elAttrs.length - 1; i >= 0; i--) {
1165 + var attrName = $elAttrs[i].name;
1166 + if (!preserveAttrs.includes(attrName)) {
1167 + this.$el.removeAttr(attrName);
1292 1168 }
1293 - }, _callee);
1294 - }))();
1295 - },
1296 - _renderChildren: function _renderChildren() {
1297 - if (this._shouldSkipFullRender()) {
1298 - var _this$children2;
1299 - (_this$children2 = this.children) === null || _this$children2 === void 0 || _this$children2.each(function (childView) {
1300 - return childView.render();
1169 + }
1170 + var attrs = ((_this$model$getSettin3 = this.model.getSetting('attributes')) === null || _this$model$getSettin3 === void 0 ? void 0 : _this$model$getSettin3.value) || [];
1171 + attrs.forEach(function (attribute) {
1172 + var _attribute$value3, _attribute$value4;
1173 + var key = attribute === null || attribute === void 0 || (_attribute$value3 = attribute.value) === null || _attribute$value3 === void 0 || (_attribute$value3 = _attribute$value3.key) === null || _attribute$value3 === void 0 ? void 0 : _attribute$value3.value;
1174 + var value = attribute === null || attribute === void 0 || (_attribute$value4 = attribute.value) === null || _attribute$value4 === void 0 || (_attribute$value4 = _attribute$value4.value) === null || _attribute$value4 === void 0 ? void 0 : _attribute$value4.value;
1175 + if (key && value) {
1176 + _this.$el.attr(key, value);
1177 + }
1301 1178 });
1302 - } else {
1303 - BaseElementView.prototype._renderChildren.apply(this, arguments);
1179 + return;
1304 1180 }
1305 - this._collectChildrenRenderPromises();
1181 + if (changed.classes) {
1182 + this.$el.attr('class', this.className());
1183 + return;
1184 + }
1185 + if (changed._cssid) {
1186 + if (changed._cssid.value) {
1187 + this.$el.attr('id', changed._cssid.value);
1188 + } else {
1189 + this.$el.removeAttr('id');
1190 + }
1191 + return;
1192 + }
1193 + this.$el.addClass(this.getClasses());
1194 + if (this.isTagChanged(changed)) {
1195 + this.rerenderEntireView();
1196 + }
1306 1197 },
1307 - _collectChildrenRenderPromises: function _collectChildrenRenderPromises() {
1308 - var _this$children3,
1309 - _this4 = this;
1310 - this._childrenRenderPromises = [];
1311 - (_this$children3 = this.children) === null || _this$children3 === void 0 || _this$children3.each(function (childView) {
1312 - if (childView._currentRenderPromise) {
1313 - _this4._childrenRenderPromises.push(childView._currentRenderPromise);
1314 - }
1315 - });
1198 + isTagChanged: function isTagChanged(changed) {
1199 + 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;
1316 1200 },
1201 + rerenderEntireView: function rerenderEntireView() {
1202 + var parent = this._parent;
1203 + this._parent.removeChildView(this);
1204 + parent.addChild(this.model, AtomicElementView, this._index);
1205 + },
1317 1206 onRender: function onRender() {
1318 - var _this5 = this;
1207 + var _this2 = this;
1319 1208 this.dispatchPreviewEvent('elementor/element/render');
1320 1209 BaseElementView.prototype.onRender.apply(this, arguments);
1321 1210
1322 1211 // Defer to wait for everything to render.
1323 1212 setTimeout(function () {
1324 - _this5.droppableInitialize();
1325 - _this5.updateHandlesPosition();
1213 + _this2.droppableInitialize();
1214 + _this2.updateHandlesPosition();
1326 1215 });
1327 1216 },
1328 1217 onDestroy: function onDestroy() {
1329 1218 BaseElementView.prototype.onDestroy.apply(this, arguments);
@@ -1338,8 +1227,23 @@
1338 1227 element: this.getDomElement().get(0)
1339 1228 }
1340 1229 }));
1341 1230 },
1231 + haveLink: function haveLink() {
1232 + var _this$model$getSettin4;
1233 + return !!((_this$model$getSettin4 = this.model.getSetting('link')) !== null && _this$model$getSettin4 !== void 0 && (_this$model$getSettin4 = _this$model$getSettin4.value) !== null && _this$model$getSettin4 !== void 0 && (_this$model$getSettin4 = _this$model$getSettin4.destination) !== null && _this$model$getSettin4 !== void 0 && _this$model$getSettin4.value);
1234 + },
1235 + getHref: function getHref() {
1236 + if (!this.haveLink()) {
1237 + return;
1238 + }
1239 + var _this$model$getSettin5 = this.model.getSetting('link').value.destination,
1240 + $$type = _this$model$getSettin5.$$type,
1241 + value = _this$model$getSettin5.value;
1242 + var isPostId = 'number' === $$type;
1243 + var hrefPrefix = isPostId ? elementor.config.home_url + '/?p=' : '';
1244 + return hrefPrefix + value;
1245 + },
1342 1246 droppableInitialize: function droppableInitialize() {
1343 1247 this.$el.html5Droppable(this.getDroppableOptions());
1344 1248 },
1345 1249 /**
@@ -1347,37 +1251,27 @@
1347 1251 *
1348 1252 * @return {Object} groups
1349 1253 */
1350 1254 getContextMenuGroups: function getContextMenuGroups() {
1351 - var _this6 = this,
1255 + var _this3 = this,
1352 1256 _elementorCommon$conf;
1353 1257 var saveActions = [{
1354 1258 name: 'save',
1355 1259 title: __('Save as a template', 'elementor'),
1260 + shortcut: "<span class=\"elementor-context-menu-list__item__shortcut__new-badge\">".concat(__('New', 'elementor'), "</span>"),
1356 1261 callback: this.saveAsTemplate.bind(this),
1357 1262 isEnabled: function isEnabled() {
1358 - return !_this6.getContainer().isLocked();
1263 + return !_this3.getContainer().isLocked();
1359 1264 }
1360 1265 }];
1361 - var isAdministrator = elementor.config.user.is_administrator;
1362 - var isExperimentalFeaturesEnabled = (_elementorCommon$conf = elementorCommon.config.experimentalFeatures) === null || _elementorCommon$conf === void 0 ? void 0 : _elementorCommon$conf.e_components;
1363 - if (isExperimentalFeaturesEnabled && isAdministrator) {
1364 - 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;
1365 - 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;
1366 - 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;
1367 - 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);
1368 - var showPromoBadge = !isProActive && !isProOutdated;
1369 - var newBadge = "<span class=\"elementor-context-menu-list__item__shortcut__new-badge\">".concat(__('New', 'elementor'), "</span>");
1370 - var badgeClass = 'elementor-context-menu-list__item__shortcut__promotion-badge';
1371 - 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>");
1266 + if ((_elementorCommon$conf = elementorCommon.config.experimentalFeatures) !== null && _elementorCommon$conf !== void 0 && _elementorCommon$conf.e_components) {
1372 1267 saveActions.unshift({
1373 1268 name: 'save-component',
1374 - title: __('Create component', 'elementor'),
1375 - shortcut: isProActive || isProOutdated ? newBadge : proBadge,
1376 - hasShortcutAction: showPromoBadge,
1269 + title: __('Save as a component', 'elementor'),
1270 + shortcut: "<span class=\"elementor-context-menu-list__item__shortcut__new-badge\">".concat(__('New', 'elementor'), "</span>"),
1377 1271 callback: this.saveAsComponent.bind(this),
1378 1272 isEnabled: function isEnabled() {
1379 - return (isProActive || isProOutdated) && !_this6.getContainer().isLocked();
1273 + return !_this3.getContainer().isLocked();
1380 1274 }
1381 1275 });
1382 1276 }
1383 1277 var groups = BaseElementView.prototype.getContextMenuGroups.apply(this, arguments),
@@ -1390,39 +1284,13 @@
1390 1284 });
1391 1285 return groups;
1392 1286 },
1393 1287 saveAsTemplate: function saveAsTemplate() {
1394 - elementor.templates.eventManager.sendNewSaveTemplateClickedEvent();
1395 1288 $e.route('library/save-template', {
1396 1289 model: this.model
1397 1290 });
1398 1291 },
1399 - saveAsComponent: function saveAsComponent(openContextMenuEvent, options) {
1400 - 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;
1401 - 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;
1402 - 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);
1403 - if (isProOutdated) {
1404 - var _window$elementorV6, _window$elementorV6$n;
1405 - (_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, {
1406 - type: 'info',
1407 - id: 'component-create-update',
1408 - message: __('To create new components, update Elementor Pro to the latest version.', 'elementor'),
1409 - additionalActionProps: [{
1410 - size: 'small',
1411 - variant: 'contained',
1412 - color: 'info',
1413 - href: '/wp-admin/plugins.php',
1414 - target: '_blank',
1415 - children: __('Update Now', 'elementor')
1416 - }]
1417 - });
1418 - return;
1419 - }
1420 - 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;
1421 - if (!isProActive) {
1422 - return;
1423 - }
1424 -
1292 + saveAsComponent: function saveAsComponent(openContextMenuEvent) {
1425 1293 // Calculate the absolute position where the context menu was opened.
1426 1294 var openMenuOriginalEvent = openContextMenuEvent.originalEvent;
1427 1295 var iframeRect = elementor.$preview[0].getBoundingClientRect();
1428 1296 var anchorPosition = {
@@ -1430,18 +1298,15 @@
1430 1298 top: openMenuOriginalEvent.clientY + iframeRect.top
1431 1299 };
1432 1300 window.dispatchEvent(new CustomEvent('elementor/editor/open-save-as-component-form', {
1433 1301 detail: {
1434 - element: elementor.getContainer(this.model.id).model.toJSON({
1435 - remove: ['default']
1436 - }),
1437 - anchorPosition: anchorPosition,
1438 - options: options
1302 + element: elementor.getContainer(this.model.id),
1303 + anchorPosition: anchorPosition
1439 1304 }
1440 1305 }));
1441 1306 },
1442 1307 isDroppingAllowed: function isDroppingAllowed() {
1443 - return this.getContainer().isEditable();
1308 + return true;
1444 1309 },
1445 1310 behaviors: function behaviors() {
1446 1311 var behaviors = BaseElementView.prototype.behaviors.apply(this, arguments);
1447 1312 _.extend(behaviors, {
@@ -1460,9 +1325,9 @@
1460 1325 preventInit: true
1461 1326 };
1462 1327 },
1463 1328 getDroppableOptions: function getDroppableOptions() {
1464 - var _this7 = this;
1329 + var _this4 = this;
1465 1330 var items = '> .elementor-element, > .elementor-empty-view .elementor-first-add';
1466 1331 return {
1467 1332 axis: null,
1468 1333 items: items,
@@ -1472,9 +1337,9 @@
1472 1337 currentElementClass: 'elementor-html5dnd-current-element',
1473 1338 placeholderClass: 'elementor-sortable-placeholder elementor-widget-placeholder',
1474 1339 hasDraggingOnChildClass: 'e-dragging-over',
1475 1340 getDropContainer: function getDropContainer() {
1476 - return _this7.getContainer();
1341 + return _this4.getContainer();
1477 1342 },
1478 1343 onDropping: function onDropping(side, event) {
1479 1344 event.stopPropagation();
1480 1345
@@ -1484,14 +1349,14 @@
1484 1349 draggedElement = draggedView === null || draggedView === void 0 ? void 0 : draggedView.getContainer().view.el,
1485 1350 containerElement = event.currentTarget.parentElement,
1486 1351 elements = Array.from((containerElement === null || containerElement === void 0 ? void 0 : containerElement.querySelectorAll(':scope > .elementor-element')) || []);
1487 1352 var targetIndex = elements.indexOf(event.currentTarget);
1488 - if (_this7.isPanelElement(draggedView, draggedElement)) {
1353 + if (_this4.isPanelElement(draggedView, draggedElement)) {
1489 1354 var _elementorCommon;
1490 - if (_this7.draggingOnBottomOrRightSide(side) && !_this7.emptyViewIsCurrentlyBeingDraggedOver()) {
1355 + if (_this4.draggingOnBottomOrRightSide(side) && !_this4.emptyViewIsCurrentlyBeingDraggedOver()) {
1491 1356 targetIndex++;
1492 1357 }
1493 - _this7.onDrop(event, {
1358 + _this4.onDrop(event, {
1494 1359 at: targetIndex
1495 1360 });
1496 1361 if ((_elementorCommon = elementorCommon) !== null && _elementorCommon !== void 0 && (_elementorCommon = _elementorCommon.eventsManager) !== null && _elementorCommon !== void 0 && _elementorCommon.dispatchEvent) {
1497 1362 var selectedElement = elementor.channels.panelElements.request('element:selected');
@@ -1509,16 +1374,16 @@
1509 1374 }
1510 1375 }
1511 1376 return;
1512 1377 }
1513 - if (_this7.isParentElement(draggedView.getContainer().id)) {
1378 + if (_this4.isParentElement(draggedView.getContainer().id)) {
1514 1379 return;
1515 1380 }
1516 - if (_this7.emptyViewIsCurrentlyBeingDraggedOver()) {
1517 - _this7.moveDroppedItem(draggedView, 0);
1381 + if (_this4.emptyViewIsCurrentlyBeingDraggedOver()) {
1382 + _this4.moveDroppedItem(draggedView, 0);
1518 1383 return;
1519 1384 }
1520 - _this7.moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement);
1385 + _this4.moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement);
1521 1386 }
1522 1387 };
1523 1388 },
1524 1389 moveExistingElement: function moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement) {
@@ -1636,8 +1501,26 @@
1636 1501 });
1637 1502 });
1638 1503 this.addSectionView = addSectionView;
1639 1504 },
1505 + getClasses: function getClasses() {
1506 + var _window, _window$get, _this$options;
1507 + 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');
1508 + if (!transformer) {
1509 + return [];
1510 + }
1511 + 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) || []);
1512 + },
1513 + getClassString: function getClassString() {
1514 + var classes = this.getClasses();
1515 + var base = this.getBaseClass();
1516 + return [base].concat((0, _toConsumableArray2.default)(classes)).join(' ');
1517 + },
1518 + getBaseClass: function getBaseClass() {
1519 + var _this$options2, _Object$keys$;
1520 + var baseStyles = elementor.helpers.getAtomicWidgetBaseStyles((_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.model);
1521 + return (_Object$keys$ = Object.keys(baseStyles !== null && baseStyles !== void 0 ? baseStyles : {})[0]) !== null && _Object$keys$ !== void 0 ? _Object$keys$ : '';
1522 + },
1640 1523 isOverflowHidden: function isOverflowHidden() {
1641 1524 var elementStyles = window.getComputedStyle(this.el);
1642 1525 var overflowStyles = [elementStyles.overflowX, elementStyles.overflowY, elementStyles.overflow];
1643 1526 return overflowStyles.includes('hidden') || overflowStyles.includes('auto');
@@ -1657,17 +1540,9 @@
1657 1540 isTopLevelElement: function isTopLevelElement() {
1658 1541 return this.container.parent && 'document' === this.container.parent.id;
1659 1542 },
1660 1543 isFirstElementInStructure: function isFirstElementInStructure() {
1661 - if (!this.model.collection) {
1662 - return true;
1663 - }
1664 1544 return 0 === this.model.collection.indexOf(this.model);
1665 - },
1666 - getInteractionId: function getInteractionId() {
1667 - var originId = this.model.get('originId');
1668 - var id = this.model.get('id');
1669 - return originId !== null && originId !== void 0 ? originId : id;
1670 1545 }
1671 1546 });
1672 1547 return AtomicElementView;
1673 1548 }
@@ -1871,13 +1746,25 @@
1871 1746 value: true
1872 1747 }));
1873 1748 exports.getElementChildren = getElementChildren;
1874 1749 var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js"));
1750 +/**
1751 + * @typedef {import('assets/dev/js/editor/container/container')} Container
1752 + */
1753 +
1754 +/**
1755 + * return all recursively nested elements in a flat array
1756 + *
1757 + * @param {Container} model
1758 + * @return {Container[]}
1759 + */
1875 1760 function getElementChildren(model) {
1876 - var _model$get$models, _model$get;
1877 - var childModels = (_model$get$models = model === null || model === void 0 || (_model$get = model.get('elements')) === null || _model$get === void 0 ? void 0 : _model$get.models) !== null && _model$get$models !== void 0 ? _model$get$models : [];
1878 - var children = childModels.flatMap(getElementChildren);
1879 - return [model].concat((0, _toConsumableArray2.default)(children));
1761 + var _flatMap, _container$model$get$, _container$model;
1762 + var container = window.elementor.getContainer(model.id);
1763 + 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) {
1764 + return getElementChildren(child);
1765 + })) !== null && _flatMap !== void 0 ? _flatMap : [];
1766 + return [container].concat((0, _toConsumableArray2.default)(children));
1880 1767 }
1881 1768
1882 1769 /***/ }),
1883 1770
@@ -1933,35 +1820,38 @@
1933 1820 var _getElementChildren = __webpack_require__(/*! ./get-element-children */ "../modules/atomic-widgets/assets/js/editor/utils/get-element-children.js");
1934 1821 var _getRandomStyleId = __webpack_require__(/*! ./get-random-style-id */ "../modules/atomic-widgets/assets/js/editor/utils/get-random-style-id.js");
1935 1822 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; }
1936 1823 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; }
1937 -function regenerateLocalStyleIds(container) {
1938 - var allElements = (0, _getElementChildren.getElementChildren)(container.model);
1939 - var styledElements = allElements.filter(function (model) {
1940 - var _model$get;
1941 - return Object.keys((_model$get = model.get('styles')) !== null && _model$get !== void 0 ? _model$get : {}).length > 0;
1942 - });
1943 - updateElementsStyleIdsInsideOut(styledElements);
1944 -}
1824 +/**
1825 + * @typedef {import('assets/dev/js/editor/container/container')} Container
1826 + */
1827 +
1945 1828 function isClassesProp(prop) {
1946 1829 return prop.$$type && 'classes' === prop.$$type && Array.isArray(prop.value) && prop.value.length > 0;
1947 1830 }
1948 -function calculateNewStylesAndSettings(element, model, settings) {
1949 - var _settings$toJSON;
1950 - var originalStyles = model.get('styles');
1951 - var settingsJson = (_settings$toJSON = settings === null || settings === void 0 ? void 0 : settings.toJSON()) !== null && _settings$toJSON !== void 0 ? _settings$toJSON : {};
1952 - var classesProps = Object.entries(settingsJson).filter(function (_ref) {
1831 +
1832 +/**
1833 + * Update the style id of the container.
1834 + *
1835 + * @param {Container} container
1836 + */
1837 +function updateStyleId(container) {
1838 + var _container$settings$t, _container$settings;
1839 + var originalStyles = container.model.get('styles');
1840 + 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 : {};
1841 + var classesProps = Object.entries(settings).filter(function (_ref) {
1953 1842 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
1954 1843 propValue = _ref2[1];
1955 1844 return isClassesProp(propValue);
1956 1845 });
1957 1846 var newStyles = {};
1958 - var changedIds = {};
1847 + var changedIds = {}; // Conversion map - {[originalId: string]: newId: string}
1848 +
1959 1849 Object.entries(originalStyles).forEach(function (_ref3) {
1960 1850 var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
1961 1851 originalStyleId = _ref4[0],
1962 1852 style = _ref4[1];
1963 - var newStyleId = (0, _getRandomStyleId.getRandomStyleId)(element, newStyles);
1853 + var newStyleId = (0, _getRandomStyleId.getRandomStyleId)(container, newStyles);
1964 1854 newStyles[newStyleId] = structuredClone(_objectSpread(_objectSpread({}, style), {}, {
1965 1855 id: newStyleId
1966 1856 }));
1967 1857 changedIds[originalStyleId] = newStyleId;
@@ -1976,59 +1866,35 @@
1976 1866 return (_changedIds$className = changedIds[className]) !== null && _changedIds$className !== void 0 ? _changedIds$className : className;
1977 1867 })
1978 1868 })];
1979 1869 }, {});
1980 - return {
1981 - newStyles: newStyles,
1982 - newSettings: Object.fromEntries(newClassesProps)
1983 - };
1984 -}
1985 -function updateStyleIdForContainer(container) {
1986 - var model = container.model,
1987 - settings = container.settings;
1988 - var _calculateNewStylesAn = calculateNewStylesAndSettings(container, model, settings),
1989 - newStyles = _calculateNewStylesAn.newStyles,
1990 - newSettings = _calculateNewStylesAn.newSettings;
1870 +
1871 + // Update classes array
1991 1872 $e.internal('document/elements/set-settings', {
1992 1873 container: container,
1993 - settings: newSettings
1874 + settings: Object.fromEntries(newClassesProps)
1994 1875 });
1995 - model.set('styles', newStyles);
1996 -}
1997 -function updateStyleIdForModel(model) {
1998 - var settings = model.get('settings');
1999 - var _calculateNewStylesAn2 = calculateNewStylesAndSettings(model, model, settings),
2000 - newStyles = _calculateNewStylesAn2.newStyles,
2001 - newSettings = _calculateNewStylesAn2.newSettings;
2002 - settings.set(newSettings);
2003 - model.set('styles', newStyles);
2004 -}
2005 -function updateStyleId(model) {
2006 - var container = window.elementor.getContainer(model.get('id'));
2007 1876
2008 - // If view exists, update the styles via the container
2009 - if (container) {
2010 - updateStyleIdForContainer(container);
2011 - return;
2012 - }
2013 - updateStyleIdForModel(model);
1877 + // Update local styles
1878 + container.model.set('styles', newStyles);
2014 1879 }
2015 1880 function updateElementsStyleIdsInsideOut(styledElements) {
2016 1881 styledElements === null || styledElements === void 0 || styledElements.reverse().forEach(updateStyleId);
2017 1882 }
2018 1883
2019 -/***/ }),
2020 -
2021 -/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js":
2022 -/*!***************************************************************!*\
2023 - !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***!
2024 - \***************************************************************/
2025 -/***/ ((module) => {
2026 -
2027 -function _OverloadYield(e, d) {
2028 - this.v = e, this.k = d;
1884 +/**
1885 + * Get a container - iterate over its children, find all styled atomic widgets and update their style ids
1886 + *
1887 + * @param {Container} container
1888 + */
1889 +function regenerateLocalStyleIds(container) {
1890 + var allElements = (0, _getElementChildren.getElementChildren)(container);
1891 + var styledElements = allElements.filter(function (element) {
1892 + var _element$model$get;
1893 + return Object.keys((_element$model$get = element.model.get('styles')) !== null && _element$model$get !== void 0 ? _element$model$get : {}).length > 0;
1894 + });
1895 + updateElementsStyleIdsInsideOut(styledElements);
2029 1896 }
2030 -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;
2031 1897
2032 1898 /***/ }),
2033 1899
2034 1900 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
@@ -2086,43 +1952,8 @@
2086 1952 module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
2087 1953
2088 1954 /***/ }),
2089 1955
2090 -/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
2091 -/*!******************************************************************!*\
2092 - !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
2093 - \******************************************************************/
2094 -/***/ ((module) => {
2095 -
2096 -function asyncGeneratorStep(n, t, e, r, o, a, c) {
2097 - try {
2098 - var i = n[a](c),
2099 - u = i.value;
2100 - } catch (n) {
2101 - return void e(n);
2102 - }
2103 - i.done ? t(u) : Promise.resolve(u).then(r, o);
2104 -}
2105 -function _asyncToGenerator(n) {
2106 - return function () {
2107 - var t = this,
2108 - e = arguments;
2109 - return new Promise(function (r, o) {
2110 - var a = n.apply(t, e);
2111 - function _next(n) {
2112 - asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
2113 - }
2114 - function _throw(n) {
2115 - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
2116 - }
2117 - _next(void 0);
2118 - });
2119 - };
2120 -}
2121 -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
2122 -
2123 -/***/ }),
2124 -
2125 1956 /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
2126 1957 /*!****************************************************************!*\
2127 1958 !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
2128 1959 \****************************************************************/
@@ -2341,344 +2172,8 @@
2341 2172 module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
2342 2173
2343 2174 /***/ }),
2344 2175
2345 -/***/ "../node_modules/@babel/runtime/helpers/regenerator.js":
2346 -/*!*************************************************************!*\
2347 - !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***!
2348 - \*************************************************************/
2349 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2350 -
2351 -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js");
2352 -function _regenerator() {
2353 - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
2354 - var e,
2355 - t,
2356 - r = "function" == typeof Symbol ? Symbol : {},
2357 - n = r.iterator || "@@iterator",
2358 - o = r.toStringTag || "@@toStringTag";
2359 - function i(r, n, o, i) {
2360 - var c = n && n.prototype instanceof Generator ? n : Generator,
2361 - u = Object.create(c.prototype);
2362 - return regeneratorDefine(u, "_invoke", function (r, n, o) {
2363 - var i,
2364 - c,
2365 - u,
2366 - f = 0,
2367 - p = o || [],
2368 - y = !1,
2369 - G = {
2370 - p: 0,
2371 - n: 0,
2372 - v: e,
2373 - a: d,
2374 - f: d.bind(e, 4),
2375 - d: function d(t, r) {
2376 - return i = t, c = 0, u = e, G.n = r, a;
2377 - }
2378 - };
2379 - function d(r, n) {
2380 - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
2381 - var o,
2382 - i = p[t],
2383 - d = G.p,
2384 - l = i[2];
2385 - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
2386 - }
2387 - if (o || r > 1) return a;
2388 - throw y = !0, n;
2389 - }
2390 - return function (o, p, l) {
2391 - if (f > 1) throw TypeError("Generator is already running");
2392 - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
2393 - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
2394 - try {
2395 - if (f = 2, i) {
2396 - if (c || (o = "next"), t = i[o]) {
2397 - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
2398 - if (!t.done) return t;
2399 - u = t.value, c < 2 && (c = 0);
2400 - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
2401 - i = e;
2402 - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
2403 - } catch (t) {
2404 - i = e, c = 1, u = t;
2405 - } finally {
2406 - f = 1;
2407 - }
2408 - }
2409 - return {
2410 - value: t,
2411 - done: y
2412 - };
2413 - };
2414 - }(r, o, i), !0), u;
2415 - }
2416 - var a = {};
2417 - function Generator() {}
2418 - function GeneratorFunction() {}
2419 - function GeneratorFunctionPrototype() {}
2420 - t = Object.getPrototypeOf;
2421 - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {
2422 - return this;
2423 - }), t),
2424 - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
2425 - function f(e) {
2426 - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
2427 - }
2428 - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () {
2429 - return this;
2430 - }), regeneratorDefine(u, "toString", function () {
2431 - return "[object Generator]";
2432 - }), (module.exports = _regenerator = function _regenerator() {
2433 - return {
2434 - w: i,
2435 - m: f
2436 - };
2437 - }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
2438 -}
2439 -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
2440 -
2441 -/***/ }),
2442 -
2443 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js":
2444 -/*!******************************************************************!*\
2445 - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***!
2446 - \******************************************************************/
2447 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2448 -
2449 -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js");
2450 -function _regeneratorAsync(n, e, r, t, o) {
2451 - var a = regeneratorAsyncGen(n, e, r, t, o);
2452 - return a.next().then(function (n) {
2453 - return n.done ? n.value : a.next();
2454 - });
2455 -}
2456 -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports;
2457 -
2458 -/***/ }),
2459 -
2460 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js":
2461 -/*!*********************************************************************!*\
2462 - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***!
2463 - \*********************************************************************/
2464 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2465 -
2466 -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js");
2467 -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js");
2468 -function _regeneratorAsyncGen(r, e, t, o, n) {
2469 - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);
2470 -}
2471 -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports;
2472 -
2473 -/***/ }),
2474 -
2475 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js":
2476 -/*!**************************************************************************!*\
2477 - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***!
2478 - \**************************************************************************/
2479 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2480 -
2481 -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js");
2482 -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js");
2483 -function AsyncIterator(t, e) {
2484 - function n(r, o, i, f) {
2485 - try {
2486 - var c = t[r](o),
2487 - u = c.value;
2488 - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {
2489 - n("next", t, i, f);
2490 - }, function (t) {
2491 - n("throw", t, i, f);
2492 - }) : e.resolve(u).then(function (t) {
2493 - c.value = t, i(c);
2494 - }, function (t) {
2495 - return n("throw", t, i, f);
2496 - });
2497 - } catch (t) {
2498 - f(t);
2499 - }
2500 - }
2501 - var r;
2502 - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
2503 - return this;
2504 - })), regeneratorDefine(this, "_invoke", function (t, o, i) {
2505 - function f() {
2506 - return new e(function (e, r) {
2507 - n(t, i, e, r);
2508 - });
2509 - }
2510 - return r = r ? r.then(f, f) : f();
2511 - }, !0);
2512 -}
2513 -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports;
2514 -
2515 -/***/ }),
2516 -
2517 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js":
2518 -/*!*******************************************************************!*\
2519 - !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***!
2520 - \*******************************************************************/
2521 -/***/ ((module) => {
2522 -
2523 -function _regeneratorDefine(e, r, n, t) {
2524 - var i = Object.defineProperty;
2525 - try {
2526 - i({}, "", {});
2527 - } catch (e) {
2528 - i = 0;
2529 - }
2530 - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {
2531 - function o(r, n) {
2532 - _regeneratorDefine(e, r, function (e) {
2533 - return this._invoke(r, n, e);
2534 - });
2535 - }
2536 - r ? i ? i(e, r, {
2537 - value: n,
2538 - enumerable: !t,
2539 - configurable: !t,
2540 - writable: !t
2541 - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
2542 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t);
2543 -}
2544 -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports;
2545 -
2546 -/***/ }),
2547 -
2548 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js":
2549 -/*!*****************************************************************!*\
2550 - !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***!
2551 - \*****************************************************************/
2552 -/***/ ((module) => {
2553 -
2554 -function _regeneratorKeys(e) {
2555 - var n = Object(e),
2556 - r = [];
2557 - for (var t in n) r.unshift(t);
2558 - return function e() {
2559 - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
2560 - return e.done = !0, e;
2561 - };
2562 -}
2563 -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports;
2564 -
2565 -/***/ }),
2566 -
2567 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
2568 -/*!********************************************************************!*\
2569 - !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
2570 - \********************************************************************/
2571 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2572 -
2573 -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js");
2574 -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js");
2575 -var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js");
2576 -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js");
2577 -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js");
2578 -var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js");
2579 -var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js");
2580 -function _regeneratorRuntime() {
2581 - "use strict";
2582 -
2583 - var r = regenerator(),
2584 - e = r.m(_regeneratorRuntime),
2585 - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
2586 - function n(r) {
2587 - var e = "function" == typeof r && r.constructor;
2588 - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
2589 - }
2590 - var o = {
2591 - "throw": 1,
2592 - "return": 2,
2593 - "break": 3,
2594 - "continue": 3
2595 - };
2596 - function a(r) {
2597 - var e, t;
2598 - return function (n) {
2599 - e || (e = {
2600 - stop: function stop() {
2601 - return t(n.a, 2);
2602 - },
2603 - "catch": function _catch() {
2604 - return n.v;
2605 - },
2606 - abrupt: function abrupt(r, e) {
2607 - return t(n.a, o[r], e);
2608 - },
2609 - delegateYield: function delegateYield(r, o, a) {
2610 - return e.resultName = o, t(n.d, regeneratorValues(r), a);
2611 - },
2612 - finish: function finish(r) {
2613 - return t(n.f, r);
2614 - }
2615 - }, t = function t(r, _t, o) {
2616 - n.p = e.prev, n.n = e.next;
2617 - try {
2618 - return r(_t, o);
2619 - } finally {
2620 - e.next = n.n;
2621 - }
2622 - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
2623 - try {
2624 - return r.call(this, e);
2625 - } finally {
2626 - n.p = e.prev, n.n = e.next;
2627 - }
2628 - };
2629 - }
2630 - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
2631 - return {
2632 - wrap: function wrap(e, t, n, o) {
2633 - return r.w(a(e), t, n, o && o.reverse());
2634 - },
2635 - isGeneratorFunction: n,
2636 - mark: r.m,
2637 - awrap: function awrap(r, e) {
2638 - return new OverloadYield(r, e);
2639 - },
2640 - AsyncIterator: regeneratorAsyncIterator,
2641 - async: function async(r, e, t, o, u) {
2642 - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
2643 - },
2644 - keys: regeneratorKeys,
2645 - values: regeneratorValues
2646 - };
2647 - }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
2648 -}
2649 -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
2650 -
2651 -/***/ }),
2652 -
2653 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js":
2654 -/*!*******************************************************************!*\
2655 - !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***!
2656 - \*******************************************************************/
2657 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2658 -
2659 -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
2660 -function _regeneratorValues(e) {
2661 - if (null != e) {
2662 - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
2663 - r = 0;
2664 - if (t) return t.call(e);
2665 - if ("function" == typeof e.next) return e;
2666 - if (!isNaN(e.length)) return {
2667 - next: function next() {
2668 - return e && r >= e.length && (e = void 0), {
2669 - value: e && e[r++],
2670 - done: !e
2671 - };
2672 - }
2673 - };
2674 - }
2675 - throw new TypeError(_typeof(e) + " is not iterable");
2676 -}
2677 -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports;
2678 -
2679 -/***/ }),
2680 -
2681 2176 /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
2682 2177 /*!****************************************************************!*\
2683 2178 !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
2684 2179 \****************************************************************/
@@ -2815,33 +2310,8 @@
2815 2310 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2816 2311
2817 2312 /***/ }),
2818 2313
2819 -/***/ "../node_modules/@babel/runtime/regenerator/index.js":
2820 -/*!***********************************************************!*\
2821 - !*** ../node_modules/@babel/runtime/regenerator/index.js ***!
2822 - \***********************************************************/
2823 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2824 -
2825 -// TODO(Babel 8): Remove this file.
2826 -
2827 -var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();
2828 -module.exports = runtime;
2829 -
2830 -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
2831 -try {
2832 - regeneratorRuntime = runtime;
2833 -} catch (accidentalStrictMode) {
2834 - if (typeof globalThis === "object") {
2835 - globalThis.regeneratorRuntime = runtime;
2836 - } else {
2837 - Function("r", "regeneratorRuntime = r")(runtime);
2838 - }
2839 -}
2840 -
2841 -
2842 -/***/ }),
2843 -
2844 2314 /***/ "../node_modules/react-dom/client.js":
2845 2315 /*!*******************************************!*\
2846 2316 !*** ../node_modules/react-dom/client.js ***!
2847 2317 \*******************************************/
@@ -2955,8 +2425,13 @@
2955 2425 var _createAtomicElementBaseView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-element-base-view */ "../modules/atomic-widgets/assets/js/editor/create-atomic-element-base-view.js"));
2956 2426 var _atomicElementBaseModel = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-base-model */ "../modules/atomic-widgets/assets/js/editor/atomic-element-base-model.js"));
2957 2427 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"));
2958 2428 var _createFlexboxType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/create-flexbox-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-flexbox-type.js"));
2429 +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"));
2430 +var _createAtomicTabPanelType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/atomic-tab-panel/create-atomic-tab-panel-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/atomic-tab-panel/create-atomic-tab-panel-type.js"));
2431 +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"));
2432 +var _createAtomicTabsListType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/create-atomic-tabs-list-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-atomic-tabs-list-type.js"));
2433 +var _createAtomicTabsContentType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/create-atomic-tabs-content-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-atomic-tabs-content-type.js"));
2959 2434 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)); }
2960 2435 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
2961 2436 var Module = /*#__PURE__*/function (_elementorModules$edi) {
2962 2437 function Module() {
@@ -2980,10 +2455,18 @@
2980 2455 }
2981 2456 }, {
2982 2457 key: "registerAtomicElements",
2983 2458 value: function registerAtomicElements() {
2459 + var nestedElementsExperiment = 'e_nested_elements';
2984 2460 elementor.elementsManager.registerElementType((0, _createDivBlockType.default)());
2985 2461 elementor.elementsManager.registerElementType((0, _createFlexboxType.default)());
2462 + if (elementorCommon.config.experimentalFeatures[nestedElementsExperiment]) {
2463 + elementor.elementsManager.registerElementType((0, _createAtomicTabsType.default)());
2464 + elementor.elementsManager.registerElementType((0, _createAtomicTabPanelType.default)());
2465 + elementor.elementsManager.registerElementType((0, _createAtomicTabType.default)());
2466 + elementor.elementsManager.registerElementType((0, _createAtomicTabsListType.default)());
2467 + elementor.elementsManager.registerElementType((0, _createAtomicTabsContentType.default)());
2468 + }
2986 2469 }
2987 2470 }]);
2988 2471 }(elementorModules.editor.utils.Module);
2989 2472 new Module();