@vectoriox/iox-builder 2.10.4 → 2.11.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.
|
@@ -17,7 +17,7 @@ import { SelectModule } from 'primeng/select';
|
|
|
17
17
|
import { TooltipModule } from 'primeng/tooltip';
|
|
18
18
|
import { DialogModule } from 'primeng/dialog';
|
|
19
19
|
import * as i16 from '@vectoriox/iox-ui';
|
|
20
|
-
import { DEFAULT_WIDTH_BY_TYPE, ComponentInstanceRegistryService, buildTargetedStateSelector, compileDeclarations, safeSetInput, composeVirtualTraits, IS_PREVIEW, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, IoxPageModule } from '@vectoriox/iox-ui';
|
|
20
|
+
import { DEFAULT_WIDTH_BY_TYPE, ComponentInstanceRegistryService, buildTargetedStateSelector, compileDeclarations, safeSetInput, composeVirtualTraits, IS_PREVIEW, resolvePath, planDataSource, dataSourcePlanToRequest, normalizeCollectionResult, resolveRepeaterItems, getByPath, computeRelative, IoxPageModule } from '@vectoriox/iox-ui';
|
|
21
21
|
export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
|
|
22
22
|
import Lenis from 'lenis';
|
|
23
23
|
import { Subject, BehaviorSubject, of, forkJoin } from 'rxjs';
|
|
@@ -74,6 +74,11 @@ const INVERSE_ACTION = {
|
|
|
74
74
|
moveDown: 'moveUp',
|
|
75
75
|
moveLeft: 'moveRight',
|
|
76
76
|
moveRight: 'moveLeft',
|
|
77
|
+
// Click-toggle only: click sets the slot, click again clears it. This map does NOT drive
|
|
78
|
+
// hover-leave — that runs the same actions on a reverse pass, whose context semantics live in
|
|
79
|
+
// `contextActionEffect` (@vectoriox/iox-ui).
|
|
80
|
+
setContext: 'clearContext',
|
|
81
|
+
clearContext: 'setContext',
|
|
77
82
|
};
|
|
78
83
|
const TRIGGER_OPTIONS = [
|
|
79
84
|
{ value: 'pageLoad', label: 'Page load', icon: 'ph-thin ph-play' },
|
|
@@ -97,6 +102,8 @@ const ACTION_TYPE_OPTIONS = [
|
|
|
97
102
|
{ value: 'show', label: 'Show' },
|
|
98
103
|
{ value: 'hide', label: 'Hide' },
|
|
99
104
|
{ value: 'toggleVisibility', label: 'Toggle visibility' },
|
|
105
|
+
{ value: 'setContext', label: 'Set context' },
|
|
106
|
+
{ value: 'clearContext', label: 'Clear context' },
|
|
100
107
|
];
|
|
101
108
|
const EASING_OPTIONS$1 = ['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out'];
|
|
102
109
|
/** Interaction pseudo-classes — compiled to .iox-node-{id}:state */
|
|
@@ -5943,27 +5950,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
5943
5950
|
type: Output
|
|
5944
5951
|
}] } });
|
|
5945
5952
|
|
|
5946
|
-
/**
|
|
5947
|
-
* Resolves a dot-notation path (with optional array bracket notation) against an object.
|
|
5948
|
-
* Examples: 'title', 'author.name', 'tags[0]', 'items[2].title'
|
|
5949
|
-
*/
|
|
5950
|
-
function resolvePath(obj, path) {
|
|
5951
|
-
// Empty path (or `$`) means "the value itself" — used to bind to an item that IS a primitive
|
|
5952
|
-
// (e.g. a Repeater over `gallery: string[]`, where each item is the URL string). See
|
|
5953
|
-
// binding-panel-redesign-plan.md.
|
|
5954
|
-
if (path === '' || path === '$' || path == null)
|
|
5955
|
-
return obj;
|
|
5956
|
-
return path.split('.').reduce((current, key) => {
|
|
5957
|
-
if (current == null)
|
|
5958
|
-
return undefined;
|
|
5959
|
-
const bracketMatch = key.match(/^(\w+)\[(\d+)]$/);
|
|
5960
|
-
if (bracketMatch) {
|
|
5961
|
-
const arr = current[bracketMatch[1]];
|
|
5962
|
-
return Array.isArray(arr) ? arr[parseInt(bracketMatch[2], 10)] : undefined;
|
|
5963
|
-
}
|
|
5964
|
-
return current[key];
|
|
5965
|
-
}, obj);
|
|
5966
|
-
}
|
|
5967
5953
|
/**
|
|
5968
5954
|
* Deep-clones a ComponentNode tree and overrides trait defaults
|
|
5969
5955
|
* according to each node's bindings resolved against `item`.
|