PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.3
Elementor Website Builder – more than just a page builder v4.3.3
4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 All 456 releases
← All changes | assets/js/editor.js +24 -4 4.3.0-beta2 → 4.3.3 View file →
@@ -49880,9 +49880,19 @@
49880 49880 id: "elementor-panel-elements",
49881 49881 className: "elementor-responsive-panel",
49882 49882 initialize: function initialize() {
49883 49883 this.listenTo(elementor.channels.panelElements, "filter:change", this.onFilterChanged);
49884 + this._syncAtomicComparator();
49884 49885 },
49886 + _syncAtomicComparator: function _syncAtomicComparator() {
49887 + var _elementorCommon$conf;
49888 + if (elementor.channels.panelElements.request("filter:value") && (_elementorCommon$conf = elementorCommon.config.experimentalFeatures) !== null && _elementorCommon$conf !== void 0 && _elementorCommon$conf.e_atomic_elements) this.viewComparator = function(a, b) {
49889 + if (a.get("atomic") && !b.get("atomic")) return -1;
49890 + if (!a.get("atomic") && b.get("atomic")) return 1;
49891 + return 0;
49892 + };
49893 + else this.viewComparator = null;
49894 + },
49885 49895 filter: function filter(childModel) {
49886 49896 var filterValue = elementor.channels.panelElements.request("filter:value");
49887 49897 if (!filterValue) return true;
49888 49898 if (childModel.get("hideOnSearch")) return false;
@@ -49895,9 +49905,11 @@
49895 49905 return regularFilter || localizedFilter;
49896 49906 });
49897 49907 },
49898 49908 onFilterChanged: function onFilterChanged() {
49899 - if (!elementor.channels.panelElements.request("filter:value")) this.onFilterEmpty();
49909 + var filterValue = elementor.channels.panelElements.request("filter:value");
49910 + this._syncAtomicComparator();
49911 + if (!filterValue) this.onFilterEmpty();
49900 49912 this._renderChildren();
49901 49913 this.triggerMethod("children:render");
49902 49914 },
49903 49915 onFilterEmpty: function onFilterEmpty() {
@@ -52536,9 +52548,12 @@
52536 52548 Object.entries(elementor.widgetsCache).forEach(function(_ref) {
52537 52549 var _ref2 = _slicedToArray(_ref, 2);
52538 52550 var widgetName = _ref2[0];
52539 52551 var widgetData = _ref2[1];
52540 - if (widgetData.deprecation && elementor.widgetsCache[widgetData.deprecation.replacement]) elementor.widgetsCache[widgetName].show_in_panel = false;
52552 + if (widgetData.deprecation && elementor.widgetsCache[widgetData.deprecation.replacement]) {
52553 + elementor.widgetsCache[widgetName].show_in_panel = false;
52554 + elementor.widgetsCache[widgetName].hide_on_search = true;
52555 + }
52541 52556 });
52542 52557 _.each(elementor.widgetsCache, function(widget) {
52543 52558 if (elementor.config.document.panel.widgets_settings[widget.widget_type]) widget = _.extend(widget, elementor.config.document.panel.widgets_settings[widget.widget_type]);
52544 52559 if (!_this.shouldAddWidget(widget)) return;
@@ -52603,15 +52618,18 @@
52603 52618 icon: item.icon,
52604 52619 widgetType: item.widget_type,
52605 52620 custom: item.custom,
52606 52621 editable: item.editable,
52622 + showInPanel: item.show_in_panel,
52607 52623 hideOnSearch: item.hide_on_search,
52608 - isNew: this.isWidgetNew(item)
52624 + isNew: this.isWidgetNew(item),
52625 + atomic: !!item.atomic
52609 52626 };
52610 52627 },
52611 52628 initCategoriesCollection: function initCategoriesCollection() {
52612 52629 var categories = {};
52613 52630 this.elementsCollection.each(function(element) {
52631 + if (false === element.get("showInPanel")) return;
52614 52632 _.each(element.get("categories"), function(category) {
52615 52633 if (!categories[category]) categories[category] = [];
52616 52634 categories[category].push(element);
52617 52635 });
@@ -52635,9 +52653,11 @@
52635 52653 this.categoriesCollection = categoriesCollection;
52636 52654 },
52637 52655 shouldAddWidget: function shouldAddWidget(widget) {
52638 52656 var isContainerActive = elementorCommon.config.experimentalFeatures.container;
52639 - return widget.show_in_panel && ("inner-section" !== widget.name || !isContainerActive);
52657 + if ("inner-section" === widget.name && isContainerActive) return false;
52658 + if (!widget.show_in_panel) return Array.isArray(widget.categories) && widget.categories.includes("wordpress");
52659 + return true;
52640 52660 },
52641 52661 deepMerge: function deepMerge(originalObj, replacementObj) {
52642 52662 var mergedObj = _objectSpread({}, originalObj);
52643 52663 for (var key in replacementObj) this.deepMergeKey(mergedObj, originalObj, replacementObj, key);