@ojiepermana/angular 0.0.2
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 +237 -0
- package/fesm2022/ojiepermana-angular-internal.mjs +58 -0
- package/fesm2022/ojiepermana-angular-internal.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout.mjs +471 -0
- package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-shell.mjs +14 -0
- package/fesm2022/ojiepermana-angular-shell.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-theme-component.mjs +249 -0
- package/fesm2022/ojiepermana-angular-theme-component.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-theme-directive.mjs +29 -0
- package/fesm2022/ojiepermana-angular-theme-directive.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-theme-service.mjs +243 -0
- package/fesm2022/ojiepermana-angular-theme-service.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-theme.mjs +6 -0
- package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular.mjs +6 -0
- package/fesm2022/ojiepermana-angular.mjs.map +1 -0
- package/layout/README.md +143 -0
- package/layout/styles/index.css +157 -0
- package/package.json +59 -0
- package/shell/README.md +37 -0
- package/styles/index.css +2 -0
- package/styles/resets.css +22 -0
- package/theme/README.md +382 -0
- package/theme/styles/adapters/material-ui/index.css +210 -0
- package/theme/styles/index.css +8 -0
- package/theme/styles/layout/index.css +1 -0
- package/theme/styles/modes/dark.css +84 -0
- package/theme/styles/presets/colors/blue.css +10 -0
- package/theme/styles/presets/colors/brand.css +11 -0
- package/theme/styles/presets/colors/cyan.css +10 -0
- package/theme/styles/presets/colors/green.css +10 -0
- package/theme/styles/presets/colors/index.css +7 -0
- package/theme/styles/presets/colors/orange.css +10 -0
- package/theme/styles/presets/colors/purple.css +10 -0
- package/theme/styles/presets/colors/red.css +10 -0
- package/theme/styles/presets/styles/flat.css +30 -0
- package/theme/styles/presets/styles/glass.css +34 -0
- package/theme/styles/presets/styles/index.css +2 -0
- package/theme/styles/roles/index.css +49 -0
- package/theme/styles/tokens/foundation.css +139 -0
- package/theme/styles/tokens/semantic.css +87 -0
- package/theme/styles/utilities/index.css +88 -0
- package/types/ojiepermana-angular-internal.d.ts +26 -0
- package/types/ojiepermana-angular-layout.d.ts +90 -0
- package/types/ojiepermana-angular-shell.d.ts +12 -0
- package/types/ojiepermana-angular-theme-component.d.ts +46 -0
- package/types/ojiepermana-angular-theme-directive.d.ts +10 -0
- package/types/ojiepermana-angular-theme-service.d.ts +68 -0
- package/types/ojiepermana-angular-theme.d.ts +2 -0
- package/types/ojiepermana-angular.d.ts +2 -0
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, PLATFORM_ID, signal, effect, Injectable, Directive, ChangeDetectionStrategy, Component, computed, isDevMode, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
4
|
+
import { LocalStorageStateAdapter, libraryLucideConfigProvider } from '@ojiepermana/angular/internal';
|
|
5
|
+
import { RouterOutlet } from '@angular/router';
|
|
6
|
+
import { MatIconButton } from '@angular/material/button';
|
|
7
|
+
import { MatTooltip } from '@angular/material/tooltip';
|
|
8
|
+
import { LucideExpand, LucideShrink, LucidePanelLeft, LucidePanelTop, LucideAppWindow } from '@lucide/angular';
|
|
9
|
+
import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
|
|
10
|
+
|
|
11
|
+
const DEFAULT_NG_LAYOUT_CONFIG = {
|
|
12
|
+
defaultMode: 'vertical',
|
|
13
|
+
defaultContainer: 'full',
|
|
14
|
+
};
|
|
15
|
+
const NG_LAYOUT_CONFIG = new InjectionToken('NG_LAYOUT_CONFIG', {
|
|
16
|
+
providedIn: 'root',
|
|
17
|
+
factory: () => ({ ...DEFAULT_NG_LAYOUT_CONFIG }),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const LAYOUT_MODES = ['vertical', 'horizontal', 'empty'];
|
|
21
|
+
const LAYOUT_CONTAINERS = ['full', 'boxed'];
|
|
22
|
+
const LAYOUT_MODE_SET = new Set(LAYOUT_MODES);
|
|
23
|
+
const LAYOUT_CONTAINER_SET = new Set(LAYOUT_CONTAINERS);
|
|
24
|
+
function isLayoutMode(value) {
|
|
25
|
+
return typeof value === 'string' && LAYOUT_MODE_SET.has(value);
|
|
26
|
+
}
|
|
27
|
+
function isLayoutContainer(value) {
|
|
28
|
+
return typeof value === 'string' && LAYOUT_CONTAINER_SET.has(value);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const STORAGE_KEYS = {
|
|
32
|
+
'layout-mode': 'layout-mode',
|
|
33
|
+
'layout-container': 'layout-container',
|
|
34
|
+
};
|
|
35
|
+
const LEGACY_STORAGE_PREFIX = 'ng-theme:v2';
|
|
36
|
+
class LayoutService {
|
|
37
|
+
config = inject(NG_LAYOUT_CONFIG);
|
|
38
|
+
document = inject(DOCUMENT);
|
|
39
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
40
|
+
storage = new LocalStorageStateAdapter({
|
|
41
|
+
isBrowser: this.isBrowser,
|
|
42
|
+
storage: this.document.defaultView?.localStorage ?? null,
|
|
43
|
+
keys: STORAGE_KEYS,
|
|
44
|
+
legacyPrefix: LEGACY_STORAGE_PREFIX,
|
|
45
|
+
});
|
|
46
|
+
mode = signal(this.storage.read('layout-mode', this.config.defaultMode, isLayoutMode), ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
47
|
+
container = signal(this.storage.read('layout-container', this.config.defaultContainer, isLayoutContainer), ...(ngDevMode ? [{ debugName: "container" }] : /* istanbul ignore next */ []));
|
|
48
|
+
constructor() {
|
|
49
|
+
effect(() => {
|
|
50
|
+
if (this.isBrowser) {
|
|
51
|
+
this.applyToDOM();
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Updates the active shell mode and persists the value for future sessions.
|
|
57
|
+
*/
|
|
58
|
+
setMode(value) {
|
|
59
|
+
this.storage.persist('layout-mode', value);
|
|
60
|
+
this.mode.set(value);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Updates the active container width mode and persists the value for future sessions.
|
|
64
|
+
*/
|
|
65
|
+
setContainer(value) {
|
|
66
|
+
this.storage.persist('layout-container', value);
|
|
67
|
+
this.container.set(value);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Clears persisted layout state and restores the configured defaults for mode and container.
|
|
71
|
+
*/
|
|
72
|
+
reset() {
|
|
73
|
+
this.storage.clear('layout-mode');
|
|
74
|
+
this.storage.clear('layout-container');
|
|
75
|
+
this.mode.set(this.config.defaultMode);
|
|
76
|
+
this.container.set(this.config.defaultContainer);
|
|
77
|
+
}
|
|
78
|
+
applyToDOM() {
|
|
79
|
+
const element = this.document.documentElement;
|
|
80
|
+
element.dataset['layoutMode'] = this.mode();
|
|
81
|
+
element.dataset['layoutContainer'] = this.container();
|
|
82
|
+
}
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
84
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutService, providedIn: 'root' });
|
|
85
|
+
}
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutService, decorators: [{
|
|
87
|
+
type: Injectable,
|
|
88
|
+
args: [{ providedIn: 'root' }]
|
|
89
|
+
}], ctorParameters: () => [] });
|
|
90
|
+
|
|
91
|
+
class LayoutHostDirective {
|
|
92
|
+
layout = inject(LayoutService);
|
|
93
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutHostDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
94
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", type: LayoutHostDirective, isStandalone: true, selector: "[ngtLayoutHost]", host: { properties: { "attr.data-layout-mode": "layout.mode()", "attr.data-layout-container": "layout.container()" } }, ngImport: i0 });
|
|
95
|
+
}
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutHostDirective, decorators: [{
|
|
97
|
+
type: Directive,
|
|
98
|
+
args: [{
|
|
99
|
+
selector: '[ngtLayoutHost]',
|
|
100
|
+
host: {
|
|
101
|
+
'[attr.data-layout-mode]': 'layout.mode()',
|
|
102
|
+
'[attr.data-layout-container]': 'layout.container()',
|
|
103
|
+
},
|
|
104
|
+
}]
|
|
105
|
+
}] });
|
|
106
|
+
|
|
107
|
+
class LayoutElementDirective {
|
|
108
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
109
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", type: LayoutElementDirective, isStandalone: true, selector: "layout", ngImport: i0 });
|
|
110
|
+
}
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutElementDirective, decorators: [{
|
|
112
|
+
type: Directive,
|
|
113
|
+
args: [{
|
|
114
|
+
selector: 'layout',
|
|
115
|
+
}]
|
|
116
|
+
}] });
|
|
117
|
+
class ContentElementDirective {
|
|
118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ContentElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
119
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", type: ContentElementDirective, isStandalone: true, selector: "content,shell-content", ngImport: i0 });
|
|
120
|
+
}
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ContentElementDirective, decorators: [{
|
|
122
|
+
type: Directive,
|
|
123
|
+
args: [{
|
|
124
|
+
selector: 'content,shell-content',
|
|
125
|
+
}]
|
|
126
|
+
}] });
|
|
127
|
+
class BrandElementDirective {
|
|
128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: BrandElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
129
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", type: BrandElementDirective, isStandalone: true, selector: "brand", ngImport: i0 });
|
|
130
|
+
}
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: BrandElementDirective, decorators: [{
|
|
132
|
+
type: Directive,
|
|
133
|
+
args: [{
|
|
134
|
+
selector: 'brand',
|
|
135
|
+
}]
|
|
136
|
+
}] });
|
|
137
|
+
class PanelElementDirective {
|
|
138
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PanelElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
139
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", type: PanelElementDirective, isStandalone: true, selector: "panel", ngImport: i0 });
|
|
140
|
+
}
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PanelElementDirective, decorators: [{
|
|
142
|
+
type: Directive,
|
|
143
|
+
args: [{
|
|
144
|
+
selector: 'panel',
|
|
145
|
+
}]
|
|
146
|
+
}] });
|
|
147
|
+
|
|
148
|
+
class LayoutHorizontalComponent {
|
|
149
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutHorizontalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
150
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: LayoutHorizontalComponent, isStandalone: true, selector: "horizontal", host: { properties: { "attr.data-layout-mode": "\"horizontal\"" } }, ngImport: i0, template: `
|
|
151
|
+
<layout>
|
|
152
|
+
<shell-content>
|
|
153
|
+
<header>
|
|
154
|
+
<brand>
|
|
155
|
+
<ng-content select="[headerBrand]"></ng-content>
|
|
156
|
+
</brand>
|
|
157
|
+
|
|
158
|
+
<nav>
|
|
159
|
+
<ng-content select="[headerNavigation]"></ng-content>
|
|
160
|
+
</nav>
|
|
161
|
+
|
|
162
|
+
<panel>
|
|
163
|
+
<ng-content select="[headerActions]"></ng-content>
|
|
164
|
+
</panel>
|
|
165
|
+
</header>
|
|
166
|
+
|
|
167
|
+
<main>
|
|
168
|
+
<router-outlet />
|
|
169
|
+
</main>
|
|
170
|
+
</shell-content>
|
|
171
|
+
</layout>
|
|
172
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: LayoutElementDirective, selector: "layout" }, { kind: "directive", type: ContentElementDirective, selector: "content,shell-content" }, { kind: "directive", type: BrandElementDirective, selector: "brand" }, { kind: "directive", type: PanelElementDirective, selector: "panel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
173
|
+
}
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutHorizontalComponent, decorators: [{
|
|
175
|
+
type: Component,
|
|
176
|
+
args: [{
|
|
177
|
+
selector: 'horizontal',
|
|
178
|
+
imports: [
|
|
179
|
+
RouterOutlet,
|
|
180
|
+
LayoutElementDirective,
|
|
181
|
+
ContentElementDirective,
|
|
182
|
+
BrandElementDirective,
|
|
183
|
+
PanelElementDirective,
|
|
184
|
+
],
|
|
185
|
+
host: {
|
|
186
|
+
'[attr.data-layout-mode]': '"horizontal"',
|
|
187
|
+
},
|
|
188
|
+
template: `
|
|
189
|
+
<layout>
|
|
190
|
+
<shell-content>
|
|
191
|
+
<header>
|
|
192
|
+
<brand>
|
|
193
|
+
<ng-content select="[headerBrand]"></ng-content>
|
|
194
|
+
</brand>
|
|
195
|
+
|
|
196
|
+
<nav>
|
|
197
|
+
<ng-content select="[headerNavigation]"></ng-content>
|
|
198
|
+
</nav>
|
|
199
|
+
|
|
200
|
+
<panel>
|
|
201
|
+
<ng-content select="[headerActions]"></ng-content>
|
|
202
|
+
</panel>
|
|
203
|
+
</header>
|
|
204
|
+
|
|
205
|
+
<main>
|
|
206
|
+
<router-outlet />
|
|
207
|
+
</main>
|
|
208
|
+
</shell-content>
|
|
209
|
+
</layout>
|
|
210
|
+
`,
|
|
211
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
212
|
+
}]
|
|
213
|
+
}] });
|
|
214
|
+
|
|
215
|
+
class LayoutVerticalComponent {
|
|
216
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutVerticalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
217
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: LayoutVerticalComponent, isStandalone: true, selector: "vertical", host: { properties: { "attr.data-layout-mode": "\"vertical\"" } }, ngImport: i0, template: `
|
|
218
|
+
<layout>
|
|
219
|
+
<shell-content>
|
|
220
|
+
<aside>
|
|
221
|
+
<ng-content select="[navigation]"></ng-content>
|
|
222
|
+
</aside>
|
|
223
|
+
<main>
|
|
224
|
+
<router-outlet />
|
|
225
|
+
</main>
|
|
226
|
+
</shell-content>
|
|
227
|
+
</layout>
|
|
228
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: LayoutElementDirective, selector: "layout" }, { kind: "directive", type: ContentElementDirective, selector: "content,shell-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
229
|
+
}
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutVerticalComponent, decorators: [{
|
|
231
|
+
type: Component,
|
|
232
|
+
args: [{
|
|
233
|
+
selector: 'vertical',
|
|
234
|
+
imports: [RouterOutlet, LayoutElementDirective, ContentElementDirective],
|
|
235
|
+
host: {
|
|
236
|
+
'[attr.data-layout-mode]': '"vertical"',
|
|
237
|
+
},
|
|
238
|
+
template: `
|
|
239
|
+
<layout>
|
|
240
|
+
<shell-content>
|
|
241
|
+
<aside>
|
|
242
|
+
<ng-content select="[navigation]"></ng-content>
|
|
243
|
+
</aside>
|
|
244
|
+
<main>
|
|
245
|
+
<router-outlet />
|
|
246
|
+
</main>
|
|
247
|
+
</shell-content>
|
|
248
|
+
</layout>
|
|
249
|
+
`,
|
|
250
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
251
|
+
}]
|
|
252
|
+
}] });
|
|
253
|
+
|
|
254
|
+
class LayoutContainerSwitcherComponent {
|
|
255
|
+
layout = inject(LayoutService);
|
|
256
|
+
label = computed(() => this.layout.container() === 'boxed'
|
|
257
|
+
? 'Boxed layout container enabled'
|
|
258
|
+
: 'Boxed layout container disabled', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
259
|
+
toggle() {
|
|
260
|
+
this.layout.setContainer(this.layout.container() === 'full' ? 'boxed' : 'full');
|
|
261
|
+
}
|
|
262
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutContainerSwitcherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
263
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LayoutContainerSwitcherComponent, isStandalone: true, selector: "layout-container-switcher", providers: [libraryLucideConfigProvider], ngImport: i0, template: `
|
|
264
|
+
<button
|
|
265
|
+
class="ngt-icon-button"
|
|
266
|
+
type="button"
|
|
267
|
+
mat-icon-button
|
|
268
|
+
aria-label="Boxed layout container"
|
|
269
|
+
[attr.aria-pressed]="layout.container() === 'boxed'"
|
|
270
|
+
[matTooltip]="label()"
|
|
271
|
+
(click)="toggle()"
|
|
272
|
+
>
|
|
273
|
+
@if (layout.container() === 'full') {
|
|
274
|
+
<svg lucideExpand aria-hidden="true"></svg>
|
|
275
|
+
} @else {
|
|
276
|
+
<svg lucideShrink aria-hidden="true"></svg>
|
|
277
|
+
}
|
|
278
|
+
</button>
|
|
279
|
+
`, isInline: true, dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: LucideExpand, selector: "svg[lucideExpand]" }, { kind: "component", type: LucideShrink, selector: "svg[lucideShrink]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
280
|
+
}
|
|
281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutContainerSwitcherComponent, decorators: [{
|
|
282
|
+
type: Component,
|
|
283
|
+
args: [{
|
|
284
|
+
selector: 'layout-container-switcher',
|
|
285
|
+
imports: [MatIconButton, MatTooltip, LucideExpand, LucideShrink],
|
|
286
|
+
providers: [libraryLucideConfigProvider],
|
|
287
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
288
|
+
template: `
|
|
289
|
+
<button
|
|
290
|
+
class="ngt-icon-button"
|
|
291
|
+
type="button"
|
|
292
|
+
mat-icon-button
|
|
293
|
+
aria-label="Boxed layout container"
|
|
294
|
+
[attr.aria-pressed]="layout.container() === 'boxed'"
|
|
295
|
+
[matTooltip]="label()"
|
|
296
|
+
(click)="toggle()"
|
|
297
|
+
>
|
|
298
|
+
@if (layout.container() === 'full') {
|
|
299
|
+
<svg lucideExpand aria-hidden="true"></svg>
|
|
300
|
+
} @else {
|
|
301
|
+
<svg lucideShrink aria-hidden="true"></svg>
|
|
302
|
+
}
|
|
303
|
+
</button>
|
|
304
|
+
`,
|
|
305
|
+
}]
|
|
306
|
+
}] });
|
|
307
|
+
|
|
308
|
+
class LayoutModeSwitcherComponent {
|
|
309
|
+
layout = inject(LayoutService);
|
|
310
|
+
// Empty mode remains programmatic so the UI only exposes the two navigational shell variants.
|
|
311
|
+
options = [
|
|
312
|
+
{ value: 'vertical', label: 'Vertical Sidebar' },
|
|
313
|
+
{ value: 'horizontal', label: 'Horizontal Navbar' },
|
|
314
|
+
];
|
|
315
|
+
currentOption = computed(() => this.options.find((option) => option.value === this.layout.mode()) ?? {
|
|
316
|
+
value: 'empty',
|
|
317
|
+
label: 'Content Only',
|
|
318
|
+
}, ...(ngDevMode ? [{ debugName: "currentOption" }] : /* istanbul ignore next */ []));
|
|
319
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutModeSwitcherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
320
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LayoutModeSwitcherComponent, isStandalone: true, selector: "layout-mode-switcher", providers: [libraryLucideConfigProvider], ngImport: i0, template: `
|
|
321
|
+
<button
|
|
322
|
+
class="ngt-icon-button"
|
|
323
|
+
type="button"
|
|
324
|
+
mat-icon-button
|
|
325
|
+
[attr.aria-label]="'Layout mode: ' + currentOption().label"
|
|
326
|
+
[matTooltip]="'Layout mode: ' + currentOption().label"
|
|
327
|
+
[matMenuTriggerFor]="menu"
|
|
328
|
+
>
|
|
329
|
+
@switch (layout.mode()) {
|
|
330
|
+
@case ('vertical') {
|
|
331
|
+
<svg lucidePanelLeft aria-hidden="true"></svg>
|
|
332
|
+
}
|
|
333
|
+
@case ('horizontal') {
|
|
334
|
+
<svg lucidePanelTop aria-hidden="true"></svg>
|
|
335
|
+
}
|
|
336
|
+
@default {
|
|
337
|
+
<svg lucideAppWindow aria-hidden="true"></svg>
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
</button>
|
|
341
|
+
|
|
342
|
+
<mat-menu #menu="matMenu">
|
|
343
|
+
@for (option of options; track option.value) {
|
|
344
|
+
<button
|
|
345
|
+
type="button"
|
|
346
|
+
mat-menu-item
|
|
347
|
+
role="menuitemradio"
|
|
348
|
+
[attr.aria-checked]="layout.mode() === option.value"
|
|
349
|
+
(click)="layout.setMode(option.value)"
|
|
350
|
+
>
|
|
351
|
+
@switch (option.value) {
|
|
352
|
+
@case ('vertical') {
|
|
353
|
+
<svg lucidePanelLeft aria-hidden="true"></svg>
|
|
354
|
+
}
|
|
355
|
+
@case ('horizontal') {
|
|
356
|
+
<svg lucidePanelTop aria-hidden="true"></svg>
|
|
357
|
+
}
|
|
358
|
+
@default {
|
|
359
|
+
<svg lucideAppWindow aria-hidden="true"></svg>
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
<span>{{ option.label }}</span>
|
|
363
|
+
</button>
|
|
364
|
+
}
|
|
365
|
+
</mat-menu>
|
|
366
|
+
`, isInline: true, dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: LucidePanelLeft, selector: "svg[lucidePanelLeft], svg[lucideSidebar]" }, { kind: "component", type: LucidePanelTop, selector: "svg[lucidePanelTop]" }, { kind: "component", type: LucideAppWindow, selector: "svg[lucideAppWindow]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
367
|
+
}
|
|
368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LayoutModeSwitcherComponent, decorators: [{
|
|
369
|
+
type: Component,
|
|
370
|
+
args: [{
|
|
371
|
+
selector: 'layout-mode-switcher',
|
|
372
|
+
imports: [
|
|
373
|
+
MatIconButton,
|
|
374
|
+
MatTooltip,
|
|
375
|
+
MatMenu,
|
|
376
|
+
MatMenuItem,
|
|
377
|
+
MatMenuTrigger,
|
|
378
|
+
LucidePanelLeft,
|
|
379
|
+
LucidePanelTop,
|
|
380
|
+
LucideAppWindow,
|
|
381
|
+
],
|
|
382
|
+
providers: [libraryLucideConfigProvider],
|
|
383
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
384
|
+
template: `
|
|
385
|
+
<button
|
|
386
|
+
class="ngt-icon-button"
|
|
387
|
+
type="button"
|
|
388
|
+
mat-icon-button
|
|
389
|
+
[attr.aria-label]="'Layout mode: ' + currentOption().label"
|
|
390
|
+
[matTooltip]="'Layout mode: ' + currentOption().label"
|
|
391
|
+
[matMenuTriggerFor]="menu"
|
|
392
|
+
>
|
|
393
|
+
@switch (layout.mode()) {
|
|
394
|
+
@case ('vertical') {
|
|
395
|
+
<svg lucidePanelLeft aria-hidden="true"></svg>
|
|
396
|
+
}
|
|
397
|
+
@case ('horizontal') {
|
|
398
|
+
<svg lucidePanelTop aria-hidden="true"></svg>
|
|
399
|
+
}
|
|
400
|
+
@default {
|
|
401
|
+
<svg lucideAppWindow aria-hidden="true"></svg>
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
</button>
|
|
405
|
+
|
|
406
|
+
<mat-menu #menu="matMenu">
|
|
407
|
+
@for (option of options; track option.value) {
|
|
408
|
+
<button
|
|
409
|
+
type="button"
|
|
410
|
+
mat-menu-item
|
|
411
|
+
role="menuitemradio"
|
|
412
|
+
[attr.aria-checked]="layout.mode() === option.value"
|
|
413
|
+
(click)="layout.setMode(option.value)"
|
|
414
|
+
>
|
|
415
|
+
@switch (option.value) {
|
|
416
|
+
@case ('vertical') {
|
|
417
|
+
<svg lucidePanelLeft aria-hidden="true"></svg>
|
|
418
|
+
}
|
|
419
|
+
@case ('horizontal') {
|
|
420
|
+
<svg lucidePanelTop aria-hidden="true"></svg>
|
|
421
|
+
}
|
|
422
|
+
@default {
|
|
423
|
+
<svg lucideAppWindow aria-hidden="true"></svg>
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
<span>{{ option.label }}</span>
|
|
427
|
+
</button>
|
|
428
|
+
}
|
|
429
|
+
</mat-menu>
|
|
430
|
+
`,
|
|
431
|
+
}]
|
|
432
|
+
}] });
|
|
433
|
+
|
|
434
|
+
function warnInvalidLayoutConfig(message) {
|
|
435
|
+
if (isDevMode()) {
|
|
436
|
+
console.warn(`[provideNgLayout] ${message}`);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
function normalizeLayoutMode(value) {
|
|
440
|
+
if (typeof value === 'undefined' || isLayoutMode(value)) {
|
|
441
|
+
return value ?? DEFAULT_NG_LAYOUT_CONFIG.defaultMode;
|
|
442
|
+
}
|
|
443
|
+
warnInvalidLayoutConfig(`Ignoring invalid defaultMode ${JSON.stringify(value)}. Falling back to ${JSON.stringify(DEFAULT_NG_LAYOUT_CONFIG.defaultMode)}.`);
|
|
444
|
+
return DEFAULT_NG_LAYOUT_CONFIG.defaultMode;
|
|
445
|
+
}
|
|
446
|
+
function normalizeLayoutContainer(value) {
|
|
447
|
+
if (typeof value === 'undefined' || isLayoutContainer(value)) {
|
|
448
|
+
return value ?? DEFAULT_NG_LAYOUT_CONFIG.defaultContainer;
|
|
449
|
+
}
|
|
450
|
+
warnInvalidLayoutConfig(`Ignoring invalid defaultContainer ${JSON.stringify(value)}. Falling back to ${JSON.stringify(DEFAULT_NG_LAYOUT_CONFIG.defaultContainer)}.`);
|
|
451
|
+
return DEFAULT_NG_LAYOUT_CONFIG.defaultContainer;
|
|
452
|
+
}
|
|
453
|
+
function normalizeLayoutConfig(config) {
|
|
454
|
+
return {
|
|
455
|
+
...DEFAULT_NG_LAYOUT_CONFIG,
|
|
456
|
+
defaultMode: normalizeLayoutMode(config.defaultMode),
|
|
457
|
+
defaultContainer: normalizeLayoutContainer(config.defaultContainer),
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
function provideNgLayout(config = {}) {
|
|
461
|
+
return makeEnvironmentProviders([
|
|
462
|
+
{ provide: NG_LAYOUT_CONFIG, useValue: normalizeLayoutConfig(config) },
|
|
463
|
+
]);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Generated bundle index. Do not edit.
|
|
468
|
+
*/
|
|
469
|
+
|
|
470
|
+
export { LayoutContainerSwitcherComponent, LayoutHorizontalComponent, LayoutHostDirective, LayoutModeSwitcherComponent, LayoutService, LayoutVerticalComponent, NG_LAYOUT_CONFIG, provideNgLayout };
|
|
471
|
+
//# sourceMappingURL=ojiepermana-angular-layout.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ojiepermana-angular-layout.mjs","sources":["../../../projects/library/layout/src/layout.token.ts","../../../projects/library/layout/src/layout.types.ts","../../../projects/library/layout/src/layout.service.ts","../../../projects/library/layout/src/layout-host.directive.ts","../../../projects/library/layout/src/elements.directive.ts","../../../projects/library/layout/src/horizontal.ts","../../../projects/library/layout/src/vertical.ts","../../../projects/library/layout/src/layout-container-switcher.ts","../../../projects/library/layout/src/layout-mode-switcher.ts","../../../projects/library/layout/src/layout.provider.ts","../../../projects/library/layout/ojiepermana-angular-layout.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { NgLayoutConfig } from './layout.types';\n\nexport const DEFAULT_NG_LAYOUT_CONFIG: NgLayoutConfig = {\n defaultMode: 'vertical',\n defaultContainer: 'full',\n};\n\nexport const NG_LAYOUT_CONFIG = new InjectionToken<NgLayoutConfig>('NG_LAYOUT_CONFIG', {\n providedIn: 'root',\n factory: () => ({ ...DEFAULT_NG_LAYOUT_CONFIG }),\n});\n","export const LAYOUT_MODES = ['vertical', 'horizontal', 'empty'] as const;\nexport type LayoutMode = (typeof LAYOUT_MODES)[number];\n\nexport const LAYOUT_CONTAINERS = ['full', 'boxed'] as const;\nexport type LayoutContainer = (typeof LAYOUT_CONTAINERS)[number];\n\nconst LAYOUT_MODE_SET = new Set<LayoutMode>(LAYOUT_MODES);\nconst LAYOUT_CONTAINER_SET = new Set<LayoutContainer>(LAYOUT_CONTAINERS);\n\nexport function isLayoutMode(value: unknown): value is LayoutMode {\n return typeof value === 'string' && LAYOUT_MODE_SET.has(value as LayoutMode);\n}\n\nexport function isLayoutContainer(value: unknown): value is LayoutContainer {\n return typeof value === 'string' && LAYOUT_CONTAINER_SET.has(value as LayoutContainer);\n}\n\nexport interface NgLayoutConfig {\n defaultMode: LayoutMode;\n defaultContainer: LayoutContainer;\n}\n","import { Injectable, PLATFORM_ID, effect, inject, signal } from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { LocalStorageStateAdapter } from '@ojiepermana/angular/internal';\nimport { NG_LAYOUT_CONFIG } from './layout.token';\nimport { isLayoutContainer, isLayoutMode, LayoutContainer, LayoutMode } from './layout.types';\n\nconst STORAGE_KEYS = {\n 'layout-mode': 'layout-mode',\n 'layout-container': 'layout-container',\n} as const;\n\ntype LayoutStorageAxis = keyof typeof STORAGE_KEYS;\n\nconst LEGACY_STORAGE_PREFIX = 'ng-theme:v2';\n\n@Injectable({ providedIn: 'root' })\nexport class LayoutService {\n private readonly config = inject(NG_LAYOUT_CONFIG);\n private readonly document = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly storage = new LocalStorageStateAdapter<LayoutStorageAxis>({\n isBrowser: this.isBrowser,\n storage: this.document.defaultView?.localStorage ?? null,\n keys: STORAGE_KEYS,\n legacyPrefix: LEGACY_STORAGE_PREFIX,\n });\n\n readonly mode = signal<LayoutMode>(\n this.storage.read('layout-mode', this.config.defaultMode, isLayoutMode),\n );\n readonly container = signal<LayoutContainer>(\n this.storage.read('layout-container', this.config.defaultContainer, isLayoutContainer),\n );\n\n constructor() {\n effect(() => {\n if (this.isBrowser) {\n this.applyToDOM();\n }\n });\n }\n\n /**\n * Updates the active shell mode and persists the value for future sessions.\n */\n setMode(value: LayoutMode): void {\n this.storage.persist('layout-mode', value);\n this.mode.set(value);\n }\n\n /**\n * Updates the active container width mode and persists the value for future sessions.\n */\n setContainer(value: LayoutContainer): void {\n this.storage.persist('layout-container', value);\n this.container.set(value);\n }\n\n /**\n * Clears persisted layout state and restores the configured defaults for mode and container.\n */\n reset(): void {\n this.storage.clear('layout-mode');\n this.storage.clear('layout-container');\n this.mode.set(this.config.defaultMode);\n this.container.set(this.config.defaultContainer);\n }\n\n private applyToDOM(): void {\n const element = this.document.documentElement;\n\n element.dataset['layoutMode'] = this.mode();\n element.dataset['layoutContainer'] = this.container();\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { LayoutService } from './layout.service';\n\n@Directive({\n selector: '[ngtLayoutHost]',\n host: {\n '[attr.data-layout-mode]': 'layout.mode()',\n '[attr.data-layout-container]': 'layout.container()',\n },\n})\nexport class LayoutHostDirective {\n protected readonly layout = inject(LayoutService);\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: 'layout',\n})\nexport class LayoutElementDirective {}\n\n@Directive({\n selector: 'content,shell-content',\n})\nexport class ContentElementDirective {}\n\n@Directive({\n selector: 'brand',\n})\nexport class BrandElementDirective {}\n\n@Directive({\n selector: 'panel',\n})\nexport class PanelElementDirective {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\nimport {\n BrandElementDirective,\n ContentElementDirective,\n LayoutElementDirective,\n PanelElementDirective,\n} from './elements.directive';\n\n@Component({\n selector: 'horizontal',\n imports: [\n RouterOutlet,\n LayoutElementDirective,\n ContentElementDirective,\n BrandElementDirective,\n PanelElementDirective,\n ],\n host: {\n '[attr.data-layout-mode]': '\"horizontal\"',\n },\n template: `\n <layout>\n <shell-content>\n <header>\n <brand>\n <ng-content select=\"[headerBrand]\"></ng-content>\n </brand>\n\n <nav>\n <ng-content select=\"[headerNavigation]\"></ng-content>\n </nav>\n\n <panel>\n <ng-content select=\"[headerActions]\"></ng-content>\n </panel>\n </header>\n\n <main>\n <router-outlet />\n </main>\n </shell-content>\n </layout>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LayoutHorizontalComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\nimport { ContentElementDirective, LayoutElementDirective } from './elements.directive';\n\n@Component({\n selector: 'vertical',\n imports: [RouterOutlet, LayoutElementDirective, ContentElementDirective],\n host: {\n '[attr.data-layout-mode]': '\"vertical\"',\n },\n template: `\n <layout>\n <shell-content>\n <aside>\n <ng-content select=\"[navigation]\"></ng-content>\n </aside>\n <main>\n <router-outlet />\n </main>\n </shell-content>\n </layout>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LayoutVerticalComponent {}\n","import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { MatIconButton } from '@angular/material/button';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { libraryLucideConfigProvider } from '@ojiepermana/angular/internal';\nimport { LucideExpand, LucideShrink } from '@lucide/angular';\nimport { LayoutService } from './layout.service';\n\n@Component({\n selector: 'layout-container-switcher',\n imports: [MatIconButton, MatTooltip, LucideExpand, LucideShrink],\n providers: [libraryLucideConfigProvider],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <button\n class=\"ngt-icon-button\"\n type=\"button\"\n mat-icon-button\n aria-label=\"Boxed layout container\"\n [attr.aria-pressed]=\"layout.container() === 'boxed'\"\n [matTooltip]=\"label()\"\n (click)=\"toggle()\"\n >\n @if (layout.container() === 'full') {\n <svg lucideExpand aria-hidden=\"true\"></svg>\n } @else {\n <svg lucideShrink aria-hidden=\"true\"></svg>\n }\n </button>\n `,\n})\nexport class LayoutContainerSwitcherComponent {\n protected readonly layout = inject(LayoutService);\n\n protected readonly label = computed(() =>\n this.layout.container() === 'boxed'\n ? 'Boxed layout container enabled'\n : 'Boxed layout container disabled',\n );\n\n protected toggle(): void {\n this.layout.setContainer(this.layout.container() === 'full' ? 'boxed' : 'full');\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { MatIconButton } from '@angular/material/button';\nimport { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { libraryLucideConfigProvider } from '@ojiepermana/angular/internal';\nimport { LucideAppWindow, LucidePanelLeft, LucidePanelTop } from '@lucide/angular';\nimport { LayoutService } from './layout.service';\n\n@Component({\n selector: 'layout-mode-switcher',\n imports: [\n MatIconButton,\n MatTooltip,\n MatMenu,\n MatMenuItem,\n MatMenuTrigger,\n LucidePanelLeft,\n LucidePanelTop,\n LucideAppWindow,\n ],\n providers: [libraryLucideConfigProvider],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <button\n class=\"ngt-icon-button\"\n type=\"button\"\n mat-icon-button\n [attr.aria-label]=\"'Layout mode: ' + currentOption().label\"\n [matTooltip]=\"'Layout mode: ' + currentOption().label\"\n [matMenuTriggerFor]=\"menu\"\n >\n @switch (layout.mode()) {\n @case ('vertical') {\n <svg lucidePanelLeft aria-hidden=\"true\"></svg>\n }\n @case ('horizontal') {\n <svg lucidePanelTop aria-hidden=\"true\"></svg>\n }\n @default {\n <svg lucideAppWindow aria-hidden=\"true\"></svg>\n }\n }\n </button>\n\n <mat-menu #menu=\"matMenu\">\n @for (option of options; track option.value) {\n <button\n type=\"button\"\n mat-menu-item\n role=\"menuitemradio\"\n [attr.aria-checked]=\"layout.mode() === option.value\"\n (click)=\"layout.setMode(option.value)\"\n >\n @switch (option.value) {\n @case ('vertical') {\n <svg lucidePanelLeft aria-hidden=\"true\"></svg>\n }\n @case ('horizontal') {\n <svg lucidePanelTop aria-hidden=\"true\"></svg>\n }\n @default {\n <svg lucideAppWindow aria-hidden=\"true\"></svg>\n }\n }\n <span>{{ option.label }}</span>\n </button>\n }\n </mat-menu>\n `,\n})\nexport class LayoutModeSwitcherComponent {\n protected readonly layout = inject(LayoutService);\n\n // Empty mode remains programmatic so the UI only exposes the two navigational shell variants.\n protected readonly options = [\n { value: 'vertical' as const, label: 'Vertical Sidebar' },\n { value: 'horizontal' as const, label: 'Horizontal Navbar' },\n ];\n\n protected readonly currentOption = computed(\n () =>\n this.options.find((option) => option.value === this.layout.mode()) ?? {\n value: 'empty' as const,\n label: 'Content Only',\n },\n );\n}\n","import { EnvironmentProviders, isDevMode, makeEnvironmentProviders } from '@angular/core';\nimport { DEFAULT_NG_LAYOUT_CONFIG, NG_LAYOUT_CONFIG } from './layout.token';\nimport {\n isLayoutContainer,\n isLayoutMode,\n LayoutContainer,\n LayoutMode,\n NgLayoutConfig,\n} from './layout.types';\n\nfunction warnInvalidLayoutConfig(message: string): void {\n if (isDevMode()) {\n console.warn(`[provideNgLayout] ${message}`);\n }\n}\n\nfunction normalizeLayoutMode(value: unknown): LayoutMode {\n if (typeof value === 'undefined' || isLayoutMode(value)) {\n return value ?? DEFAULT_NG_LAYOUT_CONFIG.defaultMode;\n }\n\n warnInvalidLayoutConfig(\n `Ignoring invalid defaultMode ${JSON.stringify(value)}. Falling back to ${JSON.stringify(DEFAULT_NG_LAYOUT_CONFIG.defaultMode)}.`,\n );\n\n return DEFAULT_NG_LAYOUT_CONFIG.defaultMode;\n}\n\nfunction normalizeLayoutContainer(value: unknown): LayoutContainer {\n if (typeof value === 'undefined' || isLayoutContainer(value)) {\n return value ?? DEFAULT_NG_LAYOUT_CONFIG.defaultContainer;\n }\n\n warnInvalidLayoutConfig(\n `Ignoring invalid defaultContainer ${JSON.stringify(value)}. Falling back to ${JSON.stringify(DEFAULT_NG_LAYOUT_CONFIG.defaultContainer)}.`,\n );\n\n return DEFAULT_NG_LAYOUT_CONFIG.defaultContainer;\n}\n\nfunction normalizeLayoutConfig(config: Partial<NgLayoutConfig>): NgLayoutConfig {\n return {\n ...DEFAULT_NG_LAYOUT_CONFIG,\n defaultMode: normalizeLayoutMode(config.defaultMode),\n defaultContainer: normalizeLayoutContainer(config.defaultContainer),\n };\n}\n\nexport function provideNgLayout(config: Partial<NgLayoutConfig> = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: NG_LAYOUT_CONFIG, useValue: normalizeLayoutConfig(config) },\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;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AAO,wBAAwB,CAAC;QAC9B,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,qBAAqB,CAAC,MAAM,CAAC,EAAE;AACvE,KAAA,CAAC;AACJ;;ACpDA;;AAEG;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { makeEnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { provideNgLayout } from '@ojiepermana/angular/layout';
|
|
3
|
+
import { provideNgTheme } from '@ojiepermana/angular/theme/service';
|
|
4
|
+
|
|
5
|
+
function provideNgShell(config = {}) {
|
|
6
|
+
return makeEnvironmentProviders([provideNgTheme(config.theme), provideNgLayout(config.layout)]);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Generated bundle index. Do not edit.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export { provideNgShell };
|
|
14
|
+
//# sourceMappingURL=ojiepermana-angular-shell.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ojiepermana-angular-shell.mjs","sources":["../../../projects/library/shell/src/shell.provider.ts","../../../projects/library/shell/ojiepermana-angular-shell.ts"],"sourcesContent":["import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { provideNgLayout } from '@ojiepermana/angular/layout';\nimport type { NgLayoutConfig } from '@ojiepermana/angular/layout';\nimport { provideNgTheme } from '@ojiepermana/angular/theme/service';\nimport type { NgThemeConfig } from '@ojiepermana/angular/theme/service';\n\nexport interface NgShellConfig {\n readonly theme?: Partial<NgThemeConfig>;\n readonly layout?: Partial<NgLayoutConfig>;\n}\n\nexport function provideNgShell(config: NgShellConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([provideNgTheme(config.theme), provideNgLayout(config.layout)]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAWM,SAAU,cAAc,CAAC,MAAA,GAAwB,EAAE,EAAA;AACvD,IAAA,OAAO,wBAAwB,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;AACjG;;ACbA;;AAEG;;;;"}
|