@hug/ngx-layout 21.0.2 → 22.0.0-alpha.1

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.
@@ -1,22 +1,26 @@
1
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
- import { NgTemplateOutlet, AsyncPipe } from '@angular/common';
3
1
  import * as i0 from '@angular/core';
4
- import { Injectable, EventEmitter, inject, ElementRef, Input, ViewChild, ContentChild, Output, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
5
- import { MatIconButton } from '@angular/material/button';
6
- import { MatIcon } from '@angular/material/icon';
7
- import { MatDrawer, MatDrawerContainer, MatDrawerContent } from '@angular/material/sidenav';
8
- import { MatToolbar } from '@angular/material/toolbar';
9
- import { MatTooltip } from '@angular/material/tooltip';
10
- import { NgxAbstractIntl, provideNgxIntl, NgxMediaService } from '@hug/ngx-core';
11
- import { NgxSidenavService } from '@hug/ngx-sidenav';
2
+ import { Injectable, signal, computed, inject, contentChildren, ElementRef, viewChild, Renderer2, DestroyRef, effect, ChangeDetectionStrategy, ViewEncapsulation, Component, input, output, Directive, contentChild, afterRenderEffect, untracked } from '@angular/core';
3
+ import * as i2 from '@angular/material/button';
4
+ import { MatIconButton, MatButtonModule } from '@angular/material/button';
5
+ import * as i1$1 from '@angular/material/icon';
6
+ import { MatIcon, MatIconModule } from '@angular/material/icon';
7
+ import * as i1 from '@angular/material/menu';
8
+ import { MatMenuModule } from '@angular/material/menu';
9
+ import * as i3 from '@angular/material/tooltip';
10
+ import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
11
+ import { NgxAbstractIntl, provideNgxIntl } from '@hug/ngx-core';
12
+ import { toSignal } from '@angular/core/rxjs-interop';
13
+ import { NgControl } from '@angular/forms';
12
14
 
13
15
  /**
14
16
  * Data for internationalization
15
17
  */
16
18
  class NgxLayoutIntl extends NgxAbstractIntl {
17
- closeLabel = '';
18
- backLabel = '';
19
- sideFilterLabel = '';
19
+ help = '';
20
+ back = '';
21
+ deleteSearch = '';
22
+ openSearchBar = '';
23
+ moreActions = '';
20
24
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxLayoutIntl, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
21
25
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxLayoutIntl });
22
26
  }
@@ -32,153 +36,275 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
32
36
  */
33
37
  const provideNgxLayout = (options) => provideNgxIntl(NgxLayoutIntl, options?.translationsPath ?? 'translations/ngx-layout', options?.customIntl ?? NgxLayoutIntl);
34
38
 
