@ojiepermana/angular 0.1.0 → 0.1.1
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 +8 -5
- package/fesm2022/ojiepermana-angular-internal.mjs +16 -0
- package/fesm2022/ojiepermana-angular-internal.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-layout.mjs +44 -41
- package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation-horizontal.mjs +198 -262
- package/fesm2022/ojiepermana-angular-navigation-horizontal.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation-vertical.mjs +123 -44
- package/fesm2022/ojiepermana-angular-navigation-vertical.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation.mjs +326 -30
- package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-shell.mjs +6 -1
- package/fesm2022/ojiepermana-angular-shell.mjs.map +1 -1
- package/layout/README.md +3 -3
- package/{theme/styles/layout → layout/src/component/horizontal}/horizontal.css +38 -17
- package/{theme/styles/layout → layout/src/component/vertical}/vertical.css +7 -7
- package/{theme/styles/layout/index.css → layout/src/layout.css} +0 -3
- package/navigation/README.md +91 -5
- package/navigation/horizontal/README.md +49 -0
- package/navigation/vertical/README.md +0 -0
- package/package.json +1 -1
- package/shell/README.md +5 -1
- package/styles/index.css +1 -1
- package/theme/README.md +2 -2
- package/types/ojiepermana-angular-internal.d.ts +1 -0
- package/types/ojiepermana-angular-layout.d.ts +1 -1
- package/types/ojiepermana-angular-navigation-horizontal.d.ts +26 -22
- package/types/ojiepermana-angular-navigation-vertical.d.ts +24 -22
- package/types/ojiepermana-angular-navigation.d.ts +55 -9
- package/types/ojiepermana-angular-shell.d.ts +2 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Params, QueryParamsHandling, IsActiveMatchOptions } from '@angular/router';
|
|
2
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
3
|
+
import { Params, QueryParamsHandling, IsActiveMatchOptions } from '@angular/router';
|
|
3
4
|
|
|
4
5
|
type NavigationItemType = 'aside' | 'basic' | 'collapsable' | 'divider' | 'group' | 'spacer';
|
|
5
6
|
interface NavigationItemClasses {
|
|
@@ -94,14 +95,18 @@ type NavigationItem = NavigationBranchItem | NavigationLeafItem;
|
|
|
94
95
|
* Mendukung berbagai tipe item dan konfigurasi routing Angular
|
|
95
96
|
*/
|
|
96
97
|
type NavigationStructuredItem = NavigationItem;
|
|
98
|
+
/**
|
|
99
|
+
* Horizontal Navigation Variants
|
|
100
|
+
* - default: standard top navigation treatment
|
|
101
|
+
* - mega: roomier top navigation with larger dropdown treatment
|
|
102
|
+
*/
|
|
103
|
+
type HorizontalNavigationVariant = 'default' | 'mega';
|
|
97
104
|
/**
|
|
98
105
|
* Vertical Navigation Appearances
|
|
99
106
|
* - default: 280px width, full labels & icons
|
|
100
|
-
* -
|
|
101
|
-
* - dense: 200px width, more condensed
|
|
102
|
-
* - thin: 80px width, icon only (labels on hover)
|
|
107
|
+
* - collapsible: alias variant that currently reuses the default layout
|
|
103
108
|
*/
|
|
104
|
-
type VerticalNavigationAppearance = 'default' | '
|
|
109
|
+
type VerticalNavigationAppearance = 'default' | 'collapsible';
|
|
105
110
|
/**
|
|
106
111
|
* Vertical Navigation Modes
|
|
107
112
|
* - over: Overlay mode (fixed position, z-index tinggi)
|
|
@@ -113,6 +118,48 @@ type VerticalNavigationMode = 'over' | 'side';
|
|
|
113
118
|
*/
|
|
114
119
|
type VerticalNavigationPosition = 'left' | 'right';
|
|
115
120
|
|
|
121
|
+
interface NgNavigationConfig {
|
|
122
|
+
defaultHorizontalVariant: HorizontalNavigationVariant;
|
|
123
|
+
defaultVerticalVariant: VerticalNavigationAppearance;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare function provideNgNavigation(config?: Partial<NgNavigationConfig>): EnvironmentProviders;
|
|
127
|
+
|
|
128
|
+
declare class NavigationPreferencesService {
|
|
129
|
+
private readonly config;
|
|
130
|
+
private readonly document;
|
|
131
|
+
private readonly isBrowser;
|
|
132
|
+
private readonly storage;
|
|
133
|
+
private readonly _horizontalVariant;
|
|
134
|
+
private readonly _verticalAppearance;
|
|
135
|
+
private readonly _activeItemId;
|
|
136
|
+
private readonly _expandedItemIds;
|
|
137
|
+
readonly horizontalVariant: _angular_core.Signal<HorizontalNavigationVariant>;
|
|
138
|
+
readonly verticalAppearance: _angular_core.Signal<VerticalNavigationAppearance>;
|
|
139
|
+
readonly activeItemId: _angular_core.Signal<string | null>;
|
|
140
|
+
readonly expandedItemIds: _angular_core.Signal<string[]>;
|
|
141
|
+
setHorizontalVariant(value: HorizontalNavigationVariant): void;
|
|
142
|
+
setVerticalAppearance(value: VerticalNavigationAppearance): void;
|
|
143
|
+
setActiveItem(id: string | null): void;
|
|
144
|
+
clearActiveItem(): void;
|
|
145
|
+
setExpandedItemIds(ids: readonly string[]): void;
|
|
146
|
+
expandItem(id: string): void;
|
|
147
|
+
collapseItem(id: string): void;
|
|
148
|
+
toggleExpandedItem(id: string): void;
|
|
149
|
+
clearExpandedItems(): void;
|
|
150
|
+
reset(): void;
|
|
151
|
+
syncWithNavigation(navigation: readonly NavigationItem[]): void;
|
|
152
|
+
private readActiveItemId;
|
|
153
|
+
private readExpandedItemIds;
|
|
154
|
+
private readHorizontalVariant;
|
|
155
|
+
private readVerticalAppearance;
|
|
156
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NavigationPreferencesService, never>;
|
|
157
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NavigationPreferencesService>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare const DEFAULT_NG_NAVIGATION_CONFIG: NgNavigationConfig;
|
|
161
|
+
declare const NG_NAVIGATION_CONFIG: InjectionToken<NgNavigationConfig>;
|
|
162
|
+
|
|
116
163
|
declare function getNavigationItemAction(item: NavigationItem): NavigationActionHandler | undefined;
|
|
117
164
|
declare function getNavigationItemVisibilityHandler(item: NavigationItem): NavigationVisibilityHandler | undefined;
|
|
118
165
|
declare function isNavigationItemHidden(item: NavigationItem): boolean;
|
|
@@ -130,9 +177,8 @@ declare function isNavigationRoutableItem(item: NavigationItem): item is Navigat
|
|
|
130
177
|
* 3. Utility functions untuk navigation operations
|
|
131
178
|
*/
|
|
132
179
|
declare class NavigationService {
|
|
180
|
+
private readonly preferences;
|
|
133
181
|
private _navigation;
|
|
134
|
-
private _activeItemId;
|
|
135
|
-
private _expandedItemIds;
|
|
136
182
|
readonly navigationItems: _angular_core.Signal<NavigationItem[]>;
|
|
137
183
|
readonly activeItemId: _angular_core.Signal<string | null>;
|
|
138
184
|
readonly flatNavigation: _angular_core.Signal<NavigationItem[]>;
|
|
@@ -178,5 +224,5 @@ declare class NavigationService {
|
|
|
178
224
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NavigationService>;
|
|
179
225
|
}
|
|
180
226
|
|
|
181
|
-
export { NavigationService, getNavigationChildren, getNavigationItemAction, getNavigationItemVisibilityHandler, hasNavigationChildren, isNavigationItemHidden, isNavigationRoutableItem, shouldRenderNavigationItem };
|
|
182
|
-
export type { NavigationActionHandler, NavigationAsideItem, NavigationBasicItem, NavigationBranchItem, NavigationCollapsableItem, NavigationDividerItem, NavigationGroupItem, NavigationItem, NavigationItemBadge, NavigationItemBase, NavigationItemClasses, NavigationItemType, NavigationLeafItem, NavigationRoutableItemBase, NavigationSpacerItem, NavigationStructuredItem, NavigationVisibilityHandler, VerticalNavigationAppearance, VerticalNavigationMode, VerticalNavigationPosition };
|
|
227
|
+
export { DEFAULT_NG_NAVIGATION_CONFIG, NG_NAVIGATION_CONFIG, NavigationPreferencesService, NavigationService, getNavigationChildren, getNavigationItemAction, getNavigationItemVisibilityHandler, hasNavigationChildren, isNavigationItemHidden, isNavigationRoutableItem, provideNgNavigation, shouldRenderNavigationItem };
|
|
228
|
+
export type { HorizontalNavigationVariant, NavigationActionHandler, NavigationAsideItem, NavigationBasicItem, NavigationBranchItem, NavigationCollapsableItem, NavigationDividerItem, NavigationGroupItem, NavigationItem, NavigationItemBadge, NavigationItemBase, NavigationItemClasses, NavigationItemType, NavigationLeafItem, NavigationRoutableItemBase, NavigationSpacerItem, NavigationStructuredItem, NavigationVisibilityHandler, NgNavigationConfig, VerticalNavigationAppearance, VerticalNavigationMode, VerticalNavigationPosition };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { EnvironmentProviders } from '@angular/core';
|
|
2
2
|
import { NgLayoutConfig } from '@ojiepermana/angular/layout';
|
|
3
|
+
import { NgNavigationConfig } from '@ojiepermana/angular/navigation';
|
|
3
4
|
import { NgThemeConfig } from '@ojiepermana/angular/theme/service';
|
|
4
5
|
|
|
5
6
|
interface NgShellConfig {
|
|
6
7
|
readonly theme?: Partial<NgThemeConfig>;
|
|
7
8
|
readonly layout?: Partial<NgLayoutConfig>;
|
|
9
|
+
readonly navigation?: Partial<NgNavigationConfig>;
|
|
8
10
|
}
|
|
9
11
|
declare function provideNgShell(config?: NgShellConfig): EnvironmentProviders;
|
|
10
12
|
|