@elementor/editor-interactions 3.33.0-285 → 3.33.0-287
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 +16 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/components/controls/direction.tsx +17 -12
- package/src/components/controls/effect-type.tsx +16 -9
- package/src/components/controls/effect.tsx +26 -25
- package/src/components/controls/time-frame-indicator.tsx +26 -25
- package/src/components/controls/trigger.tsx +26 -25
- package/src/components/interaction-details.tsx +5 -4
package/dist/index.js
CHANGED
|
@@ -125,7 +125,7 @@ var PopupStateProvider = ({ children }) => {
|
|
|
125
125
|
// src/components/interactions-list.tsx
|
|
126
126
|
var React10 = __toESM(require("react"));
|
|
127
127
|
var import_react4 = require("react");
|
|
128
|
-
var
|
|
128
|
+
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
129
129
|
var import_icons3 = require("@elementor/icons");
|
|
130
130
|
var import_ui8 = require("@elementor/ui");
|
|
131
131
|
var import_i18n8 = require("@wordpress/i18n");
|
|
@@ -147,6 +147,7 @@ function getInteractionsConfig() {
|
|
|
147
147
|
|
|
148
148
|
// src/components/interaction-details.tsx
|
|
149
149
|
var React9 = __toESM(require("react"));
|
|
150
|
+
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
150
151
|
var import_ui7 = require("@elementor/ui");
|
|
151
152
|
var import_i18n7 = require("@wordpress/i18n");
|
|
152
153
|
|
|
@@ -187,11 +188,12 @@ function Direction({ value, onChange, interactionType }) {
|
|
|
187
188
|
}
|
|
188
189
|
];
|
|
189
190
|
}, [interactionType]);
|
|
190
|
-
return /* @__PURE__ */ React4.createElement(React4.
|
|
191
|
+
return /* @__PURE__ */ React4.createElement(import_ui2.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React4.createElement(import_editor_controls.PopoverGridContainer, null, /* @__PURE__ */ React4.createElement(import_ui2.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React4.createElement(import_editor_controls.ControlFormLabel, null, " ", (0, import_i18n2.__)("Direction", "elementor"))), /* @__PURE__ */ React4.createElement(import_ui2.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React4.createElement(import_editor_controls.ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value }))));
|
|
191
192
|
}
|
|
192
193
|
|
|
193
194
|
// src/components/controls/effect.tsx
|
|
194
195
|
var React5 = __toESM(require("react"));
|
|
196
|
+
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
195
197
|
var import_editor_ui = require("@elementor/editor-ui");
|
|
196
198
|
var import_ui3 = require("@elementor/ui");
|
|
197
199
|
var import_i18n3 = require("@wordpress/i18n");
|
|
@@ -201,7 +203,7 @@ function Effect({ value, onChange }) {
|
|
|
201
203
|
{ key: "slide", label: (0, import_i18n3.__)("Slide", "elementor") },
|
|
202
204
|
{ key: "scale", label: (0, import_i18n3.__)("Scale", "elementor") }
|
|
203
205
|
];
|
|
204
|
-
return /* @__PURE__ */ React5.createElement(React5.
|
|
206
|
+
return /* @__PURE__ */ React5.createElement(import_ui3.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React5.createElement(import_editor_controls2.PopoverGridContainer, null, /* @__PURE__ */ React5.createElement(import_ui3.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React5.createElement(import_editor_controls2.ControlFormLabel, null, (0, import_i18n3.__)("Effect", "elementor"))), /* @__PURE__ */ React5.createElement(import_ui3.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React5.createElement(
|
|
205
207
|
import_ui3.Select,
|
|
206
208
|
{
|
|
207
209
|
fullWidth: true,
|
|
@@ -213,12 +215,12 @@ function Effect({ value, onChange }) {
|
|
|
213
215
|
availableEffects.map((effect) => {
|
|
214
216
|
return /* @__PURE__ */ React5.createElement(import_editor_ui.MenuListItem, { key: effect.key, value: effect.key }, effect.label);
|
|
215
217
|
})
|
|
216
|
-
)));
|
|
218
|
+
))));
|
|
217
219
|
}
|
|
218
220
|
|
|
219
221
|
// src/components/controls/effect-type.tsx
|
|
220
222
|
var React6 = __toESM(require("react"));
|
|
221
|
-
var
|
|
223
|
+
var import_editor_controls3 = require("@elementor/editor-controls");
|
|
222
224
|
var import_ui4 = require("@elementor/ui");
|
|
223
225
|
var import_i18n4 = require("@wordpress/i18n");
|
|
224
226
|
function EffectType({ value, onChange }) {
|
|
@@ -234,11 +236,12 @@ function EffectType({ value, onChange }) {
|
|
|
234
236
|
renderContent: () => (0, import_i18n4.__)("Out", "elementor")
|
|
235
237
|
}
|
|
236
238
|
];
|
|
237
|
-
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(import_ui4.Grid, { item: true, xs: 12,
|
|
239
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(import_ui4.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React6.createElement(import_editor_controls3.PopoverGridContainer, null, /* @__PURE__ */ React6.createElement(import_ui4.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React6.createElement(import_editor_controls3.ControlFormLabel, null, (0, import_i18n4.__)("Type", "elementor"))), /* @__PURE__ */ React6.createElement(import_ui4.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React6.createElement(import_editor_controls3.ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value })))));
|
|
238
240
|
}
|
|
239
241
|
|
|
240
242
|
// src/components/controls/time-frame-indicator.tsx
|
|
241
243
|
var React7 = __toESM(require("react"));
|
|
244
|
+
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
242
245
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
243
246
|
var import_ui5 = require("@elementor/ui");
|
|
244
247
|
var import_i18n5 = require("@wordpress/i18n");
|
|
@@ -250,7 +253,7 @@ function TimeFrameIndicator({ value, onChange, label }) {
|
|
|
250
253
|
label: (0, import_i18n5.__)("%s MS", "elementor").replace("%s", key)
|
|
251
254
|
})
|
|
252
255
|
);
|
|
253
|
-
return /* @__PURE__ */ React7.createElement(React7.
|
|
256
|
+
return /* @__PURE__ */ React7.createElement(import_ui5.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React7.createElement(import_editor_controls4.PopoverGridContainer, null, /* @__PURE__ */ React7.createElement(import_ui5.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React7.createElement(import_editor_controls4.ControlFormLabel, null, label)), /* @__PURE__ */ React7.createElement(import_ui5.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React7.createElement(
|
|
254
257
|
import_ui5.Select,
|
|
255
258
|
{
|
|
256
259
|
fullWidth: true,
|
|
@@ -262,11 +265,12 @@ function TimeFrameIndicator({ value, onChange, label }) {
|
|
|
262
265
|
availableTimeFrames.map((timeFrame) => {
|
|
263
266
|
return /* @__PURE__ */ React7.createElement(import_editor_ui2.MenuListItem, { key: timeFrame.key, value: timeFrame.key }, timeFrame.label);
|
|
264
267
|
})
|
|
265
|
-
)));
|
|
268
|
+
))));
|
|
266
269
|
}
|
|
267
270
|
|
|
268
271
|
// src/components/controls/trigger.tsx
|
|
269
272
|
var React8 = __toESM(require("react"));
|
|
273
|
+
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
270
274
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
271
275
|
var import_ui6 = require("@elementor/ui");
|
|
272
276
|
var import_i18n6 = require("@wordpress/i18n");
|
|
@@ -279,7 +283,7 @@ function Trigger({ value, onChange }) {
|
|
|
279
283
|
key,
|
|
280
284
|
label
|
|
281
285
|
}));
|
|
282
|
-
return /* @__PURE__ */ React8.createElement(React8.
|
|
286
|
+
return /* @__PURE__ */ React8.createElement(import_ui6.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React8.createElement(import_editor_controls5.PopoverGridContainer, null, /* @__PURE__ */ React8.createElement(import_ui6.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React8.createElement(import_editor_controls5.ControlFormLabel, null, (0, import_i18n6.__)("Trigger", "elementor"))), /* @__PURE__ */ React8.createElement(import_ui6.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React8.createElement(
|
|
283
287
|
import_ui6.Select,
|
|
284
288
|
{
|
|
285
289
|
fullWidth: true,
|
|
@@ -291,7 +295,7 @@ function Trigger({ value, onChange }) {
|
|
|
291
295
|
availableTriggers.map((trigger) => {
|
|
292
296
|
return /* @__PURE__ */ React8.createElement(import_editor_ui3.MenuListItem, { key: trigger.key, value: trigger.key }, trigger.label);
|
|
293
297
|
})
|
|
294
|
-
)));
|
|
298
|
+
))));
|
|
295
299
|
}
|
|
296
300
|
|
|
297
301
|
// src/components/interaction-details.tsx
|
|
@@ -331,7 +335,7 @@ var InteractionDetails = ({ interaction, onChange }) => {
|
|
|
331
335
|
const newInteractionDetails = { ...interactionDetails, [key]: value };
|
|
332
336
|
onChange(Object.values(newInteractionDetails).join(DELIMITER));
|
|
333
337
|
};
|
|
334
|
-
return /* @__PURE__ */ React9.createElement(
|
|
338
|
+
return /* @__PURE__ */ React9.createElement(import_editor_controls6.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React9.createElement(import_ui7.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React9.createElement(Trigger, { value: interactionDetails.trigger, onChange: (v) => handleChange("trigger", v) })), /* @__PURE__ */ React9.createElement(import_ui7.Divider, { sx: { mx: 1.5 } }), /* @__PURE__ */ React9.createElement(import_ui7.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React9.createElement(Effect, { value: interactionDetails.effect, onChange: (v) => handleChange("effect", v) }), /* @__PURE__ */ React9.createElement(EffectType, { value: interactionDetails.type, onChange: (v) => handleChange("type", v) }), /* @__PURE__ */ React9.createElement(
|
|
335
339
|
Direction,
|
|
336
340
|
{
|
|
337
341
|
value: interactionDetails.direction,
|
|
@@ -390,7 +394,7 @@ function InteractionsList(props) {
|
|
|
390
394
|
return option?.label || interactionForDisplay;
|
|
391
395
|
};
|
|
392
396
|
return /* @__PURE__ */ React10.createElement(
|
|
393
|
-
|
|
397
|
+
import_editor_controls7.Repeater,
|
|
394
398
|
{
|
|
395
399
|
openOnAdd: true,
|
|
396
400
|
openItem: triggerCreateOnShowEmpty ? 0 : void 0,
|
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/get-interactions-config.ts","../src/components/interaction-details.tsx","../src/components/controls/direction.tsx","../src/components/controls/effect.tsx","../src/components/controls/effect-type.tsx","../src/components/controls/time-frame-indicator.tsx","../src/components/controls/trigger.tsx","../src/utils/create-interactions-repository.ts","../src/interactions-repository.ts","../src/utils/create-interactions-provider.ts","../src/providers/document-elements-interactions-provider.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';\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 { type ElementInteractions, 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 { 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 );\n\tconst [ firstInteraction, setFirstInteraction ] = useState< boolean >( false );\n\tconst hasInteractions = existingInteractions?.items?.length || firstInteraction;\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 firstInteraction={ firstInteraction } />\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\tsetFirstInteraction( 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( { firstInteraction }: { firstInteraction: boolean } ) {\n\tconst { interactions, setInteractions, playInteractions } = useInteractionsContext();\n\n\tconst applyInteraction = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\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 ]\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={ firstInteraction }\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: ( animationId: string ) => void;\n};\n\nconst InteractionsContext = createContext< InteractionsContextValue | null >( null );\n\nexport const InteractionsProvider = ( { children, elementId }: { children: ReactNode; elementId: string } ) => {\n\tconst interactions = useElementInteractions( elementId );\n\n\tuseEffect( () => {\n\t\twindow.dispatchEvent( new CustomEvent( 'elementor/element/update_interactions' ) );\n\t}, [] );\n\n\tconst setInteractions = ( value: ElementInteractions | undefined ) => {\n\t\tupdateElementInteractions( {\n\t\t\telementId,\n\t\t\tinteractions: value,\n\t\t} );\n\t};\n\n\tconst playInteractions = ( animationId: string ) => {\n\t\tplayElementInteractions( elementId, animationId );\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 { useEffect, useMemo, useState } from 'react';\nimport { Repeater } from '@elementor/editor-controls';\nimport { type ElementInteractions } from '@elementor/editor-elements';\nimport { PlayerPlayIcon } from '@elementor/icons';\nimport { IconButton } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { getInteractionsConfig } from '../utils/get-interactions-config';\nimport { DEFAULT_INTERACTION, InteractionDetails } from './interaction-details';\n\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 [ interactionsState, setInteractionsState ] = useState< ElementInteractions >( interactions );\n\n\tuseEffect( () => {\n\t\tif ( JSON.stringify( interactions.items ) !== JSON.stringify( interactionsState ) ) {\n\t\t\tonSelectInteractions( interactionsState );\n\t\t}\n\t}, [ interactions.items, interactionsState, onSelectInteractions ] );\n\n\tconst isMaxNumberOfInteractionsReached = useMemo( () => {\n\t\treturn interactionsState.items?.length >= MAX_NUMBER_OF_INTERACTIONS;\n\t}, [ interactionsState.items ] );\n\n\tif ( triggerCreateOnShowEmpty && ( ! interactionsState.items || interactionsState.items?.length === 0 ) ) {\n\t\tsetInteractionsState( {\n\t\t\tversion: 1,\n\t\t\titems: [\n\t\t\t\t{\n\t\t\t\t\tanimation: {\n\t\t\t\t\t\tanimation_id: DEFAULT_INTERACTION,\n\t\t\t\t\t\tanimation_type: 'full-preset',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}\n\n\tconst displayLabel = ( interactionForDisplay: string ) => {\n\t\tif ( ! interactionForDisplay ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst animationOptions = getInteractionsConfig()?.animationOptions;\n\t\tconst option = animationOptions.find( ( opt ) => opt.value === interactionForDisplay );\n\n\t\treturn option?.label || interactionForDisplay;\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={ interactionsState.items }\n\t\t\tsetValues={ ( newValue: ElementInteractions[ 'items' ] ) => {\n\t\t\t\tsetInteractionsState( {\n\t\t\t\t\t...interactionsState,\n\t\t\t\t\titems: newValue,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tshowDuplicate={ false }\n\t\t\tshowToggle={ false }\n\t\t\tisSortable={ false }\n\t\t\tdisableAddItemButton={ isMaxNumberOfInteractionsReached }\n\t\t\titemSettings={ {\n\t\t\t\tinitialValues: {\n\t\t\t\t\tanimation: {\n\t\t\t\t\t\tanimation_id: DEFAULT_INTERACTION,\n\t\t\t\t\t\tanimation_type: 'full-preset',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tLabel: ( { value } ) => displayLabel( value.animation.animation_id ),\n\t\t\t\tIcon: () => null,\n\t\t\t\tContent: ( { index, value } ) => (\n\t\t\t\t\t<InteractionDetails\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tinteraction={ value.animation.animation_id }\n\t\t\t\t\t\tonChange={ ( newValue: string ) => {\n\t\t\t\t\t\t\tconst newInteractions = { ...interactionsState };\n\t\t\t\t\t\t\tnewInteractions.items[ index ] = {\n\t\t\t\t\t\t\t\t...newInteractions.items[ index ],\n\t\t\t\t\t\t\t\tanimation: {\n\t\t\t\t\t\t\t\t\t...newInteractions.items[ index ].animation,\n\t\t\t\t\t\t\t\t\tanimation_id: newValue,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tsetInteractionsState( { ...interactionsState, items: newInteractions.items } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tactions: ( value ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<IconButton size=\"tiny\" onClick={ () => onPlayInteraction( value.animation.animation_id ) }>\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</>\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\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 * as React from 'react';\nimport { Divider, Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { Direction } from './controls/direction';\nimport { Effect } from './controls/effect';\nimport { EffectType } from './controls/effect-type';\nimport { TimeFrameIndicator } from './controls/time-frame-indicator';\nimport { Trigger } from './controls/trigger';\n\nconst DELIMITER = '-';\n\ntype InteractionDetailsProps = {\n\tinteraction: string;\n\tonChange: ( interaction: string ) => void;\n};\nexport const DEFAULT_INTERACTION = 'load-fade-in--300-0';\n\nconst getDefaultInteractionDetails = () => {\n\tconst [ trigger, effect, type, direction, duration, delay ] = DEFAULT_INTERACTION.split( DELIMITER );\n\n\treturn {\n\t\ttrigger,\n\t\teffect,\n\t\ttype,\n\t\tdirection,\n\t\tduration,\n\t\tdelay,\n\t};\n};\n\nconst buildInteractionDetails = ( interaction: string ) => {\n\tconst [ trigger, effect, type, direction, duration, delay ] = interaction.split( DELIMITER );\n\tconst defaultInteractionDetails = getDefaultInteractionDetails();\n\n\treturn {\n\t\ttrigger: trigger || defaultInteractionDetails.trigger,\n\t\teffect: effect || defaultInteractionDetails.effect,\n\t\ttype: type || defaultInteractionDetails.type,\n\t\tdirection: direction || defaultInteractionDetails.direction,\n\t\tduration: duration || defaultInteractionDetails.duration,\n\t\tdelay: delay || defaultInteractionDetails.delay,\n\t};\n};\n\nexport const InteractionDetails = ( { interaction, onChange }: InteractionDetailsProps ) => {\n\tconst interactionDetails = React.useMemo( () => {\n\t\treturn buildInteractionDetails( interaction );\n\t}, [ interaction ] );\n\n\tconst handleChange = < K extends keyof typeof interactionDetails >(\n\t\tkey: K,\n\t\tvalue: ( typeof interactionDetails )[ K ]\n\t) => {\n\t\tif ( value === null ) {\n\t\t\tvalue = getDefaultInteractionDetails()[ key ];\n\t\t}\n\t\tconst newInteractionDetails = { ...interactionDetails, [ key ]: value };\n\t\tonChange( Object.values( newInteractionDetails ).join( DELIMITER ) );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Grid container spacing={ 2 } sx={ { p: 1.5 } }>\n\t\t\t\t<Trigger value={ interactionDetails.trigger } onChange={ ( v ) => handleChange( 'trigger', v ) } />\n\t\t\t</Grid>\n\t\t\t<Divider sx={ { mx: 1.5 } } />\n\t\t\t<Grid container spacing={ 2 } sx={ { p: 1.5 } }>\n\t\t\t\t<Effect value={ interactionDetails.effect } onChange={ ( v ) => handleChange( 'effect', v ) } />\n\t\t\t\t<EffectType value={ interactionDetails.type } onChange={ ( v ) => handleChange( 'type', v ) } />\n\t\t\t\t<Direction\n\t\t\t\t\tvalue={ interactionDetails.direction }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'direction', v ) }\n\t\t\t\t\tinteractionType={ interactionDetails.type }\n\t\t\t\t/>\n\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\tvalue={ interactionDetails.duration }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'duration', v ) }\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={ interactionDetails.delay }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'delay', v ) }\n\t\t\t\t\tlabel={ __( 'Delay', 'elementor' ) }\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</>\n\t);\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 { Grid, Typography } 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<>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Typography variant=\"caption\" color=\"text.secondary\">\n\t\t\t\t\t{ __( 'Direction', 'elementor' ) }\n\t\t\t\t</Typography>\n\t\t\t</Grid>\n\t\t\t<Grid item xs={ 12 } md={ 6 } sx={ { display: 'flex', justifyContent: 'flex-end', overflow: 'hidden' } }>\n\t\t\t\t<ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />\n\t\t\t</Grid>\n\t\t</>\n\t);\n}\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent, Typography } 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<>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Typography variant=\"caption\" color=\"text.secondary\">\n\t\t\t\t\t{ __( 'Effect', 'elementor' ) }\n\t\t\t\t</Typography>\n\t\t\t</Grid>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Select\n\t\t\t\t\tfullWidth\n\t\t\t\t\tdisplayEmpty\n\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t>\n\t\t\t\t\t{ availableEffects.map( ( effect ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<MenuListItem key={ effect.key } value={ effect.key }>\n\t\t\t\t\t\t\t\t{ effect.label }\n\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</Select>\n\t\t\t</Grid>\n\t\t</>\n\t);\n}\n","import * as React from 'react';\nimport { type ToggleButtonGroupItem, ToggleButtonGroupUi } from '@elementor/editor-controls';\nimport { Grid, Typography } 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},\n\t\t{\n\t\t\tvalue: 'out',\n\t\t\tlabel: __( 'Out', 'elementor' ),\n\t\t\trenderContent: () => __( 'Out', 'elementor' ),\n\t\t},\n\t];\n\n\treturn (\n\t\t<>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Typography variant=\"caption\" color=\"text.secondary\">\n\t\t\t\t\t{ __( 'Type', 'elementor' ) }\n\t\t\t\t</Typography>\n\t\t\t</Grid>\n\t\t\t<Grid item xs={ 12 } md={ 6 } sx={ { display: 'flex', justifyContent: 'flex-end', overflow: 'hidden' } }>\n\t\t\t\t<ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />\n\t\t\t</Grid>\n\t\t</>\n\t);\n}\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent, Typography } 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<>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Typography variant=\"caption\" color=\"text.secondary\">\n\t\t\t\t\t{ label }\n\t\t\t\t</Typography>\n\t\t\t</Grid>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Select\n\t\t\t\t\tfullWidth\n\t\t\t\t\tdisplayEmpty\n\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t>\n\t\t\t\t\t{ availableTimeFrames.map( ( timeFrame ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<MenuListItem key={ timeFrame.key } value={ timeFrame.key }>\n\t\t\t\t\t\t\t\t{ timeFrame.label }\n\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</Select>\n\t\t\t</Grid>\n\t\t</>\n\t);\n}\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent, Typography } 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\tscrollOut: __( 'Scroll out of view', 'elementor' ),\n\t} ).map( ( [ key, label ] ) => ( {\n\t\tkey,\n\t\tlabel,\n\t} ) );\n\n\treturn (\n\t\t<>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Typography variant=\"caption\" color=\"text.secondary\">\n\t\t\t\t\t{ __( 'Trigger', 'elementor' ) }\n\t\t\t\t</Typography>\n\t\t\t</Grid>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Select\n\t\t\t\t\tfullWidth\n\t\t\t\t\tdisplayEmpty\n\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t>\n\t\t\t\t\t{ availableTriggers.map( ( trigger ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<MenuListItem key={ trigger.key } value={ trigger.key }>\n\t\t\t\t\t\t\t\t{ trigger.label }\n\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</Select>\n\t\t\t</Grid>\n\t\t</>\n\t);\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 { 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} catch ( error ) {\n\t\tthrow error;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,wBAAW,OAAM,UAAS,SAAQ,mBAChC,gBAAI,sCAAsC,WAAY,CACzD;AAAA,IAEA,oCAAC,wBAAW,OAAM,UAAS,SAAQ,WAAU,UAAS,eACnD;AAAA,MACD;AAAA,MACA;AAAA,IACD,CACD;AAAA,IAEA,oCAAC,oBAAO,SAAQ,YAAW,OAAM,aAAY,MAAK,SAAQ,IAAK,EAAE,IAAI,EAAE,GAAI,SAAU,2BAClF,gBAAI,yBAAyB,WAAY,CAC5C;AAAA,EACD;AAEF;;;ACjCA,IAAAA,UAAuB;AACvB,IAAAC,gBAAsC;AACtC,IAAAC,0BAAiE;AACjE,qBAAuC;AACvC,IAAAC,aAAsB;;;ACJtB,IAAAC,SAAuB;AACvB,mBAAqE;AACrE,6BAKO;AAQP,IAAM,0BAAsB,4BAAkD,IAAK;AAE5E,IAAM,uBAAuB,CAAE,EAAE,UAAU,UAAU,MAAmD;AAC9G,QAAM,mBAAe,+CAAwB,SAAU;AAEvD,8BAAW,MAAM;AAChB,WAAO,cAAe,IAAI,YAAa,uCAAwC,CAAE;AAAA,EAClF,GAAG,C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S;AAAA,MACR,KAAK,QAAQ;AAAA,IACd;AAAA,EACD;AACD;;;AC3BA,IAAAC,0BAA0E;AAC1E,gCAA2D;AAIpD,IAAM,4CAA4C;AAElD,IAAM,uCAAuC,2BAA4B;AAAA,EAC/E,KAAK,MAAM;AACV,UAAM,iBAAa,8CAAqB;AAExC,QAAK,CAAE,YAAa;AACnB,YAAM,aAAa,GAAI,yCAA0C;AACjE,aAAO;AAAA,IACR;AAEA,UAAM,MAAM,GAAI,yCAA0C,GAAI,UAAW;AACzE,WAAO;AAAA,EACR;AAAA,EACA,UAAU;AAAA,EACV,WAAW,CAAE,OAAQ;AACpB,eAAO,0BAAAC,mBAAU,KAAE,uCAAa,uCAAwC,CAAE,GAAG,MAAM,GAAG,CAAE;AAAA,EACzF;AAAA,EACA,SAAS;AAAA,IACR,KAAK,MAAM;AACV,YAAM,eAAW,qCAAY;AAE7B,YAAM,WAAW,SAAS,OAAQ,CAAE,YAAa;AAChD,cAAM,mBAAe,gDAAwB,QAAQ,EAAG;AACxD,YAAK,CAAE,cAAe;AACrB,iBAAO;AAAA,QACR;AACA,eAAO,cAAc,OAAO,SAAS;AAAA,MACtC,CAAE;AAEF,aAAO,SAAS,IAAK,CAAE,YAAa;AACnC,cAAM,mBAAe,gDAAwB,QAAQ,EAAG;AACxD,eAAO;AAAA,UACN,WAAW,QAAQ;AAAA,UACnB,QAAQ,QAAQ;AAAA,UAChB,cAAc,gBAAgB,EAAE,SAAS,GAAG,OAAO,CAAC,EAAE;AAAA,QACvD;AAAA,MACD,CAAE;AAAA,IACH;AAAA,EACD;AACD,CAAE;;;AC1CK,SAAS,OAAO;AACtB,MAAI;AACH,2BAAuB,SAAU,oCAAqC;AAAA,EACvE,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_ui","import_i18n","React","import_react","import_icons","import_ui","import_i18n","React","import_ui","import_i18n","React","import_editor_controls","import_ui","import_i18n","React","import_editor_ui","import_ui","import_i18n","React","import_editor_ui","import_ui","import_i18n","import_editor_elements","listenTo"]}
|
|
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/get-interactions-config.ts","../src/components/interaction-details.tsx","../src/components/controls/direction.tsx","../src/components/controls/effect.tsx","../src/components/controls/effect-type.tsx","../src/components/controls/time-frame-indicator.tsx","../src/components/controls/trigger.tsx","../src/utils/create-interactions-repository.ts","../src/interactions-repository.ts","../src/utils/create-interactions-provider.ts","../src/providers/document-elements-interactions-provider.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';\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 { type ElementInteractions, 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 { 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 );\n\tconst [ firstInteraction, setFirstInteraction ] = useState< boolean >( false );\n\tconst hasInteractions = existingInteractions?.items?.length || firstInteraction;\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 firstInteraction={ firstInteraction } />\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\tsetFirstInteraction( 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( { firstInteraction }: { firstInteraction: boolean } ) {\n\tconst { interactions, setInteractions, playInteractions } = useInteractionsContext();\n\n\tconst applyInteraction = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\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 ]\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={ firstInteraction }\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: ( animationId: string ) => void;\n};\n\nconst InteractionsContext = createContext< InteractionsContextValue | null >( null );\n\nexport const InteractionsProvider = ( { children, elementId }: { children: ReactNode; elementId: string } ) => {\n\tconst interactions = useElementInteractions( elementId );\n\n\tuseEffect( () => {\n\t\twindow.dispatchEvent( new CustomEvent( 'elementor/element/update_interactions' ) );\n\t}, [] );\n\n\tconst setInteractions = ( value: ElementInteractions | undefined ) => {\n\t\tupdateElementInteractions( {\n\t\t\telementId,\n\t\t\tinteractions: value,\n\t\t} );\n\t};\n\n\tconst playInteractions = ( animationId: string ) => {\n\t\tplayElementInteractions( elementId, animationId );\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 { useEffect, useMemo, useState } from 'react';\nimport { Repeater } from '@elementor/editor-controls';\nimport { type ElementInteractions } from '@elementor/editor-elements';\nimport { PlayerPlayIcon } from '@elementor/icons';\nimport { IconButton } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { getInteractionsConfig } from '../utils/get-interactions-config';\nimport { DEFAULT_INTERACTION, InteractionDetails } from './interaction-details';\n\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 [ interactionsState, setInteractionsState ] = useState< ElementInteractions >( interactions );\n\n\tuseEffect( () => {\n\t\tif ( JSON.stringify( interactions.items ) !== JSON.stringify( interactionsState ) ) {\n\t\t\tonSelectInteractions( interactionsState );\n\t\t}\n\t}, [ interactions.items, interactionsState, onSelectInteractions ] );\n\n\tconst isMaxNumberOfInteractionsReached = useMemo( () => {\n\t\treturn interactionsState.items?.length >= MAX_NUMBER_OF_INTERACTIONS;\n\t}, [ interactionsState.items ] );\n\n\tif ( triggerCreateOnShowEmpty && ( ! interactionsState.items || interactionsState.items?.length === 0 ) ) {\n\t\tsetInteractionsState( {\n\t\t\tversion: 1,\n\t\t\titems: [\n\t\t\t\t{\n\t\t\t\t\tanimation: {\n\t\t\t\t\t\tanimation_id: DEFAULT_INTERACTION,\n\t\t\t\t\t\tanimation_type: 'full-preset',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}\n\n\tconst displayLabel = ( interactionForDisplay: string ) => {\n\t\tif ( ! interactionForDisplay ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst animationOptions = getInteractionsConfig()?.animationOptions;\n\t\tconst option = animationOptions.find( ( opt ) => opt.value === interactionForDisplay );\n\n\t\treturn option?.label || interactionForDisplay;\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={ interactionsState.items }\n\t\t\tsetValues={ ( newValue: ElementInteractions[ 'items' ] ) => {\n\t\t\t\tsetInteractionsState( {\n\t\t\t\t\t...interactionsState,\n\t\t\t\t\titems: newValue,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tshowDuplicate={ false }\n\t\t\tshowToggle={ false }\n\t\t\tisSortable={ false }\n\t\t\tdisableAddItemButton={ isMaxNumberOfInteractionsReached }\n\t\t\titemSettings={ {\n\t\t\t\tinitialValues: {\n\t\t\t\t\tanimation: {\n\t\t\t\t\t\tanimation_id: DEFAULT_INTERACTION,\n\t\t\t\t\t\tanimation_type: 'full-preset',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tLabel: ( { value } ) => displayLabel( value.animation.animation_id ),\n\t\t\t\tIcon: () => null,\n\t\t\t\tContent: ( { index, value } ) => (\n\t\t\t\t\t<InteractionDetails\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tinteraction={ value.animation.animation_id }\n\t\t\t\t\t\tonChange={ ( newValue: string ) => {\n\t\t\t\t\t\t\tconst newInteractions = { ...interactionsState };\n\t\t\t\t\t\t\tnewInteractions.items[ index ] = {\n\t\t\t\t\t\t\t\t...newInteractions.items[ index ],\n\t\t\t\t\t\t\t\tanimation: {\n\t\t\t\t\t\t\t\t\t...newInteractions.items[ index ].animation,\n\t\t\t\t\t\t\t\t\tanimation_id: newValue,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tsetInteractionsState( { ...interactionsState, items: newInteractions.items } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tactions: ( value ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<IconButton size=\"tiny\" onClick={ () => onPlayInteraction( value.animation.animation_id ) }>\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</>\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\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 * as React from 'react';\nimport { PopoverContent } from '@elementor/editor-controls';\nimport { Divider, Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { Direction } from './controls/direction';\nimport { Effect } from './controls/effect';\nimport { EffectType } from './controls/effect-type';\nimport { TimeFrameIndicator } from './controls/time-frame-indicator';\nimport { Trigger } from './controls/trigger';\n\nconst DELIMITER = '-';\n\ntype InteractionDetailsProps = {\n\tinteraction: string;\n\tonChange: ( interaction: string ) => void;\n};\nexport const DEFAULT_INTERACTION = 'load-fade-in--300-0';\n\nconst getDefaultInteractionDetails = () => {\n\tconst [ trigger, effect, type, direction, duration, delay ] = DEFAULT_INTERACTION.split( DELIMITER );\n\n\treturn {\n\t\ttrigger,\n\t\teffect,\n\t\ttype,\n\t\tdirection,\n\t\tduration,\n\t\tdelay,\n\t};\n};\n\nconst buildInteractionDetails = ( interaction: string ) => {\n\tconst [ trigger, effect, type, direction, duration, delay ] = interaction.split( DELIMITER );\n\tconst defaultInteractionDetails = getDefaultInteractionDetails();\n\n\treturn {\n\t\ttrigger: trigger || defaultInteractionDetails.trigger,\n\t\teffect: effect || defaultInteractionDetails.effect,\n\t\ttype: type || defaultInteractionDetails.type,\n\t\tdirection: direction || defaultInteractionDetails.direction,\n\t\tduration: duration || defaultInteractionDetails.duration,\n\t\tdelay: delay || defaultInteractionDetails.delay,\n\t};\n};\n\nexport const InteractionDetails = ( { interaction, onChange }: InteractionDetailsProps ) => {\n\tconst interactionDetails = React.useMemo( () => {\n\t\treturn buildInteractionDetails( interaction );\n\t}, [ interaction ] );\n\n\tconst handleChange = < K extends keyof typeof interactionDetails >(\n\t\tkey: K,\n\t\tvalue: ( typeof interactionDetails )[ K ]\n\t) => {\n\t\tif ( value === null ) {\n\t\t\tvalue = getDefaultInteractionDetails()[ key ];\n\t\t}\n\t\tconst newInteractionDetails = { ...interactionDetails, [ key ]: value };\n\t\tonChange( Object.values( newInteractionDetails ).join( DELIMITER ) );\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<Trigger value={ interactionDetails.trigger } onChange={ ( v ) => handleChange( 'trigger', v ) } />\n\t\t\t</Grid>\n\t\t\t<Divider sx={ { mx: 1.5 } } />\n\t\t\t<Grid container spacing={ 1.5 }>\n\t\t\t\t<Effect value={ interactionDetails.effect } onChange={ ( v ) => handleChange( 'effect', v ) } />\n\t\t\t\t<EffectType value={ interactionDetails.type } onChange={ ( v ) => handleChange( 'type', v ) } />\n\t\t\t\t<Direction\n\t\t\t\t\tvalue={ interactionDetails.direction }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'direction', v ) }\n\t\t\t\t\tinteractionType={ interactionDetails.type }\n\t\t\t\t/>\n\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\tvalue={ interactionDetails.duration }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'duration', v ) }\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={ interactionDetails.delay }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'delay', v ) }\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 * 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},\n\t\t{\n\t\t\tvalue: 'out',\n\t\t\tlabel: __( 'Out', 'elementor' ),\n\t\t\trenderContent: () => __( 'Out', 'elementor' ),\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 * 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\tscrollOut: __( 'Scroll out of 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 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 { 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} catch ( error ) {\n\t\tthrow error;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,wBAAW,OAAM,UAAS,SAAQ,mBAChC,gBAAI,sCAAsC,WAAY,CACzD;AAAA,IAEA,oCAAC,wBAAW,OAAM,UAAS,SAAQ,WAAU,UAAS,eACnD;AAAA,MACD;AAAA,MACA;AAAA,IACD,CACD;AAAA,IAEA,oCAAC,oBAAO,SAAQ,YAAW,OAAM,aAAY,MAAK,SAAQ,IAAK,EAAE,IAAI,EAAE,GAAI,SAAU,2BAClF,gBAAI,yBAAyB,WAAY,CAC5C;AAAA,EACD;AAEF;;;ACjCA,IAAAA,UAAuB;A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,IACH;AAAA,EACD;AACD,CAAE;;;AC1CK,SAAS,OAAO;AACtB,MAAI;AACH,2BAAuB,SAAU,oCAAqC;AAAA,EACvE,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_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","React","import_editor_controls","import_editor_ui","import_ui","import_i18n","import_editor_elements","listenTo"]}
|
package/dist/index.mjs
CHANGED
|
@@ -109,15 +109,20 @@ function getInteractionsConfig() {
|
|
|
109
109
|
|
|
110
110
|
// src/components/interaction-details.tsx
|
|
111
111
|
import * as React9 from "react";
|
|
112
|
+
import { PopoverContent } from "@elementor/editor-controls";
|
|
112
113
|
import { Divider, Grid as Grid6 } from "@elementor/ui";
|
|
113
114
|
import { __ as __7 } from "@wordpress/i18n";
|
|
114
115
|
|
|
115
116
|
// src/components/controls/direction.tsx
|
|
116
117
|
import * as React4 from "react";
|
|
117
118
|
import { useMemo } from "react";
|
|
118
|
-
import {
|
|
119
|
+
import {
|
|
120
|
+
ControlFormLabel,
|
|
121
|
+
PopoverGridContainer,
|
|
122
|
+
ToggleButtonGroupUi
|
|
123
|
+
} from "@elementor/editor-controls";
|
|
119
124
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
120
|
-
import { Grid
|
|
125
|
+
import { Grid } from "@elementor/ui";
|
|
121
126
|
import { __ as __2 } from "@wordpress/i18n";
|
|
122
127
|
function Direction({ value, onChange, interactionType }) {
|
|
123
128
|
const options = useMemo(() => {
|
|
@@ -149,13 +154,14 @@ function Direction({ value, onChange, interactionType }) {
|
|
|
149
154
|
}
|
|
150
155
|
];
|
|
151
156
|
}, [interactionType]);
|
|
152
|
-
return /* @__PURE__ */ React4.createElement(React4.
|
|
157
|
+
return /* @__PURE__ */ React4.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React4.createElement(PopoverGridContainer, null, /* @__PURE__ */ React4.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React4.createElement(ControlFormLabel, null, " ", __2("Direction", "elementor"))), /* @__PURE__ */ React4.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React4.createElement(ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value }))));
|
|
153
158
|
}
|
|
154
159
|
|
|
155
160
|
// src/components/controls/effect.tsx
|
|
156
161
|
import * as React5 from "react";
|
|
162
|
+
import { ControlFormLabel as ControlFormLabel2, PopoverGridContainer as PopoverGridContainer2 } from "@elementor/editor-controls";
|
|
157
163
|
import { MenuListItem } from "@elementor/editor-ui";
|
|
158
|
-
import { Grid as Grid2, Select
|
|
164
|
+
import { Grid as Grid2, Select } from "@elementor/ui";
|
|
159
165
|
import { __ as __3 } from "@wordpress/i18n";
|
|
160
166
|
function Effect({ value, onChange }) {
|
|
161
167
|
const availableEffects = [
|
|
@@ -163,7 +169,7 @@ function Effect({ value, onChange }) {
|
|
|
163
169
|
{ key: "slide", label: __3("Slide", "elementor") },
|
|
164
170
|
{ key: "scale", label: __3("Scale", "elementor") }
|
|
165
171
|
];
|
|
166
|
-
return /* @__PURE__ */ React5.createElement(React5.
|
|
172
|
+
return /* @__PURE__ */ React5.createElement(Grid2, { item: true, xs: 12 }, /* @__PURE__ */ React5.createElement(PopoverGridContainer2, null, /* @__PURE__ */ React5.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React5.createElement(ControlFormLabel2, null, __3("Effect", "elementor"))), /* @__PURE__ */ React5.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React5.createElement(
|
|
167
173
|
Select,
|
|
168
174
|
{
|
|
169
175
|
fullWidth: true,
|
|
@@ -175,13 +181,17 @@ function Effect({ value, onChange }) {
|
|
|
175
181
|
availableEffects.map((effect) => {
|
|
176
182
|
return /* @__PURE__ */ React5.createElement(MenuListItem, { key: effect.key, value: effect.key }, effect.label);
|
|
177
183
|
})
|
|
178
|
-
)));
|
|
184
|
+
))));
|
|
179
185
|
}
|
|
180
186
|
|
|
181
187
|
// src/components/controls/effect-type.tsx
|
|
182
188
|
import * as React6 from "react";
|
|
183
|
-
import {
|
|
184
|
-
|
|
189
|
+
import {
|
|
190
|
+
ControlFormLabel as ControlFormLabel3,
|
|
191
|
+
PopoverGridContainer as PopoverGridContainer3,
|
|
192
|
+
ToggleButtonGroupUi as ToggleButtonGroupUi2
|
|
193
|
+
} from "@elementor/editor-controls";
|
|
194
|
+
import { Grid as Grid3 } from "@elementor/ui";
|
|
185
195
|
import { __ as __4 } from "@wordpress/i18n";
|
|
186
196
|
function EffectType({ value, onChange }) {
|
|
187
197
|
const options = [
|
|
@@ -196,13 +206,14 @@ function EffectType({ value, onChange }) {
|
|
|
196
206
|
renderContent: () => __4("Out", "elementor")
|
|
197
207
|
}
|
|
198
208
|
];
|
|
199
|
-
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(Grid3, { item: true, xs: 12,
|
|
209
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(Grid3, { item: true, xs: 12 }, /* @__PURE__ */ React6.createElement(PopoverGridContainer3, null, /* @__PURE__ */ React6.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React6.createElement(ControlFormLabel3, null, __4("Type", "elementor"))), /* @__PURE__ */ React6.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React6.createElement(ToggleButtonGroupUi2, { items: options, exclusive: true, onChange, value })))));
|
|
200
210
|
}
|
|
201
211
|
|
|
202
212
|
// src/components/controls/time-frame-indicator.tsx
|
|
203
213
|
import * as React7 from "react";
|
|
214
|
+
import { ControlFormLabel as ControlFormLabel4, PopoverGridContainer as PopoverGridContainer4 } from "@elementor/editor-controls";
|
|
204
215
|
import { MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
|
|
205
|
-
import { Grid as Grid4, Select as Select2
|
|
216
|
+
import { Grid as Grid4, Select as Select2 } from "@elementor/ui";
|
|
206
217
|
import { __ as __5 } from "@wordpress/i18n";
|
|
207
218
|
function TimeFrameIndicator({ value, onChange, label }) {
|
|
208
219
|
const availableTimeFrames = ["0", "100", "200", "300", "400", "500", "750", "1000", "1250", "1500"].map(
|
|
@@ -212,7 +223,7 @@ function TimeFrameIndicator({ value, onChange, label }) {
|
|
|
212
223
|
label: __5("%s MS", "elementor").replace("%s", key)
|
|
213
224
|
})
|
|
214
225
|
);
|
|
215
|
-
return /* @__PURE__ */ React7.createElement(React7.
|
|
226
|
+
return /* @__PURE__ */ React7.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React7.createElement(PopoverGridContainer4, null, /* @__PURE__ */ React7.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React7.createElement(ControlFormLabel4, null, label)), /* @__PURE__ */ React7.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React7.createElement(
|
|
216
227
|
Select2,
|
|
217
228
|
{
|
|
218
229
|
fullWidth: true,
|
|
@@ -224,13 +235,14 @@ function TimeFrameIndicator({ value, onChange, label }) {
|
|
|
224
235
|
availableTimeFrames.map((timeFrame) => {
|
|
225
236
|
return /* @__PURE__ */ React7.createElement(MenuListItem2, { key: timeFrame.key, value: timeFrame.key }, timeFrame.label);
|
|
226
237
|
})
|
|
227
|
-
)));
|
|
238
|
+
))));
|
|
228
239
|
}
|
|
229
240
|
|
|
230
241
|
// src/components/controls/trigger.tsx
|
|
231
242
|
import * as React8 from "react";
|
|
243
|
+
import { ControlFormLabel as ControlFormLabel5, PopoverGridContainer as PopoverGridContainer5 } from "@elementor/editor-controls";
|
|
232
244
|
import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
|
|
233
|
-
import { Grid as Grid5, Select as Select3
|
|
245
|
+
import { Grid as Grid5, Select as Select3 } from "@elementor/ui";
|
|
234
246
|
import { __ as __6 } from "@wordpress/i18n";
|
|
235
247
|
function Trigger({ value, onChange }) {
|
|
236
248
|
const availableTriggers = Object.entries({
|
|
@@ -241,7 +253,7 @@ function Trigger({ value, onChange }) {
|
|
|
241
253
|
key,
|
|
242
254
|
label
|
|
243
255
|
}));
|
|
244
|
-
return /* @__PURE__ */ React8.createElement(React8.
|
|
256
|
+
return /* @__PURE__ */ React8.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React8.createElement(PopoverGridContainer5, null, /* @__PURE__ */ React8.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React8.createElement(ControlFormLabel5, null, __6("Trigger", "elementor"))), /* @__PURE__ */ React8.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React8.createElement(
|
|
245
257
|
Select3,
|
|
246
258
|
{
|
|
247
259
|
fullWidth: true,
|
|
@@ -253,7 +265,7 @@ function Trigger({ value, onChange }) {
|
|
|
253
265
|
availableTriggers.map((trigger) => {
|
|
254
266
|
return /* @__PURE__ */ React8.createElement(MenuListItem3, { key: trigger.key, value: trigger.key }, trigger.label);
|
|
255
267
|
})
|
|
256
|
-
)));
|
|
268
|
+
))));
|
|
257
269
|
}
|
|
258
270
|
|
|
259
271
|
// src/components/interaction-details.tsx
|
|
@@ -293,7 +305,7 @@ var InteractionDetails = ({ interaction, onChange }) => {
|
|
|
293
305
|
const newInteractionDetails = { ...interactionDetails, [key]: value };
|
|
294
306
|
onChange(Object.values(newInteractionDetails).join(DELIMITER));
|
|
295
307
|
};
|
|
296
|
-
return /* @__PURE__ */ React9.createElement(
|
|
308
|
+
return /* @__PURE__ */ React9.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React9.createElement(Grid6, { container: true, spacing: 1.5 }, /* @__PURE__ */ React9.createElement(Trigger, { value: interactionDetails.trigger, onChange: (v) => handleChange("trigger", v) })), /* @__PURE__ */ React9.createElement(Divider, { sx: { mx: 1.5 } }), /* @__PURE__ */ React9.createElement(Grid6, { container: true, spacing: 1.5 }, /* @__PURE__ */ React9.createElement(Effect, { value: interactionDetails.effect, onChange: (v) => handleChange("effect", v) }), /* @__PURE__ */ React9.createElement(EffectType, { value: interactionDetails.type, onChange: (v) => handleChange("type", v) }), /* @__PURE__ */ React9.createElement(
|
|
297
309
|
Direction,
|
|
298
310
|
{
|
|
299
311
|
value: interactionDetails.direction,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../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/get-interactions-config.ts","../src/components/interaction-details.tsx","../src/components/controls/direction.tsx","../src/components/controls/effect.tsx","../src/components/controls/effect-type.tsx","../src/components/controls/time-frame-indicator.tsx","../src/components/controls/trigger.tsx","../src/utils/create-interactions-repository.ts","../src/interactions-repository.ts","../src/utils/create-interactions-provider.ts","../src/providers/document-elements-interactions-provider.ts","../src/init.ts"],"sourcesContent":["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 { type ElementInteractions, 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 { 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 );\n\tconst [ firstInteraction, setFirstInteraction ] = useState< boolean >( false );\n\tconst hasInteractions = existingInteractions?.items?.length || firstInteraction;\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 firstInteraction={ firstInteraction } />\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\tsetFirstInteraction( 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( { firstInteraction }: { firstInteraction: boolean } ) {\n\tconst { interactions, setInteractions, playInteractions } = useInteractionsContext();\n\n\tconst applyInteraction = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\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 ]\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={ firstInteraction }\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: ( animationId: string ) => void;\n};\n\nconst InteractionsContext = createContext< InteractionsContextValue | null >( null );\n\nexport const InteractionsProvider = ( { children, elementId }: { children: ReactNode; elementId: string } ) => {\n\tconst interactions = useElementInteractions( elementId );\n\n\tuseEffect( () => {\n\t\twindow.dispatchEvent( new CustomEvent( 'elementor/element/update_interactions' ) );\n\t}, [] );\n\n\tconst setInteractions = ( value: ElementInteractions | undefined ) => {\n\t\tupdateElementInteractions( {\n\t\t\telementId,\n\t\t\tinteractions: value,\n\t\t} );\n\t};\n\n\tconst playInteractions = ( animationId: string ) => {\n\t\tplayElementInteractions( elementId, animationId );\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 { useEffect, useMemo, useState } from 'react';\nimport { Repeater } from '@elementor/editor-controls';\nimport { type ElementInteractions } from '@elementor/editor-elements';\nimport { PlayerPlayIcon } from '@elementor/icons';\nimport { IconButton } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { getInteractionsConfig } from '../utils/get-interactions-config';\nimport { DEFAULT_INTERACTION, InteractionDetails } from './interaction-details';\n\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 [ interactionsState, setInteractionsState ] = useState< ElementInteractions >( interactions );\n\n\tuseEffect( () => {\n\t\tif ( JSON.stringify( interactions.items ) !== JSON.stringify( interactionsState ) ) {\n\t\t\tonSelectInteractions( interactionsState );\n\t\t}\n\t}, [ interactions.items, interactionsState, onSelectInteractions ] );\n\n\tconst isMaxNumberOfInteractionsReached = useMemo( () => {\n\t\treturn interactionsState.items?.length >= MAX_NUMBER_OF_INTERACTIONS;\n\t}, [ interactionsState.items ] );\n\n\tif ( triggerCreateOnShowEmpty && ( ! interactionsState.items || interactionsState.items?.length === 0 ) ) {\n\t\tsetInteractionsState( {\n\t\t\tversion: 1,\n\t\t\titems: [\n\t\t\t\t{\n\t\t\t\t\tanimation: {\n\t\t\t\t\t\tanimation_id: DEFAULT_INTERACTION,\n\t\t\t\t\t\tanimation_type: 'full-preset',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}\n\n\tconst displayLabel = ( interactionForDisplay: string ) => {\n\t\tif ( ! interactionForDisplay ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst animationOptions = getInteractionsConfig()?.animationOptions;\n\t\tconst option = animationOptions.find( ( opt ) => opt.value === interactionForDisplay );\n\n\t\treturn option?.label || interactionForDisplay;\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={ interactionsState.items }\n\t\t\tsetValues={ ( newValue: ElementInteractions[ 'items' ] ) => {\n\t\t\t\tsetInteractionsState( {\n\t\t\t\t\t...interactionsState,\n\t\t\t\t\titems: newValue,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tshowDuplicate={ false }\n\t\t\tshowToggle={ false }\n\t\t\tisSortable={ false }\n\t\t\tdisableAddItemButton={ isMaxNumberOfInteractionsReached }\n\t\t\titemSettings={ {\n\t\t\t\tinitialValues: {\n\t\t\t\t\tanimation: {\n\t\t\t\t\t\tanimation_id: DEFAULT_INTERACTION,\n\t\t\t\t\t\tanimation_type: 'full-preset',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tLabel: ( { value } ) => displayLabel( value.animation.animation_id ),\n\t\t\t\tIcon: () => null,\n\t\t\t\tContent: ( { index, value } ) => (\n\t\t\t\t\t<InteractionDetails\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tinteraction={ value.animation.animation_id }\n\t\t\t\t\t\tonChange={ ( newValue: string ) => {\n\t\t\t\t\t\t\tconst newInteractions = { ...interactionsState };\n\t\t\t\t\t\t\tnewInteractions.items[ index ] = {\n\t\t\t\t\t\t\t\t...newInteractions.items[ index ],\n\t\t\t\t\t\t\t\tanimation: {\n\t\t\t\t\t\t\t\t\t...newInteractions.items[ index ].animation,\n\t\t\t\t\t\t\t\t\tanimation_id: newValue,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tsetInteractionsState( { ...interactionsState, items: newInteractions.items } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tactions: ( value ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<IconButton size=\"tiny\" onClick={ () => onPlayInteraction( value.animation.animation_id ) }>\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</>\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\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 * as React from 'react';\nimport { Divider, Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { Direction } from './controls/direction';\nimport { Effect } from './controls/effect';\nimport { EffectType } from './controls/effect-type';\nimport { TimeFrameIndicator } from './controls/time-frame-indicator';\nimport { Trigger } from './controls/trigger';\n\nconst DELIMITER = '-';\n\ntype InteractionDetailsProps = {\n\tinteraction: string;\n\tonChange: ( interaction: string ) => void;\n};\nexport const DEFAULT_INTERACTION = 'load-fade-in--300-0';\n\nconst getDefaultInteractionDetails = () => {\n\tconst [ trigger, effect, type, direction, duration, delay ] = DEFAULT_INTERACTION.split( DELIMITER );\n\n\treturn {\n\t\ttrigger,\n\t\teffect,\n\t\ttype,\n\t\tdirection,\n\t\tduration,\n\t\tdelay,\n\t};\n};\n\nconst buildInteractionDetails = ( interaction: string ) => {\n\tconst [ trigger, effect, type, direction, duration, delay ] = interaction.split( DELIMITER );\n\tconst defaultInteractionDetails = getDefaultInteractionDetails();\n\n\treturn {\n\t\ttrigger: trigger || defaultInteractionDetails.trigger,\n\t\teffect: effect || defaultInteractionDetails.effect,\n\t\ttype: type || defaultInteractionDetails.type,\n\t\tdirection: direction || defaultInteractionDetails.direction,\n\t\tduration: duration || defaultInteractionDetails.duration,\n\t\tdelay: delay || defaultInteractionDetails.delay,\n\t};\n};\n\nexport const InteractionDetails = ( { interaction, onChange }: InteractionDetailsProps ) => {\n\tconst interactionDetails = React.useMemo( () => {\n\t\treturn buildInteractionDetails( interaction );\n\t}, [ interaction ] );\n\n\tconst handleChange = < K extends keyof typeof interactionDetails >(\n\t\tkey: K,\n\t\tvalue: ( typeof interactionDetails )[ K ]\n\t) => {\n\t\tif ( value === null ) {\n\t\t\tvalue = getDefaultInteractionDetails()[ key ];\n\t\t}\n\t\tconst newInteractionDetails = { ...interactionDetails, [ key ]: value };\n\t\tonChange( Object.values( newInteractionDetails ).join( DELIMITER ) );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Grid container spacing={ 2 } sx={ { p: 1.5 } }>\n\t\t\t\t<Trigger value={ interactionDetails.trigger } onChange={ ( v ) => handleChange( 'trigger', v ) } />\n\t\t\t</Grid>\n\t\t\t<Divider sx={ { mx: 1.5 } } />\n\t\t\t<Grid container spacing={ 2 } sx={ { p: 1.5 } }>\n\t\t\t\t<Effect value={ interactionDetails.effect } onChange={ ( v ) => handleChange( 'effect', v ) } />\n\t\t\t\t<EffectType value={ interactionDetails.type } onChange={ ( v ) => handleChange( 'type', v ) } />\n\t\t\t\t<Direction\n\t\t\t\t\tvalue={ interactionDetails.direction }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'direction', v ) }\n\t\t\t\t\tinteractionType={ interactionDetails.type }\n\t\t\t\t/>\n\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\tvalue={ interactionDetails.duration }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'duration', v ) }\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={ interactionDetails.delay }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'delay', v ) }\n\t\t\t\t\tlabel={ __( 'Delay', 'elementor' ) }\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</>\n\t);\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 { Grid, Typography } 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<>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Typography variant=\"caption\" color=\"text.secondary\">\n\t\t\t\t\t{ __( 'Direction', 'elementor' ) }\n\t\t\t\t</Typography>\n\t\t\t</Grid>\n\t\t\t<Grid item xs={ 12 } md={ 6 } sx={ { display: 'flex', justifyContent: 'flex-end', overflow: 'hidden' } }>\n\t\t\t\t<ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />\n\t\t\t</Grid>\n\t\t</>\n\t);\n}\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent, Typography } 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<>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Typography variant=\"caption\" color=\"text.secondary\">\n\t\t\t\t\t{ __( 'Effect', 'elementor' ) }\n\t\t\t\t</Typography>\n\t\t\t</Grid>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Select\n\t\t\t\t\tfullWidth\n\t\t\t\t\tdisplayEmpty\n\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t>\n\t\t\t\t\t{ availableEffects.map( ( effect ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<MenuListItem key={ effect.key } value={ effect.key }>\n\t\t\t\t\t\t\t\t{ effect.label }\n\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</Select>\n\t\t\t</Grid>\n\t\t</>\n\t);\n}\n","import * as React from 'react';\nimport { type ToggleButtonGroupItem, ToggleButtonGroupUi } from '@elementor/editor-controls';\nimport { Grid, Typography } 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},\n\t\t{\n\t\t\tvalue: 'out',\n\t\t\tlabel: __( 'Out', 'elementor' ),\n\t\t\trenderContent: () => __( 'Out', 'elementor' ),\n\t\t},\n\t];\n\n\treturn (\n\t\t<>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Typography variant=\"caption\" color=\"text.secondary\">\n\t\t\t\t\t{ __( 'Type', 'elementor' ) }\n\t\t\t\t</Typography>\n\t\t\t</Grid>\n\t\t\t<Grid item xs={ 12 } md={ 6 } sx={ { display: 'flex', justifyContent: 'flex-end', overflow: 'hidden' } }>\n\t\t\t\t<ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />\n\t\t\t</Grid>\n\t\t</>\n\t);\n}\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent, Typography } 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<>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Typography variant=\"caption\" color=\"text.secondary\">\n\t\t\t\t\t{ label }\n\t\t\t\t</Typography>\n\t\t\t</Grid>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Select\n\t\t\t\t\tfullWidth\n\t\t\t\t\tdisplayEmpty\n\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t>\n\t\t\t\t\t{ availableTimeFrames.map( ( timeFrame ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<MenuListItem key={ timeFrame.key } value={ timeFrame.key }>\n\t\t\t\t\t\t\t\t{ timeFrame.label }\n\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</Select>\n\t\t\t</Grid>\n\t\t</>\n\t);\n}\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent, Typography } 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\tscrollOut: __( 'Scroll out of view', 'elementor' ),\n\t} ).map( ( [ key, label ] ) => ( {\n\t\tkey,\n\t\tlabel,\n\t} ) );\n\n\treturn (\n\t\t<>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Typography variant=\"caption\" color=\"text.secondary\">\n\t\t\t\t\t{ __( 'Trigger', 'elementor' ) }\n\t\t\t\t</Typography>\n\t\t\t</Grid>\n\t\t\t<Grid item xs={ 12 } md={ 6 }>\n\t\t\t\t<Select\n\t\t\t\t\tfullWidth\n\t\t\t\t\tdisplayEmpty\n\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t>\n\t\t\t\t\t{ availableTriggers.map( ( trigger ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<MenuListItem key={ trigger.key } value={ trigger.key }>\n\t\t\t\t\t\t\t\t{ trigger.label }\n\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</Select>\n\t\t\t</Grid>\n\t\t</>\n\t);\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 { 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} catch ( error ) {\n\t\tthrow error;\n\t}\n}\n"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AO,CAAC,EAAE;AAAA,QACvD;AAAA,MACD,CAAE;AAAA,IACH;AAAA,EACD;AACD,CAAE;;;AC1CK,SAAS,OAAO;AACtB,MAAI;AACH,2BAAuB,SAAU,oCAAqC;AAAA,EACvE,SAAU,OAAQ;AACjB,UAAM;AAAA,EACP;AACD;","names":["React","useCallback","useState","useElementInteractions","Stack","React","React","createContext","useContext","React","useEffect","useMemo","useState","__","React","Grid","__","React","Typography","__","React","Grid","Typography","__","React","ToggleButtonGroupUi","Grid","Typography","__","React","MenuListItem","Grid","Select","Typography","__","React","MenuListItem","Grid","Select","Typography","__","Grid","__","useState","useEffect","useMemo","__","useElementInteractions","useState","useCallback","Stack"]}
|
|
1
|
+
{"version":3,"sources":["../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/get-interactions-config.ts","../src/components/interaction-details.tsx","../src/components/controls/direction.tsx","../src/components/controls/effect.tsx","../src/components/controls/effect-type.tsx","../src/components/controls/time-frame-indicator.tsx","../src/components/controls/trigger.tsx","../src/utils/create-interactions-repository.ts","../src/interactions-repository.ts","../src/utils/create-interactions-provider.ts","../src/providers/document-elements-interactions-provider.ts","../src/init.ts"],"sourcesContent":["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 { type ElementInteractions, 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 { 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 );\n\tconst [ firstInteraction, setFirstInteraction ] = useState< boolean >( false );\n\tconst hasInteractions = existingInteractions?.items?.length || firstInteraction;\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 firstInteraction={ firstInteraction } />\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\tsetFirstInteraction( 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( { firstInteraction }: { firstInteraction: boolean } ) {\n\tconst { interactions, setInteractions, playInteractions } = useInteractionsContext();\n\n\tconst applyInteraction = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\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 ]\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={ firstInteraction }\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: ( animationId: string ) => void;\n};\n\nconst InteractionsContext = createContext< InteractionsContextValue | null >( null );\n\nexport const InteractionsProvider = ( { children, elementId }: { children: ReactNode; elementId: string } ) => {\n\tconst interactions = useElementInteractions( elementId );\n\n\tuseEffect( () => {\n\t\twindow.dispatchEvent( new CustomEvent( 'elementor/element/update_interactions' ) );\n\t}, [] );\n\n\tconst setInteractions = ( value: ElementInteractions | undefined ) => {\n\t\tupdateElementInteractions( {\n\t\t\telementId,\n\t\t\tinteractions: value,\n\t\t} );\n\t};\n\n\tconst playInteractions = ( animationId: string ) => {\n\t\tplayElementInteractions( elementId, animationId );\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 { useEffect, useMemo, useState } from 'react';\nimport { Repeater } from '@elementor/editor-controls';\nimport { type ElementInteractions } from '@elementor/editor-elements';\nimport { PlayerPlayIcon } from '@elementor/icons';\nimport { IconButton } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { getInteractionsConfig } from '../utils/get-interactions-config';\nimport { DEFAULT_INTERACTION, InteractionDetails } from './interaction-details';\n\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 [ interactionsState, setInteractionsState ] = useState< ElementInteractions >( interactions );\n\n\tuseEffect( () => {\n\t\tif ( JSON.stringify( interactions.items ) !== JSON.stringify( interactionsState ) ) {\n\t\t\tonSelectInteractions( interactionsState );\n\t\t}\n\t}, [ interactions.items, interactionsState, onSelectInteractions ] );\n\n\tconst isMaxNumberOfInteractionsReached = useMemo( () => {\n\t\treturn interactionsState.items?.length >= MAX_NUMBER_OF_INTERACTIONS;\n\t}, [ interactionsState.items ] );\n\n\tif ( triggerCreateOnShowEmpty && ( ! interactionsState.items || interactionsState.items?.length === 0 ) ) {\n\t\tsetInteractionsState( {\n\t\t\tversion: 1,\n\t\t\titems: [\n\t\t\t\t{\n\t\t\t\t\tanimation: {\n\t\t\t\t\t\tanimation_id: DEFAULT_INTERACTION,\n\t\t\t\t\t\tanimation_type: 'full-preset',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}\n\n\tconst displayLabel = ( interactionForDisplay: string ) => {\n\t\tif ( ! interactionForDisplay ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst animationOptions = getInteractionsConfig()?.animationOptions;\n\t\tconst option = animationOptions.find( ( opt ) => opt.value === interactionForDisplay );\n\n\t\treturn option?.label || interactionForDisplay;\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={ interactionsState.items }\n\t\t\tsetValues={ ( newValue: ElementInteractions[ 'items' ] ) => {\n\t\t\t\tsetInteractionsState( {\n\t\t\t\t\t...interactionsState,\n\t\t\t\t\titems: newValue,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tshowDuplicate={ false }\n\t\t\tshowToggle={ false }\n\t\t\tisSortable={ false }\n\t\t\tdisableAddItemButton={ isMaxNumberOfInteractionsReached }\n\t\t\titemSettings={ {\n\t\t\t\tinitialValues: {\n\t\t\t\t\tanimation: {\n\t\t\t\t\t\tanimation_id: DEFAULT_INTERACTION,\n\t\t\t\t\t\tanimation_type: 'full-preset',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tLabel: ( { value } ) => displayLabel( value.animation.animation_id ),\n\t\t\t\tIcon: () => null,\n\t\t\t\tContent: ( { index, value } ) => (\n\t\t\t\t\t<InteractionDetails\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tinteraction={ value.animation.animation_id }\n\t\t\t\t\t\tonChange={ ( newValue: string ) => {\n\t\t\t\t\t\t\tconst newInteractions = { ...interactionsState };\n\t\t\t\t\t\t\tnewInteractions.items[ index ] = {\n\t\t\t\t\t\t\t\t...newInteractions.items[ index ],\n\t\t\t\t\t\t\t\tanimation: {\n\t\t\t\t\t\t\t\t\t...newInteractions.items[ index ].animation,\n\t\t\t\t\t\t\t\t\tanimation_id: newValue,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tsetInteractionsState( { ...interactionsState, items: newInteractions.items } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tactions: ( value ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<IconButton size=\"tiny\" onClick={ () => onPlayInteraction( value.animation.animation_id ) }>\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</>\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\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 * as React from 'react';\nimport { PopoverContent } from '@elementor/editor-controls';\nimport { Divider, Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { Direction } from './controls/direction';\nimport { Effect } from './controls/effect';\nimport { EffectType } from './controls/effect-type';\nimport { TimeFrameIndicator } from './controls/time-frame-indicator';\nimport { Trigger } from './controls/trigger';\n\nconst DELIMITER = '-';\n\ntype InteractionDetailsProps = {\n\tinteraction: string;\n\tonChange: ( interaction: string ) => void;\n};\nexport const DEFAULT_INTERACTION = 'load-fade-in--300-0';\n\nconst getDefaultInteractionDetails = () => {\n\tconst [ trigger, effect, type, direction, duration, delay ] = DEFAULT_INTERACTION.split( DELIMITER );\n\n\treturn {\n\t\ttrigger,\n\t\teffect,\n\t\ttype,\n\t\tdirection,\n\t\tduration,\n\t\tdelay,\n\t};\n};\n\nconst buildInteractionDetails = ( interaction: string ) => {\n\tconst [ trigger, effect, type, direction, duration, delay ] = interaction.split( DELIMITER );\n\tconst defaultInteractionDetails = getDefaultInteractionDetails();\n\n\treturn {\n\t\ttrigger: trigger || defaultInteractionDetails.trigger,\n\t\teffect: effect || defaultInteractionDetails.effect,\n\t\ttype: type || defaultInteractionDetails.type,\n\t\tdirection: direction || defaultInteractionDetails.direction,\n\t\tduration: duration || defaultInteractionDetails.duration,\n\t\tdelay: delay || defaultInteractionDetails.delay,\n\t};\n};\n\nexport const InteractionDetails = ( { interaction, onChange }: InteractionDetailsProps ) => {\n\tconst interactionDetails = React.useMemo( () => {\n\t\treturn buildInteractionDetails( interaction );\n\t}, [ interaction ] );\n\n\tconst handleChange = < K extends keyof typeof interactionDetails >(\n\t\tkey: K,\n\t\tvalue: ( typeof interactionDetails )[ K ]\n\t) => {\n\t\tif ( value === null ) {\n\t\t\tvalue = getDefaultInteractionDetails()[ key ];\n\t\t}\n\t\tconst newInteractionDetails = { ...interactionDetails, [ key ]: value };\n\t\tonChange( Object.values( newInteractionDetails ).join( DELIMITER ) );\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<Trigger value={ interactionDetails.trigger } onChange={ ( v ) => handleChange( 'trigger', v ) } />\n\t\t\t</Grid>\n\t\t\t<Divider sx={ { mx: 1.5 } } />\n\t\t\t<Grid container spacing={ 1.5 }>\n\t\t\t\t<Effect value={ interactionDetails.effect } onChange={ ( v ) => handleChange( 'effect', v ) } />\n\t\t\t\t<EffectType value={ interactionDetails.type } onChange={ ( v ) => handleChange( 'type', v ) } />\n\t\t\t\t<Direction\n\t\t\t\t\tvalue={ interactionDetails.direction }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'direction', v ) }\n\t\t\t\t\tinteractionType={ interactionDetails.type }\n\t\t\t\t/>\n\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\tvalue={ interactionDetails.duration }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'duration', v ) }\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={ interactionDetails.delay }\n\t\t\t\t\tonChange={ ( v ) => handleChange( 'delay', v ) }\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 * 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},\n\t\t{\n\t\t\tvalue: 'out',\n\t\t\tlabel: __( 'Out', 'elementor' ),\n\t\t\trenderContent: () => __( 'Out', 'elementor' ),\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 * 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\tscrollOut: __( 'Scroll out of 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 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 { 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} catch ( error ) {\n\t\tthrow error;\n\t}\n}\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,OAAO,kBAAkB;AAC1C,SAAS,UAAU;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,aAAU,UAAS,SAAQ;AAAA,IAE5B,oCAAC,cAAW,OAAM,UAAS,SAAQ,eAChC,GAAI,sCAAsC,WAAY,CACzD;AAAA,IAEA,oCAAC,cAAW,OAAM,UAAS,SAAQ,WAAU,UAAS,WACnD;AAAA,MACD;AAAA,MACA;AAAA,IACD,CACD;AAAA,IAEA,oCAAC,UAAO,SAAQ,YAAW,OAAM,aAAY,MAAK,SAAQ,IAAK,EAAE,IAAI,EAAE,GAAI,SAAU,uBAClF,GAAI,yBAAyB,WAAY,CAC5C;AAAA,EACD;AAEF;;;ACjCA,YAAYA,aAAW;AACvB,SAAS,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,UAAU;AAAA,EACV,WAAW,CAAE,OAAQ;AACpB,WAAO,SAAU,CAAE,YAAa,uCAAwC,CAAE,GAAG,MAAM,GAAG,CAAE;AAAA,EACzF;AAAA,EACA,SAAS;AAAA,IACR,KAAK,MAAM;AACV,YAAM,WAAW,YAAY;AAE7B,YAAM,WAAW,SAAS,OAAQ,CAAE,YAAa;AAChD,cAAM,eAAe,uBAAwB,QAAQ,EAAG;AACxD,YAAK,CAAE,cAAe;AACrB,iBAAO;AAAA,QACR;AACA,eAAO,cAAc,OAAO,SAAS;AAAA,MACtC,CAAE;AAEF,aAAO,SAAS,IAAK,CAAE,YAAa;AACnC,cAAM,eAAe,uBAAwB,QAAQ,EAAG;AACxD,eAAO;AAAA,UACN,WAAW,QAAQ;AAAA,UACnB,QAAQ,QAAQ;AAAA,UAChB,cAAc,gBAAgB,EAAE,SAAS,GAAG,OAAO,CAAC,EAAE;AAAA,QACvD;AAAA,MACD,CAAE;AAAA,IACH;AAAA,EACD;AACD,CAAE;;;AC1CK,SAAS,OAAO;AACtB,MAAI;AACH,2BAAuB,SAAU,oCAAqC;AAAA,EACvE,SAAU,OAAQ;AACjB,UAAM;AAAA,EACP;AACD;","names":["React","useCallback","useState","useElementInteractions","Stack","React","React","createContext","useContext","React","useEffect","useMemo","useState","__","React","Grid","__","React","__","React","ControlFormLabel","PopoverGridContainer","Grid","__","React","ControlFormLabel","PopoverGridContainer","ToggleButtonGroupUi","Grid","__","React","ControlFormLabel","PopoverGridContainer","MenuListItem","Grid","Select","__","React","ControlFormLabel","PopoverGridContainer","MenuListItem","Grid","Select","__","Grid","__","useState","useEffect","useMemo","__","useElementInteractions","useState","useCallback","Stack"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-interactions",
|
|
3
|
-
"version": "3.33.0-
|
|
3
|
+
"version": "3.33.0-287",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor-controls": "3.33.0-
|
|
43
|
-
"@elementor/editor-elements": "3.33.0-
|
|
44
|
-
"@elementor/editor-ui": "3.33.0-
|
|
42
|
+
"@elementor/editor-controls": "3.33.0-287",
|
|
43
|
+
"@elementor/editor-elements": "3.33.0-287",
|
|
44
|
+
"@elementor/editor-ui": "3.33.0-287",
|
|
45
45
|
"@elementor/icons": "^1.61.0",
|
|
46
|
-
"@elementor/editor-v1-adapters": "3.33.0-
|
|
47
|
-
"@elementor/utils": "3.33.0-
|
|
48
|
-
"@elementor/session": "3.33.0-
|
|
46
|
+
"@elementor/editor-v1-adapters": "3.33.0-287",
|
|
47
|
+
"@elementor/utils": "3.33.0-287",
|
|
48
|
+
"@elementor/session": "3.33.0-287",
|
|
49
49
|
"@elementor/ui": "1.36.17",
|
|
50
50
|
"@wordpress/i18n": "^5.13.0"
|
|
51
51
|
},
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ControlFormLabel,
|
|
5
|
+
PopoverGridContainer,
|
|
6
|
+
type ToggleButtonGroupItem,
|
|
7
|
+
ToggleButtonGroupUi,
|
|
8
|
+
} from '@elementor/editor-controls';
|
|
4
9
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from '@elementor/icons';
|
|
5
|
-
import { Grid
|
|
10
|
+
import { Grid } from '@elementor/ui';
|
|
6
11
|
import { __ } from '@wordpress/i18n';
|
|
7
12
|
|
|
8
13
|
import { type DirectionFieldProps } from '../../types';
|
|
@@ -46,15 +51,15 @@ export function Direction( { value, onChange, interactionType }: DirectionFieldP
|
|
|
46
51
|
}, [ interactionType ] );
|
|
47
52
|
|
|
48
53
|
return (
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
{ __( 'Direction', 'elementor' ) }
|
|
53
|
-
</
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</
|
|
58
|
-
|
|
54
|
+
<Grid item xs={ 12 }>
|
|
55
|
+
<PopoverGridContainer>
|
|
56
|
+
<Grid item xs={ 6 }>
|
|
57
|
+
<ControlFormLabel> { __( 'Direction', 'elementor' ) }</ControlFormLabel>
|
|
58
|
+
</Grid>
|
|
59
|
+
<Grid item xs={ 6 }>
|
|
60
|
+
<ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />
|
|
61
|
+
</Grid>
|
|
62
|
+
</PopoverGridContainer>
|
|
63
|
+
</Grid>
|
|
59
64
|
);
|
|
60
65
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
ControlFormLabel,
|
|
4
|
+
PopoverGridContainer,
|
|
5
|
+
type ToggleButtonGroupItem,
|
|
6
|
+
ToggleButtonGroupUi,
|
|
7
|
+
} from '@elementor/editor-controls';
|
|
8
|
+
import { Grid } from '@elementor/ui';
|
|
4
9
|
import { __ } from '@wordpress/i18n';
|
|
5
10
|
|
|
6
11
|
import { type FieldProps } from '../../types';
|
|
@@ -22,13 +27,15 @@ export function EffectType( { value, onChange }: FieldProps ) {
|
|
|
22
27
|
|
|
23
28
|
return (
|
|
24
29
|
<>
|
|
25
|
-
<Grid item xs={ 12 }
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
<Grid item xs={ 12 }>
|
|
31
|
+
<PopoverGridContainer>
|
|
32
|
+
<Grid item xs={ 6 }>
|
|
33
|
+
<ControlFormLabel>{ __( 'Type', 'elementor' ) }</ControlFormLabel>
|
|
34
|
+
</Grid>
|
|
35
|
+
<Grid item xs={ 6 }>
|
|
36
|
+
<ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />
|
|
37
|
+
</Grid>
|
|
38
|
+
</PopoverGridContainer>
|
|
32
39
|
</Grid>
|
|
33
40
|
</>
|
|
34
41
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ControlFormLabel, PopoverGridContainer } from '@elementor/editor-controls';
|
|
2
3
|
import { MenuListItem } from '@elementor/editor-ui';
|
|
3
|
-
import { Grid, Select, type SelectChangeEvent
|
|
4
|
+
import { Grid, Select, type SelectChangeEvent } from '@elementor/ui';
|
|
4
5
|
import { __ } from '@wordpress/i18n';
|
|
5
6
|
|
|
6
7
|
import { type FieldProps } from '../../types';
|
|
@@ -12,29 +13,29 @@ export function Effect( { value, onChange }: FieldProps ) {
|
|
|
12
13
|
];
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
{ __( 'Effect', 'elementor' ) }
|
|
19
|
-
</
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
</
|
|
37
|
-
</
|
|
38
|
-
|
|
16
|
+
<Grid item xs={ 12 }>
|
|
17
|
+
<PopoverGridContainer>
|
|
18
|
+
<Grid item xs={ 6 }>
|
|
19
|
+
<ControlFormLabel>{ __( 'Effect', 'elementor' ) }</ControlFormLabel>
|
|
20
|
+
</Grid>
|
|
21
|
+
<Grid item xs={ 6 }>
|
|
22
|
+
<Select
|
|
23
|
+
fullWidth
|
|
24
|
+
displayEmpty
|
|
25
|
+
size="tiny"
|
|
26
|
+
value={ value }
|
|
27
|
+
onChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }
|
|
28
|
+
>
|
|
29
|
+
{ availableEffects.map( ( effect ) => {
|
|
30
|
+
return (
|
|
31
|
+
<MenuListItem key={ effect.key } value={ effect.key }>
|
|
32
|
+
{ effect.label }
|
|
33
|
+
</MenuListItem>
|
|
34
|
+
);
|
|
35
|
+
} ) }
|
|
36
|
+
</Select>
|
|
37
|
+
</Grid>
|
|
38
|
+
</PopoverGridContainer>
|
|
39
|
+
</Grid>
|
|
39
40
|
);
|
|
40
41
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ControlFormLabel, PopoverGridContainer } from '@elementor/editor-controls';
|
|
2
3
|
import { MenuListItem } from '@elementor/editor-ui';
|
|
3
|
-
import { Grid, Select, type SelectChangeEvent
|
|
4
|
+
import { Grid, Select, type SelectChangeEvent } from '@elementor/ui';
|
|
4
5
|
import { __ } from '@wordpress/i18n';
|
|
5
6
|
|
|
6
7
|
import { type FieldProps } from '../../types';
|
|
@@ -15,29 +16,29 @@ export function TimeFrameIndicator( { value, onChange, label }: FieldProps ) {
|
|
|
15
16
|
);
|
|
16
17
|
|
|
17
18
|
return (
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
{ label }
|
|
22
|
-
</
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
</
|
|
40
|
-
</
|
|
41
|
-
|
|
19
|
+
<Grid item xs={ 12 }>
|
|
20
|
+
<PopoverGridContainer>
|
|
21
|
+
<Grid item xs={ 6 }>
|
|
22
|
+
<ControlFormLabel>{ label }</ControlFormLabel>
|
|
23
|
+
</Grid>
|
|
24
|
+
<Grid item xs={ 6 }>
|
|
25
|
+
<Select
|
|
26
|
+
fullWidth
|
|
27
|
+
displayEmpty
|
|
28
|
+
size="tiny"
|
|
29
|
+
value={ value }
|
|
30
|
+
onChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }
|
|
31
|
+
>
|
|
32
|
+
{ availableTimeFrames.map( ( timeFrame ) => {
|
|
33
|
+
return (
|
|
34
|
+
<MenuListItem key={ timeFrame.key } value={ timeFrame.key }>
|
|
35
|
+
{ timeFrame.label }
|
|
36
|
+
</MenuListItem>
|
|
37
|
+
);
|
|
38
|
+
} ) }
|
|
39
|
+
</Select>
|
|
40
|
+
</Grid>
|
|
41
|
+
</PopoverGridContainer>
|
|
42
|
+
</Grid>
|
|
42
43
|
);
|
|
43
44
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ControlFormLabel, PopoverGridContainer } from '@elementor/editor-controls';
|
|
2
3
|
import { MenuListItem } from '@elementor/editor-ui';
|
|
3
|
-
import { Grid, Select, type SelectChangeEvent
|
|
4
|
+
import { Grid, Select, type SelectChangeEvent } from '@elementor/ui';
|
|
4
5
|
import { __ } from '@wordpress/i18n';
|
|
5
6
|
|
|
6
7
|
import { type FieldProps } from '../../types';
|
|
@@ -16,29 +17,29 @@ export function Trigger( { value, onChange }: FieldProps ) {
|
|
|
16
17
|
} ) );
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
{ __( 'Trigger', 'elementor' ) }
|
|
23
|
-
</
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
</
|
|
41
|
-
</
|
|
42
|
-
|
|
20
|
+
<Grid item xs={ 12 }>
|
|
21
|
+
<PopoverGridContainer>
|
|
22
|
+
<Grid item xs={ 6 }>
|
|
23
|
+
<ControlFormLabel>{ __( 'Trigger', 'elementor' ) }</ControlFormLabel>
|
|
24
|
+
</Grid>
|
|
25
|
+
<Grid item xs={ 6 }>
|
|
26
|
+
<Select
|
|
27
|
+
fullWidth
|
|
28
|
+
displayEmpty
|
|
29
|
+
size="tiny"
|
|
30
|
+
onChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }
|
|
31
|
+
value={ value }
|
|
32
|
+
>
|
|
33
|
+
{ availableTriggers.map( ( trigger ) => {
|
|
34
|
+
return (
|
|
35
|
+
<MenuListItem key={ trigger.key } value={ trigger.key }>
|
|
36
|
+
{ trigger.label }
|
|
37
|
+
</MenuListItem>
|
|
38
|
+
);
|
|
39
|
+
} ) }
|
|
40
|
+
</Select>
|
|
41
|
+
</Grid>
|
|
42
|
+
</PopoverGridContainer>
|
|
43
|
+
</Grid>
|
|
43
44
|
);
|
|
44
45
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { PopoverContent } from '@elementor/editor-controls';
|
|
2
3
|
import { Divider, Grid } from '@elementor/ui';
|
|
3
4
|
import { __ } from '@wordpress/i18n';
|
|
4
5
|
|
|
@@ -60,12 +61,12 @@ export const InteractionDetails = ( { interaction, onChange }: InteractionDetail
|
|
|
60
61
|
};
|
|
61
62
|
|
|
62
63
|
return (
|
|
63
|
-
|
|
64
|
-
<Grid container spacing={
|
|
64
|
+
<PopoverContent p={ 1.5 }>
|
|
65
|
+
<Grid container spacing={ 1.5 }>
|
|
65
66
|
<Trigger value={ interactionDetails.trigger } onChange={ ( v ) => handleChange( 'trigger', v ) } />
|
|
66
67
|
</Grid>
|
|
67
68
|
<Divider sx={ { mx: 1.5 } } />
|
|
68
|
-
<Grid container spacing={
|
|
69
|
+
<Grid container spacing={ 1.5 }>
|
|
69
70
|
<Effect value={ interactionDetails.effect } onChange={ ( v ) => handleChange( 'effect', v ) } />
|
|
70
71
|
<EffectType value={ interactionDetails.type } onChange={ ( v ) => handleChange( 'type', v ) } />
|
|
71
72
|
<Direction
|
|
@@ -84,6 +85,6 @@ export const InteractionDetails = ( { interaction, onChange }: InteractionDetail
|
|
|
84
85
|
label={ __( 'Delay', 'elementor' ) }
|
|
85
86
|
/>
|
|
86
87
|
</Grid>
|
|
87
|
-
|
|
88
|
+
</PopoverContent>
|
|
88
89
|
);
|
|
89
90
|
};
|