PluginProbe
Elementor Website Builder – more than just a page builder / 3.28.0-dev2
Elementor Website Builder – more than just a page builder v3.28.0-dev2
4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 All 454 releases
← All changes | assets/js/atomic-widgets-editor.js +624 -1810 4.2.0-beta1 → 3.28.0-dev2 View file →
@@ -1,4 +1,5 @@
1 +/*! elementor - v3.28.0 - 10-03-2025 */
1 2 /******/ (() => { // webpackBootstrap
2 3 /******/ var __webpack_modules__ = ({
3 4
4 5 /***/ "../assets/dev/js/editor/elements/views/behaviors/sortable.js":
@@ -194,12 +195,9 @@
194 195 if (undefined === newIndex) {
195 196 newIndex = ui.item.index();
196 197 }
197 198 var child = elementor.channels.data.request('dragging:view').getContainer();
198 - var result = this.moveChild(child, newIndex);
199 - if (!result) {
200 - jQuery(ui.sender).sortable('cancel');
201 - }
199 + this.moveChild(child, newIndex);
202 200 },
203 201 // On receiving element from another container
204 202 receiveSort: function receiveSort(event, ui, newIndex) {
205 203 event.stopPropagation();
@@ -218,12 +216,9 @@
218 216 if (undefined === newIndex) {
219 217 newIndex = ui.item.index();
220 218 }
221 219 var child = elementor.channels.data.request('dragging:view').getContainer();
222 - var result = this.moveChild(child, newIndex);
223 - if (!result) {
224 - jQuery(ui.sender).sortable('cancel');
225 - }
220 + this.moveChild(child, newIndex);
226 221 },
227 222 onSortStart: function onSortStart(event, ui) {
228 223 if ('column' === this.options.elChildType) {
229 224 var uiData = ui.item.data('sortableItem'),
@@ -271,12 +266,12 @@
271 266 *
272 267 * @param {Container} child - The child container to move.
273 268 * @param {number|string} index - New index.
274 269 *
275 - * @return {Container|boolean}
270 + * @return {void}
276 271 */
277 272 moveChild: function moveChild(child, index) {
278 - return $e.run('document/elements/move', {
273 + $e.run('document/elements/move', {
279 274 container: child,
280 275 target: this.view.getContainer(),
281 276 options: {
282 277 at: index
@@ -302,490 +297,23 @@
302 297 value: true
303 298 }));
304 299 exports["default"] = EmptyComponent;
305 300 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 301 /* eslint-disable jsx-a11y/no-static-element-interactions */
308 302 /* eslint-disable jsx-a11y/click-events-have-key-events */
309 -
310 303 function EmptyComponent() {
311 - var handleClick = function handleClick() {
312 - _editorOneEvents.EditorOneEventManager.sendCanvasEmptyBoxAction({
313 - targetName: 'add_container'
314 - });
315 - $e.route('panel/elements/categories');
316 - };
317 304 return /*#__PURE__*/_react.default.createElement("div", {
318 305 className: "elementor-first-add"
319 306 }, /*#__PURE__*/_react.default.createElement("div", {
320 307 className: "elementor-icon eicon-plus",
321 - onClick: handleClick
308 + onClick: function onClick() {
309 + return $e.route('panel/elements/categories');
310 + }
322 311 }));
323 312 }
324 313
325 314 /***/ }),
326 315
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 -/***/ "../assets/dev/js/editor/utils/element-types.js":
766 -/*!******************************************************!*\
767 - !*** ../assets/dev/js/editor/utils/element-types.js ***!
768 - \******************************************************/
769 -/***/ ((module) => {
770 -
771 -"use strict";
772 -
773 -
774 -/**
775 - * Returns an array of all available element types.
776 - *
777 - * @return {string[]} Array of element type strings.
778 - */
779 -var getAllElementTypes = function getAllElementTypes() {
780 - return Object.keys(elementor.getConfig().elements);
781 -};
782 -module.exports = {
783 - getAllElementTypes: getAllElementTypes
784 -};
785 -
786 -/***/ }),
787 -
788 316 /***/ "../assets/dev/js/utils/react.js":
789 317 /*!***************************************!*\
790 318 !*** ../assets/dev/js/utils/react.js ***!
791 319 \***************************************/
@@ -801,9 +329,10 @@
801 329 exports["default"] = void 0;
802 330 var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
803 331 var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom"));
804 332 var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js");
805 -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
333 +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
334 +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
806 335 /**
807 336 * Support conditional rendering of a React App to the DOM, based on the React version.
808 337 * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions.
809 338 *
@@ -837,12 +366,12 @@
837 366 };
838 367
839 368 /***/ }),
840 369
841 -/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-base-model.js":
842 -/*!*******************************************************************************!*\
843 - !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-base-model.js ***!
844 - \*******************************************************************************/
370 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-widget-type.js":
371 +/*!************************************************************************!*\
372 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-widget-type.js ***!
373 + \************************************************************************/
845 374 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
846 375
847 376 "use strict";
848 377
@@ -850,105 +379,52 @@
850 379 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
851 380 Object.defineProperty(exports, "__esModule", ({
852 381 value: true
853 382 }));
854 -exports["default"] = void 0;
383 +exports.AtomicWidgetType = void 0;
855 384 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
856 385 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
857 386 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
858 387 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
859 -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
860 388 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
389 +var _atomicWidgetView = __webpack_require__(/*! ./atomic-widget-view */ "../modules/atomic-widgets/assets/js/editor/atomic-widget-view.js");
861 390 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)); }
862 391 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
863 -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; }
864 -var AtomicElementBaseModel = exports["default"] = /*#__PURE__*/function (_elementor$modules$el) {
865 - function AtomicElementBaseModel() {
866 - (0, _classCallCheck2.default)(this, AtomicElementBaseModel);
867 - return _callSuper(this, AtomicElementBaseModel, arguments);
392 +function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
393 +function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
394 +function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
395 +function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
396 +function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
397 +var _type = /*#__PURE__*/new WeakMap();
398 +var AtomicWidgetType = exports.AtomicWidgetType = /*#__PURE__*/function (_elementor$modules$el) {
399 + function AtomicWidgetType(type) {
400 + var _this;
401 + (0, _classCallCheck2.default)(this, AtomicWidgetType);
402 + _this = _callSuper(this, AtomicWidgetType);
403 + _classPrivateFieldInitSpec(_this, _type, void 0);
404 + _classPrivateFieldSet(_type, _this, type);
405 + return _this;
868 406 }
869 - (0, _inherits2.default)(AtomicElementBaseModel, _elementor$modules$el);
870 - return (0, _createClass2.default)(AtomicElementBaseModel, [{
871 - key: "isValidChild",
872 - value:
873 - /**
874 - * Do not allow section, column or container be placed in the Atomic container.
875 - *
876 - * @param {*} childModel
877 - */
878 - function isValidChild(childModel) {
879 - var elType = childModel.get('elType');
880 - return 'section' !== elType && 'column' !== elType;
407 + (0, _inherits2.default)(AtomicWidgetType, _elementor$modules$el);
408 + return (0, _createClass2.default)(AtomicWidgetType, [{
409 + key: "getType",
410 + value: function getType() {
411 + return _classPrivateFieldGet(_type, this);
881 412 }
882 413 }, {
883 - key: "initialize",
884 - value: function initialize(attributes, options) {
885 - var _this$config;
886 - var elementType = this.get('elType');
887 - 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 - var isNewElementCreate = 0 === this.get('elements').length && $e.commands.currentTrace.includes('document/elements/create');
892 - if (isNewElementCreate) {
893 - this.onElementCreate();
894 - }
895 - _superPropGet(AtomicElementBaseModel, "initialize", this, 3)([attributes, options]);
414 + key: "getView",
415 + value: function getView() {
416 + return _atomicWidgetView.AtomicWidgetView;
896 417 }
897 - }, {
898 - key: "getDefaultChildren",
899 - value: function getDefaultChildren() {
900 - var defaultChildren = this.config.default_children;
901 - return this.modifyDefaultChildren(defaultChildren);
902 - }
903 - }, {
904 - key: "onElementCreate",
905 - value: function onElementCreate() {
906 - var _this = this;
907 - if (this.get('skipDefaultChildren')) {
908 - this.unset('skipDefaultChildren', {
909 - silent: true
910 - });
911 - return;
912 - }
913 - this.set('elements', this.getDefaultChildren().map(function (element) {
914 - return _this.buildElement(element);
915 - }));
916 - }
917 - }, {
918 - key: "modifyDefaultChildren",
919 - value: function modifyDefaultChildren(element) {
920 - return element;
921 - }
922 - }, {
923 - key: "buildElement",
924 - value: function buildElement(element) {
925 - var _this2 = this,
926 - _element$settings;
927 - var id = elementorCommon.helpers.getUniqueId();
928 - var elements = (element.elements || []).map(function (el) {
929 - return _this2.buildElement(el);
930 - });
931 - return {
932 - elType: element.elType,
933 - widgetType: element.widgetType,
934 - id: id,
935 - settings: (_element$settings = element.settings) !== null && _element$settings !== void 0 ? _element$settings : {},
936 - elements: elements,
937 - isLocked: element.isLocked || false,
938 - editor_settings: element.editor_settings || {},
939 - meta: element.meta || {}
940 - };
941 - }
942 418 }]);
943 -}(elementor.modules.elements.models.Element);
419 +}(elementor.modules.elements.types.Widget);
944 420
945 421 /***/ }),
946 422
947 -/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-base-type.js":
948 -/*!******************************************************************************!*\
949 - !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-base-type.js ***!
950 - \******************************************************************************/
423 +/***/ "../modules/atomic-widgets/assets/js/editor/atomic-widget-view.js":
424 +/*!************************************************************************!*\
425 + !*** ../modules/atomic-widgets/assets/js/editor/atomic-widget-view.js ***!
426 + \************************************************************************/
951 427 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
952 428
953 429 "use strict";
954 430
@@ -956,118 +432,109 @@
956 432 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
957 433 Object.defineProperty(exports, "__esModule", ({
958 434 value: true
959 435 }));
960 -exports["default"] = void 0;
436 +exports.AtomicWidgetView = void 0;
437 +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
438 +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
961 439 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
962 440 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
963 441 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
964 442 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
443 +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
965 444 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
445 +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; }
446 +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; }
966 447 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)); }
967 448 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
968 -var AtomicElementBaseType = exports["default"] = /*#__PURE__*/function (_elementor$modules$el) {
969 - function AtomicElementBaseType(elementType, viewClass) {
449 +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; }
450 +function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
451 +function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
452 +function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
453 +var _AtomicWidgetView_brand = /*#__PURE__*/new WeakSet();
454 +var AtomicWidgetView = exports.AtomicWidgetView = /*#__PURE__*/function (_elementor$modules$el) {
455 + function AtomicWidgetView() {
970 456 var _this;
971 - var modelClass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
972 - var emptyViewClass = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
973 - (0, _classCallCheck2.default)(this, AtomicElementBaseType);
974 - _this = _callSuper(this, AtomicElementBaseType);
975 - _this.elementType = elementType;
976 - _this.viewClass = viewClass;
977 - _this.modelClass = modelClass;
978 - _this.emptyViewClass = emptyViewClass;
457 + (0, _classCallCheck2.default)(this, AtomicWidgetView);
458 + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
459 + args[_key] = arguments[_key];
460 + }
461 + _this = _callSuper(this, AtomicWidgetView, [].concat(args));
462 + _classPrivateMethodInitSpec(_this, _AtomicWidgetView_brand);
979 463 return _this;
980 464 }
981 - (0, _inherits2.default)(AtomicElementBaseType, _elementor$modules$el);
982 - return (0, _createClass2.default)(AtomicElementBaseType, [{
983 - key: "getType",
984 - value: function getType() {
985 - return this.elementType;
465 + (0, _inherits2.default)(AtomicWidgetView, _elementor$modules$el);
466 + return (0, _createClass2.default)(AtomicWidgetView, [{
467 + key: "onRender",
468 + value:
469 + // Dispatch `render` event so the overlay layer will be updated
470 + function onRender() {
471 + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
472 + args[_key2] = arguments[_key2];
473 + }
474 + _superPropGet(AtomicWidgetView, "onRender", this, 3)(args);
475 + _assertClassBrand(_AtomicWidgetView_brand, this, _dispatchEvent).call(this, 'elementor/preview/atomic-widget/render');
986 476 }
477 +
478 + // Dispatch `destroy` event so the overlay layer will be updated
987 479 }, {
988 - key: "getView",
989 - value: function getView() {
990 - return this.viewClass;
480 + key: "onDestroy",
481 + value: function onDestroy() {
482 + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
483 + args[_key3] = arguments[_key3];
484 + }
485 + _superPropGet(AtomicWidgetView, "onDestroy", this, 3)(args);
486 + _assertClassBrand(_AtomicWidgetView_brand, this, _dispatchEvent).call(this, 'elementor/preview/atomic-widget/destroy');
991 487 }
488 +
489 + // Removes behaviors that are not needed for atomic widgets (that are implemented in the overlay layer).
992 490 }, {
993 - key: "getEmptyView",
994 - value: function getEmptyView() {
995 - return this.emptyViewClass || elementor.modules.elements.views.EmptyComponent;
491 + key: "behaviors",
492 + value: function behaviors() {
493 + var disabledBehaviors = ['InlineEditing', 'Draggable', 'Resizable'];
494 + var behaviorsAsEntries = Object.entries(_superPropGet(AtomicWidgetView, "behaviors", this, 3)([])).filter(function (_ref) {
495 + var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
496 + key = _ref2[0];
497 + return !disabledBehaviors.includes(key);
498 + });
499 + return Object.fromEntries(behaviorsAsEntries);
996 500 }
501 +
502 + // Change the drag handle because the $el is not the draggable element (`display: contents`).
997 503 }, {
998 - key: "getModel",
999 - value: function getModel() {
1000 - return this.modelClass || elementor.modules.elements.models.AtomicElementBase;
504 + key: "getDraggableElement",
505 + value: function getDraggableElement() {
506 + return this.$el.find(':first-child');
1001 507 }
508 +
509 + // Remove the overlay, so we can use the new overlay layer.
510 + }, {
511 + key: "getHandlesOverlay",
512 + value: function getHandlesOverlay() {
513 + return null;
514 + }
515 + }, {
516 + key: "attributes",
517 + value: function attributes() {
518 + return _objectSpread(_objectSpread({}, _superPropGet(AtomicWidgetView, "attributes", this, 3)([])), {}, {
519 + // Mark the widget as atomic, so the overlay layer can identify it.
520 + 'data-atomic': '',
521 + // Make the wrapper non-existent in terms of CSS to mimic the frontend DOM tree.
522 + style: 'display: contents !important;'
523 + });
524 + }
1002 525 }]);
1003 -}(elementor.modules.elements.types.Base);
526 +}(elementor.modules.elements.views.Widget);
527 +function _dispatchEvent(type) {
528 + window.top.dispatchEvent(new CustomEvent(type, {
529 + detail: {
530 + id: this.model.get('id')
531 + }
532 + }));
533 +}
1004 534
1005 535 /***/ }),
1006 536
1007 -/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-div-block-type.js":
1008 -/*!************************************************************************************************!*\
1009 - !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-div-block-type.js ***!
1010 - \************************************************************************************************/
1011 -/***/ ((__unused_webpack_module, exports) => {
1012 -
1013 -"use strict";
1014 -
1015 -
1016 -Object.defineProperty(exports, "__esModule", ({
1017 - value: true
1018 -}));
1019 -exports["default"] = void 0;
1020 -var createDivBlockType = function createDivBlockType() {
1021 - var DivBlockView = elementor.modules.elements.views.createAtomicElementBase('e-div-block');
1022 - return new elementor.modules.elements.types.AtomicElementBase('e-div-block', DivBlockView);
1023 -};
1024 -var _default = exports["default"] = createDivBlockType;
1025 -
1026 -/***/ }),
1027 -
1028 -/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-flexbox-type.js":
1029 -/*!**********************************************************************************************!*\
1030 - !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-flexbox-type.js ***!
1031 - \**********************************************************************************************/
1032 -/***/ ((__unused_webpack_module, exports) => {
1033 -
1034 -"use strict";
1035 -
1036 -
1037 -Object.defineProperty(exports, "__esModule", ({
1038 - value: true
1039 -}));
1040 -exports["default"] = void 0;
1041 -var createFlexboxType = function createFlexboxType() {
1042 - var FlexboxView = elementor.modules.elements.views.createAtomicElementBase('e-flexbox');
1043 - return new elementor.modules.elements.types.AtomicElementBase('e-flexbox', FlexboxView);
1044 -};
1045 -var _default = exports["default"] = createFlexboxType;
1046 -
1047 -/***/ }),
1048 -
1049 -/***/ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-grid-type.js":
1050 -/*!*******************************************************************************************!*\
1051 - !*** ../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-grid-type.js ***!
1052 - \*******************************************************************************************/
1053 -/***/ ((__unused_webpack_module, exports) => {
1054 -
1055 -"use strict";
1056 -
1057 -
1058 -Object.defineProperty(exports, "__esModule", ({
1059 - value: true
1060 -}));
1061 -exports["default"] = void 0;
1062 -var createGridType = function createGridType() {
1063 - var GridView = elementor.modules.elements.views.createAtomicElementBase('e-grid');
1064 - return new elementor.modules.elements.types.AtomicElementBase('e-grid', GridView);
1065 -};
1066 -var _default = exports["default"] = createGridType;
1067 -
1068 -/***/ }),
1069 -
1070 537 /***/ "../modules/atomic-widgets/assets/js/editor/component.js":
1071 538 /*!***************************************************************!*\
1072 539 !*** ../modules/atomic-widgets/assets/js/editor/component.js ***!
1073 540 \***************************************************************/
@@ -1087,9 +554,10 @@
1087 554 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1088 555 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1089 556 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1090 557 var hooks = _interopRequireWildcard(__webpack_require__(/*! ./hooks */ "../modules/atomic-widgets/assets/js/editor/hooks/index.js"));
1091 -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
558 +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
559 +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
1092 560 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)); }
1093 561 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1094 562 var Component = exports["default"] = /*#__PURE__*/function (_$e$modules$Component) {
1095 563 function Component() {
@@ -1111,12 +579,12 @@
1111 579 }($e.modules.ComponentBase);
1112 580
1113 581 /***/ }),
1114 582
1115 -/***/ "../modules/atomic-widgets/assets/js/editor/container/atomic-element-empty-view.js":
1116 -/*!*****************************************************************************************!*\
1117 - !*** ../modules/atomic-widgets/assets/js/editor/container/atomic-element-empty-view.js ***!
1118 - \*****************************************************************************************/
583 +/***/ "../modules/atomic-widgets/assets/js/editor/container/div-block-empty-view.js":
584 +/*!************************************************************************************!*\
585 + !*** ../modules/atomic-widgets/assets/js/editor/container/div-block-empty-view.js ***!
586 + \************************************************************************************/
1119 587 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1120 588
1121 589 "use strict";
1122 590
@@ -1136,23 +604,22 @@
1136 604 var _react2 = _interopRequireDefault(__webpack_require__(/*! elementor-utils/react */ "../assets/dev/js/utils/react.js"));
1137 605 var _emptyComponent = _interopRequireDefault(__webpack_require__(/*! elementor-elements/views/container/empty-component */ "../assets/dev/js/editor/elements/views/container/empty-component.js"));
1138 606 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)); }
1139 607 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1140 -var AtomicElementEmptyView = exports["default"] = /*#__PURE__*/function (_Marionette$ItemView) {
1141 - function AtomicElementEmptyView() {
608 +var DivBlockEmptyView = exports["default"] = /*#__PURE__*/function (_Marionette$ItemView) {
609 + function DivBlockEmptyView() {
1142 610 var _this;
1143 - (0, _classCallCheck2.default)(this, AtomicElementEmptyView);
611 + (0, _classCallCheck2.default)(this, DivBlockEmptyView);
1144 612 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1145 613 args[_key] = arguments[_key];
1146 614 }
1147 - _this = _callSuper(this, AtomicElementEmptyView, [].concat(args));
615 + _this = _callSuper(this, DivBlockEmptyView, [].concat(args));
1148 616 (0, _defineProperty2.default)(_this, "template", '<div></div>');
1149 617 (0, _defineProperty2.default)(_this, "className", 'elementor-empty-view');
1150 - (0, _defineProperty2.default)(_this, "unmount", null);
1151 618 return _this;
1152 619 }
1153 - (0, _inherits2.default)(AtomicElementEmptyView, _Marionette$ItemView);
1154 - return (0, _createClass2.default)(AtomicElementEmptyView, [{
620 + (0, _inherits2.default)(DivBlockEmptyView, _Marionette$ItemView);
621 + return (0, _createClass2.default)(DivBlockEmptyView, [{
1155 622 key: "renderReactDefaultElement",
1156 623 value: function renderReactDefaultElement(container) {
1157 624 var _ReactUtils$render = _react2.default.render(/*#__PURE__*/_react.default.createElement(_emptyComponent.default, {
1158 625 container: container
@@ -1160,17 +627,8 @@
1160 627 unmount = _ReactUtils$render.unmount;
1161 628 this.unmount = unmount;
1162 629 }
1163 630 }, {
1164 - key: "onBeforeRender",
1165 - value: function onBeforeRender() {
1166 - // In case the element is being rendered again, we need to unmount the previous React component.
1167 - if (this.unmount) {
1168 - this.unmount();
1169 - this.unmount = null;
1170 - }
1171 - }
1172 - }, {
1173 631 key: "onRender",
1174 632 value: function onRender() {
1175 633 this.$el.addClass(this.className);
1176 634 this.renderReactDefaultElement();
@@ -1177,10 +635,9 @@
1177 635 }
1178 636 }, {
1179 637 key: "onDestroy",
1180 638 value: function onDestroy() {
1181 - var _this$unmount;
1182 - (_this$unmount = this.unmount) === null || _this$unmount === void 0 || _this$unmount.call(this);
639 + this.unmount();
1183 640 }
1184 641 }]);
1185 642 }(Marionette.ItemView);
1186 643
@@ -1185,17 +642,15 @@
1185 642 }(Marionette.ItemView);
1186 643
1187 644 /***/ }),
1188 645
1189 -/***/ "../modules/atomic-widgets/assets/js/editor/create-atomic-element-base-view.js":
1190 -/*!*************************************************************************************!*\
1191 - !*** ../modules/atomic-widgets/assets/js/editor/create-atomic-element-base-view.js ***!
1192 - \*************************************************************************************/
646 +/***/ "../modules/atomic-widgets/assets/js/editor/div-block-model.js":
647 +/*!*********************************************************************!*\
648 + !*** ../modules/atomic-widgets/assets/js/editor/div-block-model.js ***!
649 + \*********************************************************************/
1193 650 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1194 651
1195 652 "use strict";
1196 -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
1197 -/* provided dependency */ var sprintf = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["sprintf"];
1198 653
1199 654
1200 655 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1201 656 Object.defineProperty(exports, "__esModule", ({
@@ -1200,506 +655,43 @@
1200 655 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1201 656 Object.defineProperty(exports, "__esModule", ({
1202 657 value: true
1203 658 }));
1204 -exports["default"] = createAtomicElementBaseView;
1205 -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
1206 -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
1207 -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js"));
1208 -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
1209 -var _elementTypes = __webpack_require__(/*! elementor-editor/utils/element-types */ "../assets/dev/js/editor/utils/element-types.js");
1210 -var _atomicElementEmptyView = _interopRequireDefault(__webpack_require__(/*! ./container/atomic-element-empty-view */ "../modules/atomic-widgets/assets/js/editor/container/atomic-element-empty-view.js"));
1211 -var BaseElementView = elementor.modules.elements.views.BaseElement;
1212 -function createAtomicElementBaseView(type) {
1213 - var AtomicElementView = BaseElementView.extend({
1214 - template: Marionette.TemplateCache.get("#tmpl-elementor-".concat(type, "-content")),
1215 - emptyView: _atomicElementEmptyView.default,
1216 - _childrenRenderPromises: [],
1217 - _createElement: function _createElement(tag) {
1218 - var _elementor$$preview;
1219 - 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;
1220 - if (previewDocument) {
1221 - return previewDocument.createElement(tag);
1222 - }
1223 - return document.createElement(tag);
1224 - },
1225 - getChildViewContainer: function getChildViewContainer() {
1226 - this.childViewContainer = '';
1227 - return Marionette.CompositeView.prototype.getChildViewContainer.apply(this, arguments);
1228 - },
1229 - getChildType: function getChildType() {
1230 - var atomicElements = Object.entries(elementor.config.elements).filter(function (_ref) {
1231 - var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
1232 - element = _ref2[1];
1233 - return !!(element !== null && element !== void 0 && element.atomic_props_schema);
1234 - }).map(function (_ref3) {
1235 - var _ref4 = (0, _slicedToArray2.default)(_ref3, 1),
1236 - elType = _ref4[0];
1237 - return elType;
1238 - });
1239 - return ['widget', 'container'].concat((0, _toConsumableArray2.default)(atomicElements));
1240 - },
1241 - getRenderContext: function getRenderContext() {
1242 - var _this$_parent, _this$_parent$getRend;
1243 - 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);
1244 - },
1245 - getResolverRenderContext: function getResolverRenderContext() {
1246 - var _this$_parent2, _this$_parent2$getRes;
1247 - 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);
1248 - },
1249 - render: function render() {
1250 - var _this = this;
1251 - this._currentRenderPromise = new Promise(function (resolve) {
1252 - // Optimize rendering by reusing existing child views instead of recreating them.
1253 - if (_this._shouldSkipFullRender()) {
1254 - _this._renderWithoutDomRecreation(resolve);
1255 - } else {
1256 - _this._renderWithDomRecreation(resolve);
1257 - }
1258 - });
1259 - return this;
1260 - },
1261 - _shouldSkipFullRender: function _shouldSkipFullRender() {
1262 - return this.isRendered && this._hasConnectedChildren();
1263 - },
1264 - _hasConnectedChildren: function _hasConnectedChildren() {
1265 - var _this$children, _firstChild$$el$get$i, _firstChild$$el;
1266 - if (!((_this$children = this.children) !== null && _this$children !== void 0 && _this$children.length)) {
1267 - return false;
1268 - }
1269 -
1270 - // If the parent's innerHTML was replaced, all children are detached together.
1271 - var firstChild = this.children.findByIndex(0);
1272 - 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;
1273 - },
1274 - _renderWithoutDomRecreation: function _renderWithoutDomRecreation(resolve) {
1275 - var _this2 = this;
1276 - this._beforeRender();
1277 - this._renderChildren();
1278 - this._waitForChildrenToComplete().then(function () {
1279 - _this2._afterRender();
1280 - resolve();
1281 - });
1282 - },
1283 - _renderWithDomRecreation: function _renderWithDomRecreation(resolve) {
1284 - BaseElementView.prototype.render.apply(this, arguments);
1285 - this._waitForChildrenToComplete().then(function () {
1286 - resolve();
1287 - });
1288 - },
1289 - _beforeRender: function _beforeRender() {
1290 - this._isRendering = true;
1291 - this.triggerMethod('before:render', this);
1292 - },
1293 - _afterRender: function _afterRender() {
1294 - this._isRendering = false;
1295 - this.isRendered = true;
1296 - this.triggerMethod('render', this);
1297 - },
1298 - _waitForChildrenToComplete: function _waitForChildrenToComplete() {
1299 - var _this3 = this;
1300 - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
1301 - return _regenerator.default.wrap(function (_context) {
1302 - while (1) switch (_context.prev = _context.next) {
1303 - case 0:
1304 - if (!(_this3._childrenRenderPromises.length > 0)) {
1305 - _context.next = 1;
1306 - break;
1307 - }
1308 - _context.next = 1;
1309 - return Promise.all(_this3._childrenRenderPromises);
1310 - case 1:
1311 - case "end":
1312 - return _context.stop();
1313 - }
1314 - }, _callee);
1315 - }))();
1316 - },
1317 - _renderChildren: function _renderChildren() {
1318 - if (this._shouldSkipFullRender()) {
1319 - var _this$children2;
1320 - (_this$children2 = this.children) === null || _this$children2 === void 0 || _this$children2.each(function (childView) {
1321 - return childView.render();
1322 - });
1323 - } else {
1324 - BaseElementView.prototype._renderChildren.apply(this, arguments);
1325 - }
1326 - this._collectChildrenRenderPromises();
1327 - },
1328 - _collectChildrenRenderPromises: function _collectChildrenRenderPromises() {
1329 - var _this$children3,
1330 - _this4 = this;
1331 - this._childrenRenderPromises = [];
1332 - (_this$children3 = this.children) === null || _this$children3 === void 0 || _this$children3.each(function (childView) {
1333 - if (childView._currentRenderPromise) {
1334 - _this4._childrenRenderPromises.push(childView._currentRenderPromise);
1335 - }
1336 - });
1337 - },
1338 - onRender: function onRender() {
1339 - var _this5 = this;
1340 - this.dispatchPreviewEvent('elementor/element/render');
1341 - BaseElementView.prototype.onRender.apply(this, arguments);
1342 -
1343 - // Defer to wait for everything to render.
1344 - setTimeout(function () {
1345 - _this5.droppableInitialize();
1346 - _this5.updateHandlesPosition();
1347 - });
1348 - },
1349 - onDestroy: function onDestroy() {
1350 - BaseElementView.prototype.onDestroy.apply(this, arguments);
1351 - this.dispatchPreviewEvent('elementor/element/destroy');
1352 - },
1353 - dispatchPreviewEvent: function dispatchPreviewEvent(eventType) {
1354 - var _elementor;
1355 - (_elementor = elementor) === null || _elementor === void 0 || (_elementor = _elementor.$preview) === null || _elementor === void 0 || (_elementor = _elementor[0]) === null || _elementor === void 0 || _elementor.contentWindow.dispatchEvent(new CustomEvent(eventType, {
1356 - detail: {
1357 - id: this.model.get('id'),
1358 - type: this.model.get('elType'),
1359 - element: this.getDomElement().get(0)
1360 - }
1361 - }));
1362 - },
1363 - droppableInitialize: function droppableInitialize() {
1364 - this.$el.html5Droppable(this.getDroppableOptions());
1365 - },
659 +exports["default"] = void 0;
660 +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
661 +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
662 +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
663 +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
664 +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
665 +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)); }
666 +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
667 +var AtomicContainer = exports["default"] = /*#__PURE__*/function (_elementor$modules$el) {
668 + function AtomicContainer() {
669 + (0, _classCallCheck2.default)(this, AtomicContainer);
670 + return _callSuper(this, AtomicContainer, arguments);
671 + }
672 + (0, _inherits2.default)(AtomicContainer, _elementor$modules$el);
673 + return (0, _createClass2.default)(AtomicContainer, [{
674 + key: "isValidChild",
675 + value:
1366 676 /**
1367 - * Add a `Save as a Template` button to the context menu.
677 + * Do not allow section, column or container be placed in the Atomic container.
1368 678 *
1369 - * @return {Object} groups
679 + * @param {*} childModel
1370 680 */
1371 - getContextMenuGroups: function getContextMenuGroups() {
1372 - var _this6 = this,
1373 - _elementorCommon$conf;
1374 - var saveActions = [{
1375 - name: 'save',
1376 - title: __('Save as a template', 'elementor'),
1377 - callback: this.saveAsTemplate.bind(this),
1378 - isEnabled: function isEnabled() {
1379 - return !_this6.getContainer().isLocked();
1380 - }
1381 - }];
1382 - var isAdministrator = elementor.config.user.is_administrator;
1383 - var isExperimentalFeaturesEnabled = (_elementorCommon$conf = elementorCommon.config.experimentalFeatures) === null || _elementorCommon$conf === void 0 ? void 0 : _elementorCommon$conf.e_components;
1384 - if (isExperimentalFeaturesEnabled && isAdministrator) {
1385 - 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;
1386 - 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;
1387 - 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;
1388 - 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);
1389 - var showPromoBadge = !isProActive && !isProOutdated;
1390 - var newBadge = "<span class=\"elementor-context-menu-list__item__shortcut__new-badge\">".concat(__('New', 'elementor'), "</span>");
1391 - var badgeClass = 'elementor-context-menu-list__item__shortcut__promotion-badge';
1392 - 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>");
1393 - saveActions.unshift({
1394 - name: 'save-component',
1395 - title: __('Create component', 'elementor'),
1396 - shortcut: isProActive || isProOutdated ? newBadge : proBadge,
1397 - hasShortcutAction: showPromoBadge,
1398 - callback: this.saveAsComponent.bind(this),
1399 - isEnabled: function isEnabled() {
1400 - return (isProActive || isProOutdated) && !_this6.getContainer().isLocked();
1401 - }
1402 - });
1403 - }
1404 - var groups = BaseElementView.prototype.getContextMenuGroups.apply(this, arguments),
1405 - transferGroupClipboardIndex = groups.indexOf(_.findWhere(groups, {
1406 - name: 'clipboard'
1407 - }));
1408 - groups.splice(transferGroupClipboardIndex + 1, 0, {
1409 - name: 'save',
1410 - actions: saveActions
1411 - });
1412 - return groups;
1413 - },
1414 - saveAsTemplate: function saveAsTemplate() {
1415 - elementor.templates.eventManager.sendNewSaveTemplateClickedEvent();
1416 - $e.route('library/save-template', {
1417 - model: this.model
1418 - });
1419 - },
1420 - saveAsComponent: function saveAsComponent(openContextMenuEvent, options) {
1421 - 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;
1422 - 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;
1423 - 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);
1424 - if (isProOutdated) {
1425 - var _window$elementorV6, _window$elementorV6$n;
1426 - (_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, {
1427 - type: 'info',
1428 - id: 'component-create-update',
1429 - message: __('To create new components, update Elementor Pro to the latest version.', 'elementor'),
1430 - additionalActionProps: [{
1431 - size: 'small',
1432 - variant: 'contained',
1433 - color: 'info',
1434 - href: '/wp-admin/plugins.php',
1435 - target: '_blank',
1436 - children: __('Update Now', 'elementor')
1437 - }]
1438 - });
1439 - return;
1440 - }
1441 - 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;
1442 - if (!isProActive) {
1443 - return;
1444 - }
1445 -
1446 - // Calculate the absolute position where the context menu was opened.
1447 - var openMenuOriginalEvent = openContextMenuEvent.originalEvent;
1448 - var iframeRect = elementor.$preview[0].getBoundingClientRect();
1449 - var anchorPosition = {
1450 - left: openMenuOriginalEvent.clientX + iframeRect.left,
1451 - top: openMenuOriginalEvent.clientY + iframeRect.top
1452 - };
1453 - window.dispatchEvent(new CustomEvent('elementor/editor/open-save-as-component-form', {
1454 - detail: {
1455 - element: elementor.getContainer(this.model.id).model.toJSON({
1456 - remove: ['default']
1457 - }),
1458 - anchorPosition: anchorPosition,
1459 - options: options
1460 - }
1461 - }));
1462 - },
1463 - isDroppingAllowed: function isDroppingAllowed() {
1464 - return this.getContainer().isEditable();
1465 - },
1466 - behaviors: function behaviors() {
1467 - var behaviors = BaseElementView.prototype.behaviors.apply(this, arguments);
1468 - _.extend(behaviors, {
1469 - Sortable: {
1470 - behaviorClass: __webpack_require__(/*! elementor-behaviors/sortable */ "../assets/dev/js/editor/elements/views/behaviors/sortable.js"),
1471 - elChildType: 'widget'
1472 - }
1473 - });
1474 - return elementor.hooks.applyFilters("elements/".concat(type, "/behaviors"), behaviors, this);
1475 - },
1476 - /**
1477 - * @return {{}} options
1478 - */
1479 - getSortableOptions: function getSortableOptions() {
1480 - return {
1481 - preventInit: true
1482 - };
1483 - },
1484 - getDroppableOptions: function getDroppableOptions() {
1485 - var _this7 = this;
1486 - var items = '> .elementor-element, > .elementor-empty-view .elementor-first-add';
1487 - return {
1488 - axis: null,
1489 - items: items,
1490 - groups: ['elementor-element'],
1491 - horizontalThreshold: 0,
1492 - isDroppingAllowed: this.isDroppingAllowed.bind(this),
1493 - currentElementClass: 'elementor-html5dnd-current-element',
1494 - placeholderClass: 'elementor-sortable-placeholder elementor-widget-placeholder',
1495 - hasDraggingOnChildClass: 'e-dragging-over',
1496 - getDropContainer: function getDropContainer() {
1497 - return _this7.getContainer();
1498 - },
1499 - onDropping: function onDropping(side, event) {
1500 - event.stopPropagation();
1501 -
1502 - // Triggering the drag end manually, since it won't fire above the iframe
1503 - elementor.getPreviewView().onPanelElementDragEnd();
1504 - var draggedView = elementor.channels.editor.request('element:dragged'),
1505 - draggedElement = draggedView === null || draggedView === void 0 ? void 0 : draggedView.getContainer().view.el,
1506 - containerElement = event.currentTarget.parentElement,
1507 - elements = Array.from((containerElement === null || containerElement === void 0 ? void 0 : containerElement.querySelectorAll(':scope > .elementor-element')) || []);
1508 - var targetIndex = elements.indexOf(event.currentTarget);
1509 - if (_this7.isPanelElement(draggedView, draggedElement)) {
1510 - var _elementorCommon;
1511 - if (_this7.draggingOnBottomOrRightSide(side) && !_this7.emptyViewIsCurrentlyBeingDraggedOver()) {
1512 - targetIndex++;
1513 - }
1514 - _this7.onDrop(event, {
1515 - at: targetIndex
1516 - });
1517 - if ((_elementorCommon = elementorCommon) !== null && _elementorCommon !== void 0 && (_elementorCommon = _elementorCommon.eventsManager) !== null && _elementorCommon !== void 0 && _elementorCommon.dispatchEvent) {
1518 - var selectedElement = elementor.channels.panelElements.request('element:selected');
1519 - if (selectedElement) {
1520 - var _selectedElement$mode, _selectedElement$mode2, _selectedElement$mode3, _selectedElement$mode4;
1521 - var elType = (_selectedElement$mode = (_selectedElement$mode2 = selectedElement.model) === null || _selectedElement$mode2 === void 0 ? void 0 : _selectedElement$mode2.get('elType')) !== null && _selectedElement$mode !== void 0 ? _selectedElement$mode : '';
1522 - var widgetType = (_selectedElement$mode3 = (_selectedElement$mode4 = selectedElement.model) === null || _selectedElement$mode4 === void 0 ? void 0 : _selectedElement$mode4.get('widgetType')) !== null && _selectedElement$mode3 !== void 0 ? _selectedElement$mode3 : '';
1523 - var elementName = 'widget' === elType ? widgetType : elType;
1524 - elementorCommon.eventsManager.dispatchEvent('add_element', {
1525 - location: 'editor_panel',
1526 - element_name: elementName,
1527 - element_type: elType,
1528 - widget_type: widgetType
1529 - });
1530 - }
1531 - }
1532 - return;
1533 - }
1534 - if (_this7.isParentElement(draggedView.getContainer().id)) {
1535 - return;
1536 - }
1537 - if (_this7.emptyViewIsCurrentlyBeingDraggedOver()) {
1538 - _this7.moveDroppedItem(draggedView, 0);
1539 - return;
1540 - }
1541 - _this7.moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement);
1542 - }
1543 - };
1544 - },
1545 - moveExistingElement: function moveExistingElement(side, draggedView, containerElement, elements, targetIndex, draggedElement) {
1546 - var selfIndex = elements.indexOf(draggedElement);
1547 - if (targetIndex === selfIndex) {
1548 - return;
1549 - }
1550 - var dropIndex = this.getDropIndex(containerElement, side, targetIndex, selfIndex);
1551 - this.moveDroppedItem(draggedView, dropIndex);
1552 - },
1553 - isPanelElement: function isPanelElement(draggedView, draggedElement) {
1554 - return !draggedView || !draggedElement;
1555 - },
1556 - isParentElement: function isParentElement(draggedId) {
1557 - var current = this.container;
1558 - while (current) {
1559 - if (current.id === draggedId) {
1560 - return true;
1561 - }
1562 - current = current.parent;
1563 - }
1564 - return false;
1565 - },
1566 - getDropIndex: function getDropIndex(container, side, index, selfIndex) {
1567 - var styles = window.getComputedStyle(container);
1568 - var isFlex = ['flex', 'inline-flex'].includes(styles.display);
1569 - var isFlexReverse = isFlex && ['column-reverse', 'row-reverse'].includes(styles.flexDirection);
1570 - var isRow = isFlex && ['row-reverse', 'row'].includes(styles.flexDirection);
1571 - var isRtl = elementorCommon.config.isRTL;
1572 - var isReverse = isRow ? isFlexReverse !== isRtl : isFlexReverse;
1573 -
1574 - // The element should be placed BEFORE the current target
1575 - // if is reversed + side is bottom/right OR not is reversed + side is top/left
1576 - if (isReverse === this.draggingOnBottomOrRightSide(side)) {
1577 - if (-1 === selfIndex || selfIndex >= index - 1) {
1578 - return index;
1579 - }
1580 - return index > 0 ? index - 1 : 0;
1581 - }
1582 - if (0 <= selfIndex && selfIndex < index) {
1583 - return index;
1584 - }
1585 - return index + 1;
1586 - },
1587 - moveDroppedItem: function moveDroppedItem(draggedView, dropIndex) {
1588 - // Reset the dragged element cache.
1589 - elementor.channels.editor.reply('element:dragged', null);
1590 - $e.run('document/elements/move', {
1591 - container: draggedView.getContainer(),
1592 - target: this.getContainer(),
1593 - options: {
1594 - at: dropIndex
1595 - }
1596 - });
1597 - },
1598 - getEditButtons: function getEditButtons() {
1599 - var elementData = elementor.getElementData(this.model),
1600 - editTools = {};
1601 - if ($e.components.get('document/elements').utils.allowAddingWidgets()) {
1602 - editTools.add = {
1603 - /* Translators: %s: Element Name. */
1604 - title: sprintf(__('Add %s', 'elementor'), elementData.title),
1605 - icon: 'plus'
1606 - };
1607 - editTools.edit = {
1608 - /* Translators: %s: Element Name. */
1609 - title: sprintf(__('Edit %s', 'elementor'), elementData.title),
1610 - icon: 'handle'
1611 - };
1612 - }
1613 - if (!this.getContainer().isLocked()) {
1614 - if (elementor.getPreferences('edit_buttons') && $e.components.get('document/elements').utils.allowAddingWidgets()) {
1615 - editTools.duplicate = {
1616 - /* Translators: %s: Element Name. */
1617 - title: sprintf(__('Duplicate %s', 'elementor'), elementData.title),
1618 - icon: 'clone'
1619 - };
1620 - }
1621 - editTools.remove = {
1622 - /* Translators: %s: Element Name. */
1623 - title: sprintf(__('Delete %s', 'elementor'), elementData.title),
1624 - icon: 'close'
1625 - };
1626 - }
1627 - return editTools;
1628 - },
1629 - draggingOnBottomOrRightSide: function draggingOnBottomOrRightSide(side) {
1630 - return ['bottom', 'right'].includes(side);
1631 - },
1632 - emptyViewIsCurrentlyBeingDraggedOver: function emptyViewIsCurrentlyBeingDraggedOver() {
1633 - return this.$el.find('> .elementor-empty-view > .elementor-first-add.elementor-html5dnd-current-element').length > 0;
1634 - },
1635 - /**
1636 - * Toggle the `New Section` view when clicking the `add` button in the edit tools.
1637 - *
1638 - * @return {void}
1639 - */
1640 - onAddButtonClick: function onAddButtonClick() {
1641 - if (this.addSectionView && !this.addSectionView.isDestroyed) {
1642 - this.addSectionView.fadeToDeath();
1643 - return;
1644 - }
1645 - var addSectionView = new elementor.modules.elements.components.AddSectionView({
1646 - at: this.model.collection.indexOf(this.model)
1647 - });
1648 - addSectionView.render();
1649 - this.$el.before(addSectionView.$el);
1650 - addSectionView.$el.hide();
1651 -
1652 - // Delaying the slide down for slow-render browsers (such as FF)
1653 - setTimeout(function () {
1654 - addSectionView.$el.slideDown(null, function () {
1655 - // Remove inline style, for preview mode.
1656 - jQuery(this).css('display', '');
1657 - });
1658 - });
1659 - this.addSectionView = addSectionView;
1660 - },
1661 - isOverflowHidden: function isOverflowHidden() {
1662 - var elementStyles = window.getComputedStyle(this.el);
1663 - var overflowStyles = [elementStyles.overflowX, elementStyles.overflowY, elementStyles.overflow];
1664 - return overflowStyles.includes('hidden') || overflowStyles.includes('auto');
1665 - },
1666 - updateHandlesPosition: function updateHandlesPosition() {
1667 - var elementType = this.$el.data('element_type');
1668 - var isElement = (0, _elementTypes.getAllElementTypes)().includes(elementType);
1669 - if (!isElement) {
1670 - return;
1671 - }
1672 - var shouldPlaceInside = this.isOverflowHidden();
1673 - if (!shouldPlaceInside && this.isTopLevelElement() && this.isFirstElementInStructure()) {
1674 - shouldPlaceInside = true;
1675 - }
1676 - this.$el.toggleClass('e-handles-inside', shouldPlaceInside);
1677 - },
1678 - isTopLevelElement: function isTopLevelElement() {
1679 - return this.container.parent && 'document' === this.container.parent.id;
1680 - },
1681 - isFirstElementInStructure: function isFirstElementInStructure() {
1682 - if (!this.model.collection) {
1683 - return true;
1684 - }
1685 - return 0 === this.model.collection.indexOf(this.model);
1686 - },
1687 - getInteractionId: function getInteractionId() {
1688 - var originId = this.model.get('originId');
1689 - var id = this.model.get('id');
1690 - return originId !== null && originId !== void 0 ? originId : id;
681 + function isValidChild(childModel) {
682 + var elType = childModel.get('elType');
683 + return 'section' !== elType && 'column' !== elType && 'container' !== elType;
1691 684 }
1692 - });
1693 - return AtomicElementView;
1694 -}
685 + }]);
686 +}(elementor.modules.elements.models.Element);
1695 687
1696 688 /***/ }),
1697 689
1698 -/***/ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/duplicate-element.js":
1699 -/*!*************************************************************************************************************!*\
1700 - !*** ../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/duplicate-element.js ***!
1701 - \*************************************************************************************************************/
690 +/***/ "../modules/atomic-widgets/assets/js/editor/div-block-type.js":
691 +/*!********************************************************************!*\
692 + !*** ../modules/atomic-widgets/assets/js/editor/div-block-type.js ***!
693 + \********************************************************************/
1702 694 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1703 695
1704 696 "use strict";
1705 697
@@ -1707,97 +699,350 @@
1707 699 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1708 700 Object.defineProperty(exports, "__esModule", ({
1709 701 value: true
1710 702 }));
1711 -exports.DuplicateElement = void 0;
703 +exports["default"] = void 0;
1712 704 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1713 705 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1714 706 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1715 707 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1716 708 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1717 -var _regenerateLocalStyleIds = __webpack_require__(/*! ../../../utils/regenerate-local-style-ids */ "../modules/atomic-widgets/assets/js/editor/utils/regenerate-local-style-ids.js");
709 +var _emptyComponent = _interopRequireDefault(__webpack_require__(/*! elementor-elements/views/container/empty-component */ "../assets/dev/js/editor/elements/views/container/empty-component.js"));
710 +var _divBlockModel = _interopRequireDefault(__webpack_require__(/*! ./div-block-model */ "../modules/atomic-widgets/assets/js/editor/div-block-model.js"));
711 +var _divBlockView = _interopRequireDefault(__webpack_require__(/*! ./div-block-view */ "../modules/atomic-widgets/assets/js/editor/div-block-view.js"));
1718 712 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)); }
1719 713 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1720 -var DuplicateElement = exports.DuplicateElement = /*#__PURE__*/function (_$e$modules$hookData$) {
1721 - function DuplicateElement() {
1722 - (0, _classCallCheck2.default)(this, DuplicateElement);
1723 - return _callSuper(this, DuplicateElement, arguments);
714 +var AtomicContainer = exports["default"] = /*#__PURE__*/function (_elementor$modules$el) {
715 + function AtomicContainer() {
716 + (0, _classCallCheck2.default)(this, AtomicContainer);
717 + return _callSuper(this, AtomicContainer, arguments);
1724 718 }
1725 - (0, _inherits2.default)(DuplicateElement, _$e$modules$hookData$);
1726 - return (0, _createClass2.default)(DuplicateElement, [{
1727 - key: "getCommand",
1728 - value: function getCommand() {
1729 - return 'document/elements/duplicate';
719 + (0, _inherits2.default)(AtomicContainer, _elementor$modules$el);
720 + return (0, _createClass2.default)(AtomicContainer, [{
721 + key: "getType",
722 + value: function getType() {
723 + return 'div-block';
1730 724 }
1731 725 }, {
1732 - key: "getId",
1733 - value: function getId() {
1734 - return 'regenerate-local-style-ids--document/elements/duplicate';
726 + key: "getView",
727 + value: function getView() {
728 + return _divBlockView.default;
1735 729 }
1736 730 }, {
1737 - key: "apply",
1738 - value: function apply(args, result) {
1739 - var containers = Array.isArray(result) ? result : [result];
1740 - containers.forEach(_regenerateLocalStyleIds.regenerateLocalStyleIds);
731 + key: "getEmptyView",
732 + value: function getEmptyView() {
733 + return _emptyComponent.default;
1741 734 }
735 + }, {
736 + key: "getModel",
737 + value: function getModel() {
738 + return _divBlockModel.default;
739 + }
1742 740 }]);
1743 -}($e.modules.hookData.After);
741 +}(elementor.modules.elements.types.Base);
1744 742
1745 743 /***/ }),
1746 744
1747 -/***/ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/import-element.js":
1748 -/*!**********************************************************************************************************!*\
1749 - !*** ../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/import-element.js ***!
1750 - \**********************************************************************************************************/
1751 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
745 +/***/ "../modules/atomic-widgets/assets/js/editor/div-block-view.js":
746 +/*!********************************************************************!*\
747 + !*** ../modules/atomic-widgets/assets/js/editor/div-block-view.js ***!
748 + \********************************************************************/
749 +/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1752 750
1753 751 "use strict";
752 +/* provided dependency */ var sprintf = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["sprintf"];
753 +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
1754 754
1755 755
1756 756 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1757 -Object.defineProperty(exports, "__esModule", ({
1758 - value: true
1759 -}));
1760 -exports.ImportElement = void 0;
1761 -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1762 -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1763 -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1764 -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1765 -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1766 -var _regenerateLocalStyleIds = __webpack_require__(/*! ../../../utils/regenerate-local-style-ids */ "../modules/atomic-widgets/assets/js/editor/utils/regenerate-local-style-ids.js");
1767 -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)); }
1768 -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1769 -var ImportElement = exports.ImportElement = /*#__PURE__*/function (_$e$modules$hookData$) {
1770 - function ImportElement() {
1771 - (0, _classCallCheck2.default)(this, ImportElement);
1772 - return _callSuper(this, ImportElement, arguments);
1773 - }
1774 - (0, _inherits2.default)(ImportElement, _$e$modules$hookData$);
1775 - return (0, _createClass2.default)(ImportElement, [{
1776 - key: "getCommand",
1777 - value: function getCommand() {
1778 - return 'document/elements/import';
757 +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js"));
758 +var _divBlockEmptyView = _interopRequireDefault(__webpack_require__(/*! ./container/div-block-empty-view */ "../modules/atomic-widgets/assets/js/editor/container/div-block-empty-view.js"));
759 +var BaseElementView = elementor.modules.elements.views.BaseElement;
760 +var DivBlockView = BaseElementView.extend({
761 + template: Marionette.TemplateCache.get('#tmpl-elementor-div-block-content'),
762 + emptyView: _divBlockEmptyView.default,
763 + tagName: function tagName() {
764 + return this.model.getSetting('tag') || 'div';
765 + },
766 + getChildViewContainer: function getChildViewContainer() {
767 + this.childViewContainer = '';
768 + return Marionette.CompositeView.prototype.getChildViewContainer.apply(this, arguments);
769 + },
770 + className: function className() {
771 + return "".concat(BaseElementView.prototype.className.apply(this), " e-con e-div-block").concat(this.getClassString());
772 + },
773 + // TODO: Copied from `views/column.js`.
774 + ui: function ui() {
775 + var ui = BaseElementView.prototype.ui.apply(this, arguments);
776 + ui.percentsTooltip = '> .elementor-element-overlay .elementor-column-percents-tooltip';
777 + return ui;
778 + },
779 + // TODO: Copied from `views/column.js`.
780 + attachElContent: function attachElContent() {
781 + BaseElementView.prototype.attachElContent.apply(this, arguments);
782 + var $tooltip = jQuery('<div>', {
783 + class: 'elementor-column-percents-tooltip',
784 + 'data-side': elementorCommon.config.isRTL ? 'right' : 'left'
785 + });
786 + this.$el.children('.elementor-element-overlay').append($tooltip);
787 + },
788 + // TODO: Copied from `views/column.js`.
789 + getPercentSize: function getPercentSize(size) {
790 + if (!size) {
791 + size = this.el.getBoundingClientRect().width;
1779 792 }
1780 - }, {
1781 - key: "getId",
1782 - value: function getId() {
1783 - return 'regenerate-local-style-ids--document/elements/import';
793 + return +(size / this.$el.parent().width() * 100).toFixed(3);
794 + },
795 + // TODO: Copied from `views/column.js`.
796 + getPercentsForDisplay: function getPercentsForDisplay() {
797 + var width = +this.model.getSetting('width') || this.getPercentSize();
798 + return width.toFixed(1) + '%';
799 + },
800 + renderOnChange: function renderOnChange(settings) {
801 + var changed = settings.changedAttributes();
802 + if (!changed) {
803 + return;
1784 804 }
1785 - }, {
1786 - key: "apply",
1787 - value: function apply(args, result) {
1788 - var containers = Array.isArray(result) ? result : [result];
1789 - containers.forEach(_regenerateLocalStyleIds.regenerateLocalStyleIds);
805 + BaseElementView.prototype.renderOnChange.apply(this, settings);
806 + if (changed.classes) {
807 + // Rebuild the whole class attribute to remove previous outdated classes
808 + this.$el.attr('class', this.className());
809 + return;
1790 810 }
1791 - }]);
1792 -}($e.modules.hookData.After);
811 + this.$el.addClass(this.getClasses());
812 + },
813 + onRender: function onRender() {
814 + var _this = this;
815 + BaseElementView.prototype.onRender.apply(this, arguments);
1793 816
817 + // Defer to wait for everything to render.
818 + setTimeout(function () {
819 + _this.droppableInitialize();
820 + });
821 + },
822 + droppableInitialize: function droppableInitialize() {
823 + this.$el.html5Droppable(this.getDroppableOptions());
824 + },
825 + isDroppingAllowed: function isDroppingAllowed() {
826 + return true;
827 + },
828 + behaviors: function behaviors() {
829 + var behaviors = BaseElementView.prototype.behaviors.apply(this, arguments);
830 + _.extend(behaviors, {
831 + Sortable: {
832 + behaviorClass: __webpack_require__(/*! elementor-behaviors/sortable */ "../assets/dev/js/editor/elements/views/behaviors/sortable.js"),
833 + elChildType: 'widget'
834 + }
835 + });
836 + return elementor.hooks.applyFilters('elements/div-block/behaviors', behaviors, this);
837 + },
838 + /**
839 + * @return {{}} options
840 + */
841 + getSortableOptions: function getSortableOptions() {
842 + return {
843 + preventInit: true
844 + };
845 + },
846 + getDroppableAxis: function getDroppableAxis() {
847 + if (this.isHorizontalAxis()) {
848 + return 'horizontal';
849 + }
850 + return 'vertical';
851 + },
852 + isHorizontalAxis: function isHorizontalAxis() {
853 + var styles = window.getComputedStyle(this.$el[0]);
854 + return 'flex' === styles.display && ['row', 'row-reverse'].includes(styles.flexDirection);
855 + },
856 + getDroppableOptions: function getDroppableOptions() {
857 + var _this2 = this;
858 + var items = '> .elementor-element, > .elementor-empty-view .elementor-first-add';
859 + var $placeholder;
860 + return {
861 + axis: this.getDroppableAxis(),
862 + items: items,
863 + groups: ['elementor-element'],
864 + horizontalThreshold: 5,
865 + isDroppingAllowed: this.isDroppingAllowed.bind(this),
866 + currentElementClass: 'elementor-html5dnd-current-element',
867 + placeholderClass: 'elementor-sortable-placeholder elementor-widget-placeholder',
868 + hasDraggingOnChildClass: 'e-dragging-over',
869 + getDropContainer: function getDropContainer() {
870 + return _this2.getContainer();
871 + },
872 + onDropping: function onDropping(side, event) {
873 + event.stopPropagation();
874 +
875 + // Triggering drag end manually, since it won't fired above iframe
876 + elementor.getPreviewView().onPanelElementDragEnd();
877 + var draggedView = elementor.channels.editor.request('element:dragged'),
878 + draggingInSameParent = (draggedView === null || draggedView === void 0 ? void 0 : draggedView.parent) === _this2,
879 + containerSelector = event.currentTarget.parentElement;
880 + var $elements = jQuery(containerSelector).find('> .elementor-element');
881 +
882 + // Exclude the dragged element from the indexing calculations.
883 + if (draggingInSameParent) {
884 + $elements = $elements.not(draggedView.$el);
885 + }
886 + var widgetsArray = Object.values($elements);
887 + var newIndex = widgetsArray.indexOf(event.currentTarget);
888 +
889 + // Plus one in order to insert it after the current target element.
890 + if (_this2.shouldIncrementIndex(side)) {
891 + newIndex++;
892 + }
893 +
894 + // User is sorting inside a Container.
895 + if (draggedView) {
896 + // Prevent the user from dragging a parent container into its own child container
897 + var draggedId = draggedView.getContainer().id;
898 + var currentTargetParentContainer = _this2.container;
899 + while (currentTargetParentContainer) {
900 + if (currentTargetParentContainer.id === draggedId) {
901 + return;
902 + }
903 + currentTargetParentContainer = currentTargetParentContainer.parent;
904 + }
905 +
906 + // Reset the dragged element cache.
907 + elementor.channels.editor.reply('element:dragged', null);
908 + $e.run('document/elements/move', {
909 + container: draggedView.getContainer(),
910 + target: _this2.getContainer(),
911 + options: {
912 + at: newIndex
913 + }
914 + });
915 + return;
916 + }
917 +
918 + // User is dragging an element from the panel.
919 + _this2.onDrop(event, {
920 + at: newIndex
921 + });
922 + },
923 + onDragging: function onDragging(side, event) {
924 + if (!$placeholder) {
925 + $placeholder = _this2.$el.find('.elementor-sortable-placeholder');
926 + }
927 + if (!$placeholder.length) {
928 + return;
929 + }
930 + var currentTarget = event.currentTarget,
931 + currentTargetHeight = currentTarget.getBoundingClientRect().height,
932 + placeholderElement = $placeholder[0],
933 + isNotBeforeSibling = currentTarget !== placeholderElement.previousElementSibling;
934 + if ('horizontal' === _this2.getDroppableAxis()) {
935 + if (isNotBeforeSibling) {
936 + _this2.handleDropSide(side, placeholderElement, currentTarget);
937 + }
938 + _this2.maybeShowCustomDropPlaceholder($placeholder, currentTargetHeight);
939 + } else {
940 + $placeholder.removeAttr('style');
941 + }
942 + }
943 + };
944 + },
945 + handleDropSide: function handleDropSide(side, placeholderElement, currentTarget) {
946 + var insertMethod = ['top', 'left'].includes(side) ? 'before' : 'after';
947 + currentTarget[insertMethod](placeholderElement);
948 + },
949 + maybeShowCustomDropPlaceholder: function maybeShowCustomDropPlaceholder($placeholder, currentTargetHeight) {
950 + if ($placeholder.css('height') !== "".concat(currentTargetHeight, "px")) {
951 + $placeholder.css({
952 + display: 'block',
953 + height: "".concat(currentTargetHeight, "px"),
954 + 'background-color': '#eb8efb',
955 + width: '10px'
956 + });
957 + }
958 + },
959 + getEditButtons: function getEditButtons() {
960 + var elementData = elementor.getElementData(this.model),
961 + editTools = {};
962 + if ($e.components.get('document/elements').utils.allowAddingWidgets()) {
963 + editTools.add = {
964 + /* Translators: %s: Element Name. */
965 + title: sprintf(__('Add %s', 'elementor'), elementData.title),
966 + icon: 'plus'
967 + };
968 + editTools.edit = {
969 + /* Translators: %s: Element Name. */
970 + title: sprintf(__('Edit %s', 'elementor'), elementData.title),
971 + icon: 'handle'
972 + };
973 + }
974 + if (!this.getContainer().isLocked()) {
975 + if (elementor.getPreferences('edit_buttons') && $e.components.get('document/elements').utils.allowAddingWidgets()) {
976 + editTools.duplicate = {
977 + /* Translators: %s: Element Name. */
978 + title: sprintf(__('Duplicate %s', 'elementor'), elementData.title),
979 + icon: 'clone'
980 + };
981 + }
982 + editTools.remove = {
983 + /* Translators: %s: Element Name. */
984 + title: sprintf(__('Delete %s', 'elementor'), elementData.title),
985 + icon: 'close'
986 + };
987 + }
988 + return editTools;
989 + },
990 + shouldIncrementIndex: function shouldIncrementIndex(side) {
991 + if (!this.draggingOnBottomOrRightSide(side)) {
992 + return false;
993 + }
994 + return !this.emptyViewIsCurrentlyBeingDraggedOver();
995 + },
996 + draggingOnBottomOrRightSide: function draggingOnBottomOrRightSide(side) {
997 + return ['bottom', 'right'].includes(side);
998 + },
999 + emptyViewIsCurrentlyBeingDraggedOver: function emptyViewIsCurrentlyBeingDraggedOver() {
1000 + return this.$el.find('> .elementor-empty-view > .elementor-first-add.elementor-html5dnd-current-element').length > 0;
1001 + },
1002 + /**
1003 + * Toggle the `New Section` view when clicking the `add` button in the edit tools.
1004 + *
1005 + * @return {void}
1006 + */
1007 + onAddButtonClick: function onAddButtonClick() {
1008 + if (this.addSectionView && !this.addSectionView.isDestroyed) {
1009 + this.addSectionView.fadeToDeath();
1010 + return;
1011 + }
1012 + var addSectionView = new elementor.modules.elements.components.AddSectionView({
1013 + at: this.model.collection.indexOf(this.model)
1014 + });
1015 + addSectionView.render();
1016 + this.$el.before(addSectionView.$el);
1017 + addSectionView.$el.hide();
1018 +
1019 + // Delaying the slide down for slow-render browsers (such as FF)
1020 + setTimeout(function () {
1021 + addSectionView.$el.slideDown(null, function () {
1022 + // Remove inline style, for preview mode.
1023 + jQuery(this).css('display', '');
1024 + });
1025 + });
1026 + this.addSectionView = addSectionView;
1027 + },
1028 + getClasses: function getClasses() {
1029 + var _this$options;
1030 + return ((_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) || [];
1031 + },
1032 + getClassString: function getClassString() {
1033 + var classes = this.getClasses();
1034 + return classes.length ? [''].concat((0, _toConsumableArray2.default)(classes)).join(' ') : '';
1035 + }
1036 +});
1037 +module.exports = DivBlockView;
1038 +
1794 1039 /***/ }),
1795 1040
1796 -/***/ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/paste-element.js":
1797 -/*!*********************************************************************************************************!*\
1798 - !*** ../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/paste-element.js ***!
1799 - \*********************************************************************************************************/
1041 +/***/ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/create-element.js":
1042 +/*!**********************************************************************************************************!*\
1043 + !*** ../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/create-element.js ***!
1044 + \**********************************************************************************************************/
1800 1045 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1801 1046
1802 1047 "use strict";
1803 1048
@@ -1805,9 +1050,9 @@
1805 1050 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1806 1051 Object.defineProperty(exports, "__esModule", ({
1807 1052 value: true
1808 1053 }));
1809 -exports.PasteElement = void 0;
1054 +exports["default"] = exports.CreateElementHook = void 0;
1810 1055 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1811 1056 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1812 1057 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1813 1058 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
@@ -1814,23 +1059,23 @@
1814 1059 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1815 1060 var _regenerateLocalStyleIds = __webpack_require__(/*! ../../../utils/regenerate-local-style-ids */ "../modules/atomic-widgets/assets/js/editor/utils/regenerate-local-style-ids.js");
1816 1061 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)); }
1817 1062 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1818 -var PasteElement = exports.PasteElement = /*#__PURE__*/function (_$e$modules$hookData$) {
1819 - function PasteElement() {
1820 - (0, _classCallCheck2.default)(this, PasteElement);
1821 - return _callSuper(this, PasteElement, arguments);
1063 +var CreateElementHook = exports.CreateElementHook = /*#__PURE__*/function (_$e$modules$hookData$) {
1064 + function CreateElementHook() {
1065 + (0, _classCallCheck2.default)(this, CreateElementHook);
1066 + return _callSuper(this, CreateElementHook, arguments);
1822 1067 }
1823 - (0, _inherits2.default)(PasteElement, _$e$modules$hookData$);
1824 - return (0, _createClass2.default)(PasteElement, [{
1068 + (0, _inherits2.default)(CreateElementHook, _$e$modules$hookData$);
1069 + return (0, _createClass2.default)(CreateElementHook, [{
1825 1070 key: "getCommand",
1826 1071 value: function getCommand() {
1827 - return 'document/elements/paste';
1072 + return 'document/elements/create';
1828 1073 }
1829 1074 }, {
1830 1075 key: "getId",
1831 1076 value: function getId() {
1832 - return 'regenerate-local-style-ids--document/elements/paste';
1077 + return 'regenerate-local-style-ids--document/elements/duplicate';
1833 1078 }
1834 1079 }, {
1835 1080 key: "apply",
1836 1081 value: function apply(args, result) {
@@ -1838,8 +1083,9 @@
1838 1083 containers.forEach(_regenerateLocalStyleIds.regenerateLocalStyleIds);
1839 1084 }
1840 1085 }]);
1841 1086 }($e.modules.hookData.After);
1087 +var _default = exports["default"] = CreateElementHook;
1842 1088
1843 1089 /***/ }),
1844 1090
1845 1091 /***/ "../modules/atomic-widgets/assets/js/editor/hooks/index.js":
@@ -1853,29 +1099,15 @@
1853 1099
1854 1100 Object.defineProperty(exports, "__esModule", ({
1855 1101 value: true
1856 1102 }));
1857 -Object.defineProperty(exports, "DuplicateElement", ({
1103 +Object.defineProperty(exports, "CreateElementHook", ({
1858 1104 enumerable: true,
1859 1105 get: function get() {
1860 - return _duplicateElement.DuplicateElement;
1106 + return _createElement.CreateElementHook;
1861 1107 }
1862 1108 }));
1863 -Object.defineProperty(exports, "ImportElement", ({
1864 - enumerable: true,
1865 - get: function get() {
1866 - return _importElement.ImportElement;
1867 - }
1868 -}));
1869 -Object.defineProperty(exports, "PasteElement", ({
1870 - enumerable: true,
1871 - get: function get() {
1872 - return _pasteElement.PasteElement;
1873 - }
1874 -}));
1875 -var _duplicateElement = __webpack_require__(/*! ./data/regenerate-local-style-ids/duplicate-element */ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/duplicate-element.js");
1876 -var _pasteElement = __webpack_require__(/*! ./data/regenerate-local-style-ids/paste-element */ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/paste-element.js");
1877 -var _importElement = __webpack_require__(/*! ./data/regenerate-local-style-ids/import-element */ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/import-element.js");
1109 +var _createElement = __webpack_require__(/*! ./data/regenerate-local-style-ids/create-element */ "../modules/atomic-widgets/assets/js/editor/hooks/data/regenerate-local-style-ids/create-element.js");
1878 1110
1879 1111 /***/ }),
1880 1112
1881 1113 /***/ "../modules/atomic-widgets/assets/js/editor/utils/get-element-children.js":
@@ -1892,13 +1124,24 @@
1892 1124 value: true
1893 1125 }));
1894 1126 exports.getElementChildren = getElementChildren;
1895 1127 var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js"));
1128 +/**
1129 + * @typedef {import('assets/dev/js/editor/container/container')} Container
1130 + */
1131 +
1132 +/**
1133 + * return all recursively nested elements in a flat array
1134 + * @param {Container} model
1135 + * @return {Container[]}
1136 + */
1896 1137 function getElementChildren(model) {
1897 - var _model$get$models, _model$get;
1898 - 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 : [];
1899 - var children = childModels.flatMap(getElementChildren);
1900 - return [model].concat((0, _toConsumableArray2.default)(children));
1138 + var _flatMap, _container$model$get$, _container$model;
1139 + var container = window.elementor.getContainer(model.id);
1140 + 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) {
1141 + return getElementChildren(child);
1142 + })) !== null && _flatMap !== void 0 ? _flatMap : [];
1143 + return [container].concat((0, _toConsumableArray2.default)(children));
1901 1144 }
1902 1145
1903 1146 /***/ }),
1904 1147
@@ -1954,35 +1197,37 @@
1954 1197 var _getElementChildren = __webpack_require__(/*! ./get-element-children */ "../modules/atomic-widgets/assets/js/editor/utils/get-element-children.js");
1955 1198 var _getRandomStyleId = __webpack_require__(/*! ./get-random-style-id */ "../modules/atomic-widgets/assets/js/editor/utils/get-random-style-id.js");
1956 1199 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; }
1957 1200 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; }
1958 -function regenerateLocalStyleIds(container) {
1959 - var allElements = (0, _getElementChildren.getElementChildren)(container.model);
1960 - var styledElements = allElements.filter(function (model) {
1961 - var _model$get;
1962 - return Object.keys((_model$get = model.get('styles')) !== null && _model$get !== void 0 ? _model$get : {}).length > 0;
1963 - });
1964 - updateElementsStyleIdsInsideOut(styledElements);
1965 -}
1201 +/**
1202 + * @typedef {import('assets/dev/js/editor/container/container')} Container
1203 + */
1204 +
1966 1205 function isClassesProp(prop) {
1967 1206 return prop.$$type && 'classes' === prop.$$type && Array.isArray(prop.value) && prop.value.length > 0;
1968 1207 }
1969 -function calculateNewStylesAndSettings(element, model, settings) {
1970 - var _settings$toJSON;
1971 - var originalStyles = model.get('styles');
1972 - var settingsJson = (_settings$toJSON = settings === null || settings === void 0 ? void 0 : settings.toJSON()) !== null && _settings$toJSON !== void 0 ? _settings$toJSON : {};
1973 - var classesProps = Object.entries(settingsJson).filter(function (_ref) {
1208 +
1209 +/**
1210 + * Update the style id of the container.
1211 + * @param {Container} container
1212 + */
1213 +function updateStyleId(container) {
1214 + var _container$settings$t, _container$settings;
1215 + var originalStyles = container.model.get('styles');
1216 + 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 : {};
1217 + var classesProps = Object.entries(settings).filter(function (_ref) {
1974 1218 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
1975 1219 propValue = _ref2[1];
1976 1220 return isClassesProp(propValue);
1977 1221 });
1978 1222 var newStyles = {};
1979 - var changedIds = {};
1223 + var changedIds = {}; // Conversion map - {[originalId: string]: newId: string}
1224 +
1980 1225 Object.entries(originalStyles).forEach(function (_ref3) {
1981 1226 var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
1982 1227 originalStyleId = _ref4[0],
1983 1228 style = _ref4[1];
1984 - var newStyleId = (0, _getRandomStyleId.getRandomStyleId)(element, newStyles);
1229 + var newStyleId = (0, _getRandomStyleId.getRandomStyleId)(container, newStyles);
1985 1230 newStyles[newStyleId] = structuredClone(_objectSpread(_objectSpread({}, style), {}, {
1986 1231 id: newStyleId
1987 1232 }));
1988 1233 changedIds[originalStyleId] = newStyleId;
@@ -1997,62 +1242,100 @@
1997 1242 return (_changedIds$className = changedIds[className]) !== null && _changedIds$className !== void 0 ? _changedIds$className : className;
1998 1243 })
1999 1244 })];
2000 1245 }, {});
2001 - return {
2002 - newStyles: newStyles,
2003 - newSettings: Object.fromEntries(newClassesProps)
2004 - };
2005 -}
2006 -function updateStyleIdForContainer(container) {
2007 - var model = container.model,
2008 - settings = container.settings;
2009 - var _calculateNewStylesAn = calculateNewStylesAndSettings(container, model, settings),
2010 - newStyles = _calculateNewStylesAn.newStyles,
2011 - newSettings = _calculateNewStylesAn.newSettings;
1246 +
1247 + // Update classes array
2012 1248 $e.internal('document/elements/set-settings', {
2013 1249 container: container,
2014 - settings: newSettings
1250 + settings: Object.fromEntries(newClassesProps)
2015 1251 });
2016 - model.set('styles', newStyles);
1252 +
1253 + // Update local styles
1254 + container.model.set('styles', newStyles);
2017 1255 }
2018 -function updateStyleIdForModel(model) {
2019 - var settings = model.get('settings');
2020 - var _calculateNewStylesAn2 = calculateNewStylesAndSettings(model, model, settings),
2021 - newStyles = _calculateNewStylesAn2.newStyles,
2022 - newSettings = _calculateNewStylesAn2.newSettings;
2023 - settings.set(newSettings);
2024 - model.set('styles', newStyles);
1256 +
1257 +/**
1258 + * Get a container - iterate over its children, find all styled atomic widgets and update their style ids
1259 + * @param {Container} container
1260 + */
1261 +function regenerateLocalStyleIds(container) {
1262 + var allElements = (0, _getElementChildren.getElementChildren)(container);
1263 + var styledElements = allElements.filter(function (element) {
1264 + var _element$model$get;
1265 + return Object.keys((_element$model$get = element.model.get('styles')) !== null && _element$model$get !== void 0 ? _element$model$get : {}).length > 0;
1266 + });
1267 + styledElements === null || styledElements === void 0 || styledElements.forEach(updateStyleId);
2025 1268 }
2026 -function updateStyleId(model) {
2027 - var container = window.elementor.getContainer(model.get('id'));
2028 1269
2029 - // If view exists, update the styles via the container
2030 - if (container) {
2031 - updateStyleIdForContainer(container);
2032 - return;
2033 - }
2034 - updateStyleIdForModel(model);
1270 +/***/ }),
1271 +
1272 +/***/ "../node_modules/react-dom/client.js":
1273 +/*!*******************************************!*\
1274 + !*** ../node_modules/react-dom/client.js ***!
1275 + \*******************************************/
1276 +/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1277 +
1278 +"use strict";
1279 +
1280 +
1281 +var m = __webpack_require__(/*! react-dom */ "react-dom");
1282 +if (false) {} else {
1283 + var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1284 + exports.createRoot = function(c, o) {
1285 + i.usingClientEntryPoint = true;
1286 + try {
1287 + return m.createRoot(c, o);
1288 + } finally {
1289 + i.usingClientEntryPoint = false;
1290 + }
1291 + };
1292 + exports.hydrateRoot = function(c, h, o) {
1293 + i.usingClientEntryPoint = true;
1294 + try {
1295 + return m.hydrateRoot(c, h, o);
1296 + } finally {
1297 + i.usingClientEntryPoint = false;
1298 + }
1299 + };
2035 1300 }
2036 -function updateElementsStyleIdsInsideOut(styledElements) {
2037 - styledElements === null || styledElements === void 0 || styledElements.reverse().forEach(updateStyleId);
2038 -}
2039 1301
1302 +
2040 1303 /***/ }),
2041 1304
2042 -/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js":
2043 -/*!***************************************************************!*\
2044 - !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***!
2045 - \***************************************************************/
1305 +/***/ "react":
1306 +/*!************************!*\
1307 + !*** external "React" ***!
1308 + \************************/
2046 1309 /***/ ((module) => {
2047 1310
2048 -function _OverloadYield(e, d) {
2049 - this.v = e, this.k = d;
2050 -}
2051 -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;
1311 +"use strict";
1312 +module.exports = React;
2052 1313
2053 1314 /***/ }),
2054 1315
1316 +/***/ "react-dom":
1317 +/*!***************************!*\
1318 + !*** external "ReactDOM" ***!
1319 + \***************************/
1320 +/***/ ((module) => {
1321 +
1322 +"use strict";
1323 +module.exports = ReactDOM;
1324 +
1325 +/***/ }),
1326 +
1327 +/***/ "@wordpress/i18n":
1328 +/*!**************************!*\
1329 + !*** external "wp.i18n" ***!
1330 + \**************************/
1331 +/***/ ((module) => {
1332 +
1333 +"use strict";
1334 +module.exports = wp.i18n;
1335 +
1336 +/***/ }),
1337 +
2055 1338 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
2056 1339 /*!******************************************************************!*\
2057 1340 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
2058 1341 \******************************************************************/
@@ -2107,43 +1390,8 @@
2107 1390 module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
2108 1391
2109 1392 /***/ }),
2110 1393
2111 -/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
2112 -/*!******************************************************************!*\
2113 - !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
2114 - \******************************************************************/
2115 -/***/ ((module) => {
2116 -
2117 -function asyncGeneratorStep(n, t, e, r, o, a, c) {
2118 - try {
2119 - var i = n[a](c),
2120 - u = i.value;
2121 - } catch (n) {
2122 - return void e(n);
2123 - }
2124 - i.done ? t(u) : Promise.resolve(u).then(r, o);
2125 -}
2126 -function _asyncToGenerator(n) {
2127 - return function () {
2128 - var t = this,
2129 - e = arguments;
2130 - return new Promise(function (r, o) {
2131 - var a = n.apply(t, e);
2132 - function _next(n) {
2133 - asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
2134 - }
2135 - function _throw(n) {
2136 - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
2137 - }
2138 - _next(void 0);
2139 - });
2140 - };
2141 -}
2142 -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
2143 -
2144 -/***/ }),
2145 -
2146 1394 /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
2147 1395 /*!****************************************************************!*\
2148 1396 !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
2149 1397 \****************************************************************/
@@ -2362,344 +1610,8 @@
2362 1610 module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
2363 1611
2364 1612 /***/ }),
2365 1613
2366 -/***/ "../node_modules/@babel/runtime/helpers/regenerator.js":
2367 -/*!*************************************************************!*\
2368 - !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***!
2369 - \*************************************************************/
2370 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2371 -
2372 -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js");
2373 -function _regenerator() {
2374 - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
2375 - var e,
2376 - t,
2377 - r = "function" == typeof Symbol ? Symbol : {},
2378 - n = r.iterator || "@@iterator",
2379 - o = r.toStringTag || "@@toStringTag";
2380 - function i(r, n, o, i) {
2381 - var c = n && n.prototype instanceof Generator ? n : Generator,
2382 - u = Object.create(c.prototype);
2383 - return regeneratorDefine(u, "_invoke", function (r, n, o) {
2384 - var i,
2385 - c,
2386 - u,
2387 - f = 0,
2388 - p = o || [],
2389 - y = !1,
2390 - G = {
2391 - p: 0,
2392 - n: 0,
2393 - v: e,
2394 - a: d,
2395 - f: d.bind(e, 4),
2396 - d: function d(t, r) {
2397 - return i = t, c = 0, u = e, G.n = r, a;
2398 - }
2399 - };
2400 - function d(r, n) {
2401 - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
2402 - var o,
2403 - i = p[t],
2404 - d = G.p,
2405 - l = i[2];
2406 - 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));
2407 - }
2408 - if (o || r > 1) return a;
2409 - throw y = !0, n;
2410 - }
2411 - return function (o, p, l) {
2412 - if (f > 1) throw TypeError("Generator is already running");
2413 - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
2414 - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
2415 - try {
2416 - if (f = 2, i) {
2417 - if (c || (o = "next"), t = i[o]) {
2418 - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
2419 - if (!t.done) return t;
2420 - u = t.value, c < 2 && (c = 0);
2421 - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
2422 - i = e;
2423 - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
2424 - } catch (t) {
2425 - i = e, c = 1, u = t;
2426 - } finally {
2427 - f = 1;
2428 - }
2429 - }
2430 - return {
2431 - value: t,
2432 - done: y
2433 - };
2434 - };
2435 - }(r, o, i), !0), u;
2436 - }
2437 - var a = {};
2438 - function Generator() {}
2439 - function GeneratorFunction() {}
2440 - function GeneratorFunctionPrototype() {}
2441 - t = Object.getPrototypeOf;
2442 - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {
2443 - return this;
2444 - }), t),
2445 - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
2446 - function f(e) {
2447 - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
2448 - }
2449 - 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 () {
2450 - return this;
2451 - }), regeneratorDefine(u, "toString", function () {
2452 - return "[object Generator]";
2453 - }), (module.exports = _regenerator = function _regenerator() {
2454 - return {
2455 - w: i,
2456 - m: f
2457 - };
2458 - }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
2459 -}
2460 -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
2461 -
2462 -/***/ }),
2463 -
2464 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js":
2465 -/*!******************************************************************!*\
2466 - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***!
2467 - \******************************************************************/
2468 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2469 -
2470 -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js");
2471 -function _regeneratorAsync(n, e, r, t, o) {
2472 - var a = regeneratorAsyncGen(n, e, r, t, o);
2473 - return a.next().then(function (n) {
2474 - return n.done ? n.value : a.next();
2475 - });
2476 -}
2477 -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports;
2478 -
2479 -/***/ }),
2480 -
2481 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js":
2482 -/*!*********************************************************************!*\
2483 - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***!
2484 - \*********************************************************************/
2485 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2486 -
2487 -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js");
2488 -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js");
2489 -function _regeneratorAsyncGen(r, e, t, o, n) {
2490 - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);
2491 -}
2492 -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports;
2493 -
2494 -/***/ }),
2495 -
2496 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js":
2497 -/*!**************************************************************************!*\
2498 - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***!
2499 - \**************************************************************************/
2500 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2501 -
2502 -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js");
2503 -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js");
2504 -function AsyncIterator(t, e) {
2505 - function n(r, o, i, f) {
2506 - try {
2507 - var c = t[r](o),
2508 - u = c.value;
2509 - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {
2510 - n("next", t, i, f);
2511 - }, function (t) {
2512 - n("throw", t, i, f);
2513 - }) : e.resolve(u).then(function (t) {
2514 - c.value = t, i(c);
2515 - }, function (t) {
2516 - return n("throw", t, i, f);
2517 - });
2518 - } catch (t) {
2519 - f(t);
2520 - }
2521 - }
2522 - var r;
2523 - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
2524 - return this;
2525 - })), regeneratorDefine(this, "_invoke", function (t, o, i) {
2526 - function f() {
2527 - return new e(function (e, r) {
2528 - n(t, i, e, r);
2529 - });
2530 - }
2531 - return r = r ? r.then(f, f) : f();
2532 - }, !0);
2533 -}
2534 -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports;
2535 -
2536 -/***/ }),
2537 -
2538 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js":
2539 -/*!*******************************************************************!*\
2540 - !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***!
2541 - \*******************************************************************/
2542 -/***/ ((module) => {
2543 -
2544 -function _regeneratorDefine(e, r, n, t) {
2545 - var i = Object.defineProperty;
2546 - try {
2547 - i({}, "", {});
2548 - } catch (e) {
2549 - i = 0;
2550 - }
2551 - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {
2552 - function o(r, n) {
2553 - _regeneratorDefine(e, r, function (e) {
2554 - return this._invoke(r, n, e);
2555 - });
2556 - }
2557 - r ? i ? i(e, r, {
2558 - value: n,
2559 - enumerable: !t,
2560 - configurable: !t,
2561 - writable: !t
2562 - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
2563 - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t);
2564 -}
2565 -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports;
2566 -
2567 -/***/ }),
2568 -
2569 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js":
2570 -/*!*****************************************************************!*\
2571 - !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***!
2572 - \*****************************************************************/
2573 -/***/ ((module) => {
2574 -
2575 -function _regeneratorKeys(e) {
2576 - var n = Object(e),
2577 - r = [];
2578 - for (var t in n) r.unshift(t);
2579 - return function e() {
2580 - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
2581 - return e.done = !0, e;
2582 - };
2583 -}
2584 -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports;
2585 -
2586 -/***/ }),
2587 -
2588 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
2589 -/*!********************************************************************!*\
2590 - !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
2591 - \********************************************************************/
2592 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2593 -
2594 -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js");
2595 -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js");
2596 -var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js");
2597 -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js");
2598 -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js");
2599 -var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js");
2600 -var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js");
2601 -function _regeneratorRuntime() {
2602 - "use strict";
2603 -
2604 - var r = regenerator(),
2605 - e = r.m(_regeneratorRuntime),
2606 - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
2607 - function n(r) {
2608 - var e = "function" == typeof r && r.constructor;
2609 - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
2610 - }
2611 - var o = {
2612 - "throw": 1,
2613 - "return": 2,
2614 - "break": 3,
2615 - "continue": 3
2616 - };
2617 - function a(r) {
2618 - var e, t;
2619 - return function (n) {
2620 - e || (e = {
2621 - stop: function stop() {
2622 - return t(n.a, 2);
2623 - },
2624 - "catch": function _catch() {
2625 - return n.v;
2626 - },
2627 - abrupt: function abrupt(r, e) {
2628 - return t(n.a, o[r], e);
2629 - },
2630 - delegateYield: function delegateYield(r, o, a) {
2631 - return e.resultName = o, t(n.d, regeneratorValues(r), a);
2632 - },
2633 - finish: function finish(r) {
2634 - return t(n.f, r);
2635 - }
2636 - }, t = function t(r, _t, o) {
2637 - n.p = e.prev, n.n = e.next;
2638 - try {
2639 - return r(_t, o);
2640 - } finally {
2641 - e.next = n.n;
2642 - }
2643 - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
2644 - try {
2645 - return r.call(this, e);
2646 - } finally {
2647 - n.p = e.prev, n.n = e.next;
2648 - }
2649 - };
2650 - }
2651 - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
2652 - return {
2653 - wrap: function wrap(e, t, n, o) {
2654 - return r.w(a(e), t, n, o && o.reverse());
2655 - },
2656 - isGeneratorFunction: n,
2657 - mark: r.m,
2658 - awrap: function awrap(r, e) {
2659 - return new OverloadYield(r, e);
2660 - },
2661 - AsyncIterator: regeneratorAsyncIterator,
2662 - async: function async(r, e, t, o, u) {
2663 - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
2664 - },
2665 - keys: regeneratorKeys,
2666 - values: regeneratorValues
2667 - };
2668 - }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
2669 -}
2670 -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
2671 -
2672 -/***/ }),
2673 -
2674 -/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js":
2675 -/*!*******************************************************************!*\
2676 - !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***!
2677 - \*******************************************************************/
2678 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2679 -
2680 -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
2681 -function _regeneratorValues(e) {
2682 - if (null != e) {
2683 - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
2684 - r = 0;
2685 - if (t) return t.call(e);
2686 - if ("function" == typeof e.next) return e;
2687 - if (!isNaN(e.length)) return {
2688 - next: function next() {
2689 - return e && r >= e.length && (e = void 0), {
2690 - value: e && e[r++],
2691 - done: !e
2692 - };
2693 - }
2694 - };
2695 - }
2696 - throw new TypeError(_typeof(e) + " is not iterable");
2697 -}
2698 -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports;
2699 -
2700 -/***/ }),
2701 -
2702 1614 /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
2703 1615 /*!****************************************************************!*\
2704 1616 !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
2705 1617 \****************************************************************/
@@ -2834,100 +1746,8 @@
2834 1746 }
2835 1747 }
2836 1748 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2837 1749
2838 -/***/ }),
2839 -
2840 -/***/ "../node_modules/@babel/runtime/regenerator/index.js":
2841 -/*!***********************************************************!*\
2842 - !*** ../node_modules/@babel/runtime/regenerator/index.js ***!
2843 - \***********************************************************/
2844 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2845 -
2846 -// TODO(Babel 8): Remove this file.
2847 -
2848 -var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();
2849 -module.exports = runtime;
2850 -
2851 -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
2852 -try {
2853 - regeneratorRuntime = runtime;
2854 -} catch (accidentalStrictMode) {
2855 - if (typeof globalThis === "object") {
2856 - globalThis.regeneratorRuntime = runtime;
2857 - } else {
2858 - Function("r", "regeneratorRuntime = r")(runtime);
2859 - }
2860 -}
2861 -
2862 -
2863 -/***/ }),
2864 -
2865 -/***/ "../node_modules/react-dom/client.js":
2866 -/*!*******************************************!*\
2867 - !*** ../node_modules/react-dom/client.js ***!
2868 - \*******************************************/
2869 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2870 -
2871 -"use strict";
2872 -
2873 -
2874 -var m = __webpack_require__(/*! react-dom */ "react-dom");
2875 -if (false) // removed by dead control flow
2876 -{} else {
2877 - var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2878 - exports.createRoot = function(c, o) {
2879 - i.usingClientEntryPoint = true;
2880 - try {
2881 - return m.createRoot(c, o);
2882 - } finally {
2883 - i.usingClientEntryPoint = false;
2884 - }
2885 - };
2886 - exports.hydrateRoot = function(c, h, o) {
2887 - i.usingClientEntryPoint = true;
2888 - try {
2889 - return m.hydrateRoot(c, h, o);
2890 - } finally {
2891 - i.usingClientEntryPoint = false;
2892 - }
2893 - };
2894 -}
2895 -
2896 -
2897 -/***/ }),
2898 -
2899 -/***/ "@wordpress/i18n":
2900 -/*!**************************!*\
2901 - !*** external "wp.i18n" ***!
2902 - \**************************/
2903 -/***/ ((module) => {
2904 -
2905 -"use strict";
2906 -module.exports = wp.i18n;
2907 -
2908 -/***/ }),
2909 -
2910 -/***/ "react":
2911 -/*!************************!*\
2912 - !*** external "React" ***!
2913 - \************************/
2914 -/***/ ((module) => {
2915 -
2916 -"use strict";
2917 -module.exports = React;
2918 -
2919 -/***/ }),
2920 -
2921 -/***/ "react-dom":
2922 -/*!***************************!*\
2923 - !*** external "ReactDOM" ***!
2924 - \***************************/
2925 -/***/ ((module) => {
2926 -
2927 -"use strict";
2928 -module.exports = ReactDOM;
2929 -
2930 1750 /***/ })
2931 1751
2932 1752 /******/ });
2933 1753 /************************************************************************/
@@ -2965,8 +1785,9 @@
2965 1785 \************************************************************/
2966 1786
2967 1787
2968 1788 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1789 +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
2969 1790 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2970 1791 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2971 1792 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
2972 1793 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
@@ -2971,14 +1792,9 @@
2971 1792 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
2972 1793 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2973 1794 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
2974 1795 var _component = _interopRequireDefault(__webpack_require__(/*! ./component */ "../modules/atomic-widgets/assets/js/editor/component.js"));
2975 -var _atomicElementBaseType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-base-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-base-type.js"));
2976 -var _createAtomicElementBaseView = _interopRequireDefault(__webpack_require__(/*! ./create-atomic-element-base-view */ "../modules/atomic-widgets/assets/js/editor/create-atomic-element-base-view.js"));
2977 -var _atomicElementBaseModel = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-base-model */ "../modules/atomic-widgets/assets/js/editor/atomic-element-base-model.js"));
2978 -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"));
2979 -var _createFlexboxType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/create-flexbox-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-flexbox-type.js"));
2980 -var _createGridType = _interopRequireDefault(__webpack_require__(/*! ./atomic-element-types/create-grid-type */ "../modules/atomic-widgets/assets/js/editor/atomic-element-types/create-grid-type.js"));
1796 +var _atomicWidgetType = __webpack_require__(/*! ./atomic-widget-type */ "../modules/atomic-widgets/assets/js/editor/atomic-widget-type.js");
2981 1797 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)); }
2982 1798 function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
2983 1799 var Module = /*#__PURE__*/function (_elementorModules$edi) {
2984 1800 function Module() {
@@ -2989,32 +1805,30 @@
2989 1805 return (0, _createClass2.default)(Module, [{
2990 1806 key: "onInit",
2991 1807 value: function onInit() {
2992 1808 $e.components.register(new _component.default());
2993 - this.exposeAtomicElementClasses();
2994 - this.registerAtomicElements();
1809 + this.registerAtomicWidgetTypes();
2995 1810 }
2996 1811 }, {
2997 - key: "exposeAtomicElementClasses",
2998 - value: function exposeAtomicElementClasses() {
2999 - elementor.modules.elements.types.AtomicElementBase = _atomicElementBaseType.default;
3000 - elementor.modules.elements.views.createAtomicElementBase = _createAtomicElementBaseView.default;
3001 - elementor.modules.elements.models.AtomicElementBase = _atomicElementBaseModel.default;
1812 + key: "registerAtomicWidgetTypes",
1813 + value: function registerAtomicWidgetTypes() {
1814 + var _elementor$widgetsCac;
1815 + Object.entries((_elementor$widgetsCac = elementor.widgetsCache) !== null && _elementor$widgetsCac !== void 0 ? _elementor$widgetsCac : {}).filter(function (_ref) {
1816 + var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
1817 + widget = _ref2[1];
1818 + return !!widget.atomic;
1819 + }).forEach(function (_ref3) {
1820 + var _ref4 = (0, _slicedToArray2.default)(_ref3, 1),
1821 + type = _ref4[0];
1822 + return elementor.elementsManager.registerElementType(new _atomicWidgetType.AtomicWidgetType(type));
1823 + });
1824 + this.registerAtomicDivBlockType();
3002 1825 }
3003 1826 }, {
3004 - key: "registerAtomicElements",
3005 - value: function registerAtomicElements() {
3006 - this.registerAtomicElementTypeIfAbsent((0, _createDivBlockType.default)());
3007 - this.registerAtomicElementTypeIfAbsent((0, _createFlexboxType.default)());
3008 - this.registerAtomicElementTypeIfAbsent((0, _createGridType.default)());
3009 - }
3010 - }, {
3011 - key: "registerAtomicElementTypeIfAbsent",
3012 - value: function registerAtomicElementTypeIfAbsent(elementType) {
3013 - if (elementor.elementsManager.getElementTypeClass(elementType.getType())) {
3014 - return;
3015 - }
3016 - elementor.elementsManager.registerElementType(elementType);
1827 + key: "registerAtomicDivBlockType",
1828 + value: function registerAtomicDivBlockType() {
1829 + var DivBlock = (__webpack_require__(/*! ./div-block-type */ "../modules/atomic-widgets/assets/js/editor/div-block-type.js")["default"]);
1830 + elementor.elementsManager.registerElementType(new DivBlock());
3017 1831 }
3018 1832 }]);
3019 1833 }(elementorModules.editor.utils.Module);
3020 1834 new Module();