@hug/ngx-layout 22.0.0-alpha.1 → 22.0.0-alpha.10
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 +120 -0
- package/fesm2022/hug-ngx-layout-m2.mjs +6 -6
- package/fesm2022/hug-ngx-layout.mjs +343 -82
- package/fesm2022/hug-ngx-layout.mjs.map +1 -1
- package/package.json +3 -3
- package/translations/de-CH.json +6 -1
- package/translations/en-US.json +6 -1
- package/translations/fr-CH.json +6 -1
- package/types/hug-ngx-layout.d.ts +155 -47
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, signal, computed, inject, contentChildren, ElementRef, viewChild, Renderer2,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
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';
|
|
2
|
+
import { Directive, Injectable, signal, effect, computed, inject, contentChildren, ElementRef, viewChild, Renderer2, ViewEncapsulation, ChangeDetectionStrategy, Component, input, output, InjectionToken, TemplateRef, forwardRef, model, contentChild, afterRenderEffect, untracked } from '@angular/core';
|
|
3
|
+
import { MatIconButton } from '@angular/material/button';
|
|
4
|
+
import { MatIcon } from '@angular/material/icon';
|
|
5
|
+
import { MatMenu, MatMenuTrigger } from '@angular/material/menu';
|
|
6
|
+
import { MatTooltip } from '@angular/material/tooltip';
|
|
11
7
|
import { NgxAbstractIntl, provideNgxIntl } from '@hug/ngx-core';
|
|
8
|
+
import { NgTemplateOutlet, LowerCasePipe } from '@angular/common';
|
|
9
|
+
import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
10
|
+
import * as i1 from '@angular/forms';
|
|
11
|
+
import { FormsModule, NgControl } from '@angular/forms';
|
|
12
|
+
import { MatBadge } from '@angular/material/badge';
|
|
13
|
+
import { MatChip, MatChipOption, MatChipTrailingIcon, MatChipSet } from '@angular/material/chips';
|
|
14
|
+
import { MatSlideToggle } from '@angular/material/slide-toggle';
|
|
12
15
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
13
|
-
|
|
16
|
+
|
|
17
|
+
class NgxActionDirective {
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
19
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: NgxActionDirective, isStandalone: true, selector: "button, [ngxAction]", ngImport: i0 });
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxActionDirective, decorators: [{
|
|
22
|
+
type: Directive,
|
|
23
|
+
args: [{
|
|
24
|
+
selector: 'button, [ngxAction]',
|
|
25
|
+
standalone: true
|
|
26
|
+
}]
|
|
27
|
+
}] });
|
|
14
28
|
|
|
15
29
|
/**
|
|
16
30
|
* Data for internationalization
|
|
@@ -21,10 +35,15 @@ class NgxLayoutIntl extends NgxAbstractIntl {
|
|
|
21
35
|
deleteSearch = '';
|
|
22
36
|
openSearchBar = '';
|
|
23
37
|
moreActions = '';
|
|
24
|
-
|
|
25
|
-
|
|
38
|
+
allFilters = '';
|
|
39
|
+
filters = '';
|
|
40
|
+
actives = '';
|
|
41
|
+
reset = '';
|
|
42
|
+
close = '';
|
|
43
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxLayoutIntl, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
44
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxLayoutIntl });
|
|
26
45
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxLayoutIntl, decorators: [{
|
|
28
47
|
type: Injectable
|
|
29
48
|
}] });
|
|
30
49
|
|
|
@@ -45,21 +64,28 @@ const buttonDimensions = 40;
|
|
|
45
64
|
* @param box
|
|
46
65
|
* @param defaultSize
|
|
47
66
|
*/
|
|
48
|
-
const resizeSignal = (element,
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
67
|
+
const resizeSignal$1 = (element, box = 'border-box') => {
|
|
68
|
+
const value = signal(undefined, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
69
|
+
effect(onCleanup => {
|
|
70
|
+
const el = element()?.nativeElement;
|
|
71
|
+
if (!el) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const initialValue = {
|
|
75
|
+
borderBoxSize: [],
|
|
76
|
+
contentRect: new DOMRect(),
|
|
77
|
+
contentBoxSize: [],
|
|
78
|
+
devicePixelContentBoxSize: [],
|
|
79
|
+
target: el
|
|
80
|
+
};
|
|
81
|
+
value.set(initialValue);
|
|
82
|
+
const ro = new ResizeObserver(entries => {
|
|
83
|
+
value.set(entries[0] || initialValue);
|
|
84
|
+
});
|
|
85
|
+
ro.observe(el, { box });
|
|
86
|
+
onCleanup(() => {
|
|
87
|
+
ro.disconnect();
|
|
88
|
+
});
|
|
63
89
|
});
|
|
64
90
|
return value;
|
|
65
91
|
};
|
|
@@ -69,14 +95,13 @@ class NgxActionsGroupComponent {
|
|
|
69
95
|
return this.iconButtons().slice(maxVisible);
|
|
70
96
|
}, ...(ngDevMode ? [{ debugName: "hiddenActions" }] : []));
|
|
71
97
|
intl = inject(NgxLayoutIntl, { optional: true });
|
|
72
|
-
iconButtons = contentChildren(
|
|
98
|
+
iconButtons = contentChildren(NgxActionDirective, { ...(ngDevMode ? { debugName: "iconButtons" } : {}), read: ElementRef });
|
|
73
99
|
container = viewChild.required('container');
|
|
74
100
|
hiddenContainer = viewChild.required('hiddenContainer');
|
|
75
101
|
hostElement = inject(ElementRef);
|
|
76
102
|
renderer = inject(Renderer2);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
hostWidth = computed(() => this.hostSize().contentRect.width, ...(ngDevMode ? [{ debugName: "hostWidth" }] : []));
|
|
103
|
+
hostSize = resizeSignal$1(() => this.hostElement);
|
|
104
|
+
hostWidth = computed(() => Math.ceil(this.hostSize()?.contentRect.width || 0), ...(ngDevMode ? [{ debugName: "hostWidth" }] : []));
|
|
80
105
|
visibleActions = computed(() => {
|
|
81
106
|
const maxVisible = this.getMaxVisibleAction(this.hostWidth());
|
|
82
107
|
return this.iconButtons().slice(0, maxVisible);
|
|
@@ -119,25 +144,26 @@ class NgxActionsGroupComponent {
|
|
|
119
144
|
// -1 => Allows for the more button to be displayed
|
|
120
145
|
return maxVisibleActions - 1;
|
|
121
146
|
}
|
|
122
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.
|
|
123
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.
|
|
147
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxActionsGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
148
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: NgxActionsGroupComponent, isStandalone: true, selector: "ngx-actions-group", queries: [{ propertyName: "iconButtons", predicate: NgxActionDirective, 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 select=\"button, [ngxAction]\"></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%;max-width:364px}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: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: 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 });
|
|
124
149
|
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxActionsGroupComponent, decorators: [{
|
|
126
151
|
type: Component,
|
|
127
|
-
args: [{ selector: 'ngx-actions-group',
|
|
152
|
+
args: [{ selector: 'ngx-actions-group', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
|
|
128
153
|
MatIcon,
|
|
129
154
|
MatIconButton,
|
|
130
155
|
MatTooltip,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
156
|
+
MatMenu,
|
|
157
|
+
MatMenuTrigger
|
|
158
|
+
], template: "<div #container class=\"container\">\n <ng-content select=\"button, [ngxAction]\"></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%;max-width:364px}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"] }]
|
|
159
|
+
}], ctorParameters: () => [], propDecorators: { iconButtons: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => NgxActionDirective), { ...{ read: ElementRef }, isSignal: true }] }], container: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], hiddenContainer: [{ type: i0.ViewChild, args: ['hiddenContainer', { isSignal: true }] }] } });
|
|
134
160
|
|
|
135
161
|
class NgxAppBarComponent {
|
|
136
162
|
mode = input('standard', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
137
163
|
title = input.required(...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
138
164
|
subtitle = input(...(ngDevMode ? [undefined, { debugName: "subtitle" }] : []));
|
|
139
165
|
helpUrl = input(...(ngDevMode ? [undefined, { debugName: "helpUrl" }] : []));
|
|
140
|
-
|
|
166
|
+
withBackButton = input(false, ...(ngDevMode ? [{ debugName: "withBackButton" }] : []));
|
|
141
167
|
goBack = output();
|
|
142
168
|
intl = inject(NgxLayoutIntl, { optional: true });
|
|
143
169
|
helpPopup;
|
|
@@ -156,50 +182,208 @@ class NgxAppBarComponent {
|
|
|
156
182
|
triggerGoBack() {
|
|
157
183
|
this.goBack.emit();
|
|
158
184
|
}
|
|
159
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.
|
|
160
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.
|
|
185
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxAppBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
186
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", 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 }, withBackButton: { classPropertyName: "withBackButton", publicName: "withBackButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { goBack: "goBack" }, host: { properties: { "class.condensed": "mode()===\"condensed\"" } }, ngImport: i0, template: "@if (withBackButton()) {\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: [":host{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);padding:var(--ngx-app-bar-padding, .25rem 1rem)}:host header{color:var(--mat-sys-on-surface-variant)}:host header.condensed{display:flex;flex-direction:row;align-items:center;gap:var(--ngx-app-bar-condensed-gap, .5rem)}:host header.condensed mat-icon{color:var(--mat-sys-outline)}:host header .title,:host header .subtitle{margin:0;white-space:nowrap}:host 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))}:host 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))}:host .actions{display:flex;justify-content:flex-end;flex-grow:1;gap:var(--ngx-app-bar-actions-gap, .5rem)}\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
161
187
|
}
|
|
162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxAppBarComponent, decorators: [{
|
|
163
189
|
type: Component,
|
|
164
|
-
args: [{ selector: 'ngx-app-bar',
|
|
190
|
+
args: [{ selector: 'ngx-app-bar', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIcon, MatIconButton, MatTooltip], host: {
|
|
165
191
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
166
192
|
'[class.condensed]': 'mode()==="condensed"'
|
|
167
|
-
}, template: "@if (
|
|
168
|
-
}], 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 }] }],
|
|
193
|
+
}, template: "@if (withBackButton()) {\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: [":host{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);padding:var(--ngx-app-bar-padding, .25rem 1rem)}:host header{color:var(--mat-sys-on-surface-variant)}:host header.condensed{display:flex;flex-direction:row;align-items:center;gap:var(--ngx-app-bar-condensed-gap, .5rem)}:host header.condensed mat-icon{color:var(--mat-sys-outline)}:host header .title,:host header .subtitle{margin:0;white-space:nowrap}:host 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))}:host 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))}:host .actions{display:flex;justify-content:flex-end;flex-grow:1;gap:var(--ngx-app-bar-actions-gap, .5rem)}\n"] }]
|
|
194
|
+
}], 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 }] }], withBackButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "withBackButton", required: false }] }], goBack: [{ type: i0.Output, args: ["goBack"] }] } });
|
|
169
195
|
|
|
170
|
-
class
|
|
171
|
-
|
|
172
|
-
static
|
|
196
|
+
class NgxColumnComponent {
|
|
197
|
+
contentPadding = input(undefined, ...(ngDevMode ? [{ debugName: "contentPadding" }] : []));
|
|
198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
199
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgxColumnComponent, isStandalone: true, selector: "ngx-column", inputs: { contentPadding: { classPropertyName: "contentPadding", publicName: "contentPadding", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-content select=\"ngx-column-bar\"></ng-content>\n<section class=\"content\" [class.no-padding]=\"contentPadding() === 'none'\">\n <ng-content></ng-content>\n</section>\n", styles: [":host{flex:1;display:flex;flex-direction:column;box-sizing:border-box;block-size:100%;min-width:min-content;position:relative;overflow:visible}:host .content{overflow:auto;display:flex;flex-direction:column;gap:var(--ngx-column-content-gap, .5rem);padding:var(--ngx-column-content-padding, .25rem .5rem);flex:1}:host .content.no-padding{padding:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
173
200
|
}
|
|
174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxColumnComponent, decorators: [{
|
|
175
202
|
type: Component,
|
|
176
|
-
args: [{ selector: 'ngx-
|
|
177
|
-
}] });
|
|
203
|
+
args: [{ selector: 'ngx-column', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"ngx-column-bar\"></ng-content>\n<section class=\"content\" [class.no-padding]=\"contentPadding() === 'none'\">\n <ng-content></ng-content>\n</section>\n", styles: [":host{flex:1;display:flex;flex-direction:column;box-sizing:border-box;block-size:100%;min-width:min-content;position:relative;overflow:visible}:host .content{overflow:auto;display:flex;flex-direction:column;gap:var(--ngx-column-content-gap, .5rem);padding:var(--ngx-column-content-padding, .25rem .5rem);flex:1}:host .content.no-padding{padding:0}\n"] }]
|
|
204
|
+
}], propDecorators: { contentPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentPadding", required: false }] }] } });
|
|
178
205
|
|
|
179
|
-
class
|
|
180
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.
|
|
181
|
-
static
|
|
206
|
+
class NgxBarTitleDirective {
|
|
207
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxBarTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
208
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: NgxBarTitleDirective, isStandalone: true, selector: "h2[ngxBarTitle], h3[ngxBarTitle], h4[ngxBarTitle], h5[ngxBarTitle], h6[ngxBarTitle]", ngImport: i0 });
|
|
182
209
|
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
184
|
-
type:
|
|
185
|
-
args: [{
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxBarTitleDirective, decorators: [{
|
|
211
|
+
type: Directive,
|
|
212
|
+
args: [{
|
|
213
|
+
selector: 'h2[ngxBarTitle], h3[ngxBarTitle], h4[ngxBarTitle], h5[ngxBarTitle], h6[ngxBarTitle]',
|
|
214
|
+
standalone: true
|
|
215
|
+
}]
|
|
186
216
|
}] });
|
|
187
217
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
218
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
219
|
+
const FILTER_TOKEN = new InjectionToken('FILTER_TOKEN');
|
|
220
|
+
|
|
221
|
+
class NgxFilterDirective {
|
|
222
|
+
type = 'complex';
|
|
223
|
+
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
224
|
+
active = input.required(...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
225
|
+
selectedFilterLabel = input('', ...(ngDevMode ? [{ debugName: "selectedFilterLabel" }] : []));
|
|
226
|
+
templateRef = inject(TemplateRef);
|
|
227
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxFilterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
228
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.6", type: NgxFilterDirective, isStandalone: true, selector: "ng-template[ngxFilter]", 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 });
|
|
193
229
|
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxFilterDirective, decorators: [{
|
|
231
|
+
type: Directive,
|
|
232
|
+
args: [{
|
|
233
|
+
selector: 'ng-template[ngxFilter]',
|
|
234
|
+
standalone: true,
|
|
235
|
+
providers: [{ provide: FILTER_TOKEN, useExisting: forwardRef(() => NgxFilterDirective) }]
|
|
236
|
+
}]
|
|
237
|
+
}], 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 }] }] } });
|
|
238
|
+
|
|
239
|
+
class NgxFilterToggleDirective {
|
|
240
|
+
type = 'toggle';
|
|
241
|
+
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
242
|
+
active = model.required(...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
243
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxFilterToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
244
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.6", type: NgxFilterToggleDirective, isStandalone: true, selector: "ng-template[ngxFilterToggle]", 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 });
|
|
245
|
+
}
|
|
246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxFilterToggleDirective, decorators: [{
|
|
247
|
+
type: Directive,
|
|
248
|
+
args: [{
|
|
249
|
+
selector: 'ng-template[ngxFilterToggle]',
|
|
250
|
+
standalone: true,
|
|
251
|
+
providers: [{ provide: FILTER_TOKEN, useExisting: forwardRef(() => NgxFilterToggleDirective) }]
|
|
252
|
+
}]
|
|
253
|
+
}], 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"] }] } });
|
|
254
|
+
|
|
255
|
+
const resizeSignal = (element, box = 'border-box') => {
|
|
256
|
+
const value = signal(undefined, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
257
|
+
effect(onCleanup => {
|
|
258
|
+
const el = element()?.nativeElement;
|
|
259
|
+
if (!el) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
const initialValue = {
|
|
263
|
+
borderBoxSize: [],
|
|
264
|
+
contentRect: new DOMRect(),
|
|
265
|
+
contentBoxSize: [],
|
|
266
|
+
devicePixelContentBoxSize: [],
|
|
267
|
+
target: el
|
|
268
|
+
};
|
|
269
|
+
value.set(initialValue);
|
|
270
|
+
const ro = new ResizeObserver(entries => {
|
|
271
|
+
value.set(entries[0] || initialValue);
|
|
272
|
+
});
|
|
273
|
+
ro.observe(el, { box });
|
|
274
|
+
onCleanup(() => {
|
|
275
|
+
ro.disconnect();
|
|
276
|
+
});
|
|
277
|
+
});
|
|
278
|
+
return value;
|
|
279
|
+
};
|
|
280
|
+
class NgxFiltersGroupComponent {
|
|
281
|
+
resetFilters = output();
|
|
282
|
+
folded = input(...(ngDevMode ? [undefined, { debugName: "folded" }] : []));
|
|
283
|
+
intl = inject(NgxLayoutIntl, { optional: true });
|
|
284
|
+
// #region Overlay
|
|
285
|
+
overlayOrigin = signal(undefined, ...(ngDevMode ? [{ debugName: "overlayOrigin" }] : []));
|
|
286
|
+
overlayContent = signal(undefined, ...(ngDevMode ? [{ debugName: "overlayContent" }] : []));
|
|
287
|
+
overlayOpen = signal(false, ...(ngDevMode ? [{ debugName: "overlayOpen" }] : []));
|
|
288
|
+
moreFiltersOverlay = signal(false, ...(ngDevMode ? [{ debugName: "moreFiltersOverlay" }] : []));
|
|
289
|
+
overlayPositions = [{
|
|
290
|
+
originX: 'center',
|
|
291
|
+
originY: 'bottom',
|
|
292
|
+
overlayX: 'center',
|
|
293
|
+
overlayY: 'top',
|
|
294
|
+
offsetY: 16
|
|
295
|
+
}, {
|
|
296
|
+
originX: 'end',
|
|
297
|
+
originY: 'bottom',
|
|
298
|
+
overlayX: 'end',
|
|
299
|
+
overlayY: 'top',
|
|
300
|
+
offsetY: 16
|
|
301
|
+
}];
|
|
302
|
+
// #endregion
|
|
303
|
+
// #region Filters
|
|
304
|
+
allFilters = contentChildren(FILTER_TOKEN, ...(ngDevMode ? [{ debugName: "allFilters" }] : []));
|
|
305
|
+
activeFiltersAmount = computed(() => this.invisibleFilters().filter(filter => filter.active()).length, ...(ngDevMode ? [{ debugName: "activeFiltersAmount" }] : []));
|
|
306
|
+
visibleFilters = computed(() => {
|
|
307
|
+
const lastFittingIndex = this.lastFittingIndex();
|
|
308
|
+
if (lastFittingIndex < 0) {
|
|
309
|
+
return [];
|
|
310
|
+
}
|
|
311
|
+
return this.allFilters().slice(0, lastFittingIndex);
|
|
312
|
+
}, ...(ngDevMode ? [{ debugName: "visibleFilters" }] : []));
|
|
313
|
+
invisibleFilters = computed(() => {
|
|
314
|
+
const lastFittingIndex = this.lastFittingIndex();
|
|
315
|
+
if (lastFittingIndex < 0) {
|
|
316
|
+
return this.allFilters();
|
|
317
|
+
}
|
|
318
|
+
return this.allFilters().slice(lastFittingIndex);
|
|
319
|
+
}, ...(ngDevMode ? [{ debugName: "invisibleFilters" }] : []));
|
|
320
|
+
filterContainerRef = viewChild.required('container');
|
|
321
|
+
filterContainerPadding = computed(() => Number.parseFloat(globalThis.getComputedStyle(this.filterContainerRef().nativeElement).paddingInline), ...(ngDevMode ? [{ debugName: "filterContainerPadding" }] : []));
|
|
322
|
+
// #endregion
|
|
323
|
+
// #region Host
|
|
324
|
+
hostElement = inject(ElementRef);
|
|
325
|
+
hostSize = resizeSignal(() => this.hostElement);
|
|
326
|
+
hostWidth = computed(() => Math.ceil(this.hostSize()?.contentRect.width || 0), ...(ngDevMode ? [{ debugName: "hostWidth" }] : []));
|
|
327
|
+
// #endregion
|
|
328
|
+
// #region MeasureRow
|
|
329
|
+
measureRowRef = viewChild('measureRow', ...(ngDevMode ? [{ debugName: "measureRowRef" }] : []));
|
|
330
|
+
measureRowSize = resizeSignal(() => this.measureRowRef());
|
|
331
|
+
measureRowWidth = computed(() => Math.ceil(this.measureRowSize()?.contentRect.width || 0), ...(ngDevMode ? [{ debugName: "measureRowWidth" }] : []));
|
|
332
|
+
// #endregion
|
|
333
|
+
// #region StaticFields
|
|
334
|
+
staticFieldsRef = viewChild('static', ...(ngDevMode ? [{ debugName: "staticFieldsRef" }] : []));
|
|
335
|
+
staticFieldsSize = resizeSignal(() => this.staticFieldsRef());
|
|
336
|
+
staticFieldsWidth = computed(() => Math.ceil(this.staticFieldsSize()?.contentRect.width || 0), ...(ngDevMode ? [{ debugName: "staticFieldsWidth" }] : []));
|
|
337
|
+
// #endregion
|
|
338
|
+
lastFittingIndex = computed(() => {
|
|
339
|
+
const hostWidth = this.hostWidth();
|
|
340
|
+
if (!hostWidth) {
|
|
341
|
+
return -1;
|
|
342
|
+
}
|
|
343
|
+
const availableSpace = hostWidth - (this.staticFieldsWidth() + (2 * this.filterContainerPadding()));
|
|
344
|
+
const filters = Array.from(this.measureRowRef()?.nativeElement.querySelectorAll('mat-chip-option') ?? []);
|
|
345
|
+
if (availableSpace - this.measureRowWidth() >= 0) {
|
|
346
|
+
return filters.length;
|
|
347
|
+
}
|
|
348
|
+
return this.getLastFittingIndex(availableSpace, filters);
|
|
349
|
+
}, ...(ngDevMode ? [{ debugName: "lastFittingIndex" }] : []));
|
|
350
|
+
emitResetClicked() {
|
|
351
|
+
this.resetFilters.emit();
|
|
352
|
+
}
|
|
353
|
+
getLastFittingIndex(availableSpace, elements) {
|
|
354
|
+
const firstEl = elements[0];
|
|
355
|
+
if (!firstEl || availableSpace <= 0 || availableSpace - firstEl.offsetWidth < 0) {
|
|
356
|
+
return -1;
|
|
357
|
+
}
|
|
358
|
+
let residualAvailableSpace = availableSpace;
|
|
359
|
+
const lastFittingIndex = elements.findIndex(el => {
|
|
360
|
+
residualAvailableSpace -= el.offsetWidth + 16;
|
|
361
|
+
return residualAvailableSpace <= 0;
|
|
362
|
+
});
|
|
363
|
+
return lastFittingIndex >= 0 ? lastFittingIndex : elements.length - 1;
|
|
364
|
+
}
|
|
365
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxFiltersGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
366
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", 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 @if (this.visibleFilters().length) {\n <mat-chip-set>\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 </mat-chip-set>\n }\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 [cdkConnectedOverlayViewportMargin]=\"32\">\n <div class=\"filters-group--overlay--container\">\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 </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-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:only-child mat-chip-set mat-chip{--mat-chip-container-shape-radius: var(--ngx-filters-group-first-chip-option-shape-radius, 1rem .5rem .5rem 1rem)}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)}.filters-group--overlay--container{display:flex;flex-direction:column;background-color:var(--mat-sys-surface-container-high);border-radius:var(--ngx-filters-group-overlay-radius, .5rem);overflow:hidden}.filters-group--overlay--container mat-slide-toggle>*{width:100%;justify-content:space-between}.filters-group--overlay--container mat-slide-toggle>* label{margin:0}.filters-group--overlay--container .filters--title{font:var(--mat-sys-title-medium);letter-spacing:var(--mat-sys-title-medium-tracking);color:var(--mat-sys-on-surface-variant);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(--ngx-filters-group-overlay-title-padding-inline, 1rem);padding-block:calc(var(--ngx-filters-group-overlay-title-padding-block, 1rem) / 4)}.filters-group--overlay--container .filters--content{min-width:18.75rem;overflow:auto;display:flex;flex-direction:column;justify-items:stretch;gap:var(--ngx-filters-group-overlay-content-gap, .5rem);padding:var(--ngx-filters-group-overlay-filter-padding, 1rem)}.filters-group--overlay--container .filters--content .filter{display:flex;flex-direction:column;gap:var(--ngx-filters-group-overlay-content-filter-gap, .5rem);padding-block:var(--ngx-filters-group-overlay-filter-padding, 1rem)}.filters-group--overlay--container .filters--content .filter:not(:last-child){border-bottom:1px dashed var(--mat-sys-outline-variant)}.filters-group--overlay--container .filters--content .filter:last-child{padding-block-end:unset}.filters-group--overlay--container .filters--content .filter:first-child{padding-block-start:unset}.filters-group--overlay--container .filters--content .filter .title{display:inline-flex;justify-content:space-between;align-items:baseline}.filters-group--overlay--container .filters--content .filter .title .label{font:var(--mat-sys-label-large)}.filters-group--overlay--container .filters--content .filter .title .value{font:var(--mat-sys-label-medium);max-width:var(--ngx-filters-group-overlay-title-max-width, 27ch);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filters-group--overlay--container .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: "component", type: 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: MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: MatChipTrailingIcon, selector: "mat-chip-trailing-icon, [matChipTrailingIcon]" }, { kind: "component", type: MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { 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: "component", type: 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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: 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 });
|
|
367
|
+
}
|
|
368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxFiltersGroupComponent, decorators: [{
|
|
195
369
|
type: Component,
|
|
196
|
-
args: [{ selector: 'ngx-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
370
|
+
args: [{ selector: 'ngx-filters-group', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
|
|
371
|
+
MatIcon,
|
|
372
|
+
MatIconButton,
|
|
373
|
+
MatChip,
|
|
374
|
+
MatChipOption,
|
|
375
|
+
MatChipTrailingIcon,
|
|
376
|
+
MatChipSet,
|
|
377
|
+
MatTooltip,
|
|
378
|
+
NgTemplateOutlet,
|
|
379
|
+
CdkConnectedOverlay,
|
|
380
|
+
CdkOverlayOrigin,
|
|
381
|
+
MatSlideToggle,
|
|
382
|
+
FormsModule,
|
|
383
|
+
MatBadge,
|
|
384
|
+
LowerCasePipe
|
|
385
|
+
], 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 @if (this.visibleFilters().length) {\n <mat-chip-set>\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 </mat-chip-set>\n }\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 [cdkConnectedOverlayViewportMargin]=\"32\">\n <div class=\"filters-group--overlay--container\">\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 </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-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:only-child mat-chip-set mat-chip{--mat-chip-container-shape-radius: var(--ngx-filters-group-first-chip-option-shape-radius, 1rem .5rem .5rem 1rem)}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)}.filters-group--overlay--container{display:flex;flex-direction:column;background-color:var(--mat-sys-surface-container-high);border-radius:var(--ngx-filters-group-overlay-radius, .5rem);overflow:hidden}.filters-group--overlay--container mat-slide-toggle>*{width:100%;justify-content:space-between}.filters-group--overlay--container mat-slide-toggle>* label{margin:0}.filters-group--overlay--container .filters--title{font:var(--mat-sys-title-medium);letter-spacing:var(--mat-sys-title-medium-tracking);color:var(--mat-sys-on-surface-variant);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(--ngx-filters-group-overlay-title-padding-inline, 1rem);padding-block:calc(var(--ngx-filters-group-overlay-title-padding-block, 1rem) / 4)}.filters-group--overlay--container .filters--content{min-width:18.75rem;overflow:auto;display:flex;flex-direction:column;justify-items:stretch;gap:var(--ngx-filters-group-overlay-content-gap, .5rem);padding:var(--ngx-filters-group-overlay-filter-padding, 1rem)}.filters-group--overlay--container .filters--content .filter{display:flex;flex-direction:column;gap:var(--ngx-filters-group-overlay-content-filter-gap, .5rem);padding-block:var(--ngx-filters-group-overlay-filter-padding, 1rem)}.filters-group--overlay--container .filters--content .filter:not(:last-child){border-bottom:1px dashed var(--mat-sys-outline-variant)}.filters-group--overlay--container .filters--content .filter:last-child{padding-block-end:unset}.filters-group--overlay--container .filters--content .filter:first-child{padding-block-start:unset}.filters-group--overlay--container .filters--content .filter .title{display:inline-flex;justify-content:space-between;align-items:baseline}.filters-group--overlay--container .filters--content .filter .title .label{font:var(--mat-sys-label-large)}.filters-group--overlay--container .filters--content .filter .title .value{font:var(--mat-sys-label-medium);max-width:var(--ngx-filters-group-overlay-title-max-width, 27ch);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filters-group--overlay--container .filters--content .filter>[no-padding]{margin-inline:-1rem}.filter-group--overlay--backdrop--transparent{background-color:transparent}\n"] }]
|
|
386
|
+
}], 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 }] }] } });
|
|
203
387
|
|
|
204
388
|
class NgxSearchInputDirective {
|
|
205
389
|
blurred = signal(false, ...(ngDevMode ? [{ debugName: "blurred" }] : []));
|
|
@@ -216,13 +400,13 @@ class NgxSearchInputDirective {
|
|
|
216
400
|
reset() {
|
|
217
401
|
this.control.reset();
|
|
218
402
|
}
|
|
219
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.
|
|
220
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.
|
|
403
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxSearchInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
404
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: NgxSearchInputDirective, isStandalone: true, selector: "input[ngxSearchInput]", host: { listeners: { "blur": "blurred.set(true);", "focus": "blurred.set(false);" } }, ngImport: i0 });
|
|
221
405
|
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxSearchInputDirective, decorators: [{
|
|
223
407
|
type: Directive,
|
|
224
408
|
args: [{
|
|
225
|
-
selector: 'input[
|
|
409
|
+
selector: 'input[ngxSearchInput]',
|
|
226
410
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
227
411
|
host: {
|
|
228
412
|
'(blur)': 'blurred.set(true);',
|
|
@@ -268,7 +452,7 @@ class NgxSearchBarContainerComponent {
|
|
|
268
452
|
if (!searchInput) {
|
|
269
453
|
return;
|
|
270
454
|
}
|
|
271
|
-
if (!this.isFolded()) {
|
|
455
|
+
if (!this.isFolded() && this.folded()) {
|
|
272
456
|
searchInput.focus();
|
|
273
457
|
}
|
|
274
458
|
});
|
|
@@ -278,7 +462,7 @@ class NgxSearchBarContainerComponent {
|
|
|
278
462
|
const searchText = untracked(this.searchText);
|
|
279
463
|
const blurred = this.searchInput()?.blurred();
|
|
280
464
|
if (blurred && !searchText) {
|
|
281
|
-
this.
|
|
465
|
+
this.manualFoldingState.set(true);
|
|
282
466
|
}
|
|
283
467
|
}
|
|
284
468
|
});
|
|
@@ -294,17 +478,94 @@ class NgxSearchBarContainerComponent {
|
|
|
294
478
|
searchInput.reset();
|
|
295
479
|
searchInput.focus();
|
|
296
480
|
}
|
|
297
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.
|
|
298
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.
|
|
481
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxSearchBarContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
482
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", 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=\"[ngxSearchInput]\"></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:var(--ngx-search-bar-container-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-container-folded-padding, 0 .25rem);flex:0}ngx-search-bar-container>input[ngxSearchInput]{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[ngxSearchInput]::placeholder{color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container mat-icon.icon-search-bar{padding:var(--ngx-search-bar-container-icon-padding, .5rem);color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container [ngxSearchInput]{flex:1;background:none;border:none}ngx-search-bar-container [ngxSearchInput]:focus{outline:none}\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
299
483
|
}
|
|
300
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxSearchBarContainerComponent, decorators: [{
|
|
301
485
|
type: Component,
|
|
302
|
-
args: [{ selector: 'ngx-search-bar-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
486
|
+
args: [{ selector: 'ngx-search-bar-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIcon, MatIconButton, MatTooltip], 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=\"[ngxSearchInput]\"></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:var(--ngx-search-bar-container-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-container-folded-padding, 0 .25rem);flex:0}ngx-search-bar-container>input[ngxSearchInput]{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[ngxSearchInput]::placeholder{color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container mat-icon.icon-search-bar{padding:var(--ngx-search-bar-container-icon-padding, .5rem);color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container [ngxSearchInput]{flex:1;background:none;border:none}ngx-search-bar-container [ngxSearchInput]:focus{outline:none}\n"] }]
|
|
303
487
|
}], ctorParameters: () => [], propDecorators: { folded: [{ type: i0.Input, args: [{ isSignal: true, alias: "folded", required: false }] }], searchInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgxSearchInputDirective), { isSignal: true }] }] } });
|
|
304
488
|
|
|
489
|
+
class NgxColumnBarComponent {
|
|
490
|
+
hasRightContent = computed(() => this.filtersGroup() ?? this.searchBarContainer(), ...(ngDevMode ? [{ debugName: "hasRightContent" }] : []));
|
|
491
|
+
hasTitle = computed(() => !!this.barTitle(), ...(ngDevMode ? [{ debugName: "hasTitle" }] : []));
|
|
492
|
+
filtersGroup = contentChild(NgxFiltersGroupComponent, ...(ngDevMode ? [{ debugName: "filtersGroup" }] : []));
|
|
493
|
+
searchBarContainer = contentChild(NgxSearchBarContainerComponent, ...(ngDevMode ? [{ debugName: "searchBarContainer" }] : []));
|
|
494
|
+
barTitle = contentChild(NgxBarTitleDirective, ...(ngDevMode ? [{ debugName: "barTitle" }] : []));
|
|
495
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxColumnBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
496
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: NgxColumnBarComponent, isStandalone: true, selector: "ngx-column-bar", queries: [{ propertyName: "filtersGroup", first: true, predicate: NgxFiltersGroupComponent, descendants: true, isSignal: true }, { propertyName: "searchBarContainer", first: true, predicate: NgxSearchBarContainerComponent, descendants: true, isSignal: true }, { propertyName: "barTitle", first: true, predicate: NgxBarTitleDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (hasTitle()) {\n <ng-content select=\"[ngxBarTitle]\"></ng-content>\n <ng-container [ngTemplateOutlet]=\"contentLeft\"></ng-container>\n} @else {\n <ng-container [ngTemplateOutlet]=\"actionsGroup\"></ng-container>\n}\n\n@if (hasRightContent()) {\n <div class=\"right\">\n @if (hasTitle()) {\n <ng-container [ngTemplateOutlet]=\"actionsGroup\"></ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"contentLeft\"></ng-container>\n }\n <ng-content select=\"ngx-filters-group\"></ng-content>\n <ng-content select=\"ngx-search-bar-container\"></ng-content>\n <ng-content select=\"[ngxContentRight]\"></ng-content>\n </div>\n}\n\n<ng-template #actionsGroup>\n <ng-content select=\"ngx-actions-group\"></ng-content>\n</ng-template>\n\n<ng-template #contentLeft>\n <ng-content select=\"[ngxContentLeft]\"></ng-content>\n</ng-template>\n", styles: ["ngx-column-bar{display:flex;align-items:center;min-height:var(--ngx-column-bar-min-height, 3rem);padding:var(--ngx-column-bar-padding, .25rem 0);gap:var(--ngx-column-bar-gap, .75rem)}ngx-column-bar h1,ngx-column-bar h2,ngx-column-bar h3,ngx-column-bar h4,ngx-column-bar h5,ngx-column-bar h6{white-space:nowrap;margin:0;font:var(--mat-sys-title-medium);letter-spacing:var(--mat-sys-title-medium-tracking);color:var(--mat-sys-on-surface-variant);overflow:hidden;min-width:var(--ngx-column-bar-title-min-width, 6ch);text-overflow:ellipsis}ngx-column-bar h1:first-child,ngx-column-bar h2:first-child,ngx-column-bar h3:first-child,ngx-column-bar h4:first-child,ngx-column-bar h5:first-child,ngx-column-bar h6:first-child{margin-inline-start:var(--ngx-column-bar-title-margin-inline-start, .5rem)}ngx-column-bar:has(h1,h2,h3,h4,h5,h6) .right:has(ngx-actions-group) ngx-filters-group{flex:none}ngx-column-bar:has(h1,h2,h3,h4,h5,h6) ngx-actions-group{justify-content:flex-end}ngx-column-bar .right,ngx-column-bar ngx-actions-group{display:flex;align-items:center;gap:var(--ngx-column-bar-elements-gap, .75rem)}ngx-column-bar .right{flex:1;justify-content:flex-end}ngx-column-bar ngx-actions-group{flex:1;min-inline-size:var(--ngx-column-bar-actions-group-min-inline-size, 3rem)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
497
|
+
}
|
|
498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxColumnBarComponent, decorators: [{
|
|
499
|
+
type: Component,
|
|
500
|
+
args: [{ selector: 'ngx-column-bar', imports: [NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (hasTitle()) {\n <ng-content select=\"[ngxBarTitle]\"></ng-content>\n <ng-container [ngTemplateOutlet]=\"contentLeft\"></ng-container>\n} @else {\n <ng-container [ngTemplateOutlet]=\"actionsGroup\"></ng-container>\n}\n\n@if (hasRightContent()) {\n <div class=\"right\">\n @if (hasTitle()) {\n <ng-container [ngTemplateOutlet]=\"actionsGroup\"></ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"contentLeft\"></ng-container>\n }\n <ng-content select=\"ngx-filters-group\"></ng-content>\n <ng-content select=\"ngx-search-bar-container\"></ng-content>\n <ng-content select=\"[ngxContentRight]\"></ng-content>\n </div>\n}\n\n<ng-template #actionsGroup>\n <ng-content select=\"ngx-actions-group\"></ng-content>\n</ng-template>\n\n<ng-template #contentLeft>\n <ng-content select=\"[ngxContentLeft]\"></ng-content>\n</ng-template>\n", styles: ["ngx-column-bar{display:flex;align-items:center;min-height:var(--ngx-column-bar-min-height, 3rem);padding:var(--ngx-column-bar-padding, .25rem 0);gap:var(--ngx-column-bar-gap, .75rem)}ngx-column-bar h1,ngx-column-bar h2,ngx-column-bar h3,ngx-column-bar h4,ngx-column-bar h5,ngx-column-bar h6{white-space:nowrap;margin:0;font:var(--mat-sys-title-medium);letter-spacing:var(--mat-sys-title-medium-tracking);color:var(--mat-sys-on-surface-variant);overflow:hidden;min-width:var(--ngx-column-bar-title-min-width, 6ch);text-overflow:ellipsis}ngx-column-bar h1:first-child,ngx-column-bar h2:first-child,ngx-column-bar h3:first-child,ngx-column-bar h4:first-child,ngx-column-bar h5:first-child,ngx-column-bar h6:first-child{margin-inline-start:var(--ngx-column-bar-title-margin-inline-start, .5rem)}ngx-column-bar:has(h1,h2,h3,h4,h5,h6) .right:has(ngx-actions-group) ngx-filters-group{flex:none}ngx-column-bar:has(h1,h2,h3,h4,h5,h6) ngx-actions-group{justify-content:flex-end}ngx-column-bar .right,ngx-column-bar ngx-actions-group{display:flex;align-items:center;gap:var(--ngx-column-bar-elements-gap, .75rem)}ngx-column-bar .right{flex:1;justify-content:flex-end}ngx-column-bar ngx-actions-group{flex:1;min-inline-size:var(--ngx-column-bar-actions-group-min-inline-size, 3rem)}\n"] }]
|
|
501
|
+
}], propDecorators: { filtersGroup: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgxFiltersGroupComponent), { isSignal: true }] }], searchBarContainer: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgxSearchBarContainerComponent), { isSignal: true }] }], barTitle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgxBarTitleDirective), { isSignal: true }] }] } });
|
|
502
|
+
|
|
503
|
+
class NgxLayoutComponent {
|
|
504
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
505
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.6", 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<div class=\"extra-content\">\n <ng-content></ng-content>\n</div>\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;font:var(--mat-sys-body-medium);letter-spacing:var(--mat-sys-body-medium-tracking);background-color:var(--mat-sys-surface-container);box-sizing:border-box}:host .extra-content{padding:var(--ngx-layout-extra-content-padding, .25rem 1rem)}:host .extra-content:empty{display:none}:host .content{display:flex;flex:1 1 0;overflow:hidden;gap:var(--ngx-layout-content-gap, .5rem);padding:var(--ngx-layout-content-padding, .25rem 1rem 1rem)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
506
|
+
}
|
|
507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxLayoutComponent, decorators: [{
|
|
508
|
+
type: Component,
|
|
509
|
+
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<div class=\"extra-content\">\n <ng-content></ng-content>\n</div>\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;font:var(--mat-sys-body-medium);letter-spacing:var(--mat-sys-body-medium-tracking);background-color:var(--mat-sys-surface-container);box-sizing:border-box}:host .extra-content{padding:var(--ngx-layout-extra-content-padding, .25rem 1rem)}:host .extra-content:empty{display:none}:host .content{display:flex;flex:1 1 0;overflow:hidden;gap:var(--ngx-layout-content-gap, .5rem);padding:var(--ngx-layout-content-padding, .25rem 1rem 1rem)}\n"] }]
|
|
510
|
+
}] });
|
|
511
|
+
|
|
512
|
+
class NgxMainBarComponent {
|
|
513
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxMainBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
514
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.6", type: NgxMainBarComponent, isStandalone: true, selector: "ngx-main-bar", ngImport: i0, template: "<ng-content select=\"ngx-actions-group\"></ng-content>\n<ng-content select=\"[ngxContentLeft]\"></ng-content>\n<div class=\"right\">\n <ng-content select=\"ngx-filters-group\"></ng-content>\n <ng-content select=\"ngx-search-bar-container\"></ng-content>\n <ng-content select=\"[ngxContentRight]\"></ng-content>\n</div>\n", styles: [":host{display:flex;align-items:center;padding:var(--ngx-main-bar-padding, .25rem 1rem);gap:var(--ngx-main-bar-gap, .75rem)}:host .right{flex:1;display:flex;justify-content:flex-end;gap:var(--ngx-main-bar-right-gap, .75rem)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
515
|
+
}
|
|
516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxMainBarComponent, decorators: [{
|
|
517
|
+
type: Component,
|
|
518
|
+
args: [{ selector: 'ngx-main-bar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"ngx-actions-group\"></ng-content>\n<ng-content select=\"[ngxContentLeft]\"></ng-content>\n<div class=\"right\">\n <ng-content select=\"ngx-filters-group\"></ng-content>\n <ng-content select=\"ngx-search-bar-container\"></ng-content>\n <ng-content select=\"[ngxContentRight]\"></ng-content>\n</div>\n", styles: [":host{display:flex;align-items:center;padding:var(--ngx-main-bar-padding, .25rem 1rem);gap:var(--ngx-main-bar-gap, .75rem)}:host .right{flex:1;display:flex;justify-content:flex-end;gap:var(--ngx-main-bar-right-gap, .75rem)}\n"] }]
|
|
519
|
+
}] });
|
|
520
|
+
|
|
521
|
+
class NgxPanelComponent {
|
|
522
|
+
appearance = input(undefined, ...(ngDevMode ? [{ debugName: "appearance" }] : []));
|
|
523
|
+
contentPadding = input(undefined, ...(ngDevMode ? [{ debugName: "contentPadding" }] : []));
|
|
524
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
525
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgxPanelComponent, isStandalone: true, selector: "ngx-panel", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, contentPadding: { classPropertyName: "contentPadding", publicName: "contentPadding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.appearance": "this.appearance()" } }, ngImport: i0, template: "<ng-content select=\"ngx-panel-bar\"></ng-content>\n<section class=\"content\" [class.no-padding]=\"contentPadding() === 'none'\">\n <ng-content></ng-content>\n</section>\n", styles: ["ngx-panel{flex:1;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;block-size:100%;border-radius:var(--ngx-panel-radius, 2rem);padding:var(--ngx-panel-padding, .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);padding:var(--ngx-panel-content-padding, .25rem .75rem);flex:1}ngx-panel .content:has(>ngx-column){padding:0;flex-direction:row;gap:var(--ngx-panel-content-column-gap, 1rem)}ngx-panel .content:has(>ngx-column) ngx-column+ngx-column:before{position:absolute;content:\"\";display:block;width:var(--ngx-panel-content-column-divider-width, 1px);background-color:var(--mat-sys-outline-variant);inset-block:0;inset-inline-start:var(--ngx-panel-content-divider-inset-inline-start, -8.5px)}ngx-panel .content:has(>ngx-column) ngx-column:first-child{margin-inline-start:var(--ngx-panel-first-column-margin-inline-start, .25rem)}ngx-panel .content:has(>ngx-column) ngx-column:last-child{margin-inline-end:var(--ngx-panel-last-column-margin-inline-end, .25rem)}ngx-panel .content.no-padding{padding:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
526
|
+
}
|
|
527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxPanelComponent, decorators: [{
|
|
528
|
+
type: Component,
|
|
529
|
+
args: [{ selector: 'ngx-panel', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
530
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
531
|
+
'[attr.appearance]': 'this.appearance()'
|
|
532
|
+
}, template: "<ng-content select=\"ngx-panel-bar\"></ng-content>\n<section class=\"content\" [class.no-padding]=\"contentPadding() === 'none'\">\n <ng-content></ng-content>\n</section>\n", styles: ["ngx-panel{flex:1;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;block-size:100%;border-radius:var(--ngx-panel-radius, 2rem);padding:var(--ngx-panel-padding, .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);padding:var(--ngx-panel-content-padding, .25rem .75rem);flex:1}ngx-panel .content:has(>ngx-column){padding:0;flex-direction:row;gap:var(--ngx-panel-content-column-gap, 1rem)}ngx-panel .content:has(>ngx-column) ngx-column+ngx-column:before{position:absolute;content:\"\";display:block;width:var(--ngx-panel-content-column-divider-width, 1px);background-color:var(--mat-sys-outline-variant);inset-block:0;inset-inline-start:var(--ngx-panel-content-divider-inset-inline-start, -8.5px)}ngx-panel .content:has(>ngx-column) ngx-column:first-child{margin-inline-start:var(--ngx-panel-first-column-margin-inline-start, .25rem)}ngx-panel .content:has(>ngx-column) ngx-column:last-child{margin-inline-end:var(--ngx-panel-last-column-margin-inline-end, .25rem)}ngx-panel .content.no-padding{padding:0}\n"] }]
|
|
533
|
+
}], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], contentPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentPadding", required: false }] }] } });
|
|
534
|
+
|
|
535
|
+
class NgxPanelBarComponent {
|
|
536
|
+
// inputs
|
|
537
|
+
hasBackButton = input(...(ngDevMode ? [undefined, { debugName: "hasBackButton" }] : []));
|
|
538
|
+
closable = input(...(ngDevMode ? [undefined, { debugName: "closable" }] : []));
|
|
539
|
+
// output
|
|
540
|
+
backClicked = output();
|
|
541
|
+
closeClicked = output();
|
|
542
|
+
intl = inject(NgxLayoutIntl, { optional: true });
|
|
543
|
+
hasRightContent = computed(() => !!(this.searchBarContainer()
|
|
544
|
+
?? this.filtersGroup()
|
|
545
|
+
?? this.closable()
|
|
546
|
+
?? (!this.hasTitle() && this.actionsGroup())), ...(ngDevMode ? [{ debugName: "hasRightContent" }] : []));
|
|
547
|
+
hasTitle = computed(() => !!this.barTitle(), ...(ngDevMode ? [{ debugName: "hasTitle" }] : []));
|
|
548
|
+
actionsGroup = contentChild(NgxActionsGroupComponent, ...(ngDevMode ? [{ debugName: "actionsGroup" }] : []));
|
|
549
|
+
filtersGroup = contentChild(NgxFiltersGroupComponent, ...(ngDevMode ? [{ debugName: "filtersGroup" }] : []));
|
|
550
|
+
searchBarContainer = contentChild(NgxSearchBarContainerComponent, ...(ngDevMode ? [{ debugName: "searchBarContainer" }] : []));
|
|
551
|
+
barTitle = contentChild(NgxBarTitleDirective, ...(ngDevMode ? [{ debugName: "barTitle" }] : []));
|
|
552
|
+
emitBackClicked() {
|
|
553
|
+
this.backClicked.emit();
|
|
554
|
+
}
|
|
555
|
+
emitCloseClicked() {
|
|
556
|
+
this.closeClicked.emit();
|
|
557
|
+
}
|
|
558
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxPanelBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
559
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: NgxPanelBarComponent, isStandalone: true, selector: "ngx-panel-bar", inputs: { hasBackButton: { classPropertyName: "hasBackButton", publicName: "hasBackButton", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { backClicked: "backClicked", closeClicked: "closeClicked" }, queries: [{ propertyName: "actionsGroup", first: true, predicate: NgxActionsGroupComponent, descendants: true, isSignal: true }, { propertyName: "filtersGroup", first: true, predicate: NgxFiltersGroupComponent, descendants: true, isSignal: true }, { propertyName: "searchBarContainer", first: true, predicate: NgxSearchBarContainerComponent, descendants: true, isSignal: true }, { propertyName: "barTitle", first: true, predicate: NgxBarTitleDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (hasBackButton()) {\n <button\n mat-icon-button\n aria-label=\"Back button\"\n matTooltip=\"{{ intl?.back ?? 'Back' }}\"\n (click)=\"emitBackClicked()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n}\n\n@if (hasTitle()) {\n <ng-content select=\"[ngxBarTitle]\"></ng-content>\n <ng-container [ngTemplateOutlet]=\"contentLeft\"></ng-container>\n} @else {\n <ng-container [ngTemplateOutlet]=\"actionsGroup\"></ng-container>\n}\n\n@if (hasRightContent()) {\n <div class=\"right\">\n @if (hasTitle()) {\n <ng-container [ngTemplateOutlet]=\"actionsGroup\"></ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"contentLeft\"></ng-container>\n }\n <ng-content select=\"ngx-filters-group\"></ng-content>\n <ng-content select=\"ngx-search-bar-container\"></ng-content>\n <ng-content select=\"[ngxContentRight]\"></ng-content>\n @if (closable()) {\n <button\n mat-icon-button\n class=\"close-button\"\n aria-label=\"Close button\"\n matTooltip=\"{{ intl?.close ?? 'Close' }}\"\n (click)=\"emitCloseClicked()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </div>\n}\n\n<ng-template #actionsGroup>\n <ng-content select=\"ngx-actions-group\"></ng-content>\n</ng-template>\n\n<ng-template #contentLeft>\n <ng-content select=\"[ngxContentLeft]\"></ng-content>\n</ng-template>\n", styles: ["ngx-panel-bar{display:flex;align-items:center;padding:var(--ngx-panel-bar-padding, .25rem);gap:var(--ngx-panel-bar-gap, .75rem);min-height:var(--ngx-panel-bar-min-height, 3rem);flex-wrap:nowrap}ngx-panel-bar h1,ngx-panel-bar h2,ngx-panel-bar h3,ngx-panel-bar h4,ngx-panel-bar h5,ngx-panel-bar h6{white-space:nowrap;margin:0;font:var(--mat-sys-title-large);letter-spacing:var(--mat-sys-title-large-tracking);color:var(--mat-sys-on-surface-variant);overflow:hidden;min-width:var(--ngx-panel-bar-title-min-width, 6ch);text-overflow:ellipsis}ngx-panel-bar h1:first-child,ngx-panel-bar h2:first-child,ngx-panel-bar h3:first-child,ngx-panel-bar h4:first-child,ngx-panel-bar h5:first-child,ngx-panel-bar h6:first-child{padding-inline-start:var(--ngx-panel-bar-title-first-child-padding-start, .5rem)}ngx-panel-bar:has(h1,h2,h3,h4,h5,h6) .right:has(ngx-actions-group) ngx-filters-group{flex:none}ngx-panel-bar:has(h1,h2,h3,h4,h5,h6) ngx-actions-group{justify-content:flex-end}ngx-panel-bar .right,ngx-panel-bar ngx-actions-group{display:flex;align-items:center;gap:var(--ngx-panel-bar-elements-gap, .75rem)}ngx-panel-bar .right{flex:1;justify-content:flex-end}ngx-panel-bar ngx-actions-group{flex:1;min-inline-size:var(--ngx-panel-bar-actions-group-min-inline-size, 3rem)}\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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
560
|
+
}
|
|
561
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgxPanelBarComponent, decorators: [{
|
|
562
|
+
type: Component,
|
|
563
|
+
args: [{ selector: 'ngx-panel-bar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIcon, MatIconButton, MatTooltip, NgTemplateOutlet], template: "@if (hasBackButton()) {\n <button\n mat-icon-button\n aria-label=\"Back button\"\n matTooltip=\"{{ intl?.back ?? 'Back' }}\"\n (click)=\"emitBackClicked()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n}\n\n@if (hasTitle()) {\n <ng-content select=\"[ngxBarTitle]\"></ng-content>\n <ng-container [ngTemplateOutlet]=\"contentLeft\"></ng-container>\n} @else {\n <ng-container [ngTemplateOutlet]=\"actionsGroup\"></ng-container>\n}\n\n@if (hasRightContent()) {\n <div class=\"right\">\n @if (hasTitle()) {\n <ng-container [ngTemplateOutlet]=\"actionsGroup\"></ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"contentLeft\"></ng-container>\n }\n <ng-content select=\"ngx-filters-group\"></ng-content>\n <ng-content select=\"ngx-search-bar-container\"></ng-content>\n <ng-content select=\"[ngxContentRight]\"></ng-content>\n @if (closable()) {\n <button\n mat-icon-button\n class=\"close-button\"\n aria-label=\"Close button\"\n matTooltip=\"{{ intl?.close ?? 'Close' }}\"\n (click)=\"emitCloseClicked()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </div>\n}\n\n<ng-template #actionsGroup>\n <ng-content select=\"ngx-actions-group\"></ng-content>\n</ng-template>\n\n<ng-template #contentLeft>\n <ng-content select=\"[ngxContentLeft]\"></ng-content>\n</ng-template>\n", styles: ["ngx-panel-bar{display:flex;align-items:center;padding:var(--ngx-panel-bar-padding, .25rem);gap:var(--ngx-panel-bar-gap, .75rem);min-height:var(--ngx-panel-bar-min-height, 3rem);flex-wrap:nowrap}ngx-panel-bar h1,ngx-panel-bar h2,ngx-panel-bar h3,ngx-panel-bar h4,ngx-panel-bar h5,ngx-panel-bar h6{white-space:nowrap;margin:0;font:var(--mat-sys-title-large);letter-spacing:var(--mat-sys-title-large-tracking);color:var(--mat-sys-on-surface-variant);overflow:hidden;min-width:var(--ngx-panel-bar-title-min-width, 6ch);text-overflow:ellipsis}ngx-panel-bar h1:first-child,ngx-panel-bar h2:first-child,ngx-panel-bar h3:first-child,ngx-panel-bar h4:first-child,ngx-panel-bar h5:first-child,ngx-panel-bar h6:first-child{padding-inline-start:var(--ngx-panel-bar-title-first-child-padding-start, .5rem)}ngx-panel-bar:has(h1,h2,h3,h4,h5,h6) .right:has(ngx-actions-group) ngx-filters-group{flex:none}ngx-panel-bar:has(h1,h2,h3,h4,h5,h6) ngx-actions-group{justify-content:flex-end}ngx-panel-bar .right,ngx-panel-bar ngx-actions-group{display:flex;align-items:center;gap:var(--ngx-panel-bar-elements-gap, .75rem)}ngx-panel-bar .right{flex:1;justify-content:flex-end}ngx-panel-bar ngx-actions-group{flex:1;min-inline-size:var(--ngx-panel-bar-actions-group-min-inline-size, 3rem)}\n"] }]
|
|
564
|
+
}], propDecorators: { hasBackButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackButton", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], backClicked: [{ type: i0.Output, args: ["backClicked"] }], closeClicked: [{ type: i0.Output, args: ["closeClicked"] }], actionsGroup: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgxActionsGroupComponent), { isSignal: true }] }], filtersGroup: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgxFiltersGroupComponent), { isSignal: true }] }], searchBarContainer: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgxSearchBarContainerComponent), { isSignal: true }] }], barTitle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgxBarTitleDirective), { isSignal: true }] }] } });
|
|
565
|
+
|
|
305
566
|
/**
|
|
306
567
|
* Generated bundle index. Do not edit.
|
|
307
568
|
*/
|
|
308
569
|
|
|
309
|
-
export { NgxActionsGroupComponent, NgxAppBarComponent, NgxLayoutComponent, NgxLayoutIntl, NgxMainBarComponent, NgxPanelComponent, NgxSearchBarContainerComponent, NgxSearchInputDirective, provideNgxLayout
|
|
570
|
+
export { NgxActionDirective, NgxActionsGroupComponent, NgxAppBarComponent, NgxBarTitleDirective, NgxColumnBarComponent, NgxColumnComponent, NgxFilterDirective, NgxFilterToggleDirective, NgxFiltersGroupComponent, NgxLayoutComponent, NgxLayoutIntl, NgxMainBarComponent, NgxPanelBarComponent, NgxPanelComponent, NgxSearchBarContainerComponent, NgxSearchInputDirective, provideNgxLayout };
|
|
310
571
|
//# sourceMappingURL=hug-ngx-layout.mjs.map
|