@lukfel/ng-scaffold 21.0.7 → 21.1.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 +6 -12
- package/fesm2022/lukfel-ng-scaffold.mjs +396 -363
- package/fesm2022/lukfel-ng-scaffold.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_variables.scss +3 -1
- package/styles/style.scss +1 -0
- package/types/lukfel-ng-scaffold.d.ts +49 -30
package/package.json
CHANGED
package/styles/_variables.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--transition: 400ms cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
3
3
|
|
|
4
|
-
--loading-overlay-z-index:
|
|
4
|
+
--loading-overlay-z-index: 1001;
|
|
5
5
|
|
|
6
6
|
--header-z-index: 100;
|
|
7
7
|
--header-height: 64px;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
--header-input-max-width: 480px;
|
|
13
13
|
--header-input-border-radius: 28px;
|
|
14
14
|
--header-menu-button-max-width: 144px;
|
|
15
|
+
--header-menu-img-size: 48px;
|
|
15
16
|
|
|
16
17
|
--navbar-z-index: 99;
|
|
17
18
|
--navbar-height: 72px;
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
|
|
27
28
|
--drawer-width: 208px;
|
|
28
29
|
--drawer-z-index: 97;
|
|
30
|
+
--drawer-z-index-mobile: 100;
|
|
29
31
|
|
|
30
32
|
--footer-height: 100px;
|
|
31
33
|
--footer-logo-size: 96px;
|
package/styles/style.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, OnInit, OnDestroy, ElementRef, EventEmitter, AfterViewInit, ModuleWithProviders, TemplateRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { InjectionToken, OnInit, OnDestroy, ElementRef, EventEmitter, AfterViewInit, ModuleWithProviders, TemplateRef, OnChanges, SimpleChanges, Type } from '@angular/core';
|
|
3
3
|
import * as i22 from '@angular/cdk/portal';
|
|
4
|
-
import { ComponentPortal, TemplatePortal
|
|
4
|
+
import { ComponentType, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
|
|
5
5
|
import * as i11$1 from '@angular/platform-browser';
|
|
6
6
|
import * as i12$1 from '@angular/router';
|
|
7
7
|
import * as i1$1 from '@angular/common';
|
|
@@ -39,6 +39,7 @@ import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/c
|
|
|
39
39
|
|
|
40
40
|
interface MenuButton extends Button {
|
|
41
41
|
menuButtons?: Button[];
|
|
42
|
+
imgIcon?: string;
|
|
42
43
|
}
|
|
43
44
|
interface Button {
|
|
44
45
|
id: string;
|
|
@@ -86,8 +87,9 @@ interface FloatingButtonConfig {
|
|
|
86
87
|
matIcon?: string;
|
|
87
88
|
svgIcon?: string;
|
|
88
89
|
tooltip?: string;
|
|
89
|
-
horizontalPosition?: '
|
|
90
|
+
horizontalPosition?: 'center' | 'right';
|
|
90
91
|
autoHide?: boolean;
|
|
92
|
+
sticky?: boolean;
|
|
91
93
|
cssClass?: string;
|
|
92
94
|
}
|
|
93
95
|
|
|
@@ -126,7 +128,8 @@ interface HeaderConfig {
|
|
|
126
128
|
interface HeaderResponsiveConfig {
|
|
127
129
|
enable?: boolean;
|
|
128
130
|
matIcon?: string;
|
|
129
|
-
|
|
131
|
+
svgIcon?: string;
|
|
132
|
+
label?: string;
|
|
130
133
|
excludeButtonIds?: string[];
|
|
131
134
|
}
|
|
132
135
|
interface HeaderInputConfig {
|
|
@@ -181,10 +184,16 @@ interface ListHeaderItem {
|
|
|
181
184
|
sortToken?: string;
|
|
182
185
|
}
|
|
183
186
|
|
|
187
|
+
interface LoadingOverlayConfig {
|
|
188
|
+
gradient?: boolean;
|
|
189
|
+
customComponent?: ComponentType<any>;
|
|
190
|
+
cssClass?: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
184
193
|
interface NavbarConfig {
|
|
185
194
|
enable?: boolean;
|
|
186
195
|
showAllLabels?: boolean;
|
|
187
|
-
|
|
196
|
+
buttons?: Button[];
|
|
188
197
|
cssClass?: string;
|
|
189
198
|
}
|
|
190
199
|
|
|
@@ -201,6 +210,7 @@ interface ScaffoldConfig {
|
|
|
201
210
|
loading?: boolean;
|
|
202
211
|
scrollPositionRestoration?: boolean;
|
|
203
212
|
anchorScrolling?: boolean;
|
|
213
|
+
loadingOverlayConfig?: LoadingOverlayConfig;
|
|
204
214
|
headerConfig?: HeaderConfig;
|
|
205
215
|
navbarConfig?: NavbarConfig;
|
|
206
216
|
drawerConfig?: DrawerConfig;
|
|
@@ -225,6 +235,7 @@ declare class ScaffoldComponent implements OnInit, OnDestroy {
|
|
|
225
235
|
private scaffoldService;
|
|
226
236
|
private breakpointService;
|
|
227
237
|
private routerService;
|
|
238
|
+
private overlayService;
|
|
228
239
|
private logger;
|
|
229
240
|
private route;
|
|
230
241
|
private document;
|
|
@@ -254,14 +265,14 @@ declare class ScaffoldComponent implements OnInit, OnDestroy {
|
|
|
254
265
|
private _subscription;
|
|
255
266
|
ngOnInit(): void;
|
|
256
267
|
ngOnDestroy(): void;
|
|
257
|
-
headerConfigUpdated(headerConfig: HeaderConfig): void;
|
|
268
|
+
headerConfigUpdated(headerConfig: Partial<HeaderConfig>): void;
|
|
258
269
|
headerButtonClicked(id: string): void;
|
|
259
270
|
headerInputSubmitted(value: string): void;
|
|
260
271
|
headerInputChanged(value: string): void;
|
|
261
272
|
navbarButtonClicked(id: string): void;
|
|
262
|
-
drawerConfigUpdated(drawerConfig: DrawerConfig): void;
|
|
273
|
+
drawerConfigUpdated(drawerConfig: Partial<DrawerConfig>): void;
|
|
263
274
|
backButtonClicked(): void;
|
|
264
|
-
floatingButtonConfigUpdated(floatingButtonConfig: FloatingButtonConfig): void;
|
|
275
|
+
floatingButtonConfigUpdated(floatingButtonConfig: Partial<FloatingButtonConfig>): void;
|
|
265
276
|
floatingButtonClicked(id: string): void;
|
|
266
277
|
bottomBarCloseClicked(id: string): void;
|
|
267
278
|
bottomBarButtonClicked(id: string): void;
|
|
@@ -269,23 +280,27 @@ declare class ScaffoldComponent implements OnInit, OnDestroy {
|
|
|
269
280
|
static ɵcmp: i0.ɵɵComponentDeclaration<ScaffoldComponent, "lf-scaffold", never, {}, { "headerButtonClickEvent": "headerButtonClickEvent"; "headerInputSubmitEvent": "headerInputSubmitEvent"; "headerInputChangeEvent": "headerInputChangeEvent"; "navbarButtonClickEvent": "navbarButtonClickEvent"; "floatingButtonClickEvent": "floatingButtonClickEvent"; "bottomBarButtonClickEvent": "bottomBarButtonClickEvent"; }, never, ["[drawerContent]", "*"], false, never>;
|
|
270
281
|
}
|
|
271
282
|
|
|
272
|
-
declare class LoadingOverlayComponent {
|
|
283
|
+
declare class LoadingOverlayComponent implements OnInit {
|
|
284
|
+
libraryConfig: ScaffoldLibraryConfig | null;
|
|
285
|
+
private scaffoldService;
|
|
286
|
+
portal: ComponentPortal<any> | null;
|
|
287
|
+
loadingOverlayConfig: LoadingOverlayConfig | null;
|
|
288
|
+
ngOnInit(): void;
|
|
273
289
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingOverlayComponent, never>;
|
|
274
290
|
static ɵcmp: i0.ɵɵComponentDeclaration<LoadingOverlayComponent, "lf-loading-overlay", never, {}, {}, never, never, false, never>;
|
|
275
291
|
}
|
|
276
292
|
|
|
277
|
-
declare class HeaderComponent
|
|
293
|
+
declare class HeaderComponent {
|
|
278
294
|
libraryConfig: ScaffoldLibraryConfig | null;
|
|
279
295
|
headerConfig: HeaderConfig | null;
|
|
280
296
|
isMobile: boolean;
|
|
281
297
|
routeLoading: boolean;
|
|
282
298
|
currentRoute: string;
|
|
283
|
-
headerConfigUpdateEvent: EventEmitter<HeaderConfig
|
|
299
|
+
headerConfigUpdateEvent: EventEmitter<Partial<HeaderConfig>>;
|
|
284
300
|
headerButtonClickEvent: EventEmitter<string>;
|
|
285
301
|
headerInputSubmitEvent: EventEmitter<string>;
|
|
286
302
|
headerInputChangeEvent: EventEmitter<string>;
|
|
287
303
|
mobileButton: MenuButton;
|
|
288
|
-
ngOnInit(): void;
|
|
289
304
|
buttonClicked(id?: string): void;
|
|
290
305
|
inputSubmitted(value: string): void;
|
|
291
306
|
inputChanged(value: string): void;
|
|
@@ -309,14 +324,13 @@ declare class NavbarComponent {
|
|
|
309
324
|
static ɵcmp: i0.ɵɵComponentDeclaration<NavbarComponent, "lf-navbar", never, { "libraryConfig": { "alias": "libraryConfig"; "required": false; }; "navbarConfig": { "alias": "navbarConfig"; "required": false; }; "isMobile": { "alias": "isMobile"; "required": false; }; "currentRoute": { "alias": "currentRoute"; "required": false; }; }, { "navbarButtonClickEvent": "navbarButtonClickEvent"; }, never, never, false, never>;
|
|
310
325
|
}
|
|
311
326
|
|
|
312
|
-
declare class DrawerComponent
|
|
327
|
+
declare class DrawerComponent {
|
|
313
328
|
libraryConfig: ScaffoldLibraryConfig | null;
|
|
314
329
|
drawerConfig: DrawerConfig | null;
|
|
315
330
|
isMobile: boolean;
|
|
316
331
|
headerEnabled: boolean;
|
|
317
332
|
drawerPortal: ComponentPortal<unknown> | TemplatePortal<unknown> | null;
|
|
318
|
-
drawerConfigUpdateEvent: EventEmitter<DrawerConfig
|
|
319
|
-
ngOnInit(): void;
|
|
333
|
+
drawerConfigUpdateEvent: EventEmitter<Partial<DrawerConfig>>;
|
|
320
334
|
drawerClosed(): void;
|
|
321
335
|
static ɵfac: i0.ɵɵFactoryDeclaration<DrawerComponent, never>;
|
|
322
336
|
static ɵcmp: i0.ɵɵComponentDeclaration<DrawerComponent, "lf-drawer", never, { "libraryConfig": { "alias": "libraryConfig"; "required": false; }; "drawerConfig": { "alias": "drawerConfig"; "required": false; }; "isMobile": { "alias": "isMobile"; "required": false; }; "headerEnabled": { "alias": "headerEnabled"; "required": false; }; "drawerPortal": { "alias": "drawerPortal"; "required": false; }; }, { "drawerConfigUpdateEvent": "drawerConfigUpdateEvent"; }, never, ["[drawerContent]", "*"], false, never>;
|
|
@@ -346,7 +360,7 @@ declare class FloatingButtonComponent implements OnInit {
|
|
|
346
360
|
onTop: boolean;
|
|
347
361
|
isMobile: boolean;
|
|
348
362
|
bottomBarEnabled: boolean;
|
|
349
|
-
floatingButtonConfigUpdateEvent: EventEmitter<FloatingButtonConfig
|
|
363
|
+
floatingButtonConfigUpdateEvent: EventEmitter<Partial<FloatingButtonConfig>>;
|
|
350
364
|
floatingButtonClickEvent: EventEmitter<string>;
|
|
351
365
|
ngOnInit(): void;
|
|
352
366
|
buttonClicked(id?: string): void;
|
|
@@ -407,23 +421,15 @@ declare class InputComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
407
421
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "lf-input", never, { "inputConfig": { "alias": "inputConfig"; "required": false; }; "isMobile": { "alias": "isMobile"; "required": false; }; }, { "inputSubmitEvent": "inputSubmitEvent"; "inputChangeEvent": "inputChangeEvent"; "inputPrefixActionEvent": "inputPrefixActionEvent"; }, never, never, true, never>;
|
|
408
422
|
}
|
|
409
423
|
|
|
410
|
-
declare class IconComponent {
|
|
411
|
-
libraryConfig: ScaffoldLibraryConfig | null;
|
|
412
|
-
matIcon: string | undefined;
|
|
413
|
-
svgIcon: string | undefined;
|
|
414
|
-
verticalAlign: 'top' | 'middle' | 'bottom' | null;
|
|
415
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<IconComponent, never>;
|
|
416
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "lf-icon", never, { "matIcon": { "alias": "matIcon"; "required": false; }; "svgIcon": { "alias": "svgIcon"; "required": false; }; "verticalAlign": { "alias": "verticalAlign"; "required": false; }; }, {}, never, never, true, never>;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
424
|
declare class ScaffoldModule {
|
|
420
425
|
static forRoot(config?: ScaffoldLibraryConfig): ModuleWithProviders<ScaffoldModule>;
|
|
421
426
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScaffoldModule, never>;
|
|
422
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ScaffoldModule, [typeof ScaffoldComponent, typeof LoadingOverlayComponent, typeof HeaderComponent, typeof NavbarComponent, typeof DrawerComponent, typeof FooterComponent, typeof ContentTitleCardComponent, typeof FloatingButtonComponent, typeof ConfirmDialogComponent, typeof BottomBarComponent], [typeof i11$1.BrowserModule, typeof i12$1.RouterModule, typeof SharedModule, typeof InputComponent
|
|
427
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ScaffoldModule, [typeof ScaffoldComponent, typeof LoadingOverlayComponent, typeof HeaderComponent, typeof NavbarComponent, typeof DrawerComponent, typeof FooterComponent, typeof ContentTitleCardComponent, typeof FloatingButtonComponent, typeof ConfirmDialogComponent, typeof BottomBarComponent], [typeof i11$1.BrowserModule, typeof i12$1.RouterModule, typeof SharedModule, typeof InputComponent], [typeof ScaffoldComponent]>;
|
|
423
428
|
static ɵinj: i0.ɵɵInjectorDeclaration<ScaffoldModule>;
|
|
424
429
|
}
|
|
425
430
|
|
|
426
431
|
declare class PlaceholderComponent {
|
|
432
|
+
libraryConfig: ScaffoldLibraryConfig | null;
|
|
427
433
|
placeholderConfig: PlaceholderConfig;
|
|
428
434
|
buttonClickEvent: EventEmitter<void>;
|
|
429
435
|
static ɵfac: i0.ɵɵFactoryDeclaration<PlaceholderComponent, never>;
|
|
@@ -431,6 +437,7 @@ declare class PlaceholderComponent {
|
|
|
431
437
|
}
|
|
432
438
|
|
|
433
439
|
declare class FileUploadComponent {
|
|
440
|
+
libraryConfig: ScaffoldLibraryConfig | null;
|
|
434
441
|
private logger;
|
|
435
442
|
fileElement: ElementRef;
|
|
436
443
|
color: 'primary' | 'accent' | 'warn';
|
|
@@ -471,6 +478,7 @@ declare class ListItemTitleDirective {
|
|
|
471
478
|
}
|
|
472
479
|
|
|
473
480
|
declare class ListComponent implements OnInit, OnChanges {
|
|
481
|
+
libraryConfig: ScaffoldLibraryConfig | null;
|
|
474
482
|
avatarTemplate?: ListItemAvatarDirective;
|
|
475
483
|
titleTemplate?: ListItemTitleDirective;
|
|
476
484
|
subtitleTemplate?: ListItemSubtitleDirective;
|
|
@@ -535,7 +543,7 @@ declare class DialogService {
|
|
|
535
543
|
* @param config of the dialog
|
|
536
544
|
* @returns an asynchronous any response
|
|
537
545
|
*/
|
|
538
|
-
openCustomDialog(templateRef:
|
|
546
|
+
openCustomDialog<T>(templateRef: Type<T>, config: MatDialogConfig): Promise<any>;
|
|
539
547
|
/**
|
|
540
548
|
* Opens a simple pre-made confirm dialog
|
|
541
549
|
*
|
|
@@ -635,6 +643,15 @@ declare class Logger {
|
|
|
635
643
|
static ɵprov: i0.ɵɵInjectableDeclaration<Logger>;
|
|
636
644
|
}
|
|
637
645
|
|
|
646
|
+
declare class OverlayService {
|
|
647
|
+
private overlay;
|
|
648
|
+
private overlayRef;
|
|
649
|
+
open<T>(component: ComponentType<T>): void;
|
|
650
|
+
close(): void;
|
|
651
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OverlayService, never>;
|
|
652
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OverlayService>;
|
|
653
|
+
}
|
|
654
|
+
|
|
638
655
|
declare class RouterService {
|
|
639
656
|
private router;
|
|
640
657
|
private platformId;
|
|
@@ -679,7 +696,7 @@ declare class ScaffoldService {
|
|
|
679
696
|
private _drawerPortal$;
|
|
680
697
|
get drawerPortal$(): Observable<ComponentPortal<unknown> | TemplatePortal<unknown> | null>;
|
|
681
698
|
set drawerPortal(value: ComponentType<unknown>);
|
|
682
|
-
updateScaffoldProperty<K extends keyof ScaffoldConfig>(property: K, value: ScaffoldConfig[K]): void;
|
|
699
|
+
updateScaffoldProperty<K extends keyof ScaffoldConfig>(property: K, value: Partial<ScaffoldConfig[K]> | ScaffoldConfig[K]): void;
|
|
683
700
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScaffoldService, never>;
|
|
684
701
|
static ɵprov: i0.ɵɵInjectableDeclaration<ScaffoldService>;
|
|
685
702
|
}
|
|
@@ -689,6 +706,8 @@ declare class SeoService {
|
|
|
689
706
|
private metaTags;
|
|
690
707
|
private document;
|
|
691
708
|
private logger;
|
|
709
|
+
private _config$;
|
|
710
|
+
get config$(): Observable<SeoConfig | null>;
|
|
692
711
|
/**
|
|
693
712
|
* Pass a configuration to set meta tags such as title, description and image for search results and social media
|
|
694
713
|
*
|
|
@@ -749,5 +768,5 @@ declare class ScaffoldLoadingInterceptor implements HttpInterceptor {
|
|
|
749
768
|
static ɵprov: i0.ɵɵInjectableDeclaration<ScaffoldLoadingInterceptor>;
|
|
750
769
|
}
|
|
751
770
|
|
|
752
|
-
export { BreakpointService, CONFIG, DialogService, FileUploadComponent, ListComponent, ListItemAvatarDirective, ListItemButtonsDirective, ListItemSubtitleDirective, ListItemTitleDirective, LocalStorageService, Logger, PlaceholderComponent, RouterService, ScaffoldComponent, ScaffoldLoadingInterceptor, ScaffoldModule, ScaffoldService, SeoService, SnackbarService, ThemeService };
|
|
753
|
-
export type { BottomBarConfig, Button, ConfirmDialogConfig, ContentTitleCardConfig, DrawerConfig, FloatingButtonConfig, FooterConfig, HeaderConfig, HeaderInputConfig, HeaderResponsiveConfig, ListConfig, ListHeader, ListItem, MenuButton, NavbarConfig, NavigationLink, PlaceholderConfig, ScaffoldConfig, ScaffoldLibraryConfig, SeoConfig };
|
|
771
|
+
export { BreakpointService, CONFIG, DialogService, FileUploadComponent, ListComponent, ListItemAvatarDirective, ListItemButtonsDirective, ListItemSubtitleDirective, ListItemTitleDirective, LocalStorageService, Logger, OverlayService, PlaceholderComponent, RouterService, ScaffoldComponent, ScaffoldLoadingInterceptor, ScaffoldModule, ScaffoldService, SeoService, SnackbarService, ThemeService };
|
|
772
|
+
export type { BottomBarConfig, Button, ConfirmDialogConfig, ContentTitleCardConfig, DrawerConfig, FloatingButtonConfig, FooterConfig, HeaderConfig, HeaderInputConfig, HeaderResponsiveConfig, ListConfig, ListHeader, ListItem, LoadingOverlayConfig, MenuButton, NavbarConfig, NavigationLink, PlaceholderConfig, ScaffoldConfig, ScaffoldLibraryConfig, SeoConfig };
|