@elementor/editor-components 3.35.0-327 → 3.35.0-329

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.js CHANGED
@@ -598,7 +598,7 @@ function createComponentView(options) {
598
598
  }
599
599
  getComponentId() {
600
600
  const componentInstance = this.options?.model?.get("settings")?.get("component_instance")?.value;
601
- return componentInstance.component_id;
601
+ return componentInstance.component_id.value;
602
602
  }
603
603
  getContextMenuGroups() {
604
604
  const filteredGroups = super.getContextMenuGroups().filter((group) => group.name !== "save");
@@ -694,7 +694,7 @@ var getComponentIds = async (elements) => {
694
694
  const ids = [];
695
695
  const isComponent = [widgetType, elType].includes(TYPE);
696
696
  if (isComponent) {
697
- const componentId = settings?.component_instance?.value?.component_id;
697
+ const componentId = settings?.component_instance?.value?.component_id.value;
698
698
  const document = await getComponentDocumentData(componentId);
699
699
  childElements = document?.elements;
700
700
  if (Boolean(componentId)) {
@@ -837,7 +837,10 @@ var createComponentModel = (component) => {
837
837
  component_instance: {
838
838
  $$type: "component-instance",
839
839
  value: {
840
- component_id: component.id ?? component.uid
840
+ component_id: {
841
+ $$type: "number",
842
+ value: component.id ?? component.uid
843
+ }
841
844
  }
842
845
  }
843
846
  },
@@ -2275,7 +2278,7 @@ function updateComponentInstances(elements, uidToComponentId) {
2275
2278
  }
2276
2279
  function shouldUpdateElement(element, uidToComponentId) {
2277
2280
  if (element.widgetType === "e-component") {
2278
- const currentComponentId = element.settings?.component_instance?.value?.component_id;
2281
+ const currentComponentId = element.settings?.component_instance?.value?.component_id.value;
2279
2282
  if (currentComponentId && uidToComponentId.has(currentComponentId)) {
2280
2283
  return { shouldUpdate: true, newComponentId: uidToComponentId.get(currentComponentId) };
2281
2284
  }
@@ -2288,7 +2291,9 @@ function updateElementComponentId(elementId, componentId) {
2288
2291
  props: {
2289
2292
  component_instance: {
2290
2293
  $$type: "component-instance",
2291
- value: { component_id: componentId }
2294
+ value: {
2295
+ component_id: { $$type: "number", value: componentId }
2296
+ }
2292
2297
  }
2293
2298
  },
2294
2299
  withHistory: false