ng-hub-ui-panels 21.2.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 +378 -0
- package/fesm2022/ng-hub-ui-panels.mjs +1080 -0
- package/fesm2022/ng-hub-ui-panels.mjs.map +1 -0
- package/ng-hub-ui-panels-21.2.0.tgz +0 -0
- package/package.json +48 -0
- package/types/ng-hub-ui-panels.d.ts +399 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ElementRef, OnDestroy, TemplateRef } from '@angular/core';
|
|
3
|
+
import { Params } from '@angular/router';
|
|
4
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Marks an `<ng-template>` inside a `hub-panel` as that panel's custom header
|
|
8
|
+
* (strip link in `tabs`/`pills` view, disclosure button in `accordion` view),
|
|
9
|
+
* replacing the plain-text `heading` input.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <hub-panel>
|
|
14
|
+
* <ng-template hubPanelHeading><em>Rich</em> heading</ng-template>
|
|
15
|
+
* Panel content
|
|
16
|
+
* </hub-panel>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare class PanelHeadingDirective {
|
|
20
|
+
constructor();
|
|
21
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PanelHeadingDirective, never>;
|
|
22
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PanelHeadingDirective, "[hubPanelHeading]", never, {}, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Marks an element inside a `hub-panel` as the panel's content **header** band,
|
|
27
|
+
* projected at the top of the panel body (above `<ng-content>`).
|
|
28
|
+
*
|
|
29
|
+
* Unlike `hubPanelHeading` — which renders the navigational label in the
|
|
30
|
+
* `tabs`/`pills` strip or the `accordion` disclosure button — this header lives
|
|
31
|
+
* inside the panel body and renders in **every** view (`tabs`, `pills`,
|
|
32
|
+
* `accordion`, `card`). It is the natural title slot for the `card` format.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```html
|
|
36
|
+
* <hub-panel>
|
|
37
|
+
* <div hubPanelHeader>Card title</div>
|
|
38
|
+
* Card content
|
|
39
|
+
* <div hubPanelFooter>Actions</div>
|
|
40
|
+
* </hub-panel>
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
declare class PanelHeaderDirective {
|
|
44
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PanelHeaderDirective, never>;
|
|
45
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PanelHeaderDirective, "[hubPanelHeader]", never, {}, {}, never, never, true, never>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Marks an element inside a `hub-panel` as the panel's content **footer** band,
|
|
50
|
+
* projected at the bottom of the panel body (below `<ng-content>`).
|
|
51
|
+
*
|
|
52
|
+
* Renders in **every** view (`tabs`, `pills`, `accordion`, `card`); it is the
|
|
53
|
+
* natural actions/footer slot for the `card` format.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```html
|
|
57
|
+
* <hub-panel>
|
|
58
|
+
* <div hubPanelHeader>Card title</div>
|
|
59
|
+
* Card content
|
|
60
|
+
* <div hubPanelFooter>Actions</div>
|
|
61
|
+
* </hub-panel>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
declare class PanelFooterDirective {
|
|
65
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PanelFooterDirective, never>;
|
|
66
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PanelFooterDirective, "[hubPanelFooter]", never, {}, {}, never, never, true, never>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Visualization of the panels container: classic underlined/boxed `tabs`,
|
|
71
|
+
* rounded `pills`, stacked disclosure panels (`accordion`), or chromeless
|
|
72
|
+
* always-visible cards (`card`) with no navigation strip.
|
|
73
|
+
*/
|
|
74
|
+
type PanelsType = 'tabs' | 'pills' | 'accordion' | 'card';
|
|
75
|
+
/**
|
|
76
|
+
* Event emitted by {@link PanelsComponent.panelChange} when the user
|
|
77
|
+
* activates (opens) a panel.
|
|
78
|
+
*/
|
|
79
|
+
interface PanelChangeEvent {
|
|
80
|
+
/** The newly selected panel. */
|
|
81
|
+
current: PanelComponent;
|
|
82
|
+
/**
|
|
83
|
+
* The panel that was active before the change, if any. Not provided in
|
|
84
|
+
* accordion view with `multiple`, where several panels stay open.
|
|
85
|
+
*/
|
|
86
|
+
prev?: PanelComponent;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Injectable defaults for every `<hub-panels>` in the application.
|
|
91
|
+
*
|
|
92
|
+
* Override at any injector level to change the defaults globally or for a
|
|
93
|
+
* feature subtree:
|
|
94
|
+
*
|
|
95
|
+
* ```ts
|
|
96
|
+
* providers: [{ provide: PanelsConfig, useValue: { ...new PanelsConfig(), type: 'pills' } }]
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
declare class PanelsConfig {
|
|
100
|
+
/** Default navigation style — `'tabs'`, `'pills'` or `'accordion'`. */
|
|
101
|
+
type: PanelsType;
|
|
102
|
+
/** Whether keyboard navigation (arrows / Home / End / Delete) is enabled. */
|
|
103
|
+
isKeysAllowed: boolean;
|
|
104
|
+
/** Accessible label announced for the panel list. */
|
|
105
|
+
ariaLabel: string;
|
|
106
|
+
/** Accessible label for the backward scroll button (scrollable mode). */
|
|
107
|
+
scrollBackwardAriaLabel: string;
|
|
108
|
+
/** Accessible label for the forward scroll button (scrollable mode). */
|
|
109
|
+
scrollForwardAriaLabel: string;
|
|
110
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PanelsConfig, never>;
|
|
111
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PanelsConfig>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface MultipleHeaderGroup {
|
|
115
|
+
activePanel?: PanelComponent;
|
|
116
|
+
headers: PanelComponent[];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Content-panels container — the hub `panels` primitive.
|
|
120
|
+
*
|
|
121
|
+
* Projects `<hub-panel>` panes and renders them in one of three views:
|
|
122
|
+
*
|
|
123
|
+
* - **`tabs` / `pills`** — an accessible `tablist` of clickable headers
|
|
124
|
+
* (roving tabindex, arrow/Home/End/Delete keys) above the active pane.
|
|
125
|
+
* Panels with a `routerLink` switch the content area to a `<router-outlet>`
|
|
126
|
+
* and the active panel follows the URL. With `scrollable`, overflowing
|
|
127
|
+
* headers get backward/forward scroll buttons.
|
|
128
|
+
* - **`accordion`** — each panel renders as a stacked disclosure panel with an
|
|
129
|
+
* animated collapse: clicking an open header closes it, `multiple` allows
|
|
130
|
+
* several panels open at once and `flush` removes the outer chrome. All
|
|
131
|
+
* panels start collapsed unless a panel is marked `[active]` or a form value
|
|
132
|
+
* is bound. Routed panels are not supported in this view.
|
|
133
|
+
*
|
|
134
|
+
* The container implements `ControlValueAccessor`, so the active panel(s) can
|
|
135
|
+
* be bound as a form value (`ngModel` / `formControl`): each panel contributes
|
|
136
|
+
* its `value` (or its `id` by default), optionally narrowed with `bindValue`
|
|
137
|
+
* and compared with `compareWith`. With `multiple` the form value is an array.
|
|
138
|
+
*
|
|
139
|
+
* Theming is driven entirely by the `--hub-panels-*` CSS custom properties
|
|
140
|
+
* (see `panels.variables.scss`); the accordion view also honours the
|
|
141
|
+
* `--hub-accordion-*` ng-hub-ui contract as a compatibility fallback.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```html
|
|
145
|
+
* <hub-panels type="accordion" multiple [formControl]="openPanels">
|
|
146
|
+
* <hub-panel heading="Fields" value="fields">…</hub-panel>
|
|
147
|
+
* <hub-panel heading="Validations" value="validations">…</hub-panel>
|
|
148
|
+
* </hub-panels>
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
declare class PanelsComponent implements ControlValueAccessor {
|
|
152
|
+
#private;
|
|
153
|
+
/** Container-wide defaults (aria labels, default type, keyboard toggle). */
|
|
154
|
+
protected readonly config: PanelsConfig;
|
|
155
|
+
/** Scrollable container hosting the panel headers (`tabs` / `pills` views). */
|
|
156
|
+
readonly navScroller: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
|
|
157
|
+
/** Backward scroll button (only rendered while it can scroll back). */
|
|
158
|
+
readonly prevBtn: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
|
|
159
|
+
/** Forward scroll button (only rendered while it can scroll forward). */
|
|
160
|
+
readonly nextBtn: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
|
|
161
|
+
/** Parking lot that owns the projected panel hosts before they are placed. */
|
|
162
|
+
readonly contentRoot: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
|
|
163
|
+
/** Visible block hosts used by `multiple` tabs / pills. */
|
|
164
|
+
readonly multiplePaneHosts: _angular_core.Signal<readonly ElementRef<HTMLElement>[]>;
|
|
165
|
+
/** Visible grouped blocks used by `multiple` tabs / pills. */
|
|
166
|
+
readonly multipleBlocks: _angular_core.Signal<readonly ElementRef<HTMLElement>[]>;
|
|
167
|
+
/** Emitted when the user activates (opens) a different panel. */
|
|
168
|
+
readonly panelChange: _angular_core.OutputEmitterRef<PanelChangeEvent>;
|
|
169
|
+
/** Whether the panel list is stacked beside the content (`tabs` / `pills`). */
|
|
170
|
+
readonly vertical: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
171
|
+
/** Whether panel headers stretch to share the available width equally. */
|
|
172
|
+
readonly justified: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
173
|
+
/** Visualization — `'tabs'` (default), `'pills'` or `'accordion'`. */
|
|
174
|
+
readonly type: _angular_core.InputSignal<PanelsType>;
|
|
175
|
+
/** Whether keyboard navigation is enabled. */
|
|
176
|
+
readonly isKeysAllowed: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
177
|
+
/** Whether overflowing headers get backward/forward scroll buttons. */
|
|
178
|
+
readonly scrollable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
179
|
+
/** Accordion view: whether several panels may be expanded at once. */
|
|
180
|
+
readonly multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
181
|
+
/** Accordion view: edge-to-edge panels without outer borders or radius. */
|
|
182
|
+
readonly flush: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
183
|
+
/**
|
|
184
|
+
* Dot-notation path applied to each panel's `value` to obtain the emitted
|
|
185
|
+
* form value (e.g. `'meta.key'`). Empty by default — the raw value is used.
|
|
186
|
+
*/
|
|
187
|
+
readonly bindValue: _angular_core.InputSignal<string | undefined>;
|
|
188
|
+
/** Equality used to match form values against panel values. `===` by default. */
|
|
189
|
+
readonly compareWith: _angular_core.InputSignal<(a: unknown, b: unknown) => boolean>;
|
|
190
|
+
/** Registered panels, in projection order. */
|
|
191
|
+
readonly panels: _angular_core.WritableSignal<PanelComponent[]>;
|
|
192
|
+
/** Currently active panel, if any (the first one, under `multiple`). */
|
|
193
|
+
readonly activePanel: _angular_core.Signal<PanelComponent | undefined>;
|
|
194
|
+
/** Panel index lookup used by the strip templates and keyboard navigation. */
|
|
195
|
+
readonly panelIndexMap: _angular_core.Signal<Map<PanelComponent, number>>;
|
|
196
|
+
/** Whether the container renders the accordion visualization. */
|
|
197
|
+
readonly isAccordionView: _angular_core.Signal<boolean>;
|
|
198
|
+
/**
|
|
199
|
+
* Whether the container renders the chromeless `card` visualization: no
|
|
200
|
+
* navigation strip and every panel always visible, each styled as a card.
|
|
201
|
+
*/
|
|
202
|
+
readonly isCardView: _angular_core.Signal<boolean>;
|
|
203
|
+
/**
|
|
204
|
+
* Whether more than one panel may be active at once. Driven by `multiple`
|
|
205
|
+
* for every view, and always enabled in the `card` view, where all panels
|
|
206
|
+
* stay visible at once and must not deactivate one another.
|
|
207
|
+
*/
|
|
208
|
+
readonly allowsMultipleActive: _angular_core.Signal<boolean>;
|
|
209
|
+
/** Whether the bound form control disabled the whole container. */
|
|
210
|
+
readonly formDisabled: _angular_core.WritableSignal<boolean>;
|
|
211
|
+
/**
|
|
212
|
+
* Whether the active panel routes its content through a `<router-outlet>`.
|
|
213
|
+
* Never true in the accordion view, where routed panels are not supported.
|
|
214
|
+
*/
|
|
215
|
+
protected readonly activePanelHasRouter: _angular_core.Signal<boolean>;
|
|
216
|
+
/**
|
|
217
|
+
* In `multiple` tabs/pills, headers are partitioned into blocks. Every
|
|
218
|
+
* active panel starts a block; following inactive headers stay visible in
|
|
219
|
+
* that same block until the next active panel starts a new one.
|
|
220
|
+
*/
|
|
221
|
+
protected readonly multipleHeaderGroups: _angular_core.Signal<MultipleHeaderGroup[]>;
|
|
222
|
+
/** Whether the strip cannot scroll further backward. */
|
|
223
|
+
readonly backwardIsDisabled: _angular_core.WritableSignal<boolean>;
|
|
224
|
+
/** Whether the strip cannot scroll further forward. */
|
|
225
|
+
readonly forwardIsDisabled: _angular_core.WritableSignal<boolean>;
|
|
226
|
+
constructor();
|
|
227
|
+
/**
|
|
228
|
+
* Registers a panel in the container. Called by `PanelComponent` on
|
|
229
|
+
* construction — not meant for manual use.
|
|
230
|
+
*/
|
|
231
|
+
registerPanel(panel: PanelComponent): void;
|
|
232
|
+
/**
|
|
233
|
+
* Removes a panel from the container. `reselect` activates the closest
|
|
234
|
+
* enabled neighbour when the removed panel was active; `emit` fires the
|
|
235
|
+
* panel's `removed` output.
|
|
236
|
+
*/
|
|
237
|
+
removePanel(panel: PanelComponent, options?: {
|
|
238
|
+
reselect?: boolean;
|
|
239
|
+
emit?: boolean;
|
|
240
|
+
}): void;
|
|
241
|
+
/**
|
|
242
|
+
* Activates a panel on behalf of the user (`tabs` / `pills` views): marks it
|
|
243
|
+
* active, navigates when routed, and emits `panelChange`. In `multiple` mode
|
|
244
|
+
* clicking an active panel toggles it off (the panes render side by side);
|
|
245
|
+
* otherwise an already-active panel no-ops. Disabled panels always no-op.
|
|
246
|
+
*/
|
|
247
|
+
selectPanel(panel: PanelComponent): void;
|
|
248
|
+
/**
|
|
249
|
+
* Toggles a panel on behalf of the user (accordion view): an open panel
|
|
250
|
+
* closes, a closed one opens — closing the others unless `multiple`.
|
|
251
|
+
* Emits `panelChange` when a panel opens.
|
|
252
|
+
*/
|
|
253
|
+
togglePanel(panel: PanelComponent): void;
|
|
254
|
+
/**
|
|
255
|
+
* Marks the routed panel matching the current URL as active. Does not
|
|
256
|
+
* navigate — activation through this path is URL-driven. No-op in the
|
|
257
|
+
* accordion view, where routed panels are not supported.
|
|
258
|
+
*/
|
|
259
|
+
setActivePanel(): void;
|
|
260
|
+
/**
|
|
261
|
+
* Writes the form value into the container: panels whose (`bindValue`-mapped)
|
|
262
|
+
* value matches are activated, the rest are deactivated. With `multiple` an
|
|
263
|
+
* array is expected; otherwise a single value.
|
|
264
|
+
*/
|
|
265
|
+
writeValue(value: unknown): void;
|
|
266
|
+
/** Registers the form-control change callback. */
|
|
267
|
+
registerOnChange(onChange: (value: unknown) => void): void;
|
|
268
|
+
/** Registers the form-control touched callback. */
|
|
269
|
+
registerOnTouched(onTouched: () => void): void;
|
|
270
|
+
/** Enables/disables every panel header on behalf of the form control. */
|
|
271
|
+
setDisabledState(isDisabled: boolean): void;
|
|
272
|
+
/** Keyboard navigation for the panel strip (arrows / Home / End / Delete). */
|
|
273
|
+
protected onPanelKeydown(event: KeyboardEvent, index: number): void;
|
|
274
|
+
/**
|
|
275
|
+
* Keyboard navigation between accordion headers (arrows / Home / End /
|
|
276
|
+
* Delete). Enter and Space toggle natively through the button click.
|
|
277
|
+
*/
|
|
278
|
+
onAccordionKeydown(event: KeyboardEvent, panel: PanelComponent): void;
|
|
279
|
+
/** Recomputes the enabled/disabled state of the scroll buttons. */
|
|
280
|
+
protected updateScrollButtons(): void;
|
|
281
|
+
/** Re-syncs scroll controls and multiple-block sizing on window resize. */
|
|
282
|
+
protected onWindowResize(): void;
|
|
283
|
+
/** Updates the scroll buttons as the strip scrolls. */
|
|
284
|
+
protected onScroll(): void;
|
|
285
|
+
/** Global index of a panel within the projected strip order. */
|
|
286
|
+
protected panelIndex(panel: PanelComponent): number;
|
|
287
|
+
/** Scrolls the panel headers one viewport backward. */
|
|
288
|
+
protected navBackward(): void;
|
|
289
|
+
/** Scrolls the panel headers one viewport forward. */
|
|
290
|
+
protected navForward(): void;
|
|
291
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PanelsComponent, never>;
|
|
292
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PanelsComponent, "hub-panels", never, { "vertical": { "alias": "vertical"; "required": false; "isSignal": true; }; "justified": { "alias": "justified"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "isKeysAllowed": { "alias": "isKeysAllowed"; "required": false; "isSignal": true; }; "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "flush": { "alias": "flush"; "required": false; "isSignal": true; }; "bindValue": { "alias": "bindValue"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; }, { "panelChange": "panelChange"; }, never, ["*"], true, never>;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* One content panel inside a `<hub-panels>` container.
|
|
297
|
+
*
|
|
298
|
+
* In the `tabs` / `pills` views the host element is the tab *panel*
|
|
299
|
+
* (`role="tabpanel"`) and the clickable header is rendered by
|
|
300
|
+
* {@link PanelsComponent} in the strip. In the `accordion` view this component
|
|
301
|
+
* renders its own disclosure header plus an animated collapse wrapper around
|
|
302
|
+
* the projected content. In every view the header comes from `heading` or from
|
|
303
|
+
* a `<ng-template hubPanelHeading>` projected inside this element.
|
|
304
|
+
*
|
|
305
|
+
* Panels can be plain content panes or routed: when `routerLink` is set, the
|
|
306
|
+
* container renders a `<router-outlet>` instead of the projected panels and
|
|
307
|
+
* the active panel follows the current URL (`tabs` / `pills` views only).
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```html
|
|
311
|
+
* <hub-panels>
|
|
312
|
+
* <hub-panel heading="Fields">…</hub-panel>
|
|
313
|
+
* <hub-panel>
|
|
314
|
+
* <ng-template hubPanelHeading>Validations <span class="badge">3</span></ng-template>
|
|
315
|
+
* …
|
|
316
|
+
* </hub-panel>
|
|
317
|
+
* </hub-panels>
|
|
318
|
+
* ```
|
|
319
|
+
*/
|
|
320
|
+
declare class PanelComponent implements OnDestroy {
|
|
321
|
+
#private;
|
|
322
|
+
/** Host element reference — exposed so the container can detach removed panes. */
|
|
323
|
+
readonly elementRef: ElementRef<HTMLElement>;
|
|
324
|
+
/**
|
|
325
|
+
* Owning panels container, or `null` when the panel is used standalone
|
|
326
|
+
* (outside any `<hub-panels>`), in which case it renders as a card.
|
|
327
|
+
* Exposed to the template for the accordion header.
|
|
328
|
+
*/
|
|
329
|
+
protected readonly tabset: PanelsComponent | null;
|
|
330
|
+
/** Plain-text panel header. Ignored when a `hubPanelHeading` template exists. */
|
|
331
|
+
readonly heading: _angular_core.InputSignal<string | undefined>;
|
|
332
|
+
/**
|
|
333
|
+
* Unique id used for the `tab` / `tabpanel` (or accordion header / region)
|
|
334
|
+
* ARIA pairing. Auto-generated (`hub-panel-<n>`) when not provided.
|
|
335
|
+
*/
|
|
336
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
337
|
+
/** Whether the panel cannot be activated. */
|
|
338
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
339
|
+
/** Whether the panel shows a remove affordance (✕ and the Delete key). */
|
|
340
|
+
readonly removable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
341
|
+
/**
|
|
342
|
+
* URL comparison used to mark routed panels active: `'route'` compares the
|
|
343
|
+
* path only, `'full'` also compares query params.
|
|
344
|
+
*/
|
|
345
|
+
readonly pathMatch: _angular_core.InputSignal<"route" | "full">;
|
|
346
|
+
/** Navigation target that turns this panel into a routed panel. */
|
|
347
|
+
readonly routerLink: _angular_core.InputSignal<string | string[] | null | undefined>;
|
|
348
|
+
/** Query params appended when navigating to `routerLink`. */
|
|
349
|
+
readonly queryParams: _angular_core.InputSignal<Params | null | undefined>;
|
|
350
|
+
/** Extra CSS classes applied to both the nav item and this pane. */
|
|
351
|
+
readonly customClass: _angular_core.InputSignal<string | undefined>;
|
|
352
|
+
/**
|
|
353
|
+
* Value this panel contributes when the container is used as a form control
|
|
354
|
+
* (see {@link PanelsComponent} `ControlValueAccessor`). Defaults to `id`.
|
|
355
|
+
*/
|
|
356
|
+
readonly value: _angular_core.InputSignal<unknown>;
|
|
357
|
+
/** Whether the panel is currently active (expanded, in the accordion view). */
|
|
358
|
+
readonly active: _angular_core.ModelSignal<boolean>;
|
|
359
|
+
/** Emitted when the panel becomes active. */
|
|
360
|
+
readonly selectPanel: _angular_core.OutputEmitterRef<PanelComponent>;
|
|
361
|
+
/** Emitted when the panel stops being active. */
|
|
362
|
+
readonly deselectPanel: _angular_core.OutputEmitterRef<PanelComponent>;
|
|
363
|
+
/** Emitted when the panel is removed through the ✕ button or the Delete key. */
|
|
364
|
+
readonly removed: _angular_core.OutputEmitterRef<PanelComponent>;
|
|
365
|
+
/** Custom header template registered by `PanelHeadingDirective`. */
|
|
366
|
+
readonly headingRef: _angular_core.WritableSignal<TemplateRef<unknown> | undefined>;
|
|
367
|
+
/** Whether the owning container renders the accordion visualization. */
|
|
368
|
+
protected readonly accordionView: _angular_core.Signal<boolean>;
|
|
369
|
+
/**
|
|
370
|
+
* Whether this panel renders as a card: either inside a `<hub-panels
|
|
371
|
+
* type="card">` container or standalone (no owning container at all).
|
|
372
|
+
*/
|
|
373
|
+
protected readonly cardView: _angular_core.Signal<boolean>;
|
|
374
|
+
/** Form value resolved for this panel: the explicit `value` or the panel id. */
|
|
375
|
+
readonly formValue: _angular_core.Signal<unknown>;
|
|
376
|
+
/** `routerLink` normalised to a segments array, or `null` when not routed. */
|
|
377
|
+
readonly routerUrl: _angular_core.Signal<string[] | null>;
|
|
378
|
+
constructor();
|
|
379
|
+
ngOnDestroy(): void;
|
|
380
|
+
/** Route path plus query string, or `null` when the panel is not routed. */
|
|
381
|
+
getFullRoute(): string | null;
|
|
382
|
+
/** Normalised absolute route path, or `null` when the panel is not routed. */
|
|
383
|
+
getRoute(): string | null;
|
|
384
|
+
/** `queryParams` serialised as `key=value&…`, or `null` when empty. */
|
|
385
|
+
getQueryParamsString(): string | null;
|
|
386
|
+
/** Navigates to the panel's route. No-op for non-routed panels. */
|
|
387
|
+
navigate(): void;
|
|
388
|
+
/** Accordion header click — toggles this panel through the container. */
|
|
389
|
+
protected onAccordionHeaderClick(): void;
|
|
390
|
+
/** Accordion header keyboard navigation, delegated to the container. */
|
|
391
|
+
protected onAccordionHeaderKeydown(event: KeyboardEvent): void;
|
|
392
|
+
/** Removes this panel through the accordion header's ✕ affordance. */
|
|
393
|
+
protected removeSelf(): void;
|
|
394
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PanelComponent, never>;
|
|
395
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PanelComponent, "hub-panel, [hub-panel]", ["hubPanel"], { "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "pathMatch": { "alias": "pathMatch"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "queryParams": { "alias": "queryParams"; "required": false; "isSignal": true; }; "customClass": { "alias": "customClass"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; }, { "active": "activeChange"; "selectPanel": "selectPanel"; "deselectPanel": "deselectPanel"; "removed": "removed"; }, never, ["[hubPanelHeader]", "*", "[hubPanelFooter]"], true, never>;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export { PanelComponent, PanelFooterDirective, PanelHeaderDirective, PanelHeadingDirective, PanelsComponent, PanelsConfig };
|
|
399
|
+
export type { PanelChangeEvent, PanelsType };
|