@dontdrinkandroot/ngx-material-extensions 0.5.4 → 0.7.0
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/assets/_extensions.scss +30 -2
- package/assets/_mixins.scss +11 -0
- package/assets/_theme.scss +4 -18
- package/assets/_utils.scss +1 -4
- package/assets/style.scss +1 -0
- package/assets/utils/_color.scss +29 -0
- package/fesm2022/dontdrinkandroot-ngx-material-extensions.mjs +111 -75
- package/fesm2022/dontdrinkandroot-ngx-material-extensions.mjs.map +1 -1
- package/package.json +8 -10
- package/src/filter/filter.component.d.ts +2 -2
- package/src/gridlist/grid-tile-lazy-image-container.directive.d.ts +2 -2
- package/src/gridlist/grid-tile-lazy-img.directive.d.ts +2 -2
- package/src/toolbar/toolbar-fixed-top.directive.d.ts +2 -2
- package/esm2022/dontdrinkandroot-ngx-material-extensions.mjs +0 -5
- package/esm2022/public-api.mjs +0 -14
- package/esm2022/src/button/fab-fixed.directive.mjs +0 -25
- package/esm2022/src/ddr-material-extensions.module.mjs +0 -127
- package/esm2022/src/filter/filter.component.mjs +0 -56
- package/esm2022/src/gridlist/grid-tile-lazy-image-container.directive.mjs +0 -55
- package/esm2022/src/gridlist/grid-tile-lazy-img.directive.mjs +0 -115
- package/esm2022/src/sidenav/sidenav-container.component.mjs +0 -43
- package/esm2022/src/sidenav/sidenav-toggle.component.mjs +0 -34
- package/esm2022/src/sidenav/sidenav.service.mjs +0 -78
- package/esm2022/src/theme/theme-config.mjs +0 -3
- package/esm2022/src/theme/theme-scroll.service.mjs +0 -49
- package/esm2022/src/toolbar/toolbar-fixed-top.directive.mjs +0 -31
package/assets/_extensions.scss
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
max-width: 90vw;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.mat-mdc-nav-list {
|
|
11
|
+
.mat-mdc-nav-list.ddr-mat-sidenav-nav-list {
|
|
12
12
|
.mat-mdc-list-item {
|
|
13
13
|
width: auto;
|
|
14
14
|
margin-right: .5rem;
|
|
@@ -62,7 +62,35 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
ddr-mat-sidenav-toggle {
|
|
65
|
-
margin-right: .
|
|
65
|
+
margin-right: .25rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.ddr-mat-toolbar-icon-start {
|
|
69
|
+
padding-left: .25rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.ddr-mat-toolbar-icon-end {
|
|
73
|
+
padding-right: .25rem;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include ddr-mat-mobile {
|
|
77
|
+
&.ddr-mat-toolbar-icon-start-mobile {
|
|
78
|
+
padding-left: .25rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.ddr-mat-toolbar-icon-end-mobile {
|
|
82
|
+
padding-right: .25rem;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@include ddr-mat-desktop {
|
|
87
|
+
&.ddr-mat-toolbar-icon-start-desktop {
|
|
88
|
+
padding-left: .25rem;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.ddr-mat-toolbar-icon-end-desktop {
|
|
92
|
+
padding-right: .25rem;
|
|
93
|
+
}
|
|
66
94
|
}
|
|
67
95
|
}
|
|
68
96
|
|
package/assets/_theme.scss
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
@use '@angular/material-experimental' as matx;
|
|
2
1
|
@use '@angular/material' as mat;
|
|
3
2
|
|
|
4
3
|
@include mat.core();
|
|
5
4
|
|
|
6
|
-
$ddr-mat-primary:
|
|
7
|
-
$ddr-mat-tertiary:
|
|
5
|
+
$ddr-mat-primary: mat.$azure-palette !default;
|
|
6
|
+
$ddr-mat-tertiary: mat.$magenta-palette !default;
|
|
8
7
|
|
|
9
|
-
$ddr-light-theme:
|
|
8
|
+
$ddr-light-theme: mat.define-theme((
|
|
10
9
|
color: (
|
|
11
10
|
primary: $ddr-mat-primary,
|
|
12
11
|
tertiary: $ddr-mat-tertiary,
|
|
13
12
|
),
|
|
14
13
|
)) !default;
|
|
15
14
|
|
|
16
|
-
$ddr-dark-theme:
|
|
15
|
+
$ddr-dark-theme: mat.define-theme((
|
|
17
16
|
color: (
|
|
18
17
|
theme-type: dark,
|
|
19
18
|
primary: $ddr-mat-primary,
|
|
@@ -23,19 +22,6 @@ $ddr-dark-theme: matx.define-theme((
|
|
|
23
22
|
|
|
24
23
|
html {
|
|
25
24
|
@include mat.all-component-themes($ddr-light-theme);
|
|
26
|
-
|
|
27
|
-
&.mat-secondary {
|
|
28
|
-
@include mat.button-color($ddr-light-theme, $color-variant: secondary);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&.mat-tertiary {
|
|
32
|
-
@include mat.button-color($ddr-light-theme, $color-variant: tertiary);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&.mat-error {
|
|
36
|
-
@include mat.button-color($ddr-light-theme, $color-variant: error);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
25
|
@media (prefers-color-scheme: dark) {
|
|
40
26
|
@include mat.all-component-colors($ddr-dark-theme);
|
|
41
27
|
}
|
package/assets/_utils.scss
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@import "./utils/display";
|
|
2
2
|
@import "./utils/spacing";
|
|
3
|
+
@import "./utils/color";
|
|
3
4
|
|
|
4
5
|
.flex-row {
|
|
5
6
|
flex-direction: row !important;
|
|
@@ -26,10 +27,6 @@
|
|
|
26
27
|
text-align: center !important;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
.text-muted {
|
|
30
|
-
color: #9e9e9e !important;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
30
|
.text-overflow-ellipsis {
|
|
34
31
|
overflow: hidden !important;
|
|
35
32
|
text-overflow: ellipsis !important;
|
package/assets/style.scss
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
|
|
3
|
+
.text-primary {
|
|
4
|
+
color: mat.get-theme-color($ddr-light-theme, primary) !important;
|
|
5
|
+
@media (prefers-color-scheme: dark) {
|
|
6
|
+
color: mat.get-theme-color($ddr-dark-theme, primary) !important;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.text-secondary {
|
|
11
|
+
color: mat.get-theme-color($ddr-light-theme, secondary) !important;
|
|
12
|
+
@media (prefers-color-scheme: dark) {
|
|
13
|
+
color: mat.get-theme-color($ddr-dark-theme, secondary) !important;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.text-tertiary {
|
|
18
|
+
color: mat.get-theme-color($ddr-light-theme, tertiary) !important;
|
|
19
|
+
@media (prefers-color-scheme: dark) {
|
|
20
|
+
color: mat.get-theme-color($ddr-dark-theme, tertiary) !important;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.text-error {
|
|
25
|
+
color: mat.get-theme-color($ddr-light-theme, error) !important;
|
|
26
|
+
@media (prefers-color-scheme: dark) {
|
|
27
|
+
color: mat.get-theme-color($ddr-dark-theme, error) !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -28,17 +28,24 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
|
|
28
28
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
29
29
|
|
|
30
30
|
class SidenavService {
|
|
31
|
+
breakpointObserver;
|
|
32
|
+
router;
|
|
33
|
+
document;
|
|
34
|
+
sidenav;
|
|
35
|
+
stayOpenOnLargeScreen = true;
|
|
36
|
+
largeBreakpoints = [
|
|
37
|
+
Breakpoints.Medium,
|
|
38
|
+
Breakpoints.Large,
|
|
39
|
+
Breakpoints.XLarge
|
|
40
|
+
];
|
|
41
|
+
screenLarge$;
|
|
42
|
+
mode$;
|
|
43
|
+
opened$;
|
|
44
|
+
sidenavContentScrolled$ = new BehaviorSubject(false);
|
|
31
45
|
constructor(breakpointObserver, router, document) {
|
|
32
46
|
this.breakpointObserver = breakpointObserver;
|
|
33
47
|
this.router = router;
|
|
34
48
|
this.document = document;
|
|
35
|
-
this.stayOpenOnLargeScreen = true;
|
|
36
|
-
this.largeBreakpoints = [
|
|
37
|
-
Breakpoints.Medium,
|
|
38
|
-
Breakpoints.Large,
|
|
39
|
-
Breakpoints.XLarge
|
|
40
|
-
];
|
|
41
|
-
this.sidenavContentScrolled$ = new BehaviorSubject(false);
|
|
42
49
|
this.screenLarge$ = this.breakpointObserver.observe(this.largeBreakpoints).pipe(map(result => result.matches));
|
|
43
50
|
this.mode$ = this.screenLarge$.pipe(map(large => large && this.stayOpenOnLargeScreen ? 'side' : 'over'));
|
|
44
51
|
this.opened$ = this.screenLarge$.pipe(map(large => large && this.stayOpenOnLargeScreen));
|
|
@@ -83,10 +90,10 @@ class SidenavService {
|
|
|
83
90
|
watchContentScrolled() {
|
|
84
91
|
return this.sidenavContentScrolled$.asObservable();
|
|
85
92
|
}
|
|
86
|
-
static
|
|
87
|
-
static
|
|
93
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SidenavService, deps: [{ token: i1.BreakpointObserver }, { token: i2.Router }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
94
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SidenavService, providedIn: 'root' });
|
|
88
95
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SidenavService, decorators: [{
|
|
90
97
|
type: Injectable,
|
|
91
98
|
args: [{
|
|
92
99
|
providedIn: 'root'
|
|
@@ -97,6 +104,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
|
|
|
97
104
|
}] }] });
|
|
98
105
|
|
|
99
106
|
class SidenavToggleComponent {
|
|
107
|
+
sidenavService;
|
|
108
|
+
visible;
|
|
100
109
|
constructor(sidenavService) {
|
|
101
110
|
this.sidenavService = sidenavService;
|
|
102
111
|
this.visible = toSignal(this.sidenavService.watchToggleVisible(), { initialValue: false });
|
|
@@ -104,13 +113,13 @@ class SidenavToggleComponent {
|
|
|
104
113
|
toggleSidenav() {
|
|
105
114
|
this.sidenavService.toggle();
|
|
106
115
|
}
|
|
107
|
-
static
|
|
108
|
-
static
|
|
116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SidenavToggleComponent, deps: [{ token: SidenavService }], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SidenavToggleComponent, isStandalone: false, selector: "ddr-mat-sidenav-toggle", host: { properties: { "style.display": "visible() ? \"block\" : \"none\"" } }, ngImport: i0, template: `
|
|
109
118
|
<button mat-icon-button (click)="toggleSidenav()">
|
|
110
119
|
<mat-icon>menu</mat-icon>
|
|
111
|
-
</button>`, isInline: true, dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] });
|
|
120
|
+
</button>`, isInline: true, dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] });
|
|
112
121
|
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SidenavToggleComponent, decorators: [{
|
|
114
123
|
type: Component,
|
|
115
124
|
args: [{
|
|
116
125
|
selector: 'ddr-mat-sidenav-toggle',
|
|
@@ -120,21 +129,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
|
|
|
120
129
|
</button>`,
|
|
121
130
|
host: {
|
|
122
131
|
'[style.display]': 'visible() ? "block" : "none"'
|
|
123
|
-
}
|
|
132
|
+
},
|
|
133
|
+
standalone: false
|
|
124
134
|
}]
|
|
125
135
|
}], ctorParameters: () => [{ type: SidenavService }] });
|
|
126
136
|
|
|
127
137
|
class GridTileLazyImgDirective {
|
|
138
|
+
element;
|
|
139
|
+
cd;
|
|
140
|
+
src;
|
|
141
|
+
hostSrc = 'assets/placeholder.gif';
|
|
142
|
+
hostStyleObjectFit = 'contain';
|
|
143
|
+
hostStyleWidthPx;
|
|
144
|
+
hostStyleHeightPx;
|
|
145
|
+
hostStyleOpacity = 0;
|
|
146
|
+
offset = 1000;
|
|
147
|
+
objectFit = 'cover';
|
|
148
|
+
displayed = false;
|
|
149
|
+
maxLoadedDimension = null;
|
|
128
150
|
constructor(element, cd) {
|
|
129
151
|
this.element = element;
|
|
130
152
|
this.cd = cd;
|
|
131
|
-
this.hostSrc = 'assets/placeholder.gif';
|
|
132
|
-
this.hostStyleObjectFit = 'contain';
|
|
133
|
-
this.hostStyleOpacity = 0;
|
|
134
|
-
this.offset = 1000;
|
|
135
|
-
this.objectFit = 'cover';
|
|
136
|
-
this.displayed = false;
|
|
137
|
-
this.maxLoadedDimension = null;
|
|
138
153
|
}
|
|
139
154
|
recheck() {
|
|
140
155
|
this.displayed = false;
|
|
@@ -172,7 +187,7 @@ class GridTileLazyImgDirective {
|
|
|
172
187
|
/**
|
|
173
188
|
* @override
|
|
174
189
|
*/
|
|
175
|
-
ngOnChanges(
|
|
190
|
+
ngOnChanges() {
|
|
176
191
|
this.displayed = false;
|
|
177
192
|
this.maxLoadedDimension = null;
|
|
178
193
|
this.hostStyleOpacity = 0;
|
|
@@ -206,12 +221,15 @@ class GridTileLazyImgDirective {
|
|
|
206
221
|
// console.log('isHidden');
|
|
207
222
|
return window.getComputedStyle(nativeElement).display === 'none';
|
|
208
223
|
}
|
|
209
|
-
static
|
|
210
|
-
static
|
|
224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GridTileLazyImgDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
225
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: GridTileLazyImgDirective, isStandalone: false, selector: "[ddrGridTileLazyImg]", inputs: { src: ["ddrGridTileLazyImg", "src"], offset: "offset", objectFit: "objectFit" }, host: { properties: { "src": "this.hostSrc", "style.object-fit": "this.hostStyleObjectFit", "style.width.px": "this.hostStyleWidthPx", "style.height.px": "this.hostStyleHeightPx", "style.opacity": "this.hostStyleOpacity" } }, usesOnChanges: true, ngImport: i0 });
|
|
211
226
|
}
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GridTileLazyImgDirective, decorators: [{
|
|
213
228
|
type: Directive,
|
|
214
|
-
args: [{
|
|
229
|
+
args: [{
|
|
230
|
+
selector: '[ddrGridTileLazyImg]',
|
|
231
|
+
standalone: false
|
|
232
|
+
}]
|
|
215
233
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { src: [{
|
|
216
234
|
type: Input,
|
|
217
235
|
args: ['ddrGridTileLazyImg']
|
|
@@ -237,24 +255,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
|
|
|
237
255
|
}] } });
|
|
238
256
|
|
|
239
257
|
class GridTileLazyImageContainerDirective {
|
|
240
|
-
|
|
258
|
+
lazyImages;
|
|
259
|
+
changeSubscription;
|
|
260
|
+
windowResized() {
|
|
241
261
|
if (null != this.lazyImages) {
|
|
242
|
-
this.lazyImages.forEach((lazyImage
|
|
262
|
+
this.lazyImages.forEach((lazyImage) => lazyImage.recheck());
|
|
243
263
|
}
|
|
244
264
|
}
|
|
245
|
-
windowScroll(
|
|
265
|
+
windowScroll() {
|
|
246
266
|
if (null != this.lazyImages) {
|
|
247
|
-
this.lazyImages.forEach((lazyImage
|
|
267
|
+
this.lazyImages.forEach((lazyImage) => lazyImage.check());
|
|
248
268
|
}
|
|
249
269
|
}
|
|
250
270
|
/**
|
|
251
271
|
* @override
|
|
252
272
|
*/
|
|
253
273
|
ngAfterContentInit() {
|
|
254
|
-
this.lazyImages.forEach((lazyImage
|
|
274
|
+
this.lazyImages.forEach((lazyImage) => lazyImage.check());
|
|
255
275
|
this.changeSubscription = this.lazyImages.changes.subscribe(() => {
|
|
256
276
|
/* Wait one tick until layout is ready */
|
|
257
|
-
setTimeout(() => this.lazyImages.forEach((lazyImage
|
|
277
|
+
setTimeout(() => this.lazyImages.forEach((lazyImage) => lazyImage.recheck()), 1);
|
|
258
278
|
});
|
|
259
279
|
}
|
|
260
280
|
/**
|
|
@@ -263,8 +283,8 @@ class GridTileLazyImageContainerDirective {
|
|
|
263
283
|
ngOnDestroy() {
|
|
264
284
|
this.changeSubscription.unsubscribe();
|
|
265
285
|
}
|
|
266
|
-
static
|
|
267
|
-
static
|
|
286
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GridTileLazyImageContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
287
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: GridTileLazyImageContainerDirective, isStandalone: false, selector: "[ddrGridTileLazyImgContainer]", host: { listeners: { "window:resize": "windowResized($event)", "window:scroll": "windowScroll($event)" } }, queries: [{ propertyName: "lazyImages", predicate: GridTileLazyImgDirective, descendants: true }], ngImport: i0 });
|
|
268
288
|
}
|
|
269
289
|
__decorate([
|
|
270
290
|
Debounce()
|
|
@@ -272,9 +292,12 @@ __decorate([
|
|
|
272
292
|
__decorate([
|
|
273
293
|
Limit()
|
|
274
294
|
], GridTileLazyImageContainerDirective.prototype, "windowScroll", null);
|
|
275
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GridTileLazyImageContainerDirective, decorators: [{
|
|
276
296
|
type: Directive,
|
|
277
|
-
args: [{
|
|
297
|
+
args: [{
|
|
298
|
+
selector: '[ddrGridTileLazyImgContainer]',
|
|
299
|
+
standalone: false
|
|
300
|
+
}]
|
|
278
301
|
}], propDecorators: { lazyImages: [{
|
|
279
302
|
type: ContentChildren,
|
|
280
303
|
args: [GridTileLazyImgDirective, { descendants: true }]
|
|
@@ -287,9 +310,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
|
|
|
287
310
|
}] } });
|
|
288
311
|
|
|
289
312
|
class SidenavContainerComponent {
|
|
313
|
+
sidenavService;
|
|
314
|
+
sidenav;
|
|
315
|
+
stayOpenOnLargeScreen = true;
|
|
316
|
+
mode$;
|
|
317
|
+
opened$;
|
|
318
|
+
scrollSubscription;
|
|
290
319
|
constructor(sidenavService) {
|
|
291
320
|
this.sidenavService = sidenavService;
|
|
292
|
-
this.stayOpenOnLargeScreen = true;
|
|
293
321
|
this.mode$ = this.sidenavService.getModeObservable();
|
|
294
322
|
this.opened$ = this.sidenavService.getOpenedObservable();
|
|
295
323
|
}
|
|
@@ -311,12 +339,12 @@ class SidenavContainerComponent {
|
|
|
311
339
|
ngOnDestroy() {
|
|
312
340
|
this.scrollSubscription.unsubscribe();
|
|
313
341
|
}
|
|
314
|
-
static
|
|
315
|
-
static
|
|
342
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SidenavContainerComponent, deps: [{ token: SidenavService }], target: i0.ɵɵFactoryTarget.Component });
|
|
343
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SidenavContainerComponent, isStandalone: false, selector: "ddr-mat-sidenav-container", inputs: { stayOpenOnLargeScreen: "stayOpenOnLargeScreen" }, viewQueries: [{ propertyName: "sidenav", first: true, predicate: ["sidenav"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<mat-sidenav-container [ngClass]=\"(mode$|async)\">\n <mat-sidenav\n #sidenav\n [mode]=\"(mode$|async) ?? 'over'\"\n [opened]=\"(opened$|async)\"\n [fixedInViewport]=\"true\"\n >\n <ng-content select=\"[slot=mat-sidenav]\"></ng-content>\n </mat-sidenav>\n <mat-sidenav-content #sidenavContent>\n <ng-content select=\"[slot=mat-sidenav-content]\"></ng-content>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", dependencies: [{ kind: "directive", type: i2$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3$1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i3$1.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i3$1.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "pipe", type: i2$2.AsyncPipe, name: "async" }] });
|
|
316
344
|
}
|
|
317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SidenavContainerComponent, decorators: [{
|
|
318
346
|
type: Component,
|
|
319
|
-
args: [{ selector: 'ddr-mat-sidenav-container', template: "<mat-sidenav-container [ngClass]=\"(mode$|async)\">\n <mat-sidenav\n #sidenav\n [mode]=\"(mode$|async) ?? 'over'\"\n [opened]=\"(opened$|async)\"\n [fixedInViewport]=\"true\"\n >\n <ng-content select=\"[slot=mat-sidenav]\"></ng-content>\n </mat-sidenav>\n <mat-sidenav-content #sidenavContent>\n <ng-content select=\"[slot=mat-sidenav-content]\"></ng-content>\n </mat-sidenav-content>\n</mat-sidenav-container>\n" }]
|
|
347
|
+
args: [{ selector: 'ddr-mat-sidenav-container', standalone: false, template: "<mat-sidenav-container [ngClass]=\"(mode$|async)\">\n <mat-sidenav\n #sidenav\n [mode]=\"(mode$|async) ?? 'over'\"\n [opened]=\"(opened$|async)\"\n [fixedInViewport]=\"true\"\n >\n <ng-content select=\"[slot=mat-sidenav]\"></ng-content>\n </mat-sidenav>\n <mat-sidenav-content #sidenavContent>\n <ng-content select=\"[slot=mat-sidenav-content]\"></ng-content>\n </mat-sidenav-content>\n</mat-sidenav-container>\n" }]
|
|
320
348
|
}], ctorParameters: () => [{ type: SidenavService }], propDecorators: { sidenav: [{
|
|
321
349
|
type: ViewChild,
|
|
322
350
|
args: ['sidenav', { static: true }]
|
|
@@ -325,18 +353,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
|
|
|
325
353
|
}] } });
|
|
326
354
|
|
|
327
355
|
class FilterComponent {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
356
|
+
formControl = new FormControl();
|
|
357
|
+
filterChanged = new EventEmitter();
|
|
358
|
+
bouncePeriod = 500;
|
|
359
|
+
inputElement;
|
|
360
|
+
valueChangesSubscription;
|
|
333
361
|
/**
|
|
334
362
|
* @override
|
|
335
363
|
*/
|
|
336
364
|
ngOnInit() {
|
|
337
365
|
this.valueChangesSubscription = this.formControl.valueChanges
|
|
338
366
|
.pipe(debounce(() => interval(this.bouncePeriod)))
|
|
339
|
-
.subscribe((value => this.
|
|
367
|
+
.subscribe((value => this.filterChanged.emit(value)));
|
|
340
368
|
}
|
|
341
369
|
/**
|
|
342
370
|
* @override
|
|
@@ -352,15 +380,15 @@ class FilterComponent {
|
|
|
352
380
|
}
|
|
353
381
|
clear() {
|
|
354
382
|
this.formControl.setValue(null);
|
|
355
|
-
this.
|
|
383
|
+
this.filterChanged.emit(undefined);
|
|
356
384
|
}
|
|
357
|
-
static
|
|
358
|
-
static
|
|
385
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
386
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FilterComponent, isStandalone: false, selector: "ddr-filter", inputs: { bouncePeriod: "bouncePeriod" }, outputs: { filterChanged: "filterChanged" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<mat-card appearance=\"outlined\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input matInput type=\"text\" [formControl]=\"formControl\" #input />\n <button mat-icon-button matSuffix (click)=\"clear()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n</mat-card>\n", dependencies: [{ kind: "component", type: i1$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
359
387
|
}
|
|
360
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FilterComponent, decorators: [{
|
|
361
389
|
type: Component,
|
|
362
|
-
args: [{ selector: 'ddr-filter', template: "<mat-card appearance=\"outlined\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input matInput type=\"text\" [formControl]=\"formControl\" #input />\n <button mat-icon-button matSuffix (click)=\"clear()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n</mat-card>\n" }]
|
|
363
|
-
}], propDecorators: {
|
|
390
|
+
args: [{ selector: 'ddr-filter', standalone: false, template: "<mat-card appearance=\"outlined\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input matInput type=\"text\" [formControl]=\"formControl\" #input />\n <button mat-icon-button matSuffix (click)=\"clear()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n</mat-card>\n" }]
|
|
391
|
+
}], propDecorators: { filterChanged: [{
|
|
364
392
|
type: Output
|
|
365
393
|
}], bouncePeriod: [{
|
|
366
394
|
type: Input
|
|
@@ -372,6 +400,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
|
|
|
372
400
|
const DDR_MATERIAL_EXTENSIONS_THEME = new InjectionToken('DDR_MATERIAL_EXTENSIONS_THEME');
|
|
373
401
|
|
|
374
402
|
class ThemeScrollService {
|
|
403
|
+
document;
|
|
404
|
+
themeConfig;
|
|
375
405
|
constructor(document, themeConfig) {
|
|
376
406
|
this.document = document;
|
|
377
407
|
this.themeConfig = themeConfig;
|
|
@@ -381,7 +411,7 @@ class ThemeScrollService {
|
|
|
381
411
|
const darkMetaElement = this.findOrCreateThemeColorMetaElement('(prefers-color-scheme: dark)', this.themeConfig.themeColorDark);
|
|
382
412
|
fromEvent(this.document, 'scroll')
|
|
383
413
|
.pipe(map(() => this.document.documentElement.scrollTop > 0), distinctUntilChanged()).subscribe((scrolled) => {
|
|
384
|
-
|
|
414
|
+
this.document.body.classList.toggle('ddr-mat-scrolled', scrolled);
|
|
385
415
|
lightMetaElement.content = scrolled ? this.themeConfig.themeColorLightScrolled : this.themeConfig.themeColorLight;
|
|
386
416
|
darkMetaElement.content = scrolled ? this.themeConfig.themeColorDarkScrolled : this.themeConfig.themeColorDark;
|
|
387
417
|
});
|
|
@@ -401,10 +431,10 @@ class ThemeScrollService {
|
|
|
401
431
|
this.document.head.appendChild(metaElement);
|
|
402
432
|
return metaElement;
|
|
403
433
|
}
|
|
404
|
-
static
|
|
405
|
-
static
|
|
434
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ThemeScrollService, deps: [{ token: DOCUMENT }, { token: DDR_MATERIAL_EXTENSIONS_THEME }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
435
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ThemeScrollService });
|
|
406
436
|
}
|
|
407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
437
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ThemeScrollService, decorators: [{
|
|
408
438
|
type: Injectable
|
|
409
439
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
410
440
|
type: Inject,
|
|
@@ -415,9 +445,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
|
|
|
415
445
|
}] }] });
|
|
416
446
|
|
|
417
447
|
class ToolbarFixedTopDirective {
|
|
448
|
+
el;
|
|
449
|
+
ddrMatToolbarFixedTop = '';
|
|
418
450
|
constructor(el) {
|
|
419
451
|
this.el = el;
|
|
420
|
-
this.ddrMatToolbarFixedTop = undefined;
|
|
421
452
|
}
|
|
422
453
|
/**
|
|
423
454
|
* @override
|
|
@@ -427,23 +458,27 @@ class ToolbarFixedTopDirective {
|
|
|
427
458
|
container.classList.add('ddr-mat-toolbar-fixed-top-container');
|
|
428
459
|
this.el.nativeElement.parentElement.insertBefore(container, this.el.nativeElement);
|
|
429
460
|
container.appendChild(this.el.nativeElement);
|
|
430
|
-
if (
|
|
431
|
-
|
|
461
|
+
if ('' !== this.ddrMatToolbarFixedTop) {
|
|
462
|
+
this.ddrMatToolbarFixedTop.forEach((className) => {
|
|
463
|
+
container.classList.add(className);
|
|
464
|
+
});
|
|
432
465
|
}
|
|
433
466
|
}
|
|
434
|
-
static
|
|
435
|
-
static
|
|
467
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToolbarFixedTopDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
468
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: ToolbarFixedTopDirective, isStandalone: false, selector: "[ddrMatToolbarFixedTop]", inputs: { ddrMatToolbarFixedTop: "ddrMatToolbarFixedTop" }, ngImport: i0 });
|
|
436
469
|
}
|
|
437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToolbarFixedTopDirective, decorators: [{
|
|
438
471
|
type: Directive,
|
|
439
472
|
args: [{
|
|
440
|
-
selector: '[ddrMatToolbarFixedTop]'
|
|
473
|
+
selector: '[ddrMatToolbarFixedTop]',
|
|
474
|
+
standalone: false
|
|
441
475
|
}]
|
|
442
476
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { ddrMatToolbarFixedTop: [{
|
|
443
477
|
type: Input
|
|
444
478
|
}] } });
|
|
445
479
|
|
|
446
480
|
class FabFixedDirective {
|
|
481
|
+
el;
|
|
447
482
|
constructor(el) {
|
|
448
483
|
this.el = el;
|
|
449
484
|
}
|
|
@@ -456,19 +491,20 @@ class FabFixedDirective {
|
|
|
456
491
|
this.el.nativeElement.parentElement.insertBefore(container, this.el.nativeElement);
|
|
457
492
|
container.appendChild(this.el.nativeElement);
|
|
458
493
|
}
|
|
459
|
-
static
|
|
460
|
-
static
|
|
494
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FabFixedDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
495
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: FabFixedDirective, isStandalone: false, selector: "[ddrMatFabFixed]", ngImport: i0 });
|
|
461
496
|
}
|
|
462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FabFixedDirective, decorators: [{
|
|
463
498
|
type: Directive,
|
|
464
499
|
args: [{
|
|
465
|
-
selector: '[ddrMatFabFixed]'
|
|
500
|
+
selector: '[ddrMatFabFixed]',
|
|
501
|
+
standalone: false
|
|
466
502
|
}]
|
|
467
503
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
468
504
|
|
|
469
505
|
class DdrMaterialExtensionsModule {
|
|
470
|
-
static
|
|
471
|
-
static
|
|
506
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DdrMaterialExtensionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
507
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: DdrMaterialExtensionsModule, declarations: [FabFixedDirective,
|
|
472
508
|
FilterComponent,
|
|
473
509
|
SidenavToggleComponent,
|
|
474
510
|
GridTileLazyImageContainerDirective,
|
|
@@ -488,8 +524,8 @@ class DdrMaterialExtensionsModule {
|
|
|
488
524
|
GridTileLazyImageContainerDirective,
|
|
489
525
|
GridTileLazyImgDirective,
|
|
490
526
|
SidenavContainerComponent,
|
|
491
|
-
ToolbarFixedTopDirective] });
|
|
492
|
-
static
|
|
527
|
+
ToolbarFixedTopDirective] });
|
|
528
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DdrMaterialExtensionsModule, providers: [
|
|
493
529
|
ThemeScrollService,
|
|
494
530
|
{
|
|
495
531
|
provide: ENVIRONMENT_INITIALIZER,
|
|
@@ -516,9 +552,9 @@ class DdrMaterialExtensionsModule {
|
|
|
516
552
|
MatButtonModule,
|
|
517
553
|
MatFormFieldModule,
|
|
518
554
|
MatToolbarModule,
|
|
519
|
-
ReactiveFormsModule] });
|
|
555
|
+
ReactiveFormsModule] });
|
|
520
556
|
}
|
|
521
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DdrMaterialExtensionsModule, decorators: [{
|
|
522
558
|
type: NgModule,
|
|
523
559
|
args: [{
|
|
524
560
|
declarations: [
|