@elementor/editor-editing-panel 4.5.0-1195 → 4.5.0-1196
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 +29 -6
- package/dist/index.d.ts +29 -6
- package/dist/index.js +140 -99
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +25 -25
- package/src/components/editing-panel-tabs.tsx +14 -3
- package/src/hooks/use-controls-by-widget-type.ts +40 -0
- package/src/index.ts +4 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { PropsWithChildren,
|
|
2
|
+
import { PropsWithChildren, ReactNode, FC, Dispatch, ComponentProps, ComponentType } from 'react';
|
|
3
3
|
import { AutocompleteProps, AutocompleteChangeReason, ListProps, Theme, ChipProps } from '@elementor/ui';
|
|
4
4
|
import * as _elementor_locations from '@elementor/locations';
|
|
5
5
|
import { InjectArgs } from '@elementor/locations';
|
|
6
6
|
import { StyleDefinition, StyleDefinitionState, StyleDefinitionVariant, StyleDefinitionID } from '@elementor/editor-styles';
|
|
7
|
-
import { Control as Control$1, ElementControl, ElementID,
|
|
7
|
+
import { Element, ElementType, Control as Control$1, ElementControl, ElementID, ControlLayout, ControlItem } from '@elementor/editor-elements';
|
|
8
|
+
import { CollapsibleValue } from '@elementor/editor-ui';
|
|
8
9
|
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
9
|
-
import { PropKey, AnyTransformable, PropTypeUtil, PropsSchema, ObjectPropType, TransformablePropValue, PropValue, PropType, Props as Props$
|
|
10
|
+
import { PropKey, AnyTransformable, PropTypeUtil, PropsSchema, ObjectPropType, TransformablePropValue, PropValue, PropType, Props as Props$5 } from '@elementor/editor-props';
|
|
10
11
|
import * as _emotion_styled from '@emotion/styled';
|
|
11
12
|
import * as _mui_system from '@mui/system';
|
|
12
13
|
import { StylesProvider } from '@elementor/editor-styles-repository';
|
|
@@ -76,8 +77,26 @@ declare const CustomCssIndicator: () => react.JSX.Element | null;
|
|
|
76
77
|
|
|
77
78
|
declare const injectIntoPanelHeaderTop: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
78
79
|
|
|
80
|
+
type SettingsTabSlotProps = {
|
|
81
|
+
element: Element;
|
|
82
|
+
elementType: ElementType;
|
|
83
|
+
};
|
|
84
|
+
declare const injectIntoSettingsTab: (args: _elementor_locations.ReplaceableInjectArgs<SettingsTabSlotProps>) => void;
|
|
79
85
|
declare const EditingPanelTabs: () => react.JSX.Element;
|
|
80
86
|
|
|
87
|
+
type Props$4 = PropsWithChildren<{
|
|
88
|
+
title: string;
|
|
89
|
+
defaultExpanded?: boolean;
|
|
90
|
+
titleEnd?: CollapsibleValue<ReactNode | string>;
|
|
91
|
+
titleActions?: ReactNode;
|
|
92
|
+
unmountOnExit?: boolean;
|
|
93
|
+
action?: {
|
|
94
|
+
component: ReactNode;
|
|
95
|
+
onClick: () => void;
|
|
96
|
+
};
|
|
97
|
+
}>;
|
|
98
|
+
declare function Section({ title, children, defaultExpanded, titleEnd, titleActions, unmountOnExit, action, }: Props$4): react.JSX.Element;
|
|
99
|
+
|
|
81
100
|
type SectionContentProps = PropsWithChildren<{
|
|
82
101
|
gap?: number;
|
|
83
102
|
sx?: {
|
|
@@ -94,6 +113,8 @@ declare const SettingsControl: ({ control: { value, type } }: {
|
|
|
94
113
|
control: Control$1 | ElementControl;
|
|
95
114
|
}) => react.JSX.Element | null;
|
|
96
115
|
|
|
116
|
+
declare const SettingsTab: () => react.JSX.Element;
|
|
117
|
+
|
|
97
118
|
type SettingsFieldProps = {
|
|
98
119
|
bind: PropKey;
|
|
99
120
|
propDisplayName: string;
|
|
@@ -2325,6 +2346,8 @@ declare const createTopLevelObjectType: ({ schema }: {
|
|
|
2325
2346
|
schema: PropsSchema;
|
|
2326
2347
|
}) => ObjectPropType;
|
|
2327
2348
|
|
|
2349
|
+
declare function useControlsByWidgetType(type: string): Record<string, Control$1>;
|
|
2350
|
+
|
|
2328
2351
|
declare const useCustomCss: () => {
|
|
2329
2352
|
customCss: {
|
|
2330
2353
|
raw: string;
|
|
@@ -2454,9 +2477,9 @@ type DependencyEffect = {
|
|
|
2454
2477
|
isHidden: boolean;
|
|
2455
2478
|
isDisabled: (propType: PropType) => boolean;
|
|
2456
2479
|
};
|
|
2457
|
-
declare function getElementSettingsWithDefaults(propsSchema: PropsSchema, elementSettings?: Props$
|
|
2458
|
-
declare function extractDependencyEffect(bind: string, propsSchema: PropsSchema, settings: Props$
|
|
2480
|
+
declare function getElementSettingsWithDefaults(propsSchema: PropsSchema, elementSettings?: Props$5): Values;
|
|
2481
|
+
declare function extractDependencyEffect(bind: string, propsSchema: PropsSchema, settings: Props$5): DependencyEffect;
|
|
2459
2482
|
declare function extractOrderedDependencies(dependenciesPerTargetMapping: Record<string, string[]>): string[];
|
|
2460
2483
|
declare function getUpdatedValues(values: Values, dependencies: string[], propsSchema: PropsSchema, elementValues: Values, elementId: string): Values;
|
|
2461
2484
|
|
|
2462
|
-
export { Control as BaseControl, ClassesPropProvider, ControlLabel, type ControlType, ControlTypeContainer, CreatableAutocomplete, type CreatableAutocompleteProps, type CustomCssHeaderProps, CustomCssHeaderSlot, CustomCssIndicator, DEFAULT_PSEUDO_STATES, type DependencyEffect, type DynamicTag, type DynamicTags, type DynamicTagsManager, EditingPanelTabs, type Defaults as ElementPanelDefaults, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type Option, PseudoStateMenuItems, type PseudoStateOption, STYLE_SECTIONS, STYLE_SECTION_NAMES, SectionContent, SectionsList, SettingsControl, SettingsField, StyleIndicator, StyleInheritanceProvider, StyleProvider, type StyleSectionDefinition, type StyleSectionHeaderProps, StyleSections, type StyleTabHeaderProps, StyleTabSection, StyleTabSlot, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, extractDependencyEffect, extractOrderedDependencies, getElementSettingsWithDefaults, getFieldIndicators, getSubtitle, getTitle, getUpdatedValues, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoCustomCssHeader, injectIntoGridFields, injectIntoPanelHeaderTop, injectIntoStyleSectionHeader, injectIntoStyleTab, injectIntoStyleTabHeader, isDynamicPropValue, registerEditingPanelReplacement, registerElementPanelDefaults, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, useClassesProp, useCustomCss, useElement, usePanelActions, usePanelStatus, usePseudoStates, useStateByElement, useStyle, useStylesRerender };
|
|
2485
|
+
export { Control as BaseControl, ClassesPropProvider, ControlLabel, type ControlType, ControlTypeContainer, CreatableAutocomplete, type CreatableAutocompleteProps, type CustomCssHeaderProps, CustomCssHeaderSlot, CustomCssIndicator, DEFAULT_PSEUDO_STATES, type DependencyEffect, type DynamicTag, type DynamicTags, type DynamicTagsManager, EditingPanelTabs, type Defaults as ElementPanelDefaults, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type Option, PseudoStateMenuItems, type PseudoStateOption, STYLE_SECTIONS, STYLE_SECTION_NAMES, Section, SectionContent, SectionsList, SettingsControl, SettingsField, SettingsTab, StyleIndicator, StyleInheritanceProvider, StyleProvider, type StyleSectionDefinition, type StyleSectionHeaderProps, StyleSections, type StyleTabHeaderProps, StyleTabSection, StyleTabSlot, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, extractDependencyEffect, extractOrderedDependencies, getElementSettingsWithDefaults, getFieldIndicators, getSubtitle, getTitle, getUpdatedValues, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoCustomCssHeader, injectIntoGridFields, injectIntoPanelHeaderTop, injectIntoSettingsTab, injectIntoStyleSectionHeader, injectIntoStyleTab, injectIntoStyleTabHeader, isDynamicPropValue, registerEditingPanelReplacement, registerElementPanelDefaults, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, useClassesProp, useControlsByWidgetType, useCustomCss, useElement, usePanelActions, usePanelStatus, usePseudoStates, useStateByElement, useStyle, useStylesRerender };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { PropsWithChildren,
|
|
2
|
+
import { PropsWithChildren, ReactNode, FC, Dispatch, ComponentProps, ComponentType } from 'react';
|
|
3
3
|
import { AutocompleteProps, AutocompleteChangeReason, ListProps, Theme, ChipProps } from '@elementor/ui';
|
|
4
4
|
import * as _elementor_locations from '@elementor/locations';
|
|
5
5
|
import { InjectArgs } from '@elementor/locations';
|
|
6
6
|
import { StyleDefinition, StyleDefinitionState, StyleDefinitionVariant, StyleDefinitionID } from '@elementor/editor-styles';
|
|
7
|
-
import { Control as Control$1, ElementControl, ElementID,
|
|
7
|
+
import { Element, ElementType, Control as Control$1, ElementControl, ElementID, ControlLayout, ControlItem } from '@elementor/editor-elements';
|
|
8
|
+
import { CollapsibleValue } from '@elementor/editor-ui';
|
|
8
9
|
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
9
|
-
import { PropKey, AnyTransformable, PropTypeUtil, PropsSchema, ObjectPropType, TransformablePropValue, PropValue, PropType, Props as Props$
|
|
10
|
+
import { PropKey, AnyTransformable, PropTypeUtil, PropsSchema, ObjectPropType, TransformablePropValue, PropValue, PropType, Props as Props$5 } from '@elementor/editor-props';
|
|
10
11
|
import * as _emotion_styled from '@emotion/styled';
|
|
11
12
|
import * as _mui_system from '@mui/system';
|
|
12
13
|
import { StylesProvider } from '@elementor/editor-styles-repository';
|
|
@@ -76,8 +77,26 @@ declare const CustomCssIndicator: () => react.JSX.Element | null;
|
|
|
76
77
|
|
|
77
78
|
declare const injectIntoPanelHeaderTop: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
78
79
|
|
|
80
|
+
type SettingsTabSlotProps = {
|
|
81
|
+
element: Element;
|
|
82
|
+
elementType: ElementType;
|
|
83
|
+
};
|
|
84
|
+
declare const injectIntoSettingsTab: (args: _elementor_locations.ReplaceableInjectArgs<SettingsTabSlotProps>) => void;
|
|
79
85
|
declare const EditingPanelTabs: () => react.JSX.Element;
|
|
80
86
|
|
|
87
|
+
type Props$4 = PropsWithChildren<{
|
|
88
|
+
title: string;
|
|
89
|
+
defaultExpanded?: boolean;
|
|
90
|
+
titleEnd?: CollapsibleValue<ReactNode | string>;
|
|
91
|
+
titleActions?: ReactNode;
|
|
92
|
+
unmountOnExit?: boolean;
|
|
93
|
+
action?: {
|
|
94
|
+
component: ReactNode;
|
|
95
|
+
onClick: () => void;
|
|
96
|
+
};
|
|
97
|
+
}>;
|
|
98
|
+
declare function Section({ title, children, defaultExpanded, titleEnd, titleActions, unmountOnExit, action, }: Props$4): react.JSX.Element;
|
|
99
|
+
|
|
81
100
|
type SectionContentProps = PropsWithChildren<{
|
|
82
101
|
gap?: number;
|
|
83
102
|
sx?: {
|
|
@@ -94,6 +113,8 @@ declare const SettingsControl: ({ control: { value, type } }: {
|
|
|
94
113
|
control: Control$1 | ElementControl;
|
|
95
114
|
}) => react.JSX.Element | null;
|
|
96
115
|
|
|
116
|
+
declare const SettingsTab: () => react.JSX.Element;
|
|
117
|
+
|
|
97
118
|
type SettingsFieldProps = {
|
|
98
119
|
bind: PropKey;
|
|
99
120
|
propDisplayName: string;
|
|
@@ -2325,6 +2346,8 @@ declare const createTopLevelObjectType: ({ schema }: {
|
|
|
2325
2346
|
schema: PropsSchema;
|
|
2326
2347
|
}) => ObjectPropType;
|
|
2327
2348
|
|
|
2349
|
+
declare function useControlsByWidgetType(type: string): Record<string, Control$1>;
|
|
2350
|
+
|
|
2328
2351
|
declare const useCustomCss: () => {
|
|
2329
2352
|
customCss: {
|
|
2330
2353
|
raw: string;
|
|
@@ -2454,9 +2477,9 @@ type DependencyEffect = {
|
|
|
2454
2477
|
isHidden: boolean;
|
|
2455
2478
|
isDisabled: (propType: PropType) => boolean;
|
|
2456
2479
|
};
|
|
2457
|
-
declare function getElementSettingsWithDefaults(propsSchema: PropsSchema, elementSettings?: Props$
|
|
2458
|
-
declare function extractDependencyEffect(bind: string, propsSchema: PropsSchema, settings: Props$
|
|
2480
|
+
declare function getElementSettingsWithDefaults(propsSchema: PropsSchema, elementSettings?: Props$5): Values;
|
|
2481
|
+
declare function extractDependencyEffect(bind: string, propsSchema: PropsSchema, settings: Props$5): DependencyEffect;
|
|
2459
2482
|
declare function extractOrderedDependencies(dependenciesPerTargetMapping: Record<string, string[]>): string[];
|
|
2460
2483
|
declare function getUpdatedValues(values: Values, dependencies: string[], propsSchema: PropsSchema, elementValues: Values, elementId: string): Values;
|
|
2461
2484
|
|
|
2462
|
-
export { Control as BaseControl, ClassesPropProvider, ControlLabel, type ControlType, ControlTypeContainer, CreatableAutocomplete, type CreatableAutocompleteProps, type CustomCssHeaderProps, CustomCssHeaderSlot, CustomCssIndicator, DEFAULT_PSEUDO_STATES, type DependencyEffect, type DynamicTag, type DynamicTags, type DynamicTagsManager, EditingPanelTabs, type Defaults as ElementPanelDefaults, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type Option, PseudoStateMenuItems, type PseudoStateOption, STYLE_SECTIONS, STYLE_SECTION_NAMES, SectionContent, SectionsList, SettingsControl, SettingsField, StyleIndicator, StyleInheritanceProvider, StyleProvider, type StyleSectionDefinition, type StyleSectionHeaderProps, StyleSections, type StyleTabHeaderProps, StyleTabSection, StyleTabSlot, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, extractDependencyEffect, extractOrderedDependencies, getElementSettingsWithDefaults, getFieldIndicators, getSubtitle, getTitle, getUpdatedValues, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoCustomCssHeader, injectIntoGridFields, injectIntoPanelHeaderTop, injectIntoStyleSectionHeader, injectIntoStyleTab, injectIntoStyleTabHeader, isDynamicPropValue, registerEditingPanelReplacement, registerElementPanelDefaults, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, useClassesProp, useCustomCss, useElement, usePanelActions, usePanelStatus, usePseudoStates, useStateByElement, useStyle, useStylesRerender };
|
|
2485
|
+
export { Control as BaseControl, ClassesPropProvider, ControlLabel, type ControlType, ControlTypeContainer, CreatableAutocomplete, type CreatableAutocompleteProps, type CustomCssHeaderProps, CustomCssHeaderSlot, CustomCssIndicator, DEFAULT_PSEUDO_STATES, type DependencyEffect, type DynamicTag, type DynamicTags, type DynamicTagsManager, EditingPanelTabs, type Defaults as ElementPanelDefaults, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type Option, PseudoStateMenuItems, type PseudoStateOption, STYLE_SECTIONS, STYLE_SECTION_NAMES, Section, SectionContent, SectionsList, SettingsControl, SettingsField, SettingsTab, StyleIndicator, StyleInheritanceProvider, StyleProvider, type StyleSectionDefinition, type StyleSectionHeaderProps, StyleSections, type StyleTabHeaderProps, StyleTabSection, StyleTabSlot, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, extractDependencyEffect, extractOrderedDependencies, getElementSettingsWithDefaults, getFieldIndicators, getSubtitle, getTitle, getUpdatedValues, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoCustomCssHeader, injectIntoGridFields, injectIntoPanelHeaderTop, injectIntoSettingsTab, injectIntoStyleSectionHeader, injectIntoStyleTab, injectIntoStyleTabHeader, isDynamicPropValue, registerEditingPanelReplacement, registerElementPanelDefaults, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, useClassesProp, useControlsByWidgetType, useCustomCss, useElement, usePanelActions, usePanelStatus, usePseudoStates, useStateByElement, useStyle, useStylesRerender };
|