35
- class NgxLayoutComponent {
36
- toolbarColor = 'primary';
37
- editorToolbarId = 'editor-toolbar';
38
- layoutToolbarExternal;
39
- layoutPrimaryActionExternal;
40
- layoutActionsExternal;
41
- layoutInfoBoxesExternal;
42
- layoutRightExternal;
43
- closeButtonClicked = new EventEmitter();
44
- backButtonClicked = new EventEmitter();
45
- sideFilterClosed = new EventEmitter();
46
- sideFilterOpened = new EventEmitter();
47
- layoutToolbarContent;
48
- layoutPrimaryActionContent;
49
- layoutActionsContent;
50
- layoutInfoBoxesContent;
51
- layoutRightContent;
52
- sideFilter;
39
+ const buttonGap = 12;
40
+ const buttonDimensions = 40;
41
+ /**
42
+ *
43
+ * @param element
44
+ * @param destroyRef
45
+ * @param box
46
+ * @param defaultSize
47
+ */
48
+ const resizeSignal = (element, destroyRef, box = 'border-box') => {
49
+ const initialValue = {
50
+ borderBoxSize: [],
51
+ contentRect: element.getBoundingClientRect(),
52
+ contentBoxSize: [],
53
+ devicePixelContentBoxSize: [],
54
+ target: element
55
+ };
56
+ const value = signal(initialValue, ...(ngDevMode ? [{ debugName: "value" }] : []));
57
+ const ro = new ResizeObserver(entries => {
58
+ value.set(entries[0] || initialValue);
59
+ });
60
+ ro.observe(element, { box });
61
+ destroyRef.onDestroy(() => {
62
+ ro.disconnect();
63
+ });
64
+ return value;
65
+ };
66
+ class NgxActionsGroupComponent {
67
+ hiddenActions = computed(() => {
68
+ const maxVisible = this.getMaxVisibleAction(this.hostWidth());
69
+ return this.iconButtons().slice(maxVisible);
70
+ }, ...(ngDevMode ? [{ debugName: "hiddenActions" }] : []));
53
71
  intl = inject(NgxLayoutIntl, { optional: true });
54
- mediaService = inject(NgxMediaService);
55
- sidenavService = inject(NgxSidenavService);
56
- elementRef = inject(ElementRef);
57
- get layoutToolbar() {
58
- return this.layoutToolbarExternal ?? this.layoutToolbarContent;
59
- }
60
- get layoutPrimaryAction() {
61
- return this.layoutPrimaryActionExternal ?? this.layoutPrimaryActionContent;
62
- }
63
- get layoutActions() {
64
- return this.layoutActionsExternal ?? this.layoutActionsContent;
65
- }
66
- get layoutInfoBoxes() {
67
- return this.layoutInfoBoxesExternal ?? this.layoutInfoBoxesContent;
72
+ iconButtons = contentChildren(MatIconButton, { ...(ngDevMode ? { debugName: "iconButtons" } : {}), read: ElementRef });
73
+ container = viewChild.required('container');
74
+ hiddenContainer = viewChild.required('hiddenContainer');
75
+ hostElement = inject(ElementRef);
76
+ renderer = inject(Renderer2);
77
+ destroyRef = inject(DestroyRef);
78
+ hostSize = resizeSignal(this.hostElement.nativeElement, this.destroyRef);
79
+ hostWidth = computed(() => this.hostSize().contentRect.width, ...(ngDevMode ? [{ debugName: "hostWidth" }] : []));
80
+ visibleActions = computed(() => {
81
+ const maxVisible = this.getMaxVisibleAction(this.hostWidth());
82
+ return this.iconButtons().slice(0, maxVisible);
83
+ }, ...(ngDevMode ? [{ debugName: "visibleActions" }] : []));
84
+ constructor() {
85
+ effect(() => {
86
+ const buttons = this.iconButtons();
87
+ if (buttons.length === 0) {
88
+ return;
89
+ }
90
+ const visibleButtons = this.visibleActions();
91
+ const containerEl = this.container();
92
+ visibleButtons.forEach(button => {
93
+ const element = button.nativeElement;
94
+ containerEl.nativeElement.appendChild(element);
95
+ });
96
+ const hiddenButtons = this.hiddenActions();
97
+ const hiddenContainerEl = this.hiddenContainer();
98
+ if (hiddenButtons.length > 0) {
99
+ hiddenButtons.forEach(button => {
100
+ const element = button.nativeElement;
101
+ const hasMenu = element.classList.contains('mat-mdc-menu-trigger');
102
+ if (hasMenu) {
103
+ this.renderer.listen(element, 'click', (event) => {
104
+ event.stopPropagation();
105
+ });
106
+ }
107
+ hiddenContainerEl.nativeElement.appendChild(element);
108
+ });
109
+ }
110
+ });
68
111
  }
69
- get layoutRight() {
70
- const value = this.layoutRightExternal ?? this.layoutRightContent;
71
- if (!value) {
72
- this.elementRef.nativeElement.setAttribute('no-right', 'true');
112
+ getMaxVisibleAction(width) {
113
+ const maxNumberOfActions = Math.floor(width / (buttonDimensions + buttonGap));
114
+ const maxVisibleActions = Math.max(1, maxNumberOfActions);
115
+ const totalButtons = this.iconButtons().length;
116
+ if (maxVisibleActions >= totalButtons) {
117
+ return totalButtons;
73
118
  }
74
- else {
75
- this.elementRef.nativeElement.removeAttribute('no-right');
76
- }
77
- return value;
78
- }
79
- _withSidenav = false;
80
- set withSidenav(value) {
81
- this._withSidenav = coerceBooleanProperty(value);
82
- }
83
- get withSidenav() {
84
- return this._withSidenav;
119
+ // -1 => Allows for the more button to be displayed
120
+ return maxVisibleActions - 1;
85
121
  }
86
- _keepFilterButtonDisplayed = true;
87
- set keepFilterButtonDisplayed(value) {
88
- this._keepFilterButtonDisplayed = coerceBooleanProperty(value);
122
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxActionsGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
123
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: NgxActionsGroupComponent, isStandalone: true, selector: "ngx-actions-group", queries: [{ propertyName: "iconButtons", predicate: MatIconButton, read: ElementRef, isSignal: true }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "hiddenContainer", first: true, predicate: ["hiddenContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #container class=\"container\">\n <ng-content></ng-content>\n @if (hiddenActions().length > 0) {\n <button\n matIconButton\n class=\"more-actions-button\"\n [matMenuTriggerFor]=\"menuActionsGroup\"\n matTooltip=\"{{ intl?.moreActions ?? 'More actions' }}\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n }\n <mat-menu #menuActionsGroup=\"matMenu\" class=\"actions-group-menu\">\n <div #hiddenContainer></div>\n </mat-menu>\n</div>\n", styles: ["ngx-actions-group{display:flex;inline-size:100%}ngx-actions-group .container{display:flex;inline-size:fit-content;align-items:center;gap:var(--ngx-actions-group-gap, .75rem);border-radius:var(--ngx-actions-group-radius, 2rem);padding:var(--ngx-actions-group-padding, .25rem);background-color:var(--mat-sys-surface-container-low);max-width:100%;box-sizing:border-box}ngx-actions-group .container .more-actions-button{order:999}.actions-group-menu.mat-mdc-menu-panel{padding:var(--ngx-actions-group-menu-padding, 0 .75rem)}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
124
+ }
125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxActionsGroupComponent, decorators: [{
126
+ type: Component,
127
+ args: [{ selector: 'ngx-actions-group', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
128
+ MatIcon,
129
+ MatIconButton,
130
+ MatTooltip,
131
+ MatMenuModule
132
+ ], template: "<div #container class=\"container\">\n <ng-content></ng-content>\n @if (hiddenActions().length > 0) {\n <button\n matIconButton\n class=\"more-actions-button\"\n [matMenuTriggerFor]=\"menuActionsGroup\"\n matTooltip=\"{{ intl?.moreActions ?? 'More actions' }}\">\n <mat-icon>more_horiz</mat-icon>\n </button>\n }\n <mat-menu #menuActionsGroup=\"matMenu\" class=\"actions-group-menu\">\n <div #hiddenContainer></div>\n </mat-menu>\n</div>\n", styles: ["ngx-actions-group{display:flex;inline-size:100%}ngx-actions-group .container{display:flex;inline-size:fit-content;align-items:center;gap:var(--ngx-actions-group-gap, .75rem);border-radius:var(--ngx-actions-group-radius, 2rem);padding:var(--ngx-actions-group-padding, .25rem);background-color:var(--mat-sys-surface-container-low);max-width:100%;box-sizing:border-box}ngx-actions-group .container .more-actions-button{order:999}.actions-group-menu.mat-mdc-menu-panel{padding:var(--ngx-actions-group-menu-padding, 0 .75rem)}\n"] }]
133
+ }], ctorParameters: () => [], propDecorators: { iconButtons: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MatIconButton), { ...{ read: ElementRef }, isSignal: true }] }], container: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], hiddenContainer: [{ type: i0.ViewChild, args: ['hiddenContainer', { isSignal: true }] }] } });
134
+
135
+ class NgxAppBarComponent {
136
+ mode = input('standard', ...(ngDevMode ? [{ debugName: "mode" }] : []));
137
+ title = input.required(...(ngDevMode ? [{ debugName: "title" }] : []));
138
+ subtitle = input(...(ngDevMode ? [undefined, { debugName: "subtitle" }] : []));
139
+ helpUrl = input(...(ngDevMode ? [undefined, { debugName: "helpUrl" }] : []));
140
+ withBackIcon = input(false, ...(ngDevMode ? [{ debugName: "withBackIcon" }] : []));
141
+ goBack = output();
142
+ intl = inject(NgxLayoutIntl, { optional: true });
143
+ helpPopup;
144
+ openHelp() {
145
+ const params = [
146
+ `height=${screen.height}`,
147
+ `width=${screen.width}`,
148
+ 'fullscreen=yes'
149
+ ].join(',');
150
+ if (this.helpPopup) {
151
+ this.helpPopup.close();
152
+ }
153
+ this.helpPopup = window.open(this.helpUrl(), 'help_popup', params) ?? undefined;
154
+ this.helpPopup?.moveTo(0, 0);
89
155
  }
90
- get keepFilterButtonDisplayed() {
91
- return this._keepFilterButtonDisplayed;
156
+ triggerGoBack() {
157
+ this.goBack.emit();
92
158
  }
93
- _withCloseButton = false;
94
- set withCloseButton(value) {
95
- this._withCloseButton = coerceBooleanProperty(value);
159
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxAppBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
160
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: NgxAppBarComponent, isStandalone: true, selector: "ngx-app-bar", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, helpUrl: { classPropertyName: "helpUrl", publicName: "helpUrl", isSignal: true, isRequired: false, transformFunction: null }, withBackIcon: { classPropertyName: "withBackIcon", publicName: "withBackIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { goBack: "goBack" }, host: { properties: { "class.condensed": "mode()===\"condensed\"" } }, ngImport: i0, template: "@if (withBackIcon()) {\n <button matIconButton matTooltip=\"{{ intl?.back ?? 'Back' }}\" (click)=\"triggerGoBack()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n}\n\n<header class=\"{{ mode() }}\">\n <h1 class=\"title\">{{ title() }}</h1>\n @if (subtitle()) {\n @if (mode() === 'condensed') {\n <mat-icon>chevron_right</mat-icon>\n }\n <h2 class=\"subtitle\">{{ subtitle() }}</h2>\n }\n</header>\n\n<section class=\"actions\">\n <ng-content />\n @if (helpUrl()) {\n <button matIconButton matTooltip=\"{{ intl?.help ?? 'Help' }}\" (click)=\"openHelp()\">\n <mat-icon>help</mat-icon>\n </button>\n }\n</section>\n", styles: ["ngx-app-bar{display:flex;flex-direction:row;align-items:center;min-height:var(--ngx-app-bar-min-height, 3.5rem);box-sizing:border-box;gap:var(--ngx-app-bar-gap, .25rem)}ngx-app-bar header{color:var(--mat-sys-on-surface-variant)}ngx-app-bar header.condensed{display:flex;flex-direction:row;align-items:center;gap:var(--ngx-app-bar-condensed-gap, .5rem)}ngx-app-bar header.condensed mat-icon{color:var(--mat-sys-outline)}ngx-app-bar header .title,ngx-app-bar header .subtitle{margin:0;white-space:nowrap}ngx-app-bar header .title{font:var(--ngx-app-bar-title-font, var(--mat-sys-headline-medium));letter-spacing:var(--ngx-app-bar-title-letter-spacing, var(--mat-sys-headline-medium-tracking))}ngx-app-bar header .subtitle{font:var(--ngx-app-bar-subtitle-font, var(--mat-sys-headline-small));letter-spacing:var(--ngx-app-bar-subtitle-letter-spacing, var(--mat-sys-headline-small-tracking))}ngx-app-bar .actions{display:flex;justify-content:flex-end;flex-grow:1;gap:var(--ngx-app-bar-actions-gap, .5rem)}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
161
+ }
162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxAppBarComponent, decorators: [{
163
+ type: Component,
164
+ args: [{ selector: 'ngx-app-bar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconModule, MatButtonModule, MatTooltipModule], host: {
165
+ // eslint-disable-next-line @typescript-eslint/naming-convention
166
+ '[class.condensed]': 'mode()==="condensed"'
167
+ }, template: "@if (withBackIcon()) {\n <button matIconButton matTooltip=\"{{ intl?.back ?? 'Back' }}\" (click)=\"triggerGoBack()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n}\n\n<header class=\"{{ mode() }}\">\n <h1 class=\"title\">{{ title() }}</h1>\n @if (subtitle()) {\n @if (mode() === 'condensed') {\n <mat-icon>chevron_right</mat-icon>\n }\n <h2 class=\"subtitle\">{{ subtitle() }}</h2>\n }\n</header>\n\n<section class=\"actions\">\n <ng-content />\n @if (helpUrl()) {\n <button matIconButton matTooltip=\"{{ intl?.help ?? 'Help' }}\" (click)=\"openHelp()\">\n <mat-icon>help</mat-icon>\n </button>\n }\n</section>\n", styles: ["ngx-app-bar{display:flex;flex-direction:row;align-items:center;min-height:var(--ngx-app-bar-min-height, 3.5rem);box-sizing:border-box;gap:var(--ngx-app-bar-gap, .25rem)}ngx-app-bar header{color:var(--mat-sys-on-surface-variant)}ngx-app-bar header.condensed{display:flex;flex-direction:row;align-items:center;gap:var(--ngx-app-bar-condensed-gap, .5rem)}ngx-app-bar header.condensed mat-icon{color:var(--mat-sys-outline)}ngx-app-bar header .title,ngx-app-bar header .subtitle{margin:0;white-space:nowrap}ngx-app-bar header .title{font:var(--ngx-app-bar-title-font, var(--mat-sys-headline-medium));letter-spacing:var(--ngx-app-bar-title-letter-spacing, var(--mat-sys-headline-medium-tracking))}ngx-app-bar header .subtitle{font:var(--ngx-app-bar-subtitle-font, var(--mat-sys-headline-small));letter-spacing:var(--ngx-app-bar-subtitle-letter-spacing, var(--mat-sys-headline-small-tracking))}ngx-app-bar .actions{display:flex;justify-content:flex-end;flex-grow:1;gap:var(--ngx-app-bar-actions-gap, .5rem)}\n"] }]
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 }] }], withBackIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "withBackIcon", required: false }] }], goBack: [{ type: i0.Output, args: ["goBack"] }] } });
169
+
170
+ class NgxLayoutComponent {
171
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
172
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: NgxLayoutComponent, isStandalone: true, selector: "ngx-layout", ngImport: i0, template: "<ng-content select=\"ngx-app-bar\"></ng-content>\n<ng-content select=\"ngx-main-bar\"></ng-content>\n<!--\n The ng-content's is not clearly defined yet. The potential use-cases are:\n - Display GPD bars\n - Display warnings\n -->\n<ng-content></ng-content>\n<section class=\"content\">\n <ng-content select=\"ngx-panel\"></ng-content>\n</section>\n", styles: [":host{display:flex;flex-direction:column;flex:1 1 0;background-color:var(--mat-sys-surface-container);padding-block-end:var(--ngx-layout-padding-block-end, .75rem);padding-inline:var(--ngx-layout-padding-inline, 1rem);box-sizing:border-box}:host .content{display:flex;flex:1 1 0;overflow:hidden;gap:var(--ngx-layout-content-gap, .5rem);padding-block:var(--ngx-layout-content-padding-block, .25rem)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
173
+ }
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxLayoutComponent, decorators: [{
175
+ type: Component,
176
+ args: [{ selector: 'ngx-layout', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"ngx-app-bar\"></ng-content>\n<ng-content select=\"ngx-main-bar\"></ng-content>\n<!--\n The ng-content's is not clearly defined yet. The potential use-cases are:\n - Display GPD bars\n - Display warnings\n -->\n<ng-content></ng-content>\n<section class=\"content\">\n <ng-content select=\"ngx-panel\"></ng-content>\n</section>\n", styles: [":host{display:flex;flex-direction:column;flex:1 1 0;background-color:var(--mat-sys-surface-container);padding-block-end:var(--ngx-layout-padding-block-end, .75rem);padding-inline:var(--ngx-layout-padding-inline, 1rem);box-sizing:border-box}:host .content{display:flex;flex:1 1 0;overflow:hidden;gap:var(--ngx-layout-content-gap, .5rem);padding-block:var(--ngx-layout-content-padding-block, .25rem)}\n"] }]
177
+ }] });
178
+
179
+ class NgxMainBarComponent {
180
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMainBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
181
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: NgxMainBarComponent, isStandalone: true, selector: "ngx-main-bar", ngImport: i0, template: "<ng-content select=\"ngx-actions-group\"></ng-content>\n\n<div class=\"right\">\n <ng-content select=\"ngx-filters-group\"></ng-content>\n <ng-content select=\"ngx-search-bar-container\"></ng-content>\n</div>\n", styles: ["ngx-main-bar{display:flex;align-items:center;padding-block:var(--ngx-main-bar-padding-block, .25rem);gap:var(--ngx-main-bar-gap, .75rem)}ngx-main-bar .right{flex:1;display:flex;justify-content:flex-end;gap:var(--ngx-main-bar-right-gap, .75rem)}ngx-main-bar ngx-actions-group{flex:1;min-inline-size:var(--ngx-main-bar-action-min-inline-size, 3rem)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
182
+ }
183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxMainBarComponent, decorators: [{
184
+ type: Component,
185
+ args: [{ selector: 'ngx-main-bar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"ngx-actions-group\"></ng-content>\n\n<div class=\"right\">\n <ng-content select=\"ngx-filters-group\"></ng-content>\n <ng-content select=\"ngx-search-bar-container\"></ng-content>\n</div>\n", styles: ["ngx-main-bar{display:flex;align-items:center;padding-block:var(--ngx-main-bar-padding-block, .25rem);gap:var(--ngx-main-bar-gap, .75rem)}ngx-main-bar .right{flex:1;display:flex;justify-content:flex-end;gap:var(--ngx-main-bar-right-gap, .75rem)}ngx-main-bar ngx-actions-group{flex:1;min-inline-size:var(--ngx-main-bar-action-min-inline-size, 3rem)}\n"] }]
186
+ }] });
187
+
188
+ class NgxPanelComponent {
189
+ appearance = input(undefined, ...(ngDevMode ? [{ debugName: "appearance" }] : []));
190
+ contentPadding = input(undefined, { ...(ngDevMode ? { debugName: "contentPadding" } : {}), alias: 'content-padding' });
191
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
192
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: NgxPanelComponent, isStandalone: true, selector: "ngx-panel", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, contentPadding: { classPropertyName: "contentPadding", publicName: "content-padding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.appearance": "this.appearance()", "attr.content-padding": "this.contentPadding()" } }, ngImport: i0, template: "<ng-content select=\"ngx-panel-bar[primary]\"></ng-content>\n<ng-content select=\"ngx-panel-bar\"></ng-content>\n<section class=\"content\">\n <ng-content></ng-content>\n</section>\n", styles: ["ngx-panel{display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;block-size:100%;border-radius:var(--ngx-panel-radius, 2rem);padding-block:var(--ngx-panel-padding-block, .25rem);background-color:var(--mat-sys-surface-container-lowest);min-width:min-content}ngx-panel[appearance=transparent]{background-color:transparent}ngx-panel .content{overflow:auto;display:flex;flex-direction:column;gap:var(--ngx-panel-content-gap, .5rem);flex:1;padding-inline:var(--ngx-panel-content-padding-inline, .5rem);padding-block-end:var(--ngx-panel-content-padding-block-end, .75rem)}ngx-panel[content-padding=none] .content{padding-inline:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
193
+ }
194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxPanelComponent, decorators: [{
195
+ type: Component,
196
+ args: [{ selector: 'ngx-panel', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
197
+ // eslint-disable-next-line @typescript-eslint/naming-convention
198
+ '[attr.appearance]': 'this.appearance()',
199
+ // eslint-disable-next-line @typescript-eslint/naming-convention
200
+ '[attr.content-padding]': 'this.contentPadding()'
201
+ }, template: "<ng-content select=\"ngx-panel-bar[primary]\"></ng-content>\n<ng-content select=\"ngx-panel-bar\"></ng-content>\n<section class=\"content\">\n <ng-content></ng-content>\n</section>\n", styles: ["ngx-panel{display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;block-size:100%;border-radius:var(--ngx-panel-radius, 2rem);padding-block:var(--ngx-panel-padding-block, .25rem);background-color:var(--mat-sys-surface-container-lowest);min-width:min-content}ngx-panel[appearance=transparent]{background-color:transparent}ngx-panel .content{overflow:auto;display:flex;flex-direction:column;gap:var(--ngx-panel-content-gap, .5rem);flex:1;padding-inline:var(--ngx-panel-content-padding-inline, .5rem);padding-block-end:var(--ngx-panel-content-padding-block-end, .75rem)}ngx-panel[content-padding=none] .content{padding-inline:0}\n"] }]
202
+ }], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], contentPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "content-padding", required: false }] }] } });
203
+
204
+ class NgxSearchInputDirective {
205
+ blurred = signal(false, ...(ngDevMode ? [{ debugName: "blurred" }] : []));
206
+ value;
207
+ ngControl = inject(NgControl);
208
+ input = inject(ElementRef);
209
+ control = this.ngControl.control;
210
+ constructor() {
211
+ this.value = toSignal(this.control.valueChanges, { initialValue: '' });
96
212
  }
97
- get withCloseButton() {
98
- return this._withCloseButton;
213
+ focus() {
214
+ this.input.nativeElement.focus();
99
215
  }
100
- _withBackButton = false;
101
- set withBackButton(value) {
102
- this._withBackButton = coerceBooleanProperty(value);
216
+ reset() {
217
+ this.control.reset();
103
218
  }
104
- get withBackButton() {
105
- return this._withBackButton;
219
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxSearchInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
220
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: NgxSearchInputDirective, isStandalone: true, selector: "input[ngx-search-input]", host: { listeners: { "blur": "blurred.set(true);", "focus": "blurred.set(false);" } }, ngImport: i0 });
221
+ }
222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxSearchInputDirective, decorators: [{
223
+ type: Directive,
224
+ args: [{
225
+ selector: 'input[ngx-search-input]',
226
+ /* eslint-disable @typescript-eslint/naming-convention */
227
+ host: {
228
+ '(blur)': 'blurred.set(true);',
229
+ '(focus)': 'blurred.set(false);'
230
+ }
231
+ }]
232
+ }], ctorParameters: () => [] });
233
+
234
+ // type SearchBarContainerSize = 'medium' | 'small';
235
+ class NgxSearchBarContainerComponent {
236
+ // inputs
237
+ folded = input(false, ...(ngDevMode ? [{ debugName: "folded" }] : []));
238
+ /*
239
+ protected size = input<SearchBarContainerSize>('medium');
240
+ protected sizeButtonAttributeName = input<string>();
241
+ protected sizeButtonAttributeValue = input<string>();
242
+ */
243
+ intl = inject(NgxLayoutIntl, { optional: true });
244
+ manualFoldingState = signal(true, ...(ngDevMode ? [{ debugName: "manualFoldingState" }] : []));
245
+ isFolded = computed(() => this.folded() && this.manualFoldingState() && !this.searchText(), ...(ngDevMode ? [{ debugName: "isFolded" }] : []));
246
+ searchInput = contentChild(NgxSearchInputDirective, ...(ngDevMode ? [{ debugName: "searchInput" }] : []));
247
+ searchText = computed(() => this.searchInput()?.value(), ...(ngDevMode ? [{ debugName: "searchText" }] : []));
248
+ /*
249
+ private hostElement = inject(ElementRef);
250
+ private renderer = inject(Renderer2);
251
+ */
252
+ constructor() {
253
+ /*
254
+ afterRender(() => {
255
+ const containerElement = this.hostElement.nativeElement;
256
+ const buttons = containerElement.querySelectorAll('button') as NodeListOf<HTMLElement>;
257
+
258
+ buttons.forEach((button: HTMLElement) => {
259
+ if (this.sizeButtonAttributeName()?.trim() && this.sizeButtonAttributeValue()?.trim()) {
260
+ this.renderer.setAttribute(button, this.sizeButtonAttributeName(), this.sizeButtonAttributeValue());
261
+ }
262
+
263
+ });
264
+ });
265
+ */
266
+ afterRenderEffect(() => {
267
+ const searchInput = this.searchInput();
268
+ if (!searchInput) {
269
+ return;
270
+ }
271
+ if (!this.isFolded()) {
272
+ searchInput.focus();
273
+ }
274
+ });
275
+ effect(() => {
276
+ const baseFoldStatus = this.folded();
277
+ if (baseFoldStatus) {
278
+ const searchText = untracked(this.searchText);
279
+ const blurred = this.searchInput()?.blurred();
280
+ if (blurred && !searchText) {
281
+ this.toggleFolded();
282
+ }
283
+ }
284
+ });
106
285
  }
107
- closeSideFilter() {
108
- void this.sideFilter?.close();
286
+ toggleFolded() {
287
+ this.manualFoldingState.update(folded => !folded);
109
288
  }
110
- openSideFilter() {
111
- void this.sideFilter?.open();
289
+ resetInput() {
290
+ const searchInput = this.searchInput();
291
+ if (!searchInput) {
292
+ return;
293
+ }
294
+ searchInput.reset();
295
+ searchInput.focus();
112
296
  }
113
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
114
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: NgxLayoutComponent, isStandalone: true, selector: "ngx-layout", inputs: { toolbarColor: "toolbarColor", editorToolbarId: "editorToolbarId", layoutToolbarExternal: "layoutToolbarExternal", layoutPrimaryActionExternal: "layoutPrimaryActionExternal", layoutActionsExternal: "layoutActionsExternal", layoutInfoBoxesExternal: "layoutInfoBoxesExternal", layoutRightExternal: "layoutRightExternal", withSidenav: "withSidenav", keepFilterButtonDisplayed: "keepFilterButtonDisplayed", withCloseButton: "withCloseButton", withBackButton: "withBackButton" }, outputs: { closeButtonClicked: "closeButtonClicked", backButtonClicked: "backButtonClicked", sideFilterClosed: "sideFilterClosed", sideFilterOpened: "sideFilterOpened" }, queries: [{ propertyName: "layoutToolbarContent", first: true, predicate: ["layoutToolbar"], descendants: true }, { propertyName: "layoutPrimaryActionContent", first: true, predicate: ["layoutPrimaryAction"], descendants: true }, { propertyName: "layoutActionsContent", first: true, predicate: ["layoutActions"], descendants: true }, { propertyName: "layoutInfoBoxesContent", first: true, predicate: ["layoutInfoBoxes"], descendants: true }, { propertyName: "layoutRightContent", first: true, predicate: ["layoutRight"], descendants: true }], viewQueries: [{ propertyName: "sideFilter", first: true, predicate: ["sideFilter"], descendants: true }], ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"filter\"></ng-container>\n\n<ng-template #content>\n <div class=\"main-content\">\n @if (\n layoutPrimaryAction && !((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false)\n ) {\n <span class=\"primary-action-container\" [class.bottom]=\"mediaService.isHandset$ | async\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n <ng-content></ng-content>\n </div>\n @if ((mediaService.isHandset$ | async) && actionsToolbar) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n</ng-template>\n\n<ng-template #actionsToolbar>\n <mat-toolbar\n id=\"actions-toolbar\"\n class=\"actions\"\n [color]=\"toolbarColor\"\n [class.bottom]=\"mediaService.isHandset$ | async\">\n @if (layoutPrimaryAction && (layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <span class=\"primary-action-container\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n @if (layoutActions) {\n <ng-template [ngTemplateOutlet]=\"layoutActions\"></ng-template>\n }\n @if (layoutInfoBoxes && (mediaService.isHandset$ | async) === false) {\n <div class=\"info-boxes-container\">\n <ng-template [ngTemplateOutlet]=\"layoutInfoBoxes\"></ng-template>\n </div>\n }\n </mat-toolbar>\n</ng-template>\n\n<ng-template #filter>\n @if (layoutToolbar || layoutRight) {\n <mat-toolbar id=\"toolbar\" [color]=\"toolbarColor\">\n @if (withSidenav && (mediaService.isHandset$ | async) && (sidenavService.openChanged$ | async) === false) {\n <button type=\"button\" id=\"sidenav-button\" mat-icon-button (click)=\"sidenavService.toggle()\">\n <mat-icon>menu</mat-icon>\n </button>\n }\n @if (withBackButton) {\n <button\n type=\"button\"\n id=\"back-button\"\n mat-icon-button\n (click)=\"this.backButtonClicked.emit($event)\"\n [matTooltip]=\"intl?.backLabel ?? 'Back'\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n <div id=\"toolbar-content-container\">\n @if (layoutToolbar) {\n <ng-template [ngTemplateOutlet]=\"layoutToolbar\"></ng-template>\n }\n </div>\n @if (sideFilter && (keepFilterButtonDisplayed || (mediaService.isHandset$ | async)) && layoutRight) {\n <button\n type=\"button\"\n id=\"filter-button\"\n mat-icon-button\n (click)=\"sideFilter.toggle()\"\n [matTooltip]=\"intl?.sideFilterLabel ?? 'Show/Hide filters'\">\n <mat-icon>tune</mat-icon>\n </button>\n }\n @if (withCloseButton) {\n <button\n type=\"button\"\n id=\"close-button\"\n mat-icon-button\n (click)=\"this.closeButtonClicked.emit($event)\"\n [matTooltip]=\"intl?.closeLabel ?? 'Close'\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-toolbar>\n }\n\n @if ((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n @if (layoutRight) {\n <mat-drawer-container autosize=\"true\">\n <mat-drawer-content>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </mat-drawer-content>\n <mat-drawer\n id=\"side-filter\"\n #sideFilter\n (closed)=\"sideFilterClosed.emit()\"\n (openedChange)=\"sideFilterOpened.emit()\"\n class=\"right\"\n position=\"end\"\n [attr.role]=\"(mediaService.isHandset$ | async) ? 'dialog' : 'navigation'\"\n [mode]=\"(mediaService.isHandset$ | async) ? 'over' : 'side'\"\n [opened]=\"(mediaService.isHandset$ | async) === false\">\n <ng-template [ngTemplateOutlet]=\"layoutRight\"></ng-template>\n </mat-drawer>\n </mat-drawer-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n</ng-template>\n", styles: ["ngx-layout{display:flex;flex-direction:column;position:absolute;inset:0}ngx-layout.no-left[no-right=true] .main-content{padding:0}ngx-layout mat-sidenav-container{position:absolute;inset:0}ngx-layout mat-drawer-content,ngx-layout mat-sidenav-content{display:flex!important;flex-direction:column}ngx-layout mat-sidenav{width:200px}ngx-layout mat-drawer#side-filter{width:220px}ngx-layout mat-drawer#side-filter.right{padding:.3rem}ngx-layout mat-drawer#side-filter.right [filters-title]{font-size:1.2rem;display:flex;align-items:center;justify-content:space-between;flex:1 1 auto;font-weight:700;padding:.6rem;margin-bottom:.3rem}ngx-layout mat-drawer#side-filter.right [filters-subtitle]{font-size:1rem;display:flex;align-items:center;justify-content:space-between;flex:1 1 auto;font-weight:600;padding:.4rem .6rem;margin-bottom:.3rem;margin-top:.3rem}ngx-layout mat-drawer#side-filter.right [icons-container]{display:flex;align-items:center}ngx-layout mat-drawer#side-filter.right [filters-icon]{cursor:pointer;transition:color .3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-chip-list] mat-chip-listbox{margin:0;max-height:20vh;overflow-y:auto}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip{position:relative;padding:.5rem;margin:.1rem;font-size:.75rem;transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip:not([disabled]){cursor:pointer}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip:not([disabled]):hover:before{font-family:Material Icons;content:\"close\";display:flex;align-items:center;justify-content:center;position:absolute;inset:0;font-weight:700;font-size:1.2rem;cursor:pointer;transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-toggle-group]{display:flex}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle{transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle mat-icon{margin-right:1rem}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle .mat-button-toggle-label-content{text-align:start}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle .mat-button-toggle-focus-overlay{height:100%}ngx-layout mat-drawer#side-filter.right mat-form-field{width:100%}ngx-layout mat-drawer#side-filter.right .mat-mdc-form-field-infix{width:inherit}ngx-layout mat-drawer#side-filter.right.mat-drawer-side{box-shadow:-3px 0 5px -1px #0003;z-index:10}ngx-layout mat-drawer-container{flex:1}ngx-layout .mat-toolbar:not(.actions){display:flex;flex-shrink:0;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;z-index:10}ngx-layout .mat-toolbar:not(.actions) #toolbar-content-container{display:flex;flex-grow:1;overflow:hidden}ngx-layout .mat-toolbar:not(.actions) [toolbar-title]{overflow:hidden;text-overflow:ellipsis}ngx-layout .mat-toolbar:not(.actions)>div{display:flex;align-items:center}ngx-layout .mat-toolbar .mat-mdc-icon-button{height:40px;line-height:40px;width:40px;display:flex;justify-content:center;align-items:center;padding:0}ngx-layout .mat-toolbar#actions-toolbar{flex:0 0 auto;height:40px;font-size:inherit;padding-right:0}ngx-layout .mat-toolbar#actions-toolbar .info-boxes-container{display:flex;flex:1 1 auto;justify-content:flex-end}ngx-layout .mat-toolbar#actions-toolbar .info-boxes-container .info-box{display:flex;flex-grow:0;line-height:40px;padding-left:2rem;padding-right:2rem;box-shadow:-3px 0 5px -1px #0003}ngx-layout .mat-toolbar#actions-toolbar.bottom#actions-toolbar{display:flex;width:100%;justify-content:space-around}ngx-layout .mat-toolbar#actions-toolbar .primary-action-container{z-index:20}ngx-layout .main-content{position:relative;display:flex;flex:1 1 auto;overflow:hidden}ngx-layout .main-content .primary-action-container{position:absolute;z-index:20;opacity:.8;transition:.3s ease-in-out}ngx-layout .main-content .primary-action-container:hover{opacity:1}ngx-layout .main-content .primary-action-container.bottom{right:1rem;bottom:1rem}ngx-layout .main-content .primary-action-container:not(.bottom){top:1rem;left:1rem}ngx-layout ::-webkit-scrollbar{width:12px;height:12px}ngx-layout ::-webkit-scrollbar-thumb{transition:.3s ease-in-out;border-radius:6px}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
297
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxSearchBarContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
298
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: NgxSearchBarContainerComponent, isStandalone: true, selector: "ngx-search-bar-container", inputs: { folded: { classPropertyName: "folded", publicName: "folded", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "searchInput", first: true, predicate: NgxSearchInputDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (isFolded()) {\n <button\n matIconButton\n aria-label=\"Open search bar\"\n (click)=\"toggleFolded()\"\n matTooltip=\"{{ intl?.openSearchBar ?? 'Open search bar' }}\">\n <mat-icon>search</mat-icon>\n </button>\n} @else {\n <ng-content select=\"[ngx-search-input]\"></ng-content>\n\n @if (searchText()) {\n <button\n matIconButton\n aria-label=\"Clear button\"\n (click)=\"resetInput()\"\n matTooltip=\"{{ intl?.deleteSearch ?? 'Clear search' }}\">\n <mat-icon>close</mat-icon>\n </button>\n } @else {\n <mat-icon class=\"icon-search-bar\" aria-hidden=\"false\" aria-label=\"Search icon\" fontIcon=\"search\" />\n }\n}\n", styles: ["ngx-search-bar-container{display:flex;align-items:center;block-size:var(--ngx-search-bar-container-block-size, 3rem);border-radius:var(--ngx-search-bar-container-radius, 2rem);padding-inline-start:var(--ngx-search-bar-container-padding-inline-start, 1.125rem);padding-inline-end:var(--ngx-search-bar-container-padding-inline-end, .25rem);background-color:var(--mat-sys-surface-container-high);gap:var(--ngx-search-bar-container-gap, .125rem)}ngx-search-bar-container:has(button:only-child){width:fit-content;padding:var(--ngx-search-bar-folded-container-padding, 0 .25rem)}ngx-search-bar-container>input[ngx-search-input]{font:var(--mat-sys-body-large);letter-spacing:var(--mat-sys-body-large-tracking);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}ngx-search-bar-container>input[ngx-search-input]::placeholder{color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container mat-icon.icon-search-bar{padding:var(--ngx-search-bar-icon-padding, .5rem);color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container [ngx-search-input]{flex:1;background:none;border:none}ngx-search-bar-container [ngx-search-input]:focus{outline:none}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
115
299
  }
116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxLayoutComponent, decorators: [{
300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxSearchBarContainerComponent, decorators: [{
117
301
  type: Component,
118
- args: [{ selector: 'ngx-layout', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
119
- NgTemplateOutlet,
120
- AsyncPipe,
121
- MatIconButton,
122
- MatIcon,
123
- MatDrawer,
124
- MatDrawerContainer,
125
- MatDrawerContent,
126
- MatToolbar,
127
- MatTooltip
128
- ], template: "<ng-container *ngTemplateOutlet=\"filter\"></ng-container>\n\n<ng-template #content>\n <div class=\"main-content\">\n @if (\n layoutPrimaryAction && !((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false)\n ) {\n <span class=\"primary-action-container\" [class.bottom]=\"mediaService.isHandset$ | async\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n <ng-content></ng-content>\n </div>\n @if ((mediaService.isHandset$ | async) && actionsToolbar) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n</ng-template>\n\n<ng-template #actionsToolbar>\n <mat-toolbar\n id=\"actions-toolbar\"\n class=\"actions\"\n [color]=\"toolbarColor\"\n [class.bottom]=\"mediaService.isHandset$ | async\">\n @if (layoutPrimaryAction && (layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <span class=\"primary-action-container\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n @if (layoutActions) {\n <ng-template [ngTemplateOutlet]=\"layoutActions\"></ng-template>\n }\n @if (layoutInfoBoxes && (mediaService.isHandset$ | async) === false) {\n <div class=\"info-boxes-container\">\n <ng-template [ngTemplateOutlet]=\"layoutInfoBoxes\"></ng-template>\n </div>\n }\n </mat-toolbar>\n</ng-template>\n\n<ng-template #filter>\n @if (layoutToolbar || layoutRight) {\n <mat-toolbar id=\"toolbar\" [color]=\"toolbarColor\">\n @if (withSidenav && (mediaService.isHandset$ | async) && (sidenavService.openChanged$ | async) === false) {\n <button type=\"button\" id=\"sidenav-button\" mat-icon-button (click)=\"sidenavService.toggle()\">\n <mat-icon>menu</mat-icon>\n </button>\n }\n @if (withBackButton) {\n <button\n type=\"button\"\n id=\"back-button\"\n mat-icon-button\n (click)=\"this.backButtonClicked.emit($event)\"\n [matTooltip]=\"intl?.backLabel ?? 'Back'\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n <div id=\"toolbar-content-container\">\n @if (layoutToolbar) {\n <ng-template [ngTemplateOutlet]=\"layoutToolbar\"></ng-template>\n }\n </div>\n @if (sideFilter && (keepFilterButtonDisplayed || (mediaService.isHandset$ | async)) && layoutRight) {\n <button\n type=\"button\"\n id=\"filter-button\"\n mat-icon-button\n (click)=\"sideFilter.toggle()\"\n [matTooltip]=\"intl?.sideFilterLabel ?? 'Show/Hide filters'\">\n <mat-icon>tune</mat-icon>\n </button>\n }\n @if (withCloseButton) {\n <button\n type=\"button\"\n id=\"close-button\"\n mat-icon-button\n (click)=\"this.closeButtonClicked.emit($event)\"\n [matTooltip]=\"intl?.closeLabel ?? 'Close'\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-toolbar>\n }\n\n @if ((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n @if (layoutRight) {\n <mat-drawer-container autosize=\"true\">\n <mat-drawer-content>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </mat-drawer-content>\n <mat-drawer\n id=\"side-filter\"\n #sideFilter\n (closed)=\"sideFilterClosed.emit()\"\n (openedChange)=\"sideFilterOpened.emit()\"\n class=\"right\"\n position=\"end\"\n [attr.role]=\"(mediaService.isHandset$ | async) ? 'dialog' : 'navigation'\"\n [mode]=\"(mediaService.isHandset$ | async) ? 'over' : 'side'\"\n [opened]=\"(mediaService.isHandset$ | async) === false\">\n <ng-template [ngTemplateOutlet]=\"layoutRight\"></ng-template>\n </mat-drawer>\n </mat-drawer-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n</ng-template>\n", styles: ["ngx-layout{display:flex;flex-direction:column;position:absolute;inset:0}ngx-layout.no-left[no-right=true] .main-content{padding:0}ngx-layout mat-sidenav-container{position:absolute;inset:0}ngx-layout mat-drawer-content,ngx-layout mat-sidenav-content{display:flex!important;flex-direction:column}ngx-layout mat-sidenav{width:200px}ngx-layout mat-drawer#side-filter{width:220px}ngx-layout mat-drawer#side-filter.right{padding:.3rem}ngx-layout mat-drawer#side-filter.right [filters-title]{font-size:1.2rem;display:flex;align-items:center;justify-content:space-between;flex:1 1 auto;font-weight:700;padding:.6rem;margin-bottom:.3rem}ngx-layout mat-drawer#side-filter.right [filters-subtitle]{font-size:1rem;display:flex;align-items:center;justify-content:space-between;flex:1 1 auto;font-weight:600;padding:.4rem .6rem;margin-bottom:.3rem;margin-top:.3rem}ngx-layout mat-drawer#side-filter.right [icons-container]{display:flex;align-items:center}ngx-layout mat-drawer#side-filter.right [filters-icon]{cursor:pointer;transition:color .3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-chip-list] mat-chip-listbox{margin:0;max-height:20vh;overflow-y:auto}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip{position:relative;padding:.5rem;margin:.1rem;font-size:.75rem;transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip:not([disabled]){cursor:pointer}ngx-layout mat-drawer#side-filter.right [filters-chip-list] .mat-mdc-chip:not([disabled]):hover:before{font-family:Material Icons;content:\"close\";display:flex;align-items:center;justify-content:center;position:absolute;inset:0;font-weight:700;font-size:1.2rem;cursor:pointer;transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-toggle-group]{display:flex}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle{transition:.3s ease-in-out}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle mat-icon{margin-right:1rem}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle .mat-button-toggle-label-content{text-align:start}ngx-layout mat-drawer#side-filter.right [filters-toggle-group] .mat-button-toggle .mat-button-toggle-focus-overlay{height:100%}ngx-layout mat-drawer#side-filter.right mat-form-field{width:100%}ngx-layout mat-drawer#side-filter.right .mat-mdc-form-field-infix{width:inherit}ngx-layout mat-drawer#side-filter.right.mat-drawer-side{box-shadow:-3px 0 5px -1px #0003;z-index:10}ngx-layout mat-drawer-container{flex:1}ngx-layout .mat-toolbar:not(.actions){display:flex;flex-shrink:0;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;z-index:10}ngx-layout .mat-toolbar:not(.actions) #toolbar-content-container{display:flex;flex-grow:1;overflow:hidden}ngx-layout .mat-toolbar:not(.actions) [toolbar-title]{overflow:hidden;text-overflow:ellipsis}ngx-layout .mat-toolbar:not(.actions)>div{display:flex;align-items:center}ngx-layout .mat-toolbar .mat-mdc-icon-button{height:40px;line-height:40px;width:40px;display:flex;justify-content:center;align-items:center;padding:0}ngx-layout .mat-toolbar#actions-toolbar{flex:0 0 auto;height:40px;font-size:inherit;padding-right:0}ngx-layout .mat-toolbar#actions-toolbar .info-boxes-container{display:flex;flex:1 1 auto;justify-content:flex-end}ngx-layout .mat-toolbar#actions-toolbar .info-boxes-container .info-box{display:flex;flex-grow:0;line-height:40px;padding-left:2rem;padding-right:2rem;box-shadow:-3px 0 5px -1px #0003}ngx-layout .mat-toolbar#actions-toolbar.bottom#actions-toolbar{display:flex;width:100%;justify-content:space-around}ngx-layout .mat-toolbar#actions-toolbar .primary-action-container{z-index:20}ngx-layout .main-content{position:relative;display:flex;flex:1 1 auto;overflow:hidden}ngx-layout .main-content .primary-action-container{position:absolute;z-index:20;opacity:.8;transition:.3s ease-in-out}ngx-layout .main-content .primary-action-container:hover{opacity:1}ngx-layout .main-content .primary-action-container.bottom{right:1rem;bottom:1rem}ngx-layout .main-content .primary-action-container:not(.bottom){top:1rem;left:1rem}ngx-layout ::-webkit-scrollbar{width:12px;height:12px}ngx-layout ::-webkit-scrollbar-thumb{transition:.3s ease-in-out;border-radius:6px}\n"] }]
129
- }], propDecorators: { toolbarColor: [{
130
- type: Input
131
- }], editorToolbarId: [{
132
- type: Input
133
- }], layoutToolbarExternal: [{
134
- type: Input
135
- }], layoutPrimaryActionExternal: [{
136
- type: Input
137
- }], layoutActionsExternal: [{
138
- type: Input
139
- }], layoutInfoBoxesExternal: [{
140
- type: Input
141
- }], layoutRightExternal: [{
142
- type: Input
143
- }], closeButtonClicked: [{
144
- type: Output
145
- }], backButtonClicked: [{
146
- type: Output
147
- }], sideFilterClosed: [{
148
- type: Output
149
- }], sideFilterOpened: [{
150
- type: Output
151
- }], layoutToolbarContent: [{
152
- type: ContentChild,
153
- args: ['layoutToolbar']
154
- }], layoutPrimaryActionContent: [{
155
- type: ContentChild,
156
- args: ['layoutPrimaryAction']
157
- }], layoutActionsContent: [{
158
- type: ContentChild,
159
- args: ['layoutActions']
160
- }], layoutInfoBoxesContent: [{
161
- type: ContentChild,
162
- args: ['layoutInfoBoxes']
163
- }], layoutRightContent: [{
164
- type: ContentChild,
165
- args: ['layoutRight']
166
- }], sideFilter: [{
167
- type: ViewChild,
168
- args: ['sideFilter']
169
- }], withSidenav: [{
170
- type: Input
171
- }], keepFilterButtonDisplayed: [{
172
- type: Input
173
- }], withCloseButton: [{
174
- type: Input
175
- }], withBackButton: [{
176
- type: Input
177
- }] } });
302
+ args: [{ selector: 'ngx-search-bar-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconModule, MatButtonModule, MatTooltipModule], template: "@if (isFolded()) {\n <button\n matIconButton\n aria-label=\"Open search bar\"\n (click)=\"toggleFolded()\"\n matTooltip=\"{{ intl?.openSearchBar ?? 'Open search bar' }}\">\n <mat-icon>search</mat-icon>\n </button>\n} @else {\n <ng-content select=\"[ngx-search-input]\"></ng-content>\n\n @if (searchText()) {\n <button\n matIconButton\n aria-label=\"Clear button\"\n (click)=\"resetInput()\"\n matTooltip=\"{{ intl?.deleteSearch ?? 'Clear search' }}\">\n <mat-icon>close</mat-icon>\n </button>\n } @else {\n <mat-icon class=\"icon-search-bar\" aria-hidden=\"false\" aria-label=\"Search icon\" fontIcon=\"search\" />\n }\n}\n", styles: ["ngx-search-bar-container{display:flex;align-items:center;block-size:var(--ngx-search-bar-container-block-size, 3rem);border-radius:var(--ngx-search-bar-container-radius, 2rem);padding-inline-start:var(--ngx-search-bar-container-padding-inline-start, 1.125rem);padding-inline-end:var(--ngx-search-bar-container-padding-inline-end, .25rem);background-color:var(--mat-sys-surface-container-high);gap:var(--ngx-search-bar-container-gap, .125rem)}ngx-search-bar-container:has(button:only-child){width:fit-content;padding:var(--ngx-search-bar-folded-container-padding, 0 .25rem)}ngx-search-bar-container>input[ngx-search-input]{font:var(--mat-sys-body-large);letter-spacing:var(--mat-sys-body-large-tracking);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}ngx-search-bar-container>input[ngx-search-input]::placeholder{color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container mat-icon.icon-search-bar{padding:var(--ngx-search-bar-icon-padding, .5rem);color:var(--mat-sys-on-surface-variant)}ngx-search-bar-container [ngx-search-input]{flex:1;background:none;border:none}ngx-search-bar-container [ngx-search-input]:focus{outline:none}\n"] }]
303
+ }], ctorParameters: () => [], propDecorators: { folded: [{ type: i0.Input, args: [{ isSignal: true, alias: "folded", required: false }] }], searchInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgxSearchInputDirective), { isSignal: true }] }] } });
178
304
 
179
305
  /**
180
306
  * Generated bundle index. Do not edit.
181
307
  */
182
308
 
183
- export { NgxLayoutComponent, NgxLayoutIntl, provideNgxLayout };
309
+ export { NgxActionsGroupComponent, NgxAppBarComponent, NgxLayoutComponent, NgxLayoutIntl, NgxMainBarComponent, NgxPanelComponent, NgxSearchBarContainerComponent, NgxSearchInputDirective, provideNgxLayout, resizeSignal };
184
310
  //# sourceMappingURL=hug-ngx-layout.mjs.map