@vectoriox/iox-ui 5.35.0 → 5.37.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/actions-core/index.d.ts +12 -3
- package/composite-core/index.d.ts +500 -2
- package/design-core/index.d.ts +417 -0
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +26 -2
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +1205 -2
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +489 -0
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs +2 -1
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +113 -8
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +94 -19
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +53 -3
- package/index.d.ts +60 -10
- package/package.json +1 -1
- package/src/actions-core/action.model.ts +4 -2
- package/src/actions-core/element-actions.ts +29 -1
- package/src/composite-core/accordion-runtime.ts +443 -0
- package/src/composite-core/accordion.ts +694 -0
- package/src/composite-core/composite-kinds.ts +110 -0
- package/src/composite-core/composite-node.ts +16 -0
- package/src/composite-core/disclosure.ts +125 -0
- package/src/composite-core/public-api.ts +7 -1
- package/src/composite-core/structure.ts +14 -0
- package/src/design-core/flavor-spec.generated.ts +489 -0
- package/src/forms-core/nesting.ts +2 -1
- package/src/generation-core/compose-site.ts +49 -1
- package/src/generation-core/node-baselines.generated.ts +6 -2
- package/src/generation-core/patterns.ts +10 -0
- package/src/generation-core/serialized-node.ts +4 -0
- package/src/generation-core/site-spec.generated.ts +46 -1
- package/src/generation-core/validate-site-plan.ts +5 -4
- package/styles/iox-design.css +30 -0
|
@@ -87,7 +87,7 @@ declare const SPEC_SITE_PLAN_SHAPE: {
|
|
|
87
87
|
readonly section: {
|
|
88
88
|
readonly pattern: "string — a non-global pattern id";
|
|
89
89
|
readonly "slots?": "{ [slot]: string } — the pattern's declared slots";
|
|
90
|
-
readonly "binding?": "string — the list source a pattern's $binding repeater iterates (exactly when it has one)";
|
|
90
|
+
readonly "binding?": "string — the list source a pattern's $binding repeater iterates (exactly when it has one); a $binding? pattern (faq.accordion) MAY take one — then its items come from that content";
|
|
91
91
|
readonly "without?": "string[] — the pattern's optional parts to leave out";
|
|
92
92
|
};
|
|
93
93
|
readonly globals: {
|
|
@@ -813,6 +813,45 @@ declare const SPEC_SITE_PATTERNS: {
|
|
|
813
813
|
}];
|
|
814
814
|
};
|
|
815
815
|
};
|
|
816
|
+
readonly "faq.accordion": {
|
|
817
|
+
readonly family: "faq";
|
|
818
|
+
readonly label: "FAQ — questions that open";
|
|
819
|
+
readonly node: {
|
|
820
|
+
readonly t: "Section";
|
|
821
|
+
readonly es: "section";
|
|
822
|
+
readonly c: readonly [{
|
|
823
|
+
readonly t: "Container";
|
|
824
|
+
readonly es: "box";
|
|
825
|
+
readonly lay: {
|
|
826
|
+
readonly display: "flex";
|
|
827
|
+
readonly flexDirection: "column";
|
|
828
|
+
readonly gap: "14px";
|
|
829
|
+
readonly maxWidth: "860px";
|
|
830
|
+
readonly width: "100%";
|
|
831
|
+
readonly margin: "0px auto 0px auto";
|
|
832
|
+
};
|
|
833
|
+
readonly c: readonly [{
|
|
834
|
+
readonly t: "Text";
|
|
835
|
+
readonly es: "eyebrow";
|
|
836
|
+
readonly slot: "eyebrow";
|
|
837
|
+
readonly ph: "copy";
|
|
838
|
+
readonly text: "FAQ";
|
|
839
|
+
}, {
|
|
840
|
+
readonly t: "Heading";
|
|
841
|
+
readonly es: "h2";
|
|
842
|
+
readonly level: "h2";
|
|
843
|
+
readonly slot: "title";
|
|
844
|
+
readonly ph: "copy";
|
|
845
|
+
readonly text: "Questions people ask";
|
|
846
|
+
}, {
|
|
847
|
+
readonly t: "Container";
|
|
848
|
+
readonly recipe: "accordion";
|
|
849
|
+
readonly src: "$binding?";
|
|
850
|
+
readonly ph: "copy";
|
|
851
|
+
}];
|
|
852
|
+
}];
|
|
853
|
+
};
|
|
854
|
+
};
|
|
816
855
|
};
|
|
817
856
|
declare const SPEC_SITE_TEMPLATES: {
|
|
818
857
|
readonly studio: {
|
|
@@ -1206,7 +1245,10 @@ interface PatternNode {
|
|
|
1206
1245
|
}
|
|
1207
1246
|
/** The composite-core recipes a pattern may stamp (`recipe`). */
|
|
1208
1247
|
declare enum PatternRecipe {
|
|
1209
|
-
Card = "card"
|
|
1248
|
+
Card = "card",
|
|
1249
|
+
/** CC2: the Accordion — Manual (three placeholder items), or From content when the section names a list
|
|
1250
|
+
* `binding` (`src: '$binding?'`): one template item bound to the type's question / answer fields. */
|
|
1251
|
+
Accordion = "accordion"
|
|
1210
1252
|
}
|
|
1211
1253
|
/** A recipe node's `binds` keys → the part each binds (Card v2). */
|
|
1212
1254
|
declare enum CardBindTarget {
|
|
@@ -1240,6 +1282,8 @@ declare enum PatternPlaceholder {
|
|
|
1240
1282
|
declare enum PatternDirective {
|
|
1241
1283
|
/** A Repeater's source: the section's `binding`. */
|
|
1242
1284
|
Binding = "$binding",
|
|
1285
|
+
/** The section MAY name a list `binding` (faq.accordion): with one, the recipe's items come from it. */
|
|
1286
|
+
OptionalBinding = "$binding?",
|
|
1243
1287
|
/** `each`: one plain node per page of the plan that is in the navigation (`inNav`), in plan order —
|
|
1244
1288
|
* words and routes written in, editable on the canvas (W1.1). */
|
|
1245
1289
|
NavPages = "$navPages",
|
|
@@ -1266,6 +1310,8 @@ declare function patternSlots(pattern: SitePattern): string[];
|
|
|
1266
1310
|
declare function patternOptionalParts(pattern: SitePattern): string[];
|
|
1267
1311
|
/** True when the pattern has a Repeater iterating the section's `binding`. */
|
|
1268
1312
|
declare function patternNeedsBinding(pattern: SitePattern): boolean;
|
|
1313
|
+
/** True when the pattern may take a section `binding` — it needs one, or names `$binding?` (CC2). */
|
|
1314
|
+
declare function patternTakesBinding(pattern: SitePattern): boolean;
|
|
1269
1315
|
/** The scopes whose ITEM a pattern's bound Images take their alt text from (an Image that names no `alt`
|
|
1270
1316
|
* of its own): `item` (the row of a `$binding` Repeater — the section's list), `route` or `next`. Each
|
|
1271
1317
|
* needs a content type with a `previewTextField` (W1.1, Q7). */
|
|
@@ -1331,6 +1377,10 @@ interface SerializedNode {
|
|
|
1331
1377
|
/** The part this node plays in a composite (composite-core: `card.title`; a navigation's `nav.drawer`,
|
|
1332
1378
|
* written by `planNavShape`). Additive; a node without one is a plain node. */
|
|
1333
1379
|
role?: string;
|
|
1380
|
+
/** An item's identity inside its composite (CC2: an Accordion item's `k1`…). Additive. */
|
|
1381
|
+
itemKey?: string;
|
|
1382
|
+
/** A targeted state's driving node (CC2: an icon's `trigger-on` → its item). */
|
|
1383
|
+
stateTriggers?: Partial<Record<string, string>>;
|
|
1334
1384
|
bindings: SerializedBinding[];
|
|
1335
1385
|
interactions: unknown[];
|
|
1336
1386
|
isGlobal?: boolean;
|
|
@@ -1657,5 +1707,5 @@ interface AddBarItemResult {
|
|
|
1657
1707
|
*/
|
|
1658
1708
|
declare function addBarItem(globals: ReadonlyArray<SerializedNode>, options?: Pick<NavShapeOptions, 'newId'>): AddBarItemResult;
|
|
1659
1709
|
|
|
1660
|
-
export { BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BaselineRole, BindScope, CardBindTarget, ComposeError, ComposeIssueCode, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, FACT_KEYS, GlobalSlot, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NavRole, NavShape, NavShapeError, PatternDirective, PatternGlobalPosition, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PlaceholderKind, PlanDataSourceMode, PlanDataSourceType, RelativeOp, SAMPLE_IMAGE_REF, SITE_FACT_LABELS, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_FACTS, SPEC_SITE_PATTERNS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_TEMPLATES, STUDIO_TEMPLATE, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, addBarItem, altSourceScopes, assertStyleSlots, assertValidSitePlan, barIconForRoute, composeSite, createSerializedNode, findNavRoot, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, parseSampleImageRef, patternById, patternNeedsBinding, patternNodes, patternOptionalParts, patternScopes, patternSlots, planFromTemplate, planNavShape, releasedLayoutDefaults, requiredShapeKeys, routeParams, sampleImageRef, setStyleProps, shapeKeys, validateSitePlan, walkSerialized };
|
|
1710
|
+
export { BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BaselineRole, BindScope, CardBindTarget, ComposeError, ComposeIssueCode, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, FACT_KEYS, GlobalSlot, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NavRole, NavShape, NavShapeError, PatternDirective, PatternGlobalPosition, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PlaceholderKind, PlanDataSourceMode, PlanDataSourceType, RelativeOp, SAMPLE_IMAGE_REF, SITE_FACT_LABELS, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_FACTS, SPEC_SITE_PATTERNS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_TEMPLATES, STUDIO_TEMPLATE, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, addBarItem, altSourceScopes, assertStyleSlots, assertValidSitePlan, barIconForRoute, composeSite, createSerializedNode, findNavRoot, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, parseSampleImageRef, patternById, patternNeedsBinding, patternNodes, patternOptionalParts, patternScopes, patternSlots, patternTakesBinding, planFromTemplate, planNavShape, releasedLayoutDefaults, requiredShapeKeys, routeParams, sampleImageRef, setStyleProps, shapeKeys, validateSitePlan, walkSerialized };
|
|
1661
1711
|
export type { AddBarItemResult, CmsDataSourcePlan, ComposeContext, ComposeIssue, ComposedDataSource, ComposedItem, ComposedPage, ComposedPlaceholder, ComposedRoute, ComposedSite, ContentFieldPlan, ContentSeedPlan, ContentTypePlan, CreateNodeOptions, DataSourcePlan, FactKey, NavPage, NavShapeOptions, NavShapeResult, NodeBaseline, PagePlan, PageSectionPlan, PatternNode, RelativeDataSourcePlan, SerializedBinding, SerializedNode, SerializedResponsive, SiteBusiness, SitePattern, SitePlan, SitePlanIssue, SitePlanSource, SitePlanValidation, SiteTemplate, TemplatePlanInput };
|
package/index.d.ts
CHANGED
|
@@ -379,7 +379,7 @@ declare class BuilderHeadingComponent implements OnInit {
|
|
|
379
379
|
private isBound;
|
|
380
380
|
private syncTraitToPanel;
|
|
381
381
|
static ɵfac: i0.ɵɵFactoryDeclaration<BuilderHeadingComponent, [{ optional: true; }, null, { optional: true; }]>;
|
|
382
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BuilderHeadingComponent, "h1[iox-heading],h2[iox-heading],h3[iox-heading],h4[iox-heading],h5[iox-heading],h6[iox-heading]", never, { "content": { "alias": "content"; "required": false; }; "level": { "alias": "level"; "required": false; }; "nodeId": { "alias": "nodeId"; "required": false; }; "node": { "alias": "node"; "required": false; }; "linkType": { "alias": "linkType"; "required": false; }; "url": { "alias": "url"; "required": false; }; "pageRoute": { "alias": "pageRoute"; "required": false; }; "target": { "alias": "target"; "required": false; }; }, {}, never, never, false, never>;
|
|
382
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BuilderHeadingComponent, "h1[iox-heading],h2[iox-heading],h3[iox-heading],h4[iox-heading],h5[iox-heading],h6[iox-heading],span[iox-heading]", never, { "content": { "alias": "content"; "required": false; }; "level": { "alias": "level"; "required": false; }; "nodeId": { "alias": "nodeId"; "required": false; }; "node": { "alias": "node"; "required": false; }; "linkType": { "alias": "linkType"; "required": false; }; "url": { "alias": "url"; "required": false; }; "pageRoute": { "alias": "pageRoute"; "required": false; }; "target": { "alias": "target"; "required": false; }; }, {}, never, never, false, never>;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
interface EditableNode {
|
|
@@ -447,7 +447,11 @@ declare class ContainerComponent {
|
|
|
447
447
|
static ɵcmp: i0.ɵɵComponentDeclaration<ContainerComponent, "div[iox-container],section[iox-container],article[iox-container],header[iox-container],footer[iox-container],main[iox-container],nav[iox-container],ul[iox-container],ol[iox-container],li[iox-container]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; }, {}, never, never, false, never>;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
/**
|
|
450
|
+
/**
|
|
451
|
+
* Directive-host linked container: the `<a>` IS the host — no wrapper, no inner/outer split. An Accordion's
|
|
452
|
+
* HEADER (CC2, role `accordion.trigger`) is created on a `<button>` instead — a button that opens its item,
|
|
453
|
+
* never a link; the engine puts it inside the `<hN>` its question's level names.
|
|
454
|
+
*/
|
|
451
455
|
declare class LinkedContainerComponent implements OnInit, OnDestroy {
|
|
452
456
|
private elRef;
|
|
453
457
|
private isPreview;
|
|
@@ -461,9 +465,11 @@ declare class LinkedContainerComponent implements OnInit, OnDestroy {
|
|
|
461
465
|
constructor(elRef: ElementRef<HTMLElement>, isPreview: boolean);
|
|
462
466
|
ngOnInit(): void;
|
|
463
467
|
ngOnDestroy(): void;
|
|
468
|
+
/** True when created on a <button> (an Accordion header) — it never navigates. */
|
|
469
|
+
get isButton(): boolean;
|
|
464
470
|
get resolvedHref(): string;
|
|
465
471
|
static ɵfac: i0.ɵɵFactoryDeclaration<LinkedContainerComponent, [null, { optional: true; }]>;
|
|
466
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LinkedContainerComponent, "a[iox-linked-container]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "linkType": { "alias": "linkType"; "required": false; }; "url": { "alias": "url"; "required": false; }; "pageRoute": { "alias": "pageRoute"; "required": false; }; "target": { "alias": "target"; "required": false; }; }, {}, never, never, false, never>;
|
|
472
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LinkedContainerComponent, "a[iox-linked-container],button[iox-linked-container]", never, { "nodeId": { "alias": "nodeId"; "required": false; }; "linkType": { "alias": "linkType"; "required": false; }; "url": { "alias": "url"; "required": false; }; "pageRoute": { "alias": "pageRoute"; "required": false; }; "target": { "alias": "target"; "required": false; }; }, {}, never, never, false, never>;
|
|
467
473
|
}
|
|
468
474
|
|
|
469
475
|
/**
|
|
@@ -1515,12 +1521,24 @@ declare function statePseudoClass(state: string): string;
|
|
|
1515
1521
|
* so the look and the announcement are one fact.
|
|
1516
1522
|
*/
|
|
1517
1523
|
declare enum ComponentState {
|
|
1518
|
-
Current = "current"
|
|
1519
|
-
|
|
1520
|
-
|
|
1524
|
+
Current = "current",
|
|
1525
|
+
/** A composite part that IS on — an open accordion item, its header, its panel (board 9 "Open"). */
|
|
1526
|
+
On = "on",
|
|
1527
|
+
/** A part INSIDE an item, styled by its item being open (board 9 "Item open") — a TARGETED state: its
|
|
1528
|
+
* trigger is the item (`stateTriggers['trigger-on']`), compiled through `targetedStateSelector`. */
|
|
1529
|
+
ItemOpen = "trigger-on"
|
|
1530
|
+
}
|
|
1531
|
+
/** The attribute selector each (non-targeted) component state compiles to. */
|
|
1521
1532
|
declare const COMPONENT_STATE_SELECTOR: Readonly<Record<string, string>>;
|
|
1522
|
-
/** The
|
|
1523
|
-
|
|
1533
|
+
/** The composite roles that are themselves "on" when their item is open (they carry `data-iox-on`): an accordion's
|
|
1534
|
+
* item, header and panel; a disclosure (its own item), its toggle and its panel (CC2.1). The main entry does not
|
|
1535
|
+
* import composite-core, so the roles are spelled here — `style-compiler.spec` pins them to its enums. */
|
|
1536
|
+
declare const ON_STATE_ROLES: ReadonlyArray<string>;
|
|
1537
|
+
/**
|
|
1538
|
+
* The component states a node offers in the Style panel's "Component state" group: Current page (a link),
|
|
1539
|
+
* Open (an accordion's item, header or panel), Item open (any other part inside an item — `insideItem`).
|
|
1540
|
+
*/
|
|
1541
|
+
declare function componentStatesFor(type: string | null | undefined, role?: string | null, insideItem?: boolean): ComponentState[];
|
|
1524
1542
|
/**
|
|
1525
1543
|
* What follows `.iox-node-<id>` in a stored state's rule: `:hover`, `:focus-visible`, or a component
|
|
1526
1544
|
* state's attribute selector (`[aria-current="page"]`). Shared by the builder canvas and both engine paths.
|
|
@@ -1697,6 +1715,20 @@ declare function nearestCommonAncestorId(root: readonly StyleTreeNode[], styledC
|
|
|
1697
1715
|
* `scopeCssId` MUST be a value returned by `nearestCommonAncestorId` for the same pair.
|
|
1698
1716
|
*/
|
|
1699
1717
|
declare function buildTargetedStateSelector(scopeCssId: string, triggerCssId: string, styledCssId: string, base: string): string;
|
|
1718
|
+
/**
|
|
1719
|
+
* The same three topologies for any trigger SUFFIX — a pseudo-class (`:hover`) or an attribute the renderers
|
|
1720
|
+
* write (`[data-iox-on]`, CC2's "Item open").
|
|
1721
|
+
*/
|
|
1722
|
+
declare function buildTargetedSuffixSelector(scopeCssId: string, triggerCssId: string, styledCssId: string, suffix: string): string;
|
|
1723
|
+
/**
|
|
1724
|
+
* The targeted states and what follows the TRIGGER's class in each: `trigger-hover` — the chosen element is
|
|
1725
|
+
* hovered; `trigger-on` — the chosen item is open (CC2: an Icon turns when ITS item opens; the trigger is the
|
|
1726
|
+
* item, an ancestor, so the rule is `.item[data-iox-on] .icon`). Shared by the builder canvas and both
|
|
1727
|
+
* engine paths.
|
|
1728
|
+
*/
|
|
1729
|
+
declare const TARGETED_STATE_SUFFIX: Readonly<Record<string, string>>;
|
|
1730
|
+
/** The selector body of a targeted state's rule, or null for a state that is not targeted. */
|
|
1731
|
+
declare function targetedStateSelector(state: string, scopeCssId: string, triggerCssId: string, styledCssId: string): string | null;
|
|
1700
1732
|
|
|
1701
1733
|
/**
|
|
1702
1734
|
* parts — the failure design (forms-and-inputs-plan.md Part 2, board 7). A compound component
|
|
@@ -2069,9 +2101,26 @@ interface DataSourceQueryFilter {
|
|
|
2069
2101
|
* fallback too. An empty default with no query-param value means the filter is DROPPED. */
|
|
2070
2102
|
defaultValue?: string;
|
|
2071
2103
|
}
|
|
2104
|
+
/** The order a query source returns its rows in (CC2, board 4 "Sort" — the data source popover). */
|
|
2105
|
+
declare enum DataSourceSortDir {
|
|
2106
|
+
Asc = "asc",
|
|
2107
|
+
Desc = "desc"
|
|
2108
|
+
}
|
|
2109
|
+
interface DataSourceSort {
|
|
2110
|
+
/** A field of the content type (a dot path into a nested object is allowed). */
|
|
2111
|
+
field?: string;
|
|
2112
|
+
dir?: DataSourceSortDir | `${DataSourceSortDir}`;
|
|
2113
|
+
}
|
|
2114
|
+
/** The query parameter carrying the order: `sort=order` ascending, `sort=-order` descending. A CONTROL like
|
|
2115
|
+
* `limit`, not a field filter — the public controllers split it out (iox-cms `query-controls.ts`). */
|
|
2116
|
+
declare const SORT_PARAM = "sort";
|
|
2117
|
+
/** `sort`'s wire value, or null when the source sets no (valid) order. */
|
|
2118
|
+
declare function sortParamValue(sort: DataSourceSort | null | undefined): string | null;
|
|
2072
2119
|
interface DataSourceRequestSpec {
|
|
2073
2120
|
contentType?: string;
|
|
2074
2121
|
limit?: number;
|
|
2122
|
+
/** A query source's order (CC2). Absent = the backend's natural order, as before. */
|
|
2123
|
+
sort?: DataSourceSort;
|
|
2075
2124
|
filterByRouteParam?: DataSourceRouteFilter;
|
|
2076
2125
|
filterByQueryParams?: DataSourceQueryFilter[];
|
|
2077
2126
|
}
|
|
@@ -2106,6 +2155,7 @@ type DataSourcePlan = {
|
|
|
2106
2155
|
resource: string;
|
|
2107
2156
|
filter: Record<string, any>;
|
|
2108
2157
|
limit?: number;
|
|
2158
|
+
sort?: string;
|
|
2109
2159
|
mode: DataSourceMode;
|
|
2110
2160
|
} | {
|
|
2111
2161
|
kind: 'external';
|
|
@@ -3167,5 +3217,5 @@ declare class GalleryLoop {
|
|
|
3167
3217
|
private emit;
|
|
3168
3218
|
}
|
|
3169
3219
|
|
|
3170
|
-
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, LEGACY_DIRECTION_KEY, LEGACY_HOVER_TRANSITION, LinkedContainerComponent, MANAGED_A11Y_ATTRIBUTES, MAX_LINES_KEY, PAGE_STYLE_TOKENS, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PageStyleField, PageStyleSource, REDUCED_MOTION_QUERY, RESERVED_ALIAS_PREFIX, STATE_PSEUDO_CLASS, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, SectionComponent, SwiperModuleName, 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, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildInteractionKeyframes, buildPartSelector, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, closeAboveMediaQuery, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, computeRelative, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, decomposeBackdropFilter, defaultHoverTransition, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, effectiveActionType, effectiveTransitionId, entrancePreStateStyle, excludeSelf, feelFor, finalKeyframe, getByPath, getSeoValue, hasHoverState, hasOwnTransition, initialSlotValues, isActionEnabled, isContextAction, isCurrentLink, isExternalOrFragment, isGradientPaint, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, migrateLegacyTextAlign, motionAllowed, nearestCommonAncestorId, needsAccessibleName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, parentBreakpoint, parseUrlList, partClassName, planDataSource, planResponsiveRules, prefersReducedMotion, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSeo, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, rewriteViewportUnits, safeSetInput, serializeA11yAttributes, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, stateNamesIn, statePseudoClass, stateSelectorSuffix, stripSuppressedProps, swiperAutoplayAllowed, swiperModuleNames, syncNodeA11yAttributes, variableAliases, variableItemsFrom, withContextSlots, withDefaultHoverTransition, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
3171
|
-
export type { A11yNodeSource, BoundValueSpec, BreakpointDef, BuildRelatedFilterOptions, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, CurrentLinkOptions, DataSourceDomain, DataSourceEndpoints, DataSourceMode, DataSourcePlan, DataSourceQueryFilter, DataSourceRequest, DataSourceRequestSpec, DataSourceRouteFilter, DataSourceSpec, 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, RelativeInputs, RelativeSourceKind, RelativeSourceSpec, ResolveSiblingsOptions, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteContext, SeoDerivedContent, SeoFieldSource, SeoFieldState, SeoResolveContext, SetContextParams, SiblingsResult, StateStyleMap, StyleMap, StyleTreeNode, SwiperBreakpointMap, SwiperModuleFlags, ToggleableAction, TransitionFeel, TransitionPhase, TransitionTimelineInput, ValueSource, VirtualTraitGroup };
|
|
3220
|
+
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, DataSourceSortDir, 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, LEGACY_DIRECTION_KEY, LEGACY_HOVER_TRANSITION, LinkedContainerComponent, MANAGED_A11Y_ATTRIBUTES, MAX_LINES_KEY, ON_STATE_ROLES, PAGE_STYLE_TOKENS, PAGE_TOKEN_FALLBACKS, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PART_CLASS_NAMES, PIPE_DESCRIPTORS, PIPE_REGISTRY, PageScrollProvider, PageStyleField, PageStyleSource, REDUCED_MOTION_QUERY, RESERVED_ALIAS_PREFIX, SORT_PARAM, STATE_PSEUDO_CLASS, SUPPRESSED_STYLE_PROPS_BY_TYPE, SWIPER_A11Y_OPTIONS, SWIPER_RESPONSIVE_TRAITS, 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, breakpointDef, breakpointForWidth, breakpointQueryFor, buildDataSourceFilter, buildInteractionKeyframes, buildPartSelector, buildRelatedFilter, buildSwiperBreakpoints, buildTargetedStateSelector, buildTargetedSuffixSelector, buildTransitionTimeline, cascadeChain, clearInputOverride, clearOverride, closeAboveMediaQuery, collectContextSlotKeys, collectReferencedAliases, compileDeclarations, compilePageStyle, componentStatesFor, composeVirtualTraits, computeRelative, containerHtmlTag, contextActionEffect, contextSlotKeys, countOverrides, dataSourcePlanToRequest, declaredInputNames, decomposeBackdropFilter, defaultHoverTransition, defaultMessageResolver, deriveSeoFromContent, describePageStyle, describeSeoFields, dialogCloseAboveMinWidth, effectiveActionType, effectiveTransitionId, entrancePreStateStyle, excludeSelf, feelFor, finalKeyframe, getByPath, getSeoValue, hasHoverState, hasOwnTransition, initialSlotValues, isActionEnabled, isContextAction, isCurrentLink, isExternalOrFragment, isGradientPaint, isInputOverriddenAt, isOverriddenAt, isReservedAlias, isValidSlotKey, isWholeBackdropSet, keyframePropertyName, keyframeStyleEntries, legacyEnterToTransition, matchRouteParams, mediaQueryFor, mergeSwiperBreakpoints, migrateLegacyDirection, migrateLegacyTextAlign, motionAllowed, nearestCommonAncestorId, needsAccessibleName, nodeA11yAttributes, nodeCssId, nodeTraitValue, nodeUsesContext, normalizeAppPath, normalizeCollectionResult, normalizeGalleryImage, normalizeIconClass, parentBreakpoint, parseUrlList, partClassName, planDataSource, planResponsiveRules, prefersReducedMotion, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resetPageStyleField, resetSeoField, resolveBoundValue, resolveContextValue, resolveDerivedInto, resolveGalleryEffect, resolveGalleryUrls, resolveInputChain, resolveInputs, resolvePageTransition, resolvePath, resolveRelativeInto, resolveRepeaterItems, resolveSeo, resolveSiblings, resolveSingleItemId, resolveStateStyles, resolveStyleProps, resolveToggleVisibility, resolveValueChain, rewriteViewportUnits, safeSetInput, serializeA11yAttributes, setInputOverride, setOverride, setSeoAuto, setSeoBinding, setSeoOverride, setSeoValue, sortParamValue, stateNamesIn, statePseudoClass, stateSelectorSuffix, stripSuppressedProps, swiperAutoplayAllowed, swiperModuleNames, syncNodeA11yAttributes, targetedStateSelector, variableAliases, variableItemsFrom, withContextSlots, withDefaultHoverTransition, wrapInBreakpointQuery, wrapInMediaQuery };
|
|
3221
|
+
export type { A11yNodeSource, BoundValueSpec, BreakpointDef, BuildRelatedFilterOptions, ContextActionEffect, ContextActionLike, ContextItemRef, ContextSlotDefault, ContextValueSpec, ContextWriteScope, CurrentLinkOptions, DataSourceDomain, DataSourceEndpoints, DataSourceMode, DataSourcePlan, DataSourceQueryFilter, DataSourceRequest, DataSourceRequestSpec, DataSourceRouteFilter, DataSourceSort, DataSourceSpec, 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, RelativeInputs, RelativeSourceKind, RelativeSourceSpec, ResolveSiblingsOptions, ResolvedPageTransition, ResponsiveLayer, ResponsiveOverrides, ResponsiveRuleSet, RouteContext, SeoDerivedContent, SeoFieldSource, SeoFieldState, SeoResolveContext, SetContextParams, SiblingsResult, StateStyleMap, StyleMap, StyleTreeNode, SwiperBreakpointMap, SwiperModuleFlags, ToggleableAction, TransitionFeel, TransitionPhase, TransitionTimelineInput, ValueSource, VirtualTraitGroup };
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ export type ActionKind = 'animated' | 'instant' | 'server';
|
|
|
11
11
|
|
|
12
12
|
/** Picker grouping. Flat lists die at ~10 entries; the group is data, never a second list. */
|
|
13
13
|
export type ActionGroup =
|
|
14
|
-
| 'motion' | 'visibility' | 'navigate' | 'dialog' | 'form' | 'data' | 'consent' | 'service';
|
|
14
|
+
| 'motion' | 'visibility' | 'navigate' | 'dialog' | 'item' | 'form' | 'data' | 'consent' | 'service';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* What a step does inside the live builder canvas (the canvas RUNS interactions):
|
|
@@ -29,10 +29,12 @@ export interface ActionParamSpec {
|
|
|
29
29
|
options?: readonly { value: string; labelKey: string }[];
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
/** Does this action point at another node — and may it be any node or only certain types? */
|
|
32
|
+
/** Does this action point at another node — and may it be any node, or only certain types / composite roles? */
|
|
33
33
|
export interface ActionTargetSpec {
|
|
34
34
|
required: boolean;
|
|
35
35
|
types?: string[];
|
|
36
|
+
/** Only nodes playing one of these composite roles (`openItem` targets an accordion item or a disclosure). */
|
|
37
|
+
roles?: string[];
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
/**
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { AccordionRole, CompositeItemAction, DisclosureRole } from '@vectoriox/iox-ui/composite-core';
|
|
2
|
+
|
|
1
3
|
import { ActionDescriptor } from './action.model';
|
|
2
4
|
|
|
5
|
+
/** The items an item action may target: an accordion's item, or a disclosure (its own one item). */
|
|
6
|
+
const ITEM_TARGET_ROLES = [AccordionRole.Item, DisclosureRole.Disclosure];
|
|
7
|
+
|
|
3
8
|
/**
|
|
4
9
|
* The ELEMENT action catalog (actions plan A1) — what a node can DO, as data. One list feeds the
|
|
5
10
|
* grouped picker, the two interaction engines, and the AI composer's validation (§9: the model
|
|
@@ -47,6 +52,16 @@ export const ELEMENT_ACTION_DESCRIPTORS: readonly ActionDescriptor[] = Object.fr
|
|
|
47
52
|
{ type: 'toggleDialog', labelKey: 'builder.actions.toggleDialog', kind: 'instant', group: 'dialog', builderBehaviour: 'run',
|
|
48
53
|
target: { required: true, types: ['Dialog'] } },
|
|
49
54
|
|
|
55
|
+
// ── Item (CC2.1 — composite T14): drive an accordion item or a disclosure from anywhere ("See shipping"
|
|
56
|
+
// opens FAQ item 3). The canvas RUNS them, like the dialog actions: it is the same runtime, and an item you
|
|
57
|
+
// cannot open from the button is a button you cannot design.
|
|
58
|
+
{ type: 'openItem', labelKey: 'builder.actions.openItem', kind: 'instant', group: 'item', builderBehaviour: 'run',
|
|
59
|
+
target: { required: true, roles: ITEM_TARGET_ROLES } },
|
|
60
|
+
{ type: 'closeItem', labelKey: 'builder.actions.closeItem', kind: 'instant', group: 'item', builderBehaviour: 'run',
|
|
61
|
+
target: { required: true, roles: ITEM_TARGET_ROLES } },
|
|
62
|
+
{ type: 'toggleItem', labelKey: 'builder.actions.toggleItem', kind: 'instant', group: 'item', builderBehaviour: 'run',
|
|
63
|
+
target: { required: true, roles: ITEM_TARGET_ROLES } },
|
|
64
|
+
|
|
50
65
|
// ── Form (A1 — Tier A; the submit transport is the forms module's, I7 of its plan) ──
|
|
51
66
|
// simulate in the CANVAS: the builder's Form is a container twin with no real <form>,
|
|
52
67
|
// so there is nothing honest to run — the live engine requestSubmit()s the real one.
|
|
@@ -112,6 +127,19 @@ export const SERVER_ELEMENT_ACTION_TYPES: ReadonlySet<string> =
|
|
|
112
127
|
export const BEHAVIOUR_ACTION_TYPES: ReadonlySet<string> =
|
|
113
128
|
new Set(['navigate', 'scrollTo', 'submitForm', 'copyToClipboard']);
|
|
114
129
|
|
|
130
|
+
/** The item actions' dispatch set (T14) and what each does to its item — the engines branch on it beside
|
|
131
|
+
* DIALOG/BEHAVIOUR, and composite-core `runCompositeItemAction` runs it on the target item's own runtime. */
|
|
132
|
+
export const ITEM_ACTION_TYPES: Readonly<Record<string, CompositeItemAction>> = Object.freeze({
|
|
133
|
+
openItem: CompositeItemAction.Open,
|
|
134
|
+
closeItem: CompositeItemAction.Close,
|
|
135
|
+
toggleItem: CompositeItemAction.Toggle,
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
/** The item action an action type runs, or null when it is not one. */
|
|
139
|
+
export function itemActionOf(type: string | null | undefined): CompositeItemAction | null {
|
|
140
|
+
return (type && ITEM_ACTION_TYPES[type]) || null;
|
|
141
|
+
}
|
|
142
|
+
|
|
115
143
|
/** The consent actions' dispatch set (C3) — the engines branch on it beside DIALOG/BEHAVIOUR.
|
|
116
144
|
* `openConsentPreferences` is dialog-opening by nature and included so ONE branch owns consent. */
|
|
117
145
|
export const CONSENT_ACTION_TYPES: ReadonlySet<string> =
|
|
@@ -119,7 +147,7 @@ export const CONSENT_ACTION_TYPES: ReadonlySet<string> =
|
|
|
119
147
|
|
|
120
148
|
/** Picker order — most-used groups first, services last (they are the shop window, not the shop). */
|
|
121
149
|
export const ELEMENT_ACTION_GROUP_ORDER: readonly string[] =
|
|
122
|
-
Object.freeze(['motion', 'visibility', 'navigate', 'dialog', 'form', 'data', 'consent', 'service']);
|
|
150
|
+
Object.freeze(['motion', 'visibility', 'navigate', 'dialog', 'item', 'form', 'data', 'consent', 'service']);
|
|
123
151
|
|
|
124
152
|
/** The catalog, grouped and ordered for the picker — one derivation, no hand-kept second list. */
|
|
125
153
|
export function groupedElementActions(): ReadonlyArray<{ group: string; actions: ActionDescriptor[] }> {
|