@design-factory/angular 21.0.0-next.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/LICENSE +26 -0
- package/README.md +3 -0
- package/fesm2022/design-factory-angular-accordion.mjs +55 -0
- package/fesm2022/design-factory-angular-accordion.mjs.map +1 -0
- package/fesm2022/design-factory-angular-config.mjs +22 -0
- package/fesm2022/design-factory-angular-config.mjs.map +1 -0
- package/fesm2022/design-factory-angular-drawer.mjs +297 -0
- package/fesm2022/design-factory-angular-drawer.mjs.map +1 -0
- package/fesm2022/design-factory-angular-internals.mjs +111 -0
- package/fesm2022/design-factory-angular-internals.mjs.map +1 -0
- package/fesm2022/design-factory-angular-sidenav.mjs +1354 -0
- package/fesm2022/design-factory-angular-sidenav.mjs.map +1 -0
- package/fesm2022/design-factory-angular.mjs +12 -0
- package/fesm2022/design-factory-angular.mjs.map +1 -0
- package/package.json +59 -0
- package/schematics/collection.json +10 -0
- package/schematics/ng-add/index.d.ts +3 -0
- package/schematics/ng-add/index.js +65 -0
- package/schematics/ng-add/schema.d.ts +6 -0
- package/schematics/ng-add/schema.js +2 -0
- package/schematics/ng-add/schema.json +15 -0
- package/types/design-factory-angular-accordion.d.ts +47 -0
- package/types/design-factory-angular-config.d.ts +24 -0
- package/types/design-factory-angular-drawer.d.ts +136 -0
- package/types/design-factory-angular-internals.d.ts +83 -0
- package/types/design-factory-angular-sidenav.d.ts +367 -0
- package/types/design-factory-angular.d.ts +6 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { FactoryProvider, OnChanges, OnInit, AfterContentChecked, SimpleChanges } from '@angular/core';
|
|
3
|
+
import * as _agnos_ui_angular_headless from '@agnos-ui/angular-headless';
|
|
4
|
+
import { WidgetsConfigStore, Widget, AngularWidget } from '@agnos-ui/angular-headless';
|
|
5
|
+
import { ReadableSignal } from '@amadeus-it-group/tansu';
|
|
6
|
+
|
|
7
|
+
declare const provideWidgetsConfig: (adaptParentConfig?: ((config: Partial<{
|
|
8
|
+
[x: string]: object;
|
|
9
|
+
}>) => Partial<{
|
|
10
|
+
[x: string]: object;
|
|
11
|
+
}>) | undefined) => FactoryProvider;
|
|
12
|
+
declare const injectWidgetsConfig: (config?: Partial<{
|
|
13
|
+
[x: string]: object;
|
|
14
|
+
}> | undefined) => WidgetsConfigStore<{
|
|
15
|
+
[widgetName: string]: object;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates and initializes a widget using the provided factory and configuration options.
|
|
19
|
+
*
|
|
20
|
+
* The resulting widget can be easily hooked into the lifecycle of an Angular component through {@link BaseWidgetDirective}.
|
|
21
|
+
*
|
|
22
|
+
* @template W - The type of the widget.
|
|
23
|
+
* @param factory - The factory function to create the widget.
|
|
24
|
+
* @param options - The options for creating the widget.
|
|
25
|
+
* @param options.defaultConfig - The default configuration for the widget.
|
|
26
|
+
* @param options.events - The event handlers for the widget.
|
|
27
|
+
* @param options.slotTemplates - A function that returns the slot templates for the widget.
|
|
28
|
+
* @param options.slotChildren - A function that returns the slot children for the widget.
|
|
29
|
+
* @param options.afterInit - A callback function to be called after the widget is initialized.
|
|
30
|
+
* @returns The initialized widget.
|
|
31
|
+
*/
|
|
32
|
+
declare const callWidgetFactory: <W extends _agnos_ui_angular_headless.Widget>(factory: _agnos_ui_angular_headless.WidgetFactory<W>, options?: {
|
|
33
|
+
defaultConfig?: Partial<_agnos_ui_angular_headless.WidgetProps<W>> | ReadableSignal<Partial<_agnos_ui_angular_headless.WidgetProps<W>> | undefined>;
|
|
34
|
+
events?: Partial<Pick<_agnos_ui_angular_headless.WidgetProps<W>, keyof _agnos_ui_angular_headless.WidgetProps<W> & `on${string}`>>;
|
|
35
|
+
afterInit?: (widget: _agnos_ui_angular_headless.AngularWidget<W>) => void;
|
|
36
|
+
slotTemplates?: () => { [K in keyof _agnos_ui_angular_headless.WidgetProps<W> as _agnos_ui_angular_headless.IsSlotContent<_agnos_ui_angular_headless.WidgetProps<W>[K]> extends 0 ? never : K]: _agnos_ui_angular_headless.WidgetProps<W>[K] extends _agnos_ui_angular_headless.SlotContent<infer U> ? _angular_core.TemplateRef<U> | undefined : never; };
|
|
37
|
+
slotChildren?: () => _angular_core.TemplateRef<void> | undefined;
|
|
38
|
+
}) => _agnos_ui_angular_headless.AngularWidget<W>;
|
|
39
|
+
/**
|
|
40
|
+
* Utility to provide configuration for a specific DF component.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* export const provideDfCollapseConfig = provideDfComponentConfig<DfCollapseConfig>(COLLAPSE_CONFIG_KEY);
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @param componentKey the key of the component in the global configuration
|
|
48
|
+
* @returns the component config provider
|
|
49
|
+
*/
|
|
50
|
+
declare const provideDfComponentConfig: <T>(componentKey: string) => (config?: Partial<T> | ((prevConfig: Partial<T>) => Partial<T>)) => FactoryProvider;
|
|
51
|
+
/**
|
|
52
|
+
* Utility to inject writable configuration for a specific DF component.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```typescript
|
|
56
|
+
* export const injectDfCollapseConfig = injectDfComponentConfig<DfCollapseConfig>(COLLAPSE_CONFIG_KEY);
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @param componentKey the key of the component in the global configuration
|
|
60
|
+
* @returns the inject function that returns the writable component configuration
|
|
61
|
+
*/
|
|
62
|
+
declare const injectDfComponentConfig: <T>(componentKey: string) => () => _angular_core.WritableSignal<Partial<T>>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* An abstract base class for widget directives, providing common functionality
|
|
66
|
+
* for Angular components that interact with widgets.
|
|
67
|
+
*
|
|
68
|
+
* @template W - The type of the widget.
|
|
69
|
+
*/
|
|
70
|
+
declare abstract class AgnosWidgetDirective<W extends Widget> implements OnChanges, OnInit, AfterContentChecked {
|
|
71
|
+
protected readonly _agnosWidget: AngularWidget<W>;
|
|
72
|
+
constructor(_agnosWidget: AngularWidget<W>);
|
|
73
|
+
/** @internal */
|
|
74
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
75
|
+
/** @internal */
|
|
76
|
+
ngOnInit(): void;
|
|
77
|
+
/** @internal */
|
|
78
|
+
ngAfterContentChecked(): void;
|
|
79
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AgnosWidgetDirective<any>, never>;
|
|
80
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AgnosWidgetDirective<any>, never, never, {}, {}, never, never, true, never>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export { AgnosWidgetDirective, callWidgetFactory, injectDfComponentConfig, injectWidgetsConfig, provideDfComponentConfig, provideWidgetsConfig };
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import * as _agnos_ui_angular_headless from '@agnos-ui/angular-headless';
|
|
2
|
+
import { NavManagerItemConfig } from '@agnos-ui/angular-headless';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { ElementRef, Signal, AfterContentInit } from '@angular/core';
|
|
5
|
+
import { IsActiveMatchOptions } from '@angular/router';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Base link class that is extended by desktop and mobile link components
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
declare abstract class DfSidenavLinkBaseComponent {
|
|
12
|
+
/**
|
|
13
|
+
* The router link path for to the link
|
|
14
|
+
*/
|
|
15
|
+
readonly linkPath: _angular_core.InputSignal<string>;
|
|
16
|
+
/**
|
|
17
|
+
* The label of the link
|
|
18
|
+
*/
|
|
19
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
20
|
+
/**
|
|
21
|
+
* The icon class name or inline content (e.g., font awesome class)
|
|
22
|
+
*/
|
|
23
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the wrapper component has icon content (internally used)
|
|
26
|
+
*/
|
|
27
|
+
readonly wrapperHasIconContent: _angular_core.InputSignal<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Indicates if the link is currently active based on the Router state
|
|
30
|
+
*/
|
|
31
|
+
readonly isActiveLink: _angular_core.WritableSignal<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* Options to determine when the router link is considered active
|
|
34
|
+
*/
|
|
35
|
+
readonly routerLinkActiveOptions: _angular_core.InputSignal<IsActiveMatchOptions | {
|
|
36
|
+
exact: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
protected readonly isSmallScreen: _angular_core.Signal<boolean>;
|
|
39
|
+
protected readonly sidenav: DfSidenavComponent;
|
|
40
|
+
protected readonly parentItem: DfSidenavItemComponent | null;
|
|
41
|
+
protected readonly isFirstLevel: boolean;
|
|
42
|
+
protected readonly iconContent: _angular_core.Signal<unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Computed signal indicating if the link is visible based on search term
|
|
45
|
+
*/
|
|
46
|
+
protected readonly isVisible: _angular_core.Signal<boolean>;
|
|
47
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DfSidenavLinkBaseComponent, never>;
|
|
48
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DfSidenavLinkBaseComponent, never, never, { "linkPath": { "alias": "linkPath"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "wrapperHasIconContent": { "alias": "wrapperHasIconContent"; "required": false; "isSignal": true; }; "routerLinkActiveOptions": { "alias": "routerLinkActiveOptions"; "required": false; "isSignal": true; }; }, {}, ["iconContent"], never, true, never>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Component representing a leaf in the sidenav for desktop devices
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
declare class DfSidenavLinkDesktopComponent extends DfSidenavLinkBaseComponent {
|
|
56
|
+
protected readonly anchor: _angular_core.Signal<ElementRef<HTMLAnchorElement>>;
|
|
57
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DfSidenavLinkDesktopComponent, never>;
|
|
58
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DfSidenavLinkDesktopComponent, "df-sidenav-link-desktop", never, {}, {}, never, ["[dfSidenavIcon]"], true, never>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Base item class that is extended by desktop and mobile item components
|
|
63
|
+
* The item represents a container which can hold other items or links
|
|
64
|
+
* Handles collapsed state
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
declare abstract class DfSidenavItemBaseComponent {
|
|
68
|
+
/**
|
|
69
|
+
* The label of the item
|
|
70
|
+
*/
|
|
71
|
+
readonly label: _angular_core.InputSignal<unknown>;
|
|
72
|
+
/**
|
|
73
|
+
* Collapsed state of the item
|
|
74
|
+
* Only used for the desktop version
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
readonly collapsed: _angular_core.ModelSignal<boolean>;
|
|
78
|
+
/**
|
|
79
|
+
* The icon class name or inline content (e.g., font awesome class)
|
|
80
|
+
* @default ''
|
|
81
|
+
*/
|
|
82
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the wrapper component has icon content (internally used)
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
readonly wrapperHasIconContent: _angular_core.InputSignal<boolean>;
|
|
88
|
+
protected readonly sidenav: DfSidenavComponent;
|
|
89
|
+
protected readonly wrapperInstance: DfSidenavItemComponent;
|
|
90
|
+
protected readonly parentItem: DfSidenavItemComponent | null;
|
|
91
|
+
protected readonly isFirstLevel: boolean;
|
|
92
|
+
protected readonly iconContent: Signal<unknown>;
|
|
93
|
+
protected abstract childLinks: Signal<readonly (DfSidenavLinkBaseComponent | undefined)[]>;
|
|
94
|
+
protected abstract childItems: Signal<readonly (DfSidenavItemBaseComponent | undefined)[]>;
|
|
95
|
+
protected readonly hasActiveLinks: Signal<boolean>;
|
|
96
|
+
protected readonly hasActiveItems: Signal<boolean>;
|
|
97
|
+
protected readonly hasActiveChildren: Signal<boolean>;
|
|
98
|
+
/**
|
|
99
|
+
* Computed signal indicating if the item has visible children
|
|
100
|
+
*/
|
|
101
|
+
protected readonly hasVisibleChildren: Signal<boolean>;
|
|
102
|
+
/**
|
|
103
|
+
* Method to toggle the collapsed state of the item
|
|
104
|
+
* If the sidenav is minimized, it will expand it and uncollapse the item
|
|
105
|
+
*/
|
|
106
|
+
toggleCollapse(): void;
|
|
107
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DfSidenavItemBaseComponent, never>;
|
|
108
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DfSidenavItemBaseComponent, never, never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "wrapperHasIconContent": { "alias": "wrapperHasIconContent"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, ["iconContent"], never, true, never>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Component representing an item in the sidenav for desktop devices
|
|
113
|
+
* The item represents a container which can hold other items or links
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
declare class DfSidenavItemDesktopComponent extends DfSidenavItemBaseComponent {
|
|
117
|
+
protected readonly childLinks: _angular_core.Signal<(DfSidenavLinkDesktopComponent | undefined)[]>;
|
|
118
|
+
protected readonly childItems: _angular_core.Signal<(DfSidenavItemDesktopComponent | undefined)[]>;
|
|
119
|
+
protected readonly isVisible: _angular_core.Signal<boolean>;
|
|
120
|
+
constructor();
|
|
121
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DfSidenavItemDesktopComponent, never>;
|
|
122
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DfSidenavItemDesktopComponent, "df-sidenav-item-desktop", never, {}, {}, never, ["[dfSidenavIcon]", "*"], true, never>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Component representing a leaf in the sidenav for mobile devices
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
declare class DfSidenavLinkMobileComponent extends DfSidenavLinkBaseComponent {
|
|
130
|
+
private readonly linkWrapper;
|
|
131
|
+
private readonly currentMobilePanel;
|
|
132
|
+
protected readonly isSearching: _angular_core.Signal<boolean>;
|
|
133
|
+
protected readonly isVisibleInList: _angular_core.Signal<boolean>;
|
|
134
|
+
protected readonly breadcrumbPath: _angular_core.Signal<string[]>;
|
|
135
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DfSidenavLinkMobileComponent, never>;
|
|
136
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DfSidenavLinkMobileComponent, "df-sidenav-link-mobile", never, {}, {}, never, ["[dfSidenavIcon]"], true, never>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Component representing an item in the sidenav for mobile devices
|
|
141
|
+
* The item represents a container which can hold other items or links
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
declare class DfSidenavItemMobileComponent extends DfSidenavItemBaseComponent {
|
|
145
|
+
protected readonly childLinks: _angular_core.Signal<(DfSidenavLinkMobileComponent | undefined)[]>;
|
|
146
|
+
protected readonly childItems: _angular_core.Signal<(DfSidenavItemMobileComponent | undefined)[]>;
|
|
147
|
+
protected readonly isSearching: _angular_core.Signal<boolean>;
|
|
148
|
+
private readonly isInNavigationPath;
|
|
149
|
+
protected readonly shouldShowMobileHeader: _angular_core.Signal<boolean>;
|
|
150
|
+
protected readonly shouldShowChildren: _angular_core.Signal<boolean>;
|
|
151
|
+
protected readonly isVisibleInList: _angular_core.Signal<boolean>;
|
|
152
|
+
protected readonly shouldHideComponent: _angular_core.Signal<boolean>;
|
|
153
|
+
private readonly isVisible;
|
|
154
|
+
private readonly hasMatchingChildren;
|
|
155
|
+
/**
|
|
156
|
+
* Handle click event on the item
|
|
157
|
+
*/
|
|
158
|
+
protected handleItemClick(): void;
|
|
159
|
+
/**
|
|
160
|
+
* Handle click event on the header back button
|
|
161
|
+
*/
|
|
162
|
+
protected handleBackClick(): void;
|
|
163
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DfSidenavItemMobileComponent, never>;
|
|
164
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DfSidenavItemMobileComponent, "df-sidenav-item-mobile", never, {}, {}, never, ["[dfSidenavIcon]", "[dfSidenavIcon]", "[dfSidenavIcon]", "*"], true, never>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Sidenav link that can be used inside <df-sidenav-item> or directly inside the <df-sidenav>
|
|
169
|
+
* @since 21.0.0
|
|
170
|
+
*/
|
|
171
|
+
declare class DfSidenavLinkComponent {
|
|
172
|
+
/**
|
|
173
|
+
* The router link path for to the link
|
|
174
|
+
*/
|
|
175
|
+
readonly linkPath: _angular_core.InputSignal<string>;
|
|
176
|
+
/**
|
|
177
|
+
* The label of the link
|
|
178
|
+
*/
|
|
179
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
180
|
+
/**
|
|
181
|
+
* The icon class name or inline content (e.g., font awesome class)
|
|
182
|
+
*/
|
|
183
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
184
|
+
/**
|
|
185
|
+
* Options to determine when the router link is considered active
|
|
186
|
+
*/
|
|
187
|
+
readonly routerLinkActiveOptions: _angular_core.InputSignal<IsActiveMatchOptions | {
|
|
188
|
+
exact: boolean;
|
|
189
|
+
}>;
|
|
190
|
+
/**
|
|
191
|
+
* The parent wrapper item component (if any)
|
|
192
|
+
*/
|
|
193
|
+
protected readonly parentWrapper: DfSidenavItemComponent | null;
|
|
194
|
+
/**
|
|
195
|
+
* Reference to the desktop link component instance
|
|
196
|
+
*/
|
|
197
|
+
protected readonly desktopInstance: _angular_core.Signal<DfSidenavLinkDesktopComponent | undefined>;
|
|
198
|
+
/**
|
|
199
|
+
* Reference to the mobile link component instance
|
|
200
|
+
*/
|
|
201
|
+
protected readonly mobileInstance: _angular_core.Signal<DfSidenavLinkMobileComponent | undefined>;
|
|
202
|
+
private readonly iconContentQuery;
|
|
203
|
+
protected readonly wrapperHasIconContent: _angular_core.Signal<boolean>;
|
|
204
|
+
protected readonly sidenav: DfSidenavComponent;
|
|
205
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DfSidenavLinkComponent, never>;
|
|
206
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DfSidenavLinkComponent, "df-sidenav-link", never, { "linkPath": { "alias": "linkPath"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "routerLinkActiveOptions": { "alias": "routerLinkActiveOptions"; "required": false; "isSignal": true; }; }, {}, ["iconContentQuery"], ["[dfSidenavIcon]", "*"], true, never>;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Sidenav element that should be nested inside <df-sidenav> or <df-sidenav-item>
|
|
211
|
+
* @since 21.0.0
|
|
212
|
+
*/
|
|
213
|
+
declare class DfSidenavItemComponent {
|
|
214
|
+
/**
|
|
215
|
+
* Label of the sidenav item
|
|
216
|
+
*/
|
|
217
|
+
readonly label: _angular_core.InputSignal<unknown>;
|
|
218
|
+
/**
|
|
219
|
+
* Flag whether the sidenav item is collapsed
|
|
220
|
+
* @default false
|
|
221
|
+
*/
|
|
222
|
+
readonly collapsed: _angular_core.ModelSignal<boolean>;
|
|
223
|
+
/**
|
|
224
|
+
* Optional icon class for the sidenav item
|
|
225
|
+
*/
|
|
226
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
227
|
+
/**
|
|
228
|
+
* Reference to the parent element containing this item
|
|
229
|
+
*/
|
|
230
|
+
protected readonly parentWrapper: DfSidenavItemComponent | null;
|
|
231
|
+
/**
|
|
232
|
+
* Child sidenav items nested inside this item
|
|
233
|
+
*/
|
|
234
|
+
protected readonly childrenItems: _angular_core.Signal<readonly DfSidenavItemComponent[]>;
|
|
235
|
+
/**
|
|
236
|
+
* Child sidenav links nested inside this item
|
|
237
|
+
*/
|
|
238
|
+
protected readonly childrenLinks: _angular_core.Signal<readonly DfSidenavLinkComponent[]>;
|
|
239
|
+
/**
|
|
240
|
+
* Reference to the desktop instance of the sidenav item
|
|
241
|
+
*/
|
|
242
|
+
protected readonly desktopInstance: _angular_core.Signal<DfSidenavItemDesktopComponent | undefined>;
|
|
243
|
+
/**
|
|
244
|
+
* Reference to the mobile instance of the sidenav item
|
|
245
|
+
*/
|
|
246
|
+
protected readonly mobileInstance: _angular_core.Signal<DfSidenavItemMobileComponent | undefined>;
|
|
247
|
+
private readonly iconContentQuery;
|
|
248
|
+
protected readonly wrapperHasIconContent: _angular_core.Signal<boolean>;
|
|
249
|
+
protected readonly sidenav: DfSidenavComponent;
|
|
250
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DfSidenavItemComponent, never>;
|
|
251
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DfSidenavItemComponent, "df-sidenav-item", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, ["childrenItems", "childrenLinks", "iconContentQuery"], ["[dfSidenavIcon]", "*"], true, never>;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* SideNav is a component to provide navigation feature with a panel on the side of your page
|
|
256
|
+
* @since 21.0.0
|
|
257
|
+
*/
|
|
258
|
+
declare class DfSidenavComponent implements AfterContentInit {
|
|
259
|
+
/**
|
|
260
|
+
* Flag whether the sidenav includes a search input
|
|
261
|
+
* @default false
|
|
262
|
+
*/
|
|
263
|
+
readonly searchable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
264
|
+
/**
|
|
265
|
+
* The container element for the sidenav (null for body)
|
|
266
|
+
* @default null
|
|
267
|
+
*/
|
|
268
|
+
readonly container: _angular_core.InputSignal<HTMLElement | null>;
|
|
269
|
+
/**
|
|
270
|
+
* Flag whether the sidenav should be resizable
|
|
271
|
+
* @default false
|
|
272
|
+
*/
|
|
273
|
+
readonly resizable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
274
|
+
/**
|
|
275
|
+
* Flag whether the sidenav should have the collapse button
|
|
276
|
+
* @default false
|
|
277
|
+
*/
|
|
278
|
+
readonly collapsible: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
279
|
+
/**
|
|
280
|
+
* Flag to enable mobile device detection for responsive behavior
|
|
281
|
+
* @default true
|
|
282
|
+
*/
|
|
283
|
+
readonly enableMobile: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
284
|
+
protected readonly _isMinimized: _angular_core.WritableSignal<boolean>;
|
|
285
|
+
/**
|
|
286
|
+
* Flag to indicate if the sidenav is minimized
|
|
287
|
+
*/
|
|
288
|
+
readonly isMinimized: Signal<boolean>;
|
|
289
|
+
protected readonly hostRef: ElementRef<any>;
|
|
290
|
+
private readonly scrollableContainer;
|
|
291
|
+
private readonly isBrowser;
|
|
292
|
+
protected readonly isMobileDevice: boolean;
|
|
293
|
+
protected readonly searchInput: Signal<ElementRef<any> | undefined>;
|
|
294
|
+
private readonly allLinks;
|
|
295
|
+
private readonly allItems;
|
|
296
|
+
protected readonly width: _angular_core.WritableSignal<number | null>;
|
|
297
|
+
private savedWidth;
|
|
298
|
+
protected readonly searchTerm: _angular_core.WritableSignal<string>;
|
|
299
|
+
protected readonly mobileNavigationStack: _angular_core.WritableSignal<(DfSidenavItemComponent | null | undefined)[]>;
|
|
300
|
+
protected readonly currentMobilePanel: Signal<DfSidenavItemComponent | null | undefined>;
|
|
301
|
+
protected readonly isSmallScreen: Signal<boolean>;
|
|
302
|
+
protected readonly isMediumScreen: Signal<boolean>;
|
|
303
|
+
protected readonly isLargeUpScreen: Signal<boolean>;
|
|
304
|
+
protected readonly isMobileOrSmallScreen: Signal<boolean>;
|
|
305
|
+
protected readonly backdrop: Signal<boolean>;
|
|
306
|
+
protected readonly navManager: _agnos_ui_angular_headless.NavManager<unknown>;
|
|
307
|
+
protected readonly navManagerConfig: NavManagerItemConfig;
|
|
308
|
+
private readonly injector;
|
|
309
|
+
constructor();
|
|
310
|
+
ngAfterContentInit(): void;
|
|
311
|
+
/**
|
|
312
|
+
* This method allows to center and show the active link, when the sidenav is used in desktop and a large screen.
|
|
313
|
+
* It collapses all items and expands only the parents of the active link.
|
|
314
|
+
* Also, it scrolls to the active link to make it visible.
|
|
315
|
+
*/
|
|
316
|
+
private initializeDesktopNavigation;
|
|
317
|
+
/**
|
|
318
|
+
* Toggles the minimized state of the sidenav
|
|
319
|
+
*
|
|
320
|
+
* @param minimized - Optional parameter to explicitly set the minimized state
|
|
321
|
+
*
|
|
322
|
+
*/
|
|
323
|
+
toggleMinimize(minimized?: boolean): void;
|
|
324
|
+
/**
|
|
325
|
+
* Handles visibility changes of the sidenav component to handle the component state accordingly.
|
|
326
|
+
*
|
|
327
|
+
* @param isVisible - Boolean indicating whether the sidenav is currently visible
|
|
328
|
+
*/
|
|
329
|
+
visibleChangeHandler(isVisible: boolean): void;
|
|
330
|
+
/**
|
|
331
|
+
* Handles changes when the sidenav is resized, to handle the state accordingly.
|
|
332
|
+
*
|
|
333
|
+
* @param isResizing - Whether the sidenav is currently being resized
|
|
334
|
+
*/
|
|
335
|
+
resizingChangeHandler(isResizing: boolean): void;
|
|
336
|
+
protected focusSearch(): void;
|
|
337
|
+
/**
|
|
338
|
+
* Method to add the given item to the mobile navigation stack
|
|
339
|
+
* @param itemRef item to be added to the navigation stack
|
|
340
|
+
*/
|
|
341
|
+
navigateToChildren(itemRef: DfSidenavItemComponent | null | undefined): void;
|
|
342
|
+
/**
|
|
343
|
+
* Method to navigate back in the mobile navigation stack
|
|
344
|
+
*/
|
|
345
|
+
navigateBack(): void;
|
|
346
|
+
/**
|
|
347
|
+
* Navigates to the active item in the sidenav
|
|
348
|
+
* Expands parent items (desktop) and sets up mobile navigation stack
|
|
349
|
+
*/
|
|
350
|
+
private navigateToActiveItem;
|
|
351
|
+
protected readonly contentHasIcons: Signal<boolean>;
|
|
352
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DfSidenavComponent, never>;
|
|
353
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DfSidenavComponent, "df-sidenav", never, { "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "container": { "alias": "container"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "enableMobile": { "alias": "enableMobile"; "required": false; "isSignal": true; }; }, {}, ["allLinks", "allItems"], ["*"], true, never>;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Utility directive for marking icon content in sidenav items and links.
|
|
358
|
+
* Needed for identification of the projected icon content.
|
|
359
|
+
* Use in case if there is no icon provided with font-awesome.
|
|
360
|
+
* @since 21.0.0
|
|
361
|
+
*/
|
|
362
|
+
declare class DfSidenavIconDirective {
|
|
363
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DfSidenavIconDirective, never>;
|
|
364
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DfSidenavIconDirective, "[dfSidenavIcon]", never, {}, {}, never, never, true, never>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export { DfSidenavComponent, DfSidenavIconDirective, DfSidenavItemComponent, DfSidenavLinkComponent };
|