@vectoriox/iox-builder 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,7 +16,7 @@ import { SelectModule } from 'primeng/select';
|
|
|
16
16
|
import { TooltipModule } from 'primeng/tooltip';
|
|
17
17
|
import { DialogModule } from 'primeng/dialog';
|
|
18
18
|
import * as i16 from '@vectoriox/iox-ui';
|
|
19
|
-
import { DEFAULT_WIDTH_BY_TYPE, ContextStore, ComponentInstanceRegistryService, isContextAction, contextActionEffect, resolveContextValue, buildTargetedStateSelector, compileDeclarations, safeSetInput, composeVirtualTraits, collectContextSlotKeys, withContextSlots, nodeUsesContext, resolvePath, applyBindingPipes, IS_PREVIEW, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, IoxPageModule } from '@vectoriox/iox-ui';
|
|
19
|
+
import { DEFAULT_WIDTH_BY_TYPE, ContextStore, ComponentInstanceRegistryService, isActionEnabled, isContextAction, contextActionEffect, resolveContextValue, buildTargetedStateSelector, compileDeclarations, safeSetInput, composeVirtualTraits, collectContextSlotKeys, withContextSlots, nodeUsesContext, resolvePath, applyBindingPipes, IS_PREVIEW, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, IoxPageModule } from '@vectoriox/iox-ui';
|
|
20
20
|
export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
|
|
21
21
|
import Lenis from 'lenis';
|
|
22
22
|
import { Subject, BehaviorSubject, of, forkJoin } from 'rxjs';
|
|
@@ -827,6 +827,11 @@ var PanelEventTypes;
|
|
|
827
827
|
* id). Emitted when the overlay interaction badge is clicked so that badge → "edit THIS
|
|
828
828
|
* interaction", without firing the element's (live) animation. */
|
|
829
829
|
PanelEventTypes["INTERACTION_EDIT"] = "interactionedit";
|
|
830
|
+
/** A node's `interactions` were added/removed/edited. Carries `{ node }`.
|
|
831
|
+
* Repeater/Slider listen so their PREVIEW CLONES are re-cloned with the new interactions —
|
|
832
|
+
* clones are attached by ELEMENT at render time, so without this a new interaction only starts
|
|
833
|
+
* working after a save + reload. */
|
|
834
|
+
PanelEventTypes["INTERACTION_CHANGED"] = "interactionchanged";
|
|
830
835
|
})(PanelEventTypes || (PanelEventTypes = {}));
|
|
831
836
|
class PanelEventService {
|
|
832
837
|
constructor() {
|
|
@@ -2105,6 +2110,10 @@ class InteractionEngineService {
|
|
|
2105
2110
|
const skipPreState = inBuilder && ix.trigger === 'scrollProgress';
|
|
2106
2111
|
if (!skipPreState) {
|
|
2107
2112
|
for (const action of ix.actions) {
|
|
2113
|
+
// A disabled action must not pre-state: it would hide the element with nothing
|
|
2114
|
+
// left to reveal it.
|
|
2115
|
+
if (!isActionEnabled(action))
|
|
2116
|
+
continue;
|
|
2108
2117
|
if (this.ENTRANCE_TYPES.has(action.type)) {
|
|
2109
2118
|
const target = this.resolveTarget(node, action, element);
|
|
2110
2119
|
if (target) {
|
|
@@ -2380,6 +2389,8 @@ class InteractionEngineService {
|
|
|
2380
2389
|
const leaveHandler = () => {
|
|
2381
2390
|
// Reverse animations on leave for hover triggers
|
|
2382
2391
|
for (const action of ix.actions) {
|
|
2392
|
+
if (!isActionEnabled(action))
|
|
2393
|
+
continue;
|
|
2383
2394
|
// Context actions have no "backwards" — the shared table decides what leave does
|
|
2384
2395
|
// (clear, unless the action sets noReverse). Same call the SSR engine makes.
|
|
2385
2396
|
if (isContextAction(action)) {
|
|
@@ -2402,6 +2413,8 @@ class InteractionEngineService {
|
|
|
2402
2413
|
// ── Actions ──────────────────────────────────────────────
|
|
2403
2414
|
runActions(node, actions, selfEl) {
|
|
2404
2415
|
for (const action of actions) {
|
|
2416
|
+
if (!isActionEnabled(action))
|
|
2417
|
+
continue; // switched off by the author
|
|
2405
2418
|
if (this.SWIPER_ACTIONS.has(action.type)) {
|
|
2406
2419
|
this.executeSwiperAction(action);
|
|
2407
2420
|
continue;
|
|
@@ -6321,7 +6334,12 @@ class BuilderRepeaterComponent {
|
|
|
6321
6334
|
}
|
|
6322
6335
|
ngOnInit() {
|
|
6323
6336
|
this.bindingSub = this.panelEventService.subscribe(event => {
|
|
6324
|
-
|
|
6337
|
+
// A binding OR an interaction change on a template node must re-clone the preview rows.
|
|
6338
|
+
// Interactions matter because clones are attached by ELEMENT at render time, so a newly
|
|
6339
|
+
// added interaction never reaches an existing clone — it would appear to work only after
|
|
6340
|
+
// a save + reload. See element-context-state-plan.md.
|
|
6341
|
+
if (event.type !== PanelEventTypes.BINDING_CHANGED
|
|
6342
|
+
&& event.type !== PanelEventTypes.INTERACTION_CHANGED)
|
|
6325
6343
|
return;
|
|
6326
6344
|
const changedNode = event.data?.node;
|
|
6327
6345
|
if (!changedNode || !this.items.length)
|