@ngrdt/menu 0.0.46 → 0.0.48
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 +12 -0
- package/fesm2022/ngrdt-menu.mjs +36 -15
- package/fesm2022/ngrdt-menu.mjs.map +1 -1
- package/index.d.ts +10 -2
- package/package.json +5 -5
package/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ import * as _angular_core from '@angular/core';
|
|
|
7
7
|
import { InjectionToken, ElementRef, DestroyRef, QueryList, ChangeDetectorRef, Renderer2, EnvironmentInjector, Signal } from '@angular/core';
|
|
8
8
|
import * as i5 from '@angular/router';
|
|
9
9
|
import { Router } from '@angular/router';
|
|
10
|
+
import * as i8 from '@ngrdt/icon';
|
|
11
|
+
import { RdtIconRegistryService } from '@ngrdt/icon';
|
|
10
12
|
import { RdtButtonBaseInt } from '@ngrdt/button';
|
|
11
13
|
import * as i4 from '@angular/common';
|
|
12
14
|
|
|
@@ -48,6 +50,7 @@ interface RdtMenuItemBase<TIcon = string> {
|
|
|
48
50
|
shortcut?: RdtShortcut;
|
|
49
51
|
command?: () => void;
|
|
50
52
|
visible?: () => boolean;
|
|
53
|
+
disabled?: () => boolean;
|
|
51
54
|
queryParams?: {
|
|
52
55
|
[key: string]: any;
|
|
53
56
|
};
|
|
@@ -55,6 +58,7 @@ interface RdtMenuItemBase<TIcon = string> {
|
|
|
55
58
|
dataTestId?: string;
|
|
56
59
|
}
|
|
57
60
|
interface ParsedRdtMenuItemBase<TIcon = string> extends RdtMenuItemBase<TIcon> {
|
|
61
|
+
disabled: () => boolean;
|
|
58
62
|
dataTestId: string;
|
|
59
63
|
}
|
|
60
64
|
interface ParsedRdtMenuItemWithChildren<TIcon = string> extends ParsedRdtMenuItemBase<TIcon> {
|
|
@@ -117,6 +121,8 @@ declare class RdtMenuOverlayComponent {
|
|
|
117
121
|
private readonly router;
|
|
118
122
|
private readonly document;
|
|
119
123
|
private readonly shortcutService;
|
|
124
|
+
private readonly iconRegistry;
|
|
125
|
+
readonly arrowRightIcon: any;
|
|
120
126
|
readonly children: QueryList<RdtMenuOverlayComponent>;
|
|
121
127
|
private focusableElements;
|
|
122
128
|
private menuItemContainer;
|
|
@@ -213,6 +219,7 @@ declare abstract class RdtMenuBaseComponent {
|
|
|
213
219
|
protected readonly router: Router;
|
|
214
220
|
protected readonly shortcutService: RdtShortcutService;
|
|
215
221
|
protected readonly injector: EnvironmentInjector;
|
|
222
|
+
protected readonly iconRegistry: RdtIconRegistryService<any>;
|
|
216
223
|
protected children: QueryList<RdtMenuOverlayComponent>;
|
|
217
224
|
protected focusableElements: QueryList<ElementRef<HTMLElement>>;
|
|
218
225
|
abstract get buttonContainer(): HTMLElement | undefined;
|
|
@@ -270,7 +277,7 @@ declare abstract class RdtMenuBaseComponent {
|
|
|
270
277
|
protected readMargin(): void;
|
|
271
278
|
protected measureClientSize(): void;
|
|
272
279
|
protected measureButtonContainer(): void;
|
|
273
|
-
protected
|
|
280
|
+
protected listenWindowResizeScroll(): void;
|
|
274
281
|
protected listenShortcuts(): void;
|
|
275
282
|
protected getShortcutMap(itemsWithShortcuts: ParsedRdtMenuItemWithShortcut[]): Record<string, ParsedRdtMenuItem[]>;
|
|
276
283
|
protected onShortcut(shortcut: RdtShortcut, map: Record<string, ParsedRdtMenuItem[]>): void;
|
|
@@ -293,6 +300,7 @@ declare abstract class RdtMenuBaseComponent {
|
|
|
293
300
|
|
|
294
301
|
declare class RdtMenuBarComponent extends RdtMenuBaseComponent {
|
|
295
302
|
buttonContainerRef?: ElementRef<HTMLElement>;
|
|
303
|
+
readonly arrowDownIcon: any;
|
|
296
304
|
get buttonContainer(): HTMLElement | undefined;
|
|
297
305
|
readonly items: _angular_core.InputSignal<RdtMenuItem[]>;
|
|
298
306
|
readonly allParsedItems: _angular_core.Signal<ParsedRdtMenuItem[]>;
|
|
@@ -326,7 +334,7 @@ declare class RdtMenuComponent extends RdtMenuBaseComponent {
|
|
|
326
334
|
|
|
327
335
|
declare class RdtMenuModule {
|
|
328
336
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdtMenuModule, never>;
|
|
329
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdtMenuModule, [typeof RdtMenuOverlayComponent, typeof RdtMenuComponent, typeof RdtMenuBarComponent], [typeof i4.CommonModule, typeof i5.RouterModule, typeof i6.RdtAnyRouteActiveDirective, typeof i7.RdtKeyListenerDirective], [typeof RdtMenuComponent, typeof RdtMenuBarComponent]>;
|
|
337
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdtMenuModule, [typeof RdtMenuOverlayComponent, typeof RdtMenuComponent, typeof RdtMenuBarComponent], [typeof i4.CommonModule, typeof i5.RouterModule, typeof i6.RdtAnyRouteActiveDirective, typeof i7.RdtKeyListenerDirective, typeof i8.RdtIconOutletDirective], [typeof RdtMenuComponent, typeof RdtMenuBarComponent]>;
|
|
330
338
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<RdtMenuModule>;
|
|
331
339
|
}
|
|
332
340
|
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrdt/menu",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.48",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=18.2.0",
|
|
6
6
|
"@angular/core": ">=18.2.0",
|
|
7
7
|
"@angular/router": ">=18.2.0",
|
|
8
8
|
"rxjs": ">=7.0.0",
|
|
9
|
-
"@ngrdt/router": "^0.0.
|
|
10
|
-
"@ngrdt/utils": "^0.0.
|
|
11
|
-
"@ngrdt/button": "^0.0.
|
|
12
|
-
"@ngrdt/shortcuts": "^0.0.
|
|
9
|
+
"@ngrdt/router": "^0.0.48",
|
|
10
|
+
"@ngrdt/utils": "^0.0.48",
|
|
11
|
+
"@ngrdt/button": "^0.0.48",
|
|
12
|
+
"@ngrdt/shortcuts": "^0.0.48"
|
|
13
13
|
},
|
|
14
14
|
"sideEffects": false,
|
|
15
15
|
"module": "fesm2022/ngrdt-menu.mjs",
|