@elementor/editor-controls 3.35.0-493 → 3.35.0
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 +13 -12
- package/dist/index.d.ts +13 -12
- package/dist/index.js +494 -477
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +510 -496
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/inline-editor-toolbar.tsx +78 -74
- package/src/components/inline-editor.tsx +157 -231
- package/src/components/promotions/display-conditions-control.tsx +61 -0
- package/src/controls/inline-editing-control.tsx +1 -1
- package/src/index.ts +2 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, ReactElement, ComponentType } from 'react';
|
|
2
|
+
import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, ReactElement, Dispatch, SetStateAction, ComponentType } from 'react';
|
|
3
3
|
import { SxProps, SelectProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, PopupState, Theme, FormLabelProps, Grid } from '@elementor/ui';
|
|
4
4
|
import { StringPropValue, PropTypeUtil, PropValue, PropKey, LinkPropValue, TransformablePropValue, PropType, CreateOptions } from '@elementor/editor-props';
|
|
5
5
|
import { StyleDefinitionState } from '@elementor/editor-styles';
|
|
6
|
-
import {
|
|
6
|
+
import { EditorProps, EditorView } from '@tiptap/pm/view';
|
|
7
7
|
import { Editor } from '@tiptap/react';
|
|
8
|
+
import { ElementID } from '@elementor/editor-elements';
|
|
8
9
|
import * as _elementor_locations from '@elementor/locations';
|
|
9
10
|
|
|
10
11
|
type ImageControlProps = {
|
|
@@ -388,6 +389,8 @@ declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props,
|
|
|
388
389
|
props?: ComponentProps<"div">;
|
|
389
390
|
}) => React$1.JSX.Element>;
|
|
390
391
|
|
|
392
|
+
declare const DisplayConditionsControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
393
|
+
|
|
391
394
|
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
392
395
|
|
|
393
396
|
type ClearIconButtonProps = {
|
|
@@ -559,26 +562,24 @@ declare const PopoverGridContainer: React$1.ForwardRefExoticComponent<{
|
|
|
559
562
|
type InlineEditorProps = {
|
|
560
563
|
value: string | null;
|
|
561
564
|
setValue: (value: string | null) => void;
|
|
562
|
-
|
|
565
|
+
editorProps?: EditorProps;
|
|
563
566
|
elementClasses?: string;
|
|
564
567
|
sx?: SxProps<Theme>;
|
|
565
|
-
onBlur?: (
|
|
566
|
-
showToolbar?: boolean;
|
|
568
|
+
onBlur?: () => void;
|
|
567
569
|
autofocus?: boolean;
|
|
568
|
-
getInitialPopoverPosition?: () => {
|
|
569
|
-
left: number;
|
|
570
|
-
top: number;
|
|
571
|
-
};
|
|
572
570
|
expectedTag?: string | null;
|
|
573
|
-
|
|
571
|
+
onEditorCreate?: Dispatch<SetStateAction<Editor | null>>;
|
|
572
|
+
wrapperClassName?: string;
|
|
573
|
+
onSelectionEnd?: (view: EditorView) => void;
|
|
574
574
|
};
|
|
575
575
|
declare const InlineEditor: React$1.ForwardRefExoticComponent<InlineEditorProps & React$1.RefAttributes<unknown>>;
|
|
576
576
|
|
|
577
577
|
type InlineEditorToolbarProps = {
|
|
578
578
|
editor: Editor;
|
|
579
579
|
elementId?: ElementID;
|
|
580
|
+
sx?: SxProps<Theme>;
|
|
580
581
|
};
|
|
581
|
-
declare const InlineEditorToolbar: ({ editor, elementId }: InlineEditorToolbarProps) => React$1.JSX.Element;
|
|
582
|
+
declare const InlineEditorToolbar: ({ editor, elementId, sx }: InlineEditorToolbarProps) => React$1.JSX.Element;
|
|
582
583
|
|
|
583
584
|
type AnyComponentType = ComponentType<any>;
|
|
584
585
|
declare const brandSymbol: unique symbol;
|
|
@@ -671,4 +672,4 @@ declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhe
|
|
|
671
672
|
|
|
672
673
|
declare const useElementCanHaveChildren: () => boolean;
|
|
673
674
|
|
|
674
|
-
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, FloatingActionsBar, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PopoverGridContainer, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFloatingActionsBar, useSyncExternalState };
|
|
675
|
+
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, DisplayConditionsControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, FloatingActionsBar, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PopoverGridContainer, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFloatingActionsBar, useSyncExternalState };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, ReactElement, ComponentType } from 'react';
|
|
2
|
+
import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, ReactElement, Dispatch, SetStateAction, ComponentType } from 'react';
|
|
3
3
|
import { SxProps, SelectProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, PopupState, Theme, FormLabelProps, Grid } from '@elementor/ui';
|
|
4
4
|
import { StringPropValue, PropTypeUtil, PropValue, PropKey, LinkPropValue, TransformablePropValue, PropType, CreateOptions } from '@elementor/editor-props';
|
|
5
5
|
import { StyleDefinitionState } from '@elementor/editor-styles';
|
|
6
|
-
import {
|
|
6
|
+
import { EditorProps, EditorView } from '@tiptap/pm/view';
|
|
7
7
|
import { Editor } from '@tiptap/react';
|
|
8
|
+
import { ElementID } from '@elementor/editor-elements';
|
|
8
9
|
import * as _elementor_locations from '@elementor/locations';
|
|
9
10
|
|
|
10
11
|
type ImageControlProps = {
|
|
@@ -388,6 +389,8 @@ declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props,
|
|
|
388
389
|
props?: ComponentProps<"div">;
|
|
389
390
|
}) => React$1.JSX.Element>;
|
|
390
391
|
|
|
392
|
+
declare const DisplayConditionsControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
393
|
+
|
|
391
394
|
declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
|
|
392
395
|
|
|
393
396
|
type ClearIconButtonProps = {
|
|
@@ -559,26 +562,24 @@ declare const PopoverGridContainer: React$1.ForwardRefExoticComponent<{
|
|
|
559
562
|
type InlineEditorProps = {
|
|
560
563
|
value: string | null;
|
|
561
564
|
setValue: (value: string | null) => void;
|
|
562
|
-
|
|
565
|
+
editorProps?: EditorProps;
|
|
563
566
|
elementClasses?: string;
|
|
564
567
|
sx?: SxProps<Theme>;
|
|
565
|
-
onBlur?: (
|
|
566
|
-
showToolbar?: boolean;
|
|
568
|
+
onBlur?: () => void;
|
|
567
569
|
autofocus?: boolean;
|
|
568
|
-
getInitialPopoverPosition?: () => {
|
|
569
|
-
left: number;
|
|
570
|
-
top: number;
|
|
571
|
-
};
|
|
572
570
|
expectedTag?: string | null;
|
|
573
|
-
|
|
571
|
+
onEditorCreate?: Dispatch<SetStateAction<Editor | null>>;
|
|
572
|
+
wrapperClassName?: string;
|
|
573
|
+
onSelectionEnd?: (view: EditorView) => void;
|
|
574
574
|
};
|
|
575
575
|
declare const InlineEditor: React$1.ForwardRefExoticComponent<InlineEditorProps & React$1.RefAttributes<unknown>>;
|
|
576
576
|
|
|
577
577
|
type InlineEditorToolbarProps = {
|
|
578
578
|
editor: Editor;
|
|
579
579
|
elementId?: ElementID;
|
|
580
|
+
sx?: SxProps<Theme>;
|
|
580
581
|
};
|
|
581
|
-
declare const InlineEditorToolbar: ({ editor, elementId }: InlineEditorToolbarProps) => React$1.JSX.Element;
|
|
582
|
+
declare const InlineEditorToolbar: ({ editor, elementId, sx }: InlineEditorToolbarProps) => React$1.JSX.Element;
|
|
582
583
|
|
|
583
584
|
type AnyComponentType = ComponentType<any>;
|
|
584
585
|
declare const brandSymbol: unique symbol;
|
|
@@ -671,4 +672,4 @@ declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhe
|
|
|
671
672
|
|
|
672
673
|
declare const useElementCanHaveChildren: () => boolean;
|
|
673
674
|
|
|
674
|
-
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, FloatingActionsBar, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PopoverGridContainer, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFloatingActionsBar, useSyncExternalState };
|
|
675
|
+
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, DisplayConditionsControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, FloatingActionsBar, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PopoverGridContainer, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFloatingActionsBar, useSyncExternalState };
|