@vectoriox/iox-ui 5.42.0 → 5.43.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/data-core/index.d.ts +360 -0
- package/data-core/package.json +3 -0
- package/design-core/index.d.ts +19 -2
- package/fesm2022/vectoriox-iox-ui-data-core.mjs +491 -0
- package/fesm2022/vectoriox-iox-ui-data-core.mjs.map +1 -0
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +40 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +3 -475
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/index.d.ts +3 -360
- package/package.json +5 -1
- package/src/data-core/data-source-resolver.ts +378 -0
- package/src/data-core/public-api.ts +12 -0
- package/src/data-core/relative-sources.ts +282 -0
- package/src/design-core/design-apply.ts +56 -3
package/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { VideoPlan } from '@vectoriox/iox-ui/media-core';
|
|
|
10
10
|
import { SliderWords } from '@vectoriox/iox-ui/composite-core';
|
|
11
11
|
import { OpenerNodeLike } from '@vectoriox/iox-ui/actions-core';
|
|
12
12
|
export * from '@vectoriox/iox-ui/design-core';
|
|
13
|
+
export * from '@vectoriox/iox-ui/data-core';
|
|
13
14
|
|
|
14
15
|
declare class ViewPositionDirective implements AfterViewInit {
|
|
15
16
|
private _elr;
|
|
@@ -2274,364 +2275,6 @@ declare function resetPageStyleField<T extends Partial<PageStyleSettings>>(style
|
|
|
2274
2275
|
*/
|
|
2275
2276
|
declare function compilePageStyle(style: Partial<PageStyleSettings> | null | undefined, options?: PageStyleOptions): Record<string, string>;
|
|
2276
2277
|
|
|
2277
|
-
/**
|
|
2278
|
-
* Shared data-source resolving pattern — the SINGLE source of truth for how an IoxDataSource
|
|
2279
|
-
* becomes a backend fetch, consumed by BOTH the page builder (iox-cms-client bindings panel) and
|
|
2280
|
-
* the SSR client engine (iox-client-engine DataSourceResolverService). There must be no second
|
|
2281
|
-
* copy of this decision logic; only the transport differs between the two:
|
|
2282
|
-
*
|
|
2283
|
-
* builder → authenticated org-scoped controllers (admin session):
|
|
2284
|
-
* single by id → GET admin.../resources/:type/:id (ContentService.getContentById)
|
|
2285
|
-
* collection → GET admin.../resources/:type (ContentService.getContent)
|
|
2286
|
-
* engine → @Public() controllers (no auth, isPublished filter applied server-side):
|
|
2287
|
-
* single by id → GET api/:type/:id (UserResourcesController)
|
|
2288
|
-
* collection → GET api/:type?filters (UserResourcesController)
|
|
2289
|
-
*
|
|
2290
|
-
* The DECISION (by-id vs collection, which id, which filters, how to pick the single result) is
|
|
2291
|
-
* identical for both — that's what this module owns. Each app maps the returned {@link DataSourcePlan}
|
|
2292
|
-
* onto its own transport. A single item is ALWAYS fetched by its id as a path segment — never a
|
|
2293
|
-
* `?_id=` query — to match the builder's getContentById.
|
|
2294
|
-
*/
|
|
2295
|
-
type DataSourceMode = 'single' | 'list';
|
|
2296
|
-
type DataSourceDomain = 'cms' | 'shop';
|
|
2297
|
-
interface DataSourceRouteFilter {
|
|
2298
|
-
field?: string;
|
|
2299
|
-
routeParam?: string;
|
|
2300
|
-
defaultId?: string;
|
|
2301
|
-
}
|
|
2302
|
-
interface DataSourceQueryFilter {
|
|
2303
|
-
field?: string;
|
|
2304
|
-
/** URL query param the value is read from. OMIT for a CONSTANT filter — then `defaultValue`
|
|
2305
|
-
* alone is the value, so `isReviewShow=true` filters identically in preview and on the site. */
|
|
2306
|
-
queryParam?: string;
|
|
2307
|
-
/** Value used when the query param is absent — i.e. always, for a constant filter, and in the
|
|
2308
|
-
* builder preview, where there are no live query params. NOT preview-only: it is the runtime
|
|
2309
|
-
* fallback too. An empty default with no query-param value means the filter is DROPPED. */
|
|
2310
|
-
defaultValue?: string;
|
|
2311
|
-
}
|
|
2312
|
-
/** The order a query source returns its rows in (CC2, board 4 "Sort" — the data source popover). */
|
|
2313
|
-
declare enum DataSourceSortDir {
|
|
2314
|
-
Asc = "asc",
|
|
2315
|
-
Desc = "desc"
|
|
2316
|
-
}
|
|
2317
|
-
interface DataSourceSort {
|
|
2318
|
-
/** A field of the content type (a dot path into a nested object is allowed). */
|
|
2319
|
-
field?: string;
|
|
2320
|
-
dir?: DataSourceSortDir | `${DataSourceSortDir}`;
|
|
2321
|
-
}
|
|
2322
|
-
/** The query parameter carrying the order: `sort=order` ascending, `sort=-order` descending. A CONTROL like
|
|
2323
|
-
* `limit`, not a field filter — the public controllers split it out (iox-cms `query-controls.ts`). */
|
|
2324
|
-
declare const SORT_PARAM = "sort";
|
|
2325
|
-
/** `sort`'s wire value, or null when the source sets no (valid) order. */
|
|
2326
|
-
declare function sortParamValue(sort: DataSourceSort | null | undefined): string | null;
|
|
2327
|
-
interface DataSourceRequestSpec {
|
|
2328
|
-
contentType?: string;
|
|
2329
|
-
limit?: number;
|
|
2330
|
-
/** A query source's order (CC2). Absent = the backend's natural order, as before. */
|
|
2331
|
-
sort?: DataSourceSort;
|
|
2332
|
-
filterByRouteParam?: DataSourceRouteFilter;
|
|
2333
|
-
filterByQueryParams?: DataSourceQueryFilter[];
|
|
2334
|
-
}
|
|
2335
|
-
/** Structural (duck-typed) view of an IoxDataSource — kept free of the editor model so both libs
|
|
2336
|
-
* can depend on it without pulling in iox-builder. */
|
|
2337
|
-
interface DataSourceSpec {
|
|
2338
|
-
alias?: string;
|
|
2339
|
-
type?: string;
|
|
2340
|
-
mode?: DataSourceMode;
|
|
2341
|
-
request?: {
|
|
2342
|
-
cms?: DataSourceRequestSpec;
|
|
2343
|
-
shop?: DataSourceRequestSpec;
|
|
2344
|
-
endpoint?: string;
|
|
2345
|
-
data?: any;
|
|
2346
|
-
/** `derived` alias: a VIEW into another variable — resolve `from` then getByPath(value, path)
|
|
2347
|
-
* (e.g. galleryImages = product.gallery). See repeater-binding-ux-plan.md. */
|
|
2348
|
-
derived?: {
|
|
2349
|
-
from: string;
|
|
2350
|
-
path: string;
|
|
2351
|
-
};
|
|
2352
|
-
};
|
|
2353
|
-
}
|
|
2354
|
-
type DataSourcePlan = {
|
|
2355
|
-
kind: 'by-id';
|
|
2356
|
-
domain: DataSourceDomain;
|
|
2357
|
-
resource: string;
|
|
2358
|
-
id: string;
|
|
2359
|
-
mode: DataSourceMode;
|
|
2360
|
-
} | {
|
|
2361
|
-
kind: 'collection';
|
|
2362
|
-
domain: DataSourceDomain;
|
|
2363
|
-
resource: string;
|
|
2364
|
-
filter: Record<string, any>;
|
|
2365
|
-
limit?: number;
|
|
2366
|
-
sort?: string;
|
|
2367
|
-
mode: DataSourceMode;
|
|
2368
|
-
} | {
|
|
2369
|
-
kind: 'external';
|
|
2370
|
-
endpoint: string;
|
|
2371
|
-
mode: DataSourceMode;
|
|
2372
|
-
} | {
|
|
2373
|
-
kind: 'static';
|
|
2374
|
-
data: any;
|
|
2375
|
-
mode: DataSourceMode;
|
|
2376
|
-
} | {
|
|
2377
|
-
kind: 'derived';
|
|
2378
|
-
from: string;
|
|
2379
|
-
path: string;
|
|
2380
|
-
mode: DataSourceMode;
|
|
2381
|
-
} | {
|
|
2382
|
-
kind: 'none';
|
|
2383
|
-
};
|
|
2384
|
-
/**
|
|
2385
|
-
* Match a page route template against an actual path and extract named params.
|
|
2386
|
-
* matchRouteParams('/project/:projectId', 'project/68abc') → { projectId: '68abc' }
|
|
2387
|
-
* Both sides are normalised (leading slash stripped) and split on '/'; values are URL-decoded.
|
|
2388
|
-
*/
|
|
2389
|
-
declare function matchRouteParams(template: string | undefined, actual: string | undefined): Record<string, string>;
|
|
2390
|
-
/**
|
|
2391
|
-
* Build the query filter for a data-source request from its filterByRouteParam / filterByQueryParams
|
|
2392
|
-
* config. `field` is filtered by the route-param value (falling back to `defaultId`); query filters
|
|
2393
|
-
* map each `field` to a query-param value (falling back to `defaultValue`), and a filter with NO
|
|
2394
|
-
* `queryParam` is a constant on `defaultValue`. Empty values are omitted so the source isn't
|
|
2395
|
-
* accidentally filtered to nothing.
|
|
2396
|
-
*/
|
|
2397
|
-
declare function buildDataSourceFilter(req: DataSourceRequestSpec | undefined, routeParams?: Record<string, any>, queryParams?: Record<string, any>): Record<string, any>;
|
|
2398
|
-
/**
|
|
2399
|
-
* Mirrors the builder's getContentById decision. When a SINGLE source is filtered by the item id
|
|
2400
|
-
* (`_id`) via a route param, the item is fetched by PATH (`.../:type/:id`), not a `?_id=` query.
|
|
2401
|
-
* Returns that id (route-param value, else `defaultId`), or `null` when the source isn't a
|
|
2402
|
-
* single-by-id fetch — in which case the caller uses the collection endpoint + filters. The
|
|
2403
|
-
* path-based form only applies to the id field; a single source filtered by any other field still
|
|
2404
|
-
* goes through the collection endpoint.
|
|
2405
|
-
*/
|
|
2406
|
-
declare function resolveSingleItemId(req: DataSourceRequestSpec | undefined, routeParams?: Record<string, any>): string | null;
|
|
2407
|
-
/**
|
|
2408
|
-
* Resolve an IoxDataSource into a transport-agnostic {@link DataSourcePlan}. This is the shared
|
|
2409
|
-
* decision both the builder and the SSR engine run; each then executes the plan with its own
|
|
2410
|
-
* HTTP layer. Single sources with a route-param id resolve to a `by-id` (path) fetch — exactly like
|
|
2411
|
-
* the builder's getContentById.
|
|
2412
|
-
*/
|
|
2413
|
-
declare function planDataSource(ds: DataSourceSpec | undefined, routeParams?: Record<string, any>, queryParams?: Record<string, any>): DataSourcePlan;
|
|
2414
|
-
/**
|
|
2415
|
-
* The aliases on a page that are VARIABLES — runtime-written resources, not fetched data.
|
|
2416
|
-
*
|
|
2417
|
-
* Shared so the builder and the SSR engine agree on which aliases start empty and are filled by
|
|
2418
|
-
* interactions. See element-context-state-plan.md.
|
|
2419
|
-
*/
|
|
2420
|
-
declare function variableAliases(dataSources: readonly {
|
|
2421
|
-
alias?: string;
|
|
2422
|
-
type?: string;
|
|
2423
|
-
}[] | undefined): Set<string>;
|
|
2424
|
-
/** The source alias whose items a variable holds, if it declares one (for field suggestions). */
|
|
2425
|
-
declare function variableItemsFrom(dataSources: readonly {
|
|
2426
|
-
alias?: string;
|
|
2427
|
-
type?: string;
|
|
2428
|
-
request?: any;
|
|
2429
|
-
}[] | undefined, alias: string): string | undefined;
|
|
2430
|
-
/**
|
|
2431
|
-
* Normalise a collection response into the shape a source expects: unwraps `{items}`/`{data}`
|
|
2432
|
-
* envelopes, then returns the first item for a `single` source or the whole array for a `list`.
|
|
2433
|
-
* A `by-id` response is already the item, so callers pass it through unchanged.
|
|
2434
|
-
*/
|
|
2435
|
-
declare function normalizeCollectionResult(mode: DataSourceMode, data: any): any;
|
|
2436
|
-
/** Navigate a dot/bracket path into an object, e.g. `gallery`, `details.images`, `variants[0].skus`.
|
|
2437
|
-
* Returns undefined if any segment is missing. Kept minimal + self-contained so it is shareable by
|
|
2438
|
-
* both the builder and the SSR engine (the two have divergent local `resolvePath` copies). */
|
|
2439
|
-
declare function getByPath(obj: any, path: string): any;
|
|
2440
|
-
/**
|
|
2441
|
-
* The array a Repeater (or a repeating Slider) iterates over — the SHARED decision so the builder
|
|
2442
|
-
* canvas and the SSR engine agree (see data-source-resolving.md).
|
|
2443
|
-
* - No `sourcePath`: the resolved source IS the list. An array passes through; a lone object degrades
|
|
2444
|
-
* to a single-row list (back-compat with the old `fetchItems`); null/undefined → `[]`.
|
|
2445
|
-
* - With `sourcePath`: the source resolved to a SINGLE resource (e.g. a product); dive into the
|
|
2446
|
-
* nested array property (e.g. `gallery`). Non-array / missing → `[]`.
|
|
2447
|
-
*/
|
|
2448
|
-
/**
|
|
2449
|
-
* Fill in `derived` aliases in an already-resolved map. Given the data sources and a map of resolved
|
|
2450
|
-
* NON-derived values (by alias), compute each `type:'derived'` alias as `getByPath(parent, path)` in
|
|
2451
|
-
* dependency order (chains resolved by iterating until stable). Mutates + returns the map. Used by the
|
|
2452
|
-
* SSR engine after it resolves the root sources; the builder resolves derived lazily per alias.
|
|
2453
|
-
*/
|
|
2454
|
-
declare function resolveDerivedInto(dataSources: DataSourceSpec[], resolved: Record<string, any>): Record<string, any>;
|
|
2455
|
-
declare function resolveRepeaterItems(resolved: any, sourcePath?: string | null): any[];
|
|
2456
|
-
/** Aliases referenced anywhere in a node tree: a repeater/slider `source` (a `bindings` entry with
|
|
2457
|
-
* `prop === 'source'`, or `props.source` for the slider) plus every binding's `source`. */
|
|
2458
|
-
declare function collectReferencedAliases(nodes: any[], acc?: Set<string>): Set<string>;
|
|
2459
|
-
/** The subset of `all` whose `alias` is referenced by `nodes` (shallow — direct references only). */
|
|
2460
|
-
declare function referencedDataSources(nodes: any[], all: any[]): any[];
|
|
2461
|
-
/** Like `referencedDataSources`, but also pulls in a referenced source's DEPENDENCIES (transitively),
|
|
2462
|
-
* none of which the layout names directly:
|
|
2463
|
-
* - a `derived` alias needs its `request.derived.from` parent;
|
|
2464
|
-
* - a `relative` (route-context) alias needs its `request.relative.subjectFrom` (the current item)
|
|
2465
|
-
* and `request.relative.from` (the collection it navigates).
|
|
2466
|
-
* Use this when RESOLVING (the engine) so derived views and siblings/related don't resolve to nothing. */
|
|
2467
|
-
declare function referencedDataSourcesDeep(nodes: any[], all: any[]): any[];
|
|
2468
|
-
/** Base URLs for the PUBLIC content controllers. Both must end with `/`. The builder and the SSR
|
|
2469
|
-
* engine pass their own host (they proxy `/api` differently) but MUST target the public
|
|
2470
|
-
* (`@Public()`) controllers, never the authed admin ones — data resolving is storefront data. */
|
|
2471
|
-
interface DataSourceEndpoints {
|
|
2472
|
-
/** cms resources, e.g. `${HOST}` (engine, HOST ends `/api/`) or `${HOST}api/` (builder). */
|
|
2473
|
-
cmsBase: string;
|
|
2474
|
-
/** shop resources, e.g. `${HOST}shop/` (engine) or `${HOST}api/shop/` (builder). */
|
|
2475
|
-
shopBase: string;
|
|
2476
|
-
}
|
|
2477
|
-
interface DataSourceRequest {
|
|
2478
|
-
url: string;
|
|
2479
|
-
params: Record<string, any>;
|
|
2480
|
-
}
|
|
2481
|
-
/**
|
|
2482
|
-
* Turn a resolved {@link DataSourcePlan} into the concrete public HTTP request (url + params) — the
|
|
2483
|
-
* SINGLE place that decides the URL shape, shared by the builder binding preview and the SSR engine
|
|
2484
|
-
* so both hit the SAME public endpoints (no admin, no duplication). Returns `null` for `static` /
|
|
2485
|
-
* `none` plans (no HTTP call). A single item is a PATH segment (`/:resource/:id`), never `?_id=`.
|
|
2486
|
-
*/
|
|
2487
|
-
declare function dataSourcePlanToRequest(plan: DataSourcePlan, endpoints: DataSourceEndpoints): DataSourceRequest | null;
|
|
2488
|
-
|
|
2489
|
-
/**
|
|
2490
|
-
* Shared RELATIVE (route-context) data resolving — the SINGLE source of truth for how a detail page
|
|
2491
|
-
* derives values FROM its current route item, consumed by BOTH the page builder (iox-cms-client) and
|
|
2492
|
-
* the SSR client engine (iox-client-engine). Companion to `data-source-resolver.ts`.
|
|
2493
|
-
*
|
|
2494
|
-
* These are the pure, transport-agnostic pieces behind the Route binding scope
|
|
2495
|
-
* (`$route` / `$current` / `$siblings` / `$related`). Resolution is a DEPENDENT SECOND PASS: the
|
|
2496
|
-
* consumer resolves `$current` first (the existing single by-id fetch via `planDataSource`), then
|
|
2497
|
-
* calls these to derive the relative values — there is NO new `DataSourcePlan` kind (`$related` still
|
|
2498
|
-
* feeds a normal `collection` plan built from {@link buildRelatedFilter}). See
|
|
2499
|
-
* `architecture/builder/relative-data-sources-plan.md`.
|
|
2500
|
-
*
|
|
2501
|
-
* There must be no second copy of this decision logic; only the transport (which HTTP layer fetches
|
|
2502
|
-
* the ordered collection / related list) differs between the two consumers.
|
|
2503
|
-
*/
|
|
2504
|
-
/** Aliases in the Route scope are platform-owned and start with this prefix; a USER alias may never
|
|
2505
|
-
* start with it, which keeps the Route scope structurally collision-proof with Local/Global. Used to
|
|
2506
|
-
* validate new/renamed aliases and to render the reserved (read-only) item state in the bind picker. */
|
|
2507
|
-
declare const RESERVED_ALIAS_PREFIX = "$";
|
|
2508
|
-
/** True for a platform-owned Route-scope alias (`$route`, `$current`, `$siblings`, `$related`, …). */
|
|
2509
|
-
declare function isReservedAlias(alias: string | null | undefined): boolean;
|
|
2510
|
-
/** The `$siblings` value: the current item's neighbours within an ordered set. */
|
|
2511
|
-
interface SiblingsResult<T = any> {
|
|
2512
|
-
/** The item before the current one (`null` at the start, unless `wrap`). */
|
|
2513
|
-
prev: T | null;
|
|
2514
|
-
/** The item after the current one (`null` at the end, unless `wrap`). */
|
|
2515
|
-
next: T | null;
|
|
2516
|
-
/** Zero-based position of the current item in the ordered set; `-1` when not found. */
|
|
2517
|
-
index: number;
|
|
2518
|
-
/** Total items in the set. */
|
|
2519
|
-
count: number;
|
|
2520
|
-
/** `true` when the current item is the first in the set. */
|
|
2521
|
-
isFirst: boolean;
|
|
2522
|
-
/** `true` when the current item is the last in the set. */
|
|
2523
|
-
isLast: boolean;
|
|
2524
|
-
}
|
|
2525
|
-
interface ResolveSiblingsOptions {
|
|
2526
|
-
/** Field identifying the current item within the list. Default `_id`. */
|
|
2527
|
-
idField?: string;
|
|
2528
|
-
/** Dot/bracket path to sort by BEFORE locating neighbours (e.g. `order`, `date`). Omit to use the
|
|
2529
|
-
* list's existing order. The same item neighbours differently per ordering, so this is the one
|
|
2530
|
-
* choice `$siblings` requires. */
|
|
2531
|
-
sortBy?: string;
|
|
2532
|
-
/** Sort direction when `sortBy` is set. Default `asc`. */
|
|
2533
|
-
sortDir?: 'asc' | 'desc';
|
|
2534
|
-
/** Wrap around the ends (`last.next` → first, `first.prev` → last). Only applies when `count > 1`.
|
|
2535
|
-
* Default `false`. */
|
|
2536
|
-
wrap?: boolean;
|
|
2537
|
-
}
|
|
2538
|
-
/**
|
|
2539
|
-
* Locate the current item within an ordered set and return its neighbours + position. Pure: the input
|
|
2540
|
-
* list is never mutated (sorting works on a shallow copy). `currentId` is compared to each item's
|
|
2541
|
-
* `idField` via string equality (route-param values are strings). When the current id isn't found,
|
|
2542
|
-
* `index` is `-1` and `prev`/`next` are `null` (but `count` still reflects the set size).
|
|
2543
|
-
*/
|
|
2544
|
-
declare function resolveSiblings<T = any>(items: T[] | null | undefined, currentId: string | number | null | undefined, options?: ResolveSiblingsOptions): SiblingsResult<T>;
|
|
2545
|
-
interface BuildRelatedFilterOptions {
|
|
2546
|
-
/** Field(s) on the current item whose value(s) the related items must match (e.g. `category`,
|
|
2547
|
-
* or `['category', 'brand']`). Each contributes an equality filter on that field. */
|
|
2548
|
-
matchFields: string | string[];
|
|
2549
|
-
}
|
|
2550
|
-
/**
|
|
2551
|
-
* Build the collection filter for `$related` from the resolved current item: an equality match on
|
|
2552
|
-
* each `matchField`'s value (e.g. same `category`). Feeds a normal `collection` plan — no new plan
|
|
2553
|
-
* kind. Fields whose value is not a scalar (or is empty) are omitted, matching
|
|
2554
|
-
* `buildDataSourceFilter`'s "don't over-filter" rule. Exclude-self is applied to the RESULT via
|
|
2555
|
-
* {@link excludeSelf} (the public query controllers are equality-only, so it can't be a `$ne` param).
|
|
2556
|
-
*/
|
|
2557
|
-
declare function buildRelatedFilter(current: any, options: BuildRelatedFilterOptions): Record<string, any>;
|
|
2558
|
-
/**
|
|
2559
|
-
* Drop the current item from a list by `idField` (default `_id`). Used to exclude self from a
|
|
2560
|
-
* `$related` result after fetch. A nullish/empty `currentId` leaves the list unchanged.
|
|
2561
|
-
*/
|
|
2562
|
-
declare function excludeSelf<T = any>(items: T[] | null | undefined, currentId: string | number | null | undefined, idField?: string): T[];
|
|
2563
|
-
/** The resolved Route-scope context bound values read from (`$route.projectId`, `$current.title`,
|
|
2564
|
-
* `$siblings.next`, `$related`). Assembled by each consumer during its dependent second pass. */
|
|
2565
|
-
interface RouteContext {
|
|
2566
|
-
/** Route path params for the current URL (from `matchRouteParams`). */
|
|
2567
|
-
$route: Record<string, string>;
|
|
2568
|
-
/** The resolved current item (the page's single by-id source). */
|
|
2569
|
-
$current: any;
|
|
2570
|
-
/** Neighbours of the current item within a chosen ordered set. */
|
|
2571
|
-
$siblings?: SiblingsResult;
|
|
2572
|
-
/** Items related to the current one (same-attribute), excluding self. */
|
|
2573
|
-
$related?: any[];
|
|
2574
|
-
}
|
|
2575
|
-
type RelativeSourceKind = 'route' | 'current' | 'siblings' | 'related';
|
|
2576
|
-
interface RelativeSourceSpec {
|
|
2577
|
-
kind: RelativeSourceKind;
|
|
2578
|
-
/** The source alias this derives from: for `current` the subject single-source; for
|
|
2579
|
-
* `siblings`/`related` the COLLECTION alias to locate within / search. Unused for `route`. */
|
|
2580
|
-
from?: string;
|
|
2581
|
-
/** `siblings`/`related`: the SUBJECT source alias (the current item) whose id / field values drive
|
|
2582
|
-
* the computation. Defaults to `from` when omitted. May reference `$current`. */
|
|
2583
|
-
subjectFrom?: string;
|
|
2584
|
-
/** Field identifying an item. Default `_id`. */
|
|
2585
|
-
idField?: string;
|
|
2586
|
-
/** `siblings`: sort the set before locating neighbours. */
|
|
2587
|
-
sortBy?: string;
|
|
2588
|
-
sortDir?: 'asc' | 'desc';
|
|
2589
|
-
wrap?: boolean;
|
|
2590
|
-
/** `siblings`: resolve to a SINGLE neighbour ITEM (`next`/`prev`) instead of the whole
|
|
2591
|
-
* `{prev,next,index,count,…}` object — so a source can be named e.g. `nextProject` and bound
|
|
2592
|
-
* directly (`nextProject.route`). Omit for the whole-object shape. */
|
|
2593
|
-
pick?: 'next' | 'prev';
|
|
2594
|
-
/** `related`: field(s) on the subject the results must match. */
|
|
2595
|
-
matchFields?: string | string[];
|
|
2596
|
-
/** `related`: drop the subject from its own results. Default `true`. */
|
|
2597
|
-
excludeSelf?: boolean;
|
|
2598
|
-
}
|
|
2599
|
-
/** Duck-typed view of a data source carrying an optional relative descriptor (avoids a hard dep on
|
|
2600
|
-
* the full editor model / a circular type import). */
|
|
2601
|
-
interface RelativeCapableSource {
|
|
2602
|
-
alias?: string;
|
|
2603
|
-
type?: string;
|
|
2604
|
-
request?: {
|
|
2605
|
-
relative?: RelativeSourceSpec;
|
|
2606
|
-
};
|
|
2607
|
-
}
|
|
2608
|
-
/** The already-resolved inputs a single relative source computes from. Assembled by each consumer:
|
|
2609
|
-
* the batch pass reads them from the resolved map; the builder resolves them async per alias. */
|
|
2610
|
-
interface RelativeInputs {
|
|
2611
|
-
/** The subject item (the current resource) — for `current`/`siblings`/`related`. */
|
|
2612
|
-
subject?: any;
|
|
2613
|
-
/** The collection to locate within / search — for `siblings`/`related`. */
|
|
2614
|
-
collection?: any;
|
|
2615
|
-
/** Route path params — for `route`. */
|
|
2616
|
-
routeParams?: Record<string, any>;
|
|
2617
|
-
}
|
|
2618
|
-
/**
|
|
2619
|
-
* Compute ONE relative source's value from its already-resolved {@link RelativeInputs} — the SHARED
|
|
2620
|
-
* kind→computation decision, so the batch pass ({@link resolveRelativeInto}) and the builder's async
|
|
2621
|
-
* per-alias resolver produce identical results with no forked switch. `route` → the route params;
|
|
2622
|
-
* `current` → the subject; `siblings` → {@link resolveSiblings} over the collection; `related` → the
|
|
2623
|
-
* collection filtered by {@link buildRelatedFilter}'s predicate (+ {@link excludeSelf}).
|
|
2624
|
-
*/
|
|
2625
|
-
declare function computeRelative(spec: RelativeSourceSpec, inputs: RelativeInputs): any;
|
|
2626
|
-
/**
|
|
2627
|
-
* Compute every `type:'relative'` source into `resolved` (keyed by alias), IN PLACE. Pure w.r.t. HTTP
|
|
2628
|
-
* — it only reads already-resolved roots + the route params, so both consumers run it identically as
|
|
2629
|
-
* a second pass. Delegates each source to {@link computeRelative}. `current`'s subject is `from`;
|
|
2630
|
-
* `siblings`/`related` take `collection` = `from` and `subject` = `subjectFrom ?? from`. Mutates and
|
|
2631
|
-
* returns `resolved`.
|
|
2632
|
-
*/
|
|
2633
|
-
declare function resolveRelativeInto(dataSources: RelativeCapableSource[], resolved: Record<string, any>, routeParams?: Record<string, any>): Record<string, any>;
|
|
2634
|
-
|
|
2635
2278
|
/**
|
|
2636
2279
|
* Binding pipes — render-time value transforms (UI label: "Filters").
|
|
2637
2280
|
*
|
|
@@ -3425,5 +3068,5 @@ declare class GalleryLoop {
|
|
|
3425
3068
|
private emit;
|
|
3426
3069
|
}
|
|
3427
3070
|
|
|
3428
|
-
export { A11yAttribute, A11yTrait, ACCESSIBLE_NAME_TYPES, AOSService, ARIA_CURRENT_PAGE, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, CURRENT_LINK_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ComponentState, ContainerComponent, ContextStore, DECORATIVE_TYPES, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DIALOG_CLOSE_ABOVE_ATTRIBUTE, DIALOG_NODE_TYPE,
|
|
3429
|
-
export type { A11yNodeSource, BoundValueSpec, BreakpointDef,
|
|
3071
|
+
export { A11yAttribute, A11yTrait, ACCESSIBLE_NAME_TYPES, AOSService, ARIA_CURRENT_PAGE, BACKDROP_TWIN_KEY, BACKDROP_WHOLE_KEY, BREAKPOINTS, Breakpoint, BreakpointQueryKind, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, COMPONENT_STATE_SELECTOR, CONTAINER_HTML_TAGS, CONTEXT_ACTION_TYPES, CURRENT_LINK_TYPES, CardComponent, ClientGalleryComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ComponentState, ContainerComponent, ContextStore, DECORATIVE_TYPES, DEFAULT_GALLERY_SCHEDULER, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_PHOSPHOR_WEIGHT, DEFAULT_WIDTH_BY_TYPE, DIALOG_CLOSE_ABOVE_ATTRIBUTE, DIALOG_NODE_TYPE, DeclarationContext, ENTRANCE_ACTION_TYPES, EXIT_ACTION_TYPES, FormRenderState, FormRuntimeService, GALLERY_EFFECTS, GALLERY_EFFECT_DESCRIPTORS, GalleryLoop, HOVER_DEFAULT_TRANSITION, HOVER_STATES, INTERACTION_HIDDEN_ATTRIBUTE, IOX_BUILDER_EVENTS, IOX_FORM_MESSAGES, IOX_FORM_NAVIGATOR, IOX_FORM_TRANSPORT, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxDialogComponent, IoxFieldComponent, IoxFormComponent, IoxFormErrorComponent, IoxFormSuccessComponent, IoxPageComponent, IoxPageModule, IoxSubmitButtonComponent, IoxUiModule, IoxVideoComponent, LAST_EMITTED_STATES, LEGACY_DIRECTION_KEY, LEGACY_HOVER_TRANSITION, LEGACY_SWIPER_CONTROLS, LinkedContainerComponent, MANAGED_A11Y_ATTRIBUTES, MAX_LINES_KEY, NAMED_GROUP_ROLES, ON_STATE_ROLES, PAGE_STYLE_TOKENS, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PART_PAGINATION_MODIFIER, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PageStyleField, PageStyleSource, REDUCED_MOTION_QUERY, SLIDER_INPUTS_ATTRIBUTE, SLIDER_INPUT_NAMES, STATE_PSEUDO_CLASS, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, SWIPER_TRIGGER_EVENTS, SectionComponent, SwiperModuleName, TARGETED_STATE_SUFFIX, TEXT_ALIGN_KEY, TEXT_DIRECTION_KEY, TRANSITION_FEELS, TextAlign, TextBlockComponent, VALIDATION_STATES, VALIDATION_STATE_CLASS, VIRTUAL_TRAIT_GROUPS, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, VisibilityActionType, activeActions, applyBindingPipes, applyFeel, bootSlider, breakpointDef, breakpointForWidth, breakpointQueryFor, buildInteractionKeyframes, buildPartSelector, buildSwiperBreakpoints, buildTargetedStateSelector, buildTargetedSuffixSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, closeAboveMediaQuery, collectContextSlotKeys, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, declaredInputNames, decomposeBackdropFilter, defaultHoverTransition, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, domHasSliderParts, effectiveActionType, effectiveTransitionId, entrancePreStateStyle, feelFor, finalKeyframe, getSeoValue, hasHoverState, hasOwnTransition, initialSlotValues, isActionEnabled, isContextAction, isCurrentLink, isExternalOrFragment, isGradientPaint, isInputOverriddenAt, isLastEmittedStateKey, isOverriddenAt, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, legacyEnterToTransition, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, migrateLegacyTextAlign, motionAllowed, nearestCommonAncestorId, needsAccessibleName, needsGroupName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeGalleryImage, normalizeIconClass, orderStatesForEmit, parentBreakpoint, parseUrlList, partClassName, planResponsiveRules, planSwiperOptions, prefersReducedMotion, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveSeo, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, rewriteViewportUnits, safeSetInput, serializeA11yAttributes, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, sliderControlElements, sliderInputsFromProps, sliderInputsOf, stateNamesIn, statePseudoClass, stateSelectorSuffix, stripSuppressedProps, swiperAutoplayAllowed, swiperLoopOptions, swiperModuleNames, syncNodeA11yAttributes, targetedStateSelector, withContextSlots, withDefaultHoverTransition, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
3072
|
+
export type { A11yNodeSource, BoundValueSpec, BreakpointDef, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, CurrentLinkOptions, FormMessageResolver, GalleryBoundSource, GalleryDurations, GalleryEffect, GalleryEffectDescriptor, GalleryImage, GalleryLoopOptions, GalleryLoopScheduler, GalleryLoopState, GallerySlideState, IBuilderEventEmitter, InputMap, InteractionKeyframe, IoxContextSlot, IoxPipe, MatchMediaHost, NodeA11yContext, OverrideBreakpoint, PageStyleFieldState, PageStyleOptions, PageStyleSettings, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionOptions, PageTransitionPreset, PipeArgSpec, PipeContext, PipeDescriptor, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, SeoDerivedContent, SeoFieldSource, SeoFieldState, SeoResolveContext, SetContextParams, SliderBootOptions, SliderControlElements, SliderInputs, StateStyleMap, StyleMap, StyleTreeNode, SwiperBreakpointMap, SwiperModuleFlags, SwiperPlan, SwiperPlanContext, ToggleableAction, TransitionFeel, TransitionPhase, TransitionTimelineInput, ValueSource, VirtualTraitGroup };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vectoriox/iox-ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.43.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=20.0.0",
|
|
6
6
|
"@angular/core": ">=20.0.0",
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
"types": "./consent-core/index.d.ts",
|
|
32
32
|
"default": "./fesm2022/vectoriox-iox-ui-consent-core.mjs"
|
|
33
33
|
},
|
|
34
|
+
"./data-core": {
|
|
35
|
+
"types": "./data-core/index.d.ts",
|
|
36
|
+
"default": "./fesm2022/vectoriox-iox-ui-data-core.mjs"
|
|
37
|
+
},
|
|
34
38
|
"./design-core": {
|
|
35
39
|
"types": "./design-core/index.d.ts",
|
|
36
40
|
"default": "./fesm2022/vectoriox-iox-ui-design-core.mjs"
|