@ojiepermana/angular 22.2.2 → 22.2.4
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/fesm2022/ojiepermana-angular-component-drawer.mjs +2 -1
- package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-CGfu2V6f.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-DC8rfxS5.mjs} +32 -4
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-zBCXDa4c.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-meQb_EWZ.mjs} +1 -1
- package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-DYkYIIHd.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-DRdw2G-c.mjs} +2 -2
- package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-LNTertHr.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-Bx1NcrWO.mjs} +2 -2
- package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-DiGOcizS.mjs → ojiepermana-angular-navigation-navigation-item.component-ERZNpmTZ.mjs} +2 -2
- package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-DB22Gl-5.mjs → ojiepermana-angular-navigation-navigation-list.component-D-oOKwHg.mjs} +4 -3
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +3 -2
- package/fesm2022/ojiepermana-angular-navigation.mjs +13 -15
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +152 -109
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +168 -77
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +3 -0
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +3 -0
- package/package.json +2 -2
- package/theme/component/settings/README.md +19 -0
- package/theme/layout/README.md +67 -0
- package/types/ojiepermana-angular-component-icon.d.ts +1 -15
- package/types/ojiepermana-angular-component-select.d.ts +0 -2
- package/types/ojiepermana-angular-navigation.d.ts +1 -3
- package/types/ojiepermana-angular-theme-component-settings.d.ts +18 -1
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +108 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { ElementRef, InjectionToken, Provider } from "@angular/core";
|
|
3
3
|
import { ThemeSettingsNavigationMode, ThemeSettingsNavigationType } from "@ojiepermana/angular/theme/component/settings";
|
|
4
4
|
import { NavigationDockbarRouteContext } from "@ojiepermana/angular/navigation";
|
|
5
5
|
import { NavigationDockbarRouteContext as NavigationDockbarRouteContext$1, NavigationItem, NavigationType } from "@ojiepermana/angular/navigation/types";
|
|
@@ -16,6 +16,13 @@ export interface BrandIdentity {
|
|
|
16
16
|
readonly title: string;
|
|
17
17
|
/** Subjudul brand. */
|
|
18
18
|
readonly subtitle: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional typographic mark rendered in place of the initials or icon. The
|
|
21
|
+
* accessible name stays `name`; the wordmark itself is decorative text.
|
|
22
|
+
*/
|
|
23
|
+
readonly wordmark?: string;
|
|
24
|
+
/** Optional line under the wordmark. Ignored without a `wordmark`. */
|
|
25
|
+
readonly tagline?: string;
|
|
19
26
|
}
|
|
20
27
|
export interface UserIdentity {
|
|
21
28
|
/** Nama lengkap user (inisial + judul footer). */
|
|
@@ -41,19 +48,73 @@ export declare class LayoutIdentityService {
|
|
|
41
48
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
42
49
|
}
|
|
43
50
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
51
|
+
* Application-wide defaults for every `<LayoutUser>` a layout wrapper renders:
|
|
52
|
+
* the sidebar and its mobile sheet, the dockbar rail and aside, the minidock
|
|
53
|
+
* rail, the navbar and the flyout panel. One provider therefore keeps the
|
|
54
|
+
* identity row and the logout control identical on every surface. A binding on
|
|
55
|
+
* an individual `<LayoutUser>` still wins over these defaults.
|
|
56
|
+
*/
|
|
57
|
+
export interface LayoutUserOptions {
|
|
58
|
+
/**
|
|
59
|
+
* Show the initials and name on every surface, the horizontal navbar and
|
|
60
|
+
* flyout footers included. Off, those two render the logout control only.
|
|
61
|
+
*/
|
|
62
|
+
readonly detailed?: boolean;
|
|
63
|
+
/** Render `user.email` under the name. Default `true`. */
|
|
64
|
+
readonly showEmail?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Render the `ThemeSettings` shortcut beside logout. Default `true`; turn it
|
|
67
|
+
* off when the application offers the settings on a page of its own.
|
|
68
|
+
*/
|
|
69
|
+
readonly showThemeSettings?: boolean;
|
|
70
|
+
/** Accessible name of the logout control. Default `'Logout'`. */
|
|
71
|
+
readonly logoutLabel?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Lucide icon name of the logout control. `'log-out'` (the default) and
|
|
74
|
+
* `'door-open'` are registered by the library; register any other name with
|
|
75
|
+
* `provideIcons()`.
|
|
76
|
+
*/
|
|
77
|
+
readonly logoutIcon?: string;
|
|
78
|
+
}
|
|
79
|
+
export declare const LAYOUT_USER_OPTIONS: InjectionToken<LayoutUserOptions>;
|
|
80
|
+
/**
|
|
81
|
+
* Provide {@link LayoutUserOptions} once, usually in the application config,
|
|
82
|
+
* so `<LayoutWrapperDefault>` and the standalone nav types all pick them up.
|
|
83
|
+
*
|
|
84
|
+
* ```ts
|
|
85
|
+
* provideLayoutUserOptions({ detailed: true, showEmail: false, logoutIcon: 'door-open' })
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export declare function provideLayoutUserOptions(options: LayoutUserOptions): Provider[];
|
|
89
|
+
/**
|
|
90
|
+
* The brand slot for `<NavigationHeader>`: initials, logo, or wordmark plus a title.
|
|
91
|
+
* Purely input-driven.
|
|
46
92
|
*
|
|
47
93
|
* `compact` (dockbar, or an icon-only rail) hides the title. `host.class = 'contents'`
|
|
48
94
|
* keeps `NavigationHeaderInitial` and `NavigationHeaderTitle` as direct flex children of
|
|
49
95
|
* the header row; the title still auto-hides on a collapsed sidebar, because
|
|
50
96
|
* `NAVIGATION_SHELL` reaches `<Navigation>` through the live injector tree.
|
|
97
|
+
*
|
|
98
|
+
* A `brand.wordmark` replaces the initials block with typographic text and an
|
|
99
|
+
* optional `brand.tagline`. The mark keeps `role="img"` and `brand.name` as its
|
|
100
|
+
* accessible name, so assistive technology announces the brand the same way in
|
|
101
|
+
* both renders. `data-layout-brand-mark`, `data-layout-brand-wordmark`,
|
|
102
|
+
* `data-layout-brand-tagline` and `data-compact` are the styling hooks: the
|
|
103
|
+
* library sets type and overflow only, the consumer owns the look.
|
|
51
104
|
*/
|
|
52
105
|
export declare class LayoutBrand {
|
|
53
|
-
/** Identitas brand (nama, ikon, judul, subjudul). */
|
|
106
|
+
/** Identitas brand (nama, ikon, judul, subjudul, wordmark opsional). */
|
|
54
107
|
readonly brand: import("@angular/core").InputSignal<BrandIdentity>;
|
|
55
108
|
/** Sembunyikan judul, sisakan inisial saja (dockbar / rail ikon-only). */
|
|
56
109
|
readonly compact: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
110
|
+
/**
|
|
111
|
+
* Rail-sized type when compact, the nav text tier otherwise. A collapsed sidebar
|
|
112
|
+
* is a rail too, but `LayoutBrand` only knows `compact`; the header it sits in
|
|
113
|
+
* carries `data-collapsed`, so the `in-data-[collapsed=true]` variant shrinks
|
|
114
|
+
* the type there without the component reaching into the navigation state.
|
|
115
|
+
*/
|
|
116
|
+
protected readonly wordmarkClasses: import("@angular/core").Signal<string>;
|
|
117
|
+
protected readonly taglineClasses: import("@angular/core").Signal<string>;
|
|
57
118
|
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutBrand, never>;
|
|
58
119
|
static ɵcmp: i0.ɵɵComponentDeclaration<LayoutBrand, "LayoutBrand", never, {
|
|
59
120
|
"brand": {
|
|
@@ -70,12 +131,14 @@ export declare class LayoutBrand {
|
|
|
70
131
|
}
|
|
71
132
|
/**
|
|
72
133
|
* The user slot for `<NavigationFooter>`: an optional identity plus the logout action.
|
|
73
|
-
*
|
|
134
|
+
* Input-driven, with application defaults from {@link LAYOUT_USER_OPTIONS}.
|
|
74
135
|
*
|
|
75
136
|
* `detailed` shows initials and name (a full sidebar); without it, only the logout
|
|
76
137
|
* button. `host.class = 'contents'` makes the children direct flex children of the
|
|
77
138
|
* footer, so `ml-auto` and the auto-hide on collapse (through `NAVIGATION_SHELL`) still
|
|
78
|
-
* apply.
|
|
139
|
+
* apply. The title takes the remaining width, capped so a horizontal bar does not
|
|
140
|
+
* grow with the name, and truncates, so a long name never pushes the actions out
|
|
141
|
+
* of the row.
|
|
79
142
|
*
|
|
80
143
|
* The logout button only emits `(logout)`. Endpoint, cookie, and redirect target differ
|
|
81
144
|
* per application, so the effect is entirely the consumer's — the library calls no
|
|
@@ -84,16 +147,34 @@ export declare class LayoutBrand {
|
|
|
84
147
|
* existed.
|
|
85
148
|
*/
|
|
86
149
|
export declare class LayoutUser {
|
|
150
|
+
private readonly options;
|
|
87
151
|
/** Identitas user (nama + email). */
|
|
88
152
|
readonly user: import("@angular/core").InputSignal<UserIdentity>;
|
|
89
153
|
/** Show the user identity (initials and name), not only the logout button. */
|
|
90
154
|
readonly detailed: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
91
|
-
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
155
|
+
/**
|
|
156
|
+
* Render the initials block in front of the name. Off where another block already
|
|
157
|
+
* shows them, such as the dockbar aside whose rail carries the initials.
|
|
158
|
+
*/
|
|
159
|
+
readonly showInitial: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
160
|
+
/** Render the email under the name; unset falls back to the options, then `true`. */
|
|
161
|
+
readonly showEmail: import("@angular/core").InputSignalWithTransform<boolean | null, unknown>;
|
|
162
|
+
/** Render the ThemeSettings shortcut; unset falls back to the options, then `true`. */
|
|
163
|
+
readonly showThemeSettings: import("@angular/core").InputSignalWithTransform<boolean | null, unknown>;
|
|
164
|
+
/** Accessible name for the logout button; unset falls back to the options, then `Logout`. */
|
|
165
|
+
readonly logoutLabel: import("@angular/core").InputSignal<string | null>;
|
|
166
|
+
/**
|
|
167
|
+
* Lucide icon name for the logout button; unset falls back to the options, then
|
|
168
|
+
* `log-out`. `door-open` is registered too; register any other name with `provideIcons()`.
|
|
169
|
+
*/
|
|
170
|
+
readonly logoutIcon: import("@angular/core").InputSignal<string | null>;
|
|
95
171
|
/** The user pressed logout. The effect is the consumer's; the library does not navigate. */
|
|
96
172
|
readonly logout: import("@angular/core").OutputEmitterRef<void>;
|
|
173
|
+
protected readonly showsIdentity: import("@angular/core").Signal<boolean>;
|
|
174
|
+
protected readonly showsEmail: import("@angular/core").Signal<boolean>;
|
|
175
|
+
protected readonly showsThemeSettings: import("@angular/core").Signal<boolean>;
|
|
176
|
+
protected readonly resolvedLogoutLabel: import("@angular/core").Signal<string>;
|
|
177
|
+
protected readonly resolvedLogoutIcon: import("@angular/core").Signal<string>;
|
|
97
178
|
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutUser, never>;
|
|
98
179
|
static ɵcmp: i0.ɵɵComponentDeclaration<LayoutUser, "LayoutUser", never, {
|
|
99
180
|
"user": {
|
|
@@ -106,6 +187,21 @@ export declare class LayoutUser {
|
|
|
106
187
|
"required": false;
|
|
107
188
|
"isSignal": true;
|
|
108
189
|
};
|
|
190
|
+
"showInitial": {
|
|
191
|
+
"alias": "show-initial";
|
|
192
|
+
"required": false;
|
|
193
|
+
"isSignal": true;
|
|
194
|
+
};
|
|
195
|
+
"showEmail": {
|
|
196
|
+
"alias": "show-email";
|
|
197
|
+
"required": false;
|
|
198
|
+
"isSignal": true;
|
|
199
|
+
};
|
|
200
|
+
"showThemeSettings": {
|
|
201
|
+
"alias": "show-theme-settings";
|
|
202
|
+
"required": false;
|
|
203
|
+
"isSignal": true;
|
|
204
|
+
};
|
|
109
205
|
"logoutLabel": {
|
|
110
206
|
"alias": "logoutLabel";
|
|
111
207
|
"required": false;
|
|
@@ -179,7 +275,8 @@ export declare class LayoutNavSidebar {
|
|
|
179
275
|
* header, the user's initials in the rail footer (title and actions auto-hide, because
|
|
180
276
|
* the rail is always collapsed), and the full identity (name, email, logout) in the
|
|
181
277
|
* aside footer — together with the rail initials they form one footer row, like an
|
|
182
|
-
* expanded sidebar.
|
|
278
|
+
* expanded sidebar. Both rows are the one `LayoutUser`; the aside copy only drops the
|
|
279
|
+
* initials the rail already shows.
|
|
183
280
|
*
|
|
184
281
|
* Horizontal dividers: unlike the sidebar, which leaves the separator to Layout's inset
|
|
185
282
|
* accent rail at `top-12`/`bottom-12` under `border-rail`, the dockbar ALWAYS uses the
|