@elementor/editor-components 3.35.0-328 → 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.mjs CHANGED
@@ -586,7 +586,7 @@ function createComponentView(options) {
586
586
  }
587
587
  getComponentId() {
588
588
  const componentInstance = this.options?.model?.get("settings")?.get("component_instance")?.value;
589
- return componentInstance.component_id;
589
+ return componentInstance.component_id.value;
590
590
  }
591
591
  getContextMenuGroups() {
592
592
  const filteredGroups = super.getContextMenuGroups().filter((group) => group.name !== "save");
@@ -682,7 +682,7 @@ var getComponentIds = async (elements) => {
682
682
  const ids = [];
683
683
  const isComponent = [widgetType, elType].includes(TYPE);
684
684
  if (isComponent) {
685
- const componentId = settings?.component_instance?.value?.component_id;
685
+ const componentId = settings?.component_instance?.value?.component_id.value;
686
686
  const document = await getComponentDocumentData(componentId);
687
687
  childElements = document?.elements;
688
688
  if (Boolean(componentId)) {
@@ -829,7 +829,10 @@ var createComponentModel = (component) => {
829
829
  component_instance: {
830
830
  $$type: "component-instance",
831
831
  value: {
832
- component_id: component.id ?? component.uid
832
+ component_id: {
833
+ $$type: "number",
834
+ value: component.id ?? component.uid
835
+ }
833
836
  }
834
837
  }
835
838
  },
@@ -2267,7 +2270,7 @@ function updateComponentInstances(elements, uidToComponentId) {
2267
2270
  }
2268
2271
  function shouldUpdateElement(element, uidToComponentId) {
2269
2272
  if (element.widgetType === "e-component") {
2270
- const currentComponentId = element.settings?.component_instance?.value?.component_id;
2273
+ const currentComponentId = element.settings?.component_instance?.value?.component_id.value;
2271
2274
  if (currentComponentId && uidToComponentId.has(currentComponentId)) {
2272
2275
  return { shouldUpdate: true, newComponentId: uidToComponentId.get(currentComponentId) };
2273
2276
  }
@@ -2280,7 +2283,9 @@ function updateElementComponentId(elementId, componentId) {
2280
2283
  props: {
2281
2284
  component_instance: {
2282
2285
  $$type: "component-instance",
2283
- value: { component_id: componentId }
2286
+ value: {
2287
+ component_id: { $$type: "number", value: componentId }
2288
+ }
2284
2289
  }
2285
2290
  },
2286
2291
  withHistory: false