@messaia/cdk 21.0.0-rc.9 → 21.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2022/messaia-cdk.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { Location, getLocaleNumberSymbol, NumberSymbol, CommonModule, DecimalPip
|
|
|
3
3
|
import * as i1$6 from '@angular/common/http';
|
|
4
4
|
import { HttpHeaders, HttpParams, HttpClient, HttpRequest, HttpEventType, HttpResponse } from '@angular/common/http';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Injectable, Component, Directive, ContentChildren, Optional, SkipSelf, NgZone, InjectionToken, Inject, EventEmitter, inject, ElementRef, ViewChildren, Output, Input, forwardRef, LOCALE_ID, NgModule, Pipe, HostListener, ViewChild, ChangeDetectorRef, HostAttributeToken, HostBinding, ContentChild, ViewContainerRef, TemplateRef, ChangeDetectionStrategy,
|
|
6
|
+
import { Injectable, Component, Directive, ContentChildren, Optional, SkipSelf, NgZone, InjectionToken, Inject, EventEmitter, inject, ElementRef, ViewChildren, Output, Input, forwardRef, LOCALE_ID, NgModule, Pipe, HostListener, ViewChild, ChangeDetectorRef, HostAttributeToken, HostBinding, ContentChild, ViewContainerRef, TemplateRef, ChangeDetectionStrategy, Self, SimpleChange, Attribute, SecurityContext } from '@angular/core';
|
|
7
7
|
import * as i1 from '@angular/material/dialog';
|
|
8
8
|
import { MatDialogModule, MatDialogConfig, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
9
9
|
import * as i6$3 from '@angular/material/expansion';
|
|
@@ -80,6 +80,8 @@ import * as i3$4 from '@angular/material/sidenav';
|
|
|
80
80
|
import { MatSidenavModule, MatSidenav } from '@angular/material/sidenav';
|
|
81
81
|
import * as i4$3 from '@angular/material/toolbar';
|
|
82
82
|
import { MatToolbarModule, MatToolbar } from '@angular/material/toolbar';
|
|
83
|
+
import * as i8$1 from '@angular/material/badge';
|
|
84
|
+
import { MatBadgeModule } from '@angular/material/badge';
|
|
83
85
|
import * as i1$7 from 'angular-auth-oidc-client';
|
|
84
86
|
import * as i2$7 from '@angular/cdk/scrolling';
|
|
85
87
|
|
|
@@ -1411,6 +1413,26 @@ class BaseComponent {
|
|
|
1411
1413
|
this.router.navigateByUrl(urlTree.toString());
|
|
1412
1414
|
}
|
|
1413
1415
|
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Expands the specified expansion panel path (supporting nested IDs) and collapses others.
|
|
1418
|
+
* @param panelPath - The dot-separated ID path (e.g., 'warehouse.orders.details').
|
|
1419
|
+
*/
|
|
1420
|
+
expandPanelPath(panelId) {
|
|
1421
|
+
/* Split the panel ID into parts to handle nested panels */
|
|
1422
|
+
panelId?.split('.')
|
|
1423
|
+
/* Reduce the panel ID into an array of cumulative IDs to handle nested panels */
|
|
1424
|
+
?.reduce((accumulator, currentValue, index) => accumulator.concat((index > 0 ? (accumulator.slice(-1).join('.') + '.') : '') + currentValue), [])
|
|
1425
|
+
?.forEach((hash) => {
|
|
1426
|
+
/* Find the index of the panel with the specified element ID */
|
|
1427
|
+
var expansionPanelIndex = this.matExpansionPanelElementQueryList?.toArray()?.findIndex(x => x.nativeElement.id == hash) ?? -1;
|
|
1428
|
+
if (expansionPanelIndex >= 0) {
|
|
1429
|
+
/* Open the specified panel */
|
|
1430
|
+
this.matExpansionPanelQueryList?.toArray()[expansionPanelIndex]?.open();
|
|
1431
|
+
/* Detect changes */
|
|
1432
|
+
this.changeDetectorRef.detectChanges();
|
|
1433
|
+
}
|
|
1434
|
+
});
|
|
1435
|
+
}
|
|
1414
1436
|
/*
|
|
1415
1437
|
* Forces a new change detection cycle since change detections
|
|
1416
1438
|
* have finished when `ngAfterViewInit` is executed.
|
|
@@ -1454,16 +1476,8 @@ class BaseComponent {
|
|
|
1454
1476
|
this.changeDetectorRef.detectChanges();
|
|
1455
1477
|
}
|
|
1456
1478
|
else {
|
|
1457
|
-
/*
|
|
1458
|
-
this.
|
|
1459
|
-
?.reduce((accumulator, currentValue, index) => accumulator.concat((index > 0 ? (accumulator.slice(-1).join('.') + '.') : '') + currentValue), [])
|
|
1460
|
-
?.forEach((hash) => {
|
|
1461
|
-
var expansionPanelIndex = this.matExpansionPanelElementQueryList?.toArray()?.findIndex(x => x.nativeElement.id == hash) ?? -1;
|
|
1462
|
-
if (expansionPanelIndex >= 0) {
|
|
1463
|
-
this.matExpansionPanelQueryList?.toArray()[expansionPanelIndex]?.open();
|
|
1464
|
-
this.changeDetectorRef.detectChanges();
|
|
1465
|
-
}
|
|
1466
|
-
});
|
|
1479
|
+
/* Otherwise, expand the panel based on the URL hash if set */
|
|
1480
|
+
this.expandPanelPath(this.urlHash ?? '');
|
|
1467
1481
|
}
|
|
1468
1482
|
/* Detect changes for opened panels */
|
|
1469
1483
|
this.matExpansionPanelQueryList?.forEach(y => {
|
|
@@ -13141,6 +13155,19 @@ class EnumMetadata {
|
|
|
13141
13155
|
* @type {number}
|
|
13142
13156
|
*/
|
|
13143
13157
|
order;
|
|
13158
|
+
/**
|
|
13159
|
+
* @property Disabled
|
|
13160
|
+
* @description A flag indicating whether the enum value should be disabled in the UI. This can be useful for conditionally disabling enum items.
|
|
13161
|
+
* @type {boolean}
|
|
13162
|
+
*/
|
|
13163
|
+
disabled;
|
|
13164
|
+
/**
|
|
13165
|
+
* @property Disable
|
|
13166
|
+
* @description An optional function that returns a boolean to conditionally disable the enum value based on runtime parameters.
|
|
13167
|
+
* For example, you can disable certain enum values depending on another enum's value or other context.
|
|
13168
|
+
* @type {(context: any) => boolean}
|
|
13169
|
+
*/
|
|
13170
|
+
disable;
|
|
13144
13171
|
/**
|
|
13145
13172
|
* @property Hidden
|
|
13146
13173
|
* @description A flag indicating whether the enum value should be hidden from the UI. This can be useful for conditionally hiding enum items.
|
|
@@ -14291,8 +14318,19 @@ class GenericService {
|
|
|
14291
14318
|
* @param handleError Handle errors
|
|
14292
14319
|
*/
|
|
14293
14320
|
patch(id, body, path, httpOptions, handleError = true) {
|
|
14294
|
-
|
|
14295
|
-
|
|
14321
|
+
/* Ensure correct content-type for patch */
|
|
14322
|
+
const headers = new HttpHeaders({
|
|
14323
|
+
'Content-Type': 'application/json-patch+json'
|
|
14324
|
+
});
|
|
14325
|
+
/* Merge headers */
|
|
14326
|
+
const options = {
|
|
14327
|
+
...httpOptions,
|
|
14328
|
+
headers: httpOptions?.headers
|
|
14329
|
+
? httpOptions.headers.append('Content-Type', 'application/json-patch+json')
|
|
14330
|
+
: headers
|
|
14331
|
+
};
|
|
14332
|
+
/* Create request */
|
|
14333
|
+
let request = this.http.patch(`${this.endpoint}${path ? path : ''}/${id}`, body, options);
|
|
14296
14334
|
/* Handle error */
|
|
14297
14335
|
if (handleError) {
|
|
14298
14336
|
request = request.pipe(catchError(this.handleError('patch')));
|
|
@@ -14508,11 +14546,10 @@ class BaseService extends GenericService {
|
|
|
14508
14546
|
super('');
|
|
14509
14547
|
}
|
|
14510
14548
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BaseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
14511
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BaseService
|
|
14549
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BaseService });
|
|
14512
14550
|
}
|
|
14513
14551
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BaseService, decorators: [{
|
|
14514
|
-
type: Injectable
|
|
14515
|
-
args: [{ providedIn: 'root' }]
|
|
14552
|
+
type: Injectable
|
|
14516
14553
|
}], ctorParameters: () => [] });
|
|
14517
14554
|
|
|
14518
14555
|
//@dynamic
|
|
@@ -14568,13 +14605,15 @@ class EnumService {
|
|
|
14568
14605
|
* Function to get ordered enum values based on metadata
|
|
14569
14606
|
* @param enumObj The enum object
|
|
14570
14607
|
* @param metadataObj Metadata object containing enum metadata
|
|
14608
|
+
* @param context Optional context to be passed to hide function
|
|
14571
14609
|
* @returns An array of EnumItem objects representing ordered enum values
|
|
14572
14610
|
*/
|
|
14573
|
-
static applyMetadata(enumObj, metadataObj) {
|
|
14611
|
+
static applyMetadata(enumObj, metadataObj, context) {
|
|
14574
14612
|
const orderedValues = Object.keys(enumObj)
|
|
14575
14613
|
.map(key => parseInt(key, 10))
|
|
14576
14614
|
.filter(key => !isNaN(key))
|
|
14577
14615
|
.filter(key => !(metadataObj[key]?.hidden))
|
|
14616
|
+
.filter(key => !(metadataObj[key]?.hide?.(context)))
|
|
14578
14617
|
.sort((a, b) => (metadataObj[a]?.order ?? 0) - (metadataObj[b]?.order ?? 0))
|
|
14579
14618
|
.map(key => {
|
|
14580
14619
|
var metadata = metadataObj[key];
|
|
@@ -14583,6 +14622,8 @@ class EnumService {
|
|
|
14583
14622
|
name: metadata?.display ?? enumObj[key],
|
|
14584
14623
|
icon: metadata?.icon,
|
|
14585
14624
|
textColor: metadata?.textColor,
|
|
14625
|
+
disabled: metadata?.disabled || metadata?.disable?.(context) || false,
|
|
14626
|
+
context: context
|
|
14586
14627
|
};
|
|
14587
14628
|
});
|
|
14588
14629
|
return orderedValues;
|
|
@@ -14782,7 +14823,7 @@ class VdDynamicMenuComponent {
|
|
|
14782
14823
|
}, { once: true });
|
|
14783
14824
|
}
|
|
14784
14825
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VdDynamicMenuComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
14785
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: VdDynamicMenuComponent, isStandalone: true, selector: "vd-dynamic-menu", inputs: { items: "items", data: "data", index: "index", context: "context", contextMenu: "contextMenu" }, viewQueries: [{ propertyName: "matMenu", first: true, predicate: MatMenu, descendants: true }, { propertyName: "contextMenuTrigger", first: true, predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "<!-- Container row layout for displaying action items horizontally, aligned center vertically -->\r\n@if (items) {\r\n
|
|
14826
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: VdDynamicMenuComponent, isStandalone: true, selector: "vd-dynamic-menu", inputs: { items: "items", data: "data", index: "index", context: "context", contextMenu: "contextMenu" }, viewQueries: [{ propertyName: "matMenu", first: true, predicate: MatMenu, descendants: true }, { propertyName: "contextMenuTrigger", first: true, predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "<!-- Container row layout for displaying action items horizontally, aligned center vertically -->\r\n@if (items) {\r\n <div layout=\"row\" layout-align=\"start center\" flex>\r\n @for (menu of items; track menu) {\r\n <!-- #region Button trigger for actions that open a submenu -->\r\n @if (!contextMenu && menu?.items?.length && !(menu.hide && menu.hide(data, context, index))) {\r\n <a mat-icon-button\r\n [mat-menu-trigger-for]=\"matMenu\"\r\n [disabled]=\"data?.locked || (menu?.disable && menu?.disable(data, context, index))\"\r\n [matTooltip]=\"menu.tooltip\"\r\n (click)=\"$event.stopPropagation();\">\r\n <!-- Display menu icon -->\r\n <mat-icon fontSet=\"{{menu.iconFontSet || 'material-symbols-outlined'}}\"\r\n [class]=\"menu.iconClass ?? '' | func:data:context\"\r\n [style.color]=\"menu.iconColor\">\r\n {{ (menu.icon ?? 'more_vert' | func:data:context) || 'more_vert' }}\r\n </mat-icon>\r\n <!-- Optional title next to icon -->\r\n <span [style.color]=\"menu.textColor\">{{menu.title | func:data:context}}</span>\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Invisible context menu trigger used for right-click context positioning -->\r\n @if (contextMenu) {\r\n <div style=\"visibility: hidden; position: fixed\"\r\n [style.left]=\"contextMenuPosition.x\"\r\n [style.top]=\"contextMenuPosition.y\"\r\n [matMenuTriggerFor]=\"matMenu\"></div>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Direct action button (no submenu) -->\r\n @if (!menu?.items?.length && !(menu.hide && menu.hide(data, context, index))) {\r\n <a mat-icon-button\r\n [disabled]=\"data?.locked || (menu?.disable && menu?.disable(data, context, index))\"\r\n [matTooltip]=\"menu.tooltip\"\r\n (click)=\"$event.stopPropagation(); menu.event ? menu.event(data, context, index) : null\">\r\n <!-- Icon for the action -->\r\n <mat-icon fontSet=\"{{menu.iconFontSet || 'material-symbols-outlined'}}\"\r\n [class]=\"menu.iconClass ?? '' | func:data:context\"\r\n [style.color]=\"menu.iconColor\">\r\n {{ (menu.icon ?? 'radio_button_unchecked' | func:data:context) || 'radio_button_unchecked' }}\r\n </mat-icon>\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region MatMenu with nested submenus -->\r\n <mat-menu x-position=\"before\" #matMenu=\"matMenu\">\r\n @for (menuItem of menu?.items; track menuItem) {\r\n <!-- Simple menu item without sub-items -->\r\n @if (!menuItem.items) {\r\n @if (!menuItem.hide || !menuItem.hide(data, context, index)) {\r\n <a mat-menu-item\r\n (click)=\"menuItem.event ? menuItem.event(data, context, index) : null\"\r\n [disabled]=\"menuItem.disable && menuItem.disable(data, context, index)\"\r\n [matTooltip]=\"menuItem.tooltip\">\r\n <mat-icon fontSet=\"{{menuItem.iconFontSet || 'material-symbols-outlined'}}\"\r\n [class]=\"menuItem.iconClass ?? '' | func:data:context\"\r\n [style.color]=\"menuItem.iconColor\">\r\n {{ (menuItem.icon ?? 'radio_button_unchecked' | func:data:context) || 'radio_button_unchecked' }}\r\n </mat-icon>\r\n <span [style.color]=\"menuItem.textColor\">{{menuItem.title | func:data:context}}</span>\r\n </a>\r\n }\r\n }\r\n <!-- Menu item with nested submenu -->\r\n @if (menuItem.items) {\r\n <!-- Define the submenu -->\r\n <mat-menu x-position=\"before\" #subMenu=\"matMenu\">\r\n @for (menuSubItem of menuItem.items; track menuSubItem) {\r\n @if (!menuSubItem.hide || !menuSubItem.hide(data, context, index)) {\r\n <a mat-menu-item\r\n (click)=\"menuSubItem.event ? menuSubItem.event(data, context, index) : null\"\r\n [disabled]=\"menuSubItem.disable && menuSubItem.disable(data, context, index)\"\r\n [matTooltip]=\"menuItem.tooltip\">\r\n <mat-icon fontSet=\"{{menuSubItem.iconFontSet || 'material-symbols-outlined'}}\"\r\n [class]=\"menuSubItem.iconClass ?? '' | func:data:context\"\r\n [style.color]=\"menuSubItem.iconColor\">\r\n {{ (menuSubItem.icon ?? 'radio_button_unchecked' | func:data:context) || 'radio_button_unchecked' }}\r\n </mat-icon>\r\n <span [style.color]=\"menuSubItem.textColor\">{{menuSubItem.title | func:data:context}}</span>\r\n </a>\r\n }\r\n }\r\n </mat-menu>\r\n <!-- Trigger for submenu -->\r\n @if (!menuItem.hide || !menuItem.hide(data, context, index)) {\r\n <a mat-menu-item\r\n [matMenuTriggerFor]=\"subMenu\"\r\n [disabled]=\"menuItem.disable && menuItem.disable(data, context, index)\"\r\n [matTooltip]=\"menuItem.tooltip\">\r\n <mat-icon fontSet=\"{{menuItem.iconFontSet || 'material-symbols-outlined'}}\"\r\n [class]=\"menuItem.iconClass ?? '' | func:data:context\"\r\n [style.color]=\"menuItem.iconColor\">\r\n {{ (menuItem.icon ?? 'radio_button_unchecked' | func:data:context) || 'radio_button_unchecked' }}\r\n </mat-icon>\r\n <span [style.color]=\"menuItem.textColor\">{{menuItem.title | func:data:context}}</span>\r\n </a>\r\n }\r\n }\r\n }\r\n </mat-menu>\r\n <!-- #endregion -->\r\n }\r\n </div>\r\n}", dependencies: [{ 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"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { 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$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: FuncPipe, name: "func" }] });
|
|
14786
14827
|
}
|
|
14787
14828
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VdDynamicMenuComponent, decorators: [{
|
|
14788
14829
|
type: Component,
|
|
@@ -14793,7 +14834,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
14793
14834
|
MatButtonModule,
|
|
14794
14835
|
MatTooltipModule,
|
|
14795
14836
|
FuncPipe
|
|
14796
|
-
], template: "<!-- Container row layout for displaying action items horizontally, aligned center vertically -->\r\n@if (items) {\r\n
|
|
14837
|
+
], template: "<!-- Container row layout for displaying action items horizontally, aligned center vertically -->\r\n@if (items) {\r\n <div layout=\"row\" layout-align=\"start center\" flex>\r\n @for (menu of items; track menu) {\r\n <!-- #region Button trigger for actions that open a submenu -->\r\n @if (!contextMenu && menu?.items?.length && !(menu.hide && menu.hide(data, context, index))) {\r\n <a mat-icon-button\r\n [mat-menu-trigger-for]=\"matMenu\"\r\n [disabled]=\"data?.locked || (menu?.disable && menu?.disable(data, context, index))\"\r\n [matTooltip]=\"menu.tooltip\"\r\n (click)=\"$event.stopPropagation();\">\r\n <!-- Display menu icon -->\r\n <mat-icon fontSet=\"{{menu.iconFontSet || 'material-symbols-outlined'}}\"\r\n [class]=\"menu.iconClass ?? '' | func:data:context\"\r\n [style.color]=\"menu.iconColor\">\r\n {{ (menu.icon ?? 'more_vert' | func:data:context) || 'more_vert' }}\r\n </mat-icon>\r\n <!-- Optional title next to icon -->\r\n <span [style.color]=\"menu.textColor\">{{menu.title | func:data:context}}</span>\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Invisible context menu trigger used for right-click context positioning -->\r\n @if (contextMenu) {\r\n <div style=\"visibility: hidden; position: fixed\"\r\n [style.left]=\"contextMenuPosition.x\"\r\n [style.top]=\"contextMenuPosition.y\"\r\n [matMenuTriggerFor]=\"matMenu\"></div>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Direct action button (no submenu) -->\r\n @if (!menu?.items?.length && !(menu.hide && menu.hide(data, context, index))) {\r\n <a mat-icon-button\r\n [disabled]=\"data?.locked || (menu?.disable && menu?.disable(data, context, index))\"\r\n [matTooltip]=\"menu.tooltip\"\r\n (click)=\"$event.stopPropagation(); menu.event ? menu.event(data, context, index) : null\">\r\n <!-- Icon for the action -->\r\n <mat-icon fontSet=\"{{menu.iconFontSet || 'material-symbols-outlined'}}\"\r\n [class]=\"menu.iconClass ?? '' | func:data:context\"\r\n [style.color]=\"menu.iconColor\">\r\n {{ (menu.icon ?? 'radio_button_unchecked' | func:data:context) || 'radio_button_unchecked' }}\r\n </mat-icon>\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region MatMenu with nested submenus -->\r\n <mat-menu x-position=\"before\" #matMenu=\"matMenu\">\r\n @for (menuItem of menu?.items; track menuItem) {\r\n <!-- Simple menu item without sub-items -->\r\n @if (!menuItem.items) {\r\n @if (!menuItem.hide || !menuItem.hide(data, context, index)) {\r\n <a mat-menu-item\r\n (click)=\"menuItem.event ? menuItem.event(data, context, index) : null\"\r\n [disabled]=\"menuItem.disable && menuItem.disable(data, context, index)\"\r\n [matTooltip]=\"menuItem.tooltip\">\r\n <mat-icon fontSet=\"{{menuItem.iconFontSet || 'material-symbols-outlined'}}\"\r\n [class]=\"menuItem.iconClass ?? '' | func:data:context\"\r\n [style.color]=\"menuItem.iconColor\">\r\n {{ (menuItem.icon ?? 'radio_button_unchecked' | func:data:context) || 'radio_button_unchecked' }}\r\n </mat-icon>\r\n <span [style.color]=\"menuItem.textColor\">{{menuItem.title | func:data:context}}</span>\r\n </a>\r\n }\r\n }\r\n <!-- Menu item with nested submenu -->\r\n @if (menuItem.items) {\r\n <!-- Define the submenu -->\r\n <mat-menu x-position=\"before\" #subMenu=\"matMenu\">\r\n @for (menuSubItem of menuItem.items; track menuSubItem) {\r\n @if (!menuSubItem.hide || !menuSubItem.hide(data, context, index)) {\r\n <a mat-menu-item\r\n (click)=\"menuSubItem.event ? menuSubItem.event(data, context, index) : null\"\r\n [disabled]=\"menuSubItem.disable && menuSubItem.disable(data, context, index)\"\r\n [matTooltip]=\"menuItem.tooltip\">\r\n <mat-icon fontSet=\"{{menuSubItem.iconFontSet || 'material-symbols-outlined'}}\"\r\n [class]=\"menuSubItem.iconClass ?? '' | func:data:context\"\r\n [style.color]=\"menuSubItem.iconColor\">\r\n {{ (menuSubItem.icon ?? 'radio_button_unchecked' | func:data:context) || 'radio_button_unchecked' }}\r\n </mat-icon>\r\n <span [style.color]=\"menuSubItem.textColor\">{{menuSubItem.title | func:data:context}}</span>\r\n </a>\r\n }\r\n }\r\n </mat-menu>\r\n <!-- Trigger for submenu -->\r\n @if (!menuItem.hide || !menuItem.hide(data, context, index)) {\r\n <a mat-menu-item\r\n [matMenuTriggerFor]=\"subMenu\"\r\n [disabled]=\"menuItem.disable && menuItem.disable(data, context, index)\"\r\n [matTooltip]=\"menuItem.tooltip\">\r\n <mat-icon fontSet=\"{{menuItem.iconFontSet || 'material-symbols-outlined'}}\"\r\n [class]=\"menuItem.iconClass ?? '' | func:data:context\"\r\n [style.color]=\"menuItem.iconColor\">\r\n {{ (menuItem.icon ?? 'radio_button_unchecked' | func:data:context) || 'radio_button_unchecked' }}\r\n </mat-icon>\r\n <span [style.color]=\"menuItem.textColor\">{{menuItem.title | func:data:context}}</span>\r\n </a>\r\n }\r\n }\r\n }\r\n </mat-menu>\r\n <!-- #endregion -->\r\n }\r\n </div>\r\n}" }]
|
|
14797
14838
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { matMenu: [{
|
|
14798
14839
|
type: ViewChild,
|
|
14799
14840
|
args: [MatMenu]
|
|
@@ -15434,6 +15475,12 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
15434
15475
|
}
|
|
15435
15476
|
return this.options?.filter((x) => x[this.optionValueProperty] == this._value)[0];
|
|
15436
15477
|
}
|
|
15478
|
+
/**
|
|
15479
|
+
* @property context
|
|
15480
|
+
* @description An optional context object that can be used to provide additional information for the component's behavior, such as dynamic hiding of options based on the context.
|
|
15481
|
+
* @type {any}
|
|
15482
|
+
*/
|
|
15483
|
+
context;
|
|
15437
15484
|
/**
|
|
15438
15485
|
* @property compareWith
|
|
15439
15486
|
* @description A function to compare the option values with the selected values.
|
|
@@ -15495,7 +15542,7 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
15495
15542
|
this.filteredOptions = this.options;
|
|
15496
15543
|
if (this.enum) {
|
|
15497
15544
|
this.filterable = this.enumMetadata != null;
|
|
15498
|
-
this.filteredOptions = this.options = this.enumMetadata ? EnumService.applyMetadata(this.enum, this.enumMetadata) : EnumService.toArray(this.enum, this.prefix);
|
|
15545
|
+
this.filteredOptions = this.options = this.enumMetadata ? EnumService.applyMetadata(this.enum, this.enumMetadata, this.context) : EnumService.toArray(this.enum, this.prefix);
|
|
15499
15546
|
/* Apply enum filters */
|
|
15500
15547
|
if (this._enumFilter && this.options) {
|
|
15501
15548
|
this.filteredOptions = this.options = this.options.filter(this._enumFilter);
|
|
@@ -15632,7 +15679,7 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
15632
15679
|
console.log(message, optionalParams);
|
|
15633
15680
|
}
|
|
15634
15681
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AbstractSelectFormField, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
15635
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: AbstractSelectFormField, isStandalone: true, inputs: { enum: "enum", enumMetadata: "enumMetadata", textPrefix: "textPrefix", optionTextProperty: "optionTextProperty", optionValueProperty: "optionValueProperty", matIconKey: "matIconKey", svgIconKey: "svgIconKey", fontSet: "fontSet", prefix: "prefix", options: "options", filteredOptions: "filteredOptions", filterable: "filterable", cache: "cache", selectFirst: "selectFirst", sortBy: "sortBy", mapper: "mapper", optionIcon: "optionIcon", defaultOption: "defaultOption", multiple: "multiple", sorted: "sorted", endpoint: "endpoint", params: "params", projection: "projection", loadData: "loadData", enumFilter: "enumFilter", disabled: "disabled", compareWith: "compareWith", searchField: "searchField" }, outputs: { onValueChange: "change", onItemChange: "itemChange", onSelected: "selected", onItemSelected: "itemSelected", onLaunch: "launch" }, usesInheritance: true, ngImport: i0 });
|
|
15682
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: AbstractSelectFormField, isStandalone: true, inputs: { enum: "enum", enumMetadata: "enumMetadata", textPrefix: "textPrefix", optionTextProperty: "optionTextProperty", optionValueProperty: "optionValueProperty", matIconKey: "matIconKey", svgIconKey: "svgIconKey", fontSet: "fontSet", prefix: "prefix", options: "options", filteredOptions: "filteredOptions", filterable: "filterable", cache: "cache", selectFirst: "selectFirst", sortBy: "sortBy", mapper: "mapper", optionIcon: "optionIcon", defaultOption: "defaultOption", multiple: "multiple", sorted: "sorted", endpoint: "endpoint", params: "params", projection: "projection", loadData: "loadData", enumFilter: "enumFilter", disabled: "disabled", context: "context", compareWith: "compareWith", searchField: "searchField" }, outputs: { onValueChange: "change", onItemChange: "itemChange", onSelected: "selected", onItemSelected: "itemSelected", onLaunch: "launch" }, usesInheritance: true, ngImport: i0 });
|
|
15636
15683
|
}
|
|
15637
15684
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AbstractSelectFormField, decorators: [{
|
|
15638
15685
|
type: Directive
|
|
@@ -15688,6 +15735,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
15688
15735
|
type: Input
|
|
15689
15736
|
}], disabled: [{
|
|
15690
15737
|
type: Input
|
|
15738
|
+
}], context: [{
|
|
15739
|
+
type: Input
|
|
15691
15740
|
}], compareWith: [{
|
|
15692
15741
|
type: Input
|
|
15693
15742
|
}], onValueChange: [{
|
|
@@ -15904,7 +15953,7 @@ class VdSelectComponent extends AbstractSelectFormField {
|
|
|
15904
15953
|
provide: MAT_SELECT_CONFIG,
|
|
15905
15954
|
useValue: { overlayPanelClass: 'vd-select-filter-overlay' }
|
|
15906
15955
|
}
|
|
15907
|
-
], queries: [{ propertyName: "optionTemplate", first: true, predicate: VdSelectOptionDirective, descendants: true }, { propertyName: "triggerTemplate", first: true, predicate: VdSelectTriggerDirective, descendants: true }], viewQueries: [{ propertyName: "selectEl", first: true, predicate: MatSelect, descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-select [placeholder]=\"placeholder\" i18n-placeholder [(ngModel)]=\"value\" #select=\"matSelect\" (selectionChange)=\"handleChange($event)\" [hidden]=\"readonly\" [multiple]=\"multiple\" [compareWith]=\"compareWith??defaultCompareWith\" [disabled]=\"disabled\" flex>\n <!-- #region Filter input -->\n <div class=\"mat-mdc-form-field mat-form-field-appearance-fill flex\">\n <div class=\"mat-mdc-text-field-wrapper mdc-text-field mdc-text-field--filled mdc-text-field--no-label\">\n <div class=\"mat-mdc-form-field-focus-overlay\"></div>\n <div class=\"mat-mdc-form-field-flex\">\n <div class=\"mat-mdc-form-field-infix\" layout=\"row\" flex>\n <input matInput #filterInput type=\"text\" placeholder=\"Filter...\" class=\"mat-mdc-input-element vd-select-filter mat-mdc-form-field-input-control mdc-text-field__input\" (keyup)=\"handleFilter($event)\" flex>\n @if (filterInput?.value) {\n <mat-icon (click)=\"filterInput!.value = ''; handleFilter($event);\" fontSet=\"material-symbols-outlined\">close</mat-icon>\n }\n </div>\n </div>\n <div class=\"mdc-line-ripple\"></div>\n </div>\n </div>\n <!-- #endregion -->\n\n <!-- #region Trigger for launch button -->\n @if (onLaunch.observers.length > 0) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n <mat-icon class=\"vd-select-launch\" (click)=\"$event.stopPropagation(); handleLaunchClicked(value)\">launch</mat-icon>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Custom trigger template -->\n @if (!onLaunch.observers.length && triggerTemplate?.templateRef) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n @if (triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"triggerTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: selectedOptions }\"></ng-template>\n }\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Option template as trigger -->\n @if (!onLaunch.observers.length && !triggerTemplate?.templateRef && optionTemplate?.templateRef) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplateDefault [ngTemplateOutlet]=\"optionIconTemplateDefault\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n }\n <!-- #endregion -->\n @if (optionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n }\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Trigger for icons -->\n @if (!triggerTemplate?.templateRef && !optionTemplate?.templateRef) {\n <mat-select-trigger>\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplate [ngTemplateOutlet]=\"optionIconTemplate\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n }\n <!-- #endregion -->\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Default option -->\n @if (!multiple && defaultOption) {\n <mat-option class=\"tc-grey-500\" i18n=\"@@pleaseSelect\">--- Please Select ---</mat-option>\n }\n <!-- #endregion -->\n\n <!-- #region Options -->\n @for (option of filteredOptions; track option; let first = $first) {\n <mat-option [value]=\"mapper ? option : option[optionValueProperty]\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n @if (!optionTemplate?.templateRef) {\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n }\n @if (optionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n }\n </mat-option>\n }\n <!-- #endregion -->\n</mat-select>\n\n<!-- #region Read only value -->\n@if (readonly) {\n <div>\n @if (currentValue) {\n <div>\n <div class=\"readonly-value\">\n @if (!optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <span>\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{currentValue[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"currentValue[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <span> </span>\n <span i18n=\"@@selection\">{currentValue[optionTextProperty], select, option {option} other {{{currentValue[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span>, </span>\n }\n }\n </span>\n </span>\n }\n @if (triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"triggerTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: currentValue }\"></ng-template>\n }\n @if (optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: currentValue, text: currentValue[optionTextProperty] }\"></ng-template>\n }\n </div>\n @if (onLaunch.observers.length > 0) {\n <mat-icon class=\"vd-select-launch-readonly\" (click)=\"$event.stopPropagation(); handleLaunchClicked(value)\">launch</mat-icon>\n }\n </div>\n }\n @if (!currentValue) {\n <div> </div>\n }\n </div>\n}\n<!-- #endregion -->", styles: [".vd-select-launch{position:absolute;right:30px;top:-5px;font-size:18px;cursor:pointer}.readonly-value{padding-right:24px;opacity:.6;min-height:15px}.vd-select-launch-readonly{position:absolute;right:0;top:9px;font-size:18px;cursor:pointer}.vd-select-filter-wrap{background:inherit;position:sticky;top:-8px;box-sizing:border-box;z-index:100}.vd-select-filter-wrap .vd-select-filter-inner{z-index:100;display:flex;flex-direction:row;align-items:center;background:inherit}.vd-select-filter-wrap .vd-select-filter-inner .vd-select-filter{box-shadow:none;padding:16px 16px 16px 0;box-sizing:border-box;width:100%;border:none;background-color:inherit;color:inherit}.vd-select-filter-wrap .vd-select-filter-inner .vd-select-filter:focus-visible{border:none;outline:none}.vd-select-filter-wrap .mat-divider{display:block;width:100%;border-top-width:1px;border-top-style:solid;box-sizing:border-box}::ng-deep .mat-mdc-select-trigger{display:flex!important}::ng-deep .mat-mdc-select-trigger .mat-icon{display:flex;margin-right:8px}::ng-deep .mat-mdc-form-field-type-vd-select-chip .mat-mdc-form-field-infix{padding-top:7px!important;padding-bottom:7px!important}::ng-deep .mat-mdc-form-field-type-vd-select-chip .mat-mdc-chip{padding-top:0!important;padding-bottom:0!important;margin-top:2px!important;margin-bottom:2px!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
15956
|
+
], queries: [{ propertyName: "optionTemplate", first: true, predicate: VdSelectOptionDirective, descendants: true }, { propertyName: "triggerTemplate", first: true, predicate: VdSelectTriggerDirective, descendants: true }], viewQueries: [{ propertyName: "selectEl", first: true, predicate: MatSelect, descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-select [placeholder]=\"placeholder\" i18n-placeholder [(ngModel)]=\"value\" #select=\"matSelect\" (selectionChange)=\"handleChange($event)\" [hidden]=\"readonly\" [multiple]=\"multiple\" [compareWith]=\"compareWith??defaultCompareWith\" [disabled]=\"disabled\" flex>\n <!-- #region Filter input -->\n <div class=\"mat-mdc-form-field mat-form-field-appearance-fill flex\">\n <div class=\"mat-mdc-text-field-wrapper mdc-text-field mdc-text-field--filled mdc-text-field--no-label\">\n <div class=\"mat-mdc-form-field-focus-overlay\"></div>\n <div class=\"mat-mdc-form-field-flex\">\n <div class=\"mat-mdc-form-field-infix\" layout=\"row\" flex>\n <input matInput #filterInput type=\"text\" placeholder=\"Filter...\" class=\"mat-mdc-input-element vd-select-filter mat-mdc-form-field-input-control mdc-text-field__input\" (keyup)=\"handleFilter($event)\" flex>\n @if (filterInput?.value) {\n <mat-icon (click)=\"filterInput!.value = ''; handleFilter($event);\" fontSet=\"material-symbols-outlined\">close</mat-icon>\n }\n </div>\n </div>\n <div class=\"mdc-line-ripple\"></div>\n </div>\n </div>\n <!-- #endregion -->\n\n <!-- #region Trigger for launch button -->\n @if (onLaunch.observers.length > 0) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n <mat-icon class=\"vd-select-launch\" (click)=\"$event.stopPropagation(); handleLaunchClicked(value)\">launch</mat-icon>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Custom trigger template -->\n @if (!onLaunch.observers.length && triggerTemplate?.templateRef) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n @if (triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"triggerTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: selectedOptions }\"></ng-template>\n }\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Option template as trigger -->\n @if (!onLaunch.observers.length && !triggerTemplate?.templateRef && optionTemplate?.templateRef) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplateDefault [ngTemplateOutlet]=\"optionIconTemplateDefault\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n }\n <!-- #endregion -->\n @if (optionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n }\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Trigger for icons -->\n @if (!triggerTemplate?.templateRef && !optionTemplate?.templateRef) {\n <mat-select-trigger>\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplate [ngTemplateOutlet]=\"optionIconTemplate\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n }\n <!-- #endregion -->\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Default option -->\n @if (!multiple && defaultOption) {\n <mat-option class=\"tc-grey-500\" i18n=\"@@pleaseSelect\">--- Please Select ---</mat-option>\n }\n <!-- #endregion -->\n\n <!-- #region Options -->\n @for (option of filteredOptions; track option; let first = $first) {\n <mat-option [value]=\"mapper ? option : option[optionValueProperty]\" [disabled]=\"option?.disabled\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n @if (!optionTemplate?.templateRef) {\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n }\n @if (optionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n }\n </mat-option>\n }\n <!-- #endregion -->\n</mat-select>\n\n<!-- #region Read only value -->\n@if (readonly) {\n <div>\n @if (currentValue) {\n <div>\n <div class=\"readonly-value\">\n @if (!optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <span>\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{currentValue[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"currentValue[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <span> </span>\n <span i18n=\"@@selection\">{currentValue[optionTextProperty], select, option {option} other {{{currentValue[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span>, </span>\n }\n }\n </span>\n </span>\n }\n @if (triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"triggerTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: currentValue }\"></ng-template>\n }\n @if (optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: currentValue, text: currentValue[optionTextProperty] }\"></ng-template>\n }\n </div>\n @if (onLaunch.observers.length > 0) {\n <mat-icon class=\"vd-select-launch-readonly\" (click)=\"$event.stopPropagation(); handleLaunchClicked(value)\">launch</mat-icon>\n }\n </div>\n }\n @if (!currentValue) {\n <div> </div>\n }\n </div>\n }\n <!-- #endregion -->", styles: [".vd-select-launch{position:absolute;right:30px;top:-5px;font-size:18px;cursor:pointer}.readonly-value{padding-right:24px;opacity:.6;min-height:15px}.vd-select-launch-readonly{position:absolute;right:0;top:9px;font-size:18px;cursor:pointer}.vd-select-filter-wrap{background:inherit;position:sticky;top:-8px;box-sizing:border-box;z-index:100}.vd-select-filter-wrap .vd-select-filter-inner{z-index:100;display:flex;flex-direction:row;align-items:center;background:inherit}.vd-select-filter-wrap .vd-select-filter-inner .vd-select-filter{box-shadow:none;padding:16px 16px 16px 0;box-sizing:border-box;width:100%;border:none;background-color:inherit;color:inherit}.vd-select-filter-wrap .vd-select-filter-inner .vd-select-filter:focus-visible{border:none;outline:none}.vd-select-filter-wrap .mat-divider{display:block;width:100%;border-top-width:1px;border-top-style:solid;box-sizing:border-box}::ng-deep .mat-mdc-select-trigger{display:flex!important}::ng-deep .mat-mdc-select-trigger .mat-icon{display:flex;margin-right:8px}::ng-deep .mat-mdc-form-field-type-vd-select-chip .mat-mdc-form-field-infix{padding-top:7px!important;padding-bottom:7px!important}::ng-deep .mat-mdc-form-field-type-vd-select-chip .mat-mdc-chip{padding-top:0!important;padding-bottom:0!important;margin-top:2px!important;margin-bottom:2px!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
15908
15957
|
}
|
|
15909
15958
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VdSelectComponent, decorators: [{
|
|
15910
15959
|
type: Component,
|
|
@@ -15921,7 +15970,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
15921
15970
|
provide: MAT_SELECT_CONFIG,
|
|
15922
15971
|
useValue: { overlayPanelClass: 'vd-select-filter-overlay' }
|
|
15923
15972
|
}
|
|
15924
|
-
], template: "<mat-select [placeholder]=\"placeholder\" i18n-placeholder [(ngModel)]=\"value\" #select=\"matSelect\" (selectionChange)=\"handleChange($event)\" [hidden]=\"readonly\" [multiple]=\"multiple\" [compareWith]=\"compareWith??defaultCompareWith\" [disabled]=\"disabled\" flex>\n <!-- #region Filter input -->\n <div class=\"mat-mdc-form-field mat-form-field-appearance-fill flex\">\n <div class=\"mat-mdc-text-field-wrapper mdc-text-field mdc-text-field--filled mdc-text-field--no-label\">\n <div class=\"mat-mdc-form-field-focus-overlay\"></div>\n <div class=\"mat-mdc-form-field-flex\">\n <div class=\"mat-mdc-form-field-infix\" layout=\"row\" flex>\n <input matInput #filterInput type=\"text\" placeholder=\"Filter...\" class=\"mat-mdc-input-element vd-select-filter mat-mdc-form-field-input-control mdc-text-field__input\" (keyup)=\"handleFilter($event)\" flex>\n @if (filterInput?.value) {\n <mat-icon (click)=\"filterInput!.value = ''; handleFilter($event);\" fontSet=\"material-symbols-outlined\">close</mat-icon>\n }\n </div>\n </div>\n <div class=\"mdc-line-ripple\"></div>\n </div>\n </div>\n <!-- #endregion -->\n\n <!-- #region Trigger for launch button -->\n @if (onLaunch.observers.length > 0) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n <mat-icon class=\"vd-select-launch\" (click)=\"$event.stopPropagation(); handleLaunchClicked(value)\">launch</mat-icon>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Custom trigger template -->\n @if (!onLaunch.observers.length && triggerTemplate?.templateRef) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n @if (triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"triggerTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: selectedOptions }\"></ng-template>\n }\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Option template as trigger -->\n @if (!onLaunch.observers.length && !triggerTemplate?.templateRef && optionTemplate?.templateRef) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplateDefault [ngTemplateOutlet]=\"optionIconTemplateDefault\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n }\n <!-- #endregion -->\n @if (optionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n }\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Trigger for icons -->\n @if (!triggerTemplate?.templateRef && !optionTemplate?.templateRef) {\n <mat-select-trigger>\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplate [ngTemplateOutlet]=\"optionIconTemplate\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n }\n <!-- #endregion -->\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Default option -->\n @if (!multiple && defaultOption) {\n <mat-option class=\"tc-grey-500\" i18n=\"@@pleaseSelect\">--- Please Select ---</mat-option>\n }\n <!-- #endregion -->\n\n <!-- #region Options -->\n @for (option of filteredOptions; track option; let first = $first) {\n <mat-option [value]=\"mapper ? option : option[optionValueProperty]\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n @if (!optionTemplate?.templateRef) {\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n }\n @if (optionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n }\n </mat-option>\n }\n <!-- #endregion -->\n</mat-select>\n\n<!-- #region Read only value -->\n@if (readonly) {\n <div>\n @if (currentValue) {\n <div>\n <div class=\"readonly-value\">\n @if (!optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <span>\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{currentValue[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"currentValue[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <span> </span>\n <span i18n=\"@@selection\">{currentValue[optionTextProperty], select, option {option} other {{{currentValue[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span>, </span>\n }\n }\n </span>\n </span>\n }\n @if (triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"triggerTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: currentValue }\"></ng-template>\n }\n @if (optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: currentValue, text: currentValue[optionTextProperty] }\"></ng-template>\n }\n </div>\n @if (onLaunch.observers.length > 0) {\n <mat-icon class=\"vd-select-launch-readonly\" (click)=\"$event.stopPropagation(); handleLaunchClicked(value)\">launch</mat-icon>\n }\n </div>\n }\n @if (!currentValue) {\n <div> </div>\n }\n </div>\n}\n<!-- #endregion -->", styles: [".vd-select-launch{position:absolute;right:30px;top:-5px;font-size:18px;cursor:pointer}.readonly-value{padding-right:24px;opacity:.6;min-height:15px}.vd-select-launch-readonly{position:absolute;right:0;top:9px;font-size:18px;cursor:pointer}.vd-select-filter-wrap{background:inherit;position:sticky;top:-8px;box-sizing:border-box;z-index:100}.vd-select-filter-wrap .vd-select-filter-inner{z-index:100;display:flex;flex-direction:row;align-items:center;background:inherit}.vd-select-filter-wrap .vd-select-filter-inner .vd-select-filter{box-shadow:none;padding:16px 16px 16px 0;box-sizing:border-box;width:100%;border:none;background-color:inherit;color:inherit}.vd-select-filter-wrap .vd-select-filter-inner .vd-select-filter:focus-visible{border:none;outline:none}.vd-select-filter-wrap .mat-divider{display:block;width:100%;border-top-width:1px;border-top-style:solid;box-sizing:border-box}::ng-deep .mat-mdc-select-trigger{display:flex!important}::ng-deep .mat-mdc-select-trigger .mat-icon{display:flex;margin-right:8px}::ng-deep .mat-mdc-form-field-type-vd-select-chip .mat-mdc-form-field-infix{padding-top:7px!important;padding-bottom:7px!important}::ng-deep .mat-mdc-form-field-type-vd-select-chip .mat-mdc-chip{padding-top:0!important;padding-bottom:0!important;margin-top:2px!important;margin-bottom:2px!important}\n"] }]
|
|
15973
|
+
], template: "<mat-select [placeholder]=\"placeholder\" i18n-placeholder [(ngModel)]=\"value\" #select=\"matSelect\" (selectionChange)=\"handleChange($event)\" [hidden]=\"readonly\" [multiple]=\"multiple\" [compareWith]=\"compareWith??defaultCompareWith\" [disabled]=\"disabled\" flex>\n <!-- #region Filter input -->\n <div class=\"mat-mdc-form-field mat-form-field-appearance-fill flex\">\n <div class=\"mat-mdc-text-field-wrapper mdc-text-field mdc-text-field--filled mdc-text-field--no-label\">\n <div class=\"mat-mdc-form-field-focus-overlay\"></div>\n <div class=\"mat-mdc-form-field-flex\">\n <div class=\"mat-mdc-form-field-infix\" layout=\"row\" flex>\n <input matInput #filterInput type=\"text\" placeholder=\"Filter...\" class=\"mat-mdc-input-element vd-select-filter mat-mdc-form-field-input-control mdc-text-field__input\" (keyup)=\"handleFilter($event)\" flex>\n @if (filterInput?.value) {\n <mat-icon (click)=\"filterInput!.value = ''; handleFilter($event);\" fontSet=\"material-symbols-outlined\">close</mat-icon>\n }\n </div>\n </div>\n <div class=\"mdc-line-ripple\"></div>\n </div>\n </div>\n <!-- #endregion -->\n\n <!-- #region Trigger for launch button -->\n @if (onLaunch.observers.length > 0) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n <mat-icon class=\"vd-select-launch\" (click)=\"$event.stopPropagation(); handleLaunchClicked(value)\">launch</mat-icon>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Custom trigger template -->\n @if (!onLaunch.observers.length && triggerTemplate?.templateRef) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n @if (triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"triggerTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: selectedOptions }\"></ng-template>\n }\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Option template as trigger -->\n @if (!onLaunch.observers.length && !triggerTemplate?.templateRef && optionTemplate?.templateRef) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplateDefault [ngTemplateOutlet]=\"optionIconTemplateDefault\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n }\n <!-- #endregion -->\n @if (optionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n }\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Trigger for icons -->\n @if (!triggerTemplate?.templateRef && !optionTemplate?.templateRef) {\n <mat-select-trigger>\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplate [ngTemplateOutlet]=\"optionIconTemplate\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n }\n <!-- #endregion -->\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Default option -->\n @if (!multiple && defaultOption) {\n <mat-option class=\"tc-grey-500\" i18n=\"@@pleaseSelect\">--- Please Select ---</mat-option>\n }\n <!-- #endregion -->\n\n <!-- #region Options -->\n @for (option of filteredOptions; track option; let first = $first) {\n <mat-option [value]=\"mapper ? option : option[optionValueProperty]\" [disabled]=\"option?.disabled\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n @if (!optionTemplate?.templateRef) {\n <span i18n=\"@@selection\">{option[optionTextProperty], select, option {option} other {{{option[optionTextProperty]}}}}</span>\n }\n @if (optionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n }\n </mat-option>\n }\n <!-- #endregion -->\n</mat-select>\n\n<!-- #region Read only value -->\n@if (readonly) {\n <div>\n @if (currentValue) {\n <div>\n <div class=\"readonly-value\">\n @if (!optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <span>\n <span layout=\"row\" layout-align=\"start center\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n <span layout=\"row\" layout-align=\"start center\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{currentValue[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"currentValue[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"option.icon?.svgIcon\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <span> </span>\n <span i18n=\"@@selection\">{currentValue[optionTextProperty], select, option {option} other {{{currentValue[optionTextProperty]}}}}</span>\n </span>\n @if (!last) {\n <span>, </span>\n }\n }\n </span>\n </span>\n }\n @if (triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"triggerTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: currentValue }\"></ng-template>\n }\n @if (optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: currentValue, text: currentValue[optionTextProperty] }\"></ng-template>\n }\n </div>\n @if (onLaunch.observers.length > 0) {\n <mat-icon class=\"vd-select-launch-readonly\" (click)=\"$event.stopPropagation(); handleLaunchClicked(value)\">launch</mat-icon>\n }\n </div>\n }\n @if (!currentValue) {\n <div> </div>\n }\n </div>\n }\n <!-- #endregion -->", styles: [".vd-select-launch{position:absolute;right:30px;top:-5px;font-size:18px;cursor:pointer}.readonly-value{padding-right:24px;opacity:.6;min-height:15px}.vd-select-launch-readonly{position:absolute;right:0;top:9px;font-size:18px;cursor:pointer}.vd-select-filter-wrap{background:inherit;position:sticky;top:-8px;box-sizing:border-box;z-index:100}.vd-select-filter-wrap .vd-select-filter-inner{z-index:100;display:flex;flex-direction:row;align-items:center;background:inherit}.vd-select-filter-wrap .vd-select-filter-inner .vd-select-filter{box-shadow:none;padding:16px 16px 16px 0;box-sizing:border-box;width:100%;border:none;background-color:inherit;color:inherit}.vd-select-filter-wrap .vd-select-filter-inner .vd-select-filter:focus-visible{border:none;outline:none}.vd-select-filter-wrap .mat-divider{display:block;width:100%;border-top-width:1px;border-top-style:solid;box-sizing:border-box}::ng-deep .mat-mdc-select-trigger{display:flex!important}::ng-deep .mat-mdc-select-trigger .mat-icon{display:flex;margin-right:8px}::ng-deep .mat-mdc-form-field-type-vd-select-chip .mat-mdc-form-field-infix{padding-top:7px!important;padding-bottom:7px!important}::ng-deep .mat-mdc-form-field-type-vd-select-chip .mat-mdc-chip{padding-top:0!important;padding-bottom:0!important;margin-top:2px!important;margin-bottom:2px!important}\n"] }]
|
|
15925
15974
|
}], ctorParameters: () => [], propDecorators: { optionTemplate: [{
|
|
15926
15975
|
type: ContentChild,
|
|
15927
15976
|
args: [VdSelectOptionDirective]
|
|
@@ -19795,13 +19844,18 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
19795
19844
|
route;
|
|
19796
19845
|
changeDetectorRef;
|
|
19797
19846
|
/**
|
|
19798
|
-
|
|
19799
|
-
|
|
19847
|
+
* The action of the form (add | edit).
|
|
19848
|
+
*/
|
|
19800
19849
|
action = 'add';
|
|
19801
19850
|
/**
|
|
19802
19851
|
* Indicates if the form is in edit mode.
|
|
19803
19852
|
*/
|
|
19804
19853
|
isEditMode = false;
|
|
19854
|
+
/**
|
|
19855
|
+
* Whether to automatically initialize a new form instance if
|
|
19856
|
+
* no existing record is found in the database.
|
|
19857
|
+
*/
|
|
19858
|
+
initializeDefaultOnEmpty = false;
|
|
19805
19859
|
/**
|
|
19806
19860
|
* Save action enumeration.
|
|
19807
19861
|
*/
|
|
@@ -19869,6 +19923,11 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
19869
19923
|
* Disabled flag.
|
|
19870
19924
|
*/
|
|
19871
19925
|
disabled = false;
|
|
19926
|
+
/**
|
|
19927
|
+
* Emitted when the form has been fully initialized
|
|
19928
|
+
* and is ready to be accessed or modified.
|
|
19929
|
+
*/
|
|
19930
|
+
formInitialized = new EventEmitter();
|
|
19872
19931
|
/**
|
|
19873
19932
|
* The current date.
|
|
19874
19933
|
*/
|
|
@@ -20064,6 +20123,17 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20064
20123
|
if (errorCallback) {
|
|
20065
20124
|
errorCallback(error);
|
|
20066
20125
|
}
|
|
20126
|
+
/* If the error indicates that the item was not found and initializeDefaultOnEmpty is true, initialize a new form instance */
|
|
20127
|
+
const isNotFound = error?.status === 404 || (typeof error === 'string' && error.includes('404'));
|
|
20128
|
+
/* If the error status is 404 (Not Found) and initializeDefaultOnEmpty is true, initialize a new form instance */
|
|
20129
|
+
if (this.initializeDefaultOnEmpty && isNotFound) {
|
|
20130
|
+
/* Set the form to edit mode to allow creating a new item */
|
|
20131
|
+
this.isEditMode = false;
|
|
20132
|
+
/* Initialize a new item with default values and the provided ID */
|
|
20133
|
+
this.item = Object.assign(this.newInstance(), { id: this.id });
|
|
20134
|
+
/* Build the form for the new item */
|
|
20135
|
+
this.buildForm();
|
|
20136
|
+
}
|
|
20067
20137
|
}
|
|
20068
20138
|
});
|
|
20069
20139
|
}
|
|
@@ -20276,9 +20346,85 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20276
20346
|
form['submitted'] = true;
|
|
20277
20347
|
/* Update value and validity */
|
|
20278
20348
|
form.updateValueAndValidity();
|
|
20349
|
+
/* Check if the form is valid and show error messages if not */
|
|
20350
|
+
this.isFormValid(form);
|
|
20279
20351
|
}
|
|
20352
|
+
else {
|
|
20353
|
+
/* Print some debug information */
|
|
20354
|
+
this.debugForm(form);
|
|
20355
|
+
}
|
|
20356
|
+
}
|
|
20357
|
+
/**
|
|
20358
|
+
* Checks if the form is valid.
|
|
20359
|
+
* This method validates the form, marks invalid controls, and shows error messages if any.
|
|
20360
|
+
* @param form The form to check for validity.
|
|
20361
|
+
* @returns A boolean indicating whether the form is valid.
|
|
20362
|
+
*/
|
|
20363
|
+
isFormValid(form) {
|
|
20280
20364
|
/* Print some debug information */
|
|
20281
20365
|
this.debugForm(form);
|
|
20366
|
+
if (form && !form.valid) {
|
|
20367
|
+
/* Mark invalid controls recursively as dirty and touched */
|
|
20368
|
+
this.markControlsAsInvalid(form);
|
|
20369
|
+
/* Show error messages */
|
|
20370
|
+
(async () => {
|
|
20371
|
+
/* Wait until 'mat-error' is displayed in the DOM */
|
|
20372
|
+
await new Promise(y => setTimeout(y, 250));
|
|
20373
|
+
const errors = new Array();
|
|
20374
|
+
this.collectErrors(form, errors);
|
|
20375
|
+
/* Build error message: show first 3 specific errors or a generic one */
|
|
20376
|
+
const message = errors.length
|
|
20377
|
+
? errors.slice(0, 3).join('\n')
|
|
20378
|
+
: $localize `:@@snackbar.error.required-fields:All fields marked with an asterisk (*) are required.`;
|
|
20379
|
+
/* Show a notice */
|
|
20380
|
+
this.snackBarService.open(message, 'Ok', { duration: 3000, panelClass: ['error'] });
|
|
20381
|
+
})();
|
|
20382
|
+
return false;
|
|
20383
|
+
}
|
|
20384
|
+
return true;
|
|
20385
|
+
}
|
|
20386
|
+
/**
|
|
20387
|
+
* Recursively marks controls as invalid and touched.
|
|
20388
|
+
* This method traverses the form controls and marks any invalid controls as dirty and touched to trigger validation messages in the UI.
|
|
20389
|
+
* @param container The form group, array, or control to traverse.
|
|
20390
|
+
*/
|
|
20391
|
+
markControlsAsInvalid(container) {
|
|
20392
|
+
if (container instanceof FormGroup || container instanceof FormArray) {
|
|
20393
|
+
Object.keys(container.controls).forEach(key => {
|
|
20394
|
+
const control = container.controls[key];
|
|
20395
|
+
this.markControlsAsInvalid(control);
|
|
20396
|
+
});
|
|
20397
|
+
}
|
|
20398
|
+
else {
|
|
20399
|
+
if (!container.valid) {
|
|
20400
|
+
this.invalidateControl(container);
|
|
20401
|
+
}
|
|
20402
|
+
}
|
|
20403
|
+
}
|
|
20404
|
+
/**
|
|
20405
|
+
* Recursively parses the form to collect error messages from the DOM.
|
|
20406
|
+
* This method traverses the form controls and attempts to find associated error messages in the DOM, collecting them into an array.
|
|
20407
|
+
* @param container The form group, array, or control to traverse.
|
|
20408
|
+
* @param errors The array to collect error messages into.
|
|
20409
|
+
*/
|
|
20410
|
+
collectErrors(container, errors) {
|
|
20411
|
+
if (container instanceof FormGroup || container instanceof FormArray) {
|
|
20412
|
+
Object.keys(container.controls).forEach(key => {
|
|
20413
|
+
const control = container.controls[key];
|
|
20414
|
+
if (!control.valid) {
|
|
20415
|
+
/* Attempt to find the DOM element by its formControlName or ID */
|
|
20416
|
+
const element = control?.nativeElement;
|
|
20417
|
+
if (element) {
|
|
20418
|
+
const error = this.getElementError(element);
|
|
20419
|
+
if (error && !errors.includes(error)) {
|
|
20420
|
+
errors.push(error);
|
|
20421
|
+
}
|
|
20422
|
+
}
|
|
20423
|
+
/* Dive deeper for nested groups/arrays */
|
|
20424
|
+
this.collectErrors(control, errors);
|
|
20425
|
+
}
|
|
20426
|
+
});
|
|
20427
|
+
}
|
|
20282
20428
|
}
|
|
20283
20429
|
/**
|
|
20284
20430
|
* Checks if the form is valid.
|
|
@@ -20286,7 +20432,7 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20286
20432
|
* @param form The form to check for validity.
|
|
20287
20433
|
* @returns A boolean indicating whether the form is valid.
|
|
20288
20434
|
*/
|
|
20289
|
-
|
|
20435
|
+
isFormValidOld(form) {
|
|
20290
20436
|
/* Print some debug information */
|
|
20291
20437
|
this.debugForm(form);
|
|
20292
20438
|
/* If the form is not valid */
|
|
@@ -20336,6 +20482,15 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20336
20482
|
ctr.updateValueAndValidity();
|
|
20337
20483
|
});
|
|
20338
20484
|
}
|
|
20485
|
+
/**
|
|
20486
|
+
* Manually triggers the formInitialized event.
|
|
20487
|
+
* Useful when a parent component needs to access the form after asynchronous data has loaded.
|
|
20488
|
+
*/
|
|
20489
|
+
triggerFormInitialized() {
|
|
20490
|
+
if (this.form) {
|
|
20491
|
+
this.formInitialized?.emit(this.form);
|
|
20492
|
+
}
|
|
20493
|
+
}
|
|
20339
20494
|
/**
|
|
20340
20495
|
* Invalidates controls recursively.
|
|
20341
20496
|
* This method marks all controls in the group as dirty and touched if they are invalid.
|
|
@@ -20360,22 +20515,54 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20360
20515
|
}
|
|
20361
20516
|
/**
|
|
20362
20517
|
* Shows form errors.
|
|
20363
|
-
* This method logs form control errors to the console if debugging is enabled.
|
|
20364
|
-
* @param form The form to debug.
|
|
20518
|
+
* This method logs form control errors to the console recursively if debugging is enabled.
|
|
20519
|
+
* @param form The form or control container to debug.
|
|
20520
|
+
* @param path The current path in the form hierarchy (used for recursive logging).
|
|
20365
20521
|
*/
|
|
20366
|
-
debugForm(form) {
|
|
20522
|
+
debugForm(form, path = 'root') {
|
|
20523
|
+
/* Check if debugging is enabled and form exists */
|
|
20367
20524
|
if (form && this.debug) {
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
|
|
20376
|
-
|
|
20525
|
+
/* If at the root, log the entire form object once */
|
|
20526
|
+
if (path === 'root') {
|
|
20527
|
+
console.log('Form:', form);
|
|
20528
|
+
}
|
|
20529
|
+
/* Handle FormGroups and FormArrays which contain controls */
|
|
20530
|
+
if (form instanceof FormGroup || form instanceof FormArray || form.controls) {
|
|
20531
|
+
const controls = form.controls;
|
|
20532
|
+
Object.keys(controls).forEach(key => {
|
|
20533
|
+
const control = controls[key];
|
|
20534
|
+
const currentPath = `${path} -> ${key}`;
|
|
20535
|
+
/* Get errors for the current control */
|
|
20536
|
+
const controlErrors = control.errors;
|
|
20537
|
+
if (controlErrors != null) {
|
|
20538
|
+
Object.keys(controlErrors).forEach(keyError => {
|
|
20539
|
+
console.log(`[DEBUG] Path: ${currentPath}, keyError: ${keyError}, value:`, controlErrors[keyError]);
|
|
20540
|
+
});
|
|
20541
|
+
}
|
|
20542
|
+
/* Recursively call debugForm for nested groups or arrays */
|
|
20543
|
+
this.debugForm(control, currentPath);
|
|
20544
|
+
});
|
|
20545
|
+
}
|
|
20377
20546
|
}
|
|
20378
20547
|
}
|
|
20548
|
+
// /**
|
|
20549
|
+
// * Shows form errors.
|
|
20550
|
+
// * This method logs form control errors to the console if debugging is enabled.
|
|
20551
|
+
// * @param form The form to debug.
|
|
20552
|
+
// */
|
|
20553
|
+
// protected debugForm(form?: NgForm | FormGroup | FormArray): void {
|
|
20554
|
+
// if (form && this.debug) {
|
|
20555
|
+
// console.log('Form:', form);
|
|
20556
|
+
// Object.keys(form.controls).forEach(key => {
|
|
20557
|
+
// const controlErrors: ValidationErrors | null = form.controls[key].errors;
|
|
20558
|
+
// if (controlErrors != null) {
|
|
20559
|
+
// Object.keys(controlErrors).forEach(keyError => {
|
|
20560
|
+
// console.log('Key control: ' + key + ', keyError: ' + keyError + ', err value: ', controlErrors[keyError]);
|
|
20561
|
+
// });
|
|
20562
|
+
// }
|
|
20563
|
+
// });
|
|
20564
|
+
// }
|
|
20565
|
+
// }
|
|
20379
20566
|
/**
|
|
20380
20567
|
* Adds toolbar menu items.
|
|
20381
20568
|
* This method adds the 'Delete' menu item to the toolbar if the entity is deletable.
|
|
@@ -20557,6 +20744,9 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20557
20744
|
* such as disabling form controls if the form is set to be disabled.
|
|
20558
20745
|
*/
|
|
20559
20746
|
onAfterFormBuild() {
|
|
20747
|
+
/* Emit form initialized event */
|
|
20748
|
+
this.triggerFormInitialized();
|
|
20749
|
+
/* Disable the form if the 'disabled' property is set */
|
|
20560
20750
|
if (this.form && this.disabled) {
|
|
20561
20751
|
Object.keys(this.form.controls).forEach(key => {
|
|
20562
20752
|
let control = this.form.controls[key];
|
|
@@ -20614,12 +20804,12 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20614
20804
|
*/
|
|
20615
20805
|
getElementError(nativeElement) {
|
|
20616
20806
|
/* Get parent element 'mat-form-field' */
|
|
20617
|
-
var matFormField = nativeElement?.closest('
|
|
20807
|
+
var matFormField = nativeElement?.closest('mat-form-field');
|
|
20618
20808
|
if (!matFormField) {
|
|
20619
20809
|
return undefined;
|
|
20620
20810
|
}
|
|
20621
20811
|
/* Get child element 'mat-error' */
|
|
20622
|
-
var matErrors = matFormField.querySelectorAll('
|
|
20812
|
+
var matErrors = matFormField.querySelectorAll('mat-error');
|
|
20623
20813
|
if (!matErrors) {
|
|
20624
20814
|
return undefined;
|
|
20625
20815
|
}
|
|
@@ -20632,7 +20822,7 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20632
20822
|
var errorsArray = Array.prototype.slice.call(matErrors)
|
|
20633
20823
|
?.filter((x) => x.textContent)
|
|
20634
20824
|
?.map((x) => x.textContent);
|
|
20635
|
-
return
|
|
20825
|
+
return `${matLabel.textContent}: ${errorsArray?.join(', ')}`;
|
|
20636
20826
|
}
|
|
20637
20827
|
/**
|
|
20638
20828
|
* Responds to user-initiated keyboard events.
|
|
@@ -20662,11 +20852,13 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20662
20852
|
}
|
|
20663
20853
|
}
|
|
20664
20854
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: GenericFormBaseComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
20665
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: GenericFormBaseComponent, isStandalone: true, inputs: { id: "id", _item: "_item", item: "item", includes: "includes", updateIncludes: "updateIncludes", projection: "projection", query: "query", readonly: "readonly", disabled: "disabled", form: "form", fieldSets: "fieldSets" }, host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" } }, viewQueries: [{ propertyName: "matStepper", first: true, predicate: MatStepper, descendants: true }, { propertyName: "input", predicate: ["focus"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
20855
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: GenericFormBaseComponent, isStandalone: true, inputs: { initializeDefaultOnEmpty: "initializeDefaultOnEmpty", id: "id", _item: "_item", item: "item", includes: "includes", updateIncludes: "updateIncludes", projection: "projection", query: "query", readonly: "readonly", disabled: "disabled", form: "form", fieldSets: "fieldSets" }, outputs: { formInitialized: "formInitialized" }, host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" } }, viewQueries: [{ propertyName: "matStepper", first: true, predicate: MatStepper, descendants: true }, { propertyName: "input", predicate: ["focus"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
20666
20856
|
}
|
|
20667
20857
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: GenericFormBaseComponent, decorators: [{
|
|
20668
20858
|
type: Directive
|
|
20669
|
-
}], ctorParameters: () => [{ type: i0.Type }, { type: undefined }, { type: i1$2.ActivatedRoute }, { type: i0.ChangeDetectorRef }], propDecorators: {
|
|
20859
|
+
}], ctorParameters: () => [{ type: i0.Type }, { type: undefined }, { type: i1$2.ActivatedRoute }, { type: i0.ChangeDetectorRef }], propDecorators: { initializeDefaultOnEmpty: [{
|
|
20860
|
+
type: Input
|
|
20861
|
+
}], id: [{
|
|
20670
20862
|
type: Input
|
|
20671
20863
|
}], _item: [{
|
|
20672
20864
|
type: Input
|
|
@@ -20684,6 +20876,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
20684
20876
|
type: Input
|
|
20685
20877
|
}], disabled: [{
|
|
20686
20878
|
type: Input
|
|
20879
|
+
}], formInitialized: [{
|
|
20880
|
+
type: Output
|
|
20687
20881
|
}], matStepper: [{
|
|
20688
20882
|
type: ViewChild,
|
|
20689
20883
|
args: [MatStepper]
|
|
@@ -21866,7 +22060,7 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
21866
22060
|
provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,
|
|
21867
22061
|
useValue: { overlayPanelClass: 'vd-chips-autocomplete' }
|
|
21868
22062
|
}
|
|
21869
|
-
], queries: [{ propertyName: "chipTemplate", first: true, predicate: VdChipDirective, descendants: true }, { propertyName: "autocompleteOptionTemplate", first: true, predicate: VdAutocompleteOptionDirective, descendants: true }], viewQueries: [{ propertyName: "dynamicTable", first: true, predicate: VdDynamicTableComponent, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }, { propertyName: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-chip-grid #chipList [required]=\"required\" [disabled]=\"readonly\">\n <!-- #region Chips -->\n @for (chip of chips; track chip; let first = $first; let index = $index) {\n <mat-chip-row [removable]=\"!readonly\" (removed)=\"handleRemovedEvent()\" disableRipple>\n <span class=\"vd-chip-content\">\n @if (!chipTemplate?.templateRef) {\n <span>\n @if (!autocompleteOptionTemplate?.templateRef) {\n <span>{{ chip }}</span>\n }\n @if (autocompleteOptionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\n }\n </span>\n }\n @if (chipTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"chipTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ chip: chip }\"></ng-template>\n }\n </span>\n @for (button of suffixButtons; track button; let first = $first) {\n <a matChipTrailingIcon [hidden]=\"button.hide && button.hide(chips[0], context)\" (click)=\"$event.stopPropagation(); button.event && button.event(chips[0], context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{button.icon}}</mat-icon>\n </a>\n }\n @if ((onLaunch.observers.length) > 0) {\n <a matChipTrailingIcon (click)=\"$event.stopPropagation(); handleLaunchClicked()\">\n <mat-icon fontSet=\"material-symbols-outlined\">launch</mat-icon>\n </a>\n }\n @if (!readonly) {\n <a matChipTrailingIcon (click)=\"handleRemovedEvent()\">\n <mat-icon fontSet=\"material-symbols-outlined\">close</mat-icon>\n </a>\n }\n </mat-chip-row>\n }\n <!-- #endregion -->\n\n <!-- #region Search box -->\n <input matInput [hidden]=\"value && !empty\" placeholder=\"{{placeholder}}\" (focus)=\"connect()\" [readonly]=\"readonly\" [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" [matAutocompleteConnectedTo]=\"origin\" [formControl]=\"autoCompleteChipList\" (blur)=\"customValue && addOnBlur($event)\" #filterInput />\n <!-- #endregion -->\n\n <!-- #region Reset button -->\n @if ((!value || empty) && !readonly && !disabled) {\n <a trailingIcon class=\"mat-mdc-select-arrow\" (click)=\"filterInput.value = ''\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" class=\"ng-tns-c184-21\">\n <path d=\"M7 10l5 5 5-5z\" class=\"ng-tns-c184-21\"></path>\n </svg>\n </a>\n }\n <!-- #endregion -->\n</mat-chip-grid>\n\n<!-- #region Autocomplete -->\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"addChip($event.option.value, filterInput)\" class=\"{{autocompleteCssClass}}{{classType?' table-autocomplete':''}}\">\n @for (item of dataSource?.items; track item; let first = $first) {\n <ng-template *ngIf=\"!classType && opened\" let-item let-first=\"first\" [ngForOf]=\"dataSource?.items\">\n <mat-option [value]=\"item\">\n @if (!autocompleteOptionTemplate?.templateRef) {\n <span>{{item}}</span>\n }\n @if (autocompleteOptionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: item }\"></ng-template>\n }\n </mat-option>\n </ng-template>\n }\n @if (classType && opened) {\n <mat-option hide=\"true\"></mat-option>\n <vd-dynamic-table [dataSource]=\"dataSource\" [classType]=\"classType\" [entityObject]=\"entityObject\" [parentControl]=\"parentControl\" [context]=\"context\" [stickyHeader]=\"true\" (rowClick)=\"addChip($event, filterInput)\" matSort [sortActive]=\"sortActive||'id'\" [sortDirection]=\"sortDirection\"></vd-dynamic-table>\n }\n <div class=\"vd-chips-paginator\">\n <mat-divider></mat-divider>\n <mat-paginator [length]=\"dataSource?.total\" [pageIndex]=\"dataSource?.pageIndex\" [pageSize]=\"dataSource?.pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\" hidePageSize=\"true\"></mat-paginator>\n </div>\n</mat-autocomplete>\n<!-- #endregion -->\n\n<div matAutocompleteOrigin #origin=\"matAutocompleteOrigin\" class=\"autocomplete-origin\"></div>", styles: [":host ::ng-deep .mat-mdc-chip-set{width:100%}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips{margin-left:0!important;margin-right:0;align-items:center}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip{display:flex;flex-direction:row;width:100%;padding:0 5px;justify-content:center;background-color:transparent!important;margin-right:0!important;margin-left:0!important;padding:0!important;margin:0;height:initial}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip.mdc-evolution-chip--disabled{opacity:.6;pointer-events:all}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mdc-evolution-chip__action{justify-content:left}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mdc-evolution-chip__action--primary{padding-left:0}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mdc-evolution-chip__cell--trailing{margin-right:-10px;display:flex}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mat-mdc-chip-focus-overlay{background-color:transparent!important}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mat-icon{cursor:pointer;font-size:1.2em;opacity:.8}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip.mat-chip-disabled{opacity:.6}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .vd-chip-content{-ms-flex-positive:1!important;flex-grow:1!important;font-weight:initial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;justify-content:center}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .vd-chip-launch{font-size:18px;position:absolute;right:4px;top:0;cursor:pointer}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .vd-chip-launch.removable{right:34px}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip .mdc-evolution-chip__action--primary:before,:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip--disabled .mdc-evolution-chip__action--primary:before{border-color:transparent!important}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip .mdc-evolution-chip__text-label,:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:inherit!important}:host ::ng-deep .autocomplete-origin{position:absolute;width:calc(100% + 28px);bottom:0;height:2px;margin-left:-14px}mat-spinner{margin-top:-9px;margin-right:6px}.mat-mdc-form-field-infix{display:flex}::ng-deep .vd-chips-autocomplete .mat-mdc-autocomplete-panel{padding:0!important}::ng-deep .vd-chips-autocomplete .table-autocomplete{overflow:hidden}::ng-deep .vd-chips-autocomplete .table-autocomplete .mat-table-container{height:calc(100% - 56px)!important;max-height:100vh!important}::ng-deep .vd-chips-autocomplete .vd-chips-paginator{position:sticky;bottom:0}::ng-deep .vd-chips-autocomplete .vd-chips-paginator .mat-mdc-paginator .mat-mdc-paginator-container{padding:0}::ng-deep .vd-chips-autocomplete .vd-chips-paginator .mat-mdc-paginator .mat-mdc-paginator-container .mat-mdc-paginator-range-actions .mat-mdc-paginator-range-label{margin:0 16px 0 24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i4.MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i6$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i5$1.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "component", type: i5$1.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "directive", type: i5$1.MatChipTrailingIcon, selector: "mat-chip-trailing-icon, [matChipTrailingIcon]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: VdDynamicTableComponent, selector: "vd-dynamic-table", inputs: ["dataSource", "data", "parentControl", "entityObject", "formArray", "debugValue", "classType", "context", "dataSourceFilter", "static", "filterable", "sticky", "tableWidth", "useFilterOperator", "paginable", "selectable", "sortActive", "sortDirection", "stickyHeader", "stickyFilter", "columnSets", "rowNgClass", "detailsTemplate", "readonly", "selectAllFilter", "paginatorRef", "columns", "rowMenuItems", "rowAction", "excludedColumns", "pageSize", "pageSizeOptions"], outputs: ["rowClick"] }] });
|
|
22063
|
+
], queries: [{ propertyName: "chipTemplate", first: true, predicate: VdChipDirective, descendants: true }, { propertyName: "autocompleteOptionTemplate", first: true, predicate: VdAutocompleteOptionDirective, descendants: true }], viewQueries: [{ propertyName: "dynamicTable", first: true, predicate: VdDynamicTableComponent, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }, { propertyName: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-chip-grid #chipList [required]=\"required\" [disabled]=\"readonly\">\n <!-- #region Chips -->\n @for (chip of chips; track chip; let first = $first; let index = $index) {\n <mat-chip-row [removable]=\"!readonly\" (removed)=\"handleRemovedEvent()\" disableRipple>\n <span class=\"vd-chip-content\">\n @if (!chipTemplate?.templateRef) {\n <span>\n @if (!autocompleteOptionTemplate?.templateRef) {\n <span>{{ chip }}</span>\n }\n @if (autocompleteOptionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\n }\n </span>\n }\n @if (chipTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"chipTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ chip: chip }\"></ng-template>\n }\n </span>\n @for (button of suffixButtons; track button; let first = $first) {\n <a matChipTrailingIcon [hidden]=\"button.hide && button.hide(chips[0], context)\" (click)=\"$event.stopPropagation(); button.event && button.event(chips[0], context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{button.icon}}</mat-icon>\n </a>\n }\n @if ((onLaunch.observers.length) > 0) {\n <a matChipTrailingIcon (click)=\"$event.stopPropagation(); handleLaunchClicked()\">\n <mat-icon fontSet=\"material-symbols-outlined\">launch</mat-icon>\n </a>\n }\n @if (!readonly) {\n <a matChipTrailingIcon (click)=\"handleRemovedEvent()\">\n <mat-icon fontSet=\"material-symbols-outlined\">close</mat-icon>\n </a>\n }\n </mat-chip-row>\n }\n <!-- #endregion -->\n\n <!-- #region Search box -->\n <input matInput [hidden]=\"value && !empty\" placeholder=\"{{placeholder}}\" (focus)=\"connect()\" [readonly]=\"readonly\" [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" [matAutocompleteConnectedTo]=\"origin\" [formControl]=\"autoCompleteChipList\" (blur)=\"customValue && addOnBlur($event)\" #filterInput />\n <!-- #endregion -->\n\n <!-- #region Reset button -->\n @if ((!value || empty) && !readonly && !disabled) {\n <a trailingIcon class=\"mat-mdc-select-arrow\" (click)=\"filterInput.value = ''\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" class=\"ng-tns-c184-21\">\n <path d=\"M7 10l5 5 5-5z\" class=\"ng-tns-c184-21\"></path>\n </svg>\n </a>\n }\n <!-- #endregion -->\n</mat-chip-grid>\n\n<!-- #region Autocomplete -->\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"addChip($event.option.value, filterInput)\" class=\"{{autocompleteCssClass}}{{classType?' table-autocomplete':''}}\">\n @if(!classType && opened)\n {\n @for (item of dataSource?.items; track item; let first = $first; let last = $last) {\n <mat-option [value]=\"item\">\n @if (!autocompleteOptionTemplate?.templateRef) {\n <span>{{item}}</span>\n }\n @if (autocompleteOptionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: item }\"></ng-template>\n }\n </mat-option>\n <mat-divider *ngIf=\"!last\"></mat-divider>\n }\n }\n @if (classType && opened) {\n <mat-option hide=\"true\"></mat-option>\n <vd-dynamic-table [dataSource]=\"dataSource\" [classType]=\"classType\" [entityObject]=\"entityObject\" [parentControl]=\"parentControl\" [context]=\"context\" [stickyHeader]=\"true\" (rowClick)=\"addChip($event, filterInput)\" matSort [sortActive]=\"sortActive||'id'\" [sortDirection]=\"sortDirection\"></vd-dynamic-table>\n }\n <div class=\"vd-chips-paginator\">\n <mat-divider></mat-divider>\n <mat-paginator [length]=\"dataSource?.total\" [pageIndex]=\"dataSource?.pageIndex\" [pageSize]=\"dataSource?.pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\" hidePageSize=\"true\"></mat-paginator>\n </div>\n</mat-autocomplete>\n<!-- #endregion -->\n\n<div matAutocompleteOrigin #origin=\"matAutocompleteOrigin\" class=\"autocomplete-origin\"></div>", styles: [":host ::ng-deep .mat-mdc-chip-set{width:100%}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips{margin-left:0!important;margin-right:0;align-items:center}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip{display:flex;flex-direction:row;width:100%;padding:0 5px;justify-content:center;background-color:transparent!important;margin-right:0!important;margin-left:0!important;padding:0!important;margin:0;height:initial}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip.mdc-evolution-chip--disabled{opacity:.6;pointer-events:all}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mdc-evolution-chip__action{justify-content:left}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mdc-evolution-chip__action--primary{padding-left:0}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mdc-evolution-chip__cell--trailing{margin-right:-10px;display:flex}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mat-mdc-chip-focus-overlay{background-color:transparent!important}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mat-icon{cursor:pointer;font-size:1.2em;opacity:.8}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip.mat-chip-disabled{opacity:.6}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .vd-chip-content{-ms-flex-positive:1!important;flex-grow:1!important;font-weight:initial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;justify-content:center}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .vd-chip-launch{font-size:18px;position:absolute;right:4px;top:0;cursor:pointer}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .vd-chip-launch.removable{right:34px}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip .mdc-evolution-chip__action--primary:before,:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip--disabled .mdc-evolution-chip__action--primary:before{border-color:transparent!important}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip .mdc-evolution-chip__text-label,:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:inherit!important}:host ::ng-deep .autocomplete-origin{position:absolute;width:calc(100% + 28px);bottom:0;height:2px;margin-left:-14px}mat-spinner{margin-top:-9px;margin-right:6px}.mat-mdc-form-field-infix{display:flex}::ng-deep .vd-chips-autocomplete .mat-mdc-autocomplete-panel{padding:0!important}::ng-deep .vd-chips-autocomplete .table-autocomplete{overflow:hidden}::ng-deep .vd-chips-autocomplete .table-autocomplete .mat-table-container{height:calc(100% - 56px)!important;max-height:100vh!important}::ng-deep .vd-chips-autocomplete .vd-chips-paginator{position:sticky;bottom:0}::ng-deep .vd-chips-autocomplete .vd-chips-paginator .mat-mdc-paginator .mat-mdc-paginator-container{padding:0}::ng-deep .vd-chips-autocomplete .vd-chips-paginator .mat-mdc-paginator .mat-mdc-paginator-container .mat-mdc-paginator-range-actions .mat-mdc-paginator-range-label{margin:0 16px 0 24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i4.MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i6$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i5$1.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "component", type: i5$1.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "directive", type: i5$1.MatChipTrailingIcon, selector: "mat-chip-trailing-icon, [matChipTrailingIcon]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: VdDynamicTableComponent, selector: "vd-dynamic-table", inputs: ["dataSource", "data", "parentControl", "entityObject", "formArray", "debugValue", "classType", "context", "dataSourceFilter", "static", "filterable", "sticky", "tableWidth", "useFilterOperator", "paginable", "selectable", "sortActive", "sortDirection", "stickyHeader", "stickyFilter", "columnSets", "rowNgClass", "detailsTemplate", "readonly", "selectAllFilter", "paginatorRef", "columns", "rowMenuItems", "rowAction", "excludedColumns", "pageSize", "pageSizeOptions"], outputs: ["rowClick"] }] });
|
|
21870
22064
|
}
|
|
21871
22065
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VdChipsComponent, decorators: [{
|
|
21872
22066
|
type: Component,
|
|
@@ -21886,7 +22080,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
21886
22080
|
MatIconModule,
|
|
21887
22081
|
MatInputModule,
|
|
21888
22082
|
VdDynamicTableComponent,
|
|
21889
|
-
], template: "<mat-chip-grid #chipList [required]=\"required\" [disabled]=\"readonly\">\n <!-- #region Chips -->\n @for (chip of chips; track chip; let first = $first; let index = $index) {\n <mat-chip-row [removable]=\"!readonly\" (removed)=\"handleRemovedEvent()\" disableRipple>\n <span class=\"vd-chip-content\">\n @if (!chipTemplate?.templateRef) {\n <span>\n @if (!autocompleteOptionTemplate?.templateRef) {\n <span>{{ chip }}</span>\n }\n @if (autocompleteOptionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\n }\n </span>\n }\n @if (chipTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"chipTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ chip: chip }\"></ng-template>\n }\n </span>\n @for (button of suffixButtons; track button; let first = $first) {\n <a matChipTrailingIcon [hidden]=\"button.hide && button.hide(chips[0], context)\" (click)=\"$event.stopPropagation(); button.event && button.event(chips[0], context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{button.icon}}</mat-icon>\n </a>\n }\n @if ((onLaunch.observers.length) > 0) {\n <a matChipTrailingIcon (click)=\"$event.stopPropagation(); handleLaunchClicked()\">\n <mat-icon fontSet=\"material-symbols-outlined\">launch</mat-icon>\n </a>\n }\n @if (!readonly) {\n <a matChipTrailingIcon (click)=\"handleRemovedEvent()\">\n <mat-icon fontSet=\"material-symbols-outlined\">close</mat-icon>\n </a>\n }\n </mat-chip-row>\n }\n <!-- #endregion -->\n\n <!-- #region Search box -->\n <input matInput [hidden]=\"value && !empty\" placeholder=\"{{placeholder}}\" (focus)=\"connect()\" [readonly]=\"readonly\" [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" [matAutocompleteConnectedTo]=\"origin\" [formControl]=\"autoCompleteChipList\" (blur)=\"customValue && addOnBlur($event)\" #filterInput />\n <!-- #endregion -->\n\n <!-- #region Reset button -->\n @if ((!value || empty) && !readonly && !disabled) {\n <a trailingIcon class=\"mat-mdc-select-arrow\" (click)=\"filterInput.value = ''\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" class=\"ng-tns-c184-21\">\n <path d=\"M7 10l5 5 5-5z\" class=\"ng-tns-c184-21\"></path>\n </svg>\n </a>\n }\n <!-- #endregion -->\n</mat-chip-grid>\n\n<!-- #region Autocomplete -->\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"addChip($event.option.value, filterInput)\" class=\"{{autocompleteCssClass}}{{classType?' table-autocomplete':''}}\">\n @for (item of dataSource?.items; track item; let first = $first
|
|
22083
|
+
], template: "<mat-chip-grid #chipList [required]=\"required\" [disabled]=\"readonly\">\n <!-- #region Chips -->\n @for (chip of chips; track chip; let first = $first; let index = $index) {\n <mat-chip-row [removable]=\"!readonly\" (removed)=\"handleRemovedEvent()\" disableRipple>\n <span class=\"vd-chip-content\">\n @if (!chipTemplate?.templateRef) {\n <span>\n @if (!autocompleteOptionTemplate?.templateRef) {\n <span>{{ chip }}</span>\n }\n @if (autocompleteOptionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\n }\n </span>\n }\n @if (chipTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"chipTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ chip: chip }\"></ng-template>\n }\n </span>\n @for (button of suffixButtons; track button; let first = $first) {\n <a matChipTrailingIcon [hidden]=\"button.hide && button.hide(chips[0], context)\" (click)=\"$event.stopPropagation(); button.event && button.event(chips[0], context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{button.icon}}</mat-icon>\n </a>\n }\n @if ((onLaunch.observers.length) > 0) {\n <a matChipTrailingIcon (click)=\"$event.stopPropagation(); handleLaunchClicked()\">\n <mat-icon fontSet=\"material-symbols-outlined\">launch</mat-icon>\n </a>\n }\n @if (!readonly) {\n <a matChipTrailingIcon (click)=\"handleRemovedEvent()\">\n <mat-icon fontSet=\"material-symbols-outlined\">close</mat-icon>\n </a>\n }\n </mat-chip-row>\n }\n <!-- #endregion -->\n\n <!-- #region Search box -->\n <input matInput [hidden]=\"value && !empty\" placeholder=\"{{placeholder}}\" (focus)=\"connect()\" [readonly]=\"readonly\" [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" [matAutocompleteConnectedTo]=\"origin\" [formControl]=\"autoCompleteChipList\" (blur)=\"customValue && addOnBlur($event)\" #filterInput />\n <!-- #endregion -->\n\n <!-- #region Reset button -->\n @if ((!value || empty) && !readonly && !disabled) {\n <a trailingIcon class=\"mat-mdc-select-arrow\" (click)=\"filterInput.value = ''\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" class=\"ng-tns-c184-21\">\n <path d=\"M7 10l5 5 5-5z\" class=\"ng-tns-c184-21\"></path>\n </svg>\n </a>\n }\n <!-- #endregion -->\n</mat-chip-grid>\n\n<!-- #region Autocomplete -->\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"addChip($event.option.value, filterInput)\" class=\"{{autocompleteCssClass}}{{classType?' table-autocomplete':''}}\">\n @if(!classType && opened)\n {\n @for (item of dataSource?.items; track item; let first = $first; let last = $last) {\n <mat-option [value]=\"item\">\n @if (!autocompleteOptionTemplate?.templateRef) {\n <span>{{item}}</span>\n }\n @if (autocompleteOptionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ option: item }\"></ng-template>\n }\n </mat-option>\n <mat-divider *ngIf=\"!last\"></mat-divider>\n }\n }\n @if (classType && opened) {\n <mat-option hide=\"true\"></mat-option>\n <vd-dynamic-table [dataSource]=\"dataSource\" [classType]=\"classType\" [entityObject]=\"entityObject\" [parentControl]=\"parentControl\" [context]=\"context\" [stickyHeader]=\"true\" (rowClick)=\"addChip($event, filterInput)\" matSort [sortActive]=\"sortActive||'id'\" [sortDirection]=\"sortDirection\"></vd-dynamic-table>\n }\n <div class=\"vd-chips-paginator\">\n <mat-divider></mat-divider>\n <mat-paginator [length]=\"dataSource?.total\" [pageIndex]=\"dataSource?.pageIndex\" [pageSize]=\"dataSource?.pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\" hidePageSize=\"true\"></mat-paginator>\n </div>\n</mat-autocomplete>\n<!-- #endregion -->\n\n<div matAutocompleteOrigin #origin=\"matAutocompleteOrigin\" class=\"autocomplete-origin\"></div>", styles: [":host ::ng-deep .mat-mdc-chip-set{width:100%}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips{margin-left:0!important;margin-right:0;align-items:center}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip{display:flex;flex-direction:row;width:100%;padding:0 5px;justify-content:center;background-color:transparent!important;margin-right:0!important;margin-left:0!important;padding:0!important;margin:0;height:initial}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip.mdc-evolution-chip--disabled{opacity:.6;pointer-events:all}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mdc-evolution-chip__action{justify-content:left}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mdc-evolution-chip__action--primary{padding-left:0}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mdc-evolution-chip__cell--trailing{margin-right:-10px;display:flex}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mat-mdc-chip-focus-overlay{background-color:transparent!important}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mat-icon{cursor:pointer;font-size:1.2em;opacity:.8}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip.mat-chip-disabled{opacity:.6}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .vd-chip-content{-ms-flex-positive:1!important;flex-grow:1!important;font-weight:initial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;justify-content:center}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .vd-chip-launch{font-size:18px;position:absolute;right:4px;top:0;cursor:pointer}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .vd-chip-launch.removable{right:34px}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip .mdc-evolution-chip__action--primary:before,:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip--disabled .mdc-evolution-chip__action--primary:before{border-color:transparent!important}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip .mdc-evolution-chip__text-label,:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:inherit!important}:host ::ng-deep .autocomplete-origin{position:absolute;width:calc(100% + 28px);bottom:0;height:2px;margin-left:-14px}mat-spinner{margin-top:-9px;margin-right:6px}.mat-mdc-form-field-infix{display:flex}::ng-deep .vd-chips-autocomplete .mat-mdc-autocomplete-panel{padding:0!important}::ng-deep .vd-chips-autocomplete .table-autocomplete{overflow:hidden}::ng-deep .vd-chips-autocomplete .table-autocomplete .mat-table-container{height:calc(100% - 56px)!important;max-height:100vh!important}::ng-deep .vd-chips-autocomplete .vd-chips-paginator{position:sticky;bottom:0}::ng-deep .vd-chips-autocomplete .vd-chips-paginator .mat-mdc-paginator .mat-mdc-paginator-container{padding:0}::ng-deep .vd-chips-autocomplete .vd-chips-paginator .mat-mdc-paginator .mat-mdc-paginator-container .mat-mdc-paginator-range-actions .mat-mdc-paginator-range-label{margin:0 16px 0 24px}\n"] }]
|
|
21890
22084
|
}], ctorParameters: () => [{ type: VdMediaService }], propDecorators: { dynamicTable: [{
|
|
21891
22085
|
type: ViewChild,
|
|
21892
22086
|
args: [VdDynamicTableComponent, { static: false }]
|
|
@@ -22644,6 +22838,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
22644
22838
|
args: ['keydown', ['$event']]
|
|
22645
22839
|
}] } });
|
|
22646
22840
|
|
|
22841
|
+
class RemoveWhitespaceDirective {
|
|
22842
|
+
ngControl;
|
|
22843
|
+
/**
|
|
22844
|
+
* Optional condition to enable or disable the whitespace removal.
|
|
22845
|
+
* Use as [removeWhitespace]="condition" or simply removeWhitespace.
|
|
22846
|
+
*/
|
|
22847
|
+
IsEnabled = true;
|
|
22848
|
+
/**
|
|
22849
|
+
* Directive to remove all types of whitespace (spaces, tabs, newlines) from the input value.
|
|
22850
|
+
* @param ngControl The Angular form control associated with the input element.
|
|
22851
|
+
*/
|
|
22852
|
+
constructor(ngControl) {
|
|
22853
|
+
this.ngControl = ngControl;
|
|
22854
|
+
}
|
|
22855
|
+
/**
|
|
22856
|
+
* Event handler for the input event, removing all types of whitespace from the input value.
|
|
22857
|
+
* @param value The current value of the input element.
|
|
22858
|
+
*/
|
|
22859
|
+
OnInput(value) {
|
|
22860
|
+
/* If the directive is explicitly set to false, do nothing */
|
|
22861
|
+
if (this.IsEnabled === false || this.IsEnabled === 'false') {
|
|
22862
|
+
return;
|
|
22863
|
+
}
|
|
22864
|
+
/* Remove all types of whitespace (spaces, tabs, newlines) from the input value */
|
|
22865
|
+
const strippedValue = value.replace(/\s+/g, '');
|
|
22866
|
+
/* Only update if a change actually occurred to avoid unnecessary processing */
|
|
22867
|
+
if (value !== strippedValue) {
|
|
22868
|
+
/* Update the form control value without emitting an event to avoid triggering validation or other side effects */
|
|
22869
|
+
if (this.ngControl?.control) {
|
|
22870
|
+
/* Update the form control value without emitting an event to avoid triggering validation or other side effects */
|
|
22871
|
+
this.ngControl.control.setValue(strippedValue, { emitEvent: false });
|
|
22872
|
+
}
|
|
22873
|
+
/* If the value accessor is available, update the view value as well to reflect the changes in the input field */
|
|
22874
|
+
if (this.ngControl?.valueAccessor) {
|
|
22875
|
+
this.ngControl.valueAccessor.writeValue(strippedValue);
|
|
22876
|
+
}
|
|
22877
|
+
}
|
|
22878
|
+
}
|
|
22879
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: RemoveWhitespaceDirective, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
22880
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: RemoveWhitespaceDirective, isStandalone: true, selector: "[removeWhitespace]", inputs: { IsEnabled: ["removeWhitespace", "IsEnabled"] }, host: { listeners: { "input": "OnInput($event.target.value)" } }, ngImport: i0 });
|
|
22881
|
+
}
|
|
22882
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: RemoveWhitespaceDirective, decorators: [{
|
|
22883
|
+
type: Directive,
|
|
22884
|
+
args: [{
|
|
22885
|
+
selector: '[removeWhitespace]'
|
|
22886
|
+
}]
|
|
22887
|
+
}], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
|
|
22888
|
+
type: Optional
|
|
22889
|
+
}, {
|
|
22890
|
+
type: Self
|
|
22891
|
+
}] }], propDecorators: { IsEnabled: [{
|
|
22892
|
+
type: Input,
|
|
22893
|
+
args: ['removeWhitespace']
|
|
22894
|
+
}], OnInput: [{
|
|
22895
|
+
type: HostListener,
|
|
22896
|
+
args: ['input', ['$event.target.value']]
|
|
22897
|
+
}] } });
|
|
22898
|
+
|
|
22647
22899
|
/**
|
|
22648
22900
|
* VdGenericFormCustomFieldDirective class
|
|
22649
22901
|
*/
|
|
@@ -22703,6 +22955,56 @@ var FormFieldType;
|
|
|
22703
22955
|
FormFieldType[FormFieldType["Custom"] = 100] = "Custom";
|
|
22704
22956
|
})(FormFieldType || (FormFieldType = {}));
|
|
22705
22957
|
|
|
22958
|
+
class NativeElementInjectorDirective {
|
|
22959
|
+
elementRef;
|
|
22960
|
+
control;
|
|
22961
|
+
/**
|
|
22962
|
+
* Constructor
|
|
22963
|
+
* @param elementRef Reference to the host DOM element
|
|
22964
|
+
* @param control The Angular control associated with the element
|
|
22965
|
+
*/
|
|
22966
|
+
constructor(elementRef, control) {
|
|
22967
|
+
this.elementRef = elementRef;
|
|
22968
|
+
this.control = control;
|
|
22969
|
+
}
|
|
22970
|
+
/**
|
|
22971
|
+
* Called after the view is initialized.
|
|
22972
|
+
* We inject the nativeElement into the abstract control.
|
|
22973
|
+
*/
|
|
22974
|
+
ngAfterViewInit() {
|
|
22975
|
+
this.injectElement();
|
|
22976
|
+
}
|
|
22977
|
+
/**
|
|
22978
|
+
* Injects the native element into the control.
|
|
22979
|
+
*/
|
|
22980
|
+
injectElement() {
|
|
22981
|
+
/* Ensure the control exists (important for FormArrays) */
|
|
22982
|
+
if (this.control?.control) {
|
|
22983
|
+
/*
|
|
22984
|
+
* Injecting nativeElement into the AbstractControl.
|
|
22985
|
+
* This allows us to access it later in isFormValid via (control as any).nativeElement
|
|
22986
|
+
*/
|
|
22987
|
+
this.control.control.nativeElement = this.elementRef.nativeElement;
|
|
22988
|
+
}
|
|
22989
|
+
}
|
|
22990
|
+
/**
|
|
22991
|
+
* Cleanup to prevent memory leaks when elements are removed from FormArrays
|
|
22992
|
+
*/
|
|
22993
|
+
ngOnDestroy() {
|
|
22994
|
+
if (this.control?.control) {
|
|
22995
|
+
delete this.control.control.nativeElement;
|
|
22996
|
+
}
|
|
22997
|
+
}
|
|
22998
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NativeElementInjectorDirective, deps: [{ token: i0.ElementRef }, { token: i1$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
22999
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: NativeElementInjectorDirective, isStandalone: true, selector: "[ngModel], [formControl], [formControlName]", ngImport: i0 });
|
|
23000
|
+
}
|
|
23001
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NativeElementInjectorDirective, decorators: [{
|
|
23002
|
+
type: Directive,
|
|
23003
|
+
args: [{
|
|
23004
|
+
selector: '[ngModel], [formControl], [formControlName]'
|
|
23005
|
+
}]
|
|
23006
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.NgControl }] });
|
|
23007
|
+
|
|
22706
23008
|
/**
|
|
22707
23009
|
* @class VdEditorDirective
|
|
22708
23010
|
* @description The `VdEditorDirective` is a custom directive that attaches a `CdkPortal`
|
|
@@ -23225,7 +23527,7 @@ class VdGenericFormComponent {
|
|
|
23225
23527
|
console.log(message, optionalParams);
|
|
23226
23528
|
}
|
|
23227
23529
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VdGenericFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23228
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: VdGenericFormComponent, isStandalone: true, selector: "vd-generic-form", inputs: { formGroup: "formGroup", classType: "classType", formDefinition: "formDefinition", fieldGroups: "fieldGroups", groupName: "groupName", fieldSets: "fieldSets", context: "context", debugValue: "debugValue", readonly: "readonly", separatorKeysCodes: "separatorKeysCodes" }, queries: [{ propertyName: "editorTemplate", first: true, predicate: VdEditorDirective, descendants: true }, { propertyName: "codeTemplate", first: true, predicate: VdCodeDirective, descendants: true }, { propertyName: "fileTemplate", first: true, predicate: VdFileDirective, descendants: true }, { propertyName: "customTemplate", first: true, predicate: VdCustomDirective, descendants: true }, { propertyName: "bottom", first: true, predicate: ["bottom"], descendants: true }, { propertyName: "customFields", first: true, predicate: ["customFields"], descendants: true }, { propertyName: "customFieldsTemplates", predicate: VdGenericFormCustomFieldDirective }], ngImport: i0, template: "@if (formGroup && fieldRows) {\n <div [formGroup]=\"formGroup!\">\n <!-- #region Fields -->\n @for (fields of fieldRows; track fields; let i = $index) {\n <div layout-gt-sm=\"row\" layout=\"column\">\n @for (field of fields; track field) {\n @if (!field.hidden && !(field.hide && field.hide(formValue, formGroup, context))) {\n @switch (field.type) {\n <!-- #region Text input -->\n @case (FormFieldType.Text) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input matInput\n [type]=\"field.inputType ?? 'text'\"\n [minlength]=\"field.minLength | func:formValue:formGroup:context\"\n [maxlength]=\"field.maxLength | func:formValue:formGroup:context\"\n [min]=\"field.min\" [max]=\"field.max\"\n [formControlName]=\"field.name!\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [pattern]=\"((field.pattern | func:formValue:formGroup:context)??'')\"\n [autoFocus]=\"((field.focus | func:formValue:formGroup:context)??false)\"\n [selectText]=\"((field.selectText | func:formValue:formGroup:context)??false)\"\n [onlyNumber]=\"(field.numbersOnly??false)\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n parseDecimal\n [parseDecimalEnabled]=\"(field.parseDecimal??false)\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any($any(formGroup.controls[field.name!]))['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Textarea -->\n @case (FormFieldType.TextArea) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <textarea matInput\n [formControlName]=\"field.name!\"\n rows=\"field.rows||2\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n </textarea>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Enum -->\n @case (FormFieldType.Enum) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-select [formControlName]=\"field.name!\"\n [enum]=\"field.enumType\"\n [enumMetadata]=\"field.enumMetadata\"\n [enumFilter]=\"field.enumFilter | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [defaultOption]=\"field.defaultOption??true\"\n [multiple]=\"field.multiple\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [triggerCssClass]=\"field.triggerCssClass\"\n [triggerMode]=\"field.triggerMode\"\n layout=\"row\"\n flex>\n @if (field.triggerTemplate; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <span [innerHTML]=\"field.triggerTemplate(trigger, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if (field.optionTemplate; as option) {\n <ng-template vd-select-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n <ng-template vd-select-option let-option=\"option\" let-text=\"text\" *ngIf=\"field.optionIcon && !field.optionTemplate\">\n <div layout=\"row\" layout-align=\"start center\">\n <ng-template #enumOptionIconTemplate\n [ngTemplateOutlet]=\"enumOptionIconTemplate\"\n let-optionIcon=\"optionIcon\"\n [ngTemplateOutletContext]=\"{ optionIcon: field.optionIcon(option, formValue, formGroup, context) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n <span>{{text}}</span>\n </div>\n </ng-template>\n </vd-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdSelect -->\n @case (FormFieldType.VdSelect) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-select [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params??{} | func:formValue:formGroup:context\"\n [projection]=\"field.projection\" [mapper]=\"field.mapper\"\n [compareWith]=\"field.compareWith\"\n [loadData]=\"field.fetchCondition | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [defaultOption]=\"field.defaultOption??true\"\n [matIconKey]=\"field.optionMatIconProperty\"\n [svgIconKey]=\"field.optionSvgIconProperty\"\n [fontSet]=\"field.optionIconFontSet\"\n [multiple]=\"field.multiple\"\n [selectFirst]=\"field.selectFirst\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [triggerCssClass]=\"field.triggerCssClass\"\n [triggerMode]=\"field.triggerMode\"\n (itemSelected)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (itemChange)=\"field.itemChange && field.itemChange($event, formValue, formGroup, context);\"\n layout=\"row\"\n flex>\n @if (field.triggerTemplate; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <span [innerHTML]=\"field.triggerTemplate(trigger, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if (field.triggerMapper && field.multiple && field.triggerMode == 'chip'; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <mat-chip-set>\n @for (item of trigger; track item) {\n <mat-chip [color]=\"field.chipColor\" [color]=\"field.chipColor\" highlighted selected>\n <span [innerHTML]=\"field.triggerMapper(item, formValue, formGroup, context)\"></span>\n </mat-chip>\n }\n </mat-chip-set>\n </ng-template>\n }\n @if (field.optionTemplate; as option) {\n <ng-template vd-select-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n <ng-template vd-select-option let-option=\"option\" let-text=\"text\" *ngIf=\"field.optionIcon && !field.optionTemplate\">\n <div layout=\"row\" layout-align=\"start center\">\n <ng-template #selectOptionIconTemplate\n [ngTemplateOutlet]=\"selectOptionIconTemplate\"\n let-optionIcon=\"optionIcon\"\n [ngTemplateOutletContext]=\"{ optionIcon: field.optionIcon(option, formValue, formGroup, context) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n <span>{{text}}</span>\n </div>\n </ng-template>\n </vd-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdList -->\n @case (FormFieldType.VdList) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" floatLabel=\"always\" class=\"form-field-type-list\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-list [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params ??{} | func:formValue:formGroup:context\"\n [projection]=\"field.projection\"\n [mapper]=\"field.mapper\"\n [compareWith]=\"field.compareWith\"\n [loadData]=\"field.fetchCondition | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [multiple]=\"field.multiple\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n (itemSelected)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (itemChange)=\"field.itemChange && field.itemChange($event, formValue, formGroup, context);\"\n [style.max-width]=\"field.maxWidth\"\n [style.max-height]=\"field.maxHeight\"\n flex>\n @if (field.optionTemplate; as option) {\n <ng-template vd-list-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n </vd-list>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Chips -->\n @case (FormFieldType.Chips) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-chip-grid #chipList [formControlName]=\"field.name!\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n @for (chip of $any(formGroup.controls[field.name!])?.value; track chip) {\n <mat-chip-row\n (removed)=\"removeChip(field, chip)\"\n [color]=\"field.chipColor\"\n selectable=\"true\"\n highlighted\n selected>\n <span>{{chip}}</span>\n <button matChipRemove>\n <mat-icon fontSet=\"material-symbols-outlined\">cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input [placeholder]=\"$any(field.label)\"\n #chipInput\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matAutocomplete]=\"chipAutocomplete\"\n (input)=\"filterAutocomplete(field, chipInput)\"\n (matChipInputTokenEnd)=\"addChip(field, $event)\"\n (paste)=\"onPasteChips(field, $event)\"\n autocomplete=\"off\">\n </mat-chip-grid>\n <mat-autocomplete autoActiveFirstOption #chipAutocomplete=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\" (optionSelected)=\"autocompleteValueSelected(field, $event, chipInput)\">\n @for (option of autocompleteFilteredOptions[field.name!]; track option) {\n <mat-option [value]=\"option.id\">\n {{option.name}}\n </mat-option>\n }\n </mat-autocomplete>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdChips -->\n @case (FormFieldType.VdChips) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-chips #vdChip\n [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params || {} | func:formValue:formGroup:context\"\n [searchField]=\"field.searchField\"\n [searchFields]=\"field.searchFields\"\n [filters]=\"field.filters\"\n [selectFirst]=\"field.selectFirst\"\n [classType]=\"field.classType\"\n [projection]=\"field.projection\"\n [key]=\"field.optionValueProperty\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [removable]=\"!field.clear\"\n [context]=\"context\"\n [suffixButtons]=\"field.suffixButtons\"\n [autocompleteCssClass]=\"field.autocompleteCssClass\"\n (initSelect)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (selected)=\"!field.itemChange ? $event.callback(true) : $event.callback(field.itemChange($event.value, formValue, formGroup, context) !== false)\"\n (cleared)=\"field.clear && field.clear(formValue, formGroup, context);\"\n [customValue]=\"field.customValue\"\n layout=\"row\"\n flex>\n @if (field.chipTemplate; as chip) {\n <ng-template vd-chip let-chip=\"chip\">\n <div [outerHTML]=\"field.chipTemplate(chip, formValue, formGroup, context)\"></div>\n </ng-template>\n }\n @if (field.autocompleteTemplate; as option) {\n <ng-template vd-autocomplete-option let-option=\"option\">\n <div [outerHTML]=\"field.autocompleteTemplate(option, formValue, formGroup, context)\"></div>\n </ng-template>\n }\n </vd-chips>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @if (vdChip.emptyResult) {\n <mat-hint class=\"tc-red-400\" i18n=\"@@noResultsFound\">No results were found.</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Select -->\n @case (FormFieldType.Select) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-select [formControlName]=\"field.name!\"\n [multiple]=\"field.multiple\"\n [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n flex>\n @for (option of $any(field.options); track option) {\n <mat-option [value]=\"option.id\">{{option.name}}</mat-option>\n }\n </mat-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Autocomplete -->\n @case (FormFieldType.Autocomplete) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input type=\"text\"\n matInput\n [formControlName]=\"field.name!\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n [matAutocomplete]=\"auto\"\n (input)=\"filterAutocomplete(field, autocompleteInput)\"\n autocomplete=\"off\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\"\n #autocompleteInput>\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\">\n @for (option of autocompleteFilteredOptions[field.name!]; track option) {\n <mat-option [value]=\"option.id\">\n {{option.name}}\n </mat-option>\n }\n </mat-autocomplete>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Date -->\n @case (FormFieldType.Date) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <!-- Row container inside one mat-form-field -->\n <div flex layout=\"row\" layout-align=\"start center\" [class]=\"{'has-time': field.showTime}\">\n <!-- Date input -->\n <input matInput\n [formControlName]=\"field.name!\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n autocomplete=\"off\"\n [matDatepicker]=\"datePicker\"\n [matDatepickerFilter]=\"field.dateFilter\"\n [readonly]=\"readonly || field.forceSelect || (field.readonly && field.readonly(formValue, formGroup, context))\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n <!-- Time display -->\n @if(field.showTime) {\n <input matInput [value]=\"formGroup.get(field.name!)?.value | date:field.timeFormat\" readonly>\n }\n </div>\n <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n <mat-datepicker #datePicker [disabled]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\" (monthSelected)=\"handleDatePickerFilterAsync(datePicker, field, $event )\" (opened)=\"handleDatePickerOpened(datePicker, field)\" [calendarHeaderComponent]=\"datePickerHeaderComponent\"></mat-datepicker>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Calendar -->\n @case (FormFieldType.Calendar) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" floatLabel=\"always\" class=\"form-field-type-calendar\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input input=\"hidden\" hidden matInput [formControlName]=\"field.name!\">\n <mat-calendar #calendar\n [selected]=\"formGroup.get(field.name!)?.value\"\n (selectedChange)=\"formGroup.get(field.name!)?.setValue($event);\"\n (monthSelected)=\"handleCalendarFilterAsync(calendar, field, $event )\"\n [headerComponent]=\"datePickerHeaderComponent\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\"\n style=\"width: 100%;\"></mat-calendar>\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error layout-margin>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Color input -->\n @case (FormFieldType.Color) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input [type]=\"field.inputType ?? 'text'\"\n [minlength]=\"field.minLength | func:formValue:formGroup:context\"\n [maxlength]=\"field.maxLength | func:formValue:formGroup:context\"\n [min]=\"field.min\" [max]=\"field.max\" matInput [formControlName]=\"field.name!\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [pattern]=\"((field.pattern | func:formValue:formGroup:context)??'')\"\n [onlyNumber]=\"(field.numbersOnly??false)\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n <ngx-colors matSuffix ngx-colors-trigger [formControlName]=\"field.name!\" [hideTextInput]=\"true\" (close)=\"this.formGroup.get(field.name!)?.setValue($event)\" format=\"hex\" class=\"color-picker\"></ngx-colors>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any($any(formGroup.controls[field.name!]))['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Checkbox -->\n @case (FormFieldType.Checkbox) {\n <div [attr.flex]=\"field.flex||0\" class=\"mat-checkbox-wrap\" [class]=\"field.cssClass\">\n <mat-checkbox [formControlName]=\"field.name!\"\n [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n {{field.label}}\n </mat-checkbox>\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error layout-margin>{{errorMessage}}</mat-error>\n }\n </div>\n }\n <!-- #endregion -->\n <!-- #region Editor -->\n @case (FormFieldType.Editor) {\n @if (editorTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"editorTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n <!-- #region Code -->\n @case (FormFieldType.Code) {\n @if (codeTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"codeTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n <!-- #region File -->\n @case (FormFieldType.File) {\n <mat-form-field [attr.flex]=\"field.flex||0\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <div vd-file-input\n [formControlName]=\"field.name!\"\n (select)=\"field.change && field.change(field, $event, formGroup, context)\"\n [accept]=\"field.fileExtensions\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n flex>\n </div>\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Custom -->\n @case (FormFieldType.Custom) {\n @if (customTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"customTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n }\n }\n }\n <!-- #region Template for custom fields -->\n @for (customField of customFieldsTemplates; track customField) {\n @if (customField?.templateRef && customField.row == fields[0]?.row && customField.inline) {\n <ng-template [ngTemplateOutlet]=\"customField?.templateRef!\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-template>\n }\n }\n <!-- #endregion -->\n </div>\n <!-- #region Template for custom fields -->\n @if (customFields) {\n <ng-container [ngTemplateOutlet]=\"customFields\" [ngTemplateOutletContext]=\"{formGroup: formGroup, row: fields[0].row}\"></ng-container>\n }\n @for (customField of customFieldsTemplates; track customField) {\n @if (customField?.templateRef && customField.row == (((fields[0]?.row | func:formValue:formGroup:context) ??0)+1) && !customField.inline) {\n <ng-template [ngTemplateOutlet]=\"customField?.templateRef!\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-template>\n }\n }\n <!-- #endregion -->\n }\n <!-- #endregion -->\n <!-- #region Form bottom -->\n @if (bottom) {\n <ng-container [ngTemplateOutlet]=\"bottom\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-container>\n }\n <!-- #endregion -->\n <!-- #region Template for suffix buttons -->\n <ng-template #suffixButtons let-field>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n </ng-template>\n <!-- #endregion -->\n <!-- #region Debug value -->\n @if (debugValue) {\n <code>\n <pre>{{formValue | json}}</pre>\n </code>\n }\n <!-- #endregion -->\n </div>\n}", styles: [".mat-checkbox-wrap mat-error{transform:translate(36px,-20px);max-width:93%;font-size:var(--mat-typography-caption-font-size, 12px)}::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-icon-suffix .color-picker{width:40px;display:block}::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .has-time input:first-child{width:84px;max-width:inherit;min-width:84px}::ng-deep .mat-mdc-form-field-type-mat-chip-grid .mat-mdc-form-field-infix{padding-top:7px!important;padding-bottom:7px!important}::ng-deep .mat-mdc-form-field-type-mat-chip-grid .mat-mdc-chip{padding-top:0!important;padding-bottom:0!important;margin-top:2px!important;margin-bottom:2px!important;margin-left:4px!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type:
|
|
23530
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: VdGenericFormComponent, isStandalone: true, selector: "vd-generic-form", inputs: { formGroup: "formGroup", classType: "classType", formDefinition: "formDefinition", fieldGroups: "fieldGroups", groupName: "groupName", fieldSets: "fieldSets", context: "context", debugValue: "debugValue", readonly: "readonly", separatorKeysCodes: "separatorKeysCodes" }, queries: [{ propertyName: "editorTemplate", first: true, predicate: VdEditorDirective, descendants: true }, { propertyName: "codeTemplate", first: true, predicate: VdCodeDirective, descendants: true }, { propertyName: "fileTemplate", first: true, predicate: VdFileDirective, descendants: true }, { propertyName: "customTemplate", first: true, predicate: VdCustomDirective, descendants: true }, { propertyName: "bottom", first: true, predicate: ["bottom"], descendants: true }, { propertyName: "customFields", first: true, predicate: ["customFields"], descendants: true }, { propertyName: "customFieldsTemplates", predicate: VdGenericFormCustomFieldDirective }], ngImport: i0, template: "@if (formGroup && fieldRows) {\n <div [formGroup]=\"formGroup!\">\n <!-- #region Fields -->\n @for (fields of fieldRows; track fields; let i = $index) {\n <div layout-gt-sm=\"row\" layout=\"column\">\n @for (field of fields; track field) {\n @if (!field.hidden && !(field.hide && field.hide(formValue, formGroup, context))) {\n @switch (field.type) {\n <!-- #region Text input -->\n @case (FormFieldType.Text) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input matInput\n [type]=\"field.inputType ?? 'text'\"\n [minlength]=\"field.minLength | func:formValue:formGroup:context\"\n [maxlength]=\"field.maxLength | func:formValue:formGroup:context\"\n [min]=\"field.min\" [max]=\"field.max\"\n [formControlName]=\"field.name!\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [pattern]=\"((field.pattern | func:formValue:formGroup:context)??'')\"\n [autoFocus]=\"((field.focus | func:formValue:formGroup:context)??false)\"\n [selectText]=\"((field.selectText | func:formValue:formGroup:context)??false)\"\n [onlyNumber]=\"(field.numbersOnly??false)\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n parseDecimal\n [parseDecimalEnabled]=\"(field.parseDecimal??false)\"\n [removeWhitespace]=\"(field.removeWhitespace??false)\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any($any(formGroup.controls[field.name!]))['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n\n <!-- #region Textarea -->\n @case (FormFieldType.TextArea) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <textarea matInput\n [formControlName]=\"field.name!\"\n rows=\"field.rows||2\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n [removeWhitespace]=\"(field.removeWhitespace??false)\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n </textarea>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n\n <!-- #region Enum -->\n @case (FormFieldType.Enum) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-select [formControlName]=\"field.name!\"\n [enum]=\"field.enumType\"\n [enumMetadata]=\"field.enumMetadata\"\n [enumFilter]=\"field.enumFilter | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [defaultOption]=\"field.defaultOption??true\"\n [multiple]=\"field.multiple\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [triggerCssClass]=\"field.triggerCssClass\"\n [triggerMode]=\"field.triggerMode\"\n [context]=\"context\"\n layout=\"row\"\n flex>\n @if (field.triggerTemplate; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <span [innerHTML]=\"field.triggerTemplate(trigger, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if (field.optionTemplate; as option) {\n <ng-template vd-select-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if(field.optionIcon && !field.optionTemplate){\n <ng-template vd-select-option let-option=\"option\" let-text=\"text\">\n <div layout=\"row\" layout-align=\"start center\">\n <ng-template #enumOptionIconTemplate\n [ngTemplateOutlet]=\"enumOptionIconTemplate\"\n let-optionIcon=\"optionIcon\"\n [ngTemplateOutletContext]=\"{ optionIcon: field.optionIcon(option, formValue, formGroup, context) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n <span>{{text}}</span>\n </div>\n </ng-template>\n }\n </vd-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdSelect -->\n @case (FormFieldType.VdSelect) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-select [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params??{} | func:formValue:formGroup:context\"\n [projection]=\"field.projection\" [mapper]=\"field.mapper\"\n [compareWith]=\"field.compareWith\"\n [loadData]=\"field.fetchCondition | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [defaultOption]=\"field.defaultOption??true\"\n [matIconKey]=\"field.optionMatIconProperty\"\n [svgIconKey]=\"field.optionSvgIconProperty\"\n [fontSet]=\"field.optionIconFontSet\"\n [multiple]=\"field.multiple\"\n [selectFirst]=\"field.selectFirst\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [triggerCssClass]=\"field.triggerCssClass\"\n [triggerMode]=\"field.triggerMode\"\n (itemSelected)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (itemChange)=\"field.itemChange && field.itemChange($event, formValue, formGroup, context);\"\n layout=\"row\"\n flex>\n @if (field.triggerTemplate; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <span [innerHTML]=\"field.triggerTemplate(trigger, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if (field.triggerMapper && field.multiple && field.triggerMode == 'chip'; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <mat-chip-set>\n @for (item of trigger; track item) {\n <mat-chip [color]=\"field.chipColor\" [color]=\"field.chipColor\" highlighted selected>\n <span [innerHTML]=\"field.triggerMapper(item, formValue, formGroup, context)\"></span>\n </mat-chip>\n }\n </mat-chip-set>\n </ng-template>\n }\n @if (field.optionTemplate; as option) {\n <ng-template vd-select-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if(field.optionIcon && !field.optionTemplate){\n <ng-template vd-select-option let-option=\"option\" let-text=\"text\">\n <div layout=\"row\" layout-align=\"start center\">\n <ng-template #selectOptionIconTemplate\n [ngTemplateOutlet]=\"selectOptionIconTemplate\"\n let-optionIcon=\"optionIcon\"\n [ngTemplateOutletContext]=\"{ optionIcon: field.optionIcon(option, formValue, formGroup, context) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n <span>{{text}}</span>\n </div>\n </ng-template>\n }\n </vd-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdList -->\n @case (FormFieldType.VdList) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" floatLabel=\"always\" class=\"form-field-type-list\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-list [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params ??{} | func:formValue:formGroup:context\"\n [projection]=\"field.projection\"\n [mapper]=\"field.mapper\"\n [compareWith]=\"field.compareWith\"\n [loadData]=\"field.fetchCondition | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [multiple]=\"field.multiple\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n (itemSelected)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (itemChange)=\"field.itemChange && field.itemChange($event, formValue, formGroup, context);\"\n [style.max-width]=\"field.maxWidth\"\n [style.max-height]=\"field.maxHeight\"\n flex>\n @if (field.optionTemplate; as option) {\n <ng-template vd-list-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n </vd-list>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Chips -->\n @case (FormFieldType.Chips) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-chip-grid #chipList [formControlName]=\"field.name!\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n @for (chip of $any(formGroup.controls[field.name!])?.value; track chip) {\n <mat-chip-row\n (removed)=\"removeChip(field, chip)\"\n [color]=\"field.chipColor\"\n selectable=\"true\"\n highlighted\n selected>\n <span>{{chip}}</span>\n <button matChipRemove>\n <mat-icon fontSet=\"material-symbols-outlined\">cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input [placeholder]=\"$any(field.label)\"\n #chipInput\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matAutocomplete]=\"chipAutocomplete\"\n (input)=\"filterAutocomplete(field, chipInput)\"\n (matChipInputTokenEnd)=\"addChip(field, $event)\"\n (paste)=\"onPasteChips(field, $event)\"\n autocomplete=\"off\">\n </mat-chip-grid>\n <mat-autocomplete autoActiveFirstOption #chipAutocomplete=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\" (optionSelected)=\"autocompleteValueSelected(field, $event, chipInput)\">\n @for (option of autocompleteFilteredOptions[field.name!]; track option) {\n <mat-option [value]=\"option.id\">\n {{option.name}}\n </mat-option>\n }\n </mat-autocomplete>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdChips -->\n @case (FormFieldType.VdChips) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-chips #vdChip\n [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params || {} | func:formValue:formGroup:context\"\n [searchField]=\"field.searchField\"\n [searchFields]=\"field.searchFields\"\n [filters]=\"field.filters\"\n [selectFirst]=\"field.selectFirst\"\n [classType]=\"field.classType\"\n [projection]=\"field.projection\"\n [key]=\"field.optionValueProperty\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [removable]=\"!field.clear\"\n [context]=\"context\"\n [suffixButtons]=\"field.suffixButtons\"\n [autocompleteCssClass]=\"field.autocompleteCssClass\"\n (initSelect)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (selected)=\"!field.itemChange ? $event.callback(true) : $event.callback(field.itemChange($event.value, formValue, formGroup, context) !== false)\"\n (cleared)=\"field.clear && field.clear(formValue, formGroup, context);\"\n [customValue]=\"field.customValue\"\n layout=\"row\"\n flex>\n @if (field.chipTemplate; as chip) {\n <ng-template vd-chip let-chip=\"chip\">\n <div [outerHTML]=\"field.chipTemplate(chip, formValue, formGroup, context)\"></div>\n </ng-template>\n }\n @if (field.autocompleteTemplate; as option) {\n <ng-template vd-autocomplete-option let-option=\"option\">\n <div [outerHTML]=\"field.autocompleteTemplate(option, formValue, formGroup, context)\"></div>\n </ng-template>\n }\n </vd-chips>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @if (vdChip.emptyResult) {\n <mat-hint class=\"tc-red-400\" i18n=\"@@noResultsFound\">No results were found.</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Select -->\n @case (FormFieldType.Select) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-select [formControlName]=\"field.name!\"\n [multiple]=\"field.multiple\"\n [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n flex>\n @for (option of $any(field.options); track option) {\n <mat-option [value]=\"option.id\">{{option.name}}</mat-option>\n }\n </mat-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Autocomplete -->\n @case (FormFieldType.Autocomplete) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input type=\"text\"\n matInput\n [formControlName]=\"field.name!\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n [matAutocomplete]=\"auto\"\n (input)=\"filterAutocomplete(field, autocompleteInput)\"\n autocomplete=\"off\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\"\n #autocompleteInput>\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\">\n @for (option of autocompleteFilteredOptions[field.name!]; track option) {\n <mat-option [value]=\"option.id\">\n {{option.name}}\n </mat-option>\n }\n </mat-autocomplete>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Date -->\n @case (FormFieldType.Date) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <!-- Row container inside one mat-form-field -->\n <div flex layout=\"row\" layout-align=\"start center\" [class]=\"{'has-time': field.showTime}\">\n <!-- Date input -->\n <input matInput\n [formControlName]=\"field.name!\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n autocomplete=\"off\"\n [matDatepicker]=\"datePicker\"\n [matDatepickerFilter]=\"field.dateFilter\"\n [readonly]=\"readonly || field.forceSelect || (field.readonly && field.readonly(formValue, formGroup, context))\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n <!-- Time display -->\n @if(field.showTime) {\n <input matInput [value]=\"formGroup.get(field.name!)?.value | date:field.timeFormat\" readonly>\n }\n </div>\n <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n <mat-datepicker #datePicker [disabled]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\" (monthSelected)=\"handleDatePickerFilterAsync(datePicker, field, $event )\" (opened)=\"handleDatePickerOpened(datePicker, field)\" [calendarHeaderComponent]=\"datePickerHeaderComponent\"></mat-datepicker>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Calendar -->\n @case (FormFieldType.Calendar) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" floatLabel=\"always\" class=\"form-field-type-calendar\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input input=\"hidden\" hidden matInput [formControlName]=\"field.name!\">\n <mat-calendar #calendar\n [selected]=\"formGroup.get(field.name!)?.value\"\n (selectedChange)=\"formGroup.get(field.name!)?.setValue($event);\"\n (monthSelected)=\"handleCalendarFilterAsync(calendar, field, $event )\"\n [headerComponent]=\"datePickerHeaderComponent\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\"\n style=\"width: 100%;\"></mat-calendar>\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error layout-margin>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Color input -->\n @case (FormFieldType.Color) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input [type]=\"field.inputType ?? 'text'\"\n [minlength]=\"field.minLength | func:formValue:formGroup:context\"\n [maxlength]=\"field.maxLength | func:formValue:formGroup:context\"\n [min]=\"field.min\" [max]=\"field.max\" matInput [formControlName]=\"field.name!\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [pattern]=\"((field.pattern | func:formValue:formGroup:context)??'')\"\n [onlyNumber]=\"(field.numbersOnly??false)\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n <ngx-colors matSuffix ngx-colors-trigger [formControlName]=\"field.name!\" [hideTextInput]=\"true\" (close)=\"this.formGroup.get(field.name!)?.setValue($event)\" format=\"hex\" class=\"color-picker\"></ngx-colors>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any($any(formGroup.controls[field.name!]))['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Checkbox -->\n @case (FormFieldType.Checkbox) {\n <div [attr.flex]=\"field.flex||0\" class=\"mat-checkbox-wrap\" [class]=\"field.cssClass\">\n <mat-checkbox [formControlName]=\"field.name!\"\n [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n {{field.label}}\n </mat-checkbox>\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error layout-margin>{{errorMessage}}</mat-error>\n }\n </div>\n }\n <!-- #endregion -->\n <!-- #region Editor -->\n @case (FormFieldType.Editor) {\n @if (editorTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"editorTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n <!-- #region Code -->\n @case (FormFieldType.Code) {\n @if (codeTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"codeTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n <!-- #region File -->\n @case (FormFieldType.File) {\n <mat-form-field [attr.flex]=\"field.flex||0\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <div vd-file-input\n [formControlName]=\"field.name!\"\n (select)=\"field.change && field.change(field, $event, formGroup, context)\"\n [accept]=\"field.fileExtensions\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n flex>\n </div>\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Custom -->\n @case (FormFieldType.Custom) {\n @if (customTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"customTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n }\n }\n }\n <!-- #region Template for custom fields -->\n @for (customField of customFieldsTemplates; track customField) {\n @if (customField?.templateRef && customField.row == fields[0]?.row && customField.inline) {\n <ng-template [ngTemplateOutlet]=\"customField?.templateRef!\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-template>\n }\n }\n <!-- #endregion -->\n </div>\n <!-- #region Template for custom fields -->\n @if (customFields) {\n <ng-container [ngTemplateOutlet]=\"customFields\" [ngTemplateOutletContext]=\"{formGroup: formGroup, row: fields[0].row}\"></ng-container>\n }\n @for (customField of customFieldsTemplates; track customField) {\n @if (customField?.templateRef && customField.row == (((fields[0]?.row | func:formValue:formGroup:context) ??0)+1) && !customField.inline) {\n <ng-template [ngTemplateOutlet]=\"customField?.templateRef!\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-template>\n }\n }\n <!-- #endregion -->\n }\n <!-- #endregion -->\n <!-- #region Form bottom -->\n @if (bottom) {\n <ng-container [ngTemplateOutlet]=\"bottom\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-container>\n }\n <!-- #endregion -->\n <!-- #region Template for suffix buttons -->\n <ng-template #suffixButtons let-field>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n </ng-template>\n <!-- #endregion -->\n <!-- #region Debug value -->\n @if (debugValue) {\n <code>\n <pre>{{formValue | json}}</pre>\n </code>\n }\n <!-- #endregion -->\n </div>\n}", styles: [".mat-checkbox-wrap mat-error{transform:translate(36px,-20px);max-width:93%;font-size:var(--mat-typography-caption-font-size, 12px)}::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-icon-suffix .color-picker{width:40px;display:block}::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .has-time input:first-child{width:84px;max-width:inherit;min-width:84px}::ng-deep .mat-mdc-form-field-type-mat-chip-grid .mat-mdc-form-field-infix{padding-top:7px!important;padding-bottom:7px!important}::ng-deep .mat-mdc-form-field-type-mat-chip-grid .mat-mdc-chip{padding-top:0!important;padding-bottom:0!important;margin-top:2px!important;margin-bottom:2px!important;margin-left:4px!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type:
|
|
23229
23531
|
//--------------------
|
|
23230
23532
|
MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i5$1.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: i5$1.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5$1.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5$1.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: i5$1.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6$1.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "component", type: i6$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i7.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type:
|
|
23231
23533
|
//--------------------
|
|
@@ -23233,7 +23535,7 @@ class VdGenericFormComponent {
|
|
|
23233
23535
|
//--------------------
|
|
23234
23536
|
AutofocusDirective, selector: "[autoFocus]", inputs: ["focusDelay", "selectText", "autoFocus"] }, { kind: "directive", type: DisableControlDirective, selector: "[disableControl]", inputs: ["disableControl"] }, { kind: "ngmodule", type:
|
|
23235
23537
|
//--------------------
|
|
23236
|
-
NgxColorsModule }, { kind: "component", type: i11.NgxColorsComponent, selector: "ngx-colors" }, { kind: "directive", type: i11.NgxColorsTriggerDirective, selector: "[ngx-colors-trigger]", inputs: ["colorsAnimation", "palette", "format", "formats", "position", "hideTextInput", "hideColorPicker", "attachTo", "overlayClassName", "colorPickerControls", "acceptLabel", "cancelLabel"], outputs: ["change", "input", "slider", "close", "open"] }, { kind: "directive", type: OnlyNumberDirective, selector: "[onlyNumber]", inputs: ["onlyNumber", "excludePrefix"] }, { kind: "directive", type: ParseDecimalDirective, selector: "[parseDecimal]", inputs: ["parseDecimalEnabled"] }, { kind: "directive", type: PrefixDirective, selector: "[prefix]", inputs: ["prefix"] }, { kind: "pipe", type: i3$1.JsonPipe, name: "json" }, { kind: "pipe", type: i3$1.DatePipe, name: "date" }, { kind: "pipe", type: FuncPipe, name: "func" }] });
|
|
23538
|
+
NgxColorsModule }, { kind: "component", type: i11.NgxColorsComponent, selector: "ngx-colors" }, { kind: "directive", type: i11.NgxColorsTriggerDirective, selector: "[ngx-colors-trigger]", inputs: ["colorsAnimation", "palette", "format", "formats", "position", "hideTextInput", "hideColorPicker", "attachTo", "overlayClassName", "colorPickerControls", "acceptLabel", "cancelLabel"], outputs: ["change", "input", "slider", "close", "open"] }, { kind: "directive", type: OnlyNumberDirective, selector: "[onlyNumber]", inputs: ["onlyNumber", "excludePrefix"] }, { kind: "directive", type: ParseDecimalDirective, selector: "[parseDecimal]", inputs: ["parseDecimalEnabled"] }, { kind: "directive", type: PrefixDirective, selector: "[prefix]", inputs: ["prefix"] }, { kind: "directive", type: RemoveWhitespaceDirective, selector: "[removeWhitespace]", inputs: ["removeWhitespace"] }, { kind: "directive", type: NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "pipe", type: i3$1.JsonPipe, name: "json" }, { kind: "pipe", type: i3$1.DatePipe, name: "date" }, { kind: "pipe", type: FuncPipe, name: "func" }] });
|
|
23237
23539
|
}
|
|
23238
23540
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VdGenericFormComponent, decorators: [{
|
|
23239
23541
|
type: Component,
|
|
@@ -23269,8 +23571,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
23269
23571
|
NgxColorsModule,
|
|
23270
23572
|
OnlyNumberDirective,
|
|
23271
23573
|
ParseDecimalDirective,
|
|
23272
|
-
PrefixDirective
|
|
23273
|
-
], template: "@if (formGroup && fieldRows) {\n <div [formGroup]=\"formGroup!\">\n <!-- #region Fields -->\n @for (fields of fieldRows; track fields; let i = $index) {\n <div layout-gt-sm=\"row\" layout=\"column\">\n @for (field of fields; track field) {\n @if (!field.hidden && !(field.hide && field.hide(formValue, formGroup, context))) {\n @switch (field.type) {\n <!-- #region Text input -->\n @case (FormFieldType.Text) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input matInput\n [type]=\"field.inputType ?? 'text'\"\n [minlength]=\"field.minLength | func:formValue:formGroup:context\"\n [maxlength]=\"field.maxLength | func:formValue:formGroup:context\"\n [min]=\"field.min\" [max]=\"field.max\"\n [formControlName]=\"field.name!\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [pattern]=\"((field.pattern | func:formValue:formGroup:context)??'')\"\n [autoFocus]=\"((field.focus | func:formValue:formGroup:context)??false)\"\n [selectText]=\"((field.selectText | func:formValue:formGroup:context)??false)\"\n [onlyNumber]=\"(field.numbersOnly??false)\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n parseDecimal\n [parseDecimalEnabled]=\"(field.parseDecimal??false)\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any($any(formGroup.controls[field.name!]))['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Textarea -->\n @case (FormFieldType.TextArea) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <textarea matInput\n [formControlName]=\"field.name!\"\n rows=\"field.rows||2\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n </textarea>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Enum -->\n @case (FormFieldType.Enum) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-select [formControlName]=\"field.name!\"\n [enum]=\"field.enumType\"\n [enumMetadata]=\"field.enumMetadata\"\n [enumFilter]=\"field.enumFilter | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [defaultOption]=\"field.defaultOption??true\"\n [multiple]=\"field.multiple\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [triggerCssClass]=\"field.triggerCssClass\"\n [triggerMode]=\"field.triggerMode\"\n layout=\"row\"\n flex>\n @if (field.triggerTemplate; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <span [innerHTML]=\"field.triggerTemplate(trigger, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if (field.optionTemplate; as option) {\n <ng-template vd-select-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n <ng-template vd-select-option let-option=\"option\" let-text=\"text\" *ngIf=\"field.optionIcon && !field.optionTemplate\">\n <div layout=\"row\" layout-align=\"start center\">\n <ng-template #enumOptionIconTemplate\n [ngTemplateOutlet]=\"enumOptionIconTemplate\"\n let-optionIcon=\"optionIcon\"\n [ngTemplateOutletContext]=\"{ optionIcon: field.optionIcon(option, formValue, formGroup, context) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n <span>{{text}}</span>\n </div>\n </ng-template>\n </vd-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdSelect -->\n @case (FormFieldType.VdSelect) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-select [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params??{} | func:formValue:formGroup:context\"\n [projection]=\"field.projection\" [mapper]=\"field.mapper\"\n [compareWith]=\"field.compareWith\"\n [loadData]=\"field.fetchCondition | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [defaultOption]=\"field.defaultOption??true\"\n [matIconKey]=\"field.optionMatIconProperty\"\n [svgIconKey]=\"field.optionSvgIconProperty\"\n [fontSet]=\"field.optionIconFontSet\"\n [multiple]=\"field.multiple\"\n [selectFirst]=\"field.selectFirst\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [triggerCssClass]=\"field.triggerCssClass\"\n [triggerMode]=\"field.triggerMode\"\n (itemSelected)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (itemChange)=\"field.itemChange && field.itemChange($event, formValue, formGroup, context);\"\n layout=\"row\"\n flex>\n @if (field.triggerTemplate; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <span [innerHTML]=\"field.triggerTemplate(trigger, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if (field.triggerMapper && field.multiple && field.triggerMode == 'chip'; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <mat-chip-set>\n @for (item of trigger; track item) {\n <mat-chip [color]=\"field.chipColor\" [color]=\"field.chipColor\" highlighted selected>\n <span [innerHTML]=\"field.triggerMapper(item, formValue, formGroup, context)\"></span>\n </mat-chip>\n }\n </mat-chip-set>\n </ng-template>\n }\n @if (field.optionTemplate; as option) {\n <ng-template vd-select-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n <ng-template vd-select-option let-option=\"option\" let-text=\"text\" *ngIf=\"field.optionIcon && !field.optionTemplate\">\n <div layout=\"row\" layout-align=\"start center\">\n <ng-template #selectOptionIconTemplate\n [ngTemplateOutlet]=\"selectOptionIconTemplate\"\n let-optionIcon=\"optionIcon\"\n [ngTemplateOutletContext]=\"{ optionIcon: field.optionIcon(option, formValue, formGroup, context) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n <span>{{text}}</span>\n </div>\n </ng-template>\n </vd-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdList -->\n @case (FormFieldType.VdList) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" floatLabel=\"always\" class=\"form-field-type-list\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-list [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params ??{} | func:formValue:formGroup:context\"\n [projection]=\"field.projection\"\n [mapper]=\"field.mapper\"\n [compareWith]=\"field.compareWith\"\n [loadData]=\"field.fetchCondition | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [multiple]=\"field.multiple\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n (itemSelected)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (itemChange)=\"field.itemChange && field.itemChange($event, formValue, formGroup, context);\"\n [style.max-width]=\"field.maxWidth\"\n [style.max-height]=\"field.maxHeight\"\n flex>\n @if (field.optionTemplate; as option) {\n <ng-template vd-list-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n </vd-list>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Chips -->\n @case (FormFieldType.Chips) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-chip-grid #chipList [formControlName]=\"field.name!\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n @for (chip of $any(formGroup.controls[field.name!])?.value; track chip) {\n <mat-chip-row\n (removed)=\"removeChip(field, chip)\"\n [color]=\"field.chipColor\"\n selectable=\"true\"\n highlighted\n selected>\n <span>{{chip}}</span>\n <button matChipRemove>\n <mat-icon fontSet=\"material-symbols-outlined\">cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input [placeholder]=\"$any(field.label)\"\n #chipInput\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matAutocomplete]=\"chipAutocomplete\"\n (input)=\"filterAutocomplete(field, chipInput)\"\n (matChipInputTokenEnd)=\"addChip(field, $event)\"\n (paste)=\"onPasteChips(field, $event)\"\n autocomplete=\"off\">\n </mat-chip-grid>\n <mat-autocomplete autoActiveFirstOption #chipAutocomplete=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\" (optionSelected)=\"autocompleteValueSelected(field, $event, chipInput)\">\n @for (option of autocompleteFilteredOptions[field.name!]; track option) {\n <mat-option [value]=\"option.id\">\n {{option.name}}\n </mat-option>\n }\n </mat-autocomplete>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdChips -->\n @case (FormFieldType.VdChips) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-chips #vdChip\n [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params || {} | func:formValue:formGroup:context\"\n [searchField]=\"field.searchField\"\n [searchFields]=\"field.searchFields\"\n [filters]=\"field.filters\"\n [selectFirst]=\"field.selectFirst\"\n [classType]=\"field.classType\"\n [projection]=\"field.projection\"\n [key]=\"field.optionValueProperty\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [removable]=\"!field.clear\"\n [context]=\"context\"\n [suffixButtons]=\"field.suffixButtons\"\n [autocompleteCssClass]=\"field.autocompleteCssClass\"\n (initSelect)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (selected)=\"!field.itemChange ? $event.callback(true) : $event.callback(field.itemChange($event.value, formValue, formGroup, context) !== false)\"\n (cleared)=\"field.clear && field.clear(formValue, formGroup, context);\"\n [customValue]=\"field.customValue\"\n layout=\"row\"\n flex>\n @if (field.chipTemplate; as chip) {\n <ng-template vd-chip let-chip=\"chip\">\n <div [outerHTML]=\"field.chipTemplate(chip, formValue, formGroup, context)\"></div>\n </ng-template>\n }\n @if (field.autocompleteTemplate; as option) {\n <ng-template vd-autocomplete-option let-option=\"option\">\n <div [outerHTML]=\"field.autocompleteTemplate(option, formValue, formGroup, context)\"></div>\n </ng-template>\n }\n </vd-chips>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @if (vdChip.emptyResult) {\n <mat-hint class=\"tc-red-400\" i18n=\"@@noResultsFound\">No results were found.</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Select -->\n @case (FormFieldType.Select) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-select [formControlName]=\"field.name!\"\n [multiple]=\"field.multiple\"\n [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n flex>\n @for (option of $any(field.options); track option) {\n <mat-option [value]=\"option.id\">{{option.name}}</mat-option>\n }\n </mat-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Autocomplete -->\n @case (FormFieldType.Autocomplete) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input type=\"text\"\n matInput\n [formControlName]=\"field.name!\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n [matAutocomplete]=\"auto\"\n (input)=\"filterAutocomplete(field, autocompleteInput)\"\n autocomplete=\"off\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\"\n #autocompleteInput>\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\">\n @for (option of autocompleteFilteredOptions[field.name!]; track option) {\n <mat-option [value]=\"option.id\">\n {{option.name}}\n </mat-option>\n }\n </mat-autocomplete>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Date -->\n @case (FormFieldType.Date) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <!-- Row container inside one mat-form-field -->\n <div flex layout=\"row\" layout-align=\"start center\" [class]=\"{'has-time': field.showTime}\">\n <!-- Date input -->\n <input matInput\n [formControlName]=\"field.name!\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n autocomplete=\"off\"\n [matDatepicker]=\"datePicker\"\n [matDatepickerFilter]=\"field.dateFilter\"\n [readonly]=\"readonly || field.forceSelect || (field.readonly && field.readonly(formValue, formGroup, context))\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n <!-- Time display -->\n @if(field.showTime) {\n <input matInput [value]=\"formGroup.get(field.name!)?.value | date:field.timeFormat\" readonly>\n }\n </div>\n <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n <mat-datepicker #datePicker [disabled]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\" (monthSelected)=\"handleDatePickerFilterAsync(datePicker, field, $event )\" (opened)=\"handleDatePickerOpened(datePicker, field)\" [calendarHeaderComponent]=\"datePickerHeaderComponent\"></mat-datepicker>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Calendar -->\n @case (FormFieldType.Calendar) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" floatLabel=\"always\" class=\"form-field-type-calendar\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input input=\"hidden\" hidden matInput [formControlName]=\"field.name!\">\n <mat-calendar #calendar\n [selected]=\"formGroup.get(field.name!)?.value\"\n (selectedChange)=\"formGroup.get(field.name!)?.setValue($event);\"\n (monthSelected)=\"handleCalendarFilterAsync(calendar, field, $event )\"\n [headerComponent]=\"datePickerHeaderComponent\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\"\n style=\"width: 100%;\"></mat-calendar>\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error layout-margin>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Color input -->\n @case (FormFieldType.Color) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input [type]=\"field.inputType ?? 'text'\"\n [minlength]=\"field.minLength | func:formValue:formGroup:context\"\n [maxlength]=\"field.maxLength | func:formValue:formGroup:context\"\n [min]=\"field.min\" [max]=\"field.max\" matInput [formControlName]=\"field.name!\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [pattern]=\"((field.pattern | func:formValue:formGroup:context)??'')\"\n [onlyNumber]=\"(field.numbersOnly??false)\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n <ngx-colors matSuffix ngx-colors-trigger [formControlName]=\"field.name!\" [hideTextInput]=\"true\" (close)=\"this.formGroup.get(field.name!)?.setValue($event)\" format=\"hex\" class=\"color-picker\"></ngx-colors>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any($any(formGroup.controls[field.name!]))['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Checkbox -->\n @case (FormFieldType.Checkbox) {\n <div [attr.flex]=\"field.flex||0\" class=\"mat-checkbox-wrap\" [class]=\"field.cssClass\">\n <mat-checkbox [formControlName]=\"field.name!\"\n [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n {{field.label}}\n </mat-checkbox>\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error layout-margin>{{errorMessage}}</mat-error>\n }\n </div>\n }\n <!-- #endregion -->\n <!-- #region Editor -->\n @case (FormFieldType.Editor) {\n @if (editorTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"editorTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n <!-- #region Code -->\n @case (FormFieldType.Code) {\n @if (codeTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"codeTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n <!-- #region File -->\n @case (FormFieldType.File) {\n <mat-form-field [attr.flex]=\"field.flex||0\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <div vd-file-input\n [formControlName]=\"field.name!\"\n (select)=\"field.change && field.change(field, $event, formGroup, context)\"\n [accept]=\"field.fileExtensions\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n flex>\n </div>\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Custom -->\n @case (FormFieldType.Custom) {\n @if (customTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"customTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n }\n }\n }\n <!-- #region Template for custom fields -->\n @for (customField of customFieldsTemplates; track customField) {\n @if (customField?.templateRef && customField.row == fields[0]?.row && customField.inline) {\n <ng-template [ngTemplateOutlet]=\"customField?.templateRef!\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-template>\n }\n }\n <!-- #endregion -->\n </div>\n <!-- #region Template for custom fields -->\n @if (customFields) {\n <ng-container [ngTemplateOutlet]=\"customFields\" [ngTemplateOutletContext]=\"{formGroup: formGroup, row: fields[0].row}\"></ng-container>\n }\n @for (customField of customFieldsTemplates; track customField) {\n @if (customField?.templateRef && customField.row == (((fields[0]?.row | func:formValue:formGroup:context) ??0)+1) && !customField.inline) {\n <ng-template [ngTemplateOutlet]=\"customField?.templateRef!\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-template>\n }\n }\n <!-- #endregion -->\n }\n <!-- #endregion -->\n <!-- #region Form bottom -->\n @if (bottom) {\n <ng-container [ngTemplateOutlet]=\"bottom\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-container>\n }\n <!-- #endregion -->\n <!-- #region Template for suffix buttons -->\n <ng-template #suffixButtons let-field>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n </ng-template>\n <!-- #endregion -->\n <!-- #region Debug value -->\n @if (debugValue) {\n <code>\n <pre>{{formValue | json}}</pre>\n </code>\n }\n <!-- #endregion -->\n </div>\n}", styles: [".mat-checkbox-wrap mat-error{transform:translate(36px,-20px);max-width:93%;font-size:var(--mat-typography-caption-font-size, 12px)}::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-icon-suffix .color-picker{width:40px;display:block}::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .has-time input:first-child{width:84px;max-width:inherit;min-width:84px}::ng-deep .mat-mdc-form-field-type-mat-chip-grid .mat-mdc-form-field-infix{padding-top:7px!important;padding-bottom:7px!important}::ng-deep .mat-mdc-form-field-type-mat-chip-grid .mat-mdc-chip{padding-top:0!important;padding-bottom:0!important;margin-top:2px!important;margin-bottom:2px!important;margin-left:4px!important}\n"] }]
|
|
23574
|
+
PrefixDirective,
|
|
23575
|
+
RemoveWhitespaceDirective,
|
|
23576
|
+
NativeElementInjectorDirective
|
|
23577
|
+
], template: "@if (formGroup && fieldRows) {\n <div [formGroup]=\"formGroup!\">\n <!-- #region Fields -->\n @for (fields of fieldRows; track fields; let i = $index) {\n <div layout-gt-sm=\"row\" layout=\"column\">\n @for (field of fields; track field) {\n @if (!field.hidden && !(field.hide && field.hide(formValue, formGroup, context))) {\n @switch (field.type) {\n <!-- #region Text input -->\n @case (FormFieldType.Text) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input matInput\n [type]=\"field.inputType ?? 'text'\"\n [minlength]=\"field.minLength | func:formValue:formGroup:context\"\n [maxlength]=\"field.maxLength | func:formValue:formGroup:context\"\n [min]=\"field.min\" [max]=\"field.max\"\n [formControlName]=\"field.name!\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [pattern]=\"((field.pattern | func:formValue:formGroup:context)??'')\"\n [autoFocus]=\"((field.focus | func:formValue:formGroup:context)??false)\"\n [selectText]=\"((field.selectText | func:formValue:formGroup:context)??false)\"\n [onlyNumber]=\"(field.numbersOnly??false)\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n parseDecimal\n [parseDecimalEnabled]=\"(field.parseDecimal??false)\"\n [removeWhitespace]=\"(field.removeWhitespace??false)\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any($any(formGroup.controls[field.name!]))['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n\n <!-- #region Textarea -->\n @case (FormFieldType.TextArea) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <textarea matInput\n [formControlName]=\"field.name!\"\n rows=\"field.rows||2\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n [removeWhitespace]=\"(field.removeWhitespace??false)\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n </textarea>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n\n <!-- #region Enum -->\n @case (FormFieldType.Enum) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-select [formControlName]=\"field.name!\"\n [enum]=\"field.enumType\"\n [enumMetadata]=\"field.enumMetadata\"\n [enumFilter]=\"field.enumFilter | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [defaultOption]=\"field.defaultOption??true\"\n [multiple]=\"field.multiple\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [triggerCssClass]=\"field.triggerCssClass\"\n [triggerMode]=\"field.triggerMode\"\n [context]=\"context\"\n layout=\"row\"\n flex>\n @if (field.triggerTemplate; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <span [innerHTML]=\"field.triggerTemplate(trigger, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if (field.optionTemplate; as option) {\n <ng-template vd-select-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if(field.optionIcon && !field.optionTemplate){\n <ng-template vd-select-option let-option=\"option\" let-text=\"text\">\n <div layout=\"row\" layout-align=\"start center\">\n <ng-template #enumOptionIconTemplate\n [ngTemplateOutlet]=\"enumOptionIconTemplate\"\n let-optionIcon=\"optionIcon\"\n [ngTemplateOutletContext]=\"{ optionIcon: field.optionIcon(option, formValue, formGroup, context) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n <span>{{text}}</span>\n </div>\n </ng-template>\n }\n </vd-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\"\n mat-icon-button\n (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdSelect -->\n @case (FormFieldType.VdSelect) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-select [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params??{} | func:formValue:formGroup:context\"\n [projection]=\"field.projection\" [mapper]=\"field.mapper\"\n [compareWith]=\"field.compareWith\"\n [loadData]=\"field.fetchCondition | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [defaultOption]=\"field.defaultOption??true\"\n [matIconKey]=\"field.optionMatIconProperty\"\n [svgIconKey]=\"field.optionSvgIconProperty\"\n [fontSet]=\"field.optionIconFontSet\"\n [multiple]=\"field.multiple\"\n [selectFirst]=\"field.selectFirst\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [triggerCssClass]=\"field.triggerCssClass\"\n [triggerMode]=\"field.triggerMode\"\n (itemSelected)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (itemChange)=\"field.itemChange && field.itemChange($event, formValue, formGroup, context);\"\n layout=\"row\"\n flex>\n @if (field.triggerTemplate; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <span [innerHTML]=\"field.triggerTemplate(trigger, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if (field.triggerMapper && field.multiple && field.triggerMode == 'chip'; as trigger) {\n <ng-template vd-select-trigger let-trigger=\"trigger\">\n <mat-chip-set>\n @for (item of trigger; track item) {\n <mat-chip [color]=\"field.chipColor\" [color]=\"field.chipColor\" highlighted selected>\n <span [innerHTML]=\"field.triggerMapper(item, formValue, formGroup, context)\"></span>\n </mat-chip>\n }\n </mat-chip-set>\n </ng-template>\n }\n @if (field.optionTemplate; as option) {\n <ng-template vd-select-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n @if(field.optionIcon && !field.optionTemplate){\n <ng-template vd-select-option let-option=\"option\" let-text=\"text\">\n <div layout=\"row\" layout-align=\"start center\">\n <ng-template #selectOptionIconTemplate\n [ngTemplateOutlet]=\"selectOptionIconTemplate\"\n let-optionIcon=\"optionIcon\"\n [ngTemplateOutletContext]=\"{ optionIcon: field.optionIcon(option, formValue, formGroup, context) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: optionIcon.iconColor??'' }\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n <span>{{text}}</span>\n </div>\n </ng-template>\n }\n </vd-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdList -->\n @case (FormFieldType.VdList) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" floatLabel=\"always\" class=\"form-field-type-list\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-list [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params ??{} | func:formValue:formGroup:context\"\n [projection]=\"field.projection\"\n [mapper]=\"field.mapper\"\n [compareWith]=\"field.compareWith\"\n [loadData]=\"field.fetchCondition | func:formValue:formGroup:context\"\n [optionValueProperty]=\"field.optionValueProperty\"\n [optionTextProperty]=\"field.optionTextProperty\"\n [multiple]=\"field.multiple\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n (itemSelected)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (itemChange)=\"field.itemChange && field.itemChange($event, formValue, formGroup, context);\"\n [style.max-width]=\"field.maxWidth\"\n [style.max-height]=\"field.maxHeight\"\n flex>\n @if (field.optionTemplate; as option) {\n <ng-template vd-list-option let-option=\"option\">\n <span [outerHTML]=\"field.optionTemplate(option, formValue, formGroup, context)\"></span>\n </ng-template>\n }\n </vd-list>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Chips -->\n @case (FormFieldType.Chips) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-chip-grid #chipList [formControlName]=\"field.name!\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n @for (chip of $any(formGroup.controls[field.name!])?.value; track chip) {\n <mat-chip-row\n (removed)=\"removeChip(field, chip)\"\n [color]=\"field.chipColor\"\n selectable=\"true\"\n highlighted\n selected>\n <span>{{chip}}</span>\n <button matChipRemove>\n <mat-icon fontSet=\"material-symbols-outlined\">cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input [placeholder]=\"$any(field.label)\"\n #chipInput\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matAutocomplete]=\"chipAutocomplete\"\n (input)=\"filterAutocomplete(field, chipInput)\"\n (matChipInputTokenEnd)=\"addChip(field, $event)\"\n (paste)=\"onPasteChips(field, $event)\"\n autocomplete=\"off\">\n </mat-chip-grid>\n <mat-autocomplete autoActiveFirstOption #chipAutocomplete=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\" (optionSelected)=\"autocompleteValueSelected(field, $event, chipInput)\">\n @for (option of autocompleteFilteredOptions[field.name!]; track option) {\n <mat-option [value]=\"option.id\">\n {{option.name}}\n </mat-option>\n }\n </mat-autocomplete>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VdChips -->\n @case (FormFieldType.VdChips) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <vd-chips #vdChip\n [formControlName]=\"field.name!\"\n [endpoint]=\"field.endpoint??'' | func:formValue:formGroup:context\"\n [params]=\"field.params || {} | func:formValue:formGroup:context\"\n [searchField]=\"field.searchField\"\n [searchFields]=\"field.searchFields\"\n [filters]=\"field.filters\"\n [selectFirst]=\"field.selectFirst\"\n [classType]=\"field.classType\"\n [projection]=\"field.projection\"\n [key]=\"field.optionValueProperty\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [removable]=\"!field.clear\"\n [context]=\"context\"\n [suffixButtons]=\"field.suffixButtons\"\n [autocompleteCssClass]=\"field.autocompleteCssClass\"\n (initSelect)=\"field.itemSelect && field.itemSelect($event, formValue, formGroup, context);\"\n (selected)=\"!field.itemChange ? $event.callback(true) : $event.callback(field.itemChange($event.value, formValue, formGroup, context) !== false)\"\n (cleared)=\"field.clear && field.clear(formValue, formGroup, context);\"\n [customValue]=\"field.customValue\"\n layout=\"row\"\n flex>\n @if (field.chipTemplate; as chip) {\n <ng-template vd-chip let-chip=\"chip\">\n <div [outerHTML]=\"field.chipTemplate(chip, formValue, formGroup, context)\"></div>\n </ng-template>\n }\n @if (field.autocompleteTemplate; as option) {\n <ng-template vd-autocomplete-option let-option=\"option\">\n <div [outerHTML]=\"field.autocompleteTemplate(option, formValue, formGroup, context)\"></div>\n </ng-template>\n }\n </vd-chips>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @if (vdChip.emptyResult) {\n <mat-hint class=\"tc-red-400\" i18n=\"@@noResultsFound\">No results were found.</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Select -->\n @case (FormFieldType.Select) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-select [formControlName]=\"field.name!\"\n [multiple]=\"field.multiple\"\n [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n flex>\n @for (option of $any(field.options); track option) {\n <mat-option [value]=\"option.id\">{{option.name}}</mat-option>\n }\n </mat-select>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Autocomplete -->\n @case (FormFieldType.Autocomplete) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input type=\"text\"\n matInput\n [formControlName]=\"field.name!\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n [matAutocomplete]=\"auto\"\n (input)=\"filterAutocomplete(field, autocompleteInput)\"\n autocomplete=\"off\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [prefix]=\"field.prefix | func:formValue:formGroup:context\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\"\n #autocompleteInput>\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\">\n @for (option of autocompleteFilteredOptions[field.name!]; track option) {\n <mat-option [value]=\"option.id\">\n {{option.name}}\n </mat-option>\n }\n </mat-autocomplete>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Date -->\n @case (FormFieldType.Date) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <!-- Row container inside one mat-form-field -->\n <div flex layout=\"row\" layout-align=\"start center\" [class]=\"{'has-time': field.showTime}\">\n <!-- Date input -->\n <input matInput\n [formControlName]=\"field.name!\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n autocomplete=\"off\"\n [matDatepicker]=\"datePicker\"\n [matDatepickerFilter]=\"field.dateFilter\"\n [readonly]=\"readonly || field.forceSelect || (field.readonly && field.readonly(formValue, formGroup, context))\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n <!-- Time display -->\n @if(field.showTime) {\n <input matInput [value]=\"formGroup.get(field.name!)?.value | date:field.timeFormat\" readonly>\n }\n </div>\n <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\n <mat-datepicker #datePicker [disabled]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\" (monthSelected)=\"handleDatePickerFilterAsync(datePicker, field, $event )\" (opened)=\"handleDatePickerOpened(datePicker, field)\" [calendarHeaderComponent]=\"datePickerHeaderComponent\"></mat-datepicker>\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Calendar -->\n @case (FormFieldType.Calendar) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" floatLabel=\"always\" class=\"form-field-type-calendar\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input input=\"hidden\" hidden matInput [formControlName]=\"field.name!\">\n <mat-calendar #calendar\n [selected]=\"formGroup.get(field.name!)?.value\"\n (selectedChange)=\"formGroup.get(field.name!)?.setValue($event);\"\n (monthSelected)=\"handleCalendarFilterAsync(calendar, field, $event )\"\n [headerComponent]=\"datePickerHeaderComponent\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\"\n style=\"width: 100%;\"></mat-calendar>\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error layout-margin>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Color input -->\n @case (FormFieldType.Color) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <input [type]=\"field.inputType ?? 'text'\"\n [minlength]=\"field.minLength | func:formValue:formGroup:context\"\n [maxlength]=\"field.maxLength | func:formValue:formGroup:context\"\n [min]=\"field.min\" [max]=\"field.max\" matInput [formControlName]=\"field.name!\"\n [readonly]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n [pattern]=\"((field.pattern | func:formValue:formGroup:context)??'')\"\n [onlyNumber]=\"(field.numbersOnly??false)\"\n (keydown)=\"field.keydown && field.keydown($event, formValue, formGroup, context)\">\n <ngx-colors matSuffix ngx-colors-trigger [formControlName]=\"field.name!\" [hideTextInput]=\"true\" (close)=\"this.formGroup.get(field.name!)?.setValue($event)\" format=\"hex\" class=\"color-picker\"></ngx-colors>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n @if (field.hint) {\n <mat-hint>{{field.hint}}</mat-hint>\n }\n @for (errorMessage of $any($any(formGroup.controls[field.name!]))['errorMessages']; track errorMessage) {\n <mat-error>{{errorMessage}}</mat-error>\n }\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Checkbox -->\n @case (FormFieldType.Checkbox) {\n <div [attr.flex]=\"field.flex||0\" class=\"mat-checkbox-wrap\" [class]=\"field.cssClass\">\n <mat-checkbox [formControlName]=\"field.name!\"\n [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n {{field.label}}\n </mat-checkbox>\n @for (errorMessage of $any(formGroup.controls[field.name!])['errorMessages']; track errorMessage) {\n <mat-error layout-margin>{{errorMessage}}</mat-error>\n }\n </div>\n }\n <!-- #endregion -->\n <!-- #region Editor -->\n @case (FormFieldType.Editor) {\n @if (editorTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"editorTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n <!-- #region Code -->\n @case (FormFieldType.Code) {\n @if (codeTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"codeTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n <!-- #region File -->\n @case (FormFieldType.File) {\n <mat-form-field [attr.flex]=\"field.flex||0\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <div vd-file-input\n [formControlName]=\"field.name!\"\n (select)=\"field.change && field.change(field, $event, formGroup, context)\"\n [accept]=\"field.fileExtensions\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\"\n flex>\n </div>\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region Custom -->\n @case (FormFieldType.Custom) {\n @if (customTemplate?.templateRef!) {\n <ng-template [ngTemplateOutlet]=\"customTemplate?.templateRef!\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n }\n }\n }\n <!-- #region Template for custom fields -->\n @for (customField of customFieldsTemplates; track customField) {\n @if (customField?.templateRef && customField.row == fields[0]?.row && customField.inline) {\n <ng-template [ngTemplateOutlet]=\"customField?.templateRef!\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-template>\n }\n }\n <!-- #endregion -->\n </div>\n <!-- #region Template for custom fields -->\n @if (customFields) {\n <ng-container [ngTemplateOutlet]=\"customFields\" [ngTemplateOutletContext]=\"{formGroup: formGroup, row: fields[0].row}\"></ng-container>\n }\n @for (customField of customFieldsTemplates; track customField) {\n @if (customField?.templateRef && customField.row == (((fields[0]?.row | func:formValue:formGroup:context) ??0)+1) && !customField.inline) {\n <ng-template [ngTemplateOutlet]=\"customField?.templateRef!\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-template>\n }\n }\n <!-- #endregion -->\n }\n <!-- #endregion -->\n <!-- #region Form bottom -->\n @if (bottom) {\n <ng-container [ngTemplateOutlet]=\"bottom\" [ngTemplateOutletContext]=\"{formGroup: formGroup}\"></ng-container>\n }\n <!-- #endregion -->\n <!-- #region Template for suffix buttons -->\n <ng-template #suffixButtons let-field>\n @for (suffixButton of field.suffixButtons; track suffixButton) {\n <ng-container matSuffix>\n @if (!suffixButton.hide || !suffixButton.hide(formValue, context)) {\n <button type=\"button\" mat-icon-button (click)=\"suffixButton.event && suffixButton.event(formValue, context)\">\n <mat-icon fontSet=\"material-symbols-outlined\">{{suffixButton.icon}}</mat-icon>\n </button>\n }\n </ng-container>\n }\n </ng-template>\n <!-- #endregion -->\n <!-- #region Debug value -->\n @if (debugValue) {\n <code>\n <pre>{{formValue | json}}</pre>\n </code>\n }\n <!-- #endregion -->\n </div>\n}", styles: [".mat-checkbox-wrap mat-error{transform:translate(36px,-20px);max-width:93%;font-size:var(--mat-typography-caption-font-size, 12px)}::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-icon-suffix .color-picker{width:40px;display:block}::ng-deep .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .has-time input:first-child{width:84px;max-width:inherit;min-width:84px}::ng-deep .mat-mdc-form-field-type-mat-chip-grid .mat-mdc-form-field-infix{padding-top:7px!important;padding-bottom:7px!important}::ng-deep .mat-mdc-form-field-type-mat-chip-grid .mat-mdc-chip{padding-top:0!important;padding-bottom:0!important;margin-top:2px!important;margin-bottom:2px!important;margin-left:4px!important}\n"] }]
|
|
23274
23578
|
}], propDecorators: { formGroup: [{
|
|
23275
23579
|
type: Input
|
|
23276
23580
|
}], classType: [{
|
|
@@ -23902,6 +24206,19 @@ class FormFieldDefinition {
|
|
|
23902
24206
|
* @param ctx The context of the generic form component.
|
|
23903
24207
|
*/
|
|
23904
24208
|
prefix;
|
|
24209
|
+
/**
|
|
24210
|
+
* Suffix text displayed after the input field.
|
|
24211
|
+
* Can be a string or a function that returns a string.
|
|
24212
|
+
* @param x The entity associated with the field.
|
|
24213
|
+
* @param f The FormGroup containing this field.
|
|
24214
|
+
* @param ctx The context of the generic form component.
|
|
24215
|
+
*/
|
|
24216
|
+
suffix;
|
|
24217
|
+
/**
|
|
24218
|
+
* Flag indicating whether whitespace should be removed from the input value.
|
|
24219
|
+
* Defaults to false.
|
|
24220
|
+
*/
|
|
24221
|
+
removeWhitespace = false;
|
|
23905
24222
|
/**
|
|
23906
24223
|
* Projection specification for data retrieval.
|
|
23907
24224
|
* Can be a string or an array of strings.
|
|
@@ -24441,45 +24758,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
24441
24758
|
args: ['reverse']
|
|
24442
24759
|
}] }] });
|
|
24443
24760
|
|
|
24444
|
-
class NativeElementInjectorDirective {
|
|
24445
|
-
elementRef;
|
|
24446
|
-
control;
|
|
24447
|
-
model;
|
|
24448
|
-
/**
|
|
24449
|
-
* Constructor
|
|
24450
|
-
* @param elementRef
|
|
24451
|
-
* @param control
|
|
24452
|
-
* @param model
|
|
24453
|
-
*/
|
|
24454
|
-
constructor(elementRef, control, model) {
|
|
24455
|
-
this.elementRef = elementRef;
|
|
24456
|
-
this.control = control;
|
|
24457
|
-
this.model = model;
|
|
24458
|
-
}
|
|
24459
|
-
/**
|
|
24460
|
-
* Called after the constructor, initializing input properties, and the first call to ngOnChanges.
|
|
24461
|
-
* Add 'implements OnInit' to the class.
|
|
24462
|
-
*/
|
|
24463
|
-
ngOnInit() {
|
|
24464
|
-
if (!!this.model) {
|
|
24465
|
-
this.model.control.nativeElement = this.elementRef.nativeElement;
|
|
24466
|
-
}
|
|
24467
|
-
else if (this.control?.control) {
|
|
24468
|
-
this.control.control.nativeElement = this.elementRef.nativeElement;
|
|
24469
|
-
}
|
|
24470
|
-
}
|
|
24471
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NativeElementInjectorDirective, deps: [{ token: i0.ElementRef }, { token: i1$1.NgControl }, { token: i1$1.NgModel, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
24472
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: NativeElementInjectorDirective, isStandalone: true, selector: "[ngModel], [formControl], [formControlName]", ngImport: i0 });
|
|
24473
|
-
}
|
|
24474
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NativeElementInjectorDirective, decorators: [{
|
|
24475
|
-
type: Directive,
|
|
24476
|
-
args: [{
|
|
24477
|
-
selector: '[ngModel], [formControl], [formControlName]'
|
|
24478
|
-
}]
|
|
24479
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.NgControl }, { type: i1$1.NgModel, decorators: [{
|
|
24480
|
-
type: Optional
|
|
24481
|
-
}] }] });
|
|
24482
|
-
|
|
24483
24761
|
class UniqueValidatorDirective {
|
|
24484
24762
|
http;
|
|
24485
24763
|
unique;
|
|
@@ -24692,7 +24970,7 @@ class VdMenuComponent {
|
|
|
24692
24970
|
this.onMouseLeave.emit({ event: $event, item: item });
|
|
24693
24971
|
}
|
|
24694
24972
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VdMenuComponent, deps: [{ token: VdMediaService }], target: i0.ɵɵFactoryTarget.Component });
|
|
24695
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: VdMenuComponent, isStandalone: true, selector: "vd-menu", inputs: { items: "items", activeExact: "activeExact", fontSet: "fontSet", avatar: "avatar", mobile: "mobile" }, outputs: { onClick: "click", onMouseEnter: "over", onMouseLeave: "out" }, ngImport: i0, template: "<mat-nav-list>\r\n <mat-accordion displayMode=\"flat\">\r\n @for (item of items; track item; let last = $last) {\r\n @if ((item?.items?.length ?? 0) > 0 && mobile) {\r\n <mat-expansion-panel class=\"mat-elevation-z raw\"\r\n (click)=\"$event.stopPropagation();\"\r\n [disabled]=\"!mobile\"\r\n [hideToggle]=\"!mobile || !item?.items?.length\"\r\n [ngClass]=\"{'icon-only': !item.title, 'mobile': mobile}\"\r\n (delayedHover)=\"(item.items?.length ?? 0) > 0 && itemMouseEnter(item.event ? item.event : $event, item)\"\r\n (mouseleave)=\"(item.items?.length ?? 0) >0 && false&& itemMouseLeave(item.event ? item.event : $event, item)\"\r\n [routerLinkActive]=\"['active']\"\r\n [routerLinkActiveOptions]=\"{exact:false}\">\r\n <mat-expansion-panel-header [expandedHeight]=\"'48px'\">\r\n <mat-panel-title>\r\n @if (!avatar) {\r\n <mat-icon [fontSet]=\"fontSet\" [style.color]=\"item.iconColor\">{{(item.icon | func:item) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (!avatar && item.title) {\r\n <span [style.color]=\"item.textColor\">{{item.title}}</span>\r\n }\r\n @if (avatar) {\r\n <mat-icon [fontSet]=\"fontSet\">{{(item.icon | func:item) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (avatar) {\r\n <h3>{{item.title}}</h3>\r\n }\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <mat-nav-list>\r\n @for (subItem of item.items; track subItem; let subLast = $last) {\r\n <ng-template let-subItem let-subLast=\"last\" [ngForOf]=\"item.items\" class=\"sub-menu\">\r\n @if (subItem.enabled) {\r\n <a mat-list-item [style.backgroundColor]=\"subItem.backgroundColor\" [routerLink]=\"subItem.path\" target=\"_{{MenuItemTarget[item.target??0].toLowerCase()}}\" [routerLinkActive]=\"['active']\" [ngClass]=\"{'icon-only': !subItem.title}\" [routerLinkActiveOptions]=\"{exact:subItem.activeExact??false}\" [fragment]=\"subItem.fragment\" (click)=\"itemClicked($event, subItem)\">\r\n @if (!avatar) {\r\n <mat-icon [fontSet]=\"fontSet\" [style.color]=\"subItem.iconColor\">{{(subItem.icon | func:subItem) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (!avatar && subItem.title) {\r\n <span [style.color]=\"subItem.textColor\">{{subItem.title}}</span>\r\n }\r\n @if (avatar) {\r\n <mat-icon [fontSet]=\"fontSet\">{{(subItem.icon | func:subItem) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (avatar) {\r\n <h3>{{subItem.title}}</h3>\r\n }\r\n @if (avatar && subItem.description) {\r\n <p>{{subItem.description}}</p>\r\n }\r\n </a>\r\n }\r\n @if (subItem.divider && !avatar) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (!subItem.divider && avatar && !subLast) {\r\n <mat-divider [inset]=\"avatar\"></mat-divider>\r\n }\r\n </ng-template>\r\n }\r\n </mat-nav-list>\r\n </mat-expansion-panel>\r\n } @else {\r\n @if (item.enabled) {\r\n <a mat-list-item [style.backgroundColor]=\"item.backgroundColor\" [routerLink]=\"item.path\" target=\"_{{MenuItemTarget[item.target??0].toLowerCase()}}\" [routerLinkActive]=\"['active']\" [ngClass]=\"{'icon-only': !item.title}\" [routerLinkActiveOptions]=\"{exact:item.activeExact??false}\" [fragment]=\"item.fragment\" (click)=\"itemClicked($event, item)\" (delayedHover)=\"(item.items?.length ?? 0) > 0 && itemMouseEnter(item.event ? item.event : $event, item)\" (mouseleave)=\"(item.items?.length ?? 0) >0 && false&& itemMouseLeave(item.event ? item.event : $event, item)\">\r\n @if (!avatar) {\r\n <mat-icon [fontSet]=\"fontSet\" [style.color]=\"item.iconColor\" matListItemIcon>{{(item.icon | func:item) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (!avatar && item.title) {\r\n <span [style.color]=\"item.textColor\" matListItemTitle>{{item.title}}</span>\r\n }\r\n @if (avatar) {\r\n <mat-icon [fontSet]=\"fontSet\" matListAvatar>{{(item.icon | func:item) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (avatar) {\r\n <h3 matLine>{{item.title}}</h3>\r\n }\r\n @if (avatar && item.description) {\r\n <p matLine>{{item.description}}</p>\r\n }\r\n </a>\r\n }\r\n @if (item.divider && !avatar) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (!item.divider && avatar && !last) {\r\n <mat-divider [inset]=\"avatar\"></mat-divider>\r\n }\r\n }\r\n }\r\n </mat-accordion>\r\n</mat-nav-list>", styles: [":host ::ng-deep .mat-mdc-nav-list .mat-mdc-list-item.icon-only .mdc-list-item__content{display:none!important}:host ::ng-deep .mat-expansion-panel{background-color:transparent}:host ::ng-deep .mat-mdc-list-item:not(.active),:host ::ng-deep .mat-mdc-list-item:active,:host ::ng-deep .mat-mdc-list-item:focus,:host ::ng-deep .mat-expansion-panel:not(.active),:host ::ng-deep .mat-expansion-panel:active,:host ::ng-deep .mat-expansion-panel:focus{background-color:transparent!important}:host ::ng-deep .mat-mdc-list-item:not(.active):before,:host ::ng-deep .mat-mdc-list-item:active:before,:host ::ng-deep .mat-mdc-list-item:focus:before,:host ::ng-deep .mat-expansion-panel:not(.active):before,:host ::ng-deep .mat-expansion-panel:active:before,:host ::ng-deep .mat-expansion-panel:focus:before{background-color:transparent!important}:host ::ng-deep .mat-mdc-list-item,:host ::ng-deep .mat-expansion-panel{font-family:var(--mat-expansion-header-text-font, var(--mat-sys-title-medium-font));font-weight:var(--mat-expansion-header-text-weight, var(--mat-sys-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-sys-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-sys-title-medium-tracking))}:host ::ng-deep .mat-mdc-list-item mat-icon,:host ::ng-deep .mat-expansion-panel mat-icon{margin-right:18px;margin-bottom:3px}:host ::ng-deep .mat-mdc-list-item ::ng-deep .mat-expansion-panel-body,:host ::ng-deep .mat-expansion-panel ::ng-deep .mat-expansion-panel-body{padding-bottom:0!important}:host ::ng-deep .mat-mdc-list-item:not(.mobile)>.mat-expansion-panel-header,:host ::ng-deep .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header{padding:4px 8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i4$2.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i4$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i4$2.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "component", type: i6$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i4$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "directive", type: i6$3.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i6$3.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i6$3.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i6$3.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "directive", type: VdDelayedHoverDirective, selector: "[delayedHover]", inputs: ["duration"], outputs: ["delayedHover"], exportAs: ["hesitation"] }, { kind: "pipe", type: FuncPipe, name: "func" }] });
|
|
24973
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: VdMenuComponent, isStandalone: true, selector: "vd-menu", inputs: { items: "items", activeExact: "activeExact", fontSet: "fontSet", avatar: "avatar", mobile: "mobile" }, outputs: { onClick: "click", onMouseEnter: "over", onMouseLeave: "out" }, ngImport: i0, template: "<mat-nav-list>\r\n <mat-accordion displayMode=\"flat\">\r\n @for (item of items; track item; let last = $last) {\r\n @if ((item?.items?.length ?? 0) > 0 && mobile) {\r\n <mat-expansion-panel class=\"mat-elevation-z raw\"\r\n (click)=\"$event.stopPropagation();\"\r\n [disabled]=\"!mobile\"\r\n [hideToggle]=\"!mobile || !item?.items?.length\"\r\n [ngClass]=\"{'icon-only': !item.title, 'mobile': mobile}\"\r\n (delayedHover)=\"(item.items?.length ?? 0) > 0 && itemMouseEnter(item.event ? item.event : $event, item)\"\r\n (mouseleave)=\"(item.items?.length ?? 0) >0 && false&& itemMouseLeave(item.event ? item.event : $event, item)\"\r\n [routerLinkActive]=\"['active']\"\r\n [routerLinkActiveOptions]=\"{exact:false}\">\r\n <mat-expansion-panel-header [expandedHeight]=\"'48px'\">\r\n <mat-panel-title>\r\n @if (!avatar) {\r\n <mat-icon [fontSet]=\"fontSet\"\r\n [style.color]=\"item.iconColor\"\r\n [matBadge]=\"item.badge ? item.badge() : null\"\r\n [matBadgeHidden]=\"!item.badge || item.badge() === 0\"\r\n aria-hidden=\"false\">\r\n {{(item.icon | func:item) || 'radio_button_unchecked'}}\r\n </mat-icon>\r\n }\r\n @if (!avatar && item.title) {\r\n <span [style.color]=\"item.textColor\">{{item.title}}</span>\r\n }\r\n @if (avatar) {\r\n <mat-icon [fontSet]=\"fontSet\">{{(item.icon | func:item) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (avatar) {\r\n <h3>{{item.title}}</h3>\r\n }\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <mat-nav-list>\r\n @for (subItem of item.items; track subItem; let subLast = $last) {\r\n @if (subItem.enabled) {\r\n <a mat-list-item\r\n [style.backgroundColor]=\"subItem.backgroundColor\"\r\n [routerLink]=\"subItem.path\"\r\n target=\"_{{MenuItemTarget[item.target??0].toLowerCase()}}\"\r\n [routerLinkActive]=\"['active']\" [ngClass]=\"{'icon-only': !subItem.title}\"\r\n [routerLinkActiveOptions]=\"{exact:subItem.activeExact??false}\"\r\n [fragment]=\"subItem.fragment\"\r\n (click)=\"itemClicked($event, subItem)\">\r\n @if (!avatar) {\r\n <mat-icon [fontSet]=\"fontSet\"\r\n [style.color]=\"subItem.iconColor\"\r\n [matBadge]=\"subItem.badge ? subItem.badge() : null\"\r\n [matBadgeHidden]=\"!subItem.badge || subItem.badge() === 0\"\r\n aria-hidden=\"false\">\r\n {{(subItem.icon | func:subItem) || 'radio_button_unchecked'}}\r\n </mat-icon>\r\n }\r\n @if (!avatar && subItem.title) {\r\n <span [style.color]=\"subItem.textColor\">{{subItem.title}}</span>\r\n }\r\n @if (avatar) {\r\n <mat-icon [fontSet]=\"fontSet\">{{(subItem.icon | func:subItem) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (avatar) {\r\n <h3>{{subItem.title}}</h3>\r\n }\r\n @if (avatar && subItem.description) {\r\n <p>{{subItem.description}}</p>\r\n }\r\n </a>\r\n }\r\n @if (subItem.divider && !avatar) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (!subItem.divider && avatar && !subLast) {\r\n <mat-divider [inset]=\"avatar\"></mat-divider>\r\n }\r\n }\r\n </mat-nav-list>\r\n </mat-expansion-panel>\r\n } @else {\r\n @if (item.enabled) {\r\n <a mat-list-item [style.backgroundColor]=\"item.backgroundColor\" [routerLink]=\"item.path\" target=\"_{{MenuItemTarget[item.target??0].toLowerCase()}}\" [routerLinkActive]=\"['active']\" [ngClass]=\"{'icon-only': !item.title}\" [routerLinkActiveOptions]=\"{exact:item.activeExact??false}\" [fragment]=\"item.fragment\" (click)=\"itemClicked($event, item)\" (delayedHover)=\"(item.items?.length ?? 0) > 0 && itemMouseEnter(item.event ? item.event : $event, item)\" (mouseleave)=\"(item.items?.length ?? 0) >0 && false&& itemMouseLeave(item.event ? item.event : $event, item)\">\r\n @if (!avatar) {\r\n <mat-icon [fontSet]=\"fontSet\"\r\n [style.color]=\"item.iconColor\"\r\n [matBadge]=\"item.badge ? item.badge() : null\"\r\n [matBadgeHidden]=\"!item.badge || item.badge() === 0\"\r\n aria-hidden=\"false\"\r\n matListItemIcon>\r\n {{(item.icon | func:item) || 'radio_button_unchecked'}}\r\n </mat-icon>\r\n }\r\n @if (!avatar && item.title) {\r\n <span [style.color]=\"item.textColor\" matListItemTitle>{{item.title}}</span>\r\n }\r\n @if (avatar) {\r\n <mat-icon [fontSet]=\"fontSet\" matListAvatar>{{(item.icon | func:item) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (avatar) {\r\n <h3 matLine>{{item.title}}</h3>\r\n }\r\n @if (avatar && item.description) {\r\n <p matLine>{{item.description}}</p>\r\n }\r\n </a>\r\n }\r\n @if (item.divider && !avatar) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (!item.divider && avatar && !last) {\r\n <mat-divider [inset]=\"avatar\"></mat-divider>\r\n }\r\n }\r\n }\r\n </mat-accordion>\r\n</mat-nav-list>", styles: [":host ::ng-deep .mat-mdc-nav-list .mat-mdc-list-item.icon-only .mdc-list-item__content{display:none!important}:host ::ng-deep .mat-expansion-panel{background-color:transparent}:host ::ng-deep .mat-mdc-list-item:not(.active),:host ::ng-deep .mat-mdc-list-item:active,:host ::ng-deep .mat-mdc-list-item:focus,:host ::ng-deep .mat-expansion-panel:not(.active),:host ::ng-deep .mat-expansion-panel:active,:host ::ng-deep .mat-expansion-panel:focus{background-color:transparent!important}:host ::ng-deep .mat-mdc-list-item:not(.active):before,:host ::ng-deep .mat-mdc-list-item:active:before,:host ::ng-deep .mat-mdc-list-item:focus:before,:host ::ng-deep .mat-expansion-panel:not(.active):before,:host ::ng-deep .mat-expansion-panel:active:before,:host ::ng-deep .mat-expansion-panel:focus:before{background-color:transparent!important}:host ::ng-deep .mat-mdc-list-item,:host ::ng-deep .mat-expansion-panel{font-family:var(--mat-expansion-header-text-font, var(--mat-sys-title-medium-font));font-weight:var(--mat-expansion-header-text-weight, var(--mat-sys-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-sys-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-sys-title-medium-tracking))}:host ::ng-deep .mat-mdc-list-item mat-icon,:host ::ng-deep .mat-expansion-panel mat-icon{margin-right:18px;margin-bottom:3px}:host ::ng-deep .mat-mdc-list-item ::ng-deep .mat-expansion-panel-body,:host ::ng-deep .mat-expansion-panel ::ng-deep .mat-expansion-panel-body{padding-bottom:0!important}:host ::ng-deep .mat-mdc-list-item:not(.mobile)>.mat-expansion-panel-header,:host ::ng-deep .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header{padding:4px 8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i4$2.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i4$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i4$2.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "component", type: i6$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i4$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "directive", type: i6$3.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i6$3.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i6$3.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i6$3.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i8$1.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "directive", type: VdDelayedHoverDirective, selector: "[delayedHover]", inputs: ["duration"], outputs: ["delayedHover"], exportAs: ["hesitation"] }, { kind: "pipe", type: FuncPipe, name: "func" }] });
|
|
24696
24974
|
}
|
|
24697
24975
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VdMenuComponent, decorators: [{
|
|
24698
24976
|
type: Component,
|
|
@@ -24703,9 +24981,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
24703
24981
|
MatExpansionModule,
|
|
24704
24982
|
MatIconModule,
|
|
24705
24983
|
MatDividerModule,
|
|
24984
|
+
MatBadgeModule,
|
|
24706
24985
|
VdDelayedHoverDirective,
|
|
24707
24986
|
FuncPipe
|
|
24708
|
-
], template: "<mat-nav-list>\r\n
|
|
24987
|
+
], template: "<mat-nav-list>\r\n <mat-accordion displayMode=\"flat\">\r\n @for (item of items; track item; let last = $last) {\r\n @if ((item?.items?.length ?? 0) > 0 && mobile) {\r\n <mat-expansion-panel class=\"mat-elevation-z raw\"\r\n (click)=\"$event.stopPropagation();\"\r\n [disabled]=\"!mobile\"\r\n [hideToggle]=\"!mobile || !item?.items?.length\"\r\n [ngClass]=\"{'icon-only': !item.title, 'mobile': mobile}\"\r\n (delayedHover)=\"(item.items?.length ?? 0) > 0 && itemMouseEnter(item.event ? item.event : $event, item)\"\r\n (mouseleave)=\"(item.items?.length ?? 0) >0 && false&& itemMouseLeave(item.event ? item.event : $event, item)\"\r\n [routerLinkActive]=\"['active']\"\r\n [routerLinkActiveOptions]=\"{exact:false}\">\r\n <mat-expansion-panel-header [expandedHeight]=\"'48px'\">\r\n <mat-panel-title>\r\n @if (!avatar) {\r\n <mat-icon [fontSet]=\"fontSet\"\r\n [style.color]=\"item.iconColor\"\r\n [matBadge]=\"item.badge ? item.badge() : null\"\r\n [matBadgeHidden]=\"!item.badge || item.badge() === 0\"\r\n aria-hidden=\"false\">\r\n {{(item.icon | func:item) || 'radio_button_unchecked'}}\r\n </mat-icon>\r\n }\r\n @if (!avatar && item.title) {\r\n <span [style.color]=\"item.textColor\">{{item.title}}</span>\r\n }\r\n @if (avatar) {\r\n <mat-icon [fontSet]=\"fontSet\">{{(item.icon | func:item) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (avatar) {\r\n <h3>{{item.title}}</h3>\r\n }\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <mat-nav-list>\r\n @for (subItem of item.items; track subItem; let subLast = $last) {\r\n @if (subItem.enabled) {\r\n <a mat-list-item\r\n [style.backgroundColor]=\"subItem.backgroundColor\"\r\n [routerLink]=\"subItem.path\"\r\n target=\"_{{MenuItemTarget[item.target??0].toLowerCase()}}\"\r\n [routerLinkActive]=\"['active']\" [ngClass]=\"{'icon-only': !subItem.title}\"\r\n [routerLinkActiveOptions]=\"{exact:subItem.activeExact??false}\"\r\n [fragment]=\"subItem.fragment\"\r\n (click)=\"itemClicked($event, subItem)\">\r\n @if (!avatar) {\r\n <mat-icon [fontSet]=\"fontSet\"\r\n [style.color]=\"subItem.iconColor\"\r\n [matBadge]=\"subItem.badge ? subItem.badge() : null\"\r\n [matBadgeHidden]=\"!subItem.badge || subItem.badge() === 0\"\r\n aria-hidden=\"false\">\r\n {{(subItem.icon | func:subItem) || 'radio_button_unchecked'}}\r\n </mat-icon>\r\n }\r\n @if (!avatar && subItem.title) {\r\n <span [style.color]=\"subItem.textColor\">{{subItem.title}}</span>\r\n }\r\n @if (avatar) {\r\n <mat-icon [fontSet]=\"fontSet\">{{(subItem.icon | func:subItem) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (avatar) {\r\n <h3>{{subItem.title}}</h3>\r\n }\r\n @if (avatar && subItem.description) {\r\n <p>{{subItem.description}}</p>\r\n }\r\n </a>\r\n }\r\n @if (subItem.divider && !avatar) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (!subItem.divider && avatar && !subLast) {\r\n <mat-divider [inset]=\"avatar\"></mat-divider>\r\n }\r\n }\r\n </mat-nav-list>\r\n </mat-expansion-panel>\r\n } @else {\r\n @if (item.enabled) {\r\n <a mat-list-item [style.backgroundColor]=\"item.backgroundColor\" [routerLink]=\"item.path\" target=\"_{{MenuItemTarget[item.target??0].toLowerCase()}}\" [routerLinkActive]=\"['active']\" [ngClass]=\"{'icon-only': !item.title}\" [routerLinkActiveOptions]=\"{exact:item.activeExact??false}\" [fragment]=\"item.fragment\" (click)=\"itemClicked($event, item)\" (delayedHover)=\"(item.items?.length ?? 0) > 0 && itemMouseEnter(item.event ? item.event : $event, item)\" (mouseleave)=\"(item.items?.length ?? 0) >0 && false&& itemMouseLeave(item.event ? item.event : $event, item)\">\r\n @if (!avatar) {\r\n <mat-icon [fontSet]=\"fontSet\"\r\n [style.color]=\"item.iconColor\"\r\n [matBadge]=\"item.badge ? item.badge() : null\"\r\n [matBadgeHidden]=\"!item.badge || item.badge() === 0\"\r\n aria-hidden=\"false\"\r\n matListItemIcon>\r\n {{(item.icon | func:item) || 'radio_button_unchecked'}}\r\n </mat-icon>\r\n }\r\n @if (!avatar && item.title) {\r\n <span [style.color]=\"item.textColor\" matListItemTitle>{{item.title}}</span>\r\n }\r\n @if (avatar) {\r\n <mat-icon [fontSet]=\"fontSet\" matListAvatar>{{(item.icon | func:item) || 'radio_button_unchecked'}}</mat-icon>\r\n }\r\n @if (avatar) {\r\n <h3 matLine>{{item.title}}</h3>\r\n }\r\n @if (avatar && item.description) {\r\n <p matLine>{{item.description}}</p>\r\n }\r\n </a>\r\n }\r\n @if (item.divider && !avatar) {\r\n <mat-divider></mat-divider>\r\n }\r\n @if (!item.divider && avatar && !last) {\r\n <mat-divider [inset]=\"avatar\"></mat-divider>\r\n }\r\n }\r\n }\r\n </mat-accordion>\r\n</mat-nav-list>", styles: [":host ::ng-deep .mat-mdc-nav-list .mat-mdc-list-item.icon-only .mdc-list-item__content{display:none!important}:host ::ng-deep .mat-expansion-panel{background-color:transparent}:host ::ng-deep .mat-mdc-list-item:not(.active),:host ::ng-deep .mat-mdc-list-item:active,:host ::ng-deep .mat-mdc-list-item:focus,:host ::ng-deep .mat-expansion-panel:not(.active),:host ::ng-deep .mat-expansion-panel:active,:host ::ng-deep .mat-expansion-panel:focus{background-color:transparent!important}:host ::ng-deep .mat-mdc-list-item:not(.active):before,:host ::ng-deep .mat-mdc-list-item:active:before,:host ::ng-deep .mat-mdc-list-item:focus:before,:host ::ng-deep .mat-expansion-panel:not(.active):before,:host ::ng-deep .mat-expansion-panel:active:before,:host ::ng-deep .mat-expansion-panel:focus:before{background-color:transparent!important}:host ::ng-deep .mat-mdc-list-item,:host ::ng-deep .mat-expansion-panel{font-family:var(--mat-expansion-header-text-font, var(--mat-sys-title-medium-font));font-weight:var(--mat-expansion-header-text-weight, var(--mat-sys-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-sys-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-sys-title-medium-tracking))}:host ::ng-deep .mat-mdc-list-item mat-icon,:host ::ng-deep .mat-expansion-panel mat-icon{margin-right:18px;margin-bottom:3px}:host ::ng-deep .mat-mdc-list-item ::ng-deep .mat-expansion-panel-body,:host ::ng-deep .mat-expansion-panel ::ng-deep .mat-expansion-panel-body{padding-bottom:0!important}:host ::ng-deep .mat-mdc-list-item:not(.mobile)>.mat-expansion-panel-header,:host ::ng-deep .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header{padding:4px 8px}\n"] }]
|
|
24709
24988
|
}], ctorParameters: () => [{ type: VdMediaService }], propDecorators: { items: [{
|
|
24710
24989
|
type: Input
|
|
24711
24990
|
}], activeExact: [{
|
|
@@ -24990,6 +25269,10 @@ let MenuItem = class MenuItem extends AuditEntity {
|
|
|
24990
25269
|
* The child menu items.
|
|
24991
25270
|
*/
|
|
24992
25271
|
items;
|
|
25272
|
+
/**
|
|
25273
|
+
* A function that returns the badge count for the menu item.
|
|
25274
|
+
*/
|
|
25275
|
+
badge;
|
|
24993
25276
|
};
|
|
24994
25277
|
__decorate([
|
|
24995
25278
|
prop(),
|
|
@@ -25905,7 +26188,7 @@ class VdLayoutComponent {
|
|
|
25905
26188
|
this.closeMenu($event);
|
|
25906
26189
|
}
|
|
25907
26190
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VdLayoutComponent, deps: [{ token: VdMediaService }], target: i0.ɵɵFactoryTarget.Component });
|
|
25908
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: VdLayoutComponent, isStandalone: true, selector: "vd-layout", inputs: { menuItems: "menuItems", showDebugBanner: "showDebugBanner", mode: "mode", color: "color", opened: "opened", mini: "mini", sideGt: "sideGt", sidenavWidth: "sidenavWidth", subMenuWidth: "subMenuWidth" }, outputs: { expandedChange: "expandedChange" }, viewQueries: [{ propertyName: "sidenav", first: true, predicate: MatSidenav, descendants: true, static: true }, { propertyName: "subMenuDrawer", first: true, predicate: ["subMenuDrawer"], descendants: true, static: true }], ngImport: i0, template: "<mat-sidenav-container fullscreen [ngClass]=\"{'sidenav-container-mini': mini}\">\r\n <mat-sidenav #sidenav class=\"vd-layout-sidenav\" [mode]=\"mode\" [opened]=\"opened\" [ngClass]=\"{'sidenav-mini': mini}\" [style.max-width]=\"sidenavWidth\" [style.min-width]=\"sidenavWidth\" [disableClose]=\"disableClose\">\r\n <ng-content select=\"vd-navigation-drawer\"></ng-content>\r\n <ng-content select=\"[vd-sidenav-content]\"></ng-content>\r\n </mat-sidenav>\r\n <mat-drawer-container fullscreen>\r\n <mat-drawer #subMenuDrawer mode=\"over\" class=\"mat-drawer-submenu\" [style.max-width]=\"subMenuWidth\" [style.min-width]=\"subMenuWidth\" (mouseleave)=\"onSubMenuMouseOut($event)\">\r\n <vd-menu [items]=\"menuItems\" [activeExact]=\"false\" [mobile]=\"mobile\" (click)=\"closeMenu($event)\"></vd-menu>\r\n </mat-drawer>\r\n @if (showDebugBanner) {\r\n <div class=\"debug-banner\">DEBUG</div>\r\n }\r\n <ng-content></ng-content>\r\n </mat-drawer-container>\r\n</mat-sidenav-container>", styles: [":host{display:flex;margin:0;width:100%;min-height:100%;height:100%;overflow:hidden}:host ::ng-deep>mat-sidenav-container>mat-sidenav{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;flex-direction:column;border-right:none}:host ::ng-deep>mat-sidenav-container.sidenav-container-mini .vd-layout-nav-wrapper>mat-toolbar .vd-layout-menu-button{display:none!important}:host ::ng-deep>mat-sidenav-container.sidenav-container-mini .mat-drawer.mat-drawer-submenu{border-radius:0 16px 16px 0}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-expansion-panel-header-title mat-icon,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-expansion-panel-header-title mat-icon{margin-right:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-content-hide-toggle,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-content-hide-toggle{margin-right:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel ::ng-deep .mat-expansion-panel-body,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel ::ng-deep .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header{padding:6px 0;height:52px!important;justify-content:center}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header>.mat-content>.mat-expansion-panel-header-title,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header>.mat-content>.mat-expansion-panel-header-title{display:flex;flex-direction:column;width:80px;margin:0 auto;justify-content:center;font-size:.83em}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item{display:flex;flex-direction:column;width:80px;margin:0 auto 4px;padding:6px 0;height:66px!important;justify-content:center}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item .mdc-list-item__content .mat-mdc-list-item-title,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item .mdc-list-item__content .mat-mdc-list-item-title{font-size:.
|
|
26191
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: VdLayoutComponent, isStandalone: true, selector: "vd-layout", inputs: { menuItems: "menuItems", showDebugBanner: "showDebugBanner", mode: "mode", color: "color", opened: "opened", mini: "mini", sideGt: "sideGt", sidenavWidth: "sidenavWidth", subMenuWidth: "subMenuWidth" }, outputs: { expandedChange: "expandedChange" }, viewQueries: [{ propertyName: "sidenav", first: true, predicate: MatSidenav, descendants: true, static: true }, { propertyName: "subMenuDrawer", first: true, predicate: ["subMenuDrawer"], descendants: true, static: true }], ngImport: i0, template: "<mat-sidenav-container fullscreen [ngClass]=\"{'sidenav-container-mini': mini}\">\r\n <mat-sidenav #sidenav class=\"vd-layout-sidenav\" [mode]=\"mode\" [opened]=\"opened\" [ngClass]=\"{'sidenav-mini': mini}\" [style.max-width]=\"sidenavWidth\" [style.min-width]=\"sidenavWidth\" [disableClose]=\"disableClose\">\r\n <ng-content select=\"vd-navigation-drawer\"></ng-content>\r\n <ng-content select=\"[vd-sidenav-content]\"></ng-content>\r\n </mat-sidenav>\r\n <mat-drawer-container fullscreen>\r\n <mat-drawer #subMenuDrawer mode=\"over\" class=\"mat-drawer-submenu\" [style.max-width]=\"subMenuWidth\" [style.min-width]=\"subMenuWidth\" (mouseleave)=\"onSubMenuMouseOut($event)\">\r\n <vd-menu [items]=\"menuItems\" [activeExact]=\"false\" [mobile]=\"mobile\" (click)=\"closeMenu($event)\"></vd-menu>\r\n </mat-drawer>\r\n @if (showDebugBanner) {\r\n <div class=\"debug-banner\">DEBUG</div>\r\n }\r\n <ng-content></ng-content>\r\n </mat-drawer-container>\r\n</mat-sidenav-container>", styles: [":host{display:flex;margin:0;width:100%;min-height:100%;height:100%;overflow:hidden}:host ::ng-deep>mat-sidenav-container>mat-sidenav{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;flex-direction:column;border-right:none}:host ::ng-deep>mat-sidenav-container.sidenav-container-mini .vd-layout-nav-wrapper>mat-toolbar .vd-layout-menu-button{display:none!important}:host ::ng-deep>mat-sidenav-container.sidenav-container-mini .mat-drawer.mat-drawer-submenu{border-radius:0 16px 16px 0}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-expansion-panel-header-title mat-icon,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-expansion-panel-header-title mat-icon{margin-right:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-content-hide-toggle,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-content-hide-toggle{margin-right:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel ::ng-deep .mat-expansion-panel-body,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel ::ng-deep .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header{padding:6px 0;height:52px!important;justify-content:center}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header>.mat-content>.mat-expansion-panel-header-title,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header>.mat-content>.mat-expansion-panel-header-title{display:flex;flex-direction:column;width:80px;margin:0 auto;justify-content:center;font-size:.83em}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item{display:flex;flex-direction:column;width:80px;margin:0 auto 4px;padding:6px 0;height:66px!important;justify-content:center;border-radius:18%}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item .mdc-list-item__content .mat-mdc-list-item-title,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item .mdc-list-item__content .mat-mdc-list-item-title{font-size:.7em;font-weight:500;padding-top:2px}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive:before,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive:before{background-color:inherit;width:56px;height:32px;border-radius:16px;position:absolute;top:3px;margin-right:auto;margin-bottom:4px;margin-left:auto}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive:hover:before,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive.active:before,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive:hover:before,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive.active:before{background-color:var(--mat-sys-primary)!important}:host ::ng-deep mat-nav-list .mdc-list-item--with-leading-icon .mat-mdc-list-item-title{overflow:hidden;text-overflow:ellipsis;display:inline!important}:host ::ng-deep mat-nav-list .mdc-list-item--with-leading-icon .mdc-list-item__start{margin-right:18px!important}:host ::ng-deep .debug-banner{position:fixed;top:11px;right:-38px;background-color:#6d0000;color:#fff;padding:1px 36px;font-size:12px;text-transform:uppercase;z-index:1000;transform:rotate(45deg)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i3$4.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i3$4.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i3$4.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i3$4.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: VdMenuComponent, selector: "vd-menu", inputs: ["items", "activeExact", "fontSet", "avatar", "mobile"], outputs: ["click", "over", "out"] }] });
|
|
25909
26192
|
}
|
|
25910
26193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: VdLayoutComponent, decorators: [{
|
|
25911
26194
|
type: Component,
|
|
@@ -25915,7 +26198,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
25915
26198
|
MatToolbarModule,
|
|
25916
26199
|
MatCardModule,
|
|
25917
26200
|
VdMenuComponent
|
|
25918
|
-
], template: "<mat-sidenav-container fullscreen [ngClass]=\"{'sidenav-container-mini': mini}\">\r\n <mat-sidenav #sidenav class=\"vd-layout-sidenav\" [mode]=\"mode\" [opened]=\"opened\" [ngClass]=\"{'sidenav-mini': mini}\" [style.max-width]=\"sidenavWidth\" [style.min-width]=\"sidenavWidth\" [disableClose]=\"disableClose\">\r\n <ng-content select=\"vd-navigation-drawer\"></ng-content>\r\n <ng-content select=\"[vd-sidenav-content]\"></ng-content>\r\n </mat-sidenav>\r\n <mat-drawer-container fullscreen>\r\n <mat-drawer #subMenuDrawer mode=\"over\" class=\"mat-drawer-submenu\" [style.max-width]=\"subMenuWidth\" [style.min-width]=\"subMenuWidth\" (mouseleave)=\"onSubMenuMouseOut($event)\">\r\n <vd-menu [items]=\"menuItems\" [activeExact]=\"false\" [mobile]=\"mobile\" (click)=\"closeMenu($event)\"></vd-menu>\r\n </mat-drawer>\r\n @if (showDebugBanner) {\r\n <div class=\"debug-banner\">DEBUG</div>\r\n }\r\n <ng-content></ng-content>\r\n </mat-drawer-container>\r\n</mat-sidenav-container>", styles: [":host{display:flex;margin:0;width:100%;min-height:100%;height:100%;overflow:hidden}:host ::ng-deep>mat-sidenav-container>mat-sidenav{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;flex-direction:column;border-right:none}:host ::ng-deep>mat-sidenav-container.sidenav-container-mini .vd-layout-nav-wrapper>mat-toolbar .vd-layout-menu-button{display:none!important}:host ::ng-deep>mat-sidenav-container.sidenav-container-mini .mat-drawer.mat-drawer-submenu{border-radius:0 16px 16px 0}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-expansion-panel-header-title mat-icon,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-expansion-panel-header-title mat-icon{margin-right:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-content-hide-toggle,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-content-hide-toggle{margin-right:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel ::ng-deep .mat-expansion-panel-body,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel ::ng-deep .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header{padding:6px 0;height:52px!important;justify-content:center}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header>.mat-content>.mat-expansion-panel-header-title,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header>.mat-content>.mat-expansion-panel-header-title{display:flex;flex-direction:column;width:80px;margin:0 auto;justify-content:center;font-size:.83em}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item{display:flex;flex-direction:column;width:80px;margin:0 auto 4px;padding:6px 0;height:66px!important;justify-content:center}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item .mdc-list-item__content .mat-mdc-list-item-title,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item .mdc-list-item__content .mat-mdc-list-item-title{font-size:.
|
|
26201
|
+
], template: "<mat-sidenav-container fullscreen [ngClass]=\"{'sidenav-container-mini': mini}\">\r\n <mat-sidenav #sidenav class=\"vd-layout-sidenav\" [mode]=\"mode\" [opened]=\"opened\" [ngClass]=\"{'sidenav-mini': mini}\" [style.max-width]=\"sidenavWidth\" [style.min-width]=\"sidenavWidth\" [disableClose]=\"disableClose\">\r\n <ng-content select=\"vd-navigation-drawer\"></ng-content>\r\n <ng-content select=\"[vd-sidenav-content]\"></ng-content>\r\n </mat-sidenav>\r\n <mat-drawer-container fullscreen>\r\n <mat-drawer #subMenuDrawer mode=\"over\" class=\"mat-drawer-submenu\" [style.max-width]=\"subMenuWidth\" [style.min-width]=\"subMenuWidth\" (mouseleave)=\"onSubMenuMouseOut($event)\">\r\n <vd-menu [items]=\"menuItems\" [activeExact]=\"false\" [mobile]=\"mobile\" (click)=\"closeMenu($event)\"></vd-menu>\r\n </mat-drawer>\r\n @if (showDebugBanner) {\r\n <div class=\"debug-banner\">DEBUG</div>\r\n }\r\n <ng-content></ng-content>\r\n </mat-drawer-container>\r\n</mat-sidenav-container>", styles: [":host{display:flex;margin:0;width:100%;min-height:100%;height:100%;overflow:hidden}:host ::ng-deep>mat-sidenav-container>mat-sidenav{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;flex-direction:column;border-right:none}:host ::ng-deep>mat-sidenav-container.sidenav-container-mini .vd-layout-nav-wrapper>mat-toolbar .vd-layout-menu-button{display:none!important}:host ::ng-deep>mat-sidenav-container.sidenav-container-mini .mat-drawer.mat-drawer-submenu{border-radius:0 16px 16px 0}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-expansion-panel-header-title mat-icon,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-expansion-panel-header-title mat-icon{margin-right:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-content-hide-toggle,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel>.mat-expansion-panel-header .mat-content-hide-toggle{margin-right:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel ::ng-deep .mat-expansion-panel-body,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel ::ng-deep .mat-expansion-panel-body{padding:0!important}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header{padding:6px 0;height:52px!important;justify-content:center}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header>.mat-content>.mat-expansion-panel-header-title,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-expansion-panel:not(.mobile)>.mat-expansion-panel-header>.mat-content>.mat-expansion-panel-header-title{display:flex;flex-direction:column;width:80px;margin:0 auto;justify-content:center;font-size:.83em}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item{display:flex;flex-direction:column;width:80px;margin:0 auto 4px;padding:6px 0;height:66px!important;justify-content:center;border-radius:18%}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item .mdc-list-item__content .mat-mdc-list-item-title,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item .mdc-list-item__content .mat-mdc-list-item-title{font-size:.7em;font-weight:500;padding-top:2px}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive:before,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive:before{background-color:inherit;width:56px;height:32px;border-radius:16px;position:absolute;top:3px;margin-right:auto;margin-bottom:4px;margin-left:auto}:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive:hover:before,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive.active:before,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive:hover:before,:host ::ng-deep .sidenav-mini .vd-navigation-drawer-menu-content mat-nav-list .mat-mdc-list-item.mat-mdc-list-item-interactive.active:before{background-color:var(--mat-sys-primary)!important}:host ::ng-deep mat-nav-list .mdc-list-item--with-leading-icon .mat-mdc-list-item-title{overflow:hidden;text-overflow:ellipsis;display:inline!important}:host ::ng-deep mat-nav-list .mdc-list-item--with-leading-icon .mdc-list-item__start{margin-right:18px!important}:host ::ng-deep .debug-banner{position:fixed;top:11px;right:-38px;background-color:#6d0000;color:#fff;padding:1px 36px;font-size:12px;text-transform:uppercase;z-index:1000;transform:rotate(45deg)}\n"] }]
|
|
25919
26202
|
}], ctorParameters: () => [{ type: VdMediaService }], propDecorators: { sidenav: [{
|
|
25920
26203
|
type: ViewChild,
|
|
25921
26204
|
args: [MatSidenav, { static: true }]
|
|
@@ -27676,5 +27959,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
27676
27959
|
* Generated bundle index. Do not edit.
|
|
27677
27960
|
*/
|
|
27678
27961
|
|
|
27679
|
-
export { AbstractMatFormField, AbstractSelectFormField, ActionItem, Api, ApiResponse, AppEvent, AppEventType, AppSetting, AppStorage, AsyncValidationDirective, AuditEntity, AuditUser, AuthHelper, AuthUser, AutofocusDirective, BaseComponent, BaseDirective, BaseEntity, BaseInterceptor, BaseService, BindPipe, CachingInterceptor, Column, ColumnObject, Common, CommonError, CommonHandlerContext, ConfirmExitGuard, ContextHelper, DIALOG_PROVIDER, DIALOG_PROVIDER_FACTORY, DataSourceFilterDirective, DataSourcePipe, DatePickerHeaderComponent, DisableControlDirective, Display, DisplayNameNumberProjection, DisplayNameProjection, DynamicBuilder, DynamicComponentCompiler, EXPORT_DIALOG_COMPONENT, EmptyStringResetDirective, EnumMetadata, EnumPipe, EnumService, EqualValidator, ErrorMessageBindingStrategy, EventQueueService, Facet, FacetValue, FieldFuncPipe, FileControlDirective, FileService, FileSizePipe, FilterClearComponent, FilterDateComponent, FilterGlue, FilterInputComponent, FilterOperator, FilterPipe, FilterSelectComponent, FirstLetterPipe, Form, FormArrayPipe, FormBuilderConfiguration, FormControlPipe, FormDefinition, FormField, FormFieldDefinition, FormFieldGroup, FormFieldGroupDefinition, FormFieldType, FormGroupPipe, FuncPipe, GenericEmbeddedListComponent, GenericFormBaseComponent, GenericFormComponent, GenericListComponent, GenericReactiveFormComponent, GenericService, GlobalRoles, Grid, GroupFilterPipe, HtmlControlTemplateDirective, IAbstractControl, Icon, ImageFileControlDirective, IpVersion, KeyValue, KeysPipe, LayoutToggle, LoadingScreenInterceptor, LoadingScreenService, MEDIA_PROVIDER, MEDIA_PROVIDER_FACTORY, MatFormFieldEditorDirective, MatFormFieldReadonlyDirective, Menu, MenuClient, MenuDepartment, MenuFormIncludesResolve, MenuItem, MenuItemClient, MenuItemDepartment, MenuItemFormIncludesResolve, MenuItemService, MenuItemTarget, MenuListProjectionResolve, MenuResolve, MenuScope, MenuSettings, MenuSettingsResolve, MessageType, ModifiableEntity, MonthNamePipe, NameNumberProjection, NameProjection, NativeElementInjectorDirective, NumericValueType, OnlyNumberDirective, OrderPipe, Pagination, PaginatorIntl, ParseDecimalDirective, Permission, PlaceholderPipe, PrefixDirective, PrintService, PropertyJoinPipe, ReactiveFormConfig, ReactiveTypedFormsModule, ResetFormType, RxFormArray, RxFormBuilder, RxFormControl, RxFormControlDirective, RxFormGroup, RxReactiveFormsModule, RxwebFormDirective, RxwebValidators, SafeHtmlPipe, Salutation, SaveAction, SplitPipe, SubMenuResolve, SuffixButton, Table, TableColumn, TableColumnConfig, TableColumnType, TableConfig, TableDataSource, TableDefinition, TableQueryConfig, TableStaticDataSource, TaskDialogData, Templates, TimePipe, TitleCase, TitleProjection, TruncatePipe, TypedForm, TypedFormBuilder, UniqueValidatorDirective, UrlValidationType, Utils, ValidationAlphabetLocale, ValueAccessorBase, ValuesPipe, VdAlertDialogComponent, VdChipsComponent, VdCodeDirective, VdConfirmDialogComponent, VdCustomDirective, VdDelayedHoverDirective, VdDialogActionsDirective, VdDialogComponent, VdDialogContentDirective, VdDialogService, VdDialogTitleDirective, VdDynamicMenuComponent, VdDynamicTableComponent, VdDynamicTableConfigDialogComponent, VdEditorDirective, VdFileDirective, VdFileInputComponent, VdFileModule, VdFilterOptionDirective, VdGenericFormComponent, VdGenericFormCustomFieldDirective, VdLayoutCardOverComponent, VdLayoutCloseDirective, VdLayoutCompactComponent, VdLayoutComponent, VdLayoutFooterComponent, VdLayoutManageListCloseDirective, VdLayoutManageListComponent, VdLayoutManageListOpenDirective, VdLayoutManageListToggleDirective, VdLayoutNavComponent, VdLayoutNavListCloseDirective, VdLayoutNavListComponent, VdLayoutNavListOpenDirective, VdLayoutNavListToggleDirective, VdLayoutOpenDirective, VdLayoutToggleDirective, VdListOptionDirective, VdListToolbarComponent, VdMediaService, VdMediaToggleDirective, VdMenuComponent, VdNavigationDrawerComponent, VdNavigationDrawerMenuDirective, VdNavigationDrawerToolbarDirective, VdPromptDialogComponent, VdSelectComponent, VdSelectOptionDirective, VdSelectTriggerDirective, VdTableFieldDirective, VdTaskDialogComponent, allOf, allOfAsync, alpha, alphaAsync, alphaNumeric, alphaNumericAsync, and, ascii, async, blacklist, choice, choiceAsync, compare, compose, contains, containsAsync, creditCard, creditCardAsync, cusip, custom, customAsync, dataUri, date, dateAsync, different, digit, disable, elementClass, email, endpointMetadataKey, endsWith, endsWithAsync, error, escape, even, extension, extensionAsync, factor, factorAsync, file, fileAsync, fileSize, fileSizeAsync, formDefinitionMetadataKey, formFieldGroupsMetadataKey, formFieldsMetadataKey, getDisplay, getEndpoint, getFormDefinition, getFormGroups, getTableDefinition, greaterThan, greaterThanAsync, greaterThanEqualTo, greaterThanEqualToAsync, grid, headerMetadataKey, hexColor, iban, ibanAsync, image, imageAsync, json, latLong, latitude, leapYear, lessThan, lessThanAsync, lessThanEqualTo, lessThanEqualToAsync, longitude, lowerCase, ltrim, mac, mask, maxDate, maxDateAsync, maxLength, maxLengthAsync, maxNumber, maxNumberAsync, maxTime, maxTimeAsync, minDate, minDateAsync, minLength, minLengthAsync, minNumber, minNumberAsync, minTime, minTimeAsync, mixinDisableRipple, mixinDisabled, model, noneOf, noneOfAsync, not, notEmpty, numeric, numericAsync, odd, oneOf, oneOfAsync, or, password, passwordAsync, pattern, patternAsync, port, prefix, primeNumber, prop, propArray, propObject, range, rangeAsync, required, requiredTrue, rtrim, rule, sanitize, startsWith, startsWithAsync, stripLow, suffix, tableColumnsMetadataKey, tableDefinitionMetadataKey, time, timeAsync, toBoolean, toDate, toDouble, toFloat, toInt, toString, trim, unique, updateOn, upperCase, url, urlAsync, vdCollapseAnimation, whitelist };
|
|
27962
|
+
export { AbstractMatFormField, AbstractSelectFormField, ActionItem, Api, ApiResponse, AppEvent, AppEventType, AppSetting, AppStorage, AsyncValidationDirective, AuditEntity, AuditUser, AuthHelper, AuthUser, AutofocusDirective, BaseComponent, BaseDirective, BaseEntity, BaseInterceptor, BaseService, BindPipe, CachingInterceptor, Column, ColumnObject, Common, CommonError, CommonHandlerContext, ConfirmExitGuard, ContextHelper, DIALOG_PROVIDER, DIALOG_PROVIDER_FACTORY, DataSourceFilterDirective, DataSourcePipe, DatePickerHeaderComponent, DisableControlDirective, Display, DisplayNameNumberProjection, DisplayNameProjection, DynamicBuilder, DynamicComponentCompiler, EXPORT_DIALOG_COMPONENT, EmptyStringResetDirective, EnumMetadata, EnumPipe, EnumService, EqualValidator, ErrorMessageBindingStrategy, EventQueueService, Facet, FacetValue, FieldFuncPipe, FileControlDirective, FileService, FileSizePipe, FilterClearComponent, FilterDateComponent, FilterGlue, FilterInputComponent, FilterOperator, FilterPipe, FilterSelectComponent, FirstLetterPipe, Form, FormArrayPipe, FormBuilderConfiguration, FormControlPipe, FormDefinition, FormField, FormFieldDefinition, FormFieldGroup, FormFieldGroupDefinition, FormFieldType, FormGroupPipe, FuncPipe, GenericEmbeddedListComponent, GenericFormBaseComponent, GenericFormComponent, GenericListComponent, GenericReactiveFormComponent, GenericService, GlobalRoles, Grid, GroupFilterPipe, HtmlControlTemplateDirective, IAbstractControl, Icon, ImageFileControlDirective, IpVersion, KeyValue, KeysPipe, LayoutToggle, LoadingScreenInterceptor, LoadingScreenService, MEDIA_PROVIDER, MEDIA_PROVIDER_FACTORY, MatFormFieldEditorDirective, MatFormFieldReadonlyDirective, Menu, MenuClient, MenuDepartment, MenuFormIncludesResolve, MenuItem, MenuItemClient, MenuItemDepartment, MenuItemFormIncludesResolve, MenuItemService, MenuItemTarget, MenuListProjectionResolve, MenuResolve, MenuScope, MenuSettings, MenuSettingsResolve, MessageType, ModifiableEntity, MonthNamePipe, NameNumberProjection, NameProjection, NativeElementInjectorDirective, NumericValueType, OnlyNumberDirective, OrderPipe, Pagination, PaginatorIntl, ParseDecimalDirective, Permission, PlaceholderPipe, PrefixDirective, PrintService, PropertyJoinPipe, ReactiveFormConfig, ReactiveTypedFormsModule, RemoveWhitespaceDirective, ResetFormType, RxFormArray, RxFormBuilder, RxFormControl, RxFormControlDirective, RxFormGroup, RxReactiveFormsModule, RxwebFormDirective, RxwebValidators, SafeHtmlPipe, Salutation, SaveAction, SplitPipe, SubMenuResolve, SuffixButton, Table, TableColumn, TableColumnConfig, TableColumnType, TableConfig, TableDataSource, TableDefinition, TableQueryConfig, TableStaticDataSource, TaskDialogData, Templates, TimePipe, TitleCase, TitleProjection, TruncatePipe, TypedForm, TypedFormBuilder, UniqueValidatorDirective, UrlValidationType, Utils, ValidationAlphabetLocale, ValueAccessorBase, ValuesPipe, VdAlertDialogComponent, VdChipsComponent, VdCodeDirective, VdConfirmDialogComponent, VdCustomDirective, VdDelayedHoverDirective, VdDialogActionsDirective, VdDialogComponent, VdDialogContentDirective, VdDialogService, VdDialogTitleDirective, VdDynamicMenuComponent, VdDynamicTableComponent, VdDynamicTableConfigDialogComponent, VdEditorDirective, VdFileDirective, VdFileInputComponent, VdFileModule, VdFilterOptionDirective, VdGenericFormComponent, VdGenericFormCustomFieldDirective, VdLayoutCardOverComponent, VdLayoutCloseDirective, VdLayoutCompactComponent, VdLayoutComponent, VdLayoutFooterComponent, VdLayoutManageListCloseDirective, VdLayoutManageListComponent, VdLayoutManageListOpenDirective, VdLayoutManageListToggleDirective, VdLayoutNavComponent, VdLayoutNavListCloseDirective, VdLayoutNavListComponent, VdLayoutNavListOpenDirective, VdLayoutNavListToggleDirective, VdLayoutOpenDirective, VdLayoutToggleDirective, VdListOptionDirective, VdListToolbarComponent, VdMediaService, VdMediaToggleDirective, VdMenuComponent, VdNavigationDrawerComponent, VdNavigationDrawerMenuDirective, VdNavigationDrawerToolbarDirective, VdPromptDialogComponent, VdSelectComponent, VdSelectOptionDirective, VdSelectTriggerDirective, VdTableFieldDirective, VdTaskDialogComponent, allOf, allOfAsync, alpha, alphaAsync, alphaNumeric, alphaNumericAsync, and, ascii, async, blacklist, choice, choiceAsync, compare, compose, contains, containsAsync, creditCard, creditCardAsync, cusip, custom, customAsync, dataUri, date, dateAsync, different, digit, disable, elementClass, email, endpointMetadataKey, endsWith, endsWithAsync, error, escape, even, extension, extensionAsync, factor, factorAsync, file, fileAsync, fileSize, fileSizeAsync, formDefinitionMetadataKey, formFieldGroupsMetadataKey, formFieldsMetadataKey, getDisplay, getEndpoint, getFormDefinition, getFormGroups, getTableDefinition, greaterThan, greaterThanAsync, greaterThanEqualTo, greaterThanEqualToAsync, grid, headerMetadataKey, hexColor, iban, ibanAsync, image, imageAsync, json, latLong, latitude, leapYear, lessThan, lessThanAsync, lessThanEqualTo, lessThanEqualToAsync, longitude, lowerCase, ltrim, mac, mask, maxDate, maxDateAsync, maxLength, maxLengthAsync, maxNumber, maxNumberAsync, maxTime, maxTimeAsync, minDate, minDateAsync, minLength, minLengthAsync, minNumber, minNumberAsync, minTime, minTimeAsync, mixinDisableRipple, mixinDisabled, model, noneOf, noneOfAsync, not, notEmpty, numeric, numericAsync, odd, oneOf, oneOfAsync, or, password, passwordAsync, pattern, patternAsync, port, prefix, primeNumber, prop, propArray, propObject, range, rangeAsync, required, requiredTrue, rtrim, rule, sanitize, startsWith, startsWithAsync, stripLow, suffix, tableColumnsMetadataKey, tableDefinitionMetadataKey, time, timeAsync, toBoolean, toDate, toDouble, toFloat, toInt, toString, trim, unique, updateOn, upperCase, url, urlAsync, vdCollapseAnimation, whitelist };
|
|
27680
27963
|
//# sourceMappingURL=messaia-cdk.mjs.map
|