@elementor/editor-interactions 4.0.0-524 → 4.0.0-526
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +141 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +121 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/components/interaction-settings.tsx +76 -0
- package/src/components/interactions-list-item.tsx +37 -6
- package/src/types.ts +4 -0
- package/src/utils/prop-value-utils.ts +24 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
3
|
import { ElementInteractions, InteractionItemPropValue } from '@elementor/editor-elements';
|
|
4
|
-
export { AnimationPresetPropValue, BooleanPropValue, ConfigPropValue, ElementInteractions, InteractionItemPropValue, NumberPropValue, StringPropValue, TimingConfigPropValue } from '@elementor/editor-elements';
|
|
4
|
+
export { AnimationPresetPropValue, BooleanPropValue, ConfigPropValue, ElementInteractions, ExcludedBreakpointsPropValue, InteractionBreakpointsPropValue, InteractionItemPropValue, NumberPropValue, StringPropValue, TimingConfigPropValue } from '@elementor/editor-elements';
|
|
5
5
|
|
|
6
6
|
declare const EmptyState: ({ onCreateInteraction }: {
|
|
7
7
|
onCreateInteraction: () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
3
|
import { ElementInteractions, InteractionItemPropValue } from '@elementor/editor-elements';
|
|
4
|
-
export { AnimationPresetPropValue, BooleanPropValue, ConfigPropValue, ElementInteractions, InteractionItemPropValue, NumberPropValue, StringPropValue, TimingConfigPropValue } from '@elementor/editor-elements';
|
|
4
|
+
export { AnimationPresetPropValue, BooleanPropValue, ConfigPropValue, ElementInteractions, ExcludedBreakpointsPropValue, InteractionBreakpointsPropValue, InteractionItemPropValue, NumberPropValue, StringPropValue, TimingConfigPropValue } from '@elementor/editor-elements';
|
|
5
5
|
|
|
6
6
|
declare const EmptyState: ({ onCreateInteraction }: {
|
|
7
7
|
onCreateInteraction: () => void;
|
package/dist/index.js
CHANGED
|
@@ -68,11 +68,11 @@ var EmptyState = ({ onCreateInteraction }) => {
|
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
// src/components/interactions-tab.tsx
|
|
71
|
-
var
|
|
72
|
-
var
|
|
71
|
+
var React13 = __toESM(require("react"));
|
|
72
|
+
var import_react10 = require("react");
|
|
73
73
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
74
74
|
var import_session = require("@elementor/session");
|
|
75
|
-
var
|
|
75
|
+
var import_ui7 = require("@elementor/ui");
|
|
76
76
|
|
|
77
77
|
// src/contexts/interactions-context.tsx
|
|
78
78
|
var React2 = __toESM(require("react"));
|
|
@@ -130,12 +130,12 @@ var PopupStateProvider = ({ children }) => {
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
// src/components/interactions-list.tsx
|
|
133
|
-
var
|
|
134
|
-
var
|
|
135
|
-
var
|
|
133
|
+
var React12 = __toESM(require("react"));
|
|
134
|
+
var import_react9 = require("react");
|
|
135
|
+
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
136
136
|
var import_icons3 = require("@elementor/icons");
|
|
137
|
-
var
|
|
138
|
-
var
|
|
137
|
+
var import_ui6 = require("@elementor/ui");
|
|
138
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
139
139
|
|
|
140
140
|
// src/contexts/interactions-item-context.tsx
|
|
141
141
|
var React4 = __toESM(require("react"));
|
|
@@ -200,6 +200,19 @@ var createConfig = ({
|
|
|
200
200
|
var extractBoolean = (prop, fallback = false) => {
|
|
201
201
|
return prop?.value ?? fallback;
|
|
202
202
|
};
|
|
203
|
+
var createExcludedBreakpoints = (breakpoints) => ({
|
|
204
|
+
$$type: "excluded-breakpoints",
|
|
205
|
+
value: breakpoints.map(createString)
|
|
206
|
+
});
|
|
207
|
+
var createInteractionBreakpoints = (excluded) => ({
|
|
208
|
+
$$type: "interaction-breakpoints",
|
|
209
|
+
value: {
|
|
210
|
+
excluded: createExcludedBreakpoints(excluded)
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
var extractExcludedBreakpoints = (breakpoints) => {
|
|
214
|
+
return breakpoints?.value.excluded.value.map((bp) => bp.value) ?? [];
|
|
215
|
+
};
|
|
203
216
|
var createAnimationPreset = ({
|
|
204
217
|
effect,
|
|
205
218
|
type,
|
|
@@ -239,7 +252,8 @@ var createInteractionItem = ({
|
|
|
239
252
|
easing = "easeIn",
|
|
240
253
|
relativeTo,
|
|
241
254
|
offsetTop,
|
|
242
|
-
offsetBottom
|
|
255
|
+
offsetBottom,
|
|
256
|
+
excludedBreakpoints
|
|
243
257
|
}) => ({
|
|
244
258
|
$$type: "interaction-item",
|
|
245
259
|
value: {
|
|
@@ -256,7 +270,10 @@ var createInteractionItem = ({
|
|
|
256
270
|
relativeTo,
|
|
257
271
|
offsetTop,
|
|
258
272
|
offsetBottom
|
|
259
|
-
})
|
|
273
|
+
}),
|
|
274
|
+
...excludedBreakpoints && excludedBreakpoints.length > 0 && {
|
|
275
|
+
breakpoints: createInteractionBreakpoints(excludedBreakpoints)
|
|
276
|
+
}
|
|
260
277
|
}
|
|
261
278
|
});
|
|
262
279
|
var createDefaultInteractionItem = () => {
|
|
@@ -297,8 +314,10 @@ var buildDisplayLabel = (item) => {
|
|
|
297
314
|
};
|
|
298
315
|
|
|
299
316
|
// src/components/interactions-list-item.tsx
|
|
300
|
-
var
|
|
301
|
-
var
|
|
317
|
+
var React11 = __toESM(require("react"));
|
|
318
|
+
var import_react8 = require("react");
|
|
319
|
+
var import_ui5 = require("@elementor/ui");
|
|
320
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
302
321
|
|
|
303
322
|
// src/components/interaction-details.tsx
|
|
304
323
|
var React9 = __toESM(require("react"));
|
|
@@ -622,44 +641,109 @@ function Field({ label, children }) {
|
|
|
622
641
|
return /* @__PURE__ */ React9.createElement(import_ui3.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React9.createElement(import_editor_controls4.PopoverGridContainer, null, /* @__PURE__ */ React9.createElement(import_ui3.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React9.createElement(import_editor_controls4.ControlFormLabel, null, label)), /* @__PURE__ */ React9.createElement(import_ui3.Grid, { item: true, xs: 6 }, children)));
|
|
623
642
|
}
|
|
624
643
|
|
|
644
|
+
// src/components/interaction-settings.tsx
|
|
645
|
+
var React10 = __toESM(require("react"));
|
|
646
|
+
var import_react7 = require("react");
|
|
647
|
+
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
648
|
+
var import_ui4 = require("@elementor/ui");
|
|
649
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
650
|
+
var availableBreakpoints = [
|
|
651
|
+
{ label: (0, import_i18n6.__)("Desktop", "elementor"), value: "desktop" },
|
|
652
|
+
{ label: (0, import_i18n6.__)("Tablet", "elementor"), value: "tablet" },
|
|
653
|
+
{ label: (0, import_i18n6.__)("Mobile", "elementor"), value: "mobile" }
|
|
654
|
+
];
|
|
655
|
+
var InteractionSettings = ({ interaction, onChange }) => {
|
|
656
|
+
const [selectedBreakpoints, setSelectedBreakpoints] = (0, import_react7.useState)(() => {
|
|
657
|
+
const excluded = extractExcludedBreakpoints(interaction.breakpoints);
|
|
658
|
+
return availableBreakpoints.filter(({ value }) => {
|
|
659
|
+
return !excluded.includes(value);
|
|
660
|
+
});
|
|
661
|
+
});
|
|
662
|
+
const handleBreakpointChange = (_, newValue) => {
|
|
663
|
+
setSelectedBreakpoints(newValue);
|
|
664
|
+
const selectedValues = newValue.map((option) => option.value);
|
|
665
|
+
const newExcluded = availableBreakpoints.filter((bp) => !selectedValues.includes(bp.value)).map((bp) => bp.value);
|
|
666
|
+
const updatedInteraction = {
|
|
667
|
+
...interaction,
|
|
668
|
+
...newExcluded.length > 0 && {
|
|
669
|
+
breakpoints: createInteractionBreakpoints(newExcluded)
|
|
670
|
+
}
|
|
671
|
+
};
|
|
672
|
+
if (newExcluded.length === 0) {
|
|
673
|
+
delete updatedInteraction.breakpoints;
|
|
674
|
+
}
|
|
675
|
+
onChange(updatedInteraction);
|
|
676
|
+
};
|
|
677
|
+
return /* @__PURE__ */ React10.createElement(import_editor_controls5.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React10.createElement(import_ui4.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React10.createElement(import_ui4.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React10.createElement(import_editor_controls5.ControlFormLabel, { sx: { width: "100%" } }, (0, import_i18n6.__)("Trigger on", "elementor"))), /* @__PURE__ */ React10.createElement(import_ui4.Grid, { id: "interactions-settings-breakpoints", item: true, xs: 12, sx: { paddingTop: 0 } }, /* @__PURE__ */ React10.createElement(
|
|
678
|
+
import_ui4.Autocomplete,
|
|
679
|
+
{
|
|
680
|
+
fullWidth: true,
|
|
681
|
+
multiple: true,
|
|
682
|
+
value: selectedBreakpoints,
|
|
683
|
+
onChange: handleBreakpointChange,
|
|
684
|
+
size: "tiny",
|
|
685
|
+
options: availableBreakpoints,
|
|
686
|
+
renderInput: (params) => /* @__PURE__ */ React10.createElement(import_ui4.TextField, { ...params })
|
|
687
|
+
}
|
|
688
|
+
))));
|
|
689
|
+
};
|
|
690
|
+
|
|
625
691
|
// src/components/interactions-list-item.tsx
|
|
626
692
|
var InteractionsListItem = ({ index, value }) => {
|
|
693
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui5.useTabs)("details");
|
|
627
694
|
const context = useInteractionItemContext();
|
|
628
|
-
const handleChange = (0,
|
|
695
|
+
const handleChange = (0, import_react8.useCallback)(
|
|
629
696
|
(newInteractionValue) => {
|
|
630
697
|
context?.onInteractionChange(index, newInteractionValue);
|
|
631
698
|
},
|
|
632
699
|
[context, index]
|
|
633
700
|
);
|
|
634
|
-
const handlePlayInteraction = (0,
|
|
701
|
+
const handlePlayInteraction = (0, import_react8.useCallback)(
|
|
635
702
|
(interactionId) => {
|
|
636
703
|
context?.onPlayInteraction(interactionId);
|
|
637
704
|
},
|
|
638
705
|
[context]
|
|
639
706
|
);
|
|
640
|
-
return /* @__PURE__ */
|
|
707
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
|
|
708
|
+
import_ui5.Tabs,
|
|
709
|
+
{
|
|
710
|
+
size: "small",
|
|
711
|
+
variant: "fullWidth",
|
|
712
|
+
"aria-label": (0, import_i18n7.__)("Interaction", "elementor"),
|
|
713
|
+
...getTabsProps()
|
|
714
|
+
},
|
|
715
|
+
/* @__PURE__ */ React11.createElement(import_ui5.Tab, { label: (0, import_i18n7.__)("Details", "elementor"), ...getTabProps("details") }),
|
|
716
|
+
/* @__PURE__ */ React11.createElement(import_ui5.Tab, { label: (0, import_i18n7.__)("Settings", "elementor"), ...getTabProps("settings") })
|
|
717
|
+
), /* @__PURE__ */ React11.createElement(import_ui5.Divider, null), /* @__PURE__ */ React11.createElement(import_ui5.TabPanel, { sx: { p: 0 }, ...getTabPanelProps("details") }, /* @__PURE__ */ React11.createElement(
|
|
641
718
|
InteractionDetails,
|
|
642
719
|
{
|
|
643
|
-
key: index
|
|
720
|
+
key: `details-${index}`,
|
|
644
721
|
interaction: value.value,
|
|
645
722
|
onChange: handleChange,
|
|
646
723
|
onPlayInteraction: handlePlayInteraction
|
|
647
724
|
}
|
|
648
|
-
)
|
|
725
|
+
)), /* @__PURE__ */ React11.createElement(import_ui5.TabPanel, { sx: { p: 0 }, ...getTabPanelProps("settings") }, /* @__PURE__ */ React11.createElement(
|
|
726
|
+
InteractionSettings,
|
|
727
|
+
{
|
|
728
|
+
key: `settings-${index}`,
|
|
729
|
+
interaction: value.value,
|
|
730
|
+
onChange: handleChange
|
|
731
|
+
}
|
|
732
|
+
)));
|
|
649
733
|
};
|
|
650
734
|
|
|
651
735
|
// src/components/interactions-list.tsx
|
|
652
736
|
var MAX_NUMBER_OF_INTERACTIONS = 5;
|
|
653
737
|
function InteractionsList(props) {
|
|
654
738
|
const { interactions, onSelectInteractions, onPlayInteraction, triggerCreateOnShowEmpty } = props;
|
|
655
|
-
const hasInitializedRef = (0,
|
|
656
|
-
const handleUpdateInteractions = (0,
|
|
739
|
+
const hasInitializedRef = (0, import_react9.useRef)(false);
|
|
740
|
+
const handleUpdateInteractions = (0, import_react9.useCallback)(
|
|
657
741
|
(newInteractions) => {
|
|
658
742
|
onSelectInteractions(newInteractions);
|
|
659
743
|
},
|
|
660
744
|
[onSelectInteractions]
|
|
661
745
|
);
|
|
662
|
-
(0,
|
|
746
|
+
(0, import_react9.useEffect)(() => {
|
|
663
747
|
if (triggerCreateOnShowEmpty && !hasInitializedRef.current && (!interactions.items || interactions.items?.length === 0)) {
|
|
664
748
|
hasInitializedRef.current = true;
|
|
665
749
|
const newState = {
|
|
@@ -669,14 +753,14 @@ function InteractionsList(props) {
|
|
|
669
753
|
handleUpdateInteractions(newState);
|
|
670
754
|
}
|
|
671
755
|
}, [triggerCreateOnShowEmpty, interactions.items, handleUpdateInteractions]);
|
|
672
|
-
const isMaxNumberOfInteractionsReached = (0,
|
|
756
|
+
const isMaxNumberOfInteractionsReached = (0, import_react9.useMemo)(() => {
|
|
673
757
|
return interactions.items?.length >= MAX_NUMBER_OF_INTERACTIONS;
|
|
674
758
|
}, [interactions.items?.length]);
|
|
675
|
-
const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */
|
|
759
|
+
const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React12.createElement(import_ui6.Alert, { color: "secondary", icon: /* @__PURE__ */ React12.createElement(import_icons3.InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React12.createElement(import_ui6.AlertTitle, null, (0, import_i18n8.__)("Interactions", "elementor")), /* @__PURE__ */ React12.createElement(import_ui6.Box, { component: "span" }, (0, import_i18n8.__)(
|
|
676
760
|
"You've reached the limit of 5 interactions for this element. Please remove an interaction before creating a new one.",
|
|
677
761
|
"elementor"
|
|
678
762
|
))) : void 0;
|
|
679
|
-
const handleRepeaterChange = (0,
|
|
763
|
+
const handleRepeaterChange = (0, import_react9.useCallback)(
|
|
680
764
|
(newItems) => {
|
|
681
765
|
handleUpdateInteractions({
|
|
682
766
|
...interactions,
|
|
@@ -685,7 +769,7 @@ function InteractionsList(props) {
|
|
|
685
769
|
},
|
|
686
770
|
[interactions, handleUpdateInteractions]
|
|
687
771
|
);
|
|
688
|
-
const handleInteractionChange = (0,
|
|
772
|
+
const handleInteractionChange = (0, import_react9.useCallback)(
|
|
689
773
|
(index, newInteractionValue) => {
|
|
690
774
|
const newItems = structuredClone(interactions.items);
|
|
691
775
|
newItems[index] = {
|
|
@@ -699,19 +783,19 @@ function InteractionsList(props) {
|
|
|
699
783
|
},
|
|
700
784
|
[interactions, handleUpdateInteractions]
|
|
701
785
|
);
|
|
702
|
-
const contextValue = (0,
|
|
786
|
+
const contextValue = (0, import_react9.useMemo)(
|
|
703
787
|
() => ({
|
|
704
788
|
onInteractionChange: handleInteractionChange,
|
|
705
789
|
onPlayInteraction
|
|
706
790
|
}),
|
|
707
791
|
[handleInteractionChange, onPlayInteraction]
|
|
708
792
|
);
|
|
709
|
-
return /* @__PURE__ */
|
|
710
|
-
|
|
793
|
+
return /* @__PURE__ */ React12.createElement(InteractionItemContextProvider, { value: contextValue }, /* @__PURE__ */ React12.createElement(
|
|
794
|
+
import_editor_controls6.Repeater,
|
|
711
795
|
{
|
|
712
796
|
openOnAdd: true,
|
|
713
797
|
openItem: triggerCreateOnShowEmpty ? 0 : void 0,
|
|
714
|
-
label: (0,
|
|
798
|
+
label: (0, import_i18n8.__)("Interactions", "elementor"),
|
|
715
799
|
values: interactions.items,
|
|
716
800
|
setValues: handleRepeaterChange,
|
|
717
801
|
showDuplicate: false,
|
|
@@ -724,14 +808,14 @@ function InteractionsList(props) {
|
|
|
724
808
|
Label: ({ value }) => buildDisplayLabel(value.value),
|
|
725
809
|
Icon: () => null,
|
|
726
810
|
Content: InteractionsListItem,
|
|
727
|
-
actions: (value) => /* @__PURE__ */
|
|
728
|
-
|
|
811
|
+
actions: (value) => /* @__PURE__ */ React12.createElement(import_ui6.Tooltip, { key: "preview", placement: "top", title: (0, import_i18n8.__)("Preview", "elementor") }, /* @__PURE__ */ React12.createElement(
|
|
812
|
+
import_ui6.IconButton,
|
|
729
813
|
{
|
|
730
|
-
"aria-label": (0,
|
|
814
|
+
"aria-label": (0, import_i18n8.__)("Play interaction", "elementor"),
|
|
731
815
|
size: "tiny",
|
|
732
816
|
onClick: () => onPlayInteraction(extractString(value.value.interaction_id))
|
|
733
817
|
},
|
|
734
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ React12.createElement(import_icons3.PlayerPlayIcon, { fontSize: "tiny" })
|
|
735
819
|
))
|
|
736
820
|
}
|
|
737
821
|
}
|
|
@@ -740,13 +824,13 @@ function InteractionsList(props) {
|
|
|
740
824
|
|
|
741
825
|
// src/components/interactions-tab.tsx
|
|
742
826
|
var InteractionsTab = ({ elementId }) => {
|
|
743
|
-
return /* @__PURE__ */
|
|
827
|
+
return /* @__PURE__ */ React13.createElement(PopupStateProvider, null, /* @__PURE__ */ React13.createElement(InteractionsTabContent, { elementId }));
|
|
744
828
|
};
|
|
745
829
|
function InteractionsTabContent({ elementId }) {
|
|
746
830
|
const existingInteractions = (0, import_editor_elements2.useElementInteractions)(elementId);
|
|
747
|
-
const firstInteractionState = (0,
|
|
831
|
+
const firstInteractionState = (0, import_react10.useState)(false);
|
|
748
832
|
const hasInteractions = existingInteractions?.items?.length || firstInteractionState[0];
|
|
749
|
-
return /* @__PURE__ */
|
|
833
|
+
return /* @__PURE__ */ React13.createElement(import_session.SessionStorageProvider, { prefix: elementId }, hasInteractions ? /* @__PURE__ */ React13.createElement(InteractionsProvider, { elementId }, /* @__PURE__ */ React13.createElement(InteractionsContent, { firstInteractionState })) : /* @__PURE__ */ React13.createElement(
|
|
750
834
|
EmptyState,
|
|
751
835
|
{
|
|
752
836
|
onCreateInteraction: () => {
|
|
@@ -759,7 +843,7 @@ function InteractionsContent({
|
|
|
759
843
|
firstInteractionState
|
|
760
844
|
}) {
|
|
761
845
|
const { interactions, setInteractions, playInteractions } = useInteractionsContext();
|
|
762
|
-
const applyInteraction = (0,
|
|
846
|
+
const applyInteraction = (0, import_react10.useCallback)(
|
|
763
847
|
(newInteractions) => {
|
|
764
848
|
firstInteractionState[1](false);
|
|
765
849
|
if (!newInteractions) {
|
|
@@ -770,7 +854,7 @@ function InteractionsContent({
|
|
|
770
854
|
},
|
|
771
855
|
[setInteractions, firstInteractionState]
|
|
772
856
|
);
|
|
773
|
-
return /* @__PURE__ */
|
|
857
|
+
return /* @__PURE__ */ React13.createElement(import_ui7.Stack, { sx: { m: 1, p: 1.5 }, gap: 2 }, /* @__PURE__ */ React13.createElement(
|
|
774
858
|
InteractionsList,
|
|
775
859
|
{
|
|
776
860
|
triggerCreateOnShowEmpty: firstInteractionState[0],
|
|
@@ -896,18 +980,18 @@ var documentElementsInteractionsProvider = createInteractionsProvider({
|
|
|
896
980
|
});
|
|
897
981
|
|
|
898
982
|
// src/components/controls/easing.tsx
|
|
899
|
-
var
|
|
983
|
+
var React14 = __toESM(require("react"));
|
|
900
984
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
901
|
-
var
|
|
902
|
-
var
|
|
985
|
+
var import_ui8 = require("@elementor/ui");
|
|
986
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
903
987
|
var EASING_OPTIONS = {
|
|
904
|
-
easeIn: (0,
|
|
905
|
-
easeInOut: (0,
|
|
906
|
-
easeOut: (0,
|
|
907
|
-
backIn: (0,
|
|
908
|
-
backInOut: (0,
|
|
909
|
-
backOut: (0,
|
|
910
|
-
linear: (0,
|
|
988
|
+
easeIn: (0, import_i18n9.__)("Ease In", "elementor"),
|
|
989
|
+
easeInOut: (0, import_i18n9.__)("Ease In Out", "elementor"),
|
|
990
|
+
easeOut: (0, import_i18n9.__)("Ease Out", "elementor"),
|
|
991
|
+
backIn: (0, import_i18n9.__)("Back In", "elementor"),
|
|
992
|
+
backInOut: (0, import_i18n9.__)("Back In Out", "elementor"),
|
|
993
|
+
backOut: (0, import_i18n9.__)("Back Out", "elementor"),
|
|
994
|
+
linear: (0, import_i18n9.__)("Linear", "elementor")
|
|
911
995
|
};
|
|
912
996
|
var DEFAULT_EASING = "easeIn";
|
|
913
997
|
function Easing({}) {
|
|
@@ -915,28 +999,28 @@ function Easing({}) {
|
|
|
915
999
|
key,
|
|
916
1000
|
label
|
|
917
1001
|
}));
|
|
918
|
-
return /* @__PURE__ */
|
|
1002
|
+
return /* @__PURE__ */ React14.createElement(import_ui8.Select, { value: DEFAULT_EASING, onChange: () => {
|
|
919
1003
|
}, fullWidth: true, displayEmpty: true, size: "tiny" }, availableOptions.map((option) => {
|
|
920
1004
|
const isDisabled = DEFAULT_EASING !== option.key;
|
|
921
|
-
return /* @__PURE__ */
|
|
1005
|
+
return /* @__PURE__ */ React14.createElement(import_editor_ui2.MenuListItem, { key: option.key, value: option.key, disabled: isDisabled }, option.label);
|
|
922
1006
|
}));
|
|
923
1007
|
}
|
|
924
1008
|
|
|
925
1009
|
// src/components/controls/trigger.tsx
|
|
926
|
-
var
|
|
1010
|
+
var React15 = __toESM(require("react"));
|
|
927
1011
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
928
|
-
var
|
|
929
|
-
var
|
|
1012
|
+
var import_ui9 = require("@elementor/ui");
|
|
1013
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
930
1014
|
function Trigger({ value, onChange }) {
|
|
931
1015
|
const availableTriggers = Object.entries({
|
|
932
|
-
load: (0,
|
|
933
|
-
scrollIn: (0,
|
|
1016
|
+
load: (0, import_i18n10.__)("Page load", "elementor"),
|
|
1017
|
+
scrollIn: (0, import_i18n10.__)("Scroll into view", "elementor")
|
|
934
1018
|
}).map(([key, label]) => ({
|
|
935
1019
|
key,
|
|
936
1020
|
label
|
|
937
1021
|
}));
|
|
938
|
-
return /* @__PURE__ */
|
|
939
|
-
|
|
1022
|
+
return /* @__PURE__ */ React15.createElement(
|
|
1023
|
+
import_ui9.Select,
|
|
940
1024
|
{
|
|
941
1025
|
fullWidth: true,
|
|
942
1026
|
displayEmpty: true,
|
|
@@ -945,7 +1029,7 @@ function Trigger({ value, onChange }) {
|
|
|
945
1029
|
value
|
|
946
1030
|
},
|
|
947
1031
|
availableTriggers.map((trigger) => {
|
|
948
|
-
return /* @__PURE__ */
|
|
1032
|
+
return /* @__PURE__ */ React15.createElement(import_editor_ui3.MenuListItem, { key: trigger.key, value: trigger.key }, trigger.label);
|
|
949
1033
|
})
|
|
950
1034
|
);
|
|
951
1035
|
}
|