@hug/ngx-layout 21.0.2 → 22.0.0-alpha.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/CHANGELOG.md +41 -0
- package/fesm2022/hug-ngx-layout-m2.mjs +184 -0
- package/fesm2022/hug-ngx-layout-m2.mjs.map +1 -0
- package/fesm2022/hug-ngx-layout.mjs +452 -140
- package/fesm2022/hug-ngx-layout.mjs.map +1 -1
- package/m2/translations/de-CH.json +5 -0
- package/m2/translations/en-US.json +5 -0
- package/m2/translations/fr-CH.json +5 -0
- package/package.json +17 -9
- package/translations/de-CH.json +9 -3
- package/translations/en-US.json +9 -3
- package/translations/fr-CH.json +9 -3
- package/types/hug-ngx-layout-m2.d.ts +72 -0
- package/types/hug-ngx-layout.d.ts +157 -53
- /package/{_layout-theme.scss → m2/_layout-theme.scss} +0 -0
|
@@ -1,22 +1,39 @@
|
|
|
1
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
|
-
import { NgTemplateOutlet, AsyncPipe } from '@angular/common';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable,
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
2
|
+
import { Injectable, signal, effect, computed, inject, contentChildren, ElementRef, viewChild, Renderer2, ChangeDetectionStrategy, ViewEncapsulation, Component, input, output, InjectionToken, TemplateRef, forwardRef, Directive, model, contentChild, afterRenderEffect, untracked } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/material/button';
|
|
4
|
+
import { MatIconButton, MatButtonModule } from '@angular/material/button';
|
|
5
|
+
import * as i1$1 from '@angular/material/icon';
|
|
6
|
+
import { MatIcon, MatIconModule } from '@angular/material/icon';
|
|
7
|
+
import * as i1 from '@angular/material/menu';
|
|
8
|
+
import { MatMenuModule } from '@angular/material/menu';
|
|
9
|
+
import * as i3 from '@angular/material/tooltip';
|
|
10
|
+
import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
|
|
11
|
+
import { NgxAbstractIntl, provideNgxIntl } from '@hug/ngx-core';
|
|
12
|
+
import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
13
|
+
import { NgTemplateOutlet, LowerCasePipe } from '@angular/common';
|
|
14
|
+
import * as i3$1 from '@angular/forms';
|
|
15
|
+
import { FormsModule, NgControl } from '@angular/forms';
|
|
16
|
+
import * as i4 from '@angular/material/badge';
|
|
17
|
+
import { MatBadgeModule } from '@angular/material/badge';
|
|
18
|
+
import * as i1$2 from '@angular/material/chips';
|
|
19
|
+
import { MatChipsModule } from '@angular/material/chips';
|
|
20
|
+
import * as i2$1 from '@angular/material/slide-toggle';
|
|
21
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
22
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
12
23
|
|
|
13
24
|
/**
|
|
14
25
|
* Data for internationalization
|
|
15
26
|
*/
|
|
16
27
|
class NgxLayoutIntl extends NgxAbstractIntl {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
28
|
+
help = '';
|
|
29
|
+
back = '';
|
|
30
|
+
deleteSearch = '';
|
|
31
|
+
openSearchBar = '';
|
|
32
|
+
moreActions = '';
|
|
33
|
+
allFilters = '';
|
|
34
|
+
filters = '';
|
|
35
|
+
actives = '';
|
|
36
|
+
reset = '';
|
|
20
37
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxLayoutIntl, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
21
38
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxLayoutIntl });
|
|
22
39
|
}
|
|
@@ -32,153 +49,448 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
32
49
|
*/
|
|
33
50
|
const provideNgxLayout = (options) => provideNgxIntl(NgxLayoutIntl, options?.translationsPath ?? 'translations/ngx-layout', options?.customIntl ?? NgxLayoutIntl);
|
|
34
51
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
const buttonGap = 12;
|
|
53
|
+
const buttonDimensions = 40;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @param element
|
|
57
|
+
* @param destroyRef
|
|
58
|
+
* @param box
|
|
59
|
+
* @param defaultSize
|
|
60
|
+
*/
|
|
61
|
+
const resizeSignal$1 = (element, box = 'border-box') => {
|
|
62
|
+
const value = signal(undefined, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
63
|
+
effect(onCleanup => {
|
|
64
|
+
const el = element()?.nativeElement;
|
|
65
|
+
if (!el) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const initialValue = {
|
|
69
|
+
borderBoxSize: [],
|
|
70
|
+
contentRect: new DOMRect(),
|
|
71
|
+
contentBoxSize: [],
|
|
72
|
+
devicePixelContentBoxSize: [],
|
|
73
|
+
target: el
|
|
74
|
+
};
|
|
75
|
+
value.set(initialValue);
|
|
76
|
+
const ro = new ResizeObserver(entries => {
|
|
77
|
+
value.set(entries[0] || initialValue);
|
|
78
|
+
});
|
|
79
|
+
ro.observe(el, { box });
|
|
80
|
+
onCleanup(() => {
|
|
81
|
+
ro.disconnect();
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
return value;
|
|
85
|
+
};
|
|
86
|
+
class NgxActionsGroupComponent {
|
|
87
|
+
hiddenActions = computed(() => {
|
|
88
|
+
const maxVisible = this.getMaxVisibleAction(this.hostWidth());
|
|
89
|
+
return this.iconButtons().slice(maxVisible);
|
|
90
|
+
}, ...(ngDevMode ? [{ debugName: "hiddenActions" }] : []));
|
|
53
91
|
intl = inject(NgxLayoutIntl, { optional: true });
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
92
|
+
iconButtons = contentChildren(MatIconButton, { ...(ngDevMode ? { debugName: "iconButtons" } : {}), read: ElementRef });
|
|
93
|
+
container = viewChild.required('container');
|
|
94
|
+
hiddenContainer = viewChild.required('hiddenContainer');
|
|
95
|
+
hostElement = inject(ElementRef);
|
|
96
|
+
renderer = inject(Renderer2);
|
|
97
|
+
hostSize = resizeSignal$1(() => this.hostElement);
|
|
98
|
+
hostWidth = computed(() => Math.ceil(this.hostSize()?.contentRect.width || 0), ...(ngDevMode ? [{ debugName: "hostWidth" }] : []));
|
|
99
|
+
visibleActions = computed(() => {
|
|
100
|
+
const maxVisible = this.getMaxVisibleAction(this.hostWidth());
|
|
101
|
+
return this.iconButtons().slice(0, maxVisible);
|
|
102
|
+
}, ...(ngDevMode ? [{ debugName: "visibleActions" }] : []));
|
|
103
|
+
constructor() {
|
|
104
|
+
effect(() => {
|
|
105
|
+
const buttons = this.iconButtons();
|
|
106
|
+
if (buttons.length === 0) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const visibleButtons = this.visibleActions();
|
|
110
|
+
const containerEl = this.container();
|
|
111
|
+
visibleButtons.forEach(button => {
|
|
112
|
+
const element = button.nativeElement;
|
|
113
|
+
containerEl.nativeElement.appendChild(element);
|
|
114
|
+
});
|
|
115
|
+
const hiddenButtons = this.hiddenActions();
|
|
116
|
+
const hiddenContainerEl = this.hiddenContainer();
|
|
117
|
+
if (hiddenButtons.length > 0) {
|
|
118
|
+
hiddenButtons.forEach(button => {
|
|
119
|
+
const element = button.nativeElement;
|
|
120
|
+
const hasMenu = element.classList.contains('mat-mdc-menu-trigger');
|
|
121
|
+
if (hasMenu) {
|
|
122
|
+
this.renderer.listen(element, 'click', (event) => {
|
|
123
|
+
event.stopPropagation();
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
hiddenContainerEl.nativeElement.appendChild(element);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
});
|
|
59
130
|
}
|
|
60
|
-
|
|
61
|
-
|
|
131
|
+
getMaxVisibleAction(width) {
|
|
132
|
+
const maxNumberOfActions = Math.floor(width / (buttonDimensions + buttonGap));
|
|
133
|
+
const maxVisibleActions = Math.max(1, maxNumberOfActions);
|
|
134
|
+
const totalButtons = this.iconButtons().length;
|
|
135
|
+
if (maxVisibleActions >= totalButtons) {
|
|
136
|
+
return totalButtons;
|
|
137
|
+
}
|
|
138
|
+
// -1 => Allows for the more button to be displayed
|
|
139
|
+
return maxVisibleActions - 1;
|
|
62
140
|
}
|
|
63
|
-
|
|
64
|
-
|
|
141
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxActionsGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
142
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: NgxActionsGroupComponent, isStandalone: true, selector: "ngx-actions-group", queries: [{ propertyName: "iconButtons", predicate: MatIconButton, read: ElementRef, isSignal: true }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "hiddenContainer", first: true, predicate: ["hiddenContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #container class=\"container\">\n <ng-content></ng-content>\n @if (hiddenActions().length > 0) {\n <button\n matIconButton\n class=\"more-actions-button\"\n [matMenuTriggerFor]=\"menuActionsGroup\"\n matTooltip=\"{{ intl?.moreActions ?? 'More actions' }}\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n }\n <mat-menu #menuActionsGroup=\"matMenu\" class=\"actions-group-menu\">\n <div #hiddenContainer></div>\n </mat-menu>\n</div>\n", styles: ["ngx-actions-group{display:flex;inline-size:100%}ngx-actions-group .container{display:flex;inline-size:fit-content;align-items:center;gap:var(--ngx-actions-group-gap, .75rem);border-radius:var(--ngx-actions-group-radius, 2rem);padding:var(--ngx-actions-group-padding, .25rem);background-color:var(--mat-sys-surface-container-low);max-width:100%;box-sizing:border-box}ngx-actions-group .container .more-actions-button{order:999}.actions-group-menu.mat-mdc-menu-panel{padding:var(--ngx-actions-group-menu-padding, 0 .75rem)}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
143
|
+
}
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxActionsGroupComponent, decorators: [{
|
|
145
|
+
type: Component,
|
|
146
|
+
args: [{ selector: 'ngx-actions-group', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
147
|
+
MatIcon,
|
|
148
|
+
MatIconButton,
|
|
149
|
+
MatTooltip,
|
|
150
|
+
MatMenuModule
|
|
151
|
+
], template: "<div #container class=\"container\">\n <ng-content></ng-content>\n @if (hiddenActions().length > 0) {\n <button\n matIconButton\n class=\"more-actions-button\"\n [matMenuTriggerFor]=\"menuActionsGroup\"\n matTooltip=\"{{ intl?.moreActions ?? 'More actions' }}\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n }\n <mat-menu #menuActionsGroup=\"matMenu\" class=\"actions-group-menu\">\n <div #hiddenContainer></div>\n </mat-menu>\n</div>\n", styles: ["ngx-actions-group{display:flex;inline-size:100%}ngx-actions-group .container{display:flex;inline-size:fit-content;align-items:center;gap:var(--ngx-actions-group-gap, .75rem);border-radius:var(--ngx-actions-group-radius, 2rem);padding:var(--ngx-actions-group-padding, .25rem);background-color:var(--mat-sys-surface-container-low);max-width:100%;box-sizing:border-box}ngx-actions-group .container .more-actions-button{order:999}.actions-group-menu.mat-mdc-menu-panel{padding:var(--ngx-actions-group-menu-padding, 0 .75rem)}\n"] }]
|
|
152
|
+
}], ctorParameters: () => [], propDecorators: { iconButtons: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MatIconButton), { ...{ read: ElementRef }, isSignal: true }] }], container: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], hiddenContainer: [{ type: i0.ViewChild, args: ['hiddenContainer', { isSignal: true }] }] } });
|
|
153
|
+
|
|
154
|
+
class NgxAppBarComponent {
|
|
155
|
+
mode = input('standard', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
156
|
+
title = input.required(...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
157
|
+
subtitle = input(...(ngDevMode ? [undefined, { debugName: "subtitle" }] : []));
|
|
158
|
+
helpUrl = input(...(ngDevMode ? [undefined, { debugName: "helpUrl" }] : []));
|
|
159
|
+
withBackIcon = input(false, ...(ngDevMode ? [{ debugName: "withBackIcon" }] : []));
|
|
160
|
+
goBack = output();
|
|
161
|
+
intl = inject(NgxLayoutIntl, { optional: true });
|
|
162
|
+
helpPopup;
|
|
163
|
+
openHelp() {
|
|
164
|
+
const params = [
|
|
165
|
+
`height=${screen.height}`,
|
|
166
|
+
`width=${screen.width}`,
|
|
167
|
+
'fullscreen=yes'
|
|
168
|
+
].join(',');
|
|
169
|
+
if (this.helpPopup) {
|
|
170
|
+
this.helpPopup.close();
|
|
171
|
+
}
|
|
172
|
+
this.helpPopup = window.open(this.helpUrl(), 'help_popup', params) ?? undefined;
|
|
173
|
+
this.helpPopup?.moveTo(0, 0);
|
|
65
174
|
}
|
|
66
|
-
|
|
67
|
-
|
|
175
|
+
triggerGoBack() {
|
|
176
|
+
this.goBack.emit();
|
|
68
177
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxAppBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
179
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: NgxAppBarComponent, isStandalone: true, selector: "ngx-app-bar", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, helpUrl: { classPropertyName: "helpUrl", publicName: "helpUrl", isSignal: true, isRequired: false, transformFunction: null }, withBackIcon: { classPropertyName: "withBackIcon", publicName: "withBackIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { goBack: "goBack" }, host: { properties: { "class.condensed": "mode()===\"condensed\"" } }, ngImport: i0, template: "@if (withBackIcon()) {\n <button matIconButton matTooltip=\"{{ intl?.back ?? 'Back' }}\" (click)=\"triggerGoBack()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n}\n\n<header class=\"{{ mode() }}\">\n <h1 class=\"title\">{{ title() }}</h1>\n @if (subtitle()) {\n @if (mode() === 'condensed') {\n <mat-icon>chevron_right</mat-icon>\n }\n <h2 class=\"subtitle\">{{ subtitle() }}</h2>\n }\n</header>\n\n<section class=\"actions\">\n <ng-content />\n @if (helpUrl()) {\n <button matIconButton matTooltip=\"{{ intl?.help ?? 'Help' }}\" (click)=\"openHelp()\">\n <mat-icon>help</mat-icon>\n </button>\n }\n</section>\n", styles: ["ngx-app-bar{display:flex;flex-direction:row;align-items:center;min-height:var(--ngx-app-bar-min-height, 3.5rem);box-sizing:border-box;gap:var(--ngx-app-bar-gap, .25rem)}ngx-app-bar header{color:var(--mat-sys-on-surface-variant)}ngx-app-bar header.condensed{display:flex;flex-direction:row;align-items:center;gap:var(--ngx-app-bar-condensed-gap, .5rem)}ngx-app-bar header.condensed mat-icon{color:var(--mat-sys-outline)}ngx-app-bar header .title,ngx-app-bar header .subtitle{margin:0;white-space:nowrap}ngx-app-bar header .title{font:var(--ngx-app-bar-title-font, var(--mat-sys-headline-medium));letter-spacing:var(--ngx-app-bar-title-letter-spacing, var(--mat-sys-headline-medium-tracking))}ngx-app-bar header .subtitle{font:var(--ngx-app-bar-subtitle-font, var(--mat-sys-headline-small));letter-spacing:var(--ngx-app-bar-subtitle-letter-spacing, var(--mat-sys-headline-small-tracking))}ngx-app-bar .actions{display:flex;justify-content:flex-end;flex-grow:1;gap:var(--ngx-app-bar-actions-gap, .5rem)}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
180
|
+
}
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxAppBarComponent, decorators: [{
|
|
182
|
+
type: Component,
|
|
183
|
+
args: [{ selector: 'ngx-app-bar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconModule, MatButtonModule, MatTooltipModule], host: {
|
|
184
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
185
|
+
'[class.condensed]': 'mode()==="condensed"'
|
|
186
|
+
}, template: "@if (withBackIcon()) {\n <button matIconButton matTooltip=\"{{ intl?.back ?? 'Back' }}\" (click)=\"triggerGoBack()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n}\n\n<header class=\"{{ mode() }}\">\n <h1 class=\"title\">{{ title() }}</h1>\n @if (subtitle()) {\n @if (mode() === 'condensed') {\n <mat-icon>chevron_right</mat-icon>\n }\n <h2 class=\"subtitle\">{{ subtitle() }}</h2>\n }\n</header>\n\n<section class=\"actions\">\n <ng-content />\n @if (helpUrl()) {\n <button matIconButton matTooltip=\"{{ intl?.help ?? 'Help' }}\" (click)=\"openHelp()\">\n <mat-icon>help</mat-icon>\n </button>\n }\n</section>\n", styles: ["ngx-app-bar{display:flex;flex-direction:row;align-items:center;min-height:var(--ngx-app-bar-min-height, 3.5rem);box-sizing:border-box;gap:var(--ngx-app-bar-gap, .25rem)}ngx-app-bar header{color:var(--mat-sys-on-surface-variant)}ngx-app-bar header.condensed{display:flex;flex-direction:row;align-items:center;gap:var(--ngx-app-bar-condensed-gap, .5rem)}ngx-app-bar header.condensed mat-icon{color:var(--mat-sys-outline)}ngx-app-bar header .title,ngx-app-bar header .subtitle{margin:0;white-space:nowrap}ngx-app-bar header .title{font:var(--ngx-app-bar-title-font, var(--mat-sys-headline-medium));letter-spacing:var(--ngx-app-bar-title-letter-spacing, var(--mat-sys-headline-medium-tracking))}ngx-app-bar header .subtitle{font:var(--ngx-app-bar-subtitle-font, var(--mat-sys-headline-small));letter-spacing:var(--ngx-app-bar-subtitle-letter-spacing, var(--mat-sys-headline-small-tracking))}ngx-app-bar .actions{display:flex;justify-content:flex-end;flex-grow:1;gap:var(--ngx-app-bar-actions-gap, .5rem)}\n"] }]
|
|
187
|
+
}], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], helpUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "helpUrl", required: false }] }], withBackIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withBackIcon", required: false }] }], goBack: [{ type: i0.Output, args: ["goBack"] }] } });
|
|
188
|
+
|
|
189
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
190
|
+
const FILTER_TOKEN = new InjectionToken('FILTER_TOKEN');
|
|
191
|
+
|
|
192
|
+
class NgxFilterDirective {
|
|
193
|
+
type = 'complex';
|
|
194
|
+
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
195
|
+
active = input.required(...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
196
|
+
selectedFilterLabel = input('', ...(ngDevMode ? [{ debugName: "selectedFilterLabel" }] : []));
|
|
197
|
+
templateRef = inject(TemplateRef);
|
|
198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxFilterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
199
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: NgxFilterDirective, isStandalone: true, selector: "ng-template[ngx-filter]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null }, selectedFilterLabel: { classPropertyName: "selectedFilterLabel", publicName: "selectedFilterLabel", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: FILTER_TOKEN, useExisting: forwardRef(() => NgxFilterDirective) }], ngImport: i0 });
|
|
200
|
+
}
|
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxFilterDirective, decorators: [{
|
|
202
|
+
type: Directive,
|
|
203
|
+
args: [{
|
|
204
|
+
selector: 'ng-template[ngx-filter]',
|
|
205
|
+
standalone: true,
|
|
206
|
+
providers: [{ provide: FILTER_TOKEN, useExisting: forwardRef(() => NgxFilterDirective) }]
|
|
207
|
+
}]
|
|
208
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: true }] }], selectedFilterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedFilterLabel", required: false }] }] } });
|
|
209
|
+
|
|
210
|
+
class NgxFilterToggleDirective {
|
|
211
|
+
type = 'toggle';
|
|
212
|
+
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
213
|
+
active = model.required(...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
214
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxFilterToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
215
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: NgxFilterToggleDirective, isStandalone: true, selector: "ng-template[ngx-filter-toggle]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { active: "activeChange" }, providers: [{ provide: FILTER_TOKEN, useExisting: forwardRef(() => NgxFilterToggleDirective) }], ngImport: i0 });
|
|
216
|
+
}
|
|
217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxFilterToggleDirective, decorators: [{
|
|
218
|
+
type: Directive,
|
|
219
|
+
args: [{
|
|
220
|
+
selector: 'ng-template[ngx-filter-toggle]',
|
|
221
|
+
standalone: true,
|
|
222
|
+
providers: [{ provide: FILTER_TOKEN, useExisting: forwardRef(() => NgxFilterToggleDirective) }]
|
|
223
|
+
}]
|
|
224
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: true }] }, { type: i0.Output, args: ["activeChange"] }] } });
|
|
225
|
+
|
|
226
|
+
const resizeSignal = (element, box = 'border-box') => {
|
|
227
|
+
const value = signal(undefined, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
228
|
+
effect(onCleanup => {
|
|
229
|
+
const el = element()?.nativeElement;
|
|
230
|
+
if (!el) {
|
|
231
|
+
return;
|
|
73
232
|
}
|
|
74
|
-
|
|
75
|
-
|
|
233
|
+
const initialValue = {
|
|
234
|
+
borderBoxSize: [],
|
|
235
|
+
contentRect: new DOMRect(),
|
|
236
|
+
contentBoxSize: [],
|
|
237
|
+
devicePixelContentBoxSize: [],
|
|
238
|
+
target: el
|
|
239
|
+
};
|
|
240
|
+
value.set(initialValue);
|
|
241
|
+
const ro = new ResizeObserver(entries => {
|
|
242
|
+
value.set(entries[0] || initialValue);
|
|
243
|
+
});
|
|
244
|
+
ro.observe(el, { box });
|
|
245
|
+
onCleanup(() => {
|
|
246
|
+
ro.disconnect();
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
return value;
|
|
250
|
+
};
|
|
251
|
+
class NgxFiltersGroupComponent {
|
|
252
|
+
resetFilters = output();
|
|
253
|
+
folded = input(...(ngDevMode ? [undefined, { debugName: "folded" }] : []));
|
|
254
|
+
intl = inject(NgxLayoutIntl, { optional: true });
|
|
255
|
+
// #region Overlay
|
|
256
|
+
overlayOrigin = signal(undefined, ...(ngDevMode ? [{ debugName: "overlayOrigin" }] : []));
|
|
257
|
+
overlayContent = signal(undefined, ...(ngDevMode ? [{ debugName: "overlayContent" }] : []));
|
|
258
|
+
overlayOpen = signal(false, ...(ngDevMode ? [{ debugName: "overlayOpen" }] : []));
|
|
259
|
+
moreFiltersOverlay = signal(false, ...(ngDevMode ? [{ debugName: "moreFiltersOverlay" }] : []));
|
|
260
|
+
overlayPositions = [{
|
|
261
|
+
originX: 'center',
|
|
262
|
+
originY: 'bottom',
|
|
263
|
+
overlayX: 'center',
|
|
264
|
+
overlayY: 'top',
|
|
265
|
+
offsetY: 16
|
|
266
|
+
}, {
|
|
267
|
+
originX: 'end',
|
|
268
|
+
originY: 'bottom',
|
|
269
|
+
overlayX: 'end',
|
|
270
|
+
overlayY: 'top',
|
|
271
|
+
offsetY: 16
|
|
272
|
+
}];
|
|
273
|
+
// #endregion
|
|
274
|
+
// #region Filters
|
|
275
|
+
allFilters = contentChildren(FILTER_TOKEN, ...(ngDevMode ? [{ debugName: "allFilters" }] : []));
|
|
276
|
+
activeFiltersAmount = computed(() => this.invisibleFilters().filter(filter => filter.active()).length, ...(ngDevMode ? [{ debugName: "activeFiltersAmount" }] : []));
|
|
277
|
+
visibleFilters = computed(() => {
|
|
278
|
+
const lastFittingIndex = this.lastFittingIndex();
|
|
279
|
+
if (lastFittingIndex < 0) {
|
|
280
|
+
return [];
|
|
76
281
|
}
|
|
77
|
-
return
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return this.
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
282
|
+
return this.allFilters().slice(0, lastFittingIndex);
|
|
283
|
+
}, ...(ngDevMode ? [{ debugName: "visibleFilters" }] : []));
|
|
284
|
+
invisibleFilters = computed(() => {
|
|
285
|
+
const lastFittingIndex = this.lastFittingIndex();
|
|
286
|
+
if (lastFittingIndex < 0) {
|
|
287
|
+
return this.allFilters();
|
|
288
|
+
}
|
|
289
|
+
return this.allFilters().slice(lastFittingIndex);
|
|
290
|
+
}, ...(ngDevMode ? [{ debugName: "invisibleFilters" }] : []));
|
|
291
|
+
filterContainerRef = viewChild.required('container');
|
|
292
|
+
filterContainerPadding = computed(() => Number.parseFloat(globalThis.getComputedStyle(this.filterContainerRef().nativeElement).paddingInline), ...(ngDevMode ? [{ debugName: "filterContainerPadding" }] : []));
|
|
293
|
+
// #endregion
|
|
294
|
+
// #region Host
|
|
295
|
+
hostElement = inject(ElementRef);
|
|
296
|
+
hostSize = resizeSignal(() => this.hostElement);
|
|
297
|
+
hostWidth = computed(() => Math.ceil(this.hostSize()?.contentRect.width || 0), ...(ngDevMode ? [{ debugName: "hostWidth" }] : []));
|
|
298
|
+
// #endregion
|
|
299
|
+
// #region MeasureRow
|
|
300
|
+
measureRowRef = viewChild('measureRow', ...(ngDevMode ? [{ debugName: "measureRowRef" }] : []));
|
|
301
|
+
measureRowSize = resizeSignal(() => this.measureRowRef());
|
|
302
|
+
measureRowWidth = computed(() => Math.ceil(this.measureRowSize()?.contentRect.width || 0), ...(ngDevMode ? [{ debugName: "measureRowWidth" }] : []));
|
|
303
|
+
// #endregion
|
|
304
|
+
// #region StaticFields
|
|
305
|
+
staticFieldsRef = viewChild('static', ...(ngDevMode ? [{ debugName: "staticFieldsRef" }] : []));
|
|
306
|
+
staticFieldsSize = resizeSignal(() => this.staticFieldsRef());
|
|
307
|
+
staticFieldsWidth = computed(() => Math.ceil(this.staticFieldsSize()?.contentRect.width || 0), ...(ngDevMode ? [{ debugName: "staticFieldsWidth" }] : []));
|
|
308
|
+
// #endregion
|
|
309
|
+
lastFittingIndex = computed(() => {
|
|
310
|
+
const hostWidth = this.hostWidth();
|
|
311
|
+
if (!hostWidth) {
|
|
312
|
+
return -1;
|
|
313
|
+
}
|
|
314
|
+
const availableSpace = hostWidth - (this.staticFieldsWidth() + (2 * this.filterContainerPadding()));
|
|
315
|
+
const filters = Array.from(this.measureRowRef()?.nativeElement.querySelectorAll('mat-chip-option') ?? []);
|
|
316
|
+
if (availableSpace - this.measureRowWidth() >= 0) {
|
|
317
|
+
return filters.length;
|
|
318
|
+
}
|
|
319
|
+
return this.getLastFittingIndex(availableSpace, filters);
|
|
320
|
+
}, ...(ngDevMode ? [{ debugName: "lastFittingIndex" }] : []));
|
|
321
|
+
emitResetClicked() {
|
|
322
|
+
this.resetFilters.emit();
|
|
89
323
|
}
|
|
90
|
-
|
|
91
|
-
|
|
324
|
+
getLastFittingIndex(availableSpace, elements) {
|
|
325
|
+
const firstEl = elements[0];
|
|
326
|
+
if (!firstEl || availableSpace <= 0 || availableSpace - firstEl.offsetWidth < 0) {
|
|
327
|
+
return -1;
|
|
328
|
+
}
|
|
329
|
+
let residualAvailableSpace = availableSpace;
|
|
330
|
+
const lastFittingIndex = elements.findIndex(el => {
|
|
331
|
+
residualAvailableSpace -= el.offsetWidth + 16;
|
|
332
|
+
return residualAvailableSpace <= 0;
|
|
333
|
+
});
|
|
334
|
+
return lastFittingIndex >= 0 ? lastFittingIndex : elements.length - 1;
|
|
92
335
|
}
|
|
93
|
-
|
|
94
|
-
set withCloseButton(value) {
|
|
95
|
-
|
|
336
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxFiltersGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
337
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: NgxFiltersGroupComponent, isStandalone: true, selector: "ngx-filters-group", inputs: { folded: { classPropertyName: "folded", publicName: "folded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resetFilters: "resetFilters" }, queries: [{ propertyName: "allFilters", predicate: FILTER_TOKEN, isSignal: true }], viewQueries: [{ propertyName: "filterContainerRef", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "measureRowRef", first: true, predicate: ["measureRow"], descendants: true, isSignal: true }, { propertyName: "staticFieldsRef", first: true, predicate: ["static"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (folded()) {\n <section\n class=\"filter-container\"\n #container\n [matBadge]=\"activeFiltersAmount()\"\n [matBadgeHidden]=\"activeFiltersAmount() <= 0\">\n <button\n mat-icon-button\n aria-label=\"All filters\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"\n this.overlayOrigin.set(trigger);\n this.overlayContent.set(moreFilters);\n this.overlayOpen.set(true);\n this.moreFiltersOverlay.set(true)\n \"\n matTooltip=\"{{ intl?.allFilters ?? 'All filters' }}\">\n <mat-icon>filter_alt</mat-icon>\n </button>\n </section>\n} @else {\n @if (allFilters()) {\n <section #measureRow class=\"measure-row\">\n <mat-chip-set>\n @for (f of allFilters(); track $index) {\n <mat-chip-option [selectable]=\"false\" [selected]=\"f.active()\">\n {{ f.label() }}\n @if (f.type === 'complex' && f.selectedFilterLabel()) {\n <span class=\"selected-label\">: {{ f.selectedFilterLabel() }}</span>\n }\n @if (f.type === 'complex') {\n <mat-icon matChipTrailingIcon>arrow_drop_down</mat-icon>\n }\n </mat-chip-option>\n }\n <mat-chip #overflowMeasure>\n +00 {{ intl?.filters ?? 'Filters' | lowercase }} (00 {{ intl?.actives ?? 'Actives' | lowercase }})\n <mat-icon matChipTrailingIcon>arrow_drop_down</mat-icon>\n </mat-chip>\n </mat-chip-set>\n </section>\n }\n\n <section class=\"filter-container\" #container>\n <mat-chip-set>\n @if (this.visibleFilters().length) {\n @for (f of visibleFilters(); track $index) {\n @if (f.type === 'toggle') {\n <mat-chip-option\n selectable=\"true\"\n [selected]=\"f.active()\"\n (selectionChange)=\"f.active.set($event.selected)\">\n {{ f.label() }}\n </mat-chip-option>\n } @else {\n <mat-chip-option\n [selectable]=\"false\"\n [selected]=\"f.active()\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"\n this.overlayOrigin.set(trigger);\n this.overlayContent.set(f.templateRef);\n this.overlayOpen.set(true);\n this.moreFiltersOverlay.set(false)\n \">\n {{ f.label() }}\n @if (f.selectedFilterLabel()) {\n <span class=\"selected-label\">: {{ f.selectedFilterLabel() }}</span>\n }\n <mat-icon\n [class.is-overlay-open]=\"this.overlayOpen() && this.overlayContent() === f.templateRef\"\n matChipTrailingIcon>\n arrow_drop_down\n </mat-icon>\n </mat-chip-option>\n }\n }\n }\n </mat-chip-set>\n <section class=\"static\" #static>\n @if (invisibleFilters().length; as invisibleFiltersAmount) {\n <mat-chip-set>\n <mat-chip\n cdkOverlayOrigin\n [class.filter-active]=\"activeFiltersAmount()\"\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"\n this.overlayOrigin.set(trigger);\n this.overlayContent.set(moreFilters);\n this.overlayOpen.set(true);\n this.moreFiltersOverlay.set(true)\n \">\n +{{ invisibleFiltersAmount }} {{ intl?.filters ?? 'Filters' | lowercase }} ({{\n activeFiltersAmount()\n }}\n {{ intl?.actives ?? 'Actives' | lowercase }})\n <mat-icon\n [class.is-overlay-open]=\"this.overlayOpen() && this.overlayContent() === moreFilters\"\n matChipTrailingIcon>\n arrow_drop_down\n </mat-icon>\n </mat-chip>\n </mat-chip-set>\n }\n <button\n mat-icon-button\n aria-label=\"Reset filters\"\n (click)=\"emitResetClicked()\"\n matTooltip=\"{{ intl?.reset ?? 'Reset' }}\">\n <mat-icon>settings_backup_restore</mat-icon>\n </button>\n </section>\n </section>\n}\n\n<ng-template #moreFilters>\n @if (allFilters()) {\n @for (f of allFilters(); track $index) {\n @if (f.type === 'toggle') {\n <section class=\"filter\">\n <mat-slide-toggle labelPosition=\"before\" [(ngModel)]=\"f.active\">\n {{ f.label() }}\n </mat-slide-toggle>\n </section>\n } @else {\n <section class=\"filter\">\n <div class=\"title\">\n <span class=\"label\">{{ f.label() }}</span>\n <span class=\"value\">{{ f.selectedFilterLabel() }}</span>\n </div>\n @if (f.templateRef) {\n <ng-container *ngTemplateOutlet=\"f.templateRef\"></ng-container>\n }\n </section>\n }\n }\n }\n</ng-template>\n\n@let overlayOrigin = this.overlayOrigin();\n@let overlayOpen = this.overlayOpen();\n@let overlayContent = this.overlayContent();\n@if (overlayOrigin && overlayOpen && overlayContent) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"overlayOpen\"\n (detach)=\"this.overlayOpen.set(false)\"\n cdkConnectedOverlayHasBackdrop=\"true\"\n backdrop\n (backdropClick)=\"this.overlayOpen.set(false)\"\n cdkConnectedOverlayPanelClass=\"filter-group--overlay\"\n cdkConnectedOverlayBackdropClass=\"filter-group--overlay--backdrop--transparent\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayGrowAfterOpen]=\"true\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"32\">\n @if (moreFiltersOverlay()) {\n <div class=\"filters--title\">\n <span>{{ intl?.filters ?? 'Filters' }}</span>\n <button\n mat-icon-button\n aria-label=\"Reset filters\"\n (click)=\"emitResetClicked()\"\n matTooltip=\"{{ intl?.reset ?? 'Reset' }}\">\n <mat-icon>settings_backup_restore</mat-icon>\n </button>\n </div>\n }\n <div class=\"filters--content\">\n <ng-container *ngTemplateOutlet=\"overlayContent\"></ng-container>\n </div>\n </ng-template>\n}\n", styles: ["ngx-filters-group{flex:1;display:flex;flex-direction:row;justify-content:end}ngx-filters-group .selected-label{max-width:var(--ngx-filters-group-selected-label-max-width, 27ch);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}ngx-filters-group .measure-row{display:flex;flex-direction:row;gap:var(--ngx-filters-group-gap, .5rem);position:absolute;visibility:hidden;pointer-events:none}ngx-filters-group .filter-container{display:flex;flex-direction:row;align-items:center;gap:var(--ngx-filters-group-gap, .5rem);block-size:var(--ngx-filters-group-block-size, 3rem);border-radius:var(--ngx-filters-group-border-radius, 2rem);padding-inline:var(--ngx-filters-group-padding-inline, .5rem);background-color:var(--mat-sys-surface-container-low)}ngx-filters-group .filter-container .static{display:flex;flex-direction:row;gap:var(--ngx-filters-group-gap, .5rem)}ngx-filters-group .filter-container .static mat-chip:first-child{--mat-chip-container-shape-radius: var(--ngx-filters-group-first-chip-shape-radius, .5rem)}ngx-filters-group .filter-container .static mat-chip.filter-active{--mat-chip-elevated-container-color: var(--mat-sys-secondary-container);--mat-chip-outline-color: transparent}ngx-filters-group .filter-container mat-chip-set>div{flex-wrap:nowrap}ngx-filters-group .filter-container mat-chip,ngx-filters-group .filter-container mat-chip-option{min-width:0}ngx-filters-group .filter-container mat-chip:first-child,ngx-filters-group .filter-container mat-chip-option:first-child{--mat-chip-container-shape-radius: var(--ngx-filters-group-first-chip-option-shape-radius, 1rem .5rem .5rem 1rem)}ngx-filters-group .filter-container mat-chip .mat-mdc-chip-action-label,ngx-filters-group .filter-container mat-chip-option .mat-mdc-chip-action-label{display:flex;align-items:center}ngx-filters-group .filter-container mat-chip .is-overlay-open,ngx-filters-group .filter-container mat-chip-option .is-overlay-open{transform:rotate(180deg)}ngx-filters-group .filter-container:has(>button:only-of-type){padding-inline:var(--ngx-filters-group-folded-padding-inline, .25rem)}.filter-group--overlay{display:flex;flex-direction:column;background-color:var(--mat-sys-surface-container-high);border-radius:var(--ngx-filters-group-overlay-border-radius, .5rem);overflow:hidden}.filter-group--overlay mat-slide-toggle>*{width:100%;justify-content:space-between}.filter-group--overlay mat-slide-toggle>* label{margin:0}.filter-group--overlay{--filter-padding: var(--ngx-filters-group-overlay-filter-padding, 1rem)}.filter-group--overlay .filters--title{border-block-end:1px solid var(--mat-sys-outline-variant);display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding-inline:var(--filter-padding);padding-block:calc(var(--filter-padding) / 4)}.filter-group--overlay .filters--content{min-width:18.75rem;overflow:auto;display:flex;flex-direction:column;justify-items:stretch;gap:var(--ngx-filters-group-overlay-filter-gap, .5rem);padding:var(--filter-padding)}.filter-group--overlay .filters--content .filter{display:flex;flex-direction:column;gap:var(--ngx-filters-group-overlay-filter-gap, .5rem);padding-block:var(--filter-padding)}.filter-group--overlay .filters--content .filter:not(:last-child){border-bottom:1px dashed var(--mat-sys-outline-variant)}.filter-group--overlay .filters--content .filter:last-child{padding-block-end:unset}.filter-group--overlay .filters--content .filter:first-child{padding-block-start:unset}.filter-group--overlay .filters--content .filter .title{display:inline-flex;justify-content:space-between;align-items:baseline}.filter-group--overlay .filters--content .filter .title .label{font:var(--mat-sys-label-large)}.filter-group--overlay .filters--content .filter .title .value{font:var(--mat-sys-label-medium);max-width:var(--ngx-filters-group-overlay-max-width, 27ch);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filter-group--overlay .filters--content .filter>[no-padding]{margin-inline:-1rem}.filter-group--overlay--backdrop--transparent{background-color:transparent}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i1$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i1$2.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "component", type: i1$2.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "directive", type: i1$2.MatChipTrailingIcon, selector: "mat-chip-trailing-icon, [matChipTrailingIcon]" }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i2$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i4.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "pipe", type: LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
338
|
+
}
|
|
339
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxFiltersGroupComponent, decorators: [{
|
|
340
|
+
type: Component,
|
|
341
|
+
args: [{ selector: 'ngx-filters-group', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
342
|
+
MatIcon,
|
|
343
|
+
MatIconButton,
|
|
344
|
+
MatChipsModule,
|
|
345
|
+
MatTooltip,
|
|
346
|
+
NgTemplateOutlet,
|
|
347
|
+
CdkConnectedOverlay,
|
|
348
|
+
CdkOverlayOrigin,
|
|
349
|
+
MatSlideToggleModule,
|
|
350
|
+
FormsModule,
|
|
351
|
+
MatBadgeModule,
|
|
352
|
+
LowerCasePipe
|
|
353
|
+
], template: "@if (folded()) {\n <section\n class=\"filter-container\"\n #container\n [matBadge]=\"activeFiltersAmount()\"\n [matBadgeHidden]=\"activeFiltersAmount() <= 0\">\n <button\n mat-icon-button\n aria-label=\"All filters\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"\n this.overlayOrigin.set(trigger);\n this.overlayContent.set(moreFilters);\n this.overlayOpen.set(true);\n this.moreFiltersOverlay.set(true)\n \"\n matTooltip=\"{{ intl?.allFilters ?? 'All filters' }}\">\n <mat-icon>filter_alt</mat-icon>\n </button>\n </section>\n} @else {\n @if (allFilters()) {\n <section #measureRow class=\"measure-row\">\n <mat-chip-set>\n @for (f of allFilters(); track $index) {\n <mat-chip-option [selectable]=\"false\" [selected]=\"f.active()\">\n {{ f.label() }}\n @if (f.type === 'complex' && f.selectedFilterLabel()) {\n <span class=\"selected-label\">: {{ f.selectedFilterLabel() }}</span>\n }\n @if (f.type === 'complex') {\n <mat-icon matChipTrailingIcon>arrow_drop_down</mat-icon>\n }\n </mat-chip-option>\n }\n <mat-chip #overflowMeasure>\n +00 {{ intl?.filters ?? 'Filters' | lowercase }} (00 {{ intl?.actives ?? 'Actives' | lowercase }})\n <mat-icon matChipTrailingIcon>arrow_drop_down</mat-icon>\n </mat-chip>\n </mat-chip-set>\n </section>\n }\n\n <section class=\"filter-container\" #container>\n <mat-chip-set>\n @if (this.visibleFilters().length) {\n @for (f of visibleFilters(); track $index) {\n @if (f.type === 'toggle') {\n <mat-chip-option\n selectable=\"true\"\n [selected]=\"f.active()\"\n (selectionChange)=\"f.active.set($event.selected)\">\n {{ f.label() }}\n </mat-chip-option>\n } @else {\n <mat-chip-option\n [selectable]=\"false\"\n [selected]=\"f.active()\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"\n this.overlayOrigin.set(trigger);\n this.overlayContent.set(f.templateRef);\n this.overlayOpen.set(true);\n this.moreFiltersOverlay.set(false)\n \">\n {{ f.label() }}\n @if (f.selectedFilterLabel()) {\n <span class=\"selected-label\">: {{ f.selectedFilterLabel() }}</span>\n }\n <mat-icon\n [class.is-overlay-open]=\"this.overlayOpen() && this.overlayContent() === f.templateRef\"\n matChipTrailingIcon>\n arrow_drop_down\n </mat-icon>\n </mat-chip-option>\n }\n }\n }\n </mat-chip-set>\n <section class=\"static\" #static>\n @if (invisibleFilters().length; as invisibleFiltersAmount) {\n <mat-chip-set>\n <mat-chip\n cdkOverlayOrigin\n [class.filter-active]=\"activeFiltersAmount()\"\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"\n this.overlayOrigin.set(trigger);\n this.overlayContent.set(moreFilters);\n this.overlayOpen.set(true);\n this.moreFiltersOverlay.set(true)\n \">\n +{{ invisibleFiltersAmount }} {{ intl?.filters ?? 'Filters' | lowercase }} ({{\n activeFiltersAmount()\n }}\n {{ intl?.actives ?? 'Actives' | lowercase }})\n <mat-icon\n [class.is-overlay-open]=\"this.overlayOpen() && this.overlayContent() === moreFilters\"\n matChipTrailingIcon>\n arrow_drop_down\n </mat-icon>\n </mat-chip>\n </mat-chip-set>\n }\n <button\n mat-icon-button\n aria-label=\"Reset filters\"\n (click)=\"emitResetClicked()\"\n matTooltip=\"{{ intl?.reset ?? 'Reset' }}\">\n <mat-icon>settings_backup_restore</mat-icon>\n </button>\n </section>\n </section>\n}\n\n<ng-template #moreFilters>\n @if (allFilters()) {\n @for (f of allFilters(); track $index) {\n @if (f.type === 'toggle') {\n <section class=\"filter\">\n <mat-slide-toggle labelPosition=\"before\" [(ngModel)]=\"f.active\">\n {{ f.label() }}\n </mat-slide-toggle>\n </section>\n } @else {\n <section class=\"filter\">\n <div class=\"title\">\n <span class=\"label\">{{ f.label() }}</span>\n <span class=\"value\">{{ f.selectedFilterLabel() }}</span>\n </div>\n @if (f.templateRef) {\n <ng-container *ngTemplateOutlet=\"f.templateRef\"></ng-container>\n }\n </section>\n }\n }\n }\n</ng-template>\n\n@let overlayOrigin = this.overlayOrigin();\n@let overlayOpen = this.overlayOpen();\n@let overlayContent = this.overlayContent();\n@if (overlayOrigin && overlayOpen && overlayContent) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"overlayOpen\"\n (detach)=\"this.overlayOpen.set(false)\"\n cdkConnectedOverlayHasBackdrop=\"true\"\n backdrop\n (backdropClick)=\"this.overlayOpen.set(false)\"\n cdkConnectedOverlayPanelClass=\"filter-group--overlay\"\n cdkConnectedOverlayBackdropClass=\"filter-group--overlay--backdrop--transparent\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayGrowAfterOpen]=\"true\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"32\">\n @if (moreFiltersOverlay()) {\n <div class=\"filters--title\">\n <span>{{ intl?.filters ?? 'Filters' }}</span>\n <button\n mat-icon-button\n aria-label=\"Reset filters\"\n (click)=\"emitResetClicked()\"\n matTooltip=\"{{ intl?.reset ?? 'Reset' }}\">\n <mat-icon>settings_backup_restore</mat-icon>\n </button>\n </div>\n }\n <div class=\"filters--content\">\n <ng-container *ngTemplateOutlet=\"overlayContent\"></ng-container>\n </div>\n </ng-template>\n}\n", styles: ["ngx-filters-group{flex:1;display:flex;flex-direction:row;justify-content:end}ngx-filters-group .selected-label{max-width:var(--ngx-filters-group-selected-label-max-width, 27ch);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block}ngx-filters-group .measure-row{display:flex;flex-direction:row;gap:var(--ngx-filters-group-gap, .5rem);position:absolute;visibility:hidden;pointer-events:none}ngx-filters-group .filter-container{display:flex;flex-direction:row;align-items:center;gap:var(--ngx-filters-group-gap, .5rem);block-size:var(--ngx-filters-group-block-size, 3rem);border-radius:var(--ngx-filters-group-border-radius, 2rem);padding-inline:var(--ngx-filters-group-padding-inline, .5rem);background-color:var(--mat-sys-surface-container-low)}ngx-filters-group .filter-container .static{display:flex;flex-direction:row;gap:var(--ngx-filters-group-gap, .5rem)}ngx-filters-group .filter-container .static mat-chip:first-child{--mat-chip-container-shape-radius: var(--ngx-filters-group-first-chip-shape-radius, .5rem)}ngx-filters-group .filter-container .static mat-chip.filter-active{--mat-chip-elevated-container-color: var(--mat-sys-secondary-container);--mat-chip-outline-color: transparent}ngx-filters-group .filter-container mat-chip-set>div{flex-wrap:nowrap}ngx-filters-group .filter-container mat-chip,ngx-filters-group .filter-container mat-chip-option{min-width:0}ngx-filters-group .filter-container mat-chip:first-child,ngx-filters-group .filter-container mat-chip-option:first-child{--mat-chip-container-shape-radius: var(--ngx-filters-group-first-chip-option-shape-radius, 1rem .5rem .5rem 1rem)}ngx-filters-group .filter-container mat-chip .mat-mdc-chip-action-label,ngx-filters-group .filter-container mat-chip-option .mat-mdc-chip-action-label{display:flex;align-items:center}ngx-filters-group .filter-container mat-chip .is-overlay-open,ngx-filters-group .filter-container mat-chip-option .is-overlay-open{transform:rotate(180deg)}ngx-filters-group .filter-container:has(>button:only-of-type){padding-inline:var(--ngx-filters-group-folded-padding-inline, .25rem)}.filter-group--overlay{display:flex;flex-direction:column;background-color:var(--mat-sys-surface-container-high);border-radius:var(--ngx-filters-group-overlay-border-radius, .5rem);overflow:hidden}.filter-group--overlay mat-slide-toggle>*{width:100%;justify-content:space-between}.filter-group--overlay mat-slide-toggle>* label{margin:0}.filter-group--overlay{--filter-padding: var(--ngx-filters-group-overlay-filter-padding, 1rem)}.filter-group--overlay .filters--title{border-block-end:1px solid var(--mat-sys-outline-variant);display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding-inline:var(--filter-padding);padding-block:calc(var(--filter-padding) / 4)}.filter-group--overlay .filters--content{min-width:18.75rem;overflow:auto;display:flex;flex-direction:column;justify-items:stretch;gap:var(--ngx-filters-group-overlay-filter-gap, .5rem);padding:var(--filter-padding)}.filter-group--overlay .filters--content .filter{display:flex;flex-direction:column;gap:var(--ngx-filters-group-overlay-filter-gap, .5rem);padding-block:var(--filter-padding)}.filter-group--overlay .filters--content .filter:not(:last-child){border-bottom:1px dashed var(--mat-sys-outline-variant)}.filter-group--overlay .filters--content .filter:last-child{padding-block-end:unset}.filter-group--overlay .filters--content .filter:first-child{padding-block-start:unset}.filter-group--overlay .filters--content .filter .title{display:inline-flex;justify-content:space-between;align-items:baseline}.filter-group--overlay .filters--content .filter .title .label{font:var(--mat-sys-label-large)}.filter-group--overlay .filters--content .filter .title .value{font:var(--mat-sys-label-medium);max-width:var(--ngx-filters-group-overlay-max-width, 27ch);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filter-group--overlay .filters--content .filter>[no-padding]{margin-inline:-1rem}.filter-group--overlay--backdrop--transparent{background-color:transparent}\n"] }]
|
|
354
|
+
}], propDecorators: { resetFilters: [{ type: i0.Output, args: ["resetFilters"] }], folded: [{ type: i0.Input, args: [{ isSignal: true, alias: "folded", required: false }] }], allFilters: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => FILTER_TOKEN), { isSignal: true }] }], filterContainerRef: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], measureRowRef: [{ type: i0.ViewChild, args: ['measureRow', { isSignal: true }] }], staticFieldsRef: [{ type: i0.ViewChild, args: ['static', { isSignal: true }] }] } });
|
|
355
|
+
|
|
356
|
+
class NgxLayoutComponent {
|
|
357
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
358
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: NgxLayoutComponent, isStandalone: true, selector: "ngx-layout", ngImport: i0, template: "<ng-content select=\"ngx-app-bar\"></ng-content>\n<ng-content select=\"ngx-main-bar\"></ng-content>\n<!--\n The ng-content's is not clearly defined yet. The potential use-cases are:\n - Display GPD bars\n - Display warnings\n -->\n<ng-content></ng-content>\n<section class=\"content\">\n <ng-content select=\"ngx-panel\"></ng-content>\n</section>\n", styles: [":host{display:flex;flex-direction:column;flex:1 1 0;background-color:var(--mat-sys-surface-container);padding-block-end:var(--ngx-layout-padding-block-end, .75rem);padding-inline:var(--ngx-layout-padding-inline, 1rem);box-sizing:border-box}:host .content{display:flex;flex:1 1 0;overflow:hidden;gap:var(--ngx-layout-content-gap, .5rem);padding-block:var(--ngx-layout-content-padding-block, .25rem)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
359
|
+
}
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxLayoutComponent, decorators: [{
|
|
361
|
+
type: Component,
|
|
362
|
+
args: [{ selector: 'ngx-layout', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"ngx-app-bar\"></ng-content>\n<ng-content select=\"ngx-main-bar\"></ng-content>\n<!--\n The ng-content's is not clearly defined yet. The potential use-cases are:\n - Display GPD bars\n - Display warnings\n -->\n<ng-content></ng-content>\n<section class=\"content\">\n <ng-content select=\"ngx-panel\"></ng-content>\n</section>\n", styles: [":host{display:flex;flex-direction:column;flex:1 1 0;background-color:var(--mat-sys-surface-container);padding-block-end:var(--ngx-layout-padding-block-end, .75rem);padding-inline:var(--ngx-layout-padding-inline, 1rem);box-sizing:border-box}:host .content{display:flex;flex:1 1 0;overflow:hidden;gap:var(--ngx-layout-content-gap, .5rem);padding-block:var(--ngx-layout-content-padding-block, .25rem)}\n"] }]
|
|
363
|
+
}] });
|
|
364
|
+
|
|
365
|
+
class NgxMainBarComponent {
|
|
366
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMainBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
367
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: NgxMainBarComponent, isStandalone: true, selector: "ngx-main-bar", ngImport: i0, template: "<ng-content select=\"ngx-actions-group\"></ng-content>\n\n<div class=\"right\">\n <ng-content select=\"ngx-filters-group\"></ng-content>\n <ng-content select=\"ngx-search-bar-container\"></ng-content>\n</div>\n", styles: ["ngx-main-bar{display:flex;align-items:center;padding-block:var(--ngx-main-bar-padding-block, .25rem);gap:var(--ngx-main-bar-gap, .75rem)}ngx-main-bar .right{flex:1;display:flex;justify-content:flex-end;gap:var(--ngx-main-bar-right-gap, .75rem)}ngx-main-bar ngx-actions-group{flex:1;min-inline-size:var(--ngx-main-bar-action-min-inline-size, 3rem)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
368
|
+
}
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMainBarComponent, decorators: [{
|
|
370
|
+
type: Component,
|
|
371
|
+
args: [{ selector: 'ngx-main-bar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"ngx-actions-group\"></ng-content>\n\n<div class=\"right\">\n <ng-content select=\"ngx-filters-group\"></ng-content>\n <ng-content select=\"ngx-search-bar-container\"></ng-content>\n</div>\n", styles: ["ngx-main-bar{display:flex;align-items:center;padding-block:var(--ngx-main-bar-padding-block, .25rem);gap:var(--ngx-main-bar-gap, .75rem)}ngx-main-bar .right{flex:1;display:flex;justify-content:flex-end;gap:var(--ngx-main-bar-right-gap, .75rem)}ngx-main-bar ngx-actions-group{flex:1;min-inline-size:var(--ngx-main-bar-action-min-inline-size, 3rem)}\n"] }]
|
|
372
|
+
}] });
|
|
373
|
+
|
|
374
|
+
class NgxPanelComponent {
|
|
375
|
+
appearance = input(undefined, ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
376
|
+
contentPadding = input(undefined, { ...(ngDevMode ? { debugName: "contentPadding" } : {}), alias: 'content-padding' });
|
|
377
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
378
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: NgxPanelComponent, isStandalone: true, selector: "ngx-panel", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, contentPadding: { classPropertyName: "contentPadding", publicName: "content-padding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.appearance": "this.appearance()", "attr.content-padding": "this.contentPadding()" } }, ngImport: i0, template: "<ng-content select=\"ngx-panel-bar[primary]\"></ng-content>\n<ng-content select=\"ngx-panel-bar\"></ng-content>\n<section class=\"content\">\n <ng-content></ng-content>\n</section>\n", styles: ["ngx-panel{display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;block-size:100%;border-radius:var(--ngx-panel-radius, 2rem);padding-block:var(--ngx-panel-padding-block, .25rem);background-color:var(--mat-sys-surface-container-lowest);min-width:min-content}ngx-panel[appearance=transparent]{background-color:transparent}ngx-panel .content{overflow:auto;display:flex;flex-direction:column;gap:var(--ngx-panel-content-gap, .5rem);flex:1;padding-inline:var(--ngx-panel-content-padding-inline, .5rem);padding-block-end:var(--ngx-panel-content-padding-block-end, .75rem)}ngx-panel[content-padding=none] .content{padding-inline:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
379
|
+
}
|
|
380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxPanelComponent, decorators: [{
|
|
381
|
+
type: Component,
|
|
382
|
+
args: [{ selector: 'ngx-panel', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
383
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
384
|
+
'[attr.appearance]': 'this.appearance()',
|
|
385
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
386
|
+
'[attr.content-padding]': 'this.contentPadding()'
|
|
387
|
+
}, template: "<ng-content select=\"ngx-panel-bar[primary]\"></ng-content>\n<ng-content select=\"ngx-panel-bar\"></ng-content>\n<section class=\"content\">\n <ng-content></ng-content>\n</section>\n", styles: ["ngx-panel{display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;block-size:100%;border-radius:var(--ngx-panel-radius, 2rem);padding-block:var(--ngx-panel-padding-block, .25rem);background-color:var(--mat-sys-surface-container-lowest);min-width:min-content}ngx-panel[appearance=transparent]{background-color:transparent}ngx-panel .content{overflow:auto;display:flex;flex-direction:column;gap:var(--ngx-panel-content-gap, .5rem);flex:1;padding-inline:var(--ngx-panel-content-padding-inline, .5rem);padding-block-end:var(--ngx-panel-content-padding-block-end, .75rem)}ngx-panel[content-padding=none] .content{padding-inline:0}\n"] }]
|
|
388
|
+
}], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], contentPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "content-padding", required: false }] }] } });
|
|
389
|
+
|
|
390
|
+
class NgxSearchInputDirective {
|
|
391
|
+
blurred = signal(false, ...(ngDevMode ? [{ debugName: "blurred" }] : []));
|
|
392
|
+
value;
|
|
393
|
+
ngControl = inject(NgControl);
|
|
394
|
+
input = inject(ElementRef);
|
|
395
|
+
control = this.ngControl.control;
|
|
396
|
+
constructor() {
|
|
397
|
+
this.value = toSignal(this.control.valueChanges, { initialValue: '' });
|
|
96
398
|
}
|
|
97
|
-
|
|
98
|
-
|
|
399
|
+
focus() {
|
|
400
|
+
this.input.nativeElement.focus();
|
|
99
401
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
this._withBackButton = coerceBooleanProperty(value);
|
|
402
|
+
reset() {
|
|
403
|
+
this.control.reset();
|
|
103
404
|
}
|
|
104
|
-
|
|
105
|
-
|
|
405
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxSearchInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
406
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: NgxSearchInputDirective, isStandalone: true, selector: "input[ngx-search-input]", host: { listeners: { "blur": "blurred.set(true);", "focus": "blurred.set(false);" } }, ngImport: i0 });
|
|
407
|
+
}
|
|
408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxSearchInputDirective, decorators: [{
|
|
409
|
+
type: Directive,
|
|
410
|
+
args: [{
|
|
411
|
+
selector: 'input[ngx-search-input]',
|
|
412
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
413
|
+
host: {
|
|
414
|
+
'(blur)': 'blurred.set(true);',
|
|
415
|
+
'(focus)': 'blurred.set(false);'
|
|
416
|
+
}
|
|
417
|
+
}]
|
|
418
|
+
}], ctorParameters: () => [] });
|
|
419
|
+
|
|
420
|
+
// type SearchBarContainerSize = 'medium' | 'small';
|
|
421
|
+
class NgxSearchBarContainerComponent {
|
|
422
|
+
// inputs
|
|
423
|
+
folded = input(false, ...(ngDevMode ? [{ debugName: "folded" }] : []));
|
|
424
|
+
/*
|
|
425
|
+
protected size = input<SearchBarContainerSize>('medium');
|
|
426
|
+
protected sizeButtonAttributeName = input<string>();
|
|
427
|
+
protected sizeButtonAttributeValue = input<string>();
|
|
428
|
+
*/
|
|
429
|
+
intl = inject(NgxLayoutIntl, { optional: true });
|
|
430
|
+
manualFoldingState = signal(true, ...(ngDevMode ? [{ debugName: "manualFoldingState" }] : []));
|
|
431
|
+
isFolded = computed(() => this.folded() && this.manualFoldingState() && !this.searchText(), ...(ngDevMode ? [{ debugName: "isFolded" }] : []));
|
|
432
|
+
searchInput = contentChild(NgxSearchInputDirective, ...(ngDevMode ? [{ debugName: "searchInput" }] : []));
|
|
433
|
+
searchText = computed(() => this.searchInput()?.value(), ...(ngDevMode ? [{ debugName: "searchText" }] : []));
|
|
434
|
+
/*
|
|
435
|
+
private hostElement = inject(ElementRef);
|
|
436
|
+
private renderer = inject(Renderer2);
|
|
437
|
+
*/
|
|
438
|
+
constructor() {
|
|
439
|
+
/*
|
|
440
|
+
afterRender(() => {
|
|
441
|
+
const containerElement = this.hostElement.nativeElement;
|
|
442
|
+
const buttons = containerElement.querySelectorAll('button') as NodeListOf<HTMLElement>;
|
|
443
|
+
|
|
444
|
+
buttons.forEach((button: HTMLElement) => {
|
|
445
|
+
if (this.sizeButtonAttributeName()?.trim() && this.sizeButtonAttributeValue()?.trim()) {
|
|
446
|
+
this.renderer.setAttribute(button, this.sizeButtonAttributeName(), this.sizeButtonAttributeValue());
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
});
|
|
450
|
+
});
|
|
451
|
+
*/
|
|
452
|
+
afterRenderEffect(() => {
|
|
453
|
+
const searchInput = this.searchInput();
|
|
454
|
+
if (!searchInput) {
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
if (!this.isFolded()) {
|
|
458
|
+
searchInput.focus();
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
effect(() => {
|
|
462
|
+
const baseFoldStatus = this.folded();
|
|
463
|
+
if (baseFoldStatus) {
|
|
464
|
+
const searchText = untracked(this.searchText);
|
|
465
|
+
const blurred = this.searchInput()?.blurred();
|
|
466
|
+
if (blurred && !searchText) {
|
|
467
|
+
this.manualFoldingState.set(true);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
});
|
|
106
471
|
}
|
|
107
|
-
|
|
108
|
-
|
|
472
|
+
toggleFolded() {
|
|
473
|
+
this.manualFoldingState.update(folded => !folded);
|
|
109
474
|
}
|
|
110
|
-
|
|
111
|
-
|
|
475
|
+
resetInput() {
|
|
476
|
+
const searchInput = this.searchInput();
|
|
477
|
+
if (!searchInput) {
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
searchInput.reset();
|
|
481
|
+
searchInput.focus();
|
|
112
482
|
}
|
|
113
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type:
|
|
114
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: NgxLayoutComponent, isStandalone: true, selector: "ngx-layout", inputs: { toolbarColor: "toolbarColor", editorToolbarId: "editorToolbarId", layoutToolbarExternal: "layoutToolbarExternal", layoutPrimaryActionExternal: "layoutPrimaryActionExternal", layoutActionsExternal: "layoutActionsExternal", layoutInfoBoxesExternal: "layoutInfoBoxesExternal", layoutRightExternal: "layoutRightExternal", withSidenav: "withSidenav", keepFilterButtonDisplayed: "keepFilterButtonDisplayed", withCloseButton: "withCloseButton", withBackButton: "withBackButton" }, outputs: { closeButtonClicked: "closeButtonClicked", backButtonClicked: "backButtonClicked", sideFilterClosed: "sideFilterClosed", sideFilterOpened: "sideFilterOpened" }, queries: [{ propertyName: "layoutToolbarContent", first: true, predicate: ["layoutToolbar"], descendants: true }, { propertyName: "layoutPrimaryActionContent", first: true, predicate: ["layoutPrimaryAction"], descendants: true }, { propertyName: "layoutActionsContent", first: true, predicate: ["layoutActions"], descendants: true }, { propertyName: "layoutInfoBoxesContent", first: true, predicate: ["layoutInfoBoxes"], descendants: true }, { propertyName: "layoutRightContent", first: true, predicate: ["layoutRight"], descendants: true }], viewQueries: [{ propertyName: "sideFilter", first: true, predicate: ["sideFilter"], descendants: true }], ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"filter\"></ng-container>\n\n<ng-template #content>\n <div class=\"main-content\">\n @if (\n layoutPrimaryAction && !((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false)\n ) {\n <span class=\"primary-action-container\" [class.bottom]=\"mediaService.isHandset$ | async\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n <ng-content></ng-content>\n </div>\n @if ((mediaService.isHandset$ | async) && actionsToolbar) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n</ng-template>\n\n<ng-template #actionsToolbar>\n <mat-toolbar\n id=\"actions-toolbar\"\n class=\"actions\"\n [color]=\"toolbarColor\"\n [class.bottom]=\"mediaService.isHandset$ | async\">\n @if (layoutPrimaryAction && (layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <span class=\"primary-action-container\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n @if (layoutActions) {\n <ng-template [ngTemplateOutlet]=\"layoutActions\"></ng-template>\n }\n @if (layoutInfoBoxes && (mediaService.isHandset$ | async) === false) {\n <div class=\"info-boxes-container\">\n <ng-template [ngTemplateOutlet]=\"layoutInfoBoxes\"></ng-template>\n </div>\n }\n </mat-toolbar>\n</ng-template>\n\n<ng-template #filter>\n @if (layoutToolbar || layoutRight) {\n <mat-toolbar id=\"toolbar\" [color]=\"toolbarColor\">\n @if (withSidenav && (mediaService.isHandset$ | async) && (sidenavService.openChanged$ | async) === false) {\n <button type=\"button\" id=\"sidenav-button\" mat-icon-button (click)=\"sidenavService.toggle()\">\n <mat-icon>menu</mat-icon>\n </button>\n }\n @if (withBackButton) {\n <button\n type=\"button\"\n id=\"back-button\"\n mat-icon-button\n (click)=\"this.backButtonClicked.emit($event)\"\n [matTooltip]=\"intl?.backLabel ?? 'Back'\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n <div id=\"toolbar-content-container\">\n @if (layoutToolbar) {\n <ng-template [ngTemplateOutlet]=\"layoutToolbar\"></ng-template>\n }\n </div>\n @if (sideFilter && (keepFilterButtonDisplayed || (mediaService.isHandset$ | async)) && layoutRight) {\n <button\n type=\"button\"\n id=\"filter-button\"\n mat-icon-button\n (click)=\"sideFilter.toggle()\"\n [matTooltip]=\"intl?.sideFilterLabel ?? 'Show/Hide filters'\">\n <mat-icon>tune</mat-icon>\n </button>\n }\n @if (withCloseButton) {\n <button\n type=\"button\"\n id=\"close-button\"\n mat-icon-button\n (click)=\"this.closeButtonClicked.emit($event)\"\n [matTooltip]=\"intl?.closeLabel ?? 'Close'\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-toolbar>\n }\n\n @if ((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n @if (layoutRight) {\n <mat-drawer-container autosize=\"true\">\n <mat-drawer-content>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </mat-drawer-content>\n <mat-drawer\n id=\"side-filter\"\n #sideFilter\n (closed)=\"sideFilterClosed.emit()\"\n (openedChange)=\"sideFilterOpened.emit()\"\n class=\"right\"\n position=\"end\"\n [attr.role]=\"(mediaService.isHandset$ | async) ? 'dialog' : 'navigation'\"\n [mode]=\"(mediaService.isHandset$ | async) ? 'over' : 'side'\"\n [opened]=\"(mediaService.isHandset$ | async) === false\">\n <ng-template [ngTemplateOutlet]=\"layoutRight\"></ng-template>\n </mat-drawer>\n </mat-drawer-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n</ng-template>\n", styles: ["ngx-layout{display:flex;flex-direction:column;position:absolute;inset:0}ngx-layout.no-left[no-right=true] .main-content{padding:0}ngx-layout mat-sidenav-container{position:absolute;inset:0}ngx-layout mat-drawer-content,ngx-layout mat-sidenav-content{display:flex!important;flex-direction:column}ngx-layout mat-sidenav{width:200px}ngx-layout mat-drawer#side-filter{width:220px}ngx-layout mat-drawer#side-filter.right{padding:.3rem}ngx-layout mat-drawer#side-filter.right [filters-title]{font-size:1.2rem;display:flex;align-items:center;justify-content:space-between;flex:1 1 auto;font-weight:700;padding:.6rem;margin-bottom:.3rem}ngx-layout mat-drawer#side-filter.right [filters-subtitle]{font-size:1rem;display:flex;align-items:center;justify-content:space-between;flex:1 1 auto;font-weight:600;padding:.4rem .6rem;margin-bottom:.3rem;margin-top:.3rem}ngx-layout mat-drawer#side-filter.right [icons-container]{display:flex;align-items:center}ngx-layout mat-drawer#side-filter.right [filters-icon]{cursor:pointer;transition:color .3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-chip-list] mat-chip-listbox{margin:0;max-height:20vh;overflow-y:auto}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip{position:relative;padding:.5rem;margin:.1rem;font-size:.75rem;transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip:not([disabled]){cursor:pointer}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip:not([disabled]):hover:before{font-family:Material Icons;content:\"close\";display:flex;align-items:center;justify-content:center;position:absolute;inset:0;font-weight:700;font-size:1.2rem;cursor:pointer;transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-toggle-group]{display:flex}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle{transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle mat-icon{margin-right:1rem}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle .mat-button-toggle-label-content{text-align:start}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle .mat-button-toggle-focus-overlay{height:100%}ngx-layout mat-drawer#side-filter.right mat-form-field{width:100%}ngx-layout mat-drawer#side-filter.right .mat-mdc-form-field-infix{width:inherit}ngx-layout mat-drawer#side-filter.right.mat-drawer-side{box-shadow:-3px 0 5px -1px #0003;z-index:10}ngx-layout mat-drawer-container{flex:1}ngx-layout .mat-toolbar:not(.actions){display:flex;flex-shrink:0;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;z-index:10}ngx-layout .mat-toolbar:not(.actions) #toolbar-content-container{display:flex;flex-grow:1;overflow:hidden}ngx-layout .mat-toolbar:not(.actions) [toolbar-title]{overflow:hidden;text-overflow:ellipsis}ngx-layout .mat-toolbar:not(.actions)>div{display:flex;align-items:center}ngx-layout .mat-toolbar .mat-mdc-icon-button{height:40px;line-height:40px;width:40px;display:flex;justify-content:center;align-items:center;padding:0}ngx-layout .mat-toolbar#actions-toolbar{flex:0 0 auto;height:40px;font-size:inherit;padding-right:0}ngx-layout .mat-toolbar#actions-toolbar .info-boxes-container{display:flex;flex:1 1 auto;justify-content:flex-end}ngx-layout .mat-toolbar#actions-toolbar .info-boxes-container .info-box{display:flex;flex-grow:0;line-height:40px;padding-left:2rem;padding-right:2rem;box-shadow:-3px 0 5px -1px #0003}ngx-layout .mat-toolbar#actions-toolbar.bottom#actions-toolbar{display:flex;width:100%;justify-content:space-around}ngx-layout .mat-toolbar#actions-toolbar .primary-action-container{z-index:20}ngx-layout .main-content{position:relative;display:flex;flex:1 1 auto;overflow:hidden}ngx-layout .main-content .primary-action-container{position:absolute;z-index:20;opacity:.8;transition:.3s ease-in-out}ngx-layout .main-content .primary-action-container:hover{opacity:1}ngx-layout .main-content .primary-action-container.bottom{right:1rem;bottom:1rem}ngx-layout .main-content .primary-action-container:not(.bottom){top:1rem;left:1rem}ngx-layout ::-webkit-scrollbar{width:12px;height:12px}ngx-layout ::-webkit-scrollbar-thumb{transition:.3s ease-in-out;border-radius:6px}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
483
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxSearchBarContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
484
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: NgxSearchBarContainerComponent, isStandalone: true, selector: "ngx-search-bar-container", inputs: { folded: { classPropertyName: "folded", publicName: "folded", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "searchInput", first: true, predicate: NgxSearchInputDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (isFolded()) {\n <button\n matIconButton\n aria-label=\"Open search bar\"\n (click)=\"toggleFolded()\"\n matTooltip=\"{{ intl?.openSearchBar ?? 'Open search bar' }}\">\n <mat-icon>search</mat-icon>\n </button>\n} @else {\n <ng-content select=\"[ngx-search-input]\"></ng-content>\n\n @if (searchText()) {\n <button\n matIconButton\n aria-label=\"Clear button\"\n (click)=\"resetInput()\"\n matTooltip=\"{{ intl?.deleteSearch ?? 'Clear search' }}\">\n <mat-icon>close</mat-icon>\n </button>\n } @else {\n <mat-icon class=\"icon-search-bar\" aria-hidden=\"false\" aria-label=\"Search icon\" fontIcon=\"search\" />\n }\n}\n", styles: ["ngx-search-bar-container{display:flex;flex:1 1 auto;max-width:400px;align-items:center;block-size:var(--ngx-search-bar-container-block-size, 3rem);border-radius:var(--ngx-search-bar-container-radius, 2rem);padding-inline-start:var(--ngx-search-bar-container-padding-inline-start, 1.125rem);padding-inline-end:var(--ngx-search-bar-container-padding-inline-end, .25rem);background-color:var(--mat-sys-surface-container-high);gap:var(--ngx-search-bar-container-gap, .125rem)}ngx-search-bar-container:has(button:only-child){width:fit-content;padding:var(--ngx-search-bar-folded-container-padding, 0 .25rem);flex:0}ngx-search-bar-container>input[ngx-search-input]{font:var(--mat-sys-body-large);letter-spacing:var(--mat-sys-body-large-tracking);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:10px}ngx-search-bar-container>input[ngx-search-input]::placeholder{color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container mat-icon.icon-search-bar{padding:var(--ngx-search-bar-icon-padding, .5rem);color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container [ngx-search-input]{flex:1;background:none;border:none}ngx-search-bar-container [ngx-search-input]:focus{outline:none}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
115
485
|
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type:
|
|
486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxSearchBarContainerComponent, decorators: [{
|
|
117
487
|
type: Component,
|
|
118
|
-
args: [{ selector: 'ngx-
|
|
119
|
-
|
|
120
|
-
AsyncPipe,
|
|
121
|
-
MatIconButton,
|
|
122
|
-
MatIcon,
|
|
123
|
-
MatDrawer,
|
|
124
|
-
MatDrawerContainer,
|
|
125
|
-
MatDrawerContent,
|
|
126
|
-
MatToolbar,
|
|
127
|
-
MatTooltip
|
|
128
|
-
], template: "<ng-container *ngTemplateOutlet=\"filter\"></ng-container>\n\n<ng-template #content>\n <div class=\"main-content\">\n @if (\n layoutPrimaryAction && !((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false)\n ) {\n <span class=\"primary-action-container\" [class.bottom]=\"mediaService.isHandset$ | async\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n <ng-content></ng-content>\n </div>\n @if ((mediaService.isHandset$ | async) && actionsToolbar) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n</ng-template>\n\n<ng-template #actionsToolbar>\n <mat-toolbar\n id=\"actions-toolbar\"\n class=\"actions\"\n [color]=\"toolbarColor\"\n [class.bottom]=\"mediaService.isHandset$ | async\">\n @if (layoutPrimaryAction && (layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <span class=\"primary-action-container\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n @if (layoutActions) {\n <ng-template [ngTemplateOutlet]=\"layoutActions\"></ng-template>\n }\n @if (layoutInfoBoxes && (mediaService.isHandset$ | async) === false) {\n <div class=\"info-boxes-container\">\n <ng-template [ngTemplateOutlet]=\"layoutInfoBoxes\"></ng-template>\n </div>\n }\n </mat-toolbar>\n</ng-template>\n\n<ng-template #filter>\n @if (layoutToolbar || layoutRight) {\n <mat-toolbar id=\"toolbar\" [color]=\"toolbarColor\">\n @if (withSidenav && (mediaService.isHandset$ | async) && (sidenavService.openChanged$ | async) === false) {\n <button type=\"button\" id=\"sidenav-button\" mat-icon-button (click)=\"sidenavService.toggle()\">\n <mat-icon>menu</mat-icon>\n </button>\n }\n @if (withBackButton) {\n <button\n type=\"button\"\n id=\"back-button\"\n mat-icon-button\n (click)=\"this.backButtonClicked.emit($event)\"\n [matTooltip]=\"intl?.backLabel ?? 'Back'\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n <div id=\"toolbar-content-container\">\n @if (layoutToolbar) {\n <ng-template [ngTemplateOutlet]=\"layoutToolbar\"></ng-template>\n }\n </div>\n @if (sideFilter && (keepFilterButtonDisplayed || (mediaService.isHandset$ | async)) && layoutRight) {\n <button\n type=\"button\"\n id=\"filter-button\"\n mat-icon-button\n (click)=\"sideFilter.toggle()\"\n [matTooltip]=\"intl?.sideFilterLabel ?? 'Show/Hide filters'\">\n <mat-icon>tune</mat-icon>\n </button>\n }\n @if (withCloseButton) {\n <button\n type=\"button\"\n id=\"close-button\"\n mat-icon-button\n (click)=\"this.closeButtonClicked.emit($event)\"\n [matTooltip]=\"intl?.closeLabel ?? 'Close'\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-toolbar>\n }\n\n @if ((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n @if (layoutRight) {\n <mat-drawer-container autosize=\"true\">\n <mat-drawer-content>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </mat-drawer-content>\n <mat-drawer\n id=\"side-filter\"\n #sideFilter\n (closed)=\"sideFilterClosed.emit()\"\n (openedChange)=\"sideFilterOpened.emit()\"\n class=\"right\"\n position=\"end\"\n [attr.role]=\"(mediaService.isHandset$ | async) ? 'dialog' : 'navigation'\"\n [mode]=\"(mediaService.isHandset$ | async) ? 'over' : 'side'\"\n [opened]=\"(mediaService.isHandset$ | async) === false\">\n <ng-template [ngTemplateOutlet]=\"layoutRight\"></ng-template>\n </mat-drawer>\n </mat-drawer-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n</ng-template>\n", styles: ["ngx-layout{display:flex;flex-direction:column;position:absolute;inset:0}ngx-layout.no-left[no-right=true] .main-content{padding:0}ngx-layout mat-sidenav-container{position:absolute;inset:0}ngx-layout mat-drawer-content,ngx-layout mat-sidenav-content{display:flex!important;flex-direction:column}ngx-layout mat-sidenav{width:200px}ngx-layout mat-drawer#side-filter{width:220px}ngx-layout mat-drawer#side-filter.right{padding:.3rem}ngx-layout mat-drawer#side-filter.right [filters-title]{font-size:1.2rem;display:flex;align-items:center;justify-content:space-between;flex:1 1 auto;font-weight:700;padding:.6rem;margin-bottom:.3rem}ngx-layout mat-drawer#side-filter.right [filters-subtitle]{font-size:1rem;display:flex;align-items:center;justify-content:space-between;flex:1 1 auto;font-weight:600;padding:.4rem .6rem;margin-bottom:.3rem;margin-top:.3rem}ngx-layout mat-drawer#side-filter.right [icons-container]{display:flex;align-items:center}ngx-layout mat-drawer#side-filter.right [filters-icon]{cursor:pointer;transition:color .3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-chip-list] mat-chip-listbox{margin:0;max-height:20vh;overflow-y:auto}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip{position:relative;padding:.5rem;margin:.1rem;font-size:.75rem;transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip:not([disabled]){cursor:pointer}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip:not([disabled]):hover:before{font-family:Material Icons;content:\"close\";display:flex;align-items:center;justify-content:center;position:absolute;inset:0;font-weight:700;font-size:1.2rem;cursor:pointer;transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-toggle-group]{display:flex}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle{transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle mat-icon{margin-right:1rem}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle .mat-button-toggle-label-content{text-align:start}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle .mat-button-toggle-focus-overlay{height:100%}ngx-layout mat-drawer#side-filter.right mat-form-field{width:100%}ngx-layout mat-drawer#side-filter.right .mat-mdc-form-field-infix{width:inherit}ngx-layout mat-drawer#side-filter.right.mat-drawer-side{box-shadow:-3px 0 5px -1px #0003;z-index:10}ngx-layout mat-drawer-container{flex:1}ngx-layout .mat-toolbar:not(.actions){display:flex;flex-shrink:0;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;z-index:10}ngx-layout .mat-toolbar:not(.actions) #toolbar-content-container{display:flex;flex-grow:1;overflow:hidden}ngx-layout .mat-toolbar:not(.actions) [toolbar-title]{overflow:hidden;text-overflow:ellipsis}ngx-layout .mat-toolbar:not(.actions)>div{display:flex;align-items:center}ngx-layout .mat-toolbar .mat-mdc-icon-button{height:40px;line-height:40px;width:40px;display:flex;justify-content:center;align-items:center;padding:0}ngx-layout .mat-toolbar#actions-toolbar{flex:0 0 auto;height:40px;font-size:inherit;padding-right:0}ngx-layout .mat-toolbar#actions-toolbar .info-boxes-container{display:flex;flex:1 1 auto;justify-content:flex-end}ngx-layout .mat-toolbar#actions-toolbar .info-boxes-container .info-box{display:flex;flex-grow:0;line-height:40px;padding-left:2rem;padding-right:2rem;box-shadow:-3px 0 5px -1px #0003}ngx-layout .mat-toolbar#actions-toolbar.bottom#actions-toolbar{display:flex;width:100%;justify-content:space-around}ngx-layout .mat-toolbar#actions-toolbar .primary-action-container{z-index:20}ngx-layout .main-content{position:relative;display:flex;flex:1 1 auto;overflow:hidden}ngx-layout .main-content .primary-action-container{position:absolute;z-index:20;opacity:.8;transition:.3s ease-in-out}ngx-layout .main-content .primary-action-container:hover{opacity:1}ngx-layout .main-content .primary-action-container.bottom{right:1rem;bottom:1rem}ngx-layout .main-content .primary-action-container:not(.bottom){top:1rem;left:1rem}ngx-layout ::-webkit-scrollbar{width:12px;height:12px}ngx-layout ::-webkit-scrollbar-thumb{transition:.3s ease-in-out;border-radius:6px}\n"] }]
|
|
129
|
-
}], propDecorators: { toolbarColor: [{
|
|
130
|
-
type: Input
|
|
131
|
-
}], editorToolbarId: [{
|
|
132
|
-
type: Input
|
|
133
|
-
}], layoutToolbarExternal: [{
|
|
134
|
-
type: Input
|
|
135
|
-
}], layoutPrimaryActionExternal: [{
|
|
136
|
-
type: Input
|
|
137
|
-
}], layoutActionsExternal: [{
|
|
138
|
-
type: Input
|
|
139
|
-
}], layoutInfoBoxesExternal: [{
|
|
140
|
-
type: Input
|
|
141
|
-
}], layoutRightExternal: [{
|
|
142
|
-
type: Input
|
|
143
|
-
}], closeButtonClicked: [{
|
|
144
|
-
type: Output
|
|
145
|
-
}], backButtonClicked: [{
|
|
146
|
-
type: Output
|
|
147
|
-
}], sideFilterClosed: [{
|
|
148
|
-
type: Output
|
|
149
|
-
}], sideFilterOpened: [{
|
|
150
|
-
type: Output
|
|
151
|
-
}], layoutToolbarContent: [{
|
|
152
|
-
type: ContentChild,
|
|
153
|
-
args: ['layoutToolbar']
|
|
154
|
-
}], layoutPrimaryActionContent: [{
|
|
155
|
-
type: ContentChild,
|
|
156
|
-
args: ['layoutPrimaryAction']
|
|
157
|
-
}], layoutActionsContent: [{
|
|
158
|
-
type: ContentChild,
|
|
159
|
-
args: ['layoutActions']
|
|
160
|
-
}], layoutInfoBoxesContent: [{
|
|
161
|
-
type: ContentChild,
|
|
162
|
-
args: ['layoutInfoBoxes']
|
|
163
|
-
}], layoutRightContent: [{
|
|
164
|
-
type: ContentChild,
|
|
165
|
-
args: ['layoutRight']
|
|
166
|
-
}], sideFilter: [{
|
|
167
|
-
type: ViewChild,
|
|
168
|
-
args: ['sideFilter']
|
|
169
|
-
}], withSidenav: [{
|
|
170
|
-
type: Input
|
|
171
|
-
}], keepFilterButtonDisplayed: [{
|
|
172
|
-
type: Input
|
|
173
|
-
}], withCloseButton: [{
|
|
174
|
-
type: Input
|
|
175
|
-
}], withBackButton: [{
|
|
176
|
-
type: Input
|
|
177
|
-
}] } });
|
|
488
|
+
args: [{ selector: 'ngx-search-bar-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconModule, MatButtonModule, MatTooltipModule], template: "@if (isFolded()) {\n <button\n matIconButton\n aria-label=\"Open search bar\"\n (click)=\"toggleFolded()\"\n matTooltip=\"{{ intl?.openSearchBar ?? 'Open search bar' }}\">\n <mat-icon>search</mat-icon>\n </button>\n} @else {\n <ng-content select=\"[ngx-search-input]\"></ng-content>\n\n @if (searchText()) {\n <button\n matIconButton\n aria-label=\"Clear button\"\n (click)=\"resetInput()\"\n matTooltip=\"{{ intl?.deleteSearch ?? 'Clear search' }}\">\n <mat-icon>close</mat-icon>\n </button>\n } @else {\n <mat-icon class=\"icon-search-bar\" aria-hidden=\"false\" aria-label=\"Search icon\" fontIcon=\"search\" />\n }\n}\n", styles: ["ngx-search-bar-container{display:flex;flex:1 1 auto;max-width:400px;align-items:center;block-size:var(--ngx-search-bar-container-block-size, 3rem);border-radius:var(--ngx-search-bar-container-radius, 2rem);padding-inline-start:var(--ngx-search-bar-container-padding-inline-start, 1.125rem);padding-inline-end:var(--ngx-search-bar-container-padding-inline-end, .25rem);background-color:var(--mat-sys-surface-container-high);gap:var(--ngx-search-bar-container-gap, .125rem)}ngx-search-bar-container:has(button:only-child){width:fit-content;padding:var(--ngx-search-bar-folded-container-padding, 0 .25rem);flex:0}ngx-search-bar-container>input[ngx-search-input]{font:var(--mat-sys-body-large);letter-spacing:var(--mat-sys-body-large-tracking);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:10px}ngx-search-bar-container>input[ngx-search-input]::placeholder{color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container mat-icon.icon-search-bar{padding:var(--ngx-search-bar-icon-padding, .5rem);color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container [ngx-search-input]{flex:1;background:none;border:none}ngx-search-bar-container [ngx-search-input]:focus{outline:none}\n"] }]
|
|
489
|
+
}], ctorParameters: () => [], propDecorators: { folded: [{ type: i0.Input, args: [{ isSignal: true, alias: "folded", required: false }] }], searchInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgxSearchInputDirective), { isSignal: true }] }] } });
|
|
178
490
|
|
|
179
491
|
/**
|
|
180
492
|
* Generated bundle index. Do not edit.
|
|
181
493
|
*/
|
|
182
494
|
|
|
183
|
-
export { NgxLayoutComponent, NgxLayoutIntl, provideNgxLayout };
|
|
495
|
+
export { NgxActionsGroupComponent, NgxAppBarComponent, NgxFilterDirective, NgxFilterToggleDirective, NgxFiltersGroupComponent, NgxLayoutComponent, NgxLayoutIntl, NgxMainBarComponent, NgxPanelComponent, NgxSearchBarContainerComponent, NgxSearchInputDirective, provideNgxLayout };
|
|
184
496
|
//# sourceMappingURL=hug-ngx-layout.mjs.map
|