ud-components 0.8.1 → 0.8.3

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.
@@ -0,0 +1,21 @@
1
+ import { SidenavGroup } from '../sidenav/sidenav.interface';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * The app frame: `ud-sidenav` in a drawer, a sticky toolbar with the drawer
5
+ * toggle, and the page. Project `[toolbar-start]` (e.g. a breadcrumb),
6
+ * `[toolbar-end]` (e.g. the user menu) and the page itself.
7
+ */
8
+ export declare class AppShellComponent {
9
+ readonly groups: import("@angular/core").InputSignal<SidenavGroup[]>;
10
+ readonly brandRoute: import("@angular/core").InputSignal<string>;
11
+ readonly logo: import("@angular/core").InputSignal<string>;
12
+ readonly logoCollapsed: import("@angular/core").InputSignal<string>;
13
+ protected readonly $canOpen: import("@angular/core").WritableSignal<boolean>;
14
+ protected readonly $isOpen: import("@angular/core").WritableSignal<boolean>;
15
+ protected readonly $collapsed: import("@angular/core").Signal<boolean>;
16
+ protected onResize(): void;
17
+ protected toggle(): void;
18
+ private wideEnough;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppShellComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppShellComponent, "ud-app-shell", never, { "groups": { "alias": "groups"; "required": true; "isSignal": true; }; "brandRoute": { "alias": "brandRoute"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "logoCollapsed": { "alias": "logoCollapsed"; "required": false; "isSignal": true; }; }, {}, never, ["[toolbar-start]", "[toolbar-end]", "*"], true, never>;
21
+ }
@@ -0,0 +1,38 @@
1
+ import { AfterViewInit } from '@angular/core';
2
+ import { SidenavGroup } from './sidenav.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare const SIDENAV_LOGO = "assets/brand/wordmark/udorm-wordmark-reverse.png";
5
+ export declare const SIDENAV_LOGO_COLLAPSED = "assets/brand/appicon/udorm-glyph-ud-reverse.png";
6
+ /**
7
+ * The navy app drawer: brand, scrolling sections, pinned footer. It renders
8
+ * the groups it is given; filtering by role or feature flag is the app's job.
9
+ */
10
+ export declare class SidenavComponent implements AfterViewInit {
11
+ readonly groups: import("@angular/core").InputSignal<SidenavGroup[]>;
12
+ /** Icon-only rail: headers become dividers, labels move to tooltips. */
13
+ readonly collapsed: import("@angular/core").InputSignal<boolean>;
14
+ readonly brandRoute: import("@angular/core").InputSignal<string>;
15
+ readonly logo: import("@angular/core").InputSignal<string>;
16
+ readonly logoCollapsed: import("@angular/core").InputSignal<string>;
17
+ private readonly router;
18
+ private readonly zone;
19
+ private readonly destroyRef;
20
+ private readonly sections;
21
+ private readonly sectionsList;
22
+ protected readonly $moreBelow: import("@angular/core").WritableSignal<boolean>;
23
+ protected readonly $navGroups: import("@angular/core").Signal<SidenavGroup[]>;
24
+ protected readonly $footerGroups: import("@angular/core").Signal<SidenavGroup[]>;
25
+ private readonly $currentUrl;
26
+ protected readonly $activeRoute: import("@angular/core").Signal<string | undefined>;
27
+ ngAfterViewInit(): void;
28
+ protected updateMoreBelow(): void;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<SidenavComponent, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<SidenavComponent, "ud-sidenav", never, { "groups": { "alias": "groups"; "required": true; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "brandRoute": { "alias": "brandRoute"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "logoCollapsed": { "alias": "logoCollapsed"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
31
+ }
32
+ /**
33
+ * The nav route to highlight for `url`. An exact match wins; otherwise the
34
+ * item in the same top-level section, so detail and add pages (`/users/123`,
35
+ * `/users/add-user`) keep their section lit. When a section has several items
36
+ * (`/document-compliance/send` and `/list`), its list page wins.
37
+ */
38
+ export declare function activeNavRoute(url: string, routes: string[]): string | undefined;
@@ -0,0 +1,16 @@
1
+ import { Observable } from 'rxjs';
2
+ export interface SidenavItem {
3
+ label: Observable<string> | string;
4
+ route: string;
5
+ /** Material Icons Outlined ligature. */
6
+ icon: string;
7
+ badge?: number;
8
+ }
9
+ export interface SidenavGroup {
10
+ key: string;
11
+ /** Section header; a group without one renders as a plain list. */
12
+ category?: Observable<string> | string;
13
+ children: SidenavItem[];
14
+ /** Pinned below the scrolling sections instead of in them. */
15
+ footer?: boolean;
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ud-components",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": ">=19",
6
6
  "@angular/common": ">=19",
@@ -21,6 +21,30 @@
21
21
  ".": {
22
22
  "types": "./index.d.ts",
23
23
  "default": "./fesm2022/ud-components.mjs"
24
+ },
25
+ "./enums/role.enum": {
26
+ "types": "./enums/role.enum.d.ts",
27
+ "default": "./enums/role.enum.js"
28
+ },
29
+ "./lib/kpi/kpi.enum": {
30
+ "types": "./lib/kpi/kpi.enum.d.ts",
31
+ "default": "./lib/kpi/kpi.enum.js"
32
+ },
33
+ "./lib/edit-view/edit-view-section.directive": {
34
+ "types": "./lib/edit-view/edit-view-section.directive.d.ts",
35
+ "default": "./lib/edit-view/edit-view-section.directive.js"
36
+ },
37
+ "./interfaces/page-request.interface": {
38
+ "types": "./interfaces/page-request.interface.d.ts",
39
+ "default": "./interfaces/page-request.interface.js"
40
+ },
41
+ "./interfaces/table.interface": {
42
+ "types": "./interfaces/table.interface.d.ts",
43
+ "default": "./interfaces/table.interface.js"
44
+ },
45
+ "./interfaces/table-display-column.interface": {
46
+ "types": "./interfaces/table-display-column.interface.d.ts",
47
+ "default": "./interfaces/table-display-column.interface.js"
24
48
  }
25
49
  }
26
- }
50
+ }
package/public-api.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './lib/app-shell/app-shell.component';
1
2
  export * from './lib/carousel/carousel.component';
2
3
  export * from './lib/checkbox/checkbox.component';
3
4
  export * from './lib/custom-input/custom-input.component';
@@ -17,6 +18,8 @@ export * from './lib/occupancy-grid/occupancy-grid.layout';
17
18
  export * from './lib/occupancy-grid/local-date';
18
19
  export * from './lib/pill/pill.component';
19
20
  export * from './lib/progress-bar/progress-bar.component';
21
+ export * from './lib/sidenav/sidenav.component';
22
+ export * from './lib/sidenav/sidenav.interface';
20
23
  export * from './lib/summary-view/summary-view.component';
21
24
  export * from './lib/stepper/stepper.component';
22
25
  export * from './lib/stepper/step-content.directive';