@elementor/editor-interactions 4.0.0-498 → 4.0.0-499
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.js +114 -79
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +98 -63
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -7
- package/src/components/controls/time-frame-indicator.tsx +36 -25
- package/src/components/interaction-details.tsx +3 -1
- package/src/components/interactions-list.tsx +74 -39
- package/src/utils/prop-value-utils.ts +1 -12
package/dist/index.js
CHANGED
|
@@ -69,10 +69,10 @@ var EmptyState = ({ onCreateInteraction }) => {
|
|
|
69
69
|
|
|
70
70
|
// src/components/interactions-tab.tsx
|
|
71
71
|
var React10 = __toESM(require("react"));
|
|
72
|
-
var
|
|
72
|
+
var import_react7 = 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_ui5 = require("@elementor/ui");
|
|
76
76
|
|
|
77
77
|
// src/contexts/interactions-context.tsx
|
|
78
78
|
var React2 = __toESM(require("react"));
|
|
@@ -131,11 +131,11 @@ var PopupStateProvider = ({ children }) => {
|
|
|
131
131
|
|
|
132
132
|
// src/components/interactions-list.tsx
|
|
133
133
|
var React9 = __toESM(require("react"));
|
|
134
|
-
var
|
|
135
|
-
var
|
|
134
|
+
var import_react6 = require("react");
|
|
135
|
+
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
136
136
|
var import_icons3 = require("@elementor/icons");
|
|
137
|
-
var
|
|
138
|
-
var
|
|
137
|
+
var import_ui4 = require("@elementor/ui");
|
|
138
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
139
139
|
|
|
140
140
|
// src/utils/temp-id-utils.ts
|
|
141
141
|
var TEMP_ID_PREFIX = "temp-";
|
|
@@ -230,7 +230,7 @@ var createDefaultInteractionItem = () => {
|
|
|
230
230
|
trigger: "load",
|
|
231
231
|
effect: "fade",
|
|
232
232
|
type: "in",
|
|
233
|
-
duration:
|
|
233
|
+
duration: 600,
|
|
234
234
|
delay: 0,
|
|
235
235
|
replay: false,
|
|
236
236
|
interactionId: generateTempInteractionId()
|
|
@@ -263,10 +263,10 @@ var buildDisplayLabel = (item) => {
|
|
|
263
263
|
|
|
264
264
|
// src/components/interaction-details.tsx
|
|
265
265
|
var React8 = __toESM(require("react"));
|
|
266
|
-
var
|
|
267
|
-
var
|
|
268
|
-
var
|
|
269
|
-
var
|
|
266
|
+
var import_react5 = require("react");
|
|
267
|
+
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
268
|
+
var import_ui3 = require("@elementor/ui");
|
|
269
|
+
var import_i18n5 = require("@wordpress/i18n");
|
|
270
270
|
|
|
271
271
|
// src/interactions-controls-registry.ts
|
|
272
272
|
var controlsRegistry = /* @__PURE__ */ new Map();
|
|
@@ -370,31 +370,42 @@ function EffectType({ value, onChange }) {
|
|
|
370
370
|
|
|
371
371
|
// src/components/controls/time-frame-indicator.tsx
|
|
372
372
|
var React7 = __toESM(require("react"));
|
|
373
|
-
var
|
|
374
|
-
var
|
|
375
|
-
var
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}
|
|
373
|
+
var import_react4 = require("react");
|
|
374
|
+
var import_editor_controls3 = require("@elementor/editor-controls");
|
|
375
|
+
var import_editor_props = require("@elementor/editor-props");
|
|
376
|
+
var DEFAULT_UNIT = "ms";
|
|
377
|
+
function TimeFrameIndicator({ value, onChange, defaultValue }) {
|
|
378
|
+
const sizeValue = toSizeValue(value ?? defaultValue);
|
|
379
|
+
const setValue = (0, import_react4.useCallback)(
|
|
380
|
+
(size) => {
|
|
381
|
+
onChange(String(size));
|
|
382
|
+
},
|
|
383
|
+
[onChange]
|
|
383
384
|
);
|
|
385
|
+
const handleChange = (newValue) => {
|
|
386
|
+
setValue(newValue.size);
|
|
387
|
+
};
|
|
388
|
+
const handleBlur = () => {
|
|
389
|
+
if (!sizeValue.size) {
|
|
390
|
+
setValue(defaultValue);
|
|
391
|
+
}
|
|
392
|
+
};
|
|
384
393
|
return /* @__PURE__ */ React7.createElement(
|
|
385
|
-
|
|
394
|
+
import_editor_controls3.UnstableSizeField,
|
|
386
395
|
{
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
},
|
|
393
|
-
availableTimeFrames.map((timeFrame) => {
|
|
394
|
-
return /* @__PURE__ */ React7.createElement(import_editor_ui2.MenuListItem, { key: timeFrame.key, value: timeFrame.key }, timeFrame.label);
|
|
395
|
-
})
|
|
396
|
+
units: [DEFAULT_UNIT],
|
|
397
|
+
value: sizeValue,
|
|
398
|
+
onChange: handleChange,
|
|
399
|
+
onBlur: handleBlur
|
|
400
|
+
}
|
|
396
401
|
);
|
|
397
402
|
}
|
|
403
|
+
var toSizeValue = (value) => {
|
|
404
|
+
return import_editor_props.sizePropTypeUtil.create({
|
|
405
|
+
size: Number(value),
|
|
406
|
+
unit: DEFAULT_UNIT
|
|
407
|
+
}).value;
|
|
408
|
+
};
|
|
398
409
|
|
|
399
410
|
// src/components/interaction-details.tsx
|
|
400
411
|
var DEFAULT_VALUES = {
|
|
@@ -402,7 +413,7 @@ var DEFAULT_VALUES = {
|
|
|
402
413
|
effect: "fade",
|
|
403
414
|
type: "in",
|
|
404
415
|
direction: "",
|
|
405
|
-
duration:
|
|
416
|
+
duration: 600,
|
|
406
417
|
delay: 0,
|
|
407
418
|
replay: false,
|
|
408
419
|
relativeTo: "viewport",
|
|
@@ -425,7 +436,7 @@ var controlVisibilityConfig = {
|
|
|
425
436
|
}
|
|
426
437
|
};
|
|
427
438
|
function useControlComponent(controlName, isVisible = true) {
|
|
428
|
-
return (0,
|
|
439
|
+
return (0, import_react5.useMemo)(() => {
|
|
429
440
|
if (!isVisible) {
|
|
430
441
|
return null;
|
|
431
442
|
}
|
|
@@ -503,68 +514,71 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
|
|
|
503
514
|
onPlayInteraction(interactionId);
|
|
504
515
|
}, 0);
|
|
505
516
|
};
|
|
506
|
-
return /* @__PURE__ */ React8.createElement(
|
|
517
|
+
return /* @__PURE__ */ React8.createElement(import_editor_controls4.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React8.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, TriggerControl && /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n5.__)("Trigger", "elementor") }, /* @__PURE__ */ React8.createElement(TriggerControl, { value: trigger, onChange: (v) => updateInteraction({ trigger: v }) })), ReplayControl && /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n5.__)("Replay", "elementor") }, /* @__PURE__ */ React8.createElement(
|
|
507
518
|
ReplayControl,
|
|
508
519
|
{
|
|
509
520
|
value: replay,
|
|
510
521
|
onChange: (v) => updateInteraction({ replay: v }),
|
|
511
522
|
disabled: true
|
|
512
523
|
}
|
|
513
|
-
))), /* @__PURE__ */ React8.createElement(
|
|
524
|
+
))), /* @__PURE__ */ React8.createElement(import_ui3.Divider, null), /* @__PURE__ */ React8.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n5.__)("Effect", "elementor") }, /* @__PURE__ */ React8.createElement(Effect, { value: effect, onChange: (v) => updateInteraction({ effect: v }) })), /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n5.__)("Type", "elementor") }, /* @__PURE__ */ React8.createElement(EffectType, { value: type, onChange: (v) => updateInteraction({ type: v }) })), /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n5.__)("Direction", "elementor") }, /* @__PURE__ */ React8.createElement(
|
|
514
525
|
Direction,
|
|
515
526
|
{
|
|
516
527
|
value: direction,
|
|
517
528
|
onChange: (v) => updateInteraction({ direction: v }),
|
|
518
529
|
interactionType: type
|
|
519
530
|
}
|
|
520
|
-
)), controlVisibilityConfig.duration(interactionValues) && /* @__PURE__ */ React8.createElement(Field, { label: (0,
|
|
531
|
+
)), controlVisibilityConfig.duration(interactionValues) && /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n5.__)("Duration", "elementor") }, /* @__PURE__ */ React8.createElement(
|
|
521
532
|
TimeFrameIndicator,
|
|
522
533
|
{
|
|
523
534
|
value: String(duration),
|
|
524
|
-
onChange: (v) => updateInteraction({ duration: parseInt(v, 10) })
|
|
535
|
+
onChange: (v) => updateInteraction({ duration: parseInt(v, 10) }),
|
|
536
|
+
defaultValue: DEFAULT_VALUES.duration
|
|
525
537
|
}
|
|
526
|
-
)), controlVisibilityConfig.delay(interactionValues) && /* @__PURE__ */ React8.createElement(Field, { label: (0,
|
|
538
|
+
)), controlVisibilityConfig.delay(interactionValues) && /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n5.__)("Delay", "elementor") }, /* @__PURE__ */ React8.createElement(
|
|
527
539
|
TimeFrameIndicator,
|
|
528
540
|
{
|
|
529
541
|
value: String(delay),
|
|
530
|
-
onChange: (v) => updateInteraction({ delay: parseInt(v, 10) })
|
|
542
|
+
onChange: (v) => updateInteraction({ delay: parseInt(v, 10) }),
|
|
543
|
+
defaultValue: DEFAULT_VALUES.delay
|
|
531
544
|
}
|
|
532
|
-
))), controlVisibilityConfig.relativeTo(interactionValues) && RelativeToControl && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
|
|
545
|
+
))), controlVisibilityConfig.relativeTo(interactionValues) && RelativeToControl && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(import_ui3.Divider, null), /* @__PURE__ */ React8.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n5.__)("Relative To", "elementor") }, /* @__PURE__ */ React8.createElement(
|
|
533
546
|
RelativeToControl,
|
|
534
547
|
{
|
|
535
548
|
value: relativeTo,
|
|
536
549
|
onChange: (v) => updateInteraction({ relativeTo: v })
|
|
537
550
|
}
|
|
538
|
-
)), OffsetTopControl && /* @__PURE__ */ React8.createElement(Field, { label: (0,
|
|
551
|
+
)), OffsetTopControl && /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n5.__)("Offset Top", "elementor") }, /* @__PURE__ */ React8.createElement(
|
|
539
552
|
OffsetTopControl,
|
|
540
553
|
{
|
|
541
554
|
value: String(offsetTop),
|
|
542
555
|
onChange: (v) => updateInteraction({ offsetTop: parseInt(v, 10) })
|
|
543
556
|
}
|
|
544
|
-
)), OffsetBottomControl && /* @__PURE__ */ React8.createElement(Field, { label: (0,
|
|
557
|
+
)), OffsetBottomControl && /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n5.__)("Offset Bottom", "elementor") }, /* @__PURE__ */ React8.createElement(
|
|
545
558
|
OffsetBottomControl,
|
|
546
559
|
{
|
|
547
560
|
value: String(offsetBottom),
|
|
548
561
|
onChange: (v) => updateInteraction({ offsetBottom: parseInt(v, 10) })
|
|
549
562
|
}
|
|
550
|
-
))), /* @__PURE__ */ React8.createElement(
|
|
563
|
+
))), /* @__PURE__ */ React8.createElement(import_ui3.Divider, null)));
|
|
551
564
|
};
|
|
552
565
|
function Field({ label, children }) {
|
|
553
|
-
return /* @__PURE__ */ React8.createElement(
|
|
566
|
+
return /* @__PURE__ */ React8.createElement(import_ui3.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React8.createElement(import_editor_controls4.PopoverGridContainer, null, /* @__PURE__ */ React8.createElement(import_ui3.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React8.createElement(import_editor_controls4.ControlFormLabel, null, label)), /* @__PURE__ */ React8.createElement(import_ui3.Grid, { item: true, xs: 6 }, children)));
|
|
554
567
|
}
|
|
555
568
|
|
|
556
569
|
// src/components/interactions-list.tsx
|
|
557
570
|
var MAX_NUMBER_OF_INTERACTIONS = 5;
|
|
571
|
+
var InteractionItemContext = (0, import_react6.createContext)(null);
|
|
558
572
|
function InteractionsList(props) {
|
|
559
573
|
const { interactions, onSelectInteractions, onPlayInteraction, triggerCreateOnShowEmpty } = props;
|
|
560
|
-
const hasInitializedRef = (0,
|
|
561
|
-
const handleUpdateInteractions = (0,
|
|
574
|
+
const hasInitializedRef = (0, import_react6.useRef)(false);
|
|
575
|
+
const handleUpdateInteractions = (0, import_react6.useCallback)(
|
|
562
576
|
(newInteractions) => {
|
|
563
577
|
onSelectInteractions(newInteractions);
|
|
564
578
|
},
|
|
565
579
|
[onSelectInteractions]
|
|
566
580
|
);
|
|
567
|
-
(0,
|
|
581
|
+
(0, import_react6.useEffect)(() => {
|
|
568
582
|
if (triggerCreateOnShowEmpty && !hasInitializedRef.current && (!interactions.items || interactions.items?.length === 0)) {
|
|
569
583
|
hasInitializedRef.current = true;
|
|
570
584
|
const newState = {
|
|
@@ -574,14 +588,14 @@ function InteractionsList(props) {
|
|
|
574
588
|
handleUpdateInteractions(newState);
|
|
575
589
|
}
|
|
576
590
|
}, [triggerCreateOnShowEmpty, interactions.items, handleUpdateInteractions]);
|
|
577
|
-
const isMaxNumberOfInteractionsReached = (0,
|
|
591
|
+
const isMaxNumberOfInteractionsReached = (0, import_react6.useMemo)(() => {
|
|
578
592
|
return interactions.items?.length >= MAX_NUMBER_OF_INTERACTIONS;
|
|
579
593
|
}, [interactions.items?.length]);
|
|
580
|
-
const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React9.createElement(
|
|
594
|
+
const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React9.createElement(import_ui4.Alert, { color: "secondary", icon: /* @__PURE__ */ React9.createElement(import_icons3.InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React9.createElement(import_ui4.AlertTitle, null, (0, import_i18n6.__)("Interactions", "elementor")), /* @__PURE__ */ React9.createElement(import_ui4.Box, { component: "span" }, (0, import_i18n6.__)(
|
|
581
595
|
"You've reached the limit of 5 interactions for this element. Please remove an interaction before creating a new one.",
|
|
582
596
|
"elementor"
|
|
583
597
|
))) : void 0;
|
|
584
|
-
const handleRepeaterChange = (0,
|
|
598
|
+
const handleRepeaterChange = (0, import_react6.useCallback)(
|
|
585
599
|
(newItems) => {
|
|
586
600
|
handleUpdateInteractions({
|
|
587
601
|
...interactions,
|
|
@@ -590,7 +604,7 @@ function InteractionsList(props) {
|
|
|
590
604
|
},
|
|
591
605
|
[interactions, handleUpdateInteractions]
|
|
592
606
|
);
|
|
593
|
-
const handleInteractionChange = (0,
|
|
607
|
+
const handleInteractionChange = (0, import_react6.useCallback)(
|
|
594
608
|
(index, newInteractionValue) => {
|
|
595
609
|
const newItems = structuredClone(interactions.items);
|
|
596
610
|
newItems[index] = {
|
|
@@ -604,12 +618,19 @@ function InteractionsList(props) {
|
|
|
604
618
|
},
|
|
605
619
|
[interactions, handleUpdateInteractions]
|
|
606
620
|
);
|
|
607
|
-
|
|
608
|
-
|
|
621
|
+
const contextValue = (0, import_react6.useMemo)(
|
|
622
|
+
() => ({
|
|
623
|
+
onInteractionChange: handleInteractionChange,
|
|
624
|
+
onPlayInteraction
|
|
625
|
+
}),
|
|
626
|
+
[handleInteractionChange, onPlayInteraction]
|
|
627
|
+
);
|
|
628
|
+
return /* @__PURE__ */ React9.createElement(InteractionItemContext.Provider, { value: contextValue }, /* @__PURE__ */ React9.createElement(
|
|
629
|
+
import_editor_controls5.Repeater,
|
|
609
630
|
{
|
|
610
631
|
openOnAdd: true,
|
|
611
632
|
openItem: triggerCreateOnShowEmpty ? 0 : void 0,
|
|
612
|
-
label: (0,
|
|
633
|
+
label: (0, import_i18n6.__)("Interactions", "elementor"),
|
|
613
634
|
values: interactions.items,
|
|
614
635
|
setValues: handleRepeaterChange,
|
|
615
636
|
showDuplicate: false,
|
|
@@ -621,21 +642,11 @@ function InteractionsList(props) {
|
|
|
621
642
|
initialValues: createDefaultInteractionItem(),
|
|
622
643
|
Label: ({ value }) => buildDisplayLabel(value.value),
|
|
623
644
|
Icon: () => null,
|
|
624
|
-
Content
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
key: index,
|
|
628
|
-
interaction: value.value,
|
|
629
|
-
onChange: (newInteractionValue) => {
|
|
630
|
-
handleInteractionChange(index, newInteractionValue);
|
|
631
|
-
},
|
|
632
|
-
onPlayInteraction
|
|
633
|
-
}
|
|
634
|
-
),
|
|
635
|
-
actions: (value) => /* @__PURE__ */ React9.createElement(import_ui5.Tooltip, { key: "preview", placement: "top", title: (0, import_i18n7.__)("Preview", "elementor") }, /* @__PURE__ */ React9.createElement(
|
|
636
|
-
import_ui5.IconButton,
|
|
645
|
+
Content,
|
|
646
|
+
actions: (value) => /* @__PURE__ */ React9.createElement(import_ui4.Tooltip, { key: "preview", placement: "top", title: (0, import_i18n6.__)("Preview", "elementor") }, /* @__PURE__ */ React9.createElement(
|
|
647
|
+
import_ui4.IconButton,
|
|
637
648
|
{
|
|
638
|
-
"aria-label": (0,
|
|
649
|
+
"aria-label": (0, import_i18n6.__)("Play interaction", "elementor"),
|
|
639
650
|
size: "tiny",
|
|
640
651
|
onClick: () => onPlayInteraction(extractString(value.value.interaction_id))
|
|
641
652
|
},
|
|
@@ -643,8 +654,32 @@ function InteractionsList(props) {
|
|
|
643
654
|
))
|
|
644
655
|
}
|
|
645
656
|
}
|
|
646
|
-
);
|
|
657
|
+
));
|
|
647
658
|
}
|
|
659
|
+
var Content = ({ index, value }) => {
|
|
660
|
+
const context = (0, import_react6.useContext)(InteractionItemContext);
|
|
661
|
+
const handleChange = (0, import_react6.useCallback)(
|
|
662
|
+
(newInteractionValue) => {
|
|
663
|
+
context?.onInteractionChange(index, newInteractionValue);
|
|
664
|
+
},
|
|
665
|
+
[context, index]
|
|
666
|
+
);
|
|
667
|
+
const handlePlayInteraction = (0, import_react6.useCallback)(
|
|
668
|
+
(interactionId) => {
|
|
669
|
+
context?.onPlayInteraction(interactionId);
|
|
670
|
+
},
|
|
671
|
+
[context]
|
|
672
|
+
);
|
|
673
|
+
return /* @__PURE__ */ React9.createElement(
|
|
674
|
+
InteractionDetails,
|
|
675
|
+
{
|
|
676
|
+
key: index,
|
|
677
|
+
interaction: value.value,
|
|
678
|
+
onChange: handleChange,
|
|
679
|
+
onPlayInteraction: handlePlayInteraction
|
|
680
|
+
}
|
|
681
|
+
);
|
|
682
|
+
};
|
|
648
683
|
|
|
649
684
|
// src/components/interactions-tab.tsx
|
|
650
685
|
var InteractionsTab = ({ elementId }) => {
|
|
@@ -652,7 +687,7 @@ var InteractionsTab = ({ elementId }) => {
|
|
|
652
687
|
};
|
|
653
688
|
function InteractionsTabContent({ elementId }) {
|
|
654
689
|
const existingInteractions = (0, import_editor_elements2.useElementInteractions)(elementId);
|
|
655
|
-
const firstInteractionState = (0,
|
|
690
|
+
const firstInteractionState = (0, import_react7.useState)(false);
|
|
656
691
|
const hasInteractions = existingInteractions?.items?.length || firstInteractionState[0];
|
|
657
692
|
return /* @__PURE__ */ React10.createElement(import_session.SessionStorageProvider, { prefix: elementId }, hasInteractions ? /* @__PURE__ */ React10.createElement(InteractionsProvider, { elementId }, /* @__PURE__ */ React10.createElement(InteractionsContent, { firstInteractionState })) : /* @__PURE__ */ React10.createElement(
|
|
658
693
|
EmptyState,
|
|
@@ -667,7 +702,7 @@ function InteractionsContent({
|
|
|
667
702
|
firstInteractionState
|
|
668
703
|
}) {
|
|
669
704
|
const { interactions, setInteractions, playInteractions } = useInteractionsContext();
|
|
670
|
-
const applyInteraction = (0,
|
|
705
|
+
const applyInteraction = (0, import_react7.useCallback)(
|
|
671
706
|
(newInteractions) => {
|
|
672
707
|
firstInteractionState[1](false);
|
|
673
708
|
if (!newInteractions) {
|
|
@@ -678,7 +713,7 @@ function InteractionsContent({
|
|
|
678
713
|
},
|
|
679
714
|
[setInteractions, firstInteractionState]
|
|
680
715
|
);
|
|
681
|
-
return /* @__PURE__ */ React10.createElement(
|
|
716
|
+
return /* @__PURE__ */ React10.createElement(import_ui5.Stack, { sx: { m: 1, p: 1.5 }, gap: 2 }, /* @__PURE__ */ React10.createElement(
|
|
682
717
|
InteractionsList,
|
|
683
718
|
{
|
|
684
719
|
triggerCreateOnShowEmpty: firstInteractionState[0],
|
|
@@ -805,19 +840,19 @@ var documentElementsInteractionsProvider = createInteractionsProvider({
|
|
|
805
840
|
|
|
806
841
|
// src/components/controls/trigger.tsx
|
|
807
842
|
var React11 = __toESM(require("react"));
|
|
808
|
-
var
|
|
809
|
-
var
|
|
810
|
-
var
|
|
843
|
+
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
844
|
+
var import_ui6 = require("@elementor/ui");
|
|
845
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
811
846
|
function Trigger({ value, onChange }) {
|
|
812
847
|
const availableTriggers = Object.entries({
|
|
813
|
-
load: (0,
|
|
814
|
-
scrollIn: (0,
|
|
848
|
+
load: (0, import_i18n7.__)("Page load", "elementor"),
|
|
849
|
+
scrollIn: (0, import_i18n7.__)("Scroll into view", "elementor")
|
|
815
850
|
}).map(([key, label]) => ({
|
|
816
851
|
key,
|
|
817
852
|
label
|
|
818
853
|
}));
|
|
819
854
|
return /* @__PURE__ */ React11.createElement(
|
|
820
|
-
|
|
855
|
+
import_ui6.Select,
|
|
821
856
|
{
|
|
822
857
|
fullWidth: true,
|
|
823
858
|
displayEmpty: true,
|
|
@@ -826,7 +861,7 @@ function Trigger({ value, onChange }) {
|
|
|
826
861
|
value
|
|
827
862
|
},
|
|
828
863
|
availableTriggers.map((trigger) => {
|
|
829
|
-
return /* @__PURE__ */ React11.createElement(
|
|
864
|
+
return /* @__PURE__ */ React11.createElement(import_editor_ui2.MenuListItem, { key: trigger.key, value: trigger.key }, trigger.label);
|
|
830
865
|
})
|
|
831
866
|
);
|
|
832
867
|
}
|