@elementor/editor-interactions 3.35.0-471 → 3.35.0-473
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 +36 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -38
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/components/controls/direction.tsx +2 -19
- package/src/components/controls/effect-type.tsx +3 -21
- package/src/components/controls/effect.tsx +17 -26
- package/src/components/controls/time-frame-indicator.tsx +17 -27
- package/src/components/controls/trigger.tsx +16 -26
- package/src/components/interaction-details.tsx +66 -35
package/dist/index.js
CHANGED
|
@@ -72,7 +72,7 @@ var React10 = __toESM(require("react"));
|
|
|
72
72
|
var import_react6 = 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_ui6 = require("@elementor/ui");
|
|
76
76
|
|
|
77
77
|
// src/contexts/interactions-context.tsx
|
|
78
78
|
var React2 = __toESM(require("react"));
|
|
@@ -132,9 +132,9 @@ var PopupStateProvider = ({ children }) => {
|
|
|
132
132
|
// src/components/interactions-list.tsx
|
|
133
133
|
var React9 = __toESM(require("react"));
|
|
134
134
|
var import_react5 = require("react");
|
|
135
|
-
var
|
|
135
|
+
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
136
136
|
var import_icons3 = require("@elementor/icons");
|
|
137
|
-
var
|
|
137
|
+
var import_ui5 = require("@elementor/ui");
|
|
138
138
|
var import_i18n7 = require("@wordpress/i18n");
|
|
139
139
|
|
|
140
140
|
// src/utils/temp-id-utils.ts
|
|
@@ -245,8 +245,8 @@ var buildDisplayLabel = (item) => {
|
|
|
245
245
|
// src/components/interaction-details.tsx
|
|
246
246
|
var React8 = __toESM(require("react"));
|
|
247
247
|
var import_react4 = require("react");
|
|
248
|
-
var
|
|
249
|
-
var
|
|
248
|
+
var import_editor_controls3 = require("@elementor/editor-controls");
|
|
249
|
+
var import_ui4 = require("@elementor/ui");
|
|
250
250
|
var import_i18n6 = require("@wordpress/i18n");
|
|
251
251
|
|
|
252
252
|
// src/interactions-controls-registry.ts
|
|
@@ -267,7 +267,6 @@ var React4 = __toESM(require("react"));
|
|
|
267
267
|
var import_react3 = require("react");
|
|
268
268
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
269
269
|
var import_icons2 = require("@elementor/icons");
|
|
270
|
-
var import_ui2 = require("@elementor/ui");
|
|
271
270
|
var import_i18n2 = require("@wordpress/i18n");
|
|
272
271
|
function Direction({ value, onChange, interactionType }) {
|
|
273
272
|
const options = (0, import_react3.useMemo)(() => {
|
|
@@ -299,14 +298,13 @@ function Direction({ value, onChange, interactionType }) {
|
|
|
299
298
|
}
|
|
300
299
|
];
|
|
301
300
|
}, [interactionType]);
|
|
302
|
-
return /* @__PURE__ */ React4.createElement(
|
|
301
|
+
return /* @__PURE__ */ React4.createElement(import_editor_controls.ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value });
|
|
303
302
|
}
|
|
304
303
|
|
|
305
304
|
// src/components/controls/effect.tsx
|
|
306
305
|
var React5 = __toESM(require("react"));
|
|
307
|
-
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
308
306
|
var import_editor_ui = require("@elementor/editor-ui");
|
|
309
|
-
var
|
|
307
|
+
var import_ui2 = require("@elementor/ui");
|
|
310
308
|
var import_i18n3 = require("@wordpress/i18n");
|
|
311
309
|
function Effect({ value, onChange }) {
|
|
312
310
|
const availableEffects = [
|
|
@@ -314,8 +312,8 @@ function Effect({ value, onChange }) {
|
|
|
314
312
|
{ key: "slide", label: (0, import_i18n3.__)("Slide", "elementor") },
|
|
315
313
|
{ key: "scale", label: (0, import_i18n3.__)("Scale", "elementor") }
|
|
316
314
|
];
|
|
317
|
-
return /* @__PURE__ */ React5.createElement(
|
|
318
|
-
|
|
315
|
+
return /* @__PURE__ */ React5.createElement(
|
|
316
|
+
import_ui2.Select,
|
|
319
317
|
{
|
|
320
318
|
fullWidth: true,
|
|
321
319
|
displayEmpty: true,
|
|
@@ -326,13 +324,12 @@ function Effect({ value, onChange }) {
|
|
|
326
324
|
availableEffects.map((effect) => {
|
|
327
325
|
return /* @__PURE__ */ React5.createElement(import_editor_ui.MenuListItem, { key: effect.key, value: effect.key }, effect.label);
|
|
328
326
|
})
|
|
329
|
-
)
|
|
327
|
+
);
|
|
330
328
|
}
|
|
331
329
|
|
|
332
330
|
// src/components/controls/effect-type.tsx
|
|
333
331
|
var React6 = __toESM(require("react"));
|
|
334
|
-
var
|
|
335
|
-
var import_ui4 = require("@elementor/ui");
|
|
332
|
+
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
336
333
|
var import_i18n4 = require("@wordpress/i18n");
|
|
337
334
|
function EffectType({ value, onChange }) {
|
|
338
335
|
const options = [
|
|
@@ -349,16 +346,15 @@ function EffectType({ value, onChange }) {
|
|
|
349
346
|
showTooltip: true
|
|
350
347
|
}
|
|
351
348
|
];
|
|
352
|
-
return /* @__PURE__ */ React6.createElement(
|
|
349
|
+
return /* @__PURE__ */ React6.createElement(import_editor_controls2.ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value });
|
|
353
350
|
}
|
|
354
351
|
|
|
355
352
|
// src/components/controls/time-frame-indicator.tsx
|
|
356
353
|
var React7 = __toESM(require("react"));
|
|
357
|
-
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
358
354
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
359
|
-
var
|
|
355
|
+
var import_ui3 = require("@elementor/ui");
|
|
360
356
|
var import_i18n5 = require("@wordpress/i18n");
|
|
361
|
-
function TimeFrameIndicator({ value, onChange
|
|
357
|
+
function TimeFrameIndicator({ value, onChange }) {
|
|
362
358
|
const availableTimeFrames = ["0", "100", "200", "300", "400", "500", "750", "1000", "1250", "1500"].map(
|
|
363
359
|
(key) => ({
|
|
364
360
|
key,
|
|
@@ -366,8 +362,8 @@ function TimeFrameIndicator({ value, onChange, label }) {
|
|
|
366
362
|
label: (0, import_i18n5.__)("%s MS", "elementor").replace("%s", key)
|
|
367
363
|
})
|
|
368
364
|
);
|
|
369
|
-
return /* @__PURE__ */ React7.createElement(
|
|
370
|
-
|
|
365
|
+
return /* @__PURE__ */ React7.createElement(
|
|
366
|
+
import_ui3.Select,
|
|
371
367
|
{
|
|
372
368
|
fullWidth: true,
|
|
373
369
|
displayEmpty: true,
|
|
@@ -378,7 +374,7 @@ function TimeFrameIndicator({ value, onChange, label }) {
|
|
|
378
374
|
availableTimeFrames.map((timeFrame) => {
|
|
379
375
|
return /* @__PURE__ */ React7.createElement(import_editor_ui2.MenuListItem, { key: timeFrame.key, value: timeFrame.key }, timeFrame.label);
|
|
380
376
|
})
|
|
381
|
-
)
|
|
377
|
+
);
|
|
382
378
|
}
|
|
383
379
|
|
|
384
380
|
// src/components/interaction-details.tsx
|
|
@@ -441,36 +437,37 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
|
|
|
441
437
|
onPlayInteraction(interactionId);
|
|
442
438
|
}, 0);
|
|
443
439
|
};
|
|
444
|
-
return /* @__PURE__ */ React8.createElement(
|
|
440
|
+
return /* @__PURE__ */ React8.createElement(import_editor_controls3.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React8.createElement(import_ui4.Grid, { container: true, spacing: 1.5 }, TriggerControl && /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n6.__)("Trigger", "elementor") }, /* @__PURE__ */ React8.createElement(TriggerControl, { value: trigger, onChange: (v) => updateInteraction({ trigger: v }) })), ReplayControl && /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n6.__)("Replay", "elementor") }, /* @__PURE__ */ React8.createElement(
|
|
445
441
|
ReplayControl,
|
|
446
442
|
{
|
|
447
443
|
value: replay,
|
|
448
444
|
onChange: (v) => updateInteraction({ replay: v }),
|
|
449
445
|
disabled: true
|
|
450
446
|
}
|
|
451
|
-
)))
|
|
447
|
+
))), /* @__PURE__ */ React8.createElement(import_ui4.Divider, null), /* @__PURE__ */ React8.createElement(import_ui4.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n6.__)("Effect", "elementor") }, /* @__PURE__ */ React8.createElement(Effect, { value: effect, onChange: (v) => updateInteraction({ effect: v }) })), /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n6.__)("Type", "elementor") }, /* @__PURE__ */ React8.createElement(EffectType, { value: type, onChange: (v) => updateInteraction({ type: v }) })), /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n6.__)("Direction", "elementor") }, /* @__PURE__ */ React8.createElement(
|
|
452
448
|
Direction,
|
|
453
449
|
{
|
|
454
450
|
value: direction,
|
|
455
451
|
onChange: (v) => updateInteraction({ direction: v }),
|
|
456
452
|
interactionType: type
|
|
457
453
|
}
|
|
458
|
-
), /* @__PURE__ */ React8.createElement(
|
|
454
|
+
)), /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n6.__)("Duration", "elementor") }, /* @__PURE__ */ React8.createElement(
|
|
459
455
|
TimeFrameIndicator,
|
|
460
456
|
{
|
|
461
457
|
value: String(duration),
|
|
462
|
-
onChange: (v) => updateInteraction({ duration: parseInt(v, 10) })
|
|
463
|
-
label: (0, import_i18n6.__)("Duration", "elementor")
|
|
458
|
+
onChange: (v) => updateInteraction({ duration: parseInt(v, 10) })
|
|
464
459
|
}
|
|
465
|
-
), /* @__PURE__ */ React8.createElement(
|
|
460
|
+
)), /* @__PURE__ */ React8.createElement(Field, { label: (0, import_i18n6.__)("Delay", "elementor") }, /* @__PURE__ */ React8.createElement(
|
|
466
461
|
TimeFrameIndicator,
|
|
467
462
|
{
|
|
468
463
|
value: String(delay),
|
|
469
|
-
onChange: (v) => updateInteraction({ delay: parseInt(v, 10) })
|
|
470
|
-
label: (0, import_i18n6.__)("Delay", "elementor")
|
|
464
|
+
onChange: (v) => updateInteraction({ delay: parseInt(v, 10) })
|
|
471
465
|
}
|
|
472
|
-
)));
|
|
466
|
+
))));
|
|
473
467
|
};
|
|
468
|
+
function Field({ label, children }) {
|
|
469
|
+
return /* @__PURE__ */ React8.createElement(import_ui4.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React8.createElement(import_editor_controls3.PopoverGridContainer, null, /* @__PURE__ */ React8.createElement(import_ui4.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React8.createElement(import_editor_controls3.ControlFormLabel, null, label)), /* @__PURE__ */ React8.createElement(import_ui4.Grid, { item: true, xs: 6 }, children)));
|
|
470
|
+
}
|
|
474
471
|
|
|
475
472
|
// src/components/interactions-list.tsx
|
|
476
473
|
var MAX_NUMBER_OF_INTERACTIONS = 5;
|
|
@@ -496,7 +493,7 @@ function InteractionsList(props) {
|
|
|
496
493
|
const isMaxNumberOfInteractionsReached = (0, import_react5.useMemo)(() => {
|
|
497
494
|
return interactions.items?.length >= MAX_NUMBER_OF_INTERACTIONS;
|
|
498
495
|
}, [interactions.items?.length]);
|
|
499
|
-
const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React9.createElement(
|
|
496
|
+
const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React9.createElement(import_ui5.Alert, { color: "secondary", icon: /* @__PURE__ */ React9.createElement(import_icons3.InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React9.createElement(import_ui5.AlertTitle, null, (0, import_i18n7.__)("Interactions", "elementor")), /* @__PURE__ */ React9.createElement(import_ui5.Box, { component: "span" }, (0, import_i18n7.__)(
|
|
500
497
|
"You've reached the limit of 5 interactions for this element. Please remove an interaction before creating a new one.",
|
|
501
498
|
"elementor"
|
|
502
499
|
))) : void 0;
|
|
@@ -524,7 +521,7 @@ function InteractionsList(props) {
|
|
|
524
521
|
[interactions, handleUpdateInteractions]
|
|
525
522
|
);
|
|
526
523
|
return /* @__PURE__ */ React9.createElement(
|
|
527
|
-
|
|
524
|
+
import_editor_controls4.Repeater,
|
|
528
525
|
{
|
|
529
526
|
openOnAdd: true,
|
|
530
527
|
openItem: triggerCreateOnShowEmpty ? 0 : void 0,
|
|
@@ -551,8 +548,8 @@ function InteractionsList(props) {
|
|
|
551
548
|
onPlayInteraction
|
|
552
549
|
}
|
|
553
550
|
),
|
|
554
|
-
actions: (value) => /* @__PURE__ */ React9.createElement(
|
|
555
|
-
|
|
551
|
+
actions: (value) => /* @__PURE__ */ React9.createElement(import_ui5.Tooltip, { key: "preview", placement: "top", title: (0, import_i18n7.__)("Preview", "elementor") }, /* @__PURE__ */ React9.createElement(
|
|
552
|
+
import_ui5.IconButton,
|
|
556
553
|
{
|
|
557
554
|
"aria-label": (0, import_i18n7.__)("Play interaction", "elementor"),
|
|
558
555
|
size: "tiny",
|
|
@@ -597,7 +594,7 @@ function InteractionsContent({
|
|
|
597
594
|
},
|
|
598
595
|
[setInteractions, firstInteractionState]
|
|
599
596
|
);
|
|
600
|
-
return /* @__PURE__ */ React10.createElement(
|
|
597
|
+
return /* @__PURE__ */ React10.createElement(import_ui6.Stack, { sx: { m: 1, p: 1.5 }, gap: 2 }, /* @__PURE__ */ React10.createElement(
|
|
601
598
|
InteractionsList,
|
|
602
599
|
{
|
|
603
600
|
triggerCreateOnShowEmpty: firstInteractionState[0],
|
|
@@ -724,9 +721,8 @@ var documentElementsInteractionsProvider = createInteractionsProvider({
|
|
|
724
721
|
|
|
725
722
|
// src/components/controls/trigger.tsx
|
|
726
723
|
var React11 = __toESM(require("react"));
|
|
727
|
-
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
728
724
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
729
|
-
var
|
|
725
|
+
var import_ui7 = require("@elementor/ui");
|
|
730
726
|
var import_i18n8 = require("@wordpress/i18n");
|
|
731
727
|
function Trigger({ value, onChange }) {
|
|
732
728
|
const availableTriggers = Object.entries({
|
|
@@ -736,8 +732,8 @@ function Trigger({ value, onChange }) {
|
|
|
736
732
|
key,
|
|
737
733
|
label
|
|
738
734
|
}));
|
|
739
|
-
return /* @__PURE__ */ React11.createElement(
|
|
740
|
-
|
|
735
|
+
return /* @__PURE__ */ React11.createElement(
|
|
736
|
+
import_ui7.Select,
|
|
741
737
|
{
|
|
742
738
|
fullWidth: true,
|
|
743
739
|
displayEmpty: true,
|
|
@@ -748,7 +744,7 @@ function Trigger({ value, onChange }) {
|
|
|
748
744
|
availableTriggers.map((trigger) => {
|
|
749
745
|
return /* @__PURE__ */ React11.createElement(import_editor_ui3.MenuListItem, { key: trigger.key, value: trigger.key }, trigger.label);
|
|
750
746
|
})
|
|
751
|
-
)
|
|
747
|
+
);
|
|
752
748
|
}
|
|
753
749
|
|
|
754
750
|
// src/hooks/on-duplicate.ts
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/components/empty-state.tsx","../src/components/interactions-tab.tsx","../src/contexts/interactions-context.tsx","../src/contexts/popup-state-context.tsx","../src/components/interactions-list.tsx","../src/utils/temp-id-utils.ts","../src/utils/prop-value-utils.ts","../src/components/interaction-details.tsx","../src/interactions-controls-registry.ts","../src/components/controls/direction.tsx","../src/components/controls/effect.tsx","../src/components/controls/effect-type.tsx","../src/components/controls/time-frame-indicator.tsx","../src/utils/get-interactions-config.ts","../src/utils/create-interactions-repository.ts","../src/interactions-repository.ts","../src/utils/create-interactions-provider.ts","../src/providers/document-elements-interactions-provider.ts","../src/components/controls/trigger.tsx","../src/hooks/on-duplicate.ts","../src/init.ts"],"sourcesContent":["export * from './components/empty-state';\nexport * from './components/interactions-tab';\nexport * from './types';\nexport * from './utils/get-interactions-config';\n\nexport { interactionsRepository } from './interactions-repository';\nexport {\n\tcreateInteractionsProvider,\n\ttype CreateInteractionsProviderOptions,\n} from './utils/create-interactions-provider';\n\nexport { ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX } from './providers/document-elements-interactions-provider';\nexport { init } from './init';\nexport { registerInteractionsControl } from './interactions-controls-registry';\n","import * as React from 'react';\nimport { SwipeIcon } from '@elementor/icons';\nimport { Button, Stack, Typography } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nexport const EmptyState = ( { onCreateInteraction }: { onCreateInteraction: () => void } ) => {\n\treturn (\n\t\t<Stack\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t\theight=\"100%\"\n\t\t\tcolor=\"text.secondary\"\n\t\t\tsx={ { p: 2.5, pt: 8, pb: 5.5 } }\n\t\t\tgap={ 1.5 }\n\t\t>\n\t\t\t<SwipeIcon fontSize=\"large\" />\n\n\t\t\t<Typography align=\"center\" variant=\"subtitle2\">\n\t\t\t\t{ __( 'Animate elements with Interactions', 'elementor' ) }\n\t\t\t</Typography>\n\n\t\t\t<Typography align=\"center\" variant=\"caption\" maxWidth=\"170px\">\n\t\t\t\t{ __(\n\t\t\t\t\t'Add entrance animations and effects triggered by user interactions such as page load or scroll.',\n\t\t\t\t\t'elementor'\n\t\t\t\t) }\n\t\t\t</Typography>\n\n\t\t\t<Button variant=\"outlined\" color=\"secondary\" size=\"small\" sx={ { mt: 1 } } onClick={ onCreateInteraction }>\n\t\t\t\t{ __( 'Create an interaction', 'elementor' ) }\n\t\t\t</Button>\n\t\t</Stack>\n\t);\n};\n","import * as React from 'react';\nimport { useCallback, useState } from 'react';\nimport { useElementInteractions } from '@elementor/editor-elements';\nimport { SessionStorageProvider } from '@elementor/session';\nimport { Stack } from '@elementor/ui';\n\nimport { InteractionsProvider, useInteractionsContext } from '../contexts/interactions-context';\nimport { PopupStateProvider } from '../contexts/popup-state-context';\nimport type { ElementInteractions } from '../types';\nimport { EmptyState } from './empty-state';\nimport { InteractionsList } from './interactions-list';\n\nexport const InteractionsTab = ( { elementId }: { elementId: string } ) => {\n\treturn (\n\t\t<PopupStateProvider>\n\t\t\t<InteractionsTabContent elementId={ elementId } />\n\t\t</PopupStateProvider>\n\t);\n};\n\nfunction InteractionsTabContent( { elementId }: { elementId: string } ) {\n\tconst existingInteractions = useElementInteractions( elementId ) as unknown as ElementInteractions | undefined;\n\tconst firstInteractionState = useState< boolean >( false );\n\tconst hasInteractions = existingInteractions?.items?.length || firstInteractionState[ 0 ];\n\n\treturn (\n\t\t<SessionStorageProvider prefix={ elementId }>\n\t\t\t{ hasInteractions ? (\n\t\t\t\t<InteractionsProvider elementId={ elementId }>\n\t\t\t\t\t<InteractionsContent firstInteractionState={ firstInteractionState } />\n\t\t\t\t</InteractionsProvider>\n\t\t\t) : (\n\t\t\t\t<EmptyState\n\t\t\t\t\tonCreateInteraction={ () => {\n\t\t\t\t\t\tfirstInteractionState[ 1 ]( true );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</SessionStorageProvider>\n\t);\n}\n\nfunction InteractionsContent( {\n\tfirstInteractionState,\n}: {\n\tfirstInteractionState: [ boolean, ( value: boolean ) => void ];\n} ) {\n\tconst { interactions, setInteractions, playInteractions } = useInteractionsContext();\n\n\tconst applyInteraction = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\n\t\t\tfirstInteractionState[ 1 ]( false );\n\t\t\tif ( ! newInteractions ) {\n\t\t\t\tsetInteractions( undefined );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetInteractions( newInteractions );\n\t\t},\n\t\t[ setInteractions, firstInteractionState ]\n\t);\n\n\treturn (\n\t\t<Stack sx={ { m: 1, p: 1.5 } } gap={ 2 }>\n\t\t\t<InteractionsList\n\t\t\t\ttriggerCreateOnShowEmpty={ firstInteractionState[ 0 ] }\n\t\t\t\tinteractions={ interactions }\n\t\t\t\tonSelectInteractions={ applyInteraction }\n\t\t\t\tonPlayInteraction={ playInteractions }\n\t\t\t/>\n\t\t</Stack>\n\t);\n}\n","import * as React from 'react';\nimport { createContext, type ReactNode, useContext, useEffect } from 'react';\nimport {\n\ttype ElementInteractions,\n\tplayElementInteractions,\n\tupdateElementInteractions,\n\tuseElementInteractions,\n} from '@elementor/editor-elements';\n\ntype InteractionsContextValue = {\n\tinteractions: ElementInteractions;\n\tsetInteractions: ( value: ElementInteractions | undefined ) => void;\n\tplayInteractions: ( interactionId: string ) => void;\n};\n\nconst InteractionsContext = createContext< InteractionsContextValue | null >( null );\n\nconst DEFAULT_INTERACTIONS: ElementInteractions = {\n\tversion: 1,\n\titems: [],\n};\n\nexport const InteractionsProvider = ( { children, elementId }: { children: ReactNode; elementId: string } ) => {\n\tconst rawInteractions = useElementInteractions( elementId );\n\n\tuseEffect( () => {\n\t\twindow.dispatchEvent( new CustomEvent( 'elementor/element/update_interactions' ) );\n\t}, [] );\n\n\tconst interactions: ElementInteractions =\n\t\t( rawInteractions as unknown as ElementInteractions ) ?? DEFAULT_INTERACTIONS;\n\n\tconst setInteractions = ( value: ElementInteractions | undefined ) => {\n\t\tconst normalizedValue = value && value.items?.length === 0 ? undefined : value;\n\n\t\tupdateElementInteractions( {\n\t\t\telementId,\n\t\t\tinteractions: normalizedValue,\n\t\t} );\n\t};\n\n\tconst playInteractions = ( interactionId: string ) => {\n\t\tplayElementInteractions( elementId, interactionId );\n\t};\n\n\tconst contextValue: InteractionsContextValue = {\n\t\tinteractions,\n\t\tsetInteractions,\n\t\tplayInteractions,\n\t};\n\n\treturn <InteractionsContext.Provider value={ contextValue }>{ children }</InteractionsContext.Provider>;\n};\n\nexport const useInteractionsContext = () => {\n\tconst context = useContext( InteractionsContext );\n\tif ( ! context ) {\n\t\tthrow new Error( 'useInteractionsContext must be used within InteractionsProvider' );\n\t}\n\treturn context;\n};\n","import * as React from 'react';\nimport { createContext, useCallback, useContext, useState } from 'react';\n\ntype PopupStateContextType = {\n\topenByDefault: boolean;\n\ttriggerDefaultOpen: () => void;\n\tresetDefaultOpen: () => void;\n};\n\nconst PopupStateContext = createContext< PopupStateContextType | undefined >( undefined );\n\nexport const PopupStateProvider = ( { children }: { children: React.ReactNode } ) => {\n\tconst [ openByDefault, setOpenByDefault ] = useState( false );\n\n\tconst triggerDefaultOpen = useCallback( () => {\n\t\tsetOpenByDefault( true );\n\t}, [] );\n\n\tconst resetDefaultOpen = useCallback( () => {\n\t\tsetOpenByDefault( false );\n\t}, [] );\n\n\treturn (\n\t\t<PopupStateContext.Provider value={ { openByDefault, triggerDefaultOpen, resetDefaultOpen } }>\n\t\t\t{ children }\n\t\t</PopupStateContext.Provider>\n\t);\n};\n\nexport const usePopupStateContext = () => {\n\tconst context = useContext( PopupStateContext );\n\tif ( ! context ) {\n\t\tthrow new Error( 'usePopupStateContext must be used within PopupStateProvider' );\n\t}\n\treturn context;\n};\n","import * as React from 'react';\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { Repeater } from '@elementor/editor-controls';\nimport { InfoCircleFilledIcon, PlayerPlayIcon } from '@elementor/icons';\nimport { Alert, AlertTitle, Box, IconButton, Tooltip } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport type { ElementInteractions, InteractionItemPropValue, InteractionItemValue } from '../types';\nimport { buildDisplayLabel, createDefaultInteractionItem, extractString } from '../utils/prop-value-utils';\nimport { InteractionDetails } from './interaction-details';\nexport const MAX_NUMBER_OF_INTERACTIONS = 5;\n\nexport type InteractionListProps = {\n\tonSelectInteractions: ( interactions: ElementInteractions ) => void;\n\tinteractions: ElementInteractions;\n\tonPlayInteraction: ( interactionId: string ) => void;\n\ttriggerCreateOnShowEmpty?: boolean;\n};\n\nexport function InteractionsList( props: InteractionListProps ) {\n\tconst { interactions, onSelectInteractions, onPlayInteraction, triggerCreateOnShowEmpty } = props;\n\n\tconst hasInitializedRef = useRef( false );\n\n\tconst handleUpdateInteractions = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\n\t\t\tonSelectInteractions( newInteractions );\n\t\t},\n\t\t[ onSelectInteractions ]\n\t);\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\ttriggerCreateOnShowEmpty &&\n\t\t\t! hasInitializedRef.current &&\n\t\t\t( ! interactions.items || interactions.items?.length === 0 )\n\t\t) {\n\t\t\thasInitializedRef.current = true;\n\t\t\tconst newState: ElementInteractions = {\n\t\t\t\tversion: 1,\n\t\t\t\titems: [ createDefaultInteractionItem() ],\n\t\t\t};\n\t\t\thandleUpdateInteractions( newState );\n\t\t}\n\t}, [ triggerCreateOnShowEmpty, interactions.items, handleUpdateInteractions ] );\n\n\tconst isMaxNumberOfInteractionsReached = useMemo( () => {\n\t\treturn interactions.items?.length >= MAX_NUMBER_OF_INTERACTIONS;\n\t}, [ interactions.items?.length ] );\n\n\tconst infotipContent = isMaxNumberOfInteractionsReached ? (\n\t\t<Alert color=\"secondary\" icon={ <InfoCircleFilledIcon /> } size=\"small\">\n\t\t\t<AlertTitle>{ __( 'Interactions', 'elementor' ) }</AlertTitle>\n\t\t\t<Box component=\"span\">\n\t\t\t\t{ __(\n\t\t\t\t\t\"You've reached the limit of 5 interactions for this element. Please remove an interaction before creating a new one.\",\n\t\t\t\t\t'elementor'\n\t\t\t\t) }\n\t\t\t</Box>\n\t\t</Alert>\n\t) : undefined;\n\n\tconst handleRepeaterChange = useCallback(\n\t\t( newItems: ElementInteractions[ 'items' ] ) => {\n\t\t\thandleUpdateInteractions( {\n\t\t\t\t...interactions,\n\t\t\t\titems: newItems,\n\t\t\t} );\n\t\t},\n\t\t[ interactions, handleUpdateInteractions ]\n\t);\n\n\tconst handleInteractionChange = useCallback(\n\t\t( index: number, newInteractionValue: InteractionItemValue ) => {\n\t\t\tconst newItems = structuredClone( interactions.items );\n\t\t\tnewItems[ index ] = {\n\t\t\t\t$$type: 'interaction-item',\n\t\t\t\tvalue: newInteractionValue,\n\t\t\t};\n\t\t\thandleUpdateInteractions( {\n\t\t\t\t...interactions,\n\t\t\t\titems: newItems,\n\t\t\t} );\n\t\t},\n\t\t[ interactions, handleUpdateInteractions ]\n\t);\n\n\treturn (\n\t\t<Repeater\n\t\t\topenOnAdd\n\t\t\topenItem={ triggerCreateOnShowEmpty ? 0 : undefined }\n\t\t\tlabel={ __( 'Interactions', 'elementor' ) }\n\t\t\tvalues={ interactions.items }\n\t\t\tsetValues={ handleRepeaterChange }\n\t\t\tshowDuplicate={ false }\n\t\t\tshowToggle={ false }\n\t\t\tisSortable={ false }\n\t\t\tdisableAddItemButton={ isMaxNumberOfInteractionsReached }\n\t\t\taddButtonInfotipContent={ infotipContent }\n\t\t\titemSettings={ {\n\t\t\t\tinitialValues: createDefaultInteractionItem(),\n\t\t\t\tLabel: ( { value }: { value: InteractionItemPropValue } ) => buildDisplayLabel( value.value ),\n\t\t\t\tIcon: () => null,\n\t\t\t\tContent: ( { index, value }: { index: number; value: InteractionItemPropValue } ) => (\n\t\t\t\t\t<InteractionDetails\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tinteraction={ value.value }\n\t\t\t\t\t\tonChange={ ( newInteractionValue: InteractionItemValue ) => {\n\t\t\t\t\t\t\thandleInteractionChange( index, newInteractionValue );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonPlayInteraction={ onPlayInteraction }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tactions: ( value: InteractionItemPropValue ) => (\n\t\t\t\t\t<Tooltip key=\"preview\" placement=\"top\" title={ __( 'Preview', 'elementor' ) }>\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\taria-label={ __( 'Play interaction', 'elementor' ) }\n\t\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\t\tonClick={ () => onPlayInteraction( extractString( value.value.interaction_id ) ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PlayerPlayIcon fontSize=\"tiny\" />\n\t\t\t\t\t\t</IconButton>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\n\t);\n}\n","const TEMP_ID_PREFIX = 'temp-';\nconst TEMP_ID_REGEX = /^temp-[a-z0-9]+$/i;\n\nexport function generateTempInteractionId(): string {\n\treturn `${ TEMP_ID_PREFIX }${ Math.random().toString( 36 ).substring( 2, 11 ) }`;\n}\n\nexport function isTempId( id: string | undefined ): boolean {\n\treturn !! id && TEMP_ID_REGEX.test( id );\n}\n","import type {\n\tAnimationPresetPropValue,\n\tBooleanPropValue,\n\tConfigPropValue,\n\tElementInteractions,\n\tInteractionItemPropValue,\n\tInteractionItemValue,\n\tNumberPropValue,\n\tStringPropValue,\n\tTimingConfigPropValue,\n} from '../types';\nimport { generateTempInteractionId } from './temp-id-utils';\n\nexport const createString = ( value: string ): StringPropValue => ( {\n\t$$type: 'string',\n\tvalue,\n} );\n\nexport const createNumber = ( value: number ): NumberPropValue => ( {\n\t$$type: 'number',\n\tvalue,\n} );\n\nexport const createTimingConfig = ( duration: number, delay: number ): TimingConfigPropValue => ( {\n\t$$type: 'timing-config',\n\tvalue: {\n\t\tduration: createNumber( duration ),\n\t\tdelay: createNumber( delay ),\n\t},\n} );\n\nexport const createBoolean = ( value: boolean ): BooleanPropValue => ( {\n\t$$type: 'boolean',\n\tvalue,\n} );\n\nexport const createConfig = ( replay: boolean ): ConfigPropValue => ( {\n\t$$type: 'config',\n\tvalue: {\n\t\treplay: createBoolean( replay ),\n\t},\n} );\n\nexport const extractBoolean = ( prop: BooleanPropValue | undefined, fallback = false ): boolean => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const createAnimationPreset = ( {\n\teffect,\n\ttype,\n\tdirection,\n\tduration,\n\tdelay,\n\treplay = false,\n}: {\n\teffect: string;\n\ttype: string;\n\tdirection?: string;\n\tduration: number;\n\tdelay: number;\n\treplay: boolean;\n} ): AnimationPresetPropValue => ( {\n\t$$type: 'animation-preset-props',\n\tvalue: {\n\t\teffect: createString( effect ),\n\t\ttype: createString( type ),\n\t\tdirection: createString( direction ?? '' ),\n\t\ttiming_config: createTimingConfig( duration, delay ),\n\t\tconfig: createConfig( replay ),\n\t},\n} );\n\nexport const createInteractionItem = ( {\n\ttrigger,\n\teffect,\n\ttype,\n\tdirection,\n\tduration,\n\tdelay,\n\tinteractionId,\n\treplay = false,\n}: {\n\ttrigger: string;\n\teffect: string;\n\ttype: string;\n\tdirection?: string;\n\tduration: number;\n\tdelay: number;\n\tinteractionId?: string;\n\treplay: boolean;\n} ): InteractionItemPropValue => ( {\n\t$$type: 'interaction-item',\n\tvalue: {\n\t\t...( interactionId && { interaction_id: createString( interactionId ) } ),\n\t\ttrigger: createString( trigger ),\n\t\tanimation: createAnimationPreset( { effect, type, direction, duration, delay, replay } ),\n\t},\n} );\n\nexport const createDefaultInteractionItem = (): InteractionItemPropValue => {\n\treturn createInteractionItem( {\n\t\ttrigger: 'load',\n\t\teffect: 'fade',\n\t\ttype: 'in',\n\t\tduration: 300,\n\t\tdelay: 0,\n\t\treplay: false,\n\t\tinteractionId: generateTempInteractionId(),\n\t} );\n};\n\nexport const createDefaultInteractions = (): ElementInteractions => ( {\n\tversion: 1,\n\titems: [ createDefaultInteractionItem() ],\n} );\n\nexport const extractString = ( prop: StringPropValue | undefined, fallback = '' ): string => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const extractNumber = ( prop: NumberPropValue | undefined, fallback = 0 ): number => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const buildAnimationIdString = ( item: InteractionItemValue ): string => {\n\tconst trigger = extractString( item.trigger );\n\tconst effect = extractString( item.animation.value.effect );\n\tconst type = extractString( item.animation.value.type );\n\tconst direction = extractString( item.animation.value.direction );\n\tconst duration = extractNumber( item.animation.value.timing_config.value.duration );\n\tconst delay = extractNumber( item.animation.value.timing_config.value.delay );\n\n\treturn [ trigger, effect, type, direction, duration, delay ].join( '-' );\n};\n\nconst TRIGGER_LABELS: Record< string, string > = {\n\tload: 'On page load',\n\tscrollIn: 'Scroll into view',\n\tscrollOut: 'Scroll out of view',\n\tscrollOn: 'While scrolling',\n};\n\nconst capitalize = ( str: string ): string => {\n\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n};\n\nexport const buildDisplayLabel = ( item: InteractionItemValue ): string => {\n\tconst trigger = extractString( item.trigger );\n\tconst effect = extractString( item.animation.value.effect );\n\tconst type = extractString( item.animation.value.type );\n\n\tconst triggerLabel = TRIGGER_LABELS[ trigger ] || capitalize( trigger );\n\tconst effectLabel = capitalize( effect );\n\tconst typeLabel = capitalize( type );\n\n\treturn `${ triggerLabel }: ${ effectLabel } ${ typeLabel }`;\n};\n","import * as React from 'react';\nimport { useMemo } from 'react';\nimport { ControlFormLabel, PopoverContent, PopoverGridContainer } from '@elementor/editor-controls';\nimport { Divider, Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { getInteractionsControl } from '../interactions-controls-registry';\nimport type { InteractionItemValue } from '../types';\nimport {\n\tcreateAnimationPreset,\n\tcreateString,\n\textractBoolean,\n\textractNumber,\n\textractString,\n} from '../utils/prop-value-utils';\nimport { Direction } from './controls/direction';\nimport { Effect } from './controls/effect';\nimport { EffectType } from './controls/effect-type';\nimport { TimeFrameIndicator } from './controls/time-frame-indicator';\n\ntype InteractionDetailsProps = {\n\tinteraction: InteractionItemValue;\n\tonChange: ( interaction: InteractionItemValue ) => void;\n\tonPlayInteraction: ( interactionId: string ) => void;\n};\n\nconst DEFAULT_VALUES = {\n\ttrigger: 'load',\n\teffect: 'fade',\n\ttype: 'in',\n\tdirection: '',\n\tduration: 300,\n\tdelay: 0,\n\treplay: false,\n};\n\nconst TRIGGERS_WITH_REPLAY = [ 'scrollIn', 'scrollOut' ];\n\nexport const InteractionDetails = ( { interaction, onChange, onPlayInteraction }: InteractionDetailsProps ) => {\n\tconst trigger = extractString( interaction.trigger, DEFAULT_VALUES.trigger );\n\tconst effect = extractString( interaction.animation.value.effect, DEFAULT_VALUES.effect );\n\tconst type = extractString( interaction.animation.value.type, DEFAULT_VALUES.type );\n\tconst direction = extractString( interaction.animation.value.direction, DEFAULT_VALUES.direction );\n\tconst duration = extractNumber( interaction.animation.value.timing_config.value.duration, DEFAULT_VALUES.duration );\n\tconst delay = extractNumber( interaction.animation.value.timing_config.value.delay, DEFAULT_VALUES.delay );\n\tconst replay = extractBoolean( interaction.animation.value.config?.value.replay, DEFAULT_VALUES.replay );\n\tconst shouldShowReplay = TRIGGERS_WITH_REPLAY.includes( trigger );\n\tconst TriggerControl = useMemo( () => {\n\t\treturn getInteractionsControl( 'trigger' )?.component ?? null;\n\t}, [] );\n\tconst ReplayControl = useMemo( () => {\n\t\tif ( ! shouldShowReplay ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn getInteractionsControl( 'replay' )?.component ?? null;\n\t}, [ shouldShowReplay ] );\n\n\tconst resolveDirection = ( hasDirection: boolean, newEffect?: string, newDirection?: string ) => {\n\t\tif ( newEffect === 'slide' && ! newDirection ) {\n\t\t\treturn 'top';\n\t\t}\n\t\t// Why? - New direction can be undefined when the effect is not slide, so if the updates object includes direction, we take it always!\n\t\tif ( hasDirection ) {\n\t\t\treturn newDirection;\n\t\t}\n\t\treturn direction;\n\t};\n\n\tconst updateInteraction = (\n\t\tupdates: Partial< {\n\t\t\ttrigger: string;\n\t\t\teffect: string;\n\t\t\ttype: string;\n\t\t\tdirection: string;\n\t\t\tduration: number;\n\t\t\tdelay: number;\n\t\t\treplay: boolean;\n\t\t} >\n\t): void => {\n\t\tconst resolvedDirectionValue = resolveDirection( 'direction' in updates, updates.effect, updates.direction );\n\t\tconst newReplay = updates.replay !== undefined ? updates.replay : replay;\n\n\t\tconst updatedInteraction = {\n\t\t\t...interaction,\n\t\t\tinteraction_id: interaction.interaction_id,\n\t\t\ttrigger: createString( updates.trigger ?? trigger ),\n\t\t\tanimation: createAnimationPreset( {\n\t\t\t\teffect: updates.effect ?? effect,\n\t\t\t\ttype: updates.type ?? type,\n\t\t\t\tdirection: resolvedDirectionValue,\n\t\t\t\tduration: updates.duration ?? duration,\n\t\t\t\tdelay: updates.delay ?? delay,\n\t\t\t\treplay: newReplay,\n\t\t\t} ),\n\t\t};\n\n\t\tonChange( updatedInteraction );\n\n\t\tconst interactionId = extractString( updatedInteraction.interaction_id );\n\t\tsetTimeout( () => {\n\t\t\tonPlayInteraction( interactionId );\n\t\t}, 0 );\n\t};\n\n\treturn (\n\t\t<PopoverContent p={ 1.5 }>\n\t\t\t<Grid container spacing={ 1.5 }>\n\t\t\t\t{ TriggerControl && (\n\t\t\t\t\t<TriggerControl value={ trigger } onChange={ ( v ) => updateInteraction( { trigger: v } ) } />\n\t\t\t\t) }\n\t\t\t\t{ ReplayControl && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Grid item xs={ 12 }>\n\t\t\t\t\t\t\t<PopoverGridContainer>\n\t\t\t\t\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t\t\t\t\t<ControlFormLabel>{ __( 'Replay', 'elementor' ) }</ControlFormLabel>\n\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t\t\t\t\t<ReplayControl\n\t\t\t\t\t\t\t\t\t\tvalue={ replay }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( v ) => updateInteraction( { replay: v } ) }\n\t\t\t\t\t\t\t\t\t\tdisabled={ true }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t</PopoverGridContainer>\n\t\t\t\t\t\t</Grid>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</Grid>\n\t\t\t<Divider />\n\t\t\t<Grid container spacing={ 1.5 }>\n\t\t\t\t<Effect value={ effect } onChange={ ( v ) => updateInteraction( { effect: v } ) } />\n\t\t\t\t<EffectType value={ type } onChange={ ( v ) => updateInteraction( { type: v } ) } />\n\t\t\t\t<Direction\n\t\t\t\t\tvalue={ direction }\n\t\t\t\t\tonChange={ ( v ) => updateInteraction( { direction: v } ) }\n\t\t\t\t\tinteractionType={ type }\n\t\t\t\t/>\n\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\tvalue={ String( duration ) }\n\t\t\t\t\tonChange={ ( v ) => updateInteraction( { duration: parseInt( v, 10 ) } ) }\n\t\t\t\t\tlabel={ __( 'Duration', 'elementor' ) }\n\t\t\t\t/>\n\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\tvalue={ String( delay ) }\n\t\t\t\t\tonChange={ ( v ) => updateInteraction( { delay: parseInt( v, 10 ) } ) }\n\t\t\t\t\tlabel={ __( 'Delay', 'elementor' ) }\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</PopoverContent>\n\t);\n};\n","import { type ComponentType } from 'react';\n\nimport { type DirectionFieldProps, type FieldProps, type ReplayFieldProps } from './types';\n\ntype InteractionsControlType = 'trigger' | 'effect' | 'effectType' | 'direction' | 'duration' | 'delay' | 'replay';\n\ntype InteractionsControlPropsMap = {\n\ttrigger: FieldProps;\n\teffect: FieldProps;\n\teffectType: FieldProps;\n\tdirection: DirectionFieldProps;\n\tduration: FieldProps;\n\tdelay: FieldProps;\n\treplay: ReplayFieldProps;\n};\n\ntype ControlOptions< T extends InteractionsControlType > = {\n\ttype: T;\n\tcomponent: ComponentType< InteractionsControlPropsMap[ T ] >;\n\toptions?: string[];\n};\n\ntype StoredControlOptions = {\n\ttype: InteractionsControlType;\n\tcomponent: ComponentType< FieldProps | DirectionFieldProps | ReplayFieldProps >;\n\toptions?: string[];\n};\n\nconst controlsRegistry = new Map< InteractionsControlType, StoredControlOptions >();\n\nexport function registerInteractionsControl< T extends InteractionsControlType >( {\n\ttype,\n\tcomponent,\n\toptions,\n}: ControlOptions< T > ) {\n\tcontrolsRegistry.set( type, { type, component: component as StoredControlOptions[ 'component' ], options } );\n}\n\nexport function getInteractionsControl( type: InteractionsControlType ) {\n\treturn controlsRegistry.get( type );\n}\n\nexport function getInteractionsControlOptions( type: InteractionsControlType ) {\n\treturn controlsRegistry.get( type )?.options ?? [];\n}\n","import * as React from 'react';\nimport { useMemo } from 'react';\nimport {\n\tControlFormLabel,\n\tPopoverGridContainer,\n\ttype ToggleButtonGroupItem,\n\tToggleButtonGroupUi,\n} from '@elementor/editor-controls';\nimport { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from '@elementor/icons';\nimport { Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type DirectionFieldProps } from '../../types';\n\ntype Direction = 'top' | 'bottom' | 'left' | 'right';\n\nexport function Direction( { value, onChange, interactionType }: DirectionFieldProps ) {\n\tconst options: ToggleButtonGroupItem< Direction >[] = useMemo( () => {\n\t\tconst isIn = interactionType === 'in';\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tvalue: 'top',\n\t\t\t\tlabel: isIn ? __( 'From top', 'elementor' ) : __( 'To top', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowDownSmallIcon fontSize={ size } /> : <ArrowUpSmallIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'bottom',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From bottom', 'elementor' ) : __( 'To bottom', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowUpSmallIcon fontSize={ size } /> : <ArrowDownSmallIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'left',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From left', 'elementor' ) : __( 'To left', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowRightIcon fontSize={ size } /> : <ArrowLeftIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'right',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From right', 'elementor' ) : __( 'To right', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowLeftIcon fontSize={ size } /> : <ArrowRightIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t];\n\t}, [ interactionType ] );\n\n\treturn (\n\t\t<Grid item xs={ 12 }>\n\t\t\t<PopoverGridContainer>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ControlFormLabel> { __( 'Direction', 'elementor' ) }</ControlFormLabel>\n\t\t\t\t</Grid>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />\n\t\t\t\t</Grid>\n\t\t\t</PopoverGridContainer>\n\t\t</Grid>\n\t);\n}\n","import * as React from 'react';\nimport { ControlFormLabel, PopoverGridContainer } from '@elementor/editor-controls';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\nexport function Effect( { value, onChange }: FieldProps ) {\n\tconst availableEffects = [\n\t\t{ key: 'fade', label: __( 'Fade', 'elementor' ) },\n\t\t{ key: 'slide', label: __( 'Slide', 'elementor' ) },\n\t\t{ key: 'scale', label: __( 'Scale', 'elementor' ) },\n\t];\n\n\treturn (\n\t\t<Grid item xs={ 12 }>\n\t\t\t<PopoverGridContainer>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ControlFormLabel>{ __( 'Effect', 'elementor' ) }</ControlFormLabel>\n\t\t\t\t</Grid>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<Select\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tdisplayEmpty\n\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ availableEffects.map( ( effect ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<MenuListItem key={ effect.key } value={ effect.key }>\n\t\t\t\t\t\t\t\t\t{ effect.label }\n\t\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Select>\n\t\t\t\t</Grid>\n\t\t\t</PopoverGridContainer>\n\t\t</Grid>\n\t);\n}\n","import * as React from 'react';\nimport {\n\tControlFormLabel,\n\tPopoverGridContainer,\n\ttype ToggleButtonGroupItem,\n\tToggleButtonGroupUi,\n} from '@elementor/editor-controls';\nimport { Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\ntype EffectType = 'in' | 'out';\nexport function EffectType( { value, onChange }: FieldProps ) {\n\tconst options: ToggleButtonGroupItem< EffectType >[] = [\n\t\t{\n\t\t\tvalue: 'in',\n\t\t\tlabel: __( 'In', 'elementor' ),\n\t\t\trenderContent: () => __( 'In', 'elementor' ),\n\t\t\tshowTooltip: true,\n\t\t},\n\t\t{\n\t\t\tvalue: 'out',\n\t\t\tlabel: __( 'Out', 'elementor' ),\n\t\t\trenderContent: () => __( 'Out', 'elementor' ),\n\t\t\tshowTooltip: true,\n\t\t},\n\t];\n\n\treturn (\n\t\t<>\n\t\t\t<Grid item xs={ 12 }>\n\t\t\t\t<PopoverGridContainer>\n\t\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t\t<ControlFormLabel>{ __( 'Type', 'elementor' ) }</ControlFormLabel>\n\t\t\t\t\t</Grid>\n\t\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t\t<ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />\n\t\t\t\t\t</Grid>\n\t\t\t\t</PopoverGridContainer>\n\t\t\t</Grid>\n\t\t</>\n\t);\n}\n","import * as React from 'react';\nimport { ControlFormLabel, PopoverGridContainer } from '@elementor/editor-controls';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\nexport function TimeFrameIndicator( { value, onChange, label }: FieldProps ) {\n\tconst availableTimeFrames = [ '0', '100', '200', '300', '400', '500', '750', '1000', '1250', '1500' ].map(\n\t\t( key ) => ( {\n\t\t\tkey,\n\t\t\t// translators: %s: time in milliseconds\n\t\t\tlabel: __( '%s MS', 'elementor' ).replace( '%s', key ),\n\t\t} )\n\t);\n\n\treturn (\n\t\t<Grid item xs={ 12 }>\n\t\t\t<PopoverGridContainer>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ControlFormLabel>{ label }</ControlFormLabel>\n\t\t\t\t</Grid>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<Select\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tdisplayEmpty\n\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ availableTimeFrames.map( ( timeFrame ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<MenuListItem key={ timeFrame.key } value={ timeFrame.key }>\n\t\t\t\t\t\t\t\t\t{ timeFrame.label }\n\t\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Select>\n\t\t\t\t</Grid>\n\t\t\t</PopoverGridContainer>\n\t\t</Grid>\n\t);\n}\n","import { type InteractionsConfig } from '../types';\n\nconst DEFAULT_CONFIG: InteractionsConfig = {\n\tconstants: {\n\t\tdefaultDuration: 300,\n\t\tdefaultDelay: 0,\n\t\tslideDistance: 100,\n\t\tscaleStart: 0.5,\n\t\teasing: 'linear',\n\t},\n\tanimationOptions: [],\n};\n\nexport function getInteractionsConfig(): InteractionsConfig {\n\treturn window.ElementorInteractionsConfig || DEFAULT_CONFIG;\n}\n","import { type InteractionsProvider } from '../types';\n\nexport const createInteractionsRepository = () => {\n\tconst providers: InteractionsProvider[] = [];\n\n\tconst getProviders = () => {\n\t\tconst sorted = providers.slice( 0 ).sort( ( a, b ) => ( a.priority > b.priority ? -1 : 1 ) );\n\t\treturn sorted;\n\t};\n\n\tconst register = ( provider: InteractionsProvider ) => {\n\t\tproviders.push( provider );\n\t};\n\n\tconst all = () => {\n\t\treturn getProviders().flatMap( ( provider ) => provider.actions.all() );\n\t};\n\n\tconst subscribe = ( cb: () => void ) => {\n\t\tconst unsubscribes = providers.map( ( provider ) => provider.subscribe( cb ) );\n\n\t\treturn () => {\n\t\t\tunsubscribes.forEach( ( unsubscribe ) => unsubscribe() );\n\t\t};\n\t};\n\n\tconst getProviderByKey = ( key: string ) => {\n\t\treturn providers.find( ( provider ) => {\n\t\t\ttry {\n\t\t\t\treturn provider.getKey() === key;\n\t\t\t} catch {\n\t\t\t\t// Provider might not be ready yet (e.g., no document loaded)\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\t};\n\n\treturn {\n\t\tall,\n\t\tregister,\n\t\tsubscribe,\n\t\tgetProviders,\n\t\tgetProviderByKey,\n\t};\n};\n","import { createInteractionsRepository } from './utils/create-interactions-repository';\n\nexport const interactionsRepository = createInteractionsRepository();\n","import { type InteractionsProvider } from '../types';\n\nexport type CreateInteractionsProviderOptions = {\n\tkey: string | ( () => string );\n\tpriority?: number;\n\tsubscribe?: ( callback: () => void ) => () => void;\n\tactions: {\n\t\tall: InteractionsProvider[ 'actions' ][ 'all' ];\n\t};\n};\n\nconst DEFAULT_PRIORITY = 10;\n\nexport function createInteractionsProvider( {\n\tkey,\n\tpriority = DEFAULT_PRIORITY,\n\tsubscribe = () => () => {},\n\tactions,\n}: CreateInteractionsProviderOptions ): InteractionsProvider {\n\treturn {\n\t\tgetKey: typeof key === 'string' ? () => key : key,\n\t\tpriority,\n\t\tsubscribe,\n\t\tactions: {\n\t\t\tall: actions.all,\n\t\t},\n\t};\n}\n","import { getCurrentDocumentId, getElementInteractions, getElements } from '@elementor/editor-elements';\nimport { __privateListenTo as listenTo, windowEvent } from '@elementor/editor-v1-adapters';\n\nimport { createInteractionsProvider } from '../utils/create-interactions-provider';\n\nexport const ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX = 'document-elements-interactions-';\n\nexport const documentElementsInteractionsProvider = createInteractionsProvider( {\n\tkey: () => {\n\t\tconst documentId = getCurrentDocumentId();\n\n\t\tif ( ! documentId ) {\n\t\t\tconst pendingKey = `${ ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX }pending`;\n\t\t\treturn pendingKey;\n\t\t}\n\n\t\tconst key = `${ ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX }${ documentId }`;\n\t\treturn key;\n\t},\n\tpriority: 50,\n\tsubscribe: ( cb ) => {\n\t\treturn listenTo( [ windowEvent( 'elementor/element/update_interactions' ) ], () => cb() );\n\t},\n\tactions: {\n\t\tall: () => {\n\t\t\tconst elements = getElements();\n\n\t\t\tconst filtered = elements.filter( ( element ) => {\n\t\t\t\tconst interactions = getElementInteractions( element.id );\n\t\t\t\tif ( ! interactions ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn interactions?.items?.length > 0;\n\t\t\t} );\n\n\t\t\treturn filtered.map( ( element ) => {\n\t\t\t\tconst interactions = getElementInteractions( element.id );\n\t\t\t\treturn {\n\t\t\t\t\telementId: element.id,\n\t\t\t\t\tdataId: element.id,\n\t\t\t\t\tinteractions: interactions || { version: 1, items: [] },\n\t\t\t\t};\n\t\t\t} );\n\t\t},\n\t},\n} );\n","import * as React from 'react';\nimport { ControlFormLabel, PopoverGridContainer } from '@elementor/editor-controls';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\nexport function Trigger( { value, onChange }: FieldProps ) {\n\tconst availableTriggers = Object.entries( {\n\t\tload: __( 'Page load', 'elementor' ),\n\t\tscrollIn: __( 'Scroll into view', 'elementor' ),\n\t} ).map( ( [ key, label ] ) => ( {\n\t\tkey,\n\t\tlabel,\n\t} ) );\n\n\treturn (\n\t\t<Grid item xs={ 12 }>\n\t\t\t<PopoverGridContainer>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ControlFormLabel>{ __( 'Trigger', 'elementor' ) }</ControlFormLabel>\n\t\t\t\t</Grid>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<Select\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tdisplayEmpty\n\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ availableTriggers.map( ( trigger ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<MenuListItem key={ trigger.key } value={ trigger.key }>\n\t\t\t\t\t\t\t\t\t{ trigger.label }\n\t\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Select>\n\t\t\t\t</Grid>\n\t\t\t</PopoverGridContainer>\n\t\t</Grid>\n\t);\n}\n","import { type ElementID, getAllDescendants, getContainer, type V1Element } from '@elementor/editor-elements';\nimport { registerDataHook } from '@elementor/editor-v1-adapters';\n\nimport type { ElementInteractions } from '../types';\nimport { createString } from '../utils/prop-value-utils';\nimport { generateTempInteractionId } from '../utils/temp-id-utils';\n\nexport function initCleanInteractionIdsOnDuplicate() {\n\tregisterDataHook( 'after', 'document/elements/duplicate', ( _args, result: V1Element | V1Element[] ) => {\n\t\tconst containers = Array.isArray( result ) ? result : [ result ];\n\n\t\tcontainers.forEach( ( container ) => {\n\t\t\tcleanInteractionIdsRecursive( container.id );\n\t\t} );\n\t} );\n}\n\nfunction cleanInteractionIdsRecursive( elementId: ElementID ) {\n\tconst container = getContainer( elementId );\n\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tgetAllDescendants( container ).forEach( ( element: V1Element ) => {\n\t\tcleanInteractionIds( element.id as ElementID );\n\t} );\n}\n\nfunction cleanInteractionIds( elementId: ElementID ) {\n\tconst container = getContainer( elementId );\n\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tconst interactions = container.model.get( 'interactions' ) as ElementInteractions;\n\n\tif ( ! interactions || ! interactions.items ) {\n\t\treturn;\n\t}\n\n\tconst updatedInteractions = structuredClone( interactions ) as ElementInteractions;\n\n\tupdatedInteractions?.items?.forEach( ( interaction ) => {\n\t\tif ( interaction.$$type === 'interaction-item' && interaction.value ) {\n\t\t\tinteraction.value.interaction_id = createString( generateTempInteractionId() );\n\t\t}\n\t} );\n\n\tcontainer.model.set( 'interactions', updatedInteractions );\n}\n","import { Trigger } from './components/controls/trigger';\nimport { initCleanInteractionIdsOnDuplicate } from './hooks/on-duplicate';\nimport { registerInteractionsControl } from './interactions-controls-registry';\nimport { interactionsRepository } from './interactions-repository';\nimport { documentElementsInteractionsProvider } from './providers/document-elements-interactions-provider';\n\nexport function init() {\n\ttry {\n\t\tinteractionsRepository.register( documentElementsInteractionsProvider );\n\t\tinitCleanInteractionIdsOnDuplicate();\n\t\tregisterInteractionsControl( {\n\t\t\ttype: 'trigger',\n\t\t\tcomponent: Trigger,\n\t\t\toptions: [ 'load', 'scrollIn' ],\n\t\t} );\n\t} catch ( error ) {\n\t\tthrow error;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,mBAA0B;AAC1B,gBAA0C;AAC1C,kBAAmB;AAEZ,IAAM,aAAa,CAAE,EAAE,oBAAoB,MAA4C;AAC7F,SACC;AAAA,IAAC;AAAA;AAAA,MACA,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,QAAO;AAAA,MACP,OAAM;AAAA,MACN,IAAK,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,IAAI;AAAA,MAC9B,KAAM;AAAA;AAAA,IAEN,oCAAC,0BAAU,UAAS,SAAQ;AAAA,IAE5B,oCAAC,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B,QAAQ,EAAgB;AAAA,EAC9C,CAAE;AACH;AAEA,SAAS,oBAAqB,WAAuB;AACpD,QAAM,gBAAY,sCAAc,SAAU;AAE1C,MAAK,CAAE,WAAY;AAClB;AAAA,EACD;AAEA,QAAM,eAAe,UAAU,MAAM,IAAK,cAAe;AAEzD,MAAK,CAAE,gBAAgB,CAAE,aAAa,OAAQ;AAC7C;AAAA,EACD;AAEA,QAAM,sBAAsB,gBAAiB,YAAa;AAE1D,uBAAqB,OAAO,QAAS,CAAE,gBAAiB;AACvD,QAAK,YAAY,WAAW,sBAAsB,YAAY,OAAQ;AACrE,kBAAY,MAAM,iBAAiB,aAAc,0BAA0B,CAAE;AAAA,IAC9E;AAAA,EACD,CAAE;AAEF,YAAU,MAAM,IAAK,gBAAgB,mBAAoB;AAC1D;;;AC7CO,SAAS,OAAO;AACtB,MAAI;AACH,2BAAuB,SAAU,oCAAqC;AACtE,uCAAmC;AACnC,gCAA6B;AAAA,MAC5B,MAAM;AAAA,MACN,WAAW;AAAA,MACX,SAAS,CAAE,QAAQ,UAAW;AAAA,IAC/B,CAAE;AAAA,EACH,SAAU,OAAQ;AACjB,UAAM;AAAA,EACP;AACD;","names":["React","import_react","import_editor_elements","import_ui","React","React","import_react","React","import_react","import_editor_controls","import_icons","import_ui","import_i18n","React","import_react","import_editor_controls","import_ui","import_i18n","React","import_react","import_icons","import_ui","import_i18n","React","import_editor_controls","import_ui","import_i18n","React","import_editor_controls","import_ui","import_i18n","React","import_editor_controls","import_editor_ui","import_ui","import_i18n","import_editor_elements","listenTo","React","import_editor_controls","import_editor_ui","import_ui","import_i18n","import_editor_elements","import_editor_v1_adapters"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/components/empty-state.tsx","../src/components/interactions-tab.tsx","../src/contexts/interactions-context.tsx","../src/contexts/popup-state-context.tsx","../src/components/interactions-list.tsx","../src/utils/temp-id-utils.ts","../src/utils/prop-value-utils.ts","../src/components/interaction-details.tsx","../src/interactions-controls-registry.ts","../src/components/controls/direction.tsx","../src/components/controls/effect.tsx","../src/components/controls/effect-type.tsx","../src/components/controls/time-frame-indicator.tsx","../src/utils/get-interactions-config.ts","../src/utils/create-interactions-repository.ts","../src/interactions-repository.ts","../src/utils/create-interactions-provider.ts","../src/providers/document-elements-interactions-provider.ts","../src/components/controls/trigger.tsx","../src/hooks/on-duplicate.ts","../src/init.ts"],"sourcesContent":["export * from './components/empty-state';\nexport * from './components/interactions-tab';\nexport * from './types';\nexport * from './utils/get-interactions-config';\n\nexport { interactionsRepository } from './interactions-repository';\nexport {\n\tcreateInteractionsProvider,\n\ttype CreateInteractionsProviderOptions,\n} from './utils/create-interactions-provider';\n\nexport { ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX } from './providers/document-elements-interactions-provider';\nexport { init } from './init';\nexport { registerInteractionsControl } from './interactions-controls-registry';\n","import * as React from 'react';\nimport { SwipeIcon } from '@elementor/icons';\nimport { Button, Stack, Typography } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nexport const EmptyState = ( { onCreateInteraction }: { onCreateInteraction: () => void } ) => {\n\treturn (\n\t\t<Stack\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t\theight=\"100%\"\n\t\t\tcolor=\"text.secondary\"\n\t\t\tsx={ { p: 2.5, pt: 8, pb: 5.5 } }\n\t\t\tgap={ 1.5 }\n\t\t>\n\t\t\t<SwipeIcon fontSize=\"large\" />\n\n\t\t\t<Typography align=\"center\" variant=\"subtitle2\">\n\t\t\t\t{ __( 'Animate elements with Interactions', 'elementor' ) }\n\t\t\t</Typography>\n\n\t\t\t<Typography align=\"center\" variant=\"caption\" maxWidth=\"170px\">\n\t\t\t\t{ __(\n\t\t\t\t\t'Add entrance animations and effects triggered by user interactions such as page load or scroll.',\n\t\t\t\t\t'elementor'\n\t\t\t\t) }\n\t\t\t</Typography>\n\n\t\t\t<Button variant=\"outlined\" color=\"secondary\" size=\"small\" sx={ { mt: 1 } } onClick={ onCreateInteraction }>\n\t\t\t\t{ __( 'Create an interaction', 'elementor' ) }\n\t\t\t</Button>\n\t\t</Stack>\n\t);\n};\n","import * as React from 'react';\nimport { useCallback, useState } from 'react';\nimport { useElementInteractions } from '@elementor/editor-elements';\nimport { SessionStorageProvider } from '@elementor/session';\nimport { Stack } from '@elementor/ui';\n\nimport { InteractionsProvider, useInteractionsContext } from '../contexts/interactions-context';\nimport { PopupStateProvider } from '../contexts/popup-state-context';\nimport type { ElementInteractions } from '../types';\nimport { EmptyState } from './empty-state';\nimport { InteractionsList } from './interactions-list';\n\nexport const InteractionsTab = ( { elementId }: { elementId: string } ) => {\n\treturn (\n\t\t<PopupStateProvider>\n\t\t\t<InteractionsTabContent elementId={ elementId } />\n\t\t</PopupStateProvider>\n\t);\n};\n\nfunction InteractionsTabContent( { elementId }: { elementId: string } ) {\n\tconst existingInteractions = useElementInteractions( elementId ) as unknown as ElementInteractions | undefined;\n\tconst firstInteractionState = useState< boolean >( false );\n\tconst hasInteractions = existingInteractions?.items?.length || firstInteractionState[ 0 ];\n\n\treturn (\n\t\t<SessionStorageProvider prefix={ elementId }>\n\t\t\t{ hasInteractions ? (\n\t\t\t\t<InteractionsProvider elementId={ elementId }>\n\t\t\t\t\t<InteractionsContent firstInteractionState={ firstInteractionState } />\n\t\t\t\t</InteractionsProvider>\n\t\t\t) : (\n\t\t\t\t<EmptyState\n\t\t\t\t\tonCreateInteraction={ () => {\n\t\t\t\t\t\tfirstInteractionState[ 1 ]( true );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</SessionStorageProvider>\n\t);\n}\n\nfunction InteractionsContent( {\n\tfirstInteractionState,\n}: {\n\tfirstInteractionState: [ boolean, ( value: boolean ) => void ];\n} ) {\n\tconst { interactions, setInteractions, playInteractions } = useInteractionsContext();\n\n\tconst applyInteraction = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\n\t\t\tfirstInteractionState[ 1 ]( false );\n\t\t\tif ( ! newInteractions ) {\n\t\t\t\tsetInteractions( undefined );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetInteractions( newInteractions );\n\t\t},\n\t\t[ setInteractions, firstInteractionState ]\n\t);\n\n\treturn (\n\t\t<Stack sx={ { m: 1, p: 1.5 } } gap={ 2 }>\n\t\t\t<InteractionsList\n\t\t\t\ttriggerCreateOnShowEmpty={ firstInteractionState[ 0 ] }\n\t\t\t\tinteractions={ interactions }\n\t\t\t\tonSelectInteractions={ applyInteraction }\n\t\t\t\tonPlayInteraction={ playInteractions }\n\t\t\t/>\n\t\t</Stack>\n\t);\n}\n","import * as React from 'react';\nimport { createContext, type ReactNode, useContext, useEffect } from 'react';\nimport {\n\ttype ElementInteractions,\n\tplayElementInteractions,\n\tupdateElementInteractions,\n\tuseElementInteractions,\n} from '@elementor/editor-elements';\n\ntype InteractionsContextValue = {\n\tinteractions: ElementInteractions;\n\tsetInteractions: ( value: ElementInteractions | undefined ) => void;\n\tplayInteractions: ( interactionId: string ) => void;\n};\n\nconst InteractionsContext = createContext< InteractionsContextValue | null >( null );\n\nconst DEFAULT_INTERACTIONS: ElementInteractions = {\n\tversion: 1,\n\titems: [],\n};\n\nexport const InteractionsProvider = ( { children, elementId }: { children: ReactNode; elementId: string } ) => {\n\tconst rawInteractions = useElementInteractions( elementId );\n\n\tuseEffect( () => {\n\t\twindow.dispatchEvent( new CustomEvent( 'elementor/element/update_interactions' ) );\n\t}, [] );\n\n\tconst interactions: ElementInteractions =\n\t\t( rawInteractions as unknown as ElementInteractions ) ?? DEFAULT_INTERACTIONS;\n\n\tconst setInteractions = ( value: ElementInteractions | undefined ) => {\n\t\tconst normalizedValue = value && value.items?.length === 0 ? undefined : value;\n\n\t\tupdateElementInteractions( {\n\t\t\telementId,\n\t\t\tinteractions: normalizedValue,\n\t\t} );\n\t};\n\n\tconst playInteractions = ( interactionId: string ) => {\n\t\tplayElementInteractions( elementId, interactionId );\n\t};\n\n\tconst contextValue: InteractionsContextValue = {\n\t\tinteractions,\n\t\tsetInteractions,\n\t\tplayInteractions,\n\t};\n\n\treturn <InteractionsContext.Provider value={ contextValue }>{ children }</InteractionsContext.Provider>;\n};\n\nexport const useInteractionsContext = () => {\n\tconst context = useContext( InteractionsContext );\n\tif ( ! context ) {\n\t\tthrow new Error( 'useInteractionsContext must be used within InteractionsProvider' );\n\t}\n\treturn context;\n};\n","import * as React from 'react';\nimport { createContext, useCallback, useContext, useState } from 'react';\n\ntype PopupStateContextType = {\n\topenByDefault: boolean;\n\ttriggerDefaultOpen: () => void;\n\tresetDefaultOpen: () => void;\n};\n\nconst PopupStateContext = createContext< PopupStateContextType | undefined >( undefined );\n\nexport const PopupStateProvider = ( { children }: { children: React.ReactNode } ) => {\n\tconst [ openByDefault, setOpenByDefault ] = useState( false );\n\n\tconst triggerDefaultOpen = useCallback( () => {\n\t\tsetOpenByDefault( true );\n\t}, [] );\n\n\tconst resetDefaultOpen = useCallback( () => {\n\t\tsetOpenByDefault( false );\n\t}, [] );\n\n\treturn (\n\t\t<PopupStateContext.Provider value={ { openByDefault, triggerDefaultOpen, resetDefaultOpen } }>\n\t\t\t{ children }\n\t\t</PopupStateContext.Provider>\n\t);\n};\n\nexport const usePopupStateContext = () => {\n\tconst context = useContext( PopupStateContext );\n\tif ( ! context ) {\n\t\tthrow new Error( 'usePopupStateContext must be used within PopupStateProvider' );\n\t}\n\treturn context;\n};\n","import * as React from 'react';\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { Repeater } from '@elementor/editor-controls';\nimport { InfoCircleFilledIcon, PlayerPlayIcon } from '@elementor/icons';\nimport { Alert, AlertTitle, Box, IconButton, Tooltip } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport type { ElementInteractions, InteractionItemPropValue, InteractionItemValue } from '../types';\nimport { buildDisplayLabel, createDefaultInteractionItem, extractString } from '../utils/prop-value-utils';\nimport { InteractionDetails } from './interaction-details';\nexport const MAX_NUMBER_OF_INTERACTIONS = 5;\n\nexport type InteractionListProps = {\n\tonSelectInteractions: ( interactions: ElementInteractions ) => void;\n\tinteractions: ElementInteractions;\n\tonPlayInteraction: ( interactionId: string ) => void;\n\ttriggerCreateOnShowEmpty?: boolean;\n};\n\nexport function InteractionsList( props: InteractionListProps ) {\n\tconst { interactions, onSelectInteractions, onPlayInteraction, triggerCreateOnShowEmpty } = props;\n\n\tconst hasInitializedRef = useRef( false );\n\n\tconst handleUpdateInteractions = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\n\t\t\tonSelectInteractions( newInteractions );\n\t\t},\n\t\t[ onSelectInteractions ]\n\t);\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\ttriggerCreateOnShowEmpty &&\n\t\t\t! hasInitializedRef.current &&\n\t\t\t( ! interactions.items || interactions.items?.length === 0 )\n\t\t) {\n\t\t\thasInitializedRef.current = true;\n\t\t\tconst newState: ElementInteractions = {\n\t\t\t\tversion: 1,\n\t\t\t\titems: [ createDefaultInteractionItem() ],\n\t\t\t};\n\t\t\thandleUpdateInteractions( newState );\n\t\t}\n\t}, [ triggerCreateOnShowEmpty, interactions.items, handleUpdateInteractions ] );\n\n\tconst isMaxNumberOfInteractionsReached = useMemo( () => {\n\t\treturn interactions.items?.length >= MAX_NUMBER_OF_INTERACTIONS;\n\t}, [ interactions.items?.length ] );\n\n\tconst infotipContent = isMaxNumberOfInteractionsReached ? (\n\t\t<Alert color=\"secondary\" icon={ <InfoCircleFilledIcon /> } size=\"small\">\n\t\t\t<AlertTitle>{ __( 'Interactions', 'elementor' ) }</AlertTitle>\n\t\t\t<Box component=\"span\">\n\t\t\t\t{ __(\n\t\t\t\t\t\"You've reached the limit of 5 interactions for this element. Please remove an interaction before creating a new one.\",\n\t\t\t\t\t'elementor'\n\t\t\t\t) }\n\t\t\t</Box>\n\t\t</Alert>\n\t) : undefined;\n\n\tconst handleRepeaterChange = useCallback(\n\t\t( newItems: ElementInteractions[ 'items' ] ) => {\n\t\t\thandleUpdateInteractions( {\n\t\t\t\t...interactions,\n\t\t\t\titems: newItems,\n\t\t\t} );\n\t\t},\n\t\t[ interactions, handleUpdateInteractions ]\n\t);\n\n\tconst handleInteractionChange = useCallback(\n\t\t( index: number, newInteractionValue: InteractionItemValue ) => {\n\t\t\tconst newItems = structuredClone( interactions.items );\n\t\t\tnewItems[ index ] = {\n\t\t\t\t$$type: 'interaction-item',\n\t\t\t\tvalue: newInteractionValue,\n\t\t\t};\n\t\t\thandleUpdateInteractions( {\n\t\t\t\t...interactions,\n\t\t\t\titems: newItems,\n\t\t\t} );\n\t\t},\n\t\t[ interactions, handleUpdateInteractions ]\n\t);\n\n\treturn (\n\t\t<Repeater\n\t\t\topenOnAdd\n\t\t\topenItem={ triggerCreateOnShowEmpty ? 0 : undefined }\n\t\t\tlabel={ __( 'Interactions', 'elementor' ) }\n\t\t\tvalues={ interactions.items }\n\t\t\tsetValues={ handleRepeaterChange }\n\t\t\tshowDuplicate={ false }\n\t\t\tshowToggle={ false }\n\t\t\tisSortable={ false }\n\t\t\tdisableAddItemButton={ isMaxNumberOfInteractionsReached }\n\t\t\taddButtonInfotipContent={ infotipContent }\n\t\t\titemSettings={ {\n\t\t\t\tinitialValues: createDefaultInteractionItem(),\n\t\t\t\tLabel: ( { value }: { value: InteractionItemPropValue } ) => buildDisplayLabel( value.value ),\n\t\t\t\tIcon: () => null,\n\t\t\t\tContent: ( { index, value }: { index: number; value: InteractionItemPropValue } ) => (\n\t\t\t\t\t<InteractionDetails\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tinteraction={ value.value }\n\t\t\t\t\t\tonChange={ ( newInteractionValue: InteractionItemValue ) => {\n\t\t\t\t\t\t\thandleInteractionChange( index, newInteractionValue );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonPlayInteraction={ onPlayInteraction }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tactions: ( value: InteractionItemPropValue ) => (\n\t\t\t\t\t<Tooltip key=\"preview\" placement=\"top\" title={ __( 'Preview', 'elementor' ) }>\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\taria-label={ __( 'Play interaction', 'elementor' ) }\n\t\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\t\tonClick={ () => onPlayInteraction( extractString( value.value.interaction_id ) ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PlayerPlayIcon fontSize=\"tiny\" />\n\t\t\t\t\t\t</IconButton>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\n\t);\n}\n","const TEMP_ID_PREFIX = 'temp-';\nconst TEMP_ID_REGEX = /^temp-[a-z0-9]+$/i;\n\nexport function generateTempInteractionId(): string {\n\treturn `${ TEMP_ID_PREFIX }${ Math.random().toString( 36 ).substring( 2, 11 ) }`;\n}\n\nexport function isTempId( id: string | undefined ): boolean {\n\treturn !! id && TEMP_ID_REGEX.test( id );\n}\n","import type {\n\tAnimationPresetPropValue,\n\tBooleanPropValue,\n\tConfigPropValue,\n\tElementInteractions,\n\tInteractionItemPropValue,\n\tInteractionItemValue,\n\tNumberPropValue,\n\tStringPropValue,\n\tTimingConfigPropValue,\n} from '../types';\nimport { generateTempInteractionId } from './temp-id-utils';\n\nexport const createString = ( value: string ): StringPropValue => ( {\n\t$$type: 'string',\n\tvalue,\n} );\n\nexport const createNumber = ( value: number ): NumberPropValue => ( {\n\t$$type: 'number',\n\tvalue,\n} );\n\nexport const createTimingConfig = ( duration: number, delay: number ): TimingConfigPropValue => ( {\n\t$$type: 'timing-config',\n\tvalue: {\n\t\tduration: createNumber( duration ),\n\t\tdelay: createNumber( delay ),\n\t},\n} );\n\nexport const createBoolean = ( value: boolean ): BooleanPropValue => ( {\n\t$$type: 'boolean',\n\tvalue,\n} );\n\nexport const createConfig = ( replay: boolean ): ConfigPropValue => ( {\n\t$$type: 'config',\n\tvalue: {\n\t\treplay: createBoolean( replay ),\n\t},\n} );\n\nexport const extractBoolean = ( prop: BooleanPropValue | undefined, fallback = false ): boolean => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const createAnimationPreset = ( {\n\teffect,\n\ttype,\n\tdirection,\n\tduration,\n\tdelay,\n\treplay = false,\n}: {\n\teffect: string;\n\ttype: string;\n\tdirection?: string;\n\tduration: number;\n\tdelay: number;\n\treplay: boolean;\n} ): AnimationPresetPropValue => ( {\n\t$$type: 'animation-preset-props',\n\tvalue: {\n\t\teffect: createString( effect ),\n\t\ttype: createString( type ),\n\t\tdirection: createString( direction ?? '' ),\n\t\ttiming_config: createTimingConfig( duration, delay ),\n\t\tconfig: createConfig( replay ),\n\t},\n} );\n\nexport const createInteractionItem = ( {\n\ttrigger,\n\teffect,\n\ttype,\n\tdirection,\n\tduration,\n\tdelay,\n\tinteractionId,\n\treplay = false,\n}: {\n\ttrigger: string;\n\teffect: string;\n\ttype: string;\n\tdirection?: string;\n\tduration: number;\n\tdelay: number;\n\tinteractionId?: string;\n\treplay: boolean;\n} ): InteractionItemPropValue => ( {\n\t$$type: 'interaction-item',\n\tvalue: {\n\t\t...( interactionId && { interaction_id: createString( interactionId ) } ),\n\t\ttrigger: createString( trigger ),\n\t\tanimation: createAnimationPreset( { effect, type, direction, duration, delay, replay } ),\n\t},\n} );\n\nexport const createDefaultInteractionItem = (): InteractionItemPropValue => {\n\treturn createInteractionItem( {\n\t\ttrigger: 'load',\n\t\teffect: 'fade',\n\t\ttype: 'in',\n\t\tduration: 300,\n\t\tdelay: 0,\n\t\treplay: false,\n\t\tinteractionId: generateTempInteractionId(),\n\t} );\n};\n\nexport const createDefaultInteractions = (): ElementInteractions => ( {\n\tversion: 1,\n\titems: [ createDefaultInteractionItem() ],\n} );\n\nexport const extractString = ( prop: StringPropValue | undefined, fallback = '' ): string => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const extractNumber = ( prop: NumberPropValue | undefined, fallback = 0 ): number => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const buildAnimationIdString = ( item: InteractionItemValue ): string => {\n\tconst trigger = extractString( item.trigger );\n\tconst effect = extractString( item.animation.value.effect );\n\tconst type = extractString( item.animation.value.type );\n\tconst direction = extractString( item.animation.value.direction );\n\tconst duration = extractNumber( item.animation.value.timing_config.value.duration );\n\tconst delay = extractNumber( item.animation.value.timing_config.value.delay );\n\n\treturn [ trigger, effect, type, direction, duration, delay ].join( '-' );\n};\n\nconst TRIGGER_LABELS: Record< string, string > = {\n\tload: 'On page load',\n\tscrollIn: 'Scroll into view',\n\tscrollOut: 'Scroll out of view',\n\tscrollOn: 'While scrolling',\n};\n\nconst capitalize = ( str: string ): string => {\n\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n};\n\nexport const buildDisplayLabel = ( item: InteractionItemValue ): string => {\n\tconst trigger = extractString( item.trigger );\n\tconst effect = extractString( item.animation.value.effect );\n\tconst type = extractString( item.animation.value.type );\n\n\tconst triggerLabel = TRIGGER_LABELS[ trigger ] || capitalize( trigger );\n\tconst effectLabel = capitalize( effect );\n\tconst typeLabel = capitalize( type );\n\n\treturn `${ triggerLabel }: ${ effectLabel } ${ typeLabel }`;\n};\n","import * as React from 'react';\nimport { type PropsWithChildren, useMemo } from 'react';\nimport { ControlFormLabel, PopoverContent, PopoverGridContainer } from '@elementor/editor-controls';\nimport { Divider, Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { getInteractionsControl } from '../interactions-controls-registry';\nimport type { InteractionItemValue } from '../types';\nimport {\n\tcreateAnimationPreset,\n\tcreateString,\n\textractBoolean,\n\textractNumber,\n\textractString,\n} from '../utils/prop-value-utils';\nimport { Direction } from './controls/direction';\nimport { Effect } from './controls/effect';\nimport { EffectType } from './controls/effect-type';\nimport { TimeFrameIndicator } from './controls/time-frame-indicator';\n\ntype InteractionDetailsProps = {\n\tinteraction: InteractionItemValue;\n\tonChange: ( interaction: InteractionItemValue ) => void;\n\tonPlayInteraction: ( interactionId: string ) => void;\n};\n\nconst DEFAULT_VALUES = {\n\ttrigger: 'load',\n\teffect: 'fade',\n\ttype: 'in',\n\tdirection: '',\n\tduration: 300,\n\tdelay: 0,\n\treplay: false,\n};\n\nconst TRIGGERS_WITH_REPLAY = [ 'scrollIn', 'scrollOut' ];\n\nexport const InteractionDetails = ( { interaction, onChange, onPlayInteraction }: InteractionDetailsProps ) => {\n\tconst trigger = extractString( interaction.trigger, DEFAULT_VALUES.trigger );\n\tconst effect = extractString( interaction.animation.value.effect, DEFAULT_VALUES.effect );\n\tconst type = extractString( interaction.animation.value.type, DEFAULT_VALUES.type );\n\tconst direction = extractString( interaction.animation.value.direction, DEFAULT_VALUES.direction );\n\tconst duration = extractNumber( interaction.animation.value.timing_config.value.duration, DEFAULT_VALUES.duration );\n\tconst delay = extractNumber( interaction.animation.value.timing_config.value.delay, DEFAULT_VALUES.delay );\n\tconst replay = extractBoolean( interaction.animation.value.config?.value.replay, DEFAULT_VALUES.replay );\n\n\tconst shouldShowReplay = TRIGGERS_WITH_REPLAY.includes( trigger );\n\n\tconst TriggerControl = useMemo( () => {\n\t\treturn getInteractionsControl( 'trigger' )?.component ?? null;\n\t}, [] );\n\n\tconst ReplayControl = useMemo( () => {\n\t\tif ( ! shouldShowReplay ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn getInteractionsControl( 'replay' )?.component ?? null;\n\t}, [ shouldShowReplay ] );\n\n\tconst resolveDirection = ( hasDirection: boolean, newEffect?: string, newDirection?: string ) => {\n\t\tif ( newEffect === 'slide' && ! newDirection ) {\n\t\t\treturn 'top';\n\t\t}\n\t\t// Why? - New direction can be undefined when the effect is not slide, so if the updates object includes direction, we take it always!\n\t\tif ( hasDirection ) {\n\t\t\treturn newDirection;\n\t\t}\n\t\treturn direction;\n\t};\n\n\tconst updateInteraction = (\n\t\tupdates: Partial< {\n\t\t\ttrigger: string;\n\t\t\teffect: string;\n\t\t\ttype: string;\n\t\t\tdirection: string;\n\t\t\tduration: number;\n\t\t\tdelay: number;\n\t\t\treplay: boolean;\n\t\t} >\n\t): void => {\n\t\tconst resolvedDirectionValue = resolveDirection( 'direction' in updates, updates.effect, updates.direction );\n\t\tconst newReplay = updates.replay !== undefined ? updates.replay : replay;\n\n\t\tconst updatedInteraction = {\n\t\t\t...interaction,\n\t\t\tinteraction_id: interaction.interaction_id,\n\t\t\ttrigger: createString( updates.trigger ?? trigger ),\n\t\t\tanimation: createAnimationPreset( {\n\t\t\t\teffect: updates.effect ?? effect,\n\t\t\t\ttype: updates.type ?? type,\n\t\t\t\tdirection: resolvedDirectionValue,\n\t\t\t\tduration: updates.duration ?? duration,\n\t\t\t\tdelay: updates.delay ?? delay,\n\t\t\t\treplay: newReplay,\n\t\t\t} ),\n\t\t};\n\n\t\tonChange( updatedInteraction );\n\n\t\tconst interactionId = extractString( updatedInteraction.interaction_id );\n\n\t\tsetTimeout( () => {\n\t\t\tonPlayInteraction( interactionId );\n\t\t}, 0 );\n\t};\n\n\treturn (\n\t\t<PopoverContent p={ 1.5 }>\n\t\t\t<Grid container spacing={ 1.5 }>\n\t\t\t\t{ TriggerControl && (\n\t\t\t\t\t<Field label={ __( 'Trigger', 'elementor' ) }>\n\t\t\t\t\t\t<TriggerControl value={ trigger } onChange={ ( v ) => updateInteraction( { trigger: v } ) } />\n\t\t\t\t\t</Field>\n\t\t\t\t) }\n\n\t\t\t\t{ ReplayControl && (\n\t\t\t\t\t<Field label={ __( 'Replay', 'elementor' ) }>\n\t\t\t\t\t\t<ReplayControl\n\t\t\t\t\t\t\tvalue={ replay }\n\t\t\t\t\t\t\tonChange={ ( v ) => updateInteraction( { replay: v } ) }\n\t\t\t\t\t\t\tdisabled={ true }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Field>\n\t\t\t\t) }\n\t\t\t</Grid>\n\n\t\t\t<Divider />\n\n\t\t\t<Grid container spacing={ 1.5 }>\n\t\t\t\t<Field label={ __( 'Effect', 'elementor' ) }>\n\t\t\t\t\t<Effect value={ effect } onChange={ ( v ) => updateInteraction( { effect: v } ) } />\n\t\t\t\t</Field>\n\n\t\t\t\t<Field label={ __( 'Type', 'elementor' ) }>\n\t\t\t\t\t<EffectType value={ type } onChange={ ( v ) => updateInteraction( { type: v } ) } />\n\t\t\t\t</Field>\n\n\t\t\t\t<Field label={ __( 'Direction', 'elementor' ) }>\n\t\t\t\t\t<Direction\n\t\t\t\t\t\tvalue={ direction }\n\t\t\t\t\t\tonChange={ ( v ) => updateInteraction( { direction: v } ) }\n\t\t\t\t\t\tinteractionType={ type }\n\t\t\t\t\t/>\n\t\t\t\t</Field>\n\n\t\t\t\t<Field label={ __( 'Duration', 'elementor' ) }>\n\t\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\t\tvalue={ String( duration ) }\n\t\t\t\t\t\tonChange={ ( v ) => updateInteraction( { duration: parseInt( v, 10 ) } ) }\n\t\t\t\t\t/>\n\t\t\t\t</Field>\n\n\t\t\t\t<Field label={ __( 'Delay', 'elementor' ) }>\n\t\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\t\tvalue={ String( delay ) }\n\t\t\t\t\t\tonChange={ ( v ) => updateInteraction( { delay: parseInt( v, 10 ) } ) }\n\t\t\t\t\t/>\n\t\t\t\t</Field>\n\t\t\t</Grid>\n\t\t</PopoverContent>\n\t);\n};\n\ntype FieldProps = {\n\tlabel: string;\n} & PropsWithChildren;\n\nfunction Field( { label, children }: FieldProps ) {\n\treturn (\n\t\t<Grid item xs={ 12 }>\n\t\t\t<PopoverGridContainer>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ControlFormLabel>{ label }</ControlFormLabel>\n\t\t\t\t</Grid>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t{ children }\n\t\t\t\t</Grid>\n\t\t\t</PopoverGridContainer>\n\t\t</Grid>\n\t);\n}\n","import { type ComponentType } from 'react';\n\nimport { type DirectionFieldProps, type FieldProps, type ReplayFieldProps } from './types';\n\ntype InteractionsControlType = 'trigger' | 'effect' | 'effectType' | 'direction' | 'duration' | 'delay' | 'replay';\n\ntype InteractionsControlPropsMap = {\n\ttrigger: FieldProps;\n\teffect: FieldProps;\n\teffectType: FieldProps;\n\tdirection: DirectionFieldProps;\n\tduration: FieldProps;\n\tdelay: FieldProps;\n\treplay: ReplayFieldProps;\n};\n\ntype ControlOptions< T extends InteractionsControlType > = {\n\ttype: T;\n\tcomponent: ComponentType< InteractionsControlPropsMap[ T ] >;\n\toptions?: string[];\n};\n\ntype StoredControlOptions = {\n\ttype: InteractionsControlType;\n\tcomponent: ComponentType< FieldProps | DirectionFieldProps | ReplayFieldProps >;\n\toptions?: string[];\n};\n\nconst controlsRegistry = new Map< InteractionsControlType, StoredControlOptions >();\n\nexport function registerInteractionsControl< T extends InteractionsControlType >( {\n\ttype,\n\tcomponent,\n\toptions,\n}: ControlOptions< T > ) {\n\tcontrolsRegistry.set( type, { type, component: component as StoredControlOptions[ 'component' ], options } );\n}\n\nexport function getInteractionsControl( type: InteractionsControlType ) {\n\treturn controlsRegistry.get( type );\n}\n\nexport function getInteractionsControlOptions( type: InteractionsControlType ) {\n\treturn controlsRegistry.get( type )?.options ?? [];\n}\n","import * as React from 'react';\nimport { useMemo } from 'react';\nimport { type ToggleButtonGroupItem, ToggleButtonGroupUi } from '@elementor/editor-controls';\nimport { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from '@elementor/icons';\nimport { __ } from '@wordpress/i18n';\n\nimport { type DirectionFieldProps } from '../../types';\n\ntype Direction = 'top' | 'bottom' | 'left' | 'right';\n\nexport function Direction( { value, onChange, interactionType }: DirectionFieldProps ) {\n\tconst options: ToggleButtonGroupItem< Direction >[] = useMemo( () => {\n\t\tconst isIn = interactionType === 'in';\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tvalue: 'top',\n\t\t\t\tlabel: isIn ? __( 'From top', 'elementor' ) : __( 'To top', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowDownSmallIcon fontSize={ size } /> : <ArrowUpSmallIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'bottom',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From bottom', 'elementor' ) : __( 'To bottom', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowUpSmallIcon fontSize={ size } /> : <ArrowDownSmallIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'left',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From left', 'elementor' ) : __( 'To left', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowRightIcon fontSize={ size } /> : <ArrowLeftIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'right',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From right', 'elementor' ) : __( 'To right', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowLeftIcon fontSize={ size } /> : <ArrowRightIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t];\n\t}, [ interactionType ] );\n\n\treturn <ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />;\n}\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\nexport function Effect( { value, onChange }: FieldProps ) {\n\tconst availableEffects = [\n\t\t{ key: 'fade', label: __( 'Fade', 'elementor' ) },\n\t\t{ key: 'slide', label: __( 'Slide', 'elementor' ) },\n\t\t{ key: 'scale', label: __( 'Scale', 'elementor' ) },\n\t];\n\n\treturn (\n\t\t<Select\n\t\t\tfullWidth\n\t\t\tdisplayEmpty\n\t\t\tsize=\"tiny\"\n\t\t\tvalue={ value }\n\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t>\n\t\t\t{ availableEffects.map( ( effect ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<MenuListItem key={ effect.key } value={ effect.key }>\n\t\t\t\t\t\t{ effect.label }\n\t\t\t\t\t</MenuListItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Select>\n\t);\n}\n","import * as React from 'react';\nimport { type ToggleButtonGroupItem, ToggleButtonGroupUi } from '@elementor/editor-controls';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\ntype EffectType = 'in' | 'out';\n\nexport function EffectType( { value, onChange }: FieldProps ) {\n\tconst options: ToggleButtonGroupItem< EffectType >[] = [\n\t\t{\n\t\t\tvalue: 'in',\n\t\t\tlabel: __( 'In', 'elementor' ),\n\t\t\trenderContent: () => __( 'In', 'elementor' ),\n\t\t\tshowTooltip: true,\n\t\t},\n\t\t{\n\t\t\tvalue: 'out',\n\t\t\tlabel: __( 'Out', 'elementor' ),\n\t\t\trenderContent: () => __( 'Out', 'elementor' ),\n\t\t\tshowTooltip: true,\n\t\t},\n\t];\n\n\treturn <ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />;\n}\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\nexport function TimeFrameIndicator( { value, onChange }: FieldProps ) {\n\tconst availableTimeFrames = [ '0', '100', '200', '300', '400', '500', '750', '1000', '1250', '1500' ].map(\n\t\t( key ) => ( {\n\t\t\tkey,\n\t\t\t// translators: %s: time in milliseconds\n\t\t\tlabel: __( '%s MS', 'elementor' ).replace( '%s', key ),\n\t\t} )\n\t);\n\n\treturn (\n\t\t<Select\n\t\t\tfullWidth\n\t\t\tdisplayEmpty\n\t\t\tsize=\"tiny\"\n\t\t\tvalue={ value }\n\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t>\n\t\t\t{ availableTimeFrames.map( ( timeFrame ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<MenuListItem key={ timeFrame.key } value={ timeFrame.key }>\n\t\t\t\t\t\t{ timeFrame.label }\n\t\t\t\t\t</MenuListItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Select>\n\t);\n}\n","import { type InteractionsConfig } from '../types';\n\nconst DEFAULT_CONFIG: InteractionsConfig = {\n\tconstants: {\n\t\tdefaultDuration: 300,\n\t\tdefaultDelay: 0,\n\t\tslideDistance: 100,\n\t\tscaleStart: 0.5,\n\t\teasing: 'linear',\n\t},\n\tanimationOptions: [],\n};\n\nexport function getInteractionsConfig(): InteractionsConfig {\n\treturn window.ElementorInteractionsConfig || DEFAULT_CONFIG;\n}\n","import { type InteractionsProvider } from '../types';\n\nexport const createInteractionsRepository = () => {\n\tconst providers: InteractionsProvider[] = [];\n\n\tconst getProviders = () => {\n\t\tconst sorted = providers.slice( 0 ).sort( ( a, b ) => ( a.priority > b.priority ? -1 : 1 ) );\n\t\treturn sorted;\n\t};\n\n\tconst register = ( provider: InteractionsProvider ) => {\n\t\tproviders.push( provider );\n\t};\n\n\tconst all = () => {\n\t\treturn getProviders().flatMap( ( provider ) => provider.actions.all() );\n\t};\n\n\tconst subscribe = ( cb: () => void ) => {\n\t\tconst unsubscribes = providers.map( ( provider ) => provider.subscribe( cb ) );\n\n\t\treturn () => {\n\t\t\tunsubscribes.forEach( ( unsubscribe ) => unsubscribe() );\n\t\t};\n\t};\n\n\tconst getProviderByKey = ( key: string ) => {\n\t\treturn providers.find( ( provider ) => {\n\t\t\ttry {\n\t\t\t\treturn provider.getKey() === key;\n\t\t\t} catch {\n\t\t\t\t// Provider might not be ready yet (e.g., no document loaded)\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\t};\n\n\treturn {\n\t\tall,\n\t\tregister,\n\t\tsubscribe,\n\t\tgetProviders,\n\t\tgetProviderByKey,\n\t};\n};\n","import { createInteractionsRepository } from './utils/create-interactions-repository';\n\nexport const interactionsRepository = createInteractionsRepository();\n","import { type InteractionsProvider } from '../types';\n\nexport type CreateInteractionsProviderOptions = {\n\tkey: string | ( () => string );\n\tpriority?: number;\n\tsubscribe?: ( callback: () => void ) => () => void;\n\tactions: {\n\t\tall: InteractionsProvider[ 'actions' ][ 'all' ];\n\t};\n};\n\nconst DEFAULT_PRIORITY = 10;\n\nexport function createInteractionsProvider( {\n\tkey,\n\tpriority = DEFAULT_PRIORITY,\n\tsubscribe = () => () => {},\n\tactions,\n}: CreateInteractionsProviderOptions ): InteractionsProvider {\n\treturn {\n\t\tgetKey: typeof key === 'string' ? () => key : key,\n\t\tpriority,\n\t\tsubscribe,\n\t\tactions: {\n\t\t\tall: actions.all,\n\t\t},\n\t};\n}\n","import { getCurrentDocumentId, getElementInteractions, getElements } from '@elementor/editor-elements';\nimport { __privateListenTo as listenTo, windowEvent } from '@elementor/editor-v1-adapters';\n\nimport { createInteractionsProvider } from '../utils/create-interactions-provider';\n\nexport const ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX = 'document-elements-interactions-';\n\nexport const documentElementsInteractionsProvider = createInteractionsProvider( {\n\tkey: () => {\n\t\tconst documentId = getCurrentDocumentId();\n\n\t\tif ( ! documentId ) {\n\t\t\tconst pendingKey = `${ ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX }pending`;\n\t\t\treturn pendingKey;\n\t\t}\n\n\t\tconst key = `${ ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX }${ documentId }`;\n\t\treturn key;\n\t},\n\tpriority: 50,\n\tsubscribe: ( cb ) => {\n\t\treturn listenTo( [ windowEvent( 'elementor/element/update_interactions' ) ], () => cb() );\n\t},\n\tactions: {\n\t\tall: () => {\n\t\t\tconst elements = getElements();\n\n\t\t\tconst filtered = elements.filter( ( element ) => {\n\t\t\t\tconst interactions = getElementInteractions( element.id );\n\t\t\t\tif ( ! interactions ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn interactions?.items?.length > 0;\n\t\t\t} );\n\n\t\t\treturn filtered.map( ( element ) => {\n\t\t\t\tconst interactions = getElementInteractions( element.id );\n\t\t\t\treturn {\n\t\t\t\t\telementId: element.id,\n\t\t\t\t\tdataId: element.id,\n\t\t\t\t\tinteractions: interactions || { version: 1, items: [] },\n\t\t\t\t};\n\t\t\t} );\n\t\t},\n\t},\n} );\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\nexport function Trigger( { value, onChange }: FieldProps ) {\n\tconst availableTriggers = Object.entries( {\n\t\tload: __( 'Page load', 'elementor' ),\n\t\tscrollIn: __( 'Scroll into view', 'elementor' ),\n\t} ).map( ( [ key, label ] ) => ( {\n\t\tkey,\n\t\tlabel,\n\t} ) );\n\n\treturn (\n\t\t<Select\n\t\t\tfullWidth\n\t\t\tdisplayEmpty\n\t\t\tsize=\"tiny\"\n\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\tvalue={ value }\n\t\t>\n\t\t\t{ availableTriggers.map( ( trigger ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<MenuListItem key={ trigger.key } value={ trigger.key }>\n\t\t\t\t\t\t{ trigger.label }\n\t\t\t\t\t</MenuListItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Select>\n\t);\n}\n","import { type ElementID, getAllDescendants, getContainer, type V1Element } from '@elementor/editor-elements';\nimport { registerDataHook } from '@elementor/editor-v1-adapters';\n\nimport type { ElementInteractions } from '../types';\nimport { createString } from '../utils/prop-value-utils';\nimport { generateTempInteractionId } from '../utils/temp-id-utils';\n\nexport function initCleanInteractionIdsOnDuplicate() {\n\tregisterDataHook( 'after', 'document/elements/duplicate', ( _args, result: V1Element | V1Element[] ) => {\n\t\tconst containers = Array.isArray( result ) ? result : [ result ];\n\n\t\tcontainers.forEach( ( container ) => {\n\t\t\tcleanInteractionIdsRecursive( container.id );\n\t\t} );\n\t} );\n}\n\nfunction cleanInteractionIdsRecursive( elementId: ElementID ) {\n\tconst container = getContainer( elementId );\n\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tgetAllDescendants( container ).forEach( ( element: V1Element ) => {\n\t\tcleanInteractionIds( element.id as ElementID );\n\t} );\n}\n\nfunction cleanInteractionIds( elementId: ElementID ) {\n\tconst container = getContainer( elementId );\n\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tconst interactions = container.model.get( 'interactions' ) as ElementInteractions;\n\n\tif ( ! interactions || ! interactions.items ) {\n\t\treturn;\n\t}\n\n\tconst updatedInteractions = structuredClone( interactions ) as ElementInteractions;\n\n\tupdatedInteractions?.items?.forEach( ( interaction ) => {\n\t\tif ( interaction.$$type === 'interaction-item' && interaction.value ) {\n\t\t\tinteraction.value.interaction_id = createString( generateTempInteractionId() );\n\t\t}\n\t} );\n\n\tcontainer.model.set( 'interactions', updatedInteractions );\n}\n","import { Trigger } from './components/controls/trigger';\nimport { initCleanInteractionIdsOnDuplicate } from './hooks/on-duplicate';\nimport { registerInteractionsControl } from './interactions-controls-registry';\nimport { interactionsRepository } from './interactions-repository';\nimport { documentElementsInteractionsProvider } from './providers/document-elements-interactions-provider';\n\nexport function init() {\n\ttry {\n\t\tinteractionsRepository.register( documentElementsInteractionsProvider );\n\t\tinitCleanInteractionIdsOnDuplicate();\n\t\tregisterInteractionsControl( {\n\t\t\ttype: 'trigger',\n\t\t\tcomponent: Trigger,\n\t\t\toptions: [ 'load', 'scrollIn' ],\n\t\t} );\n\t} catch ( error ) {\n\t\tthrow error;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,mBAA0B;AAC1B,gBAA0C;AAC1C,k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A,EACD,CAAE;AAEF,YAAU,MAAM,IAAK,gBAAgB,mBAAoB;AAC1D;;;AC7CO,SAAS,OAAO;AACtB,MAAI;AACH,2BAAuB,SAAU,oCAAqC;AACtE,uCAAmC;AACnC,gCAA6B;AAAA,MAC5B,MAAM;AAAA,MACN,WAAW;AAAA,MACX,SAAS,CAAE,QAAQ,UAAW;AAAA,IAC/B,CAAE;AAAA,EACH,SAAU,OAAQ;AACjB,UAAM;AAAA,EACP;AACD;","names":["React","import_react","import_editor_elements","import_ui","React","React","import_react","React","import_react","import_editor_controls","import_icons","import_ui","import_i18n","React","import_react","import_editor_controls","import_ui","import_i18n","React","import_react","import_icons","import_i18n","React","import_ui","import_i18n","React","import_editor_controls","import_i18n","React","import_editor_ui","import_ui","import_i18n","import_editor_elements","listenTo","React","import_editor_ui","import_ui","import_i18n","import_editor_elements","import_editor_v1_adapters"]}
|