@cngx/common 0.1.0-rc.6 → 0.1.0-rc.8
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/card/README.md +2 -1
- package/chart/README.md +85 -0
- package/command/README.md +157 -0
- package/data/README.md +33 -1
- package/dialog/README.md +23 -1
- package/fesm2022/cngx-common-a11y.mjs +356 -180
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +84 -42
- package/fesm2022/cngx-common-audio.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +311 -53
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +4360 -1625
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +171 -0
- package/fesm2022/cngx-common-command.mjs.map +1 -0
- package/fesm2022/cngx-common-data.mjs +1556 -616
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +518 -112
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +468 -87
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +2725 -1303
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +943 -164
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +769 -103
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +816 -348
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +2330 -1554
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +1170 -0
- package/fesm2022/cngx-common-timeline.mjs.map +1 -0
- package/fesm2022/cngx-common.mjs +2 -2
- package/fesm2022/cngx-common.mjs.map +1 -1
- package/interactive/README.md +15 -4
- package/layout/README.md +21 -1
- package/package.json +11 -1
- package/popover/README.md +18 -2
- package/stepper/README.md +7 -5
- package/theming/components/cngx-accordion.css +4 -1
- package/theming/components/cngx-backdrop.css +12 -0
- package/theming/components/cngx-badge.css +22 -0
- package/theming/components/cngx-bottom-sheet.css +14 -2
- package/theming/components/cngx-breadcrumb.css +8 -0
- package/theming/components/cngx-button-toggle.css +73 -5
- package/theming/components/cngx-data-grid.css +234 -1
- package/theming/components/cngx-dialog.css +25 -0
- package/theming/components/cngx-divider.css +12 -0
- package/theming/components/cngx-listbox.css +48 -12
- package/theming/components/cngx-menu.css +91 -15
- package/theming/components/cngx-popover.css +24 -0
- package/theming/components/cngx-recycler-placeholder.css +196 -0
- package/theming/components/cngx-ripple.css +2 -2
- package/theming/components/cngx-slider.css +32 -1
- package/theming/components/cngx-tooltip.css +23 -0
- package/timeline/README.md +155 -0
- package/types/cngx-common-a11y.d.ts +101 -31
- package/types/cngx-common-audio.d.ts +32 -32
- package/types/cngx-common-card.d.ts +211 -20
- package/types/cngx-common-chart.d.ts +1605 -169
- package/types/cngx-common-command.d.ts +190 -0
- package/types/cngx-common-data.d.ts +842 -163
- package/types/cngx-common-dialog.d.ts +372 -28
- package/types/cngx-common-display.d.ts +432 -148
- package/types/cngx-common-interactive.d.ts +1553 -370
- package/types/cngx-common-layout.d.ts +613 -27
- package/types/cngx-common-popover.d.ts +376 -36
- package/types/cngx-common-stepper.d.ts +414 -114
- package/types/cngx-common-tabs.d.ts +597 -72
- package/types/cngx-common-timeline.d.ts +1125 -0
- package/types/cngx-common.d.ts +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { InjectionToken, Signal, Provider, TemplateRef } from '@angular/core';
|
|
3
3
|
import * as i1 from '@cngx/common/a11y';
|
|
4
4
|
import { CngxAsyncState } from '@cngx/core/utils';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Reason why a card grid is empty
|
|
7
|
+
* Reason why a card grid is empty - drives empty-state template selection.
|
|
8
8
|
*
|
|
9
9
|
* @category common/card
|
|
10
10
|
*/
|
|
@@ -52,10 +52,30 @@ type EmptyReason = 'first-use' | 'no-results' | 'cleared';
|
|
|
52
52
|
declare class CngxCard {
|
|
53
53
|
private readonly uid;
|
|
54
54
|
private readonly rovingParent;
|
|
55
|
+
private readonly router;
|
|
56
|
+
private readonly i18n;
|
|
55
57
|
/** Semantic archetype: `'article'` (display), `'button'` (action), or `'link'` (navigation). */
|
|
56
58
|
readonly cardType: _angular_core.InputSignal<"article" | "link" | "button">;
|
|
57
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Navigation target when `as="link"`. Activation (click / Enter)
|
|
61
|
+
* navigates: internal URLs go through the app `Router` when one is
|
|
62
|
+
* provided, everything else (schemes, protocol-relative, router-less
|
|
63
|
+
* apps) through `window.location.assign`. The value is also mirrored
|
|
64
|
+
* as an `href` attribute on the host as a styling/testing hook - the
|
|
65
|
+
* host is not a native anchor, so browser-native link affordances
|
|
66
|
+
* (modifier-click new tab, context-menu link actions) do not apply.
|
|
67
|
+
*/
|
|
58
68
|
readonly href: _angular_core.InputSignal<string | undefined>;
|
|
69
|
+
/**
|
|
70
|
+
* Explicit ARIA role override for the host. Wins over the
|
|
71
|
+
* archetype-derived role. The primary use is `role="listitem"` on
|
|
72
|
+
* cards inside `<cngx-card-grid [semanticList]="true">` - the grid's
|
|
73
|
+
* `role="list"` requires listitem children, which the archetype
|
|
74
|
+
* binding would otherwise overwrite. Overriding the role on an
|
|
75
|
+
* interactive card replaces its button/link semantics; pair with an
|
|
76
|
+
* inner interactive element when both are needed.
|
|
77
|
+
*/
|
|
78
|
+
readonly role: _angular_core.InputSignal<string | undefined>;
|
|
59
79
|
/** Accessible label for the card. Overrides the default screen reader announcement. */
|
|
60
80
|
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
61
81
|
/** Two-way selection state. Only relevant when `selectable` is `true`. */
|
|
@@ -72,8 +92,8 @@ declare class CngxCard {
|
|
|
72
92
|
readonly interactive: _angular_core.Signal<boolean>;
|
|
73
93
|
/** @internal Host href for link cards. */
|
|
74
94
|
protected readonly hostHref: _angular_core.Signal<string | null>;
|
|
75
|
-
/** @internal Host element ARIA role. */
|
|
76
|
-
protected readonly hostRole: _angular_core.Signal<
|
|
95
|
+
/** @internal Host element ARIA role. Explicit `role` input wins over the archetype. */
|
|
96
|
+
protected readonly hostRole: _angular_core.Signal<string>;
|
|
77
97
|
/**
|
|
78
98
|
* @internal Tabindex management.
|
|
79
99
|
* When inside a CngxRovingTabindex parent (e.g. CngxCardGrid), the roving
|
|
@@ -85,19 +105,153 @@ declare class CngxCard {
|
|
|
85
105
|
protected readonly disabledReasonId: string;
|
|
86
106
|
/** @internal */
|
|
87
107
|
protected readonly liveRegionId: string;
|
|
88
|
-
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
108
|
+
/**
|
|
109
|
+
* @internal `aria-describedby` reference, gated on the disabled state it
|
|
110
|
+
* describes. The reason span stays in the DOM, but its id is emitted only
|
|
111
|
+
* while the card is disabled *with* a reason - accname 1.2 §2A traverses a
|
|
112
|
+
* directly-referenced hidden node, so referencing it unconditionally would
|
|
113
|
+
* announce the reason for a state the card is not in (a `disabledReason`
|
|
114
|
+
* set while `disabled` is false would read as "locked").
|
|
115
|
+
*/
|
|
116
|
+
protected readonly describedByIds: _angular_core.Signal<string | null>;
|
|
117
|
+
/**
|
|
118
|
+
* @internal Selection phrase with loading-start expiry: a real
|
|
119
|
+
* `selected` change (re)arms the phrase; a loading START spends an
|
|
120
|
+
* already-voiced phrase so the loading-clear content change cannot
|
|
121
|
+
* re-announce it (the region is `aria-atomic`). A toggle DURING
|
|
122
|
+
* loading keeps its phrase across the clear, so the change is voiced
|
|
123
|
+
* exactly once when the loading phrase yields.
|
|
124
|
+
*/
|
|
125
|
+
private readonly selectionPhrase;
|
|
126
|
+
/**
|
|
127
|
+
* @internal SR live announcement, driven by transitions rather than
|
|
128
|
+
* persistent state (Pillar 2: voice the change, not the standing
|
|
129
|
+
* state). Loading owns the region while active; otherwise the armed
|
|
130
|
+
* selection phrase renders (empty between transitions, so AT stays
|
|
131
|
+
* silent on no-op ticks).
|
|
132
|
+
*/
|
|
133
|
+
protected readonly liveAnnouncement: _angular_core.Signal<string>;
|
|
92
134
|
/** Emits when an interactive card is clicked or activated via keyboard. */
|
|
93
135
|
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
94
136
|
/** @internal */
|
|
95
137
|
protected handleHostClick(e: MouseEvent): void;
|
|
96
138
|
/** @internal */
|
|
97
139
|
protected handleHostKeydown(e: Event): void;
|
|
140
|
+
/**
|
|
141
|
+
* Navigation for the link archetype. Internal URLs prefer the app
|
|
142
|
+
* `Router` (SPA navigation, no full reload); external URLs and
|
|
143
|
+
* router-less apps fall back to `window.location.assign`.
|
|
144
|
+
*/
|
|
145
|
+
private navigateToHref;
|
|
98
146
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxCard, never>;
|
|
99
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxCard, "cngx-card", never, { "cardType": { "alias": "as"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledReason": { "alias": "disabledReason"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; "clicked": "clicked"; }, never, ["[cngxCardMedia]", "header[cngxCardHeader]", "[cngxCardBody]", "footer[cngxCardFooter]", "[cngxCardActions]", "*"], true, [{ directive: typeof i1.CngxRovingItem; inputs: {}; outputs: {}; }]>;
|
|
147
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxCard, "cngx-card", never, { "cardType": { "alias": "as"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledReason": { "alias": "disabledReason"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; "clicked": "clicked"; }, never, ["[cngxCardMedia]", "header[cngxCardHeader]", "[cngxCardBody]", "footer[cngxCardFooter]", "[cngxCardActions]", "*"], true, [{ directive: typeof i1.CngxRovingItem; inputs: {}; outputs: {}; }]>;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The card section of a {@link CngxLanguagePack}. Same keys as
|
|
152
|
+
* {@link CngxCardI18n}: the phrases a selectable card announces and the
|
|
153
|
+
* order of a {@link CngxCardTimestamp} prefix and its date.
|
|
154
|
+
*
|
|
155
|
+
* @category common/card/i18n
|
|
156
|
+
* @since 0.1.0
|
|
157
|
+
* @relatedTo CngxCard, CngxCardTimestamp
|
|
158
|
+
*/
|
|
159
|
+
interface CngxCardLanguageSection {
|
|
160
|
+
/** Announced when a selectable card becomes selected. */
|
|
161
|
+
readonly selected: string;
|
|
162
|
+
/** Announced when a selectable card becomes deselected. */
|
|
163
|
+
readonly deselected: string;
|
|
164
|
+
/** Owns the live region while the card loads, pre-empting the selection phrase. */
|
|
165
|
+
readonly loading: string;
|
|
166
|
+
/**
|
|
167
|
+
* Places a timestamp's prefix and its date: `{prefix}` and `{date}`, in the
|
|
168
|
+
* order the language reads them. Text around them renders as written, as a
|
|
169
|
+
* piece of its own with the host's gap on both sides - use it for words,
|
|
170
|
+
* not for punctuation that has to touch the prefix or the date. A plain
|
|
171
|
+
* string only: the timestamp renders the placeholders as elements, so a
|
|
172
|
+
* function value cannot place them.
|
|
173
|
+
*/
|
|
174
|
+
readonly timestamp: string;
|
|
100
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* The English card section: the single source of the card's English copy.
|
|
178
|
+
* `CNGX_CARD_I18N` defaults to it, and the shipped English pack is built from it.
|
|
179
|
+
*
|
|
180
|
+
* @category common/card/i18n
|
|
181
|
+
* @since 0.1.0
|
|
182
|
+
* @relatedTo CNGX_CARD_I18N
|
|
183
|
+
*/
|
|
184
|
+
declare const CNGX_CARD_LANGUAGE_EN: CngxCardLanguageSection;
|
|
185
|
+
declare module '@cngx/core/i18n' {
|
|
186
|
+
interface CngxLanguagePack {
|
|
187
|
+
readonly card: CngxCardLanguageSection;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Card i18n surface. Library defaults are English; consumers override via
|
|
193
|
+
* {@link provideCardI18n}. Sibling to `CNGX_STEPPER_I18N`, `CNGX_TABS_I18N`
|
|
194
|
+
* and `CNGX_CHART_I18N`.
|
|
195
|
+
*
|
|
196
|
+
* `selected`, `deselected` and `loading` are live-region copy. A selectable
|
|
197
|
+
* card announces the transition it just made, never the state it is standing
|
|
198
|
+
* in - so these are armed phrases, spent once per change, not a label the
|
|
199
|
+
* card carries. `timestamp` orders a {@link CngxCardTimestamp} prefix and its
|
|
200
|
+
* date. The same shape as the card section of a language pack, declared once
|
|
201
|
+
* as {@link CngxCardLanguageSection}.
|
|
202
|
+
*
|
|
203
|
+
* @category common/card/i18n
|
|
204
|
+
*/
|
|
205
|
+
type CngxCardI18n = CngxCardLanguageSection;
|
|
206
|
+
/**
|
|
207
|
+
* DI token for the card i18n bundle, a `Signal` so the phrases follow a
|
|
208
|
+
* runtime language switch. `providedIn: 'root'`: the card section of the
|
|
209
|
+
* active language pack over the English defaults.
|
|
210
|
+
*
|
|
211
|
+
* @category common/card/i18n
|
|
212
|
+
* @wcag AA
|
|
213
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/card/i18n/card-i18n.ts
|
|
214
|
+
* @since 0.1.0
|
|
215
|
+
* @relatedTo CngxCard
|
|
216
|
+
*/
|
|
217
|
+
declare const CNGX_CARD_I18N: InjectionToken<Signal<CngxCardLanguageSection>>;
|
|
218
|
+
/**
|
|
219
|
+
* Branded feature-fn for {@link provideCardI18n}.
|
|
220
|
+
*
|
|
221
|
+
* @category common/card/i18n
|
|
222
|
+
*/
|
|
223
|
+
type CngxCardI18nFeature = ((bundle: Signal<CngxCardI18n>) => Signal<CngxCardI18n>) & {
|
|
224
|
+
readonly _target: 'i18n';
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Override i18n labels via a partial bundle - unset keys keep the language
|
|
228
|
+
* pack's phrase, or the English default. Pass a `Signal` to switch the
|
|
229
|
+
* language at runtime.
|
|
230
|
+
*
|
|
231
|
+
* @category common/card/i18n
|
|
232
|
+
*/
|
|
233
|
+
declare function withCardI18nLabels(overrides: Partial<CngxCardI18n> | Signal<Partial<CngxCardI18n>>): CngxCardI18nFeature;
|
|
234
|
+
/**
|
|
235
|
+
* Provider for the card i18n bundle. The features apply on top of the active
|
|
236
|
+
* language pack, so a subtree can override single keys of the app's language.
|
|
237
|
+
*
|
|
238
|
+
* ```ts
|
|
239
|
+
* bootstrapApplication(AppComponent, {
|
|
240
|
+
* providers: [
|
|
241
|
+
* provideCardI18n(withCardI18nLabels({ selected: 'Ausgewählt', deselected: 'Abgewählt' })),
|
|
242
|
+
* ],
|
|
243
|
+
* });
|
|
244
|
+
* ```
|
|
245
|
+
*
|
|
246
|
+
* @category common/card/i18n
|
|
247
|
+
*/
|
|
248
|
+
declare function provideCardI18n(...features: readonly CngxCardI18nFeature[]): Provider;
|
|
249
|
+
/**
|
|
250
|
+
* Inject the resolved card i18n bundle.
|
|
251
|
+
*
|
|
252
|
+
* @category common/card/i18n
|
|
253
|
+
*/
|
|
254
|
+
declare function injectCardI18n(): Signal<CngxCardI18n>;
|
|
101
255
|
|
|
102
256
|
/**
|
|
103
257
|
* Structural slot directive for the card header region.
|
|
@@ -215,8 +369,15 @@ declare class CngxCardMedia {
|
|
|
215
369
|
readonly decorative: _angular_core.InputSignal<boolean>;
|
|
216
370
|
/** Aspect ratio applied via CSS `aspect-ratio` property. */
|
|
217
371
|
readonly aspectRatio: _angular_core.InputSignal<"16/9" | "4/3" | "1/1" | "auto">;
|
|
372
|
+
/**
|
|
373
|
+
* Native `loading` attribute for `<img>`/`<iframe>` hosts. Defaults to
|
|
374
|
+
* `lazy` - right for below-the-fold card lists; set `eager` on
|
|
375
|
+
* above-the-fold cards where lazy decoding costs LCP. `null` removes
|
|
376
|
+
* the attribute (non-loadable hosts like `<div>` backgrounds).
|
|
377
|
+
*/
|
|
378
|
+
readonly loading: _angular_core.InputSignal<"lazy" | "eager" | null>;
|
|
218
379
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxCardMedia, never>;
|
|
219
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxCardMedia, "[cngxCardMedia]", never, { "decorative": { "alias": "decorative"; "required": false; "isSignal": true; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
380
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxCardMedia, "[cngxCardMedia]", never, { "decorative": { "alias": "decorative"; "required": false; "isSignal": true; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
220
381
|
}
|
|
221
382
|
|
|
222
383
|
/**
|
|
@@ -458,7 +619,11 @@ declare class CngxCardGrid {
|
|
|
458
619
|
readonly gap: _angular_core.InputSignal<string>;
|
|
459
620
|
/** Grid density level - controls gap and card padding via CSS custom properties. */
|
|
460
621
|
readonly density: _angular_core.InputSignal<"compact" | "default" | "comfortable">;
|
|
461
|
-
/**
|
|
622
|
+
/**
|
|
623
|
+
* Whether the grid should have `role="list"`. Requires
|
|
624
|
+
* `role="listitem"` on each child - on `<cngx-card>` set it via the
|
|
625
|
+
* card's `role` input, which overrides the archetype-derived role.
|
|
626
|
+
*/
|
|
462
627
|
readonly semanticList: _angular_core.InputSignal<boolean>;
|
|
463
628
|
/**
|
|
464
629
|
* Optional data source. When provided and empty, the grid shows the matching
|
|
@@ -488,10 +653,18 @@ declare class CngxCardGrid {
|
|
|
488
653
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxCardGrid, "cngx-card-grid", never, { "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "semanticList": { "alias": "semanticList"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "emptyReason": { "alias": "emptyReason"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; }, {}, ["emptyTemplates"], ["*"], true, [{ directive: typeof i1.CngxRovingTabindex; inputs: { "orientation": "orientation"; "loop": "loop"; "activeIndex": "activeIndex"; "virtualCount": "virtualCount"; }; outputs: {}; }]>;
|
|
489
654
|
}
|
|
490
655
|
|
|
656
|
+
/** @internal One piece of the timestamp message, in reading order. */
|
|
657
|
+
interface TimestampSegment {
|
|
658
|
+
readonly kind: 'text' | 'prefix' | 'date';
|
|
659
|
+
readonly text: string;
|
|
660
|
+
}
|
|
491
661
|
/**
|
|
492
662
|
* Displays a formatted date/timestamp, typically in a card footer.
|
|
493
663
|
*
|
|
494
|
-
* Uses `Intl.DateTimeFormat` with the
|
|
664
|
+
* Uses `Intl.DateTimeFormat` with the app locale (`CNGX_LOCALE`, falling back
|
|
665
|
+
* to the nearest `LOCALE_ID`); a locale flip re-formats. The order of the
|
|
666
|
+
* prefix and the date comes from the `timestamp` message of the card
|
|
667
|
+
* language section (English `'{prefix} {date}'`).
|
|
495
668
|
*
|
|
496
669
|
* ```html
|
|
497
670
|
* <cngx-card>
|
|
@@ -508,21 +681,39 @@ declare class CngxCardGrid {
|
|
|
508
681
|
*/
|
|
509
682
|
declare class CngxCardTimestamp {
|
|
510
683
|
private readonly locale;
|
|
684
|
+
private readonly i18n;
|
|
511
685
|
/** Date to display. Accepts Date objects or ISO strings. */
|
|
512
686
|
readonly date: _angular_core.InputSignal<string | Date>;
|
|
513
|
-
/**
|
|
687
|
+
/**
|
|
688
|
+
* Optional prefix text (e.g. "Evaluierung am:"). Placed before or after the
|
|
689
|
+
* date by the `timestamp` message of the card language section.
|
|
690
|
+
*/
|
|
514
691
|
readonly prefix: _angular_core.InputSignal<string | undefined>;
|
|
515
692
|
/** `Intl.DateTimeFormatOptions` for the date. */
|
|
516
693
|
readonly format: _angular_core.InputSignal<Intl.DateTimeFormatOptions | undefined>;
|
|
517
|
-
/** @internal */
|
|
694
|
+
/** @internal Prefix, date and message text in the language's reading order. */
|
|
695
|
+
protected readonly segments: _angular_core.Signal<readonly TimestampSegment[]>;
|
|
696
|
+
/**
|
|
697
|
+
* @internal Coerced instant, deduped by time value so a fresh-ref
|
|
698
|
+
* `[date]` rebind of the same instant does not cascade the render
|
|
699
|
+
* graph. NaN pairs compare equal - two Invalid Dates must dedupe too
|
|
700
|
+
* (NaN !== NaN would defeat the arm). Mirrors `CngxTime.instant`.
|
|
701
|
+
*/
|
|
518
702
|
protected readonly dateObj: _angular_core.Signal<Date>;
|
|
519
|
-
/**
|
|
520
|
-
|
|
521
|
-
|
|
703
|
+
/**
|
|
704
|
+
* @internal Invalid Date guard. `toISOString()` throws and
|
|
705
|
+
* `Intl.format` renders garbage on an invalid instant - a bad ISO
|
|
706
|
+
* string must degrade to an empty render, not crash change detection.
|
|
707
|
+
*/
|
|
708
|
+
protected readonly isValidDate: _angular_core.Signal<boolean>;
|
|
709
|
+
/** @internal `null` (attribute removed) when the instant is invalid. */
|
|
710
|
+
protected readonly isoDate: _angular_core.Signal<string | null>;
|
|
711
|
+
/** @internal Empty string when the instant is invalid. */
|
|
522
712
|
protected readonly formattedDate: _angular_core.Signal<string>;
|
|
713
|
+
constructor();
|
|
523
714
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxCardTimestamp, never>;
|
|
524
715
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxCardTimestamp, "cngx-card-timestamp", never, { "date": { "alias": "date"; "required": true; "isSignal": true; }; "prefix": { "alias": "prefix"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
525
716
|
}
|
|
526
717
|
|
|
527
|
-
export { CngxCard, CngxCardAccent, CngxCardActions, CngxCardBadge, CngxCardBody, CngxCardFooter, CngxCardGrid, CngxCardGridEmpty, CngxCardHeader, CngxCardMedia, CngxCardSkeleton, CngxCardSubtitle, CngxCardTimestamp, CngxCardTitle };
|
|
528
|
-
export type { EmptyReason };
|
|
718
|
+
export { CNGX_CARD_I18N, CNGX_CARD_LANGUAGE_EN, CngxCard, CngxCardAccent, CngxCardActions, CngxCardBadge, CngxCardBody, CngxCardFooter, CngxCardGrid, CngxCardGridEmpty, CngxCardHeader, CngxCardMedia, CngxCardSkeleton, CngxCardSubtitle, CngxCardTimestamp, CngxCardTitle, injectCardI18n, provideCardI18n, withCardI18nLabels };
|
|
719
|
+
export type { CngxCardI18n, CngxCardI18nFeature, CngxCardLanguageSection, EmptyReason };
|