@elementor/editor-components 4.1.0-728 → 4.1.0-730

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.d.mts CHANGED
@@ -9,7 +9,7 @@ import * as React from 'react';
9
9
  import { ElementType, PropsWithChildren } from 'react';
10
10
  import { z } from '@elementor/schema';
11
11
  import { useElement } from '@elementor/editor-editing-panel';
12
- import { V1Document } from '@elementor/editor-documents';
12
+ import { V1Document, Document } from '@elementor/editor-documents';
13
13
  import * as reselect from 'reselect';
14
14
  import { PayloadAction, SliceState } from '@elementor/store';
15
15
  import * as immer_dist_internal_js from 'immer/dist/internal.js';
@@ -1421,4 +1421,6 @@ type ComponentEventData = Record<string, unknown> & {
1421
1421
  declare const trackComponentEvent: ({ action, source, ...data }: ComponentEventData) => void;
1422
1422
  declare const onElementDrop: (_args: unknown, element: V1Element) => void;
1423
1423
 
1424
- export { COMPONENT_WIDGET_TYPE, type Component, type ComponentFormValues, type ComponentId, type ComponentInstanceOverride, type ComponentInstanceOverrideProp, type ComponentInstanceOverridePropValue, type ComponentInstanceOverridesPropValue, type ComponentInstanceProp, type ComponentInstancePropValue, ComponentInstanceProvider, ComponentItem, type ComponentItemProps, ComponentName, type ComponentOverridableProp, type ComponentOverridablePropValue, ComponentSearch, ComponentsList, type ComponentsPathItem, type ComponentsSlice, type ComponentsState, DetachAction, type DocumentSaveStatus, EditComponentAction, EmptySearchResult, type ExtendedWindow, EmptyState as InstanceEmptyState, InstancePanelBody, InstancePanelHeader, LoadingComponents, type OriginPropFields, type OriginalElementData, type OverridableProp, OverridablePropProvider, type OverridableProps, type OverridablePropsGroup, type PublishedComponent, SLICE_NAME, type SanitizeAttributes, SearchProvider, type Source, type StylesDefinition, type UnpublishedComponent, type UpdatedComponentName, apiClient, componentInstanceOverridePropTypeUtil, componentInstanceOverridesPropTypeUtil, componentInstancePropTypeUtil, componentOverridablePropTypeUtil, componentsActions, componentsSelectors, createComponentsAction, filterValidOverridableProps, getContainerByOriginId, getOverridableProp, getPropTypeForComponentOverride, init, isComponentInstance, loadComponentsAssets, onElementDrop, publishDraftComponentsInPageBeforeSave, registerComponentsReducer, resolveOverridePropValue, selectOverridableProps, selectPath, slice, switchToComponent, trackComponentEvent, updateOverridableProp, useComponentInstanceElement, useComponents, useComponentsPermissions, useCurrentComponent, useCurrentComponentId, useFilteredComponents, useInstancePanelData, useIsSanitizedComponent, useOverridablePropValue, useOverridableProps, useSanitizeOverridableProps };
1424
+ declare const getComponentDocumentData: (id: number) => Promise<Document | null>;
1425
+
1426
+ export { COMPONENT_WIDGET_TYPE, type Component, type ComponentFormValues, type ComponentId, type ComponentInstanceOverride, type ComponentInstanceOverrideProp, type ComponentInstanceOverridePropValue, type ComponentInstanceOverridesPropValue, type ComponentInstanceProp, type ComponentInstancePropValue, ComponentInstanceProvider, ComponentItem, type ComponentItemProps, ComponentName, type ComponentOverridableProp, type ComponentOverridablePropValue, ComponentSearch, ComponentsList, type ComponentsPathItem, type ComponentsSlice, type ComponentsState, DetachAction, type DocumentSaveStatus, EditComponentAction, EmptySearchResult, type ExtendedWindow, EmptyState as InstanceEmptyState, InstancePanelBody, InstancePanelHeader, LoadingComponents, type OriginPropFields, type OriginalElementData, type OverridableProp, OverridablePropProvider, type OverridableProps, type OverridablePropsGroup, type PublishedComponent, SLICE_NAME, type SanitizeAttributes, SearchProvider, type Source, type StylesDefinition, type UnpublishedComponent, type UpdatedComponentName, apiClient, componentInstanceOverridePropTypeUtil, componentInstanceOverridesPropTypeUtil, componentInstancePropTypeUtil, componentOverridablePropTypeUtil, componentsActions, componentsSelectors, createComponentsAction, filterValidOverridableProps, getComponentDocumentData, getContainerByOriginId, getOverridableProp, getPropTypeForComponentOverride, init, isComponentInstance, loadComponentsAssets, onElementDrop, publishDraftComponentsInPageBeforeSave, registerComponentsReducer, resolveOverridePropValue, selectOverridableProps, selectPath, slice, switchToComponent, trackComponentEvent, updateOverridableProp, useComponentInstanceElement, useComponents, useComponentsPermissions, useCurrentComponent, useCurrentComponentId, useFilteredComponents, useInstancePanelData, useIsSanitizedComponent, useOverridablePropValue, useOverridableProps, useSanitizeOverridableProps };
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ import * as React from 'react';
9
9
  import { ElementType, PropsWithChildren } from 'react';
10
10
  import { z } from '@elementor/schema';
11
11
  import { useElement } from '@elementor/editor-editing-panel';
12
- import { V1Document } from '@elementor/editor-documents';
12
+ import { V1Document, Document } from '@elementor/editor-documents';
13
13
  import * as reselect from 'reselect';
14
14
  import { PayloadAction, SliceState } from '@elementor/store';
15
15
  import * as immer_dist_internal_js from 'immer/dist/internal.js';
@@ -1421,4 +1421,6 @@ type ComponentEventData = Record<string, unknown> & {
1421
1421
  declare const trackComponentEvent: ({ action, source, ...data }: ComponentEventData) => void;
1422
1422
  declare const onElementDrop: (_args: unknown, element: V1Element) => void;
1423
1423
 
1424
- export { COMPONENT_WIDGET_TYPE, type Component, type ComponentFormValues, type ComponentId, type ComponentInstanceOverride, type ComponentInstanceOverrideProp, type ComponentInstanceOverridePropValue, type ComponentInstanceOverridesPropValue, type ComponentInstanceProp, type ComponentInstancePropValue, ComponentInstanceProvider, ComponentItem, type ComponentItemProps, ComponentName, type ComponentOverridableProp, type ComponentOverridablePropValue, ComponentSearch, ComponentsList, type ComponentsPathItem, type ComponentsSlice, type ComponentsState, DetachAction, type DocumentSaveStatus, EditComponentAction, EmptySearchResult, type ExtendedWindow, EmptyState as InstanceEmptyState, InstancePanelBody, InstancePanelHeader, LoadingComponents, type OriginPropFields, type OriginalElementData, type OverridableProp, OverridablePropProvider, type OverridableProps, type OverridablePropsGroup, type PublishedComponent, SLICE_NAME, type SanitizeAttributes, SearchProvider, type Source, type StylesDefinition, type UnpublishedComponent, type UpdatedComponentName, apiClient, componentInstanceOverridePropTypeUtil, componentInstanceOverridesPropTypeUtil, componentInstancePropTypeUtil, componentOverridablePropTypeUtil, componentsActions, componentsSelectors, createComponentsAction, filterValidOverridableProps, getContainerByOriginId, getOverridableProp, getPropTypeForComponentOverride, init, isComponentInstance, loadComponentsAssets, onElementDrop, publishDraftComponentsInPageBeforeSave, registerComponentsReducer, resolveOverridePropValue, selectOverridableProps, selectPath, slice, switchToComponent, trackComponentEvent, updateOverridableProp, useComponentInstanceElement, useComponents, useComponentsPermissions, useCurrentComponent, useCurrentComponentId, useFilteredComponents, useInstancePanelData, useIsSanitizedComponent, useOverridablePropValue, useOverridableProps, useSanitizeOverridableProps };
1424
+ declare const getComponentDocumentData: (id: number) => Promise<Document | null>;
1425
+
1426
+ export { COMPONENT_WIDGET_TYPE, type Component, type ComponentFormValues, type ComponentId, type ComponentInstanceOverride, type ComponentInstanceOverrideProp, type ComponentInstanceOverridePropValue, type ComponentInstanceOverridesPropValue, type ComponentInstanceProp, type ComponentInstancePropValue, ComponentInstanceProvider, ComponentItem, type ComponentItemProps, ComponentName, type ComponentOverridableProp, type ComponentOverridablePropValue, ComponentSearch, ComponentsList, type ComponentsPathItem, type ComponentsSlice, type ComponentsState, DetachAction, type DocumentSaveStatus, EditComponentAction, EmptySearchResult, type ExtendedWindow, EmptyState as InstanceEmptyState, InstancePanelBody, InstancePanelHeader, LoadingComponents, type OriginPropFields, type OriginalElementData, type OverridableProp, OverridablePropProvider, type OverridableProps, type OverridablePropsGroup, type PublishedComponent, SLICE_NAME, type SanitizeAttributes, SearchProvider, type Source, type StylesDefinition, type UnpublishedComponent, type UpdatedComponentName, apiClient, componentInstanceOverridePropTypeUtil, componentInstanceOverridesPropTypeUtil, componentInstancePropTypeUtil, componentOverridablePropTypeUtil, componentsActions, componentsSelectors, createComponentsAction, filterValidOverridableProps, getComponentDocumentData, getContainerByOriginId, getOverridableProp, getPropTypeForComponentOverride, init, isComponentInstance, loadComponentsAssets, onElementDrop, publishDraftComponentsInPageBeforeSave, registerComponentsReducer, resolveOverridePropValue, selectOverridableProps, selectPath, slice, switchToComponent, trackComponentEvent, updateOverridableProp, useComponentInstanceElement, useComponents, useComponentsPermissions, useCurrentComponent, useCurrentComponentId, useFilteredComponents, useInstancePanelData, useIsSanitizedComponent, useOverridablePropValue, useOverridableProps, useSanitizeOverridableProps };
package/dist/index.js CHANGED
@@ -55,6 +55,7 @@ __export(index_exports, {
55
55
  componentsSelectors: () => componentsSelectors,
56
56
  createComponentsAction: () => createComponentsAction,
57
57
  filterValidOverridableProps: () => filterValidOverridableProps,
58
+ getComponentDocumentData: () => getComponentDocumentData,
58
59
  getContainerByOriginId: () => getContainerByOriginId,
59
60
  getOverridableProp: () => getOverridableProp,
60
61
  getPropTypeForComponentOverride: () => getPropTypeForComponentOverride,
@@ -2365,6 +2366,7 @@ function InstanceEditingPanel() {
2365
2366
  }
2366
2367
 
2367
2368
  // src/components/load-template-components.tsx
2369
+ var React23 = __toESM(require("react"));
2368
2370
  var import_react8 = require("react");
2369
2371
  var import_editor_templates = require("@elementor/editor-templates");
2370
2372
 
@@ -2487,12 +2489,18 @@ function updateDocumentState(documents) {
2487
2489
 
2488
2490
  // src/components/load-template-components.tsx
2489
2491
  var LoadTemplateComponents = () => {
2492
+ if ((0, import_editor_templates.isHandlingTemplateStyles)()) {
2493
+ return /* @__PURE__ */ React23.createElement(LoadTemplateComponentsInternal, null);
2494
+ }
2495
+ return null;
2496
+ };
2497
+ function LoadTemplateComponentsInternal() {
2490
2498
  const templates = (0, import_editor_templates.useLoadedTemplates)();
2491
2499
  (0, import_react8.useEffect)(() => {
2492
2500
  loadComponentsAssets(templates.flatMap((elements) => elements ?? []));
2493
2501
  }, [templates]);
2494
2502
  return null;
2495
- };
2503
+ }
2496
2504
 
2497
2505
  // src/create-component-type.ts
2498
2506
  var import_editor_canvas4 = require("@elementor/editor-canvas");
@@ -3212,6 +3220,7 @@ function init() {
3212
3220
  componentsSelectors,
3213
3221
  createComponentsAction,
3214
3222
  filterValidOverridableProps,
3223
+ getComponentDocumentData,
3215
3224
  getContainerByOriginId,
3216
3225
  getOverridableProp,
3217
3226
  getPropTypeForComponentOverride,