@elementor/editor-editing-panel 4.0.0-650 → 4.0.0-660

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2083,6 +2083,15 @@ import {
2083
2083
  isDependencyMet
2084
2084
  } from "@elementor/editor-props";
2085
2085
  import { getSessionStorageItem as getSessionStorageItem2, removeSessionStorageItem, setSessionStorageItem as setSessionStorageItem2 } from "@elementor/session";
2086
+ function getElementSettingsWithDefaults(propsSchema, elementSettings) {
2087
+ const elementSettingsWithDefaults = { ...elementSettings };
2088
+ Object.keys(propsSchema).forEach((key) => {
2089
+ if (elementSettingsWithDefaults[key] === null && propsSchema[key].default !== null) {
2090
+ elementSettingsWithDefaults[key] = propsSchema[key].default;
2091
+ }
2092
+ });
2093
+ return elementSettingsWithDefaults;
2094
+ }
2086
2095
  function extractOrderedDependencies(dependenciesPerTargetMapping) {
2087
2096
  return Object.values(dependenciesPerTargetMapping).flat().filter((dependent, index, self) => self.indexOf(dependent) === index);
2088
2097
  }
@@ -2228,17 +2237,6 @@ var createTopLevelObjectType = ({ schema }) => {
2228
2237
 
2229
2238
  // src/controls-registry/settings-field.tsx
2230
2239
  var HISTORY_DEBOUNCE_WAIT2 = 800;
2231
- var getElementSettingsWithDefaults = (propsSchema, elementSettings) => {
2232
- const elementSettingsWithDefaults = { ...elementSettings };
2233
- Object.keys(propsSchema).forEach((key) => {
2234
- if (!(key in elementSettingsWithDefaults) || elementSettingsWithDefaults[key] === null) {
2235
- if (propsSchema[key].default !== null) {
2236
- elementSettingsWithDefaults[key] = propsSchema[key].default;
2237
- }
2238
- }
2239
- });
2240
- return elementSettingsWithDefaults;
2241
- };
2242
2240
  var extractDependencyEffect = (bind, propsSchema, currentElementSettings) => {
2243
2241
  const elementSettingsForDepCheck = getElementSettingsWithDefaults(propsSchema, currentElementSettings);
2244
2242
  const propType = propsSchema[bind];