@vectoriox/iox-builder 2.3.4 → 2.4.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.
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { ComponentRef, Type, ChangeDetectorRef, OnInit, AfterViewInit, OnChanges, OnDestroy, EventEmitter, ElementRef, ApplicationRef, SimpleChanges, ViewContainerRef, Injector, EnvironmentInjector, InjectionToken, TemplateRef, AfterContentInit, QueryList } from '@angular/core';
|
|
3
|
+
import * as i28 from '@vectoriox/iox-ui';
|
|
4
|
+
import { RelativeSourceSpec, DataSourceEndpoints } from '@vectoriox/iox-ui';
|
|
5
|
+
export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
|
|
3
6
|
import * as rxjs from 'rxjs';
|
|
4
7
|
import { Subject, Subscription, BehaviorSubject, Observable } from 'rxjs';
|
|
5
8
|
import * as _vectoriox_iox_builder from '@vectoriox/iox-builder';
|
|
6
9
|
import * as i23 from 'primeng/popover';
|
|
7
10
|
import { Popover } from 'primeng/popover';
|
|
8
11
|
import { HttpClient } from '@angular/common/http';
|
|
9
|
-
import * as i28 from '@vectoriox/iox-ui';
|
|
10
|
-
import { DataSourceEndpoints } from '@vectoriox/iox-ui';
|
|
11
|
-
export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
|
|
12
12
|
import * as i20 from '@angular/cdk/drag-drop';
|
|
13
13
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
14
14
|
import * as i18 from '@angular/common';
|
|
@@ -69,11 +69,15 @@ declare enum DataSourceType {
|
|
|
69
69
|
Static = "static",
|
|
70
70
|
/** A VIEW into another variable: `{ from: <alias>, path }` (e.g. galleryImages = product.gallery).
|
|
71
71
|
* Resolves to the value one (or more) level(s) into a parent variable — page-scoped. */
|
|
72
|
-
Derived = "derived"
|
|
72
|
+
Derived = "derived",
|
|
73
|
+
/** A ROUTE-CONTEXT value derived from the current route item — `$route`/`$current`/`$siblings`/
|
|
74
|
+
* `$related`. Not fetched: computed by the shared `computeRelative` from other resolved sources.
|
|
75
|
+
* See relative-data-sources-plan.md. */
|
|
76
|
+
Relative = "relative"
|
|
73
77
|
}
|
|
74
78
|
interface IoxDataSource {
|
|
75
79
|
id: string;
|
|
76
|
-
type: 'cms' | 'shop' | 'internal-api' | 'external-api' | 'static' | 'derived';
|
|
80
|
+
type: 'cms' | 'shop' | 'internal-api' | 'external-api' | 'static' | 'derived' | 'relative';
|
|
77
81
|
mode: 'single' | 'query';
|
|
78
82
|
alias: string;
|
|
79
83
|
request: {
|
|
@@ -84,6 +88,9 @@ interface IoxDataSource {
|
|
|
84
88
|
from: string;
|
|
85
89
|
path: string;
|
|
86
90
|
};
|
|
91
|
+
/** `relative` alias: a route-context computation (kind + from/subjectFrom/sortBy/matchFields…),
|
|
92
|
+
* resolved by the shared `computeRelative`. */
|
|
93
|
+
relative?: RelativeSourceSpec;
|
|
87
94
|
cms?: {
|
|
88
95
|
contentType: string;
|
|
89
96
|
filter?: any;
|
|
@@ -1800,8 +1807,14 @@ declare class BuilderDataSourceService {
|
|
|
1800
1807
|
fetchRepeaterItems(ds: IoxDataSource | undefined, sourcePath?: string): Observable<any[]>;
|
|
1801
1808
|
/**
|
|
1802
1809
|
* Resolve a data source BY ALIAS, following `derived` aliases (a VIEW into another variable:
|
|
1803
|
-
* resolve the parent, then getByPath)
|
|
1804
|
-
*
|
|
1810
|
+
* resolve the parent, then getByPath) and `relative` aliases (route-context — `$current`/
|
|
1811
|
+
* `$siblings`/`$related`). `findByAlias` is injected so this module stays registry-free (the caller
|
|
1812
|
+
* passes its own page-scoped registry). Recurses for chained aliases.
|
|
1813
|
+
*
|
|
1814
|
+
* The builder is design time: `relative` sources resolve their dependency aliases (subject +
|
|
1815
|
+
* collection) — a single source falls back to its `defaultId`, a list to the whole collection —
|
|
1816
|
+
* then run the SHARED `computeRelative`, so the canvas shows the SAME neighbours the SSR engine
|
|
1817
|
+
* bakes into the live page. `$route` has no live params at design time → `{}`.
|
|
1805
1818
|
*/
|
|
1806
1819
|
fetchByAlias(alias: string, findByAlias: (a: string) => IoxDataSource | undefined): Observable<any>;
|
|
1807
1820
|
/** Repeater items for an alias (follows derived aliases + applies an optional sourcePath). */
|