@nexterajs/ui 0.0.1 → 0.1.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/README.md +279 -34
- package/fesm2022/nexterajs-ui-charts.mjs +1096 -0
- package/fesm2022/nexterajs-ui-charts.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-core.mjs +835 -11
- package/fesm2022/nexterajs-ui-core.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-display.mjs +1142 -0
- package/fesm2022/nexterajs-ui-display.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-dropdowns.mjs +621 -69
- package/fesm2022/nexterajs-ui-dropdowns.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-file-uploader.mjs +576 -11
- package/fesm2022/nexterajs-ui-file-uploader.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-forms.mjs +2702 -452
- package/fesm2022/nexterajs-ui-forms.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-grid.mjs +2350 -336
- package/fesm2022/nexterajs-ui-grid.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-intl.mjs +117 -15
- package/fesm2022/nexterajs-ui-intl.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-navigation.mjs +1054 -0
- package/fesm2022/nexterajs-ui-navigation.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-notify.mjs +353 -0
- package/fesm2022/nexterajs-ui-notify.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-overlay.mjs +1671 -0
- package/fesm2022/nexterajs-ui-overlay.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-pivot.mjs +191 -136
- package/fesm2022/nexterajs-ui-pivot.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-shell.mjs +542 -0
- package/fesm2022/nexterajs-ui-shell.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-styling.mjs +568 -3
- package/fesm2022/nexterajs-ui-styling.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-tree-view.mjs +150 -18
- package/fesm2022/nexterajs-ui-tree-view.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-validation.mjs +283 -97
- package/fesm2022/nexterajs-ui-validation.mjs.map +1 -1
- package/fesm2022/nexterajs-ui.mjs +6 -0
- package/fesm2022/nexterajs-ui.mjs.map +1 -1
- package/package.json +37 -2
- package/styles/_dropdown.scss +150 -1
- package/styles/_editor.scss +75 -21
- package/styles/_icons.scss +92 -0
- package/styles/_mixins.scss +104 -1
- package/styles/_scrollbar.scss +134 -0
- package/styles/_status.scss +21 -0
- package/styles/_toast.scss +243 -0
- package/styles/_tokens.scss +467 -2
- package/styles/_widget.scss +14 -3
- package/styles/index.scss +10 -4
- package/types/nexterajs-ui-charts.d.ts +446 -0
- package/types/nexterajs-ui-core.d.ts +515 -30
- package/types/nexterajs-ui-display.d.ts +720 -0
- package/types/nexterajs-ui-dropdowns.d.ts +318 -57
- package/types/nexterajs-ui-file-uploader.d.ts +240 -8
- package/types/nexterajs-ui-forms.d.ts +772 -43
- package/types/nexterajs-ui-grid.d.ts +878 -135
- package/types/nexterajs-ui-intl.d.ts +39 -4
- package/types/nexterajs-ui-navigation.d.ts +531 -0
- package/types/nexterajs-ui-notify.d.ts +149 -0
- package/types/nexterajs-ui-overlay.d.ts +703 -0
- package/types/nexterajs-ui-pivot.d.ts +91 -70
- package/types/nexterajs-ui-shell.d.ts +294 -0
- package/types/nexterajs-ui-styling.d.ts +163 -3
- package/types/nexterajs-ui-tree-view.d.ts +56 -4
- package/types/nexterajs-ui-validation.d.ts +110 -22
- package/types/nexterajs-ui.d.ts +6 -0
|
@@ -14,6 +14,13 @@ interface NxeParsedNumberFormat {
|
|
|
14
14
|
minInt: number;
|
|
15
15
|
minFrac: number;
|
|
16
16
|
maxFrac: number;
|
|
17
|
+
/**
|
|
18
|
+
* The pattern's negative section, from `positive;negative` (`#,##0.00;(#,##0.00)`). A value
|
|
19
|
+
* below zero renders through it from its absolute value, and gets no `-` of its own: the
|
|
20
|
+
* section's prefix and suffix are the sign. Absent means dx's default, a `-` before the
|
|
21
|
+
* positive pattern.
|
|
22
|
+
*/
|
|
23
|
+
negative?: NxeParsedNumberFormat;
|
|
17
24
|
}
|
|
18
25
|
/** Parse an LDML pattern into a {@link NxeParsedNumberFormat}, or `null` for raw (no format). */
|
|
19
26
|
declare function parseNumberFormat(pattern: string | undefined | null): NxeParsedNumberFormat | null;
|
|
@@ -74,7 +81,7 @@ declare function hasTimeOfDay(value: unknown): boolean;
|
|
|
74
81
|
*/
|
|
75
82
|
declare function isAllDayRange(start: unknown, end: unknown): boolean;
|
|
76
83
|
/** Format a DateTime for display per `displayFormat` (DevExtreme tokens map 1:1 to Luxon). */
|
|
77
|
-
declare function formatDisplay(dt: DateTime | null, displayFormat: string): string;
|
|
84
|
+
declare function formatDisplay(dt: DateTime | null, displayFormat: string, locale?: string): string;
|
|
78
85
|
/**
|
|
79
86
|
* Parse user-typed text, trying in order: the display format; a lenient variant of it; for a format
|
|
80
87
|
* carrying time tokens, its date-only head (keeping `base`'s time); then ISO.
|
|
@@ -84,7 +91,7 @@ declare function formatDisplay(dt: DateTime | null, displayFormat: string): stri
|
|
|
84
91
|
* rejects the text outright — nulls the whole field. Callers editing an existing value should pass
|
|
85
92
|
* it; the parameter is optional so the date-only call sites need no change.
|
|
86
93
|
*/
|
|
87
|
-
declare function parseDisplay(text: string, displayFormat: string, base?: DateTime | null): DateTime | null;
|
|
94
|
+
declare function parseDisplay(text: string, displayFormat: string, base?: DateTime | null, locale?: string): DateTime | null;
|
|
88
95
|
/** Calendar zoom level (DevExtreme `dxCalendar.zoomLevel`). */
|
|
89
96
|
type NxeCalendarZoom = 'month' | 'year' | 'decade' | 'century';
|
|
90
97
|
interface NxePeriodCell {
|
|
@@ -121,5 +128,33 @@ declare function buildCalendarWeeks(viewMonth: DateTime): DateTime[][];
|
|
|
121
128
|
*/
|
|
122
129
|
declare const NXE_NUMBER_SEPARATORS: InjectionToken<NxeNumberSeparators>;
|
|
123
130
|
|
|
124
|
-
|
|
125
|
-
|
|
131
|
+
/** How one currency is displayed. */
|
|
132
|
+
interface NxeCurrencyInfo {
|
|
133
|
+
/** Minor units: fraction digits the currency has (ISO 4217). */
|
|
134
|
+
readonly digits: number;
|
|
135
|
+
/**
|
|
136
|
+
* Drop an all-zero fraction (`IDR 1.351.000`), but keep the full one when it is not zero
|
|
137
|
+
* (`IDR 1.351.000,50`). Currencies with fixed minor units always show them (`USD 1,234.00`).
|
|
138
|
+
*/
|
|
139
|
+
readonly trimZeroFraction: boolean;
|
|
140
|
+
}
|
|
141
|
+
/** Normalise a currency code: trimmed and upper-cased; `''` when absent. */
|
|
142
|
+
declare function nxeCurrencyCode(code: string | null | undefined): string;
|
|
143
|
+
/**
|
|
144
|
+
* Display rules for a currency code. Unknown codes have 2 minor units. `decimals` (the currency's
|
|
145
|
+
* decimals from reference data, when the app knows them) overrides the built-in table.
|
|
146
|
+
*/
|
|
147
|
+
declare function nxeCurrencyInfo(code: string | null | undefined, decimals?: number | null): NxeCurrencyInfo;
|
|
148
|
+
/** The number pattern behind a currency: grouped, `digits` fraction digits at most. */
|
|
149
|
+
declare function nxeCurrencyNumberFormat(code: string | null | undefined, decimals?: number | null): NxeParsedNumberFormat;
|
|
150
|
+
/**
|
|
151
|
+
* Format an amount as `CODE 1.234,50`. `null`/`NaN` give `''`. With a `pattern` (an already parsed
|
|
152
|
+
* number format) that pattern shapes the number instead of the currency's own digits.
|
|
153
|
+
*/
|
|
154
|
+
declare function formatCurrency(value: number | null | undefined, code: string | null | undefined, separators?: NxeNumberSeparators, options?: {
|
|
155
|
+
decimals?: number | null;
|
|
156
|
+
pattern?: NxeParsedNumberFormat | null;
|
|
157
|
+
}): string;
|
|
158
|
+
|
|
159
|
+
export { NXE_DATE_SERIALIZATION_FORMAT, NXE_DEFAULT_DATETIME_DISPLAY_FORMAT, NXE_DEFAULT_DISPLAY_FORMAT, NXE_DEFAULT_TIME_DISPLAY_FORMAT, NXE_EN_US_SEPARATORS, NXE_ID_SEPARATORS, NXE_NUMBER_SEPARATORS, buildCalendarWeeks, buildPeriodCells, formatCurrency, formatDisplay, formatNumber, hasTimeOfDay, isAllDayRange, nxeCurrencyCode, nxeCurrencyInfo, nxeCurrencyNumberFormat, parseDateValue, parseDisplay, parseNumber, parseNumberFormat, roundHalfAwayFromZero, serializeDate };
|
|
160
|
+
export type { NxeCalendarZoom, NxeCurrencyInfo, NxeNumberSeparators, NxeParsedNumberFormat, NxePeriodCell };
|
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { Params, Data } from '@angular/router';
|
|
4
|
+
import { NxeStatusFamily } from '@nexterajs/ui/display';
|
|
5
|
+
import { AbstractControl } from '@angular/forms';
|
|
6
|
+
|
|
7
|
+
/** What a tab with a `link` does with the query string already in the URL. */
|
|
8
|
+
type NxeTabQueryParamsHandling = 'merge' | 'preserve' | '';
|
|
9
|
+
/**
|
|
10
|
+
* One tab of an {@link NxeTabsComponent}. It draws nothing itself: the parent renders the tab
|
|
11
|
+
* button and the panel from the inputs and content declared here.
|
|
12
|
+
*
|
|
13
|
+
* ```html
|
|
14
|
+
* <nxe-tab label="Details">Plain content: created with the page, shown when active.</nxe-tab>
|
|
15
|
+
* <nxe-tab label="Lines" [badge]="12" key="lines">
|
|
16
|
+
* <ng-template nxeTabContent>Lazy: created the first time the tab opens.</ng-template>
|
|
17
|
+
* </nxe-tab>
|
|
18
|
+
* <nxe-tab label="Pending" [link]="[]" [queryParams]="{ status: 'pending' }" [badge]="4" />
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* With `link` set the tab is an anchor and the URL decides whether it is active (router mode).
|
|
22
|
+
*/
|
|
23
|
+
declare class NxeTabComponent {
|
|
24
|
+
/** The tab's text. */
|
|
25
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
26
|
+
/** A stable id for `selectedKey` and for telling tabs apart across reorders. */
|
|
27
|
+
readonly key: _angular_core.InputSignal<string | null>;
|
|
28
|
+
/** A count shown after the label in an `nxe-badge`; `null` or `undefined` shows none, 0 shows 0. */
|
|
29
|
+
readonly badge: _angular_core.InputSignalWithTransform<number | null | undefined, unknown>;
|
|
30
|
+
/** Status family of the badge. `neutral` by default: a count in a tab is information, not an alarm. */
|
|
31
|
+
readonly badgeFamily: _angular_core.InputSignal<NxeStatusFamily>;
|
|
32
|
+
/** Not selectable and skipped by the arrow keys. */
|
|
33
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
34
|
+
/** Overrides the tabs' `keepAlive` for this tab: keep the content after leaving it, or destroy it. */
|
|
35
|
+
readonly keepAlive: _angular_core.InputSignalWithTransform<boolean | undefined, unknown>;
|
|
36
|
+
/**
|
|
37
|
+
* Router mode. Router commands (`['/pos', id]`, `[]` for the current route) or a URL string; the tab
|
|
38
|
+
* becomes an anchor and is active while the URL matches this link plus its `queryParams`.
|
|
39
|
+
*/
|
|
40
|
+
readonly link: _angular_core.InputSignal<string | readonly unknown[] | null | undefined>;
|
|
41
|
+
/** Query params of the link, e.g. `{ status: 'pending' }`. */
|
|
42
|
+
readonly queryParams: _angular_core.InputSignal<Params | null | undefined>;
|
|
43
|
+
/** `merge` keeps the other query params in the URL (a search term, a page) when switching tab. */
|
|
44
|
+
readonly queryParamsHandling: _angular_core.InputSignal<NxeTabQueryParamsHandling>;
|
|
45
|
+
private readonly lazy;
|
|
46
|
+
private readonly implicit;
|
|
47
|
+
/** True when the content was declared in an `nxeTabContent` template. */
|
|
48
|
+
readonly isLazy: _angular_core.Signal<boolean>;
|
|
49
|
+
/** The template the parent stamps into the panel. */
|
|
50
|
+
readonly contentTemplate: _angular_core.Signal<TemplateRef<unknown>>;
|
|
51
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeTabComponent, never>;
|
|
52
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeTabComponent, "nxe-tab", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "badgeFamily": { "alias": "badgeFamily"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "keepAlive": { "alias": "keepAlive"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "queryParams": { "alias": "queryParams"; "required": false; "isSignal": true; }; "queryParamsHandling": { "alias": "queryParamsHandling"; "required": false; "isSignal": true; }; }, {}, ["lazy"], ["*"], true, never>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** `automatic`: arrowing to a tab selects it. `manual`: arrows only move focus; Enter or Space selects. */
|
|
56
|
+
type NxeTabsActivation = 'automatic' | 'manual';
|
|
57
|
+
/**
|
|
58
|
+
* `nxe-tabs` is a WAI-ARIA tabs widget: a `tablist` of `tab` buttons over `tabpanel`s, one tab in the
|
|
59
|
+
* tab order (roving `tabindex`), Left/Right (flipped in RTL), Home and End to move, and the active tab
|
|
60
|
+
* in `aria-selected`.
|
|
61
|
+
*
|
|
62
|
+
* ```html
|
|
63
|
+
* <nxe-tabs [(selectedKey)]="tab" tablistLabel="Purchase order">
|
|
64
|
+
* <nxe-tab key="details" label="Details">...</nxe-tab>
|
|
65
|
+
* <nxe-tab key="lines" label="Lines" [badge]="lines().length">
|
|
66
|
+
* <ng-template nxeTabContent><app-po-lines /></ng-template>
|
|
67
|
+
* </nxe-tab>
|
|
68
|
+
* <nxe-tab key="history" label="History" disabled />
|
|
69
|
+
* </nxe-tabs>
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* **Selection.** `selectedIndex` and `selectedKey` are two-way models. A tab with a `key` is better
|
|
73
|
+
* addressed by key (it survives a tab being added or hidden); if both are set the key wins, so bind one.
|
|
74
|
+
*
|
|
75
|
+
* **Lazy content.** Plain content is part of the page from the start. Content inside
|
|
76
|
+
* `<ng-template nxeTabContent>` is created the first time its tab is active. `keepAlive` (default
|
|
77
|
+
* `true`) then keeps it, with its state, when you leave; `false` destroys it. A tab's own `keepAlive`
|
|
78
|
+
* overrides.
|
|
79
|
+
*
|
|
80
|
+
* **Router mode.** A tab with `link` is an anchor and the URL decides which tab is active, for a route
|
|
81
|
+
* path or for a query param (`[link]="[]" [queryParams]="{ status: 'pending' }"`). Query params are
|
|
82
|
+
* compared as each tab declares them (`queryParamsHandling` plays no part in matching): a key any link
|
|
83
|
+
* tab declares is a key of the group, and a tab that leaves it out is active only while the URL does not
|
|
84
|
+
* carry it, so an "All" tab never shares the highlight with "PO" at `?status=po`. Of several matches the
|
|
85
|
+
* tab declaring the most params wins. The back button moves the tab. Link tabs follow the URL, so Left/Right only move focus
|
|
86
|
+
* and Enter follows the link. Put a `router-outlet` (or your list) beside the tabs, or give a link tab an
|
|
87
|
+
* `nxeTabContent` panel.
|
|
88
|
+
*
|
|
89
|
+
* **Overflow.** More tabs than fit scroll sideways; the focused or selected tab is kept in view.
|
|
90
|
+
*/
|
|
91
|
+
declare class NxeTabsComponent {
|
|
92
|
+
/** Zero-based index of the selected tab. Two-way. */
|
|
93
|
+
readonly selectedIndex: _angular_core.ModelSignal<number>;
|
|
94
|
+
/** `key` of the selected tab. Two-way; wins over `selectedIndex` when it matches a tab. */
|
|
95
|
+
readonly selectedKey: _angular_core.ModelSignal<string | null>;
|
|
96
|
+
/** `automatic` (default) selects on arrow; `manual` needs Enter or Space. */
|
|
97
|
+
readonly activation: _angular_core.InputSignal<NxeTabsActivation>;
|
|
98
|
+
/** Keep a tab's content alive after leaving it. A tab's own `keepAlive` overrides. */
|
|
99
|
+
readonly keepAlive: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
100
|
+
/** Accessible name of the tab list. */
|
|
101
|
+
readonly tablistLabel: _angular_core.InputSignal<string>;
|
|
102
|
+
protected readonly tabs: _angular_core.Signal<readonly NxeTabComponent[]>;
|
|
103
|
+
private readonly router;
|
|
104
|
+
private readonly route;
|
|
105
|
+
private readonly list;
|
|
106
|
+
private readonly uid;
|
|
107
|
+
/** The URL after each navigation; what router-mode tabs are matched against. */
|
|
108
|
+
private readonly url;
|
|
109
|
+
/** Index of the link tab that matches the URL, or -1. */
|
|
110
|
+
private readonly linkIndex;
|
|
111
|
+
/** Index of the active tab, or -1 when every tab is disabled. */
|
|
112
|
+
protected readonly activeIndex: _angular_core.Signal<number>;
|
|
113
|
+
private readonly activeTab;
|
|
114
|
+
/** Every tab that has been active, for lazy content that stays alive. */
|
|
115
|
+
private readonly visited;
|
|
116
|
+
/** The tab with focus inside the list, while it has any. */
|
|
117
|
+
protected readonly focusedIndex: _angular_core.WritableSignal<number | undefined>;
|
|
118
|
+
/** The one tab in the tab order: the focused one, else the active one. */
|
|
119
|
+
protected readonly tabbableIndex: _angular_core.Signal<number>;
|
|
120
|
+
constructor();
|
|
121
|
+
protected tabId(index: number): string;
|
|
122
|
+
protected panelId(index: number): string;
|
|
123
|
+
protected isLink(tab: NxeTabComponent): boolean;
|
|
124
|
+
/** True when a tab has a panel to point `aria-controls` at. */
|
|
125
|
+
protected hasPanel(tab: NxeTabComponent): boolean;
|
|
126
|
+
/** Whether the panel's content exists right now. */
|
|
127
|
+
protected isRendered(tab: NxeTabComponent, index: number): boolean;
|
|
128
|
+
protected select(index: number): void;
|
|
129
|
+
private commit;
|
|
130
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
131
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
132
|
+
private triggers;
|
|
133
|
+
private focusTab;
|
|
134
|
+
/** Moves focus to the tab that is in the tab order (the active one). */
|
|
135
|
+
focus(): void;
|
|
136
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeTabsComponent, never>;
|
|
137
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeTabsComponent, "nxe-tabs", never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; "isSignal": true; }; "selectedKey": { "alias": "selectedKey"; "required": false; "isSignal": true; }; "activation": { "alias": "activation"; "required": false; "isSignal": true; }; "keepAlive": { "alias": "keepAlive"; "required": false; "isSignal": true; }; "tablistLabel": { "alias": "tablistLabel"; "required": false; "isSignal": true; }; }, { "selectedIndex": "selectedIndexChange"; "selectedKey": "selectedKeyChange"; }, ["tabs"], never, true, never>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Marks the `<ng-template>` that holds a tab's lazy content. The template is stamped out the first
|
|
142
|
+
* time the tab is activated, not before, so a heavy panel (a grid, a chart) costs nothing until it
|
|
143
|
+
* is opened:
|
|
144
|
+
*
|
|
145
|
+
* ```html
|
|
146
|
+
* <nxe-tab label="Lines">
|
|
147
|
+
* <ng-template nxeTabContent><app-po-lines /></ng-template>
|
|
148
|
+
* </nxe-tab>
|
|
149
|
+
* ```
|
|
150
|
+
*
|
|
151
|
+
* Whether it is destroyed again when the tab is left is `keepAlive` on the tab or the tabs.
|
|
152
|
+
*/
|
|
153
|
+
declare class NxeTabContentDirective {
|
|
154
|
+
/** The template to render. */
|
|
155
|
+
readonly template: TemplateRef<unknown>;
|
|
156
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeTabContentDirective, never>;
|
|
157
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NxeTabContentDirective, "ng-template[nxeTabContent]", never, {}, {}, never, never, true, never>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** What a step reads from its `stepControl`. A control is not a signal, so each event copies this. */
|
|
161
|
+
interface NxeStepControlState {
|
|
162
|
+
readonly hasControl: boolean;
|
|
163
|
+
readonly valid: boolean;
|
|
164
|
+
readonly pristine: boolean;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* One step of an {@link NxeStepperComponent}. It draws nothing itself: the stepper renders the header
|
|
168
|
+
* and the panel from the inputs and content declared here.
|
|
169
|
+
*
|
|
170
|
+
* ```html
|
|
171
|
+
* <nxe-step label="Account" [stepControl]="account">
|
|
172
|
+
* <nxe-form-field label="Email"><nxe-text-box formControlName="email" /></nxe-form-field>
|
|
173
|
+
* </nxe-step>
|
|
174
|
+
* <nxe-step label="Documents" optional>
|
|
175
|
+
* <ng-template nxeStepContent><app-documents /></ng-template>
|
|
176
|
+
* </nxe-step>
|
|
177
|
+
* ```
|
|
178
|
+
*
|
|
179
|
+
* **Completed and error.** Left alone a step is completed once the user has been through it and its
|
|
180
|
+
* `stepControl` is valid, and shows the error state once they have been through it and the control is
|
|
181
|
+
* invalid. `completed` and `hasError` replace that with your own answer (a server check, say).
|
|
182
|
+
*/
|
|
183
|
+
declare class NxeStepComponent {
|
|
184
|
+
/** The step's title in the header. */
|
|
185
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
186
|
+
/** A line under the title. */
|
|
187
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
188
|
+
/**
|
|
189
|
+
* The form (a `FormGroup`, `FormArray` or `FormControl`) that has to be valid before a linear
|
|
190
|
+
* stepper lets the user past this step.
|
|
191
|
+
*/
|
|
192
|
+
readonly stepControl: _angular_core.InputSignal<AbstractControl<any, any, any> | null | undefined>;
|
|
193
|
+
/** Overrides the computed completed state. Unset, it is "visited and `stepControl` valid". */
|
|
194
|
+
readonly completed: _angular_core.InputSignalWithTransform<boolean | undefined, unknown>;
|
|
195
|
+
/** Overrides the computed error state. Unset, it is "visited and `stepControl` invalid". */
|
|
196
|
+
readonly hasError: _angular_core.InputSignalWithTransform<boolean | undefined, unknown>;
|
|
197
|
+
/** The step may be skipped: it does not hold a linear stepper back while its form is untouched. */
|
|
198
|
+
readonly optional: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
199
|
+
/** A completed step can be reopened. `false` locks it once the user has moved on. */
|
|
200
|
+
readonly editable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
201
|
+
/** Overrides the stepper's `keepAlive` for this step. */
|
|
202
|
+
readonly keepAlive: _angular_core.InputSignalWithTransform<boolean | undefined, unknown>;
|
|
203
|
+
private readonly lazy;
|
|
204
|
+
private readonly implicit;
|
|
205
|
+
/** True when the content was declared in an `nxeStepContent` template. */
|
|
206
|
+
readonly isLazy: _angular_core.Signal<boolean>;
|
|
207
|
+
/** The template the stepper stamps into the panel. */
|
|
208
|
+
readonly contentTemplate: _angular_core.Signal<TemplateRef<unknown>>;
|
|
209
|
+
/** The control's validity, kept in step with it through its `events` stream. */
|
|
210
|
+
readonly controlState: _angular_core.Signal<NxeStepControlState>;
|
|
211
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeStepComponent, never>;
|
|
212
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeStepComponent, "nxe-step", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "stepControl": { "alias": "stepControl"; "required": false; "isSignal": true; }; "completed": { "alias": "completed"; "required": false; "isSignal": true; }; "hasError": { "alias": "hasError"; "required": false; "isSignal": true; }; "optional": { "alias": "optional"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "keepAlive": { "alias": "keepAlive"; "required": false; "isSignal": true; }; }, {}, ["lazy"], ["*"], true, never>;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/** Direction the steps run in. A horizontal stepper turns vertical on a narrow host unless `responsive` is off. */
|
|
216
|
+
type NxeStepperOrientation = 'horizontal' | 'vertical';
|
|
217
|
+
/** What a step's marker shows: its number, a check once done, or an alert once it has errors. */
|
|
218
|
+
type NxeStepMarker = 'number' | 'completed' | 'error';
|
|
219
|
+
/** Emitted by `selectionChange` whenever the stepper moves through its API or the user. */
|
|
220
|
+
interface NxeStepperSelectionChange {
|
|
221
|
+
readonly previousIndex: number;
|
|
222
|
+
readonly selectedIndex: number;
|
|
223
|
+
}
|
|
224
|
+
/** What the template reads for one step; computed once per change instead of by method calls. */
|
|
225
|
+
interface StepView {
|
|
226
|
+
readonly step: NxeStepComponent;
|
|
227
|
+
readonly index: number;
|
|
228
|
+
readonly headerId: string;
|
|
229
|
+
readonly panelId: string;
|
|
230
|
+
readonly active: boolean;
|
|
231
|
+
readonly navigable: boolean;
|
|
232
|
+
readonly marker: NxeStepMarker;
|
|
233
|
+
readonly completed: boolean;
|
|
234
|
+
readonly error: boolean;
|
|
235
|
+
readonly rendered: boolean;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* `nxe-stepper` is a wizard: an ordered list of `nxe-step`s, one open at a time, with a header that
|
|
239
|
+
* shows where the user is and what is done.
|
|
240
|
+
*
|
|
241
|
+
* ```html
|
|
242
|
+
* <nxe-stepper linear [(selectedIndex)]="index" #wizard>
|
|
243
|
+
* <nxe-step label="Account" [stepControl]="account">...</nxe-step>
|
|
244
|
+
* <nxe-step label="Company" [stepControl]="company">...</nxe-step>
|
|
245
|
+
* <nxe-step label="Documents" optional>
|
|
246
|
+
* <ng-template nxeStepContent><app-documents /></ng-template>
|
|
247
|
+
* </nxe-step>
|
|
248
|
+
* <nxe-step label="Review">
|
|
249
|
+
* <nxe-button nxeStepperPrevious text="Back" />
|
|
250
|
+
* <nxe-button (onClick)="submit()" text="Submit" type="default" />
|
|
251
|
+
* </nxe-step>
|
|
252
|
+
* </nxe-stepper>
|
|
253
|
+
* ```
|
|
254
|
+
*
|
|
255
|
+
* **Linear and non-linear.** Non-linear (default) lets the user open any step. `linear` makes each step
|
|
256
|
+
* hold the user back until it is passable: its `stepControl` is valid (or `completed` says so). Pressing
|
|
257
|
+
* Next on a step that is not passable stays put, marks the step's controls as touched so `nxe-form-field`
|
|
258
|
+
* shows their errors, announces why, and emits `stepBlocked`. Headers of steps further on are not
|
|
259
|
+
* navigable until every step before them is complete. A programmatic `selectedIndex` is not checked.
|
|
260
|
+
*
|
|
261
|
+
* **API.** `selectedIndex` is a two-way model. `next()`, `previous()`, `select(i)` and `reset()` move it
|
|
262
|
+
* and return whether they did; `nxeStepperNext` and `nxeStepperPrevious` are directives that call
|
|
263
|
+
* `next()` and `previous()` from a button inside (or, given the stepper, outside) the steps.
|
|
264
|
+
*
|
|
265
|
+
* **Layout.** Horizontal puts the headers in a row over the open step; vertical stacks each header over its
|
|
266
|
+
* own panel. With `responsive` (default) a stepper narrower than `collapseBelow` px is vertical.
|
|
267
|
+
*
|
|
268
|
+
* **Accessibility.** The steps are an ordered list; the open step's header carries `aria-current="step"`.
|
|
269
|
+
* A header is a button while its step can be opened and plain text when it cannot. Arrow keys, Home and
|
|
270
|
+
* End move focus between headers. A polite live region announces each change of step ("Step 2 of 4:
|
|
271
|
+
* Company") and a blocked Next.
|
|
272
|
+
*/
|
|
273
|
+
declare class NxeStepperComponent {
|
|
274
|
+
/** Zero-based index of the open step. Two-way. */
|
|
275
|
+
readonly selectedIndex: _angular_core.ModelSignal<number>;
|
|
276
|
+
/** Each step must be passable before the next opens. */
|
|
277
|
+
readonly linear: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
278
|
+
/** `horizontal` (default) or `vertical`. */
|
|
279
|
+
readonly orientation: _angular_core.InputSignal<NxeStepperOrientation>;
|
|
280
|
+
/** A horizontal stepper turns vertical when its host is narrower than {@link collapseBelow}. */
|
|
281
|
+
readonly responsive: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
282
|
+
/** Host width, in px, under which a responsive horizontal stepper turns vertical. */
|
|
283
|
+
readonly collapseBelow: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
284
|
+
/** Keep a step's lazy content after leaving it. A step's own `keepAlive` overrides. */
|
|
285
|
+
readonly keepAlive: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
286
|
+
/** Accessible name of the list of steps; the active language's "Steps" when unset. */
|
|
287
|
+
readonly stepsLabel: _angular_core.InputSignal<string | undefined>;
|
|
288
|
+
/** The stepper moved to another step. */
|
|
289
|
+
readonly selectionChange: _angular_core.OutputEmitterRef<NxeStepperSelectionChange>;
|
|
290
|
+
/** A linear Next was refused; the value is the index of the step that is not complete. */
|
|
291
|
+
readonly stepBlocked: _angular_core.OutputEmitterRef<number>;
|
|
292
|
+
protected readonly steps: _angular_core.Signal<readonly NxeStepComponent[]>;
|
|
293
|
+
private readonly messages;
|
|
294
|
+
private readonly host;
|
|
295
|
+
private readonly destroyRef;
|
|
296
|
+
private readonly list;
|
|
297
|
+
private readonly uid;
|
|
298
|
+
/** Whether the host is under {@link collapseBelow}; set from a ResizeObserver. */
|
|
299
|
+
private readonly narrow;
|
|
300
|
+
/** The orientation actually drawn. */
|
|
301
|
+
protected readonly layout: _angular_core.Signal<NxeStepperOrientation>;
|
|
302
|
+
/** Index of the open step, kept inside the steps; -1 with no steps. */
|
|
303
|
+
readonly activeIndex: _angular_core.Signal<number>;
|
|
304
|
+
private readonly activeStep;
|
|
305
|
+
/** Steps that have been open at some point, the open one included. Resets with the stepper. */
|
|
306
|
+
private readonly visited;
|
|
307
|
+
/** Steps the user tried to leave while they were not passable. */
|
|
308
|
+
private readonly attempted;
|
|
309
|
+
/** The live region's text. Writable so a blocked Next can announce without moving. */
|
|
310
|
+
protected readonly announcement: _angular_core.WritableSignal<string>;
|
|
311
|
+
private blockedToggle;
|
|
312
|
+
/** True on the first step. */
|
|
313
|
+
readonly isFirst: _angular_core.Signal<boolean>;
|
|
314
|
+
/** True on the last step. */
|
|
315
|
+
readonly isLast: _angular_core.Signal<boolean>;
|
|
316
|
+
/** Whether Next would move: there is a step after this one and, when linear, this one is passable. */
|
|
317
|
+
readonly canNext: _angular_core.Signal<boolean>;
|
|
318
|
+
protected readonly views: _angular_core.Signal<readonly StepView[]>;
|
|
319
|
+
constructor();
|
|
320
|
+
/** Moves to the next step. Linear and not passable: stays, shows the step's errors, returns false. */
|
|
321
|
+
next(): boolean;
|
|
322
|
+
/** Moves to the previous step, which a linear stepper allows freely. False on the first step. */
|
|
323
|
+
previous(): boolean;
|
|
324
|
+
/** Opens step `index` if it can be opened from here; returns whether it did. */
|
|
325
|
+
select(index: number): boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Back to the first step with every step unvisited. `controls` (default `true`) also resets each
|
|
328
|
+
* step's `stepControl`, so the wizard starts over empty.
|
|
329
|
+
*/
|
|
330
|
+
reset(options?: {
|
|
331
|
+
controls?: boolean;
|
|
332
|
+
}): void;
|
|
333
|
+
private go;
|
|
334
|
+
/** Surfaces why a linear stepper stayed: errors on the fields, a message for assistive tech. */
|
|
335
|
+
private block;
|
|
336
|
+
private stepOf;
|
|
337
|
+
private interacted;
|
|
338
|
+
/** Whether a linear stepper lets the user leave `step` forward. */
|
|
339
|
+
private passable;
|
|
340
|
+
private isCompleted;
|
|
341
|
+
private hasError;
|
|
342
|
+
/** The first step between here and `target` that holds a linear stepper back. */
|
|
343
|
+
private firstBlocking;
|
|
344
|
+
/** Whether the user can open step `index` from the open one. */
|
|
345
|
+
private canOpen;
|
|
346
|
+
protected headerLabel(view: StepView): string;
|
|
347
|
+
protected stateText(view: StepView): string;
|
|
348
|
+
protected optionalText(): string;
|
|
349
|
+
protected listLabel(): string;
|
|
350
|
+
protected open(view: StepView): void;
|
|
351
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
352
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeStepperComponent, never>;
|
|
353
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeStepperComponent, "nxe-stepper", never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; "isSignal": true; }; "linear": { "alias": "linear"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "collapseBelow": { "alias": "collapseBelow"; "required": false; "isSignal": true; }; "keepAlive": { "alias": "keepAlive"; "required": false; "isSignal": true; }; "stepsLabel": { "alias": "stepsLabel"; "required": false; "isSignal": true; }; }, { "selectedIndex": "selectedIndexChange"; "selectionChange": "selectionChange"; "stepBlocked": "stepBlocked"; }, ["steps"], never, true, never>;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Marks the `<ng-template>` that holds a step's lazy content. The template is stamped out the first
|
|
358
|
+
* time the step is activated, not before, so a heavy step (a document upload, a review table) costs
|
|
359
|
+
* nothing until the user gets there:
|
|
360
|
+
*
|
|
361
|
+
* ```html
|
|
362
|
+
* <nxe-step label="Documents">
|
|
363
|
+
* <ng-template nxeStepContent><app-kyb-documents /></ng-template>
|
|
364
|
+
* </nxe-step>
|
|
365
|
+
* ```
|
|
366
|
+
*
|
|
367
|
+
* Whether it is destroyed again when the step is left is `keepAlive` on the step or the stepper.
|
|
368
|
+
*/
|
|
369
|
+
declare class NxeStepContentDirective {
|
|
370
|
+
/** The template to render. */
|
|
371
|
+
readonly template: TemplateRef<unknown>;
|
|
372
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeStepContentDirective, never>;
|
|
373
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NxeStepContentDirective, "ng-template[nxeStepContent]", never, {}, {}, never, never, true, never>;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Makes a button move its `nxe-stepper` to the next step. Put it on any element inside a step
|
|
378
|
+
* (`nxe-button`, a native `button`); from outside the stepper, give it the stepper:
|
|
379
|
+
*
|
|
380
|
+
* ```html
|
|
381
|
+
* <nxe-button nxeStepperNext text="Continue" type="default" />
|
|
382
|
+
* <button type="button" [nxeStepperNext]="wizard">Continue</button>
|
|
383
|
+
* ```
|
|
384
|
+
*
|
|
385
|
+
* It calls `next()`, so a linear stepper that is not ready to leave the step stays on it, marks the
|
|
386
|
+
* step's controls as touched and announces why. It does not disable the button: a blocked click is how
|
|
387
|
+
* the user finds out what is missing.
|
|
388
|
+
*/
|
|
389
|
+
declare class NxeStepperNextDirective {
|
|
390
|
+
private readonly parent;
|
|
391
|
+
/** The stepper to drive when the element is not inside one. */
|
|
392
|
+
readonly target: _angular_core.InputSignal<"" | NxeStepperComponent | null | undefined>;
|
|
393
|
+
protected stepper(): NxeStepperComponent | null;
|
|
394
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeStepperNextDirective, never>;
|
|
395
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NxeStepperNextDirective, "[nxeStepperNext]", never, { "target": { "alias": "nxeStepperNext"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Makes a button move its `nxe-stepper` back one step; the counterpart of `nxeStepperNext`. Going
|
|
400
|
+
* back is never validated, and on the first step it does nothing.
|
|
401
|
+
*
|
|
402
|
+
* ```html
|
|
403
|
+
* <nxe-button nxeStepperPrevious text="Back" stylingMode="outlined" />
|
|
404
|
+
* ```
|
|
405
|
+
*/
|
|
406
|
+
declare class NxeStepperPreviousDirective {
|
|
407
|
+
private readonly parent;
|
|
408
|
+
/** The stepper to drive when the element is not inside one. */
|
|
409
|
+
readonly target: _angular_core.InputSignal<"" | NxeStepperComponent | null | undefined>;
|
|
410
|
+
protected stepper(): NxeStepperComponent | null;
|
|
411
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeStepperPreviousDirective, never>;
|
|
412
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NxeStepperPreviousDirective, "[nxeStepperPrevious]", never, { "target": { "alias": "nxeStepperPrevious"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/** One crumb of an `nxe-breadcrumb`. */
|
|
416
|
+
interface NxeBreadcrumbItem {
|
|
417
|
+
/** The text. */
|
|
418
|
+
label: string;
|
|
419
|
+
/** Router commands (`['/pos', id]`) or a URL string. A crumb with neither this nor `href` is plain text. */
|
|
420
|
+
route?: string | readonly unknown[];
|
|
421
|
+
/** Query params of the `route` link. */
|
|
422
|
+
queryParams?: Params;
|
|
423
|
+
/** A plain link, for a page outside the router. `route` wins when both are set. */
|
|
424
|
+
href?: string;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* What a route's `data.breadcrumb` may be: the crumb's text, or a function of the route's resolved
|
|
428
|
+
* `data` that returns it (so a crumb can read a resolved document: `(data) => data['po'].number`).
|
|
429
|
+
* An empty result leaves the route out of the trail.
|
|
430
|
+
*/
|
|
431
|
+
type NxeBreadcrumbData = string | ((data: Data) => string);
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Marks the `<ng-template>` an `nxe-breadcrumb` draws between crumbs, for a separator that is markup
|
|
435
|
+
* (an icon) rather than the text of the `separator` input:
|
|
436
|
+
*
|
|
437
|
+
* ```html
|
|
438
|
+
* <nxe-breadcrumb [items]="items">
|
|
439
|
+
* <ng-template nxeBreadcrumbSeparator><svg viewBox="0 0 16 16">...</svg></ng-template>
|
|
440
|
+
* </nxe-breadcrumb>
|
|
441
|
+
* ```
|
|
442
|
+
*
|
|
443
|
+
* The separator is decoration (`aria-hidden`): the `<ol>` already says these are steps in a list.
|
|
444
|
+
*/
|
|
445
|
+
declare class NxeBreadcrumbSeparatorDirective {
|
|
446
|
+
/** The template to draw. */
|
|
447
|
+
readonly template: TemplateRef<unknown>;
|
|
448
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeBreadcrumbSeparatorDirective, never>;
|
|
449
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NxeBreadcrumbSeparatorDirective, "ng-template[nxeBreadcrumbSeparator]", never, {}, {}, never, never, true, never>;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/** What the template draws, in order: a crumb, or the overflow button standing for the folded ones. */
|
|
453
|
+
interface Slot {
|
|
454
|
+
/** The crumb, or `null` for the overflow button. */
|
|
455
|
+
readonly crumb: NxeBreadcrumbItem | null;
|
|
456
|
+
readonly last: boolean;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* `nxe-breadcrumb` shows where a page sits in the application, one link per level, for document pages
|
|
460
|
+
* that are a few levels deep.
|
|
461
|
+
*
|
|
462
|
+
* ```html
|
|
463
|
+
* <!-- from data -->
|
|
464
|
+
* <nxe-breadcrumb [items]="[
|
|
465
|
+
* { label: 'Pesanan', route: '/pos' },
|
|
466
|
+
* { label: 'PO-2026-0412', route: ['/pos', 412] },
|
|
467
|
+
* { label: 'Baris' }
|
|
468
|
+
* ]" />
|
|
469
|
+
*
|
|
470
|
+
* <!-- from the router: each route's data.breadcrumb, root to leaf -->
|
|
471
|
+
* <nxe-breadcrumb fromRoute />
|
|
472
|
+
* ```
|
|
473
|
+
*
|
|
474
|
+
* ```ts
|
|
475
|
+
* { path: 'pos', data: { breadcrumb: 'Pesanan' }, children: [
|
|
476
|
+
* { path: ':id', resolve: { po: poResolver }, data: { breadcrumb: (d: Data) => d['po'].number } },
|
|
477
|
+
* ] }
|
|
478
|
+
* ```
|
|
479
|
+
*
|
|
480
|
+
* **Sources.** `items` are the crumbs you list. With `fromRoute`, the crumbs of the active route follow
|
|
481
|
+
* them (so `items` can hold a fixed "Beranda"): the router state is walked from the root, every route that
|
|
482
|
+
* declares a `breadcrumb` (in `data` or `resolve`) adds one, linked to that route's own URL, and the trail
|
|
483
|
+
* is read again after every `NavigationEnd`. A `data.breadcrumb` is a string or `(data) => string`; an empty
|
|
484
|
+
* result drops the route.
|
|
485
|
+
*
|
|
486
|
+
* **Semantics.** A `<nav aria-label="Breadcrumb">` around an `<ol>`. The last crumb is the current page: plain
|
|
487
|
+
* text with `aria-current="page"`, never a link. A crumb with no `route` or `href` is text too. Separators
|
|
488
|
+
* are `aria-hidden`.
|
|
489
|
+
*
|
|
490
|
+
* **Long trails.** More crumbs than `maxItems` (default 5) keep the first and the last `maxItems - 1` and fold
|
|
491
|
+
* the middle into a "..." button that opens an `nxe-menu` of them. `maxItems` of 0 never folds.
|
|
492
|
+
*
|
|
493
|
+
* **Separator.** The `separator` input (a character, default `/`), or an `<ng-template nxeBreadcrumbSeparator>`
|
|
494
|
+
* for an icon.
|
|
495
|
+
*/
|
|
496
|
+
declare class NxeBreadcrumbComponent {
|
|
497
|
+
private readonly router;
|
|
498
|
+
private readonly messages;
|
|
499
|
+
/** The crumbs to show. */
|
|
500
|
+
readonly items: _angular_core.InputSignal<readonly NxeBreadcrumbItem[] | null | undefined>;
|
|
501
|
+
/** Add the crumbs of the active route's `data.breadcrumb`, after `items`. */
|
|
502
|
+
readonly fromRoute: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
503
|
+
/** Crumbs shown before the middle ones fold into a menu; 0 never folds. At least 2 otherwise. Default 5. */
|
|
504
|
+
readonly maxItems: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
505
|
+
/** Text between crumbs. Default `/`. */
|
|
506
|
+
readonly separator: _angular_core.InputSignal<string>;
|
|
507
|
+
/** Accessible name of the `nav`. Default "Breadcrumb" (`breadcrumb.label`). */
|
|
508
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
509
|
+
protected readonly separatorTemplate: _angular_core.Signal<NxeBreadcrumbSeparatorDirective | undefined>;
|
|
510
|
+
/** Bumped after each navigation so the route trail is read again. */
|
|
511
|
+
private readonly navigations;
|
|
512
|
+
protected readonly navLabel: _angular_core.Signal<string>;
|
|
513
|
+
protected readonly moreLabel: _angular_core.Signal<string>;
|
|
514
|
+
/** Every crumb, in order: `items`, then the route's. */
|
|
515
|
+
readonly crumbs: _angular_core.Signal<readonly NxeBreadcrumbItem[]>;
|
|
516
|
+
/** The crumbs folded into the menu: the middle ones past `maxItems`. */
|
|
517
|
+
protected readonly folded: _angular_core.Signal<readonly NxeBreadcrumbItem[]>;
|
|
518
|
+
protected readonly slots: _angular_core.Signal<readonly Slot[]>;
|
|
519
|
+
constructor();
|
|
520
|
+
/** `[from, to)` of the crumbs that fold; empty when everything fits. */
|
|
521
|
+
private foldRange;
|
|
522
|
+
/** One crumb per route, root to leaf, that declares a breadcrumb of its own. */
|
|
523
|
+
private routeCrumbs;
|
|
524
|
+
/** The commands of a crumb's `routerLink`. */
|
|
525
|
+
protected commands(crumb: NxeBreadcrumbItem): string | readonly unknown[];
|
|
526
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeBreadcrumbComponent, never>;
|
|
527
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeBreadcrumbComponent, "nxe-breadcrumb", ["nxeBreadcrumb"], { "items": { "alias": "items"; "required": false; "isSignal": true; }; "fromRoute": { "alias": "fromRoute"; "required": false; "isSignal": true; }; "maxItems": { "alias": "maxItems"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, {}, ["separatorTemplate"], never, true, never>;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export { NxeBreadcrumbComponent, NxeBreadcrumbSeparatorDirective, NxeStepComponent, NxeStepContentDirective, NxeStepperComponent, NxeStepperNextDirective, NxeStepperPreviousDirective, NxeTabComponent, NxeTabContentDirective, NxeTabsComponent };
|
|
531
|
+
export type { NxeBreadcrumbData, NxeBreadcrumbItem, NxeStepControlState, NxeStepMarker, NxeStepperOrientation, NxeStepperSelectionChange, NxeTabQueryParamsHandling, NxeTabsActivation };
|