@messaia/cdk 21.1.0-rc.8 → 21.1.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 +890 -408
- package/fesm2022/messaia-cdk.mjs.map +1 -1
- package/package.json +3 -2
- package/types/messaia-cdk.d.ts +406 -129
package/fesm2022/messaia-cdk.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i3$1 from '@angular/common';
|
|
2
|
-
import { Location, getLocaleNumberSymbol, NumberSymbol, CommonModule, DecimalPipe, JsonPipe } from '@angular/common';
|
|
2
|
+
import { Location, getLocaleNumberSymbol, NumberSymbol, CommonModule, DecimalPipe, NgClass, JsonPipe } from '@angular/common';
|
|
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, HostListener, forwardRef, LOCALE_ID, NgModule, Pipe, ViewChild, ChangeDetectorRef, HostAttributeToken, HostBinding, ContentChild, ViewContainerRef, TemplateRef, ChangeDetectionStrategy, Self, SimpleChange, Attribute, SecurityContext } from '@angular/core';
|
|
6
|
+
import { Injectable, Component, Directive, ContentChildren, Optional, SkipSelf, NgZone, InjectionToken, Inject, EventEmitter, inject, ElementRef, ViewChildren, Output, Input, HostListener, forwardRef, LOCALE_ID, NgModule, Pipe, input, computed, 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, MatDialogTitle } from '@angular/material/dialog';
|
|
9
9
|
import * as i6$3 from '@angular/material/expansion';
|
|
@@ -14,7 +14,7 @@ import * as i1$3 from '@angular/platform-browser';
|
|
|
14
14
|
import { Title } from '@angular/platform-browser';
|
|
15
15
|
import * as i1$2 from '@angular/router';
|
|
16
16
|
import { Router, RouterModule } from '@angular/router';
|
|
17
|
-
import { fromEvent, Subject,
|
|
17
|
+
import { fromEvent, Subject, switchMap, timer, takeUntil as takeUntil$1, filter, map, tap, merge as merge$1, of, BehaviorSubject, firstValueFrom, throwError, distinctUntilChanged, debounceTime, Observable } from 'rxjs';
|
|
18
18
|
import * as i2 from '@angular/material/button';
|
|
19
19
|
import { MatButtonModule, MatIconButton } from '@angular/material/button';
|
|
20
20
|
import * as i8 from '@angular/material/icon';
|
|
@@ -25,17 +25,17 @@ import * as i7 from '@angular/material/form-field';
|
|
|
25
25
|
import { MatFormFieldModule, MatFormFieldControl } from '@angular/material/form-field';
|
|
26
26
|
import * as i3 from '@angular/material/progress-bar';
|
|
27
27
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
28
|
-
import { takeUntil, map as map$1, catchError, skip, switchMap, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, tap as tap$1, finalize } from 'rxjs/operators';
|
|
28
|
+
import { takeUntil, map as map$1, catchError, skip, switchMap as switchMap$1, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, tap as tap$1, finalize } from 'rxjs/operators';
|
|
29
29
|
import { CdkDragHandle, CdkDrag } from '@angular/cdk/drag-drop';
|
|
30
|
-
import * as i5 from '@angular/material/checkbox';
|
|
30
|
+
import * as i5$1 from '@angular/material/checkbox';
|
|
31
31
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
32
32
|
import * as i10 from '@angular/material/paginator';
|
|
33
33
|
import { MatPaginatorModule, MatPaginator, MatPaginatorIntl } from '@angular/material/paginator';
|
|
34
|
-
import { trigger, state,
|
|
34
|
+
import { trigger, state, style, AUTO_STYLE, transition, group, query, animateChild, animate } from '@angular/animations';
|
|
35
35
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
36
36
|
import * as i2$2 from '@angular/cdk/table';
|
|
37
37
|
import { DataSource, CdkTableModule } from '@angular/cdk/table';
|
|
38
|
-
import * as i5
|
|
38
|
+
import * as i5 from '@angular/material/chips';
|
|
39
39
|
import { MatChipsModule } from '@angular/material/chips';
|
|
40
40
|
import * as i6 from '@angular/material/input';
|
|
41
41
|
import { MatInputModule, MatInput } from '@angular/material/input';
|
|
@@ -48,7 +48,7 @@ import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
|
48
48
|
import * as i1$5 from '@angular/material/table';
|
|
49
49
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
50
50
|
import * as i3$2 from '@angular/material/tooltip';
|
|
51
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
51
|
+
import { MatTooltipModule, MatTooltip } from '@angular/material/tooltip';
|
|
52
52
|
import { __decorate, __metadata } from 'tslib';
|
|
53
53
|
import 'reflect-metadata';
|
|
54
54
|
import * as i2$1 from '@angular/material/select';
|
|
@@ -1485,38 +1485,56 @@ class BaseComponent {
|
|
|
1485
1485
|
/* Otherwise, expand the panel based on the URL hash if set */
|
|
1486
1486
|
this.expandPanelPath(this.urlHash ?? '');
|
|
1487
1487
|
}
|
|
1488
|
-
/*
|
|
1488
|
+
/* Array to hold all panel event streams */
|
|
1489
|
+
const panelStateChanges$ = [];
|
|
1490
|
+
/* Used to cancel pending close events when another panel opens */
|
|
1491
|
+
const openedSignal$ = new Subject();
|
|
1492
|
+
/* Prepare observables for all panels */
|
|
1489
1493
|
this.matExpansionPanelQueryList?.forEach(y => {
|
|
1490
|
-
|
|
1494
|
+
/* Map closed events to their target parent hash */
|
|
1495
|
+
panelStateChanges$.push(y.closed.pipe(switchMap(_ => {
|
|
1496
|
+
/* Get the id of the current closed panel */
|
|
1497
|
+
const currentPanelId = y['_viewContainerRef']?.element?.nativeElement?.id;
|
|
1498
|
+
const currentPanelIdParts = currentPanelId?.split('.');
|
|
1499
|
+
/* Extract parent ID if nested */
|
|
1500
|
+
const parentHash = (currentPanelIdParts && currentPanelIdParts.length > 1)
|
|
1501
|
+
? currentPanelIdParts.slice(0, -1).join('.')
|
|
1502
|
+
: null;
|
|
1503
|
+
/* Delay close handling so a near-simultaneous open can cancel it */
|
|
1504
|
+
return timer(50).pipe(takeUntil$1(openedSignal$),
|
|
1505
|
+
/* Ignore close when another panel is opening/opened */
|
|
1506
|
+
filter(_ => !(this.matExpansionPanelQueryList?.toArray()?.some(panel => {
|
|
1507
|
+
const panelId = panel['_viewContainerRef']?.element?.nativeElement?.id;
|
|
1508
|
+
return panel.expanded && panelId && panelId !== currentPanelId;
|
|
1509
|
+
}) ?? false)), map(_ => ({ action: 'close', hash: parentHash })));
|
|
1510
|
+
})));
|
|
1511
|
+
/* Map opened events to their target hash */
|
|
1512
|
+
panelStateChanges$.push(y.opened.pipe(tap(_ => openedSignal$.next()), map(_ => {
|
|
1513
|
+
/* Get the id of the current opened panel */
|
|
1514
|
+
const currentPanelId = y['_viewContainerRef']?.element?.nativeElement?.id;
|
|
1515
|
+
return { action: 'open', hash: currentPanelId };
|
|
1516
|
+
})));
|
|
1517
|
+
});
|
|
1518
|
+
/* Merge all event streams to handle concurrent open/close actions */
|
|
1519
|
+
if (panelStateChanges$.length > 0) {
|
|
1520
|
+
this.matExpansionPanelSubscriptions.push(merge$1(...panelStateChanges$).subscribe(eventState => {
|
|
1491
1521
|
if (this.setUrlHash) {
|
|
1492
|
-
/*
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
if (currentPanelId) {
|
|
1496
|
-
this.router.navigate([], { fragment: currentPanelId, replaceUrl: true });
|
|
1522
|
+
/* If a valid hash exists, set it as url segment */
|
|
1523
|
+
if (eventState.hash) {
|
|
1524
|
+
this.router.navigate([], { fragment: eventState.hash, replaceUrl: true });
|
|
1497
1525
|
}
|
|
1498
|
-
/*
|
|
1499
|
-
|
|
1526
|
+
/*
|
|
1527
|
+
* Otherwise remove the segment from the url (only on open actions to prevent
|
|
1528
|
+
* clearing the hash when collapsing a nested child)
|
|
1529
|
+
*/
|
|
1530
|
+
else if (eventState.action === 'open') {
|
|
1500
1531
|
this.router.navigate([], { replaceUrl: true });
|
|
1501
1532
|
}
|
|
1502
1533
|
}
|
|
1503
|
-
/* Detect changes */
|
|
1504
|
-
this.changeDetectorRef.detectChanges();
|
|
1505
|
-
}));
|
|
1506
|
-
/* Detect changes for closed panels */
|
|
1507
|
-
this.matExpansionPanelSubscriptions.push(y.closed.subscribe(_ => {
|
|
1508
|
-
if (this.setUrlHash) {
|
|
1509
|
-
/* Get the id of the current opened panel */
|
|
1510
|
-
var currentPanelIdParts = y['_viewContainerRef']?.element?.nativeElement?.id?.split('.');
|
|
1511
|
-
/* If the panel ID is set, set it as url segment (hash) */
|
|
1512
|
-
if (currentPanelIdParts.length > 1) {
|
|
1513
|
-
this.router.navigate([], { fragment: currentPanelIdParts.slice(0, -1).join('.'), replaceUrl: true });
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
/* Detect changes */
|
|
1534
|
+
/* Detect changes ONCE after the concurrent event storm settles */
|
|
1517
1535
|
this.changeDetectorRef.detectChanges();
|
|
1518
1536
|
}));
|
|
1519
|
-
}
|
|
1537
|
+
}
|
|
1520
1538
|
});
|
|
1521
1539
|
/* Notify expansion panel list changes */
|
|
1522
1540
|
if (this.matExpansionPanelQueryList) {
|
|
@@ -3951,31 +3969,31 @@ function getNestedOptions(controlName, options) {
|
|
|
3951
3969
|
}
|
|
3952
3970
|
|
|
3953
3971
|
/**
|
|
3954
|
-
*
|
|
3972
|
+
* Provides an instance container for a given model function and optional entity object.
|
|
3955
3973
|
* @param instanceFunc The function to provide an instance of.
|
|
3956
3974
|
* @param entityObject Optional entity object.
|
|
3957
3975
|
* @returns An instance container.
|
|
3958
3976
|
*/
|
|
3959
3977
|
function instanceProvider(instanceFunc, entityObject) {
|
|
3960
|
-
/*
|
|
3978
|
+
/* Get the instance container from defaultContainer */
|
|
3961
3979
|
let instance = defaultContainer.get(instanceFunc);
|
|
3962
|
-
/*
|
|
3980
|
+
/* Determine the prototype from entityObject or a temporary instance */
|
|
3963
3981
|
let prototype = entityObject ? entityObject.__proto__ : getInstance(instanceFunc, []).__proto__;
|
|
3964
|
-
/*
|
|
3982
|
+
/* Continue while parent prototypes exist */
|
|
3965
3983
|
if (prototype.__proto__) {
|
|
3966
|
-
/*
|
|
3984
|
+
/* Initialize loop flag */
|
|
3967
3985
|
let isLoop = false;
|
|
3968
3986
|
do {
|
|
3969
|
-
/*
|
|
3987
|
+
/* Continue until Object is reached in the prototype chain */
|
|
3970
3988
|
isLoop = prototype.__proto__.constructor != Object;
|
|
3971
3989
|
if (isLoop) {
|
|
3972
|
-
/*
|
|
3990
|
+
/* Get parent class instance container from defaultContainer */
|
|
3973
3991
|
let extendClassInstance = defaultContainer.get(prototype.__proto__.constructor);
|
|
3974
|
-
/*
|
|
3992
|
+
/* Clone current instance */
|
|
3975
3993
|
var instanceClone = clone(instance);
|
|
3976
|
-
/*
|
|
3994
|
+
/* Clone parent instance */
|
|
3977
3995
|
var extendClassInstanceClone = clone(extendClassInstance);
|
|
3978
|
-
/*
|
|
3996
|
+
/* Remove duplicated properties already defined in the child instance */
|
|
3979
3997
|
instanceClone.properties?.forEach((property) => {
|
|
3980
3998
|
/* Find the index of the property in extendClassInstanceClone */
|
|
3981
3999
|
const index = extendClassInstanceClone.properties?.findIndex((p) => p.name === property.name);
|
|
@@ -3984,7 +4002,7 @@ function instanceProvider(instanceFunc, entityObject) {
|
|
|
3984
4002
|
extendClassInstanceClone.properties?.splice(index, 1);
|
|
3985
4003
|
}
|
|
3986
4004
|
});
|
|
3987
|
-
/* Merge
|
|
4005
|
+
/* Merge child and filtered parent instance containers */
|
|
3988
4006
|
instance = merge(instanceClone, extendClassInstanceClone);
|
|
3989
4007
|
prototype = prototype.__proto__;
|
|
3990
4008
|
}
|
|
@@ -3993,7 +4011,7 @@ function instanceProvider(instanceFunc, entityObject) {
|
|
|
3993
4011
|
return instance;
|
|
3994
4012
|
}
|
|
3995
4013
|
/**
|
|
3996
|
-
*
|
|
4014
|
+
* Creates an instance of a model using the provided constructor arguments.
|
|
3997
4015
|
* @param model The model to instantiate.
|
|
3998
4016
|
* @param objectArguments Arguments for the model instantiation.
|
|
3999
4017
|
* @returns The instantiated class instance.
|
|
@@ -10082,7 +10100,38 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10082
10100
|
*/
|
|
10083
10101
|
isNestedBinding = false;
|
|
10084
10102
|
/**
|
|
10085
|
-
* Private method:
|
|
10103
|
+
* Private method: Resolves effective validators for a property.
|
|
10104
|
+
*
|
|
10105
|
+
* If the same annotation type appears multiple times (for example, inherited + overridden),
|
|
10106
|
+
* only the first occurrence is kept and later duplicates are ignored.
|
|
10107
|
+
*
|
|
10108
|
+
* @param propertyValidators The complete list of validator decorator configurations.
|
|
10109
|
+
* @param isAsync Indicates whether async or sync validators should be resolved.
|
|
10110
|
+
* @returns The effective validator decorator configurations for the requested validator kind.
|
|
10111
|
+
*/
|
|
10112
|
+
getEffectivePropertyValidators(propertyValidators, isAsync) {
|
|
10113
|
+
/* Initialize result containers for effective validators and seen annotation types */
|
|
10114
|
+
const effectiveValidators = [];
|
|
10115
|
+
const seenAnnotationTypes = new Set();
|
|
10116
|
+
/* Iterate through the provided property validators */
|
|
10117
|
+
for (const propertyValidator of propertyValidators ?? []) {
|
|
10118
|
+
/* Skip validators that do not match the requested async/sync kind */
|
|
10119
|
+
if (!!propertyValidator.isAsync !== isAsync) {
|
|
10120
|
+
continue;
|
|
10121
|
+
}
|
|
10122
|
+
/* Skip duplicate annotation types, keeping only the first occurrence */
|
|
10123
|
+
const annotationType = propertyValidator.annotationType;
|
|
10124
|
+
if (seenAnnotationTypes.has(annotationType)) {
|
|
10125
|
+
continue;
|
|
10126
|
+
}
|
|
10127
|
+
/* Mark the annotation type as seen and keep the validator */
|
|
10128
|
+
seenAnnotationTypes.add(annotationType);
|
|
10129
|
+
effectiveValidators.push(propertyValidator);
|
|
10130
|
+
}
|
|
10131
|
+
return effectiveValidators;
|
|
10132
|
+
}
|
|
10133
|
+
/**
|
|
10134
|
+
* Private method: Gets the instance container for the given instance function and entity object.
|
|
10086
10135
|
*
|
|
10087
10136
|
* @param instanceFunc The function to provide an instance from.
|
|
10088
10137
|
* @param entityObject The entity object to use.
|
|
@@ -10105,7 +10154,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10105
10154
|
if (formBuilderConfiguration && formBuilderConfiguration.dynamicValidation) {
|
|
10106
10155
|
for (var property in formBuilderConfiguration.dynamicValidation) {
|
|
10107
10156
|
for (var decorator in formBuilderConfiguration.dynamicValidation[property]) {
|
|
10108
|
-
/* Checks
|
|
10157
|
+
/* Checks whether a conditional expression exists for the current decorator */
|
|
10109
10158
|
if (formBuilderConfiguration.dynamicValidation[property][decorator].conditionalExpression) {
|
|
10110
10159
|
/* Extract columns from the conditional expression */
|
|
10111
10160
|
let columns = Linq.expressionColumns(formBuilderConfiguration.dynamicValidation[property][decorator].conditionalExpression);
|
|
@@ -10126,16 +10175,13 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10126
10175
|
* @returns An array of async validators.
|
|
10127
10176
|
*/
|
|
10128
10177
|
addAsyncValidation(property, propertyValidators, propValidationConfig) {
|
|
10129
|
-
/*
|
|
10178
|
+
/* Collect async validators from property validators and validation configuration */
|
|
10130
10179
|
let asyncValidators = [];
|
|
10131
10180
|
if (propertyValidators) {
|
|
10132
|
-
/* Iterate through property validators */
|
|
10133
|
-
for (let propertyValidator of propertyValidators) {
|
|
10134
|
-
/*
|
|
10135
|
-
|
|
10136
|
-
/* Push each async validator into the asyncValidators array */
|
|
10137
|
-
propertyValidator.config.forEach((t) => { asyncValidators.push(t); });
|
|
10138
|
-
}
|
|
10181
|
+
/* Iterate through effective async property validators */
|
|
10182
|
+
for (let propertyValidator of this.getEffectivePropertyValidators(propertyValidators, true)) {
|
|
10183
|
+
/* Push each async validator into the asyncValidators array */
|
|
10184
|
+
propertyValidator.config.forEach((t) => { asyncValidators.push(t); });
|
|
10139
10185
|
}
|
|
10140
10186
|
}
|
|
10141
10187
|
if (propValidationConfig && propValidationConfig[ASYNC]) {
|
|
@@ -10157,30 +10203,30 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10157
10203
|
addFormControl(property, propertyValidators, propValidationConfig, instance, entity) {
|
|
10158
10204
|
let validators = [];
|
|
10159
10205
|
let columns = [];
|
|
10160
|
-
/* Check
|
|
10206
|
+
/* Check whether conditional validation properties exist in either source */
|
|
10161
10207
|
if ((instance.conditionalValidationProps && instance.conditionalValidationProps[property.name]) || (this.conditionalValidationInstance.conditionalValidationProps && this.conditionalValidationInstance.conditionalValidationProps[property.name])) {
|
|
10162
|
-
/*
|
|
10208
|
+
/* Collect conditional validation properties and add a conditional change validator */
|
|
10163
10209
|
let props = [];
|
|
10164
|
-
/* Check
|
|
10210
|
+
/* Check whether instance has conditionalValidationProps for the property */
|
|
10165
10211
|
if ((instance.conditionalValidationProps && instance.conditionalValidationProps[property.name])) {
|
|
10166
10212
|
instance.conditionalValidationProps[property.name].forEach(t => props.push(t));
|
|
10167
10213
|
}
|
|
10168
|
-
/* Check
|
|
10214
|
+
/* Check whether conditionalValidationInstance has conditionalValidationProps for the property */
|
|
10169
10215
|
if (this.conditionalValidationInstance.conditionalValidationProps && this.conditionalValidationInstance.conditionalValidationProps[property.name]) {
|
|
10170
10216
|
this.conditionalValidationInstance.conditionalValidationProps[property.name].forEach((t) => props.push(t));
|
|
10171
10217
|
}
|
|
10172
10218
|
/* Add conditional change validator */
|
|
10173
10219
|
validators.push(conditionalChangeValidator(props));
|
|
10174
10220
|
}
|
|
10175
|
-
/* Check
|
|
10221
|
+
/* Check whether conditional object properties are present */
|
|
10176
10222
|
if (this.conditionalObjectProps.length > 0 || this.builderConfigurationConditionalObjectProps.length > 0) {
|
|
10177
10223
|
let propConditions = [];
|
|
10178
|
-
/* Check
|
|
10224
|
+
/* Check whether conditionalObjectProps is defined */
|
|
10179
10225
|
if (this.conditionalObjectProps) {
|
|
10180
10226
|
/* Filter conditionalObjectProps for properties matching the current property name */
|
|
10181
10227
|
propConditions = this.conditionalObjectProps.filter(t => t.propName == property.name);
|
|
10182
10228
|
}
|
|
10183
|
-
/* Check
|
|
10229
|
+
/* Check whether builderConfigurationConditionalObjectProps is defined */
|
|
10184
10230
|
if (this.builderConfigurationConditionalObjectProps) {
|
|
10185
10231
|
/* Filter builderConfigurationConditionalObjectProps for properties matching the current property name */
|
|
10186
10232
|
this.builderConfigurationConditionalObjectProps.filter(t => t.propName == property.name).forEach(t => propConditions.push(t));
|
|
@@ -10196,25 +10242,23 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10196
10242
|
validators.push(conditionalChangeValidator(columns));
|
|
10197
10243
|
}
|
|
10198
10244
|
}
|
|
10199
|
-
/* Iterate through property validators */
|
|
10200
|
-
for (let propertyValidator of propertyValidators) {
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10215
|
-
|
|
10216
|
-
break;
|
|
10217
|
-
}
|
|
10245
|
+
/* Iterate through effective sync property validators */
|
|
10246
|
+
for (let propertyValidator of this.getEffectivePropertyValidators(propertyValidators, false)) {
|
|
10247
|
+
switch (propertyValidator.annotationType) {
|
|
10248
|
+
/* Add rule validator */
|
|
10249
|
+
case AnnotationTypes["rule"]:
|
|
10250
|
+
validators.push(APP_VALIDATORS[propertyValidator.annotationType](propertyValidator.config, entity));
|
|
10251
|
+
break;
|
|
10252
|
+
/* Add logical validator */
|
|
10253
|
+
case AnnotationTypes["and"]:
|
|
10254
|
+
case AnnotationTypes["or"]:
|
|
10255
|
+
case AnnotationTypes["not"]:
|
|
10256
|
+
validators.push(LOGICAL_VALIDATORS[propertyValidator.annotationType](propertyValidator.config));
|
|
10257
|
+
break;
|
|
10258
|
+
/* Add custom validator */
|
|
10259
|
+
default:
|
|
10260
|
+
validators.push(APP_VALIDATORS[propertyValidator.annotationType](propertyValidator.config));
|
|
10261
|
+
break;
|
|
10218
10262
|
}
|
|
10219
10263
|
}
|
|
10220
10264
|
/* Additional validation from propValidationConfig */
|
|
@@ -10235,12 +10279,12 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10235
10279
|
*/
|
|
10236
10280
|
additionalValidation(validations, propValidationConfig) {
|
|
10237
10281
|
for (var col in AnnotationTypes) {
|
|
10238
|
-
/* Check
|
|
10282
|
+
/* Check whether the validation configuration for the current annotation type exists and is not a custom validator */
|
|
10239
10283
|
if (propValidationConfig[AnnotationTypes[col]] && col != "custom") {
|
|
10240
10284
|
/* Add validator from APP_VALIDATORS */
|
|
10241
10285
|
validations.push(APP_VALIDATORS[AnnotationTypes[col]](propValidationConfig[AnnotationTypes[col]]));
|
|
10242
10286
|
}
|
|
10243
|
-
/* Check
|
|
10287
|
+
/* Check whether the current annotation type is custom and exists in the validation configuration */
|
|
10244
10288
|
else if (col == AnnotationTypes["custom"] && propValidationConfig[AnnotationTypes[col]]) {
|
|
10245
10289
|
/* Add custom validator */
|
|
10246
10290
|
validations.push(propValidationConfig[col]);
|
|
@@ -10257,7 +10301,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10257
10301
|
* @returns The entity type.
|
|
10258
10302
|
*/
|
|
10259
10303
|
getEntity(object, formBuilderConfiguration, propertyName, isSameObjectConstructor = false) {
|
|
10260
|
-
/* Check
|
|
10304
|
+
/* Check whether the entity type is defined in the form builder configuration */
|
|
10261
10305
|
if (formBuilderConfiguration && formBuilderConfiguration.genericEntities && formBuilderConfiguration.genericEntities[propertyName]) {
|
|
10262
10306
|
/* Return the entity type from formBuilderConfiguration if available */
|
|
10263
10307
|
return formBuilderConfiguration.genericEntities[propertyName];
|
|
@@ -10274,12 +10318,12 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10274
10318
|
* @returns The constructor of the object property instance.
|
|
10275
10319
|
*/
|
|
10276
10320
|
getObjectPropertyInstance(object, propertyInfo, formBuilderConfiguration) {
|
|
10277
|
-
/* Check
|
|
10321
|
+
/* Check whether the property type is OBJECT_PROPERTY and the property exists in the object */
|
|
10278
10322
|
if (propertyInfo.propertyType == OBJECT_PROPERTY && object[propertyInfo.name]) {
|
|
10279
10323
|
/* Return the constructor of the object property if it exists */
|
|
10280
10324
|
return object[propertyInfo.name].constructor;
|
|
10281
10325
|
}
|
|
10282
|
-
/* Check
|
|
10326
|
+
/* Check whether the property type is ARRAY_PROPERTY and the property exists and contains items in the object */
|
|
10283
10327
|
else if (propertyInfo.propertyType == ARRAY_PROPERTY && object[propertyInfo.name] && object[propertyInfo.name].length > 0) {
|
|
10284
10328
|
/* Return the constructor of the first item in the array property if it exists */
|
|
10285
10329
|
return object[propertyInfo.name][0].constructor;
|
|
@@ -10305,7 +10349,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10305
10349
|
entity = this.getObjectPropertyInstance(object, t, formBuilderConfiguration);
|
|
10306
10350
|
if (entity) {
|
|
10307
10351
|
let instance = this.getInstanceContainer(entity, null);
|
|
10308
|
-
/* Check
|
|
10352
|
+
/* Check whether the instance exists and has conditional validation properties */
|
|
10309
10353
|
if (instance && instance.conditionalValidationProps) {
|
|
10310
10354
|
for (var key in instance.conditionalValidationProps) {
|
|
10311
10355
|
var prop = instanceContainer.properties?.filter(t => t.name == key)[0];
|
|
@@ -10341,24 +10385,24 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10341
10385
|
getObject(model, entityObject, formBuilderConfiguration) {
|
|
10342
10386
|
/* Initializes an empty object to store the JSON representation */
|
|
10343
10387
|
let json = {};
|
|
10344
|
-
/* Checks
|
|
10388
|
+
/* Checks whether the model is a function */
|
|
10345
10389
|
if (typeof model == FUNCTION_STRING) {
|
|
10346
10390
|
json["model"] = model;
|
|
10347
10391
|
}
|
|
10348
|
-
/* Checks
|
|
10392
|
+
/* Checks whether the model is a function and entityObject is an instance of FormBuilderConfiguration */
|
|
10349
10393
|
if (typeof model == FUNCTION_STRING && (entityObject instanceof FormBuilderConfiguration)) {
|
|
10350
10394
|
/* Creates the entity object using createClassObject method */
|
|
10351
10395
|
json["entityObject"] = this.createClassObject(json["model"], entityObject);
|
|
10352
10396
|
}
|
|
10353
|
-
/* Checks
|
|
10397
|
+
/* Checks whether entityObject exists and is not an instance of FormBuilderConfiguration */
|
|
10354
10398
|
if (entityObject && !(entityObject instanceof FormBuilderConfiguration)) {
|
|
10355
10399
|
json["entityObject"] = entityObject;
|
|
10356
10400
|
}
|
|
10357
|
-
/* Checks
|
|
10401
|
+
/* Checks whether entityObject is an instance of FormBuilderConfiguration and formBuilderConfiguration is not provided */
|
|
10358
10402
|
if (entityObject instanceof FormBuilderConfiguration && !formBuilderConfiguration) {
|
|
10359
10403
|
json["formBuilderConfiguration"] = entityObject;
|
|
10360
10404
|
}
|
|
10361
|
-
/* Checks
|
|
10405
|
+
/* Checks whether entityObject is not an instance of FormBuilderConfiguration and formBuilderConfiguration is provided */
|
|
10362
10406
|
else if (!(entityObject instanceof FormBuilderConfiguration) && formBuilderConfiguration) {
|
|
10363
10407
|
/* Sets the formBuilderConfiguration in the JSON */
|
|
10364
10408
|
json["formBuilderConfiguration"] = formBuilderConfiguration;
|
|
@@ -10367,7 +10411,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10367
10411
|
}
|
|
10368
10412
|
/* If entityObject does not exist */
|
|
10369
10413
|
if (!entityObject) {
|
|
10370
|
-
/* Checks
|
|
10414
|
+
/* Checks whether the model is an object */
|
|
10371
10415
|
if (typeof model == OBJECT_STRING) {
|
|
10372
10416
|
/* Stores the constructor of the model */
|
|
10373
10417
|
json["model"] = model.constructor;
|
|
@@ -10454,19 +10498,19 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10454
10498
|
* @param modelInstance The instance of the model.
|
|
10455
10499
|
*/
|
|
10456
10500
|
applyAllPropValidator(propName, validatorConfig, modelInstance) {
|
|
10457
|
-
/* Check
|
|
10501
|
+
/* Check whether the validator configuration and applyAllProps array exist */
|
|
10458
10502
|
if (validatorConfig && validatorConfig.applyAllProps) {
|
|
10459
|
-
/* Check
|
|
10503
|
+
/* Check whether the excludeProps array exists and propName should be included */
|
|
10460
10504
|
if (!(validatorConfig.excludeProps && validatorConfig.excludeProps.length > 0 && validatorConfig.excludeProps.indexOf(propName) == -1)) {
|
|
10461
10505
|
/* Iterate through each item in the applyAllProps array */
|
|
10462
10506
|
validatorConfig.applyAllProps.forEach((t) => {
|
|
10463
|
-
/* Check
|
|
10507
|
+
/* Check whether the validator function is an RxWeb validator */
|
|
10464
10508
|
if (t.name == RX_WEB_VALIDATOR) {
|
|
10465
10509
|
/* Apply RxWeb validator to the propName with the modelInstance */
|
|
10466
10510
|
t(propName, modelInstance);
|
|
10467
10511
|
}
|
|
10468
10512
|
else {
|
|
10469
|
-
/* Check
|
|
10513
|
+
/* Check whether currentFormGroupPropOtherValidator has an entry for propName */
|
|
10470
10514
|
if (!this.currentFormGroupPropOtherValidator[propName]) {
|
|
10471
10515
|
/* If not, create an empty array for the propName */
|
|
10472
10516
|
this.currentFormGroupPropOtherValidator[propName] = [];
|
|
@@ -10479,7 +10523,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10479
10523
|
}
|
|
10480
10524
|
}
|
|
10481
10525
|
/**
|
|
10482
|
-
|
|
10526
|
+
* Checks whether dynamic validation should be applied to a property.
|
|
10483
10527
|
*
|
|
10484
10528
|
* @param propName The name of the property to check.
|
|
10485
10529
|
* @param validatorConfig The configuration for property validation.
|
|
@@ -10489,7 +10533,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10489
10533
|
return (validatorConfig == undefined) ? true : (!validatorConfig.dynamicValidationConfigurationPropertyName) ? true : validatorConfig.dynamicValidationConfigurationPropertyName == propName ? false : true;
|
|
10490
10534
|
}
|
|
10491
10535
|
/**
|
|
10492
|
-
|
|
10536
|
+
* Checks whether the given value is not an object.
|
|
10493
10537
|
*
|
|
10494
10538
|
* @param value The value to check.
|
|
10495
10539
|
* @returns A boolean indicating whether the value is not an object.
|
|
@@ -10509,7 +10553,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10509
10553
|
/* Iterates over each property in the groupObject to create form controls and apply validators. */
|
|
10510
10554
|
for (var propName in groupObject) {
|
|
10511
10555
|
var prop = groupObject[propName];
|
|
10512
|
-
/* Check
|
|
10556
|
+
/* Check whether the property is an array and needs validation */
|
|
10513
10557
|
if (prop instanceof Array && prop.length > 0 && this.isNotObject(prop[0])) {
|
|
10514
10558
|
let propValidators = (prop.length > 1 && prop[1] instanceof Array) ? prop[1] : (prop.length == 2) ? [prop[1]] : [];
|
|
10515
10559
|
let propertyAdded = false;
|
|
@@ -10597,7 +10641,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10597
10641
|
entityObject[propName] = {};
|
|
10598
10642
|
entityObject[propName].constructor = propModelInstance.constructor;
|
|
10599
10643
|
defaultContainer.initPropertyObject(propName, OBJECT_PROPERTY, entityObject[propName].constructor, modelInstance.constructor == Function ? { constructor: modelInstance } : modelInstance);
|
|
10600
|
-
/*
|
|
10644
|
+
/* Retrieve the validation configuration for the property */
|
|
10601
10645
|
let objectValidationConfig = this.getValidatorConfig(validatorConfig, groupObject, propName + ".");
|
|
10602
10646
|
/* Recursively create the validator form group for the property */
|
|
10603
10647
|
this.createValidatorFormGroup(groupObject[propName], entityObject[propName], entityObject[propName].constructor, objectValidationConfig);
|
|
@@ -10640,7 +10684,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10640
10684
|
let excludeProps = [];
|
|
10641
10685
|
let includeProps = [];
|
|
10642
10686
|
let ignoreUndefinedProps = [];
|
|
10643
|
-
/* Check
|
|
10687
|
+
/* Check whether validatorConfig exists */
|
|
10644
10688
|
if (!validatorConfig)
|
|
10645
10689
|
return {};
|
|
10646
10690
|
/* Retrieve validation properties and abstract control options */
|
|
@@ -10710,7 +10754,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10710
10754
|
let props = [];
|
|
10711
10755
|
/* Iterate through the properties */
|
|
10712
10756
|
for (let prop of properties) {
|
|
10713
|
-
/* Check
|
|
10757
|
+
/* Check whether the property contains rootPropertyName */
|
|
10714
10758
|
if (prop.indexOf(rootPropertyName) != -1) {
|
|
10715
10759
|
let splitProps = prop.split(".");
|
|
10716
10760
|
/* If the property has two parts, add the second part to the props array */
|
|
@@ -10744,7 +10788,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10744
10788
|
model = json["model"];
|
|
10745
10789
|
entityObject = json["entityObject"];
|
|
10746
10790
|
/*
|
|
10747
|
-
* If the entity object's constructor differs from the model's constructor and formGroup
|
|
10791
|
+
* If the entity object's constructor differs from the model's constructor and formGroup was not called previously,
|
|
10748
10792
|
* update the entity object to match the model.
|
|
10749
10793
|
*/
|
|
10750
10794
|
if (entityObject.constructor != model && !this.isGroupCalled) {
|
|
@@ -10755,7 +10799,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10755
10799
|
if (formBuilderConfiguration) {
|
|
10756
10800
|
this.extractExpressions(formBuilderConfiguration);
|
|
10757
10801
|
}
|
|
10758
|
-
/*
|
|
10802
|
+
/* Retrieve the instance container based on the model and entity object. */
|
|
10759
10803
|
let instanceContainer = this.getInstanceContainer(model, entityObject);
|
|
10760
10804
|
/* Check and apply additional validation for object properties. */
|
|
10761
10805
|
this.checkObjectPropAdditionalValidation(instanceContainer, entityObject, formBuilderConfiguration);
|
|
@@ -10766,21 +10810,21 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10766
10810
|
/* Iterate through properties defined in the instance container. */
|
|
10767
10811
|
instanceContainer.properties?.forEach(property => {
|
|
10768
10812
|
let isIncludeProp = true;
|
|
10769
|
-
/* Check
|
|
10813
|
+
/* Check whether the property should be included based on form builder configuration. */
|
|
10770
10814
|
if (formBuilderConfiguration) {
|
|
10771
|
-
/* Check
|
|
10815
|
+
/* Check whether the property should be excluded based on form builder configuration. */
|
|
10772
10816
|
if (formBuilderConfiguration.excludeProps && formBuilderConfiguration.excludeProps.length > 0) {
|
|
10773
10817
|
isIncludeProp = formBuilderConfiguration.excludeProps.indexOf(property.name) == -1;
|
|
10774
10818
|
}
|
|
10775
|
-
/* Check
|
|
10819
|
+
/* Check whether dynamic validation is provided in the form builder configuration. */
|
|
10776
10820
|
if (formBuilderConfiguration.dynamicValidation) {
|
|
10777
10821
|
additionalValidations = formBuilderConfiguration.dynamicValidation;
|
|
10778
10822
|
}
|
|
10779
|
-
/* Check
|
|
10823
|
+
/* Check whether the property should be included based on form builder configuration. */
|
|
10780
10824
|
if (formBuilderConfiguration.includeProps && formBuilderConfiguration.includeProps.length > 0) {
|
|
10781
10825
|
isIncludeProp = formBuilderConfiguration.includeProps.indexOf(property.name) != -1;
|
|
10782
10826
|
}
|
|
10783
|
-
/* Check
|
|
10827
|
+
/* Check whether undefined properties should be ignored based on form builder configuration. */
|
|
10784
10828
|
if (formBuilderConfiguration.ignoreUndefinedProps && formBuilderConfiguration.ignoreUndefinedProps.length > 0) {
|
|
10785
10829
|
isIncludeProp = !(property.propertyType == PROPERTY &&
|
|
10786
10830
|
!RegexValidator.isNotBlank(json["entityObject"][property.name]) &&
|
|
@@ -10958,7 +11002,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10958
11002
|
json["entityObject"]["formGroup"] = formGroup;
|
|
10959
11003
|
this.overrideProperties(formGroup, json["entityObject"], extendedProperties);
|
|
10960
11004
|
}
|
|
10961
|
-
/* If not in nested binding mode and formGroup
|
|
11005
|
+
/* If not in nested binding mode and formGroup was not called previously, refresh disable status of the form group. */
|
|
10962
11006
|
if (!this.isNestedBinding && !this.isGroupCalled) {
|
|
10963
11007
|
formGroup.refreshDisable();
|
|
10964
11008
|
}
|
|
@@ -10986,7 +11030,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
10986
11030
|
if (formBuilderConfiguration && formBuilderConfiguration.abstractControlOptions && formBuilderConfiguration.abstractControlOptions[name]) {
|
|
10987
11031
|
abstractControlOptions.updateOn = formBuilderConfiguration.abstractControlOptions[name];
|
|
10988
11032
|
}
|
|
10989
|
-
/* Check
|
|
11033
|
+
/* Check whether controlOptions are defined in formBuilderConfiguration */
|
|
10990
11034
|
const controlOptions = formBuilderConfiguration ? formBuilderConfiguration.baseAbstractControlOptions : null;
|
|
10991
11035
|
if (controlOptions && controlOptions[name]) {
|
|
10992
11036
|
/* Update updateOn option from controlOptions if defined */
|
|
@@ -11026,7 +11070,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
11026
11070
|
* @param formGroup The RxFormGroup associated with the entity object.
|
|
11027
11071
|
*/
|
|
11028
11072
|
overrideProp(entityObject, propName, formGroup) {
|
|
11029
|
-
/*
|
|
11073
|
+
/* Retrieve the property descriptor and current value */
|
|
11030
11074
|
let descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(entityObject), propName);
|
|
11031
11075
|
let value = entityObject[propName];
|
|
11032
11076
|
let oldValue = null;
|
|
@@ -11037,7 +11081,7 @@ class RxFormBuilder extends BaseFormBuilder {
|
|
|
11037
11081
|
/* Custom setter */
|
|
11038
11082
|
set: (v) => {
|
|
11039
11083
|
value = v;
|
|
11040
|
-
/* Check
|
|
11084
|
+
/* Check whether the value has changed */
|
|
11041
11085
|
if (oldValue != v) {
|
|
11042
11086
|
/* Call the original setter if defined */
|
|
11043
11087
|
if (descriptor) {
|
|
@@ -11979,6 +12023,139 @@ function mixinDisabled(base) {
|
|
|
11979
12023
|
};
|
|
11980
12024
|
}
|
|
11981
12025
|
|
|
12026
|
+
class MsaEnumDisplayComponent {
|
|
12027
|
+
/**
|
|
12028
|
+
* The numeric value of the enum to convert.
|
|
12029
|
+
*/
|
|
12030
|
+
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
12031
|
+
/**
|
|
12032
|
+
* The enum type (as an object) that defines the mapping of values to their string representations.
|
|
12033
|
+
* @type {any}
|
|
12034
|
+
*/
|
|
12035
|
+
enumType = input(...(ngDevMode ? [undefined, { debugName: "enumType" }] : /* istanbul ignore next */ []));
|
|
12036
|
+
/**
|
|
12037
|
+
* Optional metadata for the enum values, which can be used to provide additional display information.
|
|
12038
|
+
* This can be either a string prefix or an object containing EnumMetadata for each enum value.
|
|
12039
|
+
*/
|
|
12040
|
+
metadata = input(...(ngDevMode ? [undefined, { debugName: "metadata" }] : /* istanbul ignore next */ []));
|
|
12041
|
+
/**
|
|
12042
|
+
* Determines whether to display the icon alongside the text.
|
|
12043
|
+
* Defaults to false (hidden).
|
|
12044
|
+
*/
|
|
12045
|
+
showIcon = input(false, ...(ngDevMode ? [{ debugName: "showIcon" }] : /* istanbul ignore next */ []));
|
|
12046
|
+
/**
|
|
12047
|
+
* Optional entity context passed down to evaluate dynamic icon functions.
|
|
12048
|
+
*/
|
|
12049
|
+
entity = input(...(ngDevMode ? [undefined, { debugName: "entity" }] : /* istanbul ignore next */ []));
|
|
12050
|
+
/**
|
|
12051
|
+
* Optional execution context passed down to evaluate dynamic icon functions.
|
|
12052
|
+
*/
|
|
12053
|
+
context = input(...(ngDevMode ? [undefined, { debugName: "context" }] : /* istanbul ignore next */ []));
|
|
12054
|
+
/**
|
|
12055
|
+
* Extracts the current metadata object if it exists for the given value.
|
|
12056
|
+
*/
|
|
12057
|
+
currentMetadata = computed(() => {
|
|
12058
|
+
/* Get the current value and metadata */
|
|
12059
|
+
const val = this.value();
|
|
12060
|
+
const meta = this.metadata();
|
|
12061
|
+
/* Check if the metadata is an object and contains the current value */
|
|
12062
|
+
if (val !== null && val !== undefined && meta && typeof meta === 'object' && val in meta) {
|
|
12063
|
+
return meta[val];
|
|
12064
|
+
}
|
|
12065
|
+
return null;
|
|
12066
|
+
}, ...(ngDevMode ? [{ debugName: "currentMetadata" }] : /* istanbul ignore next */ []));
|
|
12067
|
+
/**
|
|
12068
|
+
* Dynamically evaluates the Icon configuration properties based on whether they are static values or context functions.
|
|
12069
|
+
*/
|
|
12070
|
+
resolvedIcon = computed(() => {
|
|
12071
|
+
/* Early exit if icons are explicitly configured to be hidden */
|
|
12072
|
+
if (!this.showIcon()) {
|
|
12073
|
+
return null;
|
|
12074
|
+
}
|
|
12075
|
+
/* Retrieve the current metadata and extract the icon configuration */
|
|
12076
|
+
const meta = this.currentMetadata();
|
|
12077
|
+
const iconConfig = meta?.icon;
|
|
12078
|
+
if (!iconConfig) {
|
|
12079
|
+
return null;
|
|
12080
|
+
}
|
|
12081
|
+
/* Retrieve the entity and context for dynamic evaluation */
|
|
12082
|
+
const x = this.entity();
|
|
12083
|
+
const ctx = this.context();
|
|
12084
|
+
/* Evaluate visibility rule from layout configurations */
|
|
12085
|
+
const shouldHide = typeof iconConfig.hide === 'function' ? iconConfig.hide(x, ctx) : iconConfig.hide;
|
|
12086
|
+
if (shouldHide) {
|
|
12087
|
+
return null;
|
|
12088
|
+
}
|
|
12089
|
+
/* Helper to resolve string values or callback functions dynamically */
|
|
12090
|
+
const resolve = (prop) => typeof prop === 'function' ? prop(x, ctx) : prop;
|
|
12091
|
+
/* Return the resolved icon configuration with evaluated properties */
|
|
12092
|
+
return {
|
|
12093
|
+
matIcon: resolve(iconConfig.matIcon),
|
|
12094
|
+
svgIcon: resolve(iconConfig.svgIcon),
|
|
12095
|
+
fontIcon: resolve(iconConfig.fontIcon),
|
|
12096
|
+
fontSet: iconConfig.fontSet ?? 'material-symbols-outlined',
|
|
12097
|
+
color: resolve(iconConfig.iconColor),
|
|
12098
|
+
cssClass: resolve(iconConfig.cssClass)
|
|
12099
|
+
};
|
|
12100
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedIcon" }] : /* istanbul ignore next */ []));
|
|
12101
|
+
/**
|
|
12102
|
+
* Resolves the text to display based on metadata or enum lookup.
|
|
12103
|
+
*/
|
|
12104
|
+
resolvedText = computed(() => {
|
|
12105
|
+
/* Get the current value */
|
|
12106
|
+
const val = this.value();
|
|
12107
|
+
if (val === null || val === undefined) {
|
|
12108
|
+
return '';
|
|
12109
|
+
}
|
|
12110
|
+
/* Attempt to retrieve the display string from the metadata if available */
|
|
12111
|
+
const metaObj = this.currentMetadata();
|
|
12112
|
+
if (metaObj) {
|
|
12113
|
+
return metaObj.display ?? '';
|
|
12114
|
+
}
|
|
12115
|
+
/* Fallback to enum type lookup if metadata is not available */
|
|
12116
|
+
const type = this.enumType();
|
|
12117
|
+
const metaStr = this.metadata();
|
|
12118
|
+
/* If the enum type is an object and contains the value, return the corresponding string representation with optional prefix */
|
|
12119
|
+
if (type && typeof type === 'object' && val in type) {
|
|
12120
|
+
const prefix = typeof metaStr === 'string' ? metaStr : '';
|
|
12121
|
+
return `${prefix}${type[val]}`;
|
|
12122
|
+
}
|
|
12123
|
+
return '';
|
|
12124
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedText" }] : /* istanbul ignore next */ []));
|
|
12125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MsaEnumDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12126
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: MsaEnumDisplayComponent, isStandalone: true, selector: "msa-enum-display", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, enumType: { classPropertyName: "enumType", publicName: "enumType", isSignal: true, isRequired: false, transformFunction: null }, metadata: { classPropertyName: "metadata", publicName: "metadata", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
12127
|
+
@if (resolvedIcon(); as iconConfig) {
|
|
12128
|
+
<mat-icon
|
|
12129
|
+
[svgIcon]="iconConfig.svgIcon"
|
|
12130
|
+
[fontIcon]="iconConfig.fontIcon"
|
|
12131
|
+
[fontSet]="iconConfig.fontSet"
|
|
12132
|
+
[style.color]="iconConfig.color"
|
|
12133
|
+
[ngClass]="iconConfig.cssClass"
|
|
12134
|
+
class="enum-icon">
|
|
12135
|
+
@if (iconConfig.matIcon) { {{ iconConfig.matIcon }} }
|
|
12136
|
+
</mat-icon>
|
|
12137
|
+
}
|
|
12138
|
+
@let text = resolvedText();
|
|
12139
|
+
<span class="enum-text" i18n="@@selection">{ text, select, type {type} other { {{text}}} }</span>`, isInline: true, styles: [".enum-icon{margin-right:.2rem;vertical-align:middle}.enum-text{vertical-align:middle}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
12140
|
+
}
|
|
12141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MsaEnumDisplayComponent, decorators: [{
|
|
12142
|
+
type: Component,
|
|
12143
|
+
args: [{ selector: 'msa-enum-display', standalone: true, imports: [MatIcon, NgClass], template: `
|
|
12144
|
+
@if (resolvedIcon(); as iconConfig) {
|
|
12145
|
+
<mat-icon
|
|
12146
|
+
[svgIcon]="iconConfig.svgIcon"
|
|
12147
|
+
[fontIcon]="iconConfig.fontIcon"
|
|
12148
|
+
[fontSet]="iconConfig.fontSet"
|
|
12149
|
+
[style.color]="iconConfig.color"
|
|
12150
|
+
[ngClass]="iconConfig.cssClass"
|
|
12151
|
+
class="enum-icon">
|
|
12152
|
+
@if (iconConfig.matIcon) { {{ iconConfig.matIcon }} }
|
|
12153
|
+
</mat-icon>
|
|
12154
|
+
}
|
|
12155
|
+
@let text = resolvedText();
|
|
12156
|
+
<span class="enum-text" i18n="@@selection">{ text, select, type {type} other { {{text}}} }</span>`, styles: [".enum-icon{margin-right:.2rem;vertical-align:middle}.enum-text{vertical-align:middle}\n"] }]
|
|
12157
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], enumType: [{ type: i0.Input, args: [{ isSignal: true, alias: "enumType", required: false }] }], metadata: [{ type: i0.Input, args: [{ isSignal: true, alias: "metadata", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], entity: [{ type: i0.Input, args: [{ isSignal: true, alias: "entity", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }] } });
|
|
12158
|
+
|
|
11982
12159
|
const headerMetadataKey = 'customer:vdHeader';
|
|
11983
12160
|
const endpointMetadataKey = 'customer:vdEndpoint';
|
|
11984
12161
|
|
|
@@ -12252,9 +12429,10 @@ var Salutation;
|
|
|
12252
12429
|
})(Salutation || (Salutation = {}));
|
|
12253
12430
|
|
|
12254
12431
|
/**
|
|
12255
|
-
* Property decorator to
|
|
12256
|
-
*
|
|
12257
|
-
* @
|
|
12432
|
+
* Property decorator to define a display name for a class property.
|
|
12433
|
+
* This decorator can be applied to a class property to specify its display name, which can be used in UI components or other contexts.
|
|
12434
|
+
* @param name The display name to associate with the property.
|
|
12435
|
+
* @returns A property decorator function.
|
|
12258
12436
|
*/
|
|
12259
12437
|
function Display(name) {
|
|
12260
12438
|
return function (target, propertyKey) {
|
|
@@ -12262,9 +12440,10 @@ function Display(name) {
|
|
|
12262
12440
|
};
|
|
12263
12441
|
}
|
|
12264
12442
|
/**
|
|
12265
|
-
* Class decorator to
|
|
12266
|
-
*
|
|
12267
|
-
* @
|
|
12443
|
+
* Class decorator to define an API endpoint for a given class.
|
|
12444
|
+
* This decorator can be applied to a class to specify the API endpoint associated with it, which can be used for data retrieval or other operations.
|
|
12445
|
+
* @param endpoint The API endpoint to associate with the class.
|
|
12446
|
+
* @returns A class decorator function.
|
|
12268
12447
|
*/
|
|
12269
12448
|
function Api(endpoint) {
|
|
12270
12449
|
return function (target) {
|
|
@@ -12293,6 +12472,15 @@ function getDisplay(origin) {
|
|
|
12293
12472
|
return Reflect.getMetadata(headerMetadataKey, origin);
|
|
12294
12473
|
}
|
|
12295
12474
|
|
|
12475
|
+
/**
|
|
12476
|
+
* @method graphql
|
|
12477
|
+
* @description A tag function that tells IDEs (VS Code/WebStorm)
|
|
12478
|
+
* to provide GraphQL syntax highlighting without adding runtime dependencies.
|
|
12479
|
+
*/
|
|
12480
|
+
function graphql(strings, ...values) {
|
|
12481
|
+
return strings.reduce((acc, str, i) => acc + str + (values[i] || ''), '');
|
|
12482
|
+
}
|
|
12483
|
+
|
|
12296
12484
|
//@dynamic
|
|
12297
12485
|
class AppStorage {
|
|
12298
12486
|
/**
|
|
@@ -12531,6 +12719,18 @@ class TableColumn {
|
|
|
12531
12719
|
* @property
|
|
12532
12720
|
*/
|
|
12533
12721
|
filterOptionText;
|
|
12722
|
+
/**
|
|
12723
|
+
* @property filterTooltip
|
|
12724
|
+
* @description Tooltip for the filter input.
|
|
12725
|
+
* @type {(ctx?: IGenericListComponent<TEntity>) => any}
|
|
12726
|
+
*/
|
|
12727
|
+
filterTooltip;
|
|
12728
|
+
/**
|
|
12729
|
+
* @property filterTooltipClass
|
|
12730
|
+
* @description CSS class for the filter tooltip.
|
|
12731
|
+
* @type {string}
|
|
12732
|
+
*/
|
|
12733
|
+
filterTooltipClass;
|
|
12534
12734
|
/**
|
|
12535
12735
|
* The header text for the column.
|
|
12536
12736
|
* @property
|
|
@@ -13314,6 +13514,12 @@ class EnumMetadata {
|
|
|
13314
13514
|
* @type {string}
|
|
13315
13515
|
*/
|
|
13316
13516
|
display;
|
|
13517
|
+
/**
|
|
13518
|
+
* @property Hint
|
|
13519
|
+
* @description An optional hint string associated with the enum value. This string can be used to provide additional information or guidance in the UI.
|
|
13520
|
+
* @type {string}
|
|
13521
|
+
*/
|
|
13522
|
+
hint;
|
|
13317
13523
|
/**
|
|
13318
13524
|
* @property Icon
|
|
13319
13525
|
* @description An optional icon associated with the enum value. This can be used to visually represent the enum value in the UI.
|
|
@@ -13622,6 +13828,10 @@ class EnumPipe {
|
|
|
13622
13828
|
* or undefined if the value is not recognized in the provided enum type.
|
|
13623
13829
|
*/
|
|
13624
13830
|
transform(value, enumType, prefixOrMetadata, suffix = '') {
|
|
13831
|
+
/* Return undefined if the value is null or undefined */
|
|
13832
|
+
if (value === null || value === undefined) {
|
|
13833
|
+
return undefined;
|
|
13834
|
+
}
|
|
13625
13835
|
/* Determine if prefixOrMetadata is an object containing EnumMetadata for the given value */
|
|
13626
13836
|
if (prefixOrMetadata && typeof prefixOrMetadata === 'object' && value in prefixOrMetadata) {
|
|
13627
13837
|
const metadata = prefixOrMetadata[value];
|
|
@@ -14371,30 +14581,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
14371
14581
|
}]
|
|
14372
14582
|
}] });
|
|
14373
14583
|
|
|
14584
|
+
/**
|
|
14585
|
+
* @method parseProjectionString
|
|
14586
|
+
* @description Parses projection input (string, string array, or raw multi-line string) into a flattened API-friendly projection string.
|
|
14587
|
+
* @param {string | string[]} projection The raw selection input
|
|
14588
|
+
* @returns {string} The formatted comma-separated string with no whitespace
|
|
14589
|
+
*/
|
|
14590
|
+
const parseProjectionString = (projection) => {
|
|
14591
|
+
/* Handle array input: join and proceed to cleaning */
|
|
14592
|
+
let input = Array.isArray(projection) ? projection.join(',') : projection;
|
|
14593
|
+
/* If it's already a clean, flat, comma-separated string without braces, return it */
|
|
14594
|
+
if (!input.includes('{') && !input.includes('}')) {
|
|
14595
|
+
return input.replace(/\s+/g, '');
|
|
14596
|
+
}
|
|
14597
|
+
/* Clean the string: remove newlines, extra spaces, and replace { with ( and } with ) */
|
|
14598
|
+
let cleaned = input
|
|
14599
|
+
.replace(/\s+/g, ' ')
|
|
14600
|
+
.replace(/\s?\{\s?/g, '(')
|
|
14601
|
+
.replace(/\s?\}\s?/g, ')')
|
|
14602
|
+
.trim();
|
|
14603
|
+
/* Remove trailing commas before closing parentheses */
|
|
14604
|
+
cleaned = cleaned.replace(/,\s*\)/g, ')');
|
|
14605
|
+
/* Replace spaces between alphanumeric characters with commas and remove all remaining whitespace */
|
|
14606
|
+
return cleaned
|
|
14607
|
+
.replace(/([a-zA-Z0-9])\s+([a-zA-Z0-9])/g, '$1,$2')
|
|
14608
|
+
.replace(/\)([a-zA-Z_])/g, '),$1')
|
|
14609
|
+
.replace(/\s+/g, '');
|
|
14610
|
+
};
|
|
14611
|
+
|
|
14374
14612
|
class GenericService {
|
|
14375
14613
|
endpoint;
|
|
14376
14614
|
/**
|
|
14377
|
-
*
|
|
14615
|
+
* Injected Angular HttpClient instance
|
|
14378
14616
|
*/
|
|
14379
14617
|
http = inject(HttpClient);
|
|
14380
14618
|
/**
|
|
14381
|
-
*
|
|
14619
|
+
* BehaviorSubject holding the current list of entities
|
|
14382
14620
|
*/
|
|
14383
14621
|
list = new BehaviorSubject([]);
|
|
14384
14622
|
/**
|
|
14385
14623
|
* Constructor
|
|
14386
|
-
*
|
|
14387
|
-
* @param http
|
|
14624
|
+
* @param endpoint Optional API endpoint for the service
|
|
14388
14625
|
*/
|
|
14389
14626
|
constructor(endpoint) {
|
|
14390
14627
|
this.endpoint = endpoint;
|
|
14391
14628
|
}
|
|
14392
14629
|
/**
|
|
14393
|
-
*
|
|
14394
|
-
*
|
|
14395
|
-
* @param
|
|
14396
|
-
* @param
|
|
14397
|
-
* @param
|
|
14630
|
+
* Retrieves a single entity by ID or relative path
|
|
14631
|
+
* @param id The entity ID or relative path
|
|
14632
|
+
* @param params Optional query parameters
|
|
14633
|
+
* @param headers Optional HTTP headers
|
|
14634
|
+
* @param handleError Whether to handle errors (default: true)
|
|
14635
|
+
* @param observeResponse Whether to observe the full response (default: false)
|
|
14398
14636
|
*/
|
|
14399
14637
|
get(id, params, headers, handleError = true, observeResponse = false) {
|
|
14400
14638
|
let request = this.http
|
|
@@ -14406,12 +14644,20 @@ class GenericService {
|
|
|
14406
14644
|
return request;
|
|
14407
14645
|
}
|
|
14408
14646
|
/**
|
|
14409
|
-
*
|
|
14410
|
-
*
|
|
14411
|
-
* @param params
|
|
14412
|
-
* @
|
|
14413
|
-
|
|
14414
|
-
|
|
14647
|
+
* Asynchronously retrieves a single entity by ID or relative path
|
|
14648
|
+
* @param id The entity ID or relative path
|
|
14649
|
+
* @param params Optional query parameters
|
|
14650
|
+
* @returns Promise resolving to the entity
|
|
14651
|
+
*/
|
|
14652
|
+
async getAsync(id, params) {
|
|
14653
|
+
return await firstValueFrom(this.get(id, params));
|
|
14654
|
+
}
|
|
14655
|
+
/**
|
|
14656
|
+
* Counts entities on the server
|
|
14657
|
+
* @param params Optional query parameters
|
|
14658
|
+
* @param path Optional relative path to the count action
|
|
14659
|
+
* @param headers Optional HTTP headers
|
|
14660
|
+
* @param handleError Whether to handle errors (default: true)
|
|
14415
14661
|
*/
|
|
14416
14662
|
count(params, path, headers, handleError = true) {
|
|
14417
14663
|
let request = this.http
|
|
@@ -14423,41 +14669,81 @@ class GenericService {
|
|
|
14423
14669
|
return request.pipe(map$1(x => { return x.value; }));
|
|
14424
14670
|
}
|
|
14425
14671
|
/**
|
|
14426
|
-
*
|
|
14427
|
-
*
|
|
14428
|
-
* @param
|
|
14429
|
-
* @
|
|
14430
|
-
|
|
14431
|
-
|
|
14672
|
+
* Asynchronously counts entities on the server
|
|
14673
|
+
* @param params Optional query parameters
|
|
14674
|
+
* @param path Optional relative path to the count action
|
|
14675
|
+
* @returns Promise resolving to the count
|
|
14676
|
+
*/
|
|
14677
|
+
async countAsync(params, path) {
|
|
14678
|
+
return await firstValueFrom(this.count(params, path));
|
|
14679
|
+
}
|
|
14680
|
+
/**
|
|
14681
|
+
* Retrieves a list of entities
|
|
14682
|
+
* @param params Optional query parameters
|
|
14683
|
+
* @param path Optional relative path to the action
|
|
14684
|
+
* @param headers Optional HTTP headers
|
|
14685
|
+
* @returns Observable with the response data
|
|
14432
14686
|
*/
|
|
14433
14687
|
getList(params, path, headers) {
|
|
14688
|
+
const parsedParams = this.normalizeProjectionParam(params);
|
|
14434
14689
|
return this.http
|
|
14435
|
-
.get(`${this.endpoint}${path ? path : ''}`, {
|
|
14690
|
+
.get(`${this.endpoint}${path ? path : ''}`, {
|
|
14691
|
+
params: parsedParams instanceof HttpParams ? parsedParams : Utils.toHttpParams(parsedParams),
|
|
14692
|
+
headers: this.toHttpHeaders(headers)
|
|
14693
|
+
})
|
|
14436
14694
|
.pipe(catchError(this.handleError('getList')));
|
|
14437
14695
|
}
|
|
14438
14696
|
/**
|
|
14439
|
-
*
|
|
14440
|
-
* @param params
|
|
14441
|
-
* @param path
|
|
14442
|
-
* @param headers
|
|
14697
|
+
* Asynchronously retrieves a list of entities
|
|
14698
|
+
* @param params Optional query parameters
|
|
14699
|
+
* @param path Optional relative path to the action
|
|
14700
|
+
* @param headers Optional HTTP headers
|
|
14701
|
+
* @returns Promise resolving to the response data
|
|
14702
|
+
*/
|
|
14703
|
+
async getListAsync(params, path, headers) {
|
|
14704
|
+
/* Calling the observable-based method and converting to promise */
|
|
14705
|
+
const request$ = this.getList(params, path, headers);
|
|
14706
|
+
/* Using firstValueFrom to handle the single response value */
|
|
14707
|
+
return await firstValueFrom(request$);
|
|
14708
|
+
}
|
|
14709
|
+
/**
|
|
14710
|
+
* Loads data into the BehaviorSubject list
|
|
14711
|
+
* @param params Optional query parameters
|
|
14712
|
+
* @param path Optional relative path to the action
|
|
14713
|
+
* @param headers Optional HTTP headers
|
|
14443
14714
|
*/
|
|
14444
14715
|
loadList(params, path, headers) {
|
|
14445
14716
|
this.getList(params, path, headers)
|
|
14446
14717
|
.subscribe(x => this.list.next(x));
|
|
14447
14718
|
}
|
|
14448
14719
|
/**
|
|
14449
|
-
*
|
|
14720
|
+
* Loads data into the BehaviorSubject list asynchronously
|
|
14721
|
+
* @param params Optional query parameters
|
|
14722
|
+
* @param path Optional relative path to the action
|
|
14723
|
+
* @param headers Optional HTTP headers
|
|
14724
|
+
*/
|
|
14725
|
+
/**
|
|
14726
|
+
* Asynchronously loads data into the BehaviorSubject list
|
|
14727
|
+
* @param params Optional query parameters
|
|
14728
|
+
* @param path Optional relative path to the action
|
|
14729
|
+
* @param headers Optional HTTP headers
|
|
14730
|
+
*/
|
|
14731
|
+
async loadListAsync(params, path, headers) {
|
|
14732
|
+
const data = await this.getListAsync(params, path, headers);
|
|
14733
|
+
this.list.next(data);
|
|
14734
|
+
}
|
|
14735
|
+
/**
|
|
14736
|
+
* Returns the list BehaviorSubject as an Observable
|
|
14450
14737
|
*/
|
|
14451
14738
|
getListAsObservable() {
|
|
14452
14739
|
return this.list.asObservable();
|
|
14453
14740
|
}
|
|
14454
14741
|
/**
|
|
14455
|
-
* Creates
|
|
14456
|
-
*
|
|
14742
|
+
* Creates a new entity
|
|
14457
14743
|
* @param entity The entity to create
|
|
14458
|
-
* @param path
|
|
14459
|
-
* @param httpOptions
|
|
14460
|
-
* @param handleError
|
|
14744
|
+
* @param path Optional relative path to the action
|
|
14745
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14746
|
+
* @param handleError Whether to handle errors (default: true)
|
|
14461
14747
|
*/
|
|
14462
14748
|
create(entity, path, httpOptions, handleError = true) {
|
|
14463
14749
|
let request = this.http
|
|
@@ -14469,12 +14755,22 @@ class GenericService {
|
|
|
14469
14755
|
return request;
|
|
14470
14756
|
}
|
|
14471
14757
|
/**
|
|
14472
|
-
*
|
|
14473
|
-
*
|
|
14474
|
-
* @param
|
|
14475
|
-
* @param
|
|
14476
|
-
* @
|
|
14477
|
-
|
|
14758
|
+
* Asynchronously creates a new entity
|
|
14759
|
+
* @param entity The entity to create
|
|
14760
|
+
* @param path Optional relative path to the action
|
|
14761
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14762
|
+
* @returns Promise resolving to the created entity
|
|
14763
|
+
*/
|
|
14764
|
+
async createAsync(entity, path, httpOptions) {
|
|
14765
|
+
return await firstValueFrom(this.create(entity, path, httpOptions));
|
|
14766
|
+
}
|
|
14767
|
+
/**
|
|
14768
|
+
* Updates an existing entity asynchronously
|
|
14769
|
+
* @param id The ID of the entity to update
|
|
14770
|
+
* @param entity The updated entity data
|
|
14771
|
+
* @param path Optional relative path to the action
|
|
14772
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14773
|
+
* @param handleError Whether to handle errors (default: true)
|
|
14478
14774
|
*/
|
|
14479
14775
|
update(id, entity, path, httpOptions, handleError = true) {
|
|
14480
14776
|
let request = this.http
|
|
@@ -14486,13 +14782,23 @@ class GenericService {
|
|
|
14486
14782
|
return request;
|
|
14487
14783
|
}
|
|
14488
14784
|
/**
|
|
14489
|
-
*
|
|
14490
|
-
*
|
|
14491
|
-
* @param
|
|
14492
|
-
* @param
|
|
14493
|
-
* @param
|
|
14494
|
-
* @
|
|
14495
|
-
|
|
14785
|
+
* Asynchronously updates an existing entity
|
|
14786
|
+
* @param id The ID of the entity to update
|
|
14787
|
+
* @param entity The updated entity data
|
|
14788
|
+
* @param path Optional relative path to the action
|
|
14789
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14790
|
+
* @returns Promise resolving to the updated entity
|
|
14791
|
+
*/
|
|
14792
|
+
async updateAsync(id, entity, path, httpOptions) {
|
|
14793
|
+
return await firstValueFrom(this.update(id, entity, path, httpOptions));
|
|
14794
|
+
}
|
|
14795
|
+
/**
|
|
14796
|
+
* Applies a JSON Patch to an entity
|
|
14797
|
+
* @param id The ID of the item to patch
|
|
14798
|
+
* @param body The patch body
|
|
14799
|
+
* @param path Optional relative path to the action
|
|
14800
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14801
|
+
* @param handleError Whether to handle errors (default: true)
|
|
14496
14802
|
*/
|
|
14497
14803
|
patch(id, body, path, httpOptions, handleError = true) {
|
|
14498
14804
|
/* Ensure correct content-type for patch */
|
|
@@ -14515,13 +14821,23 @@ class GenericService {
|
|
|
14515
14821
|
return request;
|
|
14516
14822
|
}
|
|
14517
14823
|
/**
|
|
14518
|
-
*
|
|
14519
|
-
*
|
|
14520
|
-
* @param
|
|
14521
|
-
* @param
|
|
14522
|
-
* @param
|
|
14523
|
-
* @
|
|
14524
|
-
|
|
14824
|
+
* Asynchronously applies a JSON Patch to an entity
|
|
14825
|
+
* @param id The ID of the item to patch
|
|
14826
|
+
* @param body The patch body
|
|
14827
|
+
* @param path Optional relative path to the action
|
|
14828
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14829
|
+
* @returns Promise resolving to the patched entity
|
|
14830
|
+
*/
|
|
14831
|
+
async patchAsync(id, body, path, httpOptions) {
|
|
14832
|
+
return await firstValueFrom(this.patch(id, body, path, httpOptions));
|
|
14833
|
+
}
|
|
14834
|
+
/**
|
|
14835
|
+
* Applies a JSON Patch to multiple entities
|
|
14836
|
+
* @param ids The IDs of the items to patch
|
|
14837
|
+
* @param body The patch body
|
|
14838
|
+
* @param path Optional relative path to the action
|
|
14839
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14840
|
+
* @param handleError Whether to handle errors (default: true)
|
|
14525
14841
|
*/
|
|
14526
14842
|
patchList(ids, body, path, httpOptions, handleError = true) {
|
|
14527
14843
|
let request = this.http
|
|
@@ -14533,12 +14849,22 @@ class GenericService {
|
|
|
14533
14849
|
return request;
|
|
14534
14850
|
}
|
|
14535
14851
|
/**
|
|
14536
|
-
*
|
|
14537
|
-
*
|
|
14538
|
-
* @param
|
|
14539
|
-
* @param path
|
|
14540
|
-
* @param httpOptions
|
|
14541
|
-
* @
|
|
14852
|
+
* Asynchronously applies a JSON Patch to multiple entities
|
|
14853
|
+
* @param ids The IDs of the items to patch
|
|
14854
|
+
* @param body The patch body
|
|
14855
|
+
* @param path Optional relative path to the action
|
|
14856
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14857
|
+
* @returns Promise resolving to the patched entities
|
|
14858
|
+
*/
|
|
14859
|
+
async patchListAsync(ids, body, path, httpOptions) {
|
|
14860
|
+
return await firstValueFrom(this.patchList(ids, body, path, httpOptions));
|
|
14861
|
+
}
|
|
14862
|
+
/**
|
|
14863
|
+
* Deletes an entity by ID
|
|
14864
|
+
* @param id The ID of the item to delete
|
|
14865
|
+
* @param path Optional relative path to the action
|
|
14866
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14867
|
+
* @param handleError Whether to handle errors (default: true)
|
|
14542
14868
|
*/
|
|
14543
14869
|
delete(id, path, httpOptions, handleError = true) {
|
|
14544
14870
|
let request = this.http
|
|
@@ -14550,12 +14876,21 @@ class GenericService {
|
|
|
14550
14876
|
return request;
|
|
14551
14877
|
}
|
|
14552
14878
|
/**
|
|
14553
|
-
*
|
|
14554
|
-
*
|
|
14555
|
-
* @param
|
|
14556
|
-
* @param
|
|
14557
|
-
* @
|
|
14558
|
-
|
|
14879
|
+
* Asynchronously deletes an entity by ID
|
|
14880
|
+
* @param id The ID of the item to delete
|
|
14881
|
+
* @param path Optional relative path to the action
|
|
14882
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14883
|
+
* @returns Promise resolving to the delete result
|
|
14884
|
+
*/
|
|
14885
|
+
async deleteAsync(id, path, httpOptions) {
|
|
14886
|
+
return await firstValueFrom(this.delete(id, path, httpOptions));
|
|
14887
|
+
}
|
|
14888
|
+
/**
|
|
14889
|
+
* Deletes multiple entities by IDs
|
|
14890
|
+
* @param ids The IDs of the items to delete
|
|
14891
|
+
* @param path Optional relative path to the action
|
|
14892
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14893
|
+
* @param handleError Whether to handle errors (default: true)
|
|
14559
14894
|
*/
|
|
14560
14895
|
deleteList(ids, path, httpOptions, handleError = true) {
|
|
14561
14896
|
let request = this.http.delete(`${this.endpoint}${path ? path : ''}`, Object.assign(httpOptions || {}, { params: Utils.toHttpParams({ ids: ids }) }));
|
|
@@ -14566,10 +14901,20 @@ class GenericService {
|
|
|
14566
14901
|
return request;
|
|
14567
14902
|
}
|
|
14568
14903
|
/**
|
|
14569
|
-
*
|
|
14570
|
-
*
|
|
14571
|
-
* @param path
|
|
14572
|
-
* @param
|
|
14904
|
+
* Asynchronously deletes multiple entities by IDs
|
|
14905
|
+
* @param ids The IDs of the items to delete
|
|
14906
|
+
* @param path Optional relative path to the action
|
|
14907
|
+
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
14908
|
+
* @returns Promise resolving to the delete result
|
|
14909
|
+
*/
|
|
14910
|
+
async deleteListAsync(ids, path, httpOptions) {
|
|
14911
|
+
return await firstValueFrom(this.deleteList(ids, path, httpOptions));
|
|
14912
|
+
}
|
|
14913
|
+
/**
|
|
14914
|
+
* Downloads a file from the server
|
|
14915
|
+
* @param path Relative path to the download action
|
|
14916
|
+
* @param params Optional query parameters
|
|
14917
|
+
* @param handleError Whether to handle errors (default: true)
|
|
14573
14918
|
*/
|
|
14574
14919
|
download(path, params, handleError = true) {
|
|
14575
14920
|
let request = this.http
|
|
@@ -14582,17 +14927,35 @@ class GenericService {
|
|
|
14582
14927
|
return request;
|
|
14583
14928
|
}
|
|
14584
14929
|
/**
|
|
14585
|
-
*
|
|
14586
|
-
* @param
|
|
14930
|
+
* Asynchronously downloads a file from the server
|
|
14931
|
+
* @param path Relative path to the download action
|
|
14932
|
+
* @param params Optional query parameters
|
|
14933
|
+
* @returns Promise resolving to the download result
|
|
14934
|
+
*/
|
|
14935
|
+
async downloadAsync(path, params) {
|
|
14936
|
+
return await firstValueFrom(this.download(path, params));
|
|
14937
|
+
}
|
|
14938
|
+
/**
|
|
14939
|
+
* Duplicates a record by ID
|
|
14940
|
+
* @param id The ID of the record to duplicate
|
|
14587
14941
|
*/
|
|
14588
14942
|
duplicate(id) {
|
|
14589
14943
|
return this.create(null, `/duplicate/${id}`);
|
|
14590
14944
|
}
|
|
14591
14945
|
/**
|
|
14592
|
-
*
|
|
14593
|
-
*
|
|
14946
|
+
* Asynchronously duplicates a record by ID
|
|
14947
|
+
* @param id The ID of the record to duplicate
|
|
14948
|
+
* @returns Promise resolving to the duplicated record
|
|
14949
|
+
*/
|
|
14950
|
+
async duplicateAsync(id) {
|
|
14951
|
+
return await firstValueFrom(this.duplicate(id));
|
|
14952
|
+
}
|
|
14953
|
+
/**
|
|
14954
|
+
* Uploads a file to the server
|
|
14594
14955
|
* @param file The file to upload
|
|
14595
|
-
* @param path
|
|
14956
|
+
* @param path Optional relative path to the upload action (default: 'upload')
|
|
14957
|
+
* @param extraData Optional extra form data to include
|
|
14958
|
+
* @returns Observable of HttpEvent for upload progress tracking
|
|
14596
14959
|
*/
|
|
14597
14960
|
upload(file, path = 'upload', extraData) {
|
|
14598
14961
|
/* Creates form data object */
|
|
@@ -14616,11 +14979,21 @@ class GenericService {
|
|
|
14616
14979
|
return this.http.request(req);
|
|
14617
14980
|
}
|
|
14618
14981
|
;
|
|
14982
|
+
/**
|
|
14983
|
+
* Asynchronously uploads a file to the server
|
|
14984
|
+
* @param file The file to upload
|
|
14985
|
+
* @param path Optional relative path to the upload action (default: 'upload')
|
|
14986
|
+
* @param extraData Optional extra form data to include
|
|
14987
|
+
* @returns Promise resolving to the upload result
|
|
14988
|
+
*/
|
|
14989
|
+
async uploadAsync(file, path = 'upload', extraData) {
|
|
14990
|
+
return await firstValueFrom(this.upload(file, path, extraData));
|
|
14991
|
+
}
|
|
14619
14992
|
///#region Helpers
|
|
14620
14993
|
/**
|
|
14621
|
-
*
|
|
14622
|
-
*
|
|
14623
|
-
* @
|
|
14994
|
+
* Converts an object to FormData
|
|
14995
|
+
* @param body The object to convert
|
|
14996
|
+
* @returns FormData instance
|
|
14624
14997
|
*/
|
|
14625
14998
|
toFormData(body) {
|
|
14626
14999
|
if (!body) {
|
|
@@ -14631,9 +15004,9 @@ class GenericService {
|
|
|
14631
15004
|
.reduce((p, key) => { p.append(key, body[key]); return p; }, new FormData());
|
|
14632
15005
|
}
|
|
14633
15006
|
/**
|
|
14634
|
-
*
|
|
14635
|
-
*
|
|
14636
|
-
* @
|
|
15007
|
+
* Converts an object to HttpHeaders
|
|
15008
|
+
* @param body The object to convert
|
|
15009
|
+
* @returns HttpHeaders instance
|
|
14637
15010
|
*/
|
|
14638
15011
|
toHttpHeaders(body) {
|
|
14639
15012
|
if (!body) {
|
|
@@ -14644,8 +15017,39 @@ class GenericService {
|
|
|
14644
15017
|
.reduce((p, key) => p.set(key, body[key]), new HttpHeaders());
|
|
14645
15018
|
}
|
|
14646
15019
|
/**
|
|
14647
|
-
*
|
|
14648
|
-
* @param
|
|
15020
|
+
* Normalizes the 'projection' parameter in query parameters
|
|
15021
|
+
* @param params The query parameters (HttpParams or object)
|
|
15022
|
+
* @returns Normalized query parameters with 'projection' formatted
|
|
15023
|
+
*/
|
|
15024
|
+
normalizeProjectionParam(params) {
|
|
15025
|
+
/* If params is null or undefined, return it as is */
|
|
15026
|
+
if (!params) {
|
|
15027
|
+
return params;
|
|
15028
|
+
}
|
|
15029
|
+
/* If params is an instance of HttpParams, extract and normalize the 'projection' parameter */
|
|
15030
|
+
if (params instanceof HttpParams) {
|
|
15031
|
+
const projection = params.get('projection');
|
|
15032
|
+
if (!projection) {
|
|
15033
|
+
return params;
|
|
15034
|
+
}
|
|
15035
|
+
/* If projection is present, normalize it and return a new HttpParams instance with the updated projection */
|
|
15036
|
+
return params.set('projection', parseProjectionString(projection));
|
|
15037
|
+
}
|
|
15038
|
+
/* If params is a plain object, normalize the 'projection' property */
|
|
15039
|
+
const typedParams = params;
|
|
15040
|
+
if (typedParams['projection'] == null || typedParams['projection'] === '') {
|
|
15041
|
+
return params;
|
|
15042
|
+
}
|
|
15043
|
+
/* Normalize the 'projection' property and return a new object with the updated projection */
|
|
15044
|
+
return {
|
|
15045
|
+
...typedParams,
|
|
15046
|
+
projection: parseProjectionString(typedParams['projection'])
|
|
15047
|
+
};
|
|
15048
|
+
}
|
|
15049
|
+
/**
|
|
15050
|
+
* Extracts file name from Content-Disposition header
|
|
15051
|
+
* @param headers HttpHeaders containing Content-Disposition
|
|
15052
|
+
* @returns The extracted file name or empty string
|
|
14649
15053
|
*/
|
|
14650
15054
|
getFileNameFromHeaders(headers) {
|
|
14651
15055
|
/* Extract the Content-Disposition header from the HTTP headers */
|
|
@@ -14666,12 +15070,9 @@ class GenericService {
|
|
|
14666
15070
|
}
|
|
14667
15071
|
/**
|
|
14668
15072
|
* Handles an HTTP operation that failed.
|
|
14669
|
-
*
|
|
14670
|
-
*
|
|
14671
|
-
* @
|
|
14672
|
-
* @param operation The name of the operation that failed. Defaults to 'operation'.
|
|
14673
|
-
* @param result An optional value to return as the observable result.
|
|
14674
|
-
* @returns A function that processes the error and returns an observable.
|
|
15073
|
+
* Throws a parsed error for the application to handle.
|
|
15074
|
+
* @param operation The name of the operation that failed (for logging)
|
|
15075
|
+
* @returns A function that processes the error and returns an observable
|
|
14675
15076
|
*/
|
|
14676
15077
|
handleError(operation = 'operation') {
|
|
14677
15078
|
return (error) => throwError(() => {
|
|
@@ -14683,10 +15084,10 @@ class GenericService {
|
|
|
14683
15084
|
});
|
|
14684
15085
|
}
|
|
14685
15086
|
/**
|
|
14686
|
-
*
|
|
14687
|
-
*
|
|
14688
|
-
* @param
|
|
14689
|
-
* @
|
|
15087
|
+
* Returns a distinct message for upload events
|
|
15088
|
+
* @param event The HttpEvent from the upload
|
|
15089
|
+
* @param file The file being uploaded
|
|
15090
|
+
* @returns A user-friendly status message
|
|
14690
15091
|
*/
|
|
14691
15092
|
getEventMessage(event, file) {
|
|
14692
15093
|
switch (event.type) {
|
|
@@ -14705,9 +15106,8 @@ class GenericService {
|
|
|
14705
15106
|
}
|
|
14706
15107
|
}
|
|
14707
15108
|
/**
|
|
14708
|
-
*
|
|
14709
|
-
*
|
|
14710
|
-
* @param message
|
|
15109
|
+
* Logs upload progress messages to the console
|
|
15110
|
+
* @param message The message to log
|
|
14711
15111
|
*/
|
|
14712
15112
|
showProgress(message) {
|
|
14713
15113
|
console.debug(message);
|
|
@@ -14797,6 +15197,7 @@ class EnumService {
|
|
|
14797
15197
|
return {
|
|
14798
15198
|
id: key,
|
|
14799
15199
|
name: metadata?.display ?? enumObj[key],
|
|
15200
|
+
hint: metadata?.hint,
|
|
14800
15201
|
icon: metadata?.icon,
|
|
14801
15202
|
textColor: metadata?.textColor,
|
|
14802
15203
|
disabled: metadata?.disabled || metadata?.disable?.(context) || false,
|
|
@@ -15571,7 +15972,15 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
15571
15972
|
* @type {boolean}
|
|
15572
15973
|
*/
|
|
15573
15974
|
get multiple() { return this._multiple; }
|
|
15574
|
-
set multiple(multi) {
|
|
15975
|
+
set multiple(multi) {
|
|
15976
|
+
/* Update the control type based on the multiple value */
|
|
15977
|
+
if (multi) {
|
|
15978
|
+
this.controlType = `${this.controlType}${multi ? '-multiple' : ''}`;
|
|
15979
|
+
}
|
|
15980
|
+
/* Update the multiple value and trigger state change */
|
|
15981
|
+
this._multiple = coerceBooleanProperty(multi);
|
|
15982
|
+
this.stateChanges.next();
|
|
15983
|
+
}
|
|
15575
15984
|
/**
|
|
15576
15985
|
* @property sorted
|
|
15577
15986
|
* @description Whether the options should be sorted.
|
|
@@ -16012,22 +16421,6 @@ class VdSelectComponent extends AbstractSelectFormField {
|
|
|
16012
16421
|
this._triggerCssClass = triggerCssClass;
|
|
16013
16422
|
this.stateChanges.next();
|
|
16014
16423
|
}
|
|
16015
|
-
/**
|
|
16016
|
-
* Mode of the trigger.
|
|
16017
|
-
*/
|
|
16018
|
-
get triggerMode() { return this._triggerMode; }
|
|
16019
|
-
set triggerMode(triggerMode) {
|
|
16020
|
-
/* Update the trigger mode value */
|
|
16021
|
-
this._triggerMode = triggerMode;
|
|
16022
|
-
/* Update the CSS class based on the trigger mode */
|
|
16023
|
-
this.triggerCssClass = triggerMode;
|
|
16024
|
-
/* If trigger mode is defined, append it to the control type */
|
|
16025
|
-
if (triggerMode) {
|
|
16026
|
-
this.controlType = `${this.controlType}-${triggerMode}`;
|
|
16027
|
-
}
|
|
16028
|
-
/* Notify that the state has changed */
|
|
16029
|
-
this.stateChanges.next();
|
|
16030
|
-
}
|
|
16031
16424
|
/**
|
|
16032
16425
|
* Gets the display values of the selected options for the trigger.
|
|
16033
16426
|
*
|
|
@@ -16124,13 +16517,13 @@ class VdSelectComponent extends AbstractSelectFormField {
|
|
|
16124
16517
|
});
|
|
16125
16518
|
}
|
|
16126
16519
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: VdSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16127
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: VdSelectComponent, isStandalone: true, selector: "vd-select", inputs: { triggerCssClass: "triggerCssClass"
|
|
16520
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: VdSelectComponent, isStandalone: true, selector: "vd-select", inputs: { triggerCssClass: "triggerCssClass" }, providers: [
|
|
16128
16521
|
{ provide: MatFormFieldControl, useExisting: VdSelectComponent },
|
|
16129
16522
|
{
|
|
16130
16523
|
provide: MAT_SELECT_CONFIG,
|
|
16131
16524
|
useValue: { overlayPanelClass: 'vd-select-filter-overlay' }
|
|
16132
16525
|
}
|
|
16133
|
-
], 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"] }] });
|
|
16526
|
+
], 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 Selection template -->\n <ng-template #selectionTemplate let-label=\"label\">\n <span i18n=\"@@selection\">{ label, select, option {option} other { {{ label }} } }</span>\n </ng-template>\n <!-- #endregion -->\n\n <!-- #region Option template -->\n <ng-template #optionTextTemplate let-option=\"option\">\n <span layout=\"column\" class=\"option-text\" [ngClass]=\"{'option-has-hint': option.hint?.length > 0}\">\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: option[optionTextProperty] }\"></ng-template>\n <span class=\"mat-caption text-secondary option-hint\" [matTooltip]=\"option.hint\">{{option.hint}}</span>\n </span>\n </ng-template>\n <!-- #endregion -->\n\n <!-- #region Option icon template -->\n <ng-template #optionIconTemplate let-option=\"option\" let-isAvatar=\"isAvatar\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [class.mat-mdc-chip-avatar]=\"isAvatar\" [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [class.mat-mdc-chip-avatar]=\"isAvatar\" [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 [class.mat-mdc-chip-avatar]=\"isAvatar\" [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 [class.mat-mdc-chip-avatar]=\"isAvatar\" [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 [class.mat-mdc-chip-avatar]=\"isAvatar\" [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [class.mat-mdc-chip-avatar]=\"isAvatar\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n }\n <!-- #endregion -->\n </ng-template>\n <!-- #endregion -->\n\n <!-- #region Option icon template -->\n <ng-template #optionIconChipAvatarTemplate let-option=\"option\">\n <!-- #region Property icon -->\n <span class=\"option-icon\" matChipAvatar>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n </span>\n <!-- #endregion -->\n </ng-template>\n <!-- #endregion -->\n\n <!-- #region Trigger for launch button -->\n @if (onLaunch.observed) {\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 <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: option[optionTextProperty] }\"></ng-template>\n\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.observed && triggerTemplate && triggerTemplate.templateRef) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n <ng-template [ngTemplateOutlet]=\"triggerTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: selectedOptions }\"></ng-template>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Option template as trigger -->\n @if (!onLaunch.observed && !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 <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n @if (optionTemplate && 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\" class=\"option-trigger\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n @if (multiple) {\n <mat-chip>\n @if(optionIcon || matIconKey || svgIconKey || option.icon) {\n <span matChipAvatar>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n </span>\n }\n <ng-template [ngTemplateOutlet]=\"optionTextTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n </mat-chip>\n } @else {\n <ng-template [ngTemplateOutlet]=\"optionIconChipAvatarTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"optionTextTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n }\n\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\n <!-- #region Text -->\n <span layout=\"column\" layout-align=\"start center\" class=\"option-text\" [ngClass]=\"{'option-has-hint':option.hint?.length>0}\">\n @if (!optionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: option[optionTextProperty] }\"></ng-template>\n }\n @if (optionTemplate && optionTemplate.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n }\n <!-- #endregion -->\n <span class=\"mat-caption text-secondary option-hint\" [matTooltip]=\"option.hint\">{{option.hint}}</span>\n </span>\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 @if(!this.multiple) {\n @if(optionIcon || matIconKey || svgIconKey || option.icon) {\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n }\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: currentValue[optionTextProperty] }\"></ng-template>\n }\n\n @else if(currentValue[i]){\n <mat-chip>\n @if(optionIcon || matIconKey || svgIconKey || option.icon) {\n <span matChipAvatar>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue[i] }\"></ng-template>\n </span>\n }\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: currentValue[i][optionTextProperty] }\"></ng-template>\n </mat-chip>\n }\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </span>\n }\n @if (triggerTemplate && triggerTemplate.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"triggerTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: currentValue }\"></ng-template>\n </span>\n }\n @if (optionTemplate && optionTemplate.templateRef && !triggerTemplate?.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: currentValue, text: currentValue[optionTextProperty] }\"></ng-template>\n </span>\n }\n </div>\n @if (onLaunch.observed) {\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-multiple .mat-mdc-form-field-infix{padding-top:8px!important;padding-bottom:8px!important}.mat-mdc-select mat-select-trigger .option-text,.mat-mdc-select .mat-mdc-option .option-text{display:contents!important}.mat-mdc-select mat-select-trigger .option-text.option-has-hint,.mat-mdc-select .mat-mdc-option .option-text.option-has-hint{line-height:.92em}.mat-mdc-select mat-select-trigger .option-text .option-hint,.mat-mdc-select .mat-mdc-option .option-text .option-hint{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}.mat-mdc-select:not(.mat-mdc-select-multiple) mat-select-trigger .option-text,.mat-mdc-select:not(.mat-mdc-select-multiple) .mat-mdc-option .option-text{width:calc(100% - 36px)}.mat-mdc-select:not(.mat-mdc-select-multiple) mat-select-trigger .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "component", type: i5.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: "directive", type: i5.MatChipAvatar, selector: "mat-chip-avatar, [matChipAvatar]" }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { 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"] }] });
|
|
16134
16527
|
}
|
|
16135
16528
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: VdSelectComponent, decorators: [{
|
|
16136
16529
|
type: Component,
|
|
@@ -16140,6 +16533,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
16140
16533
|
MatInputModule,
|
|
16141
16534
|
MatIconModule,
|
|
16142
16535
|
MatChipsModule,
|
|
16536
|
+
MatTooltip,
|
|
16143
16537
|
FormsModule
|
|
16144
16538
|
], providers: [
|
|
16145
16539
|
{ provide: MatFormFieldControl, useExisting: VdSelectComponent },
|
|
@@ -16147,7 +16541,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
16147
16541
|
provide: MAT_SELECT_CONFIG,
|
|
16148
16542
|
useValue: { overlayPanelClass: 'vd-select-filter-overlay' }
|
|
16149
16543
|
}
|
|
16150
|
-
], 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"] }]
|
|
16544
|
+
], 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 Selection template -->\n <ng-template #selectionTemplate let-label=\"label\">\n <span i18n=\"@@selection\">{ label, select, option {option} other { {{ label }} } }</span>\n </ng-template>\n <!-- #endregion -->\n\n <!-- #region Option template -->\n <ng-template #optionTextTemplate let-option=\"option\">\n <span layout=\"column\" class=\"option-text\" [ngClass]=\"{'option-has-hint': option.hint?.length > 0}\">\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: option[optionTextProperty] }\"></ng-template>\n <span class=\"mat-caption text-secondary option-hint\" [matTooltip]=\"option.hint\">{{option.hint}}</span>\n </span>\n </ng-template>\n <!-- #endregion -->\n\n <!-- #region Option icon template -->\n <ng-template #optionIconTemplate let-option=\"option\" let-isAvatar=\"isAvatar\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [class.mat-mdc-chip-avatar]=\"isAvatar\" [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n }\n @if (svgIconKey && !matIconKey) {\n <mat-icon [class.mat-mdc-chip-avatar]=\"isAvatar\" [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 [class.mat-mdc-chip-avatar]=\"isAvatar\" [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 [class.mat-mdc-chip-avatar]=\"isAvatar\" [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 [class.mat-mdc-chip-avatar]=\"isAvatar\" [svgIcon]=\"optionIcon.svgIcon\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n @if (optionIcon.matIcon) {\n <mat-icon [class.mat-mdc-chip-avatar]=\"isAvatar\" [fontSet]=\"optionIcon.fontSet || 'material-symbols-outlined'\">{{optionIcon.matIcon}}</mat-icon>\n }\n </ng-template>\n }\n <!-- #endregion -->\n </ng-template>\n <!-- #endregion -->\n\n <!-- #region Option icon template -->\n <ng-template #optionIconChipAvatarTemplate let-option=\"option\">\n <!-- #region Property icon -->\n <span class=\"option-icon\" matChipAvatar>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n </span>\n <!-- #endregion -->\n </ng-template>\n <!-- #endregion -->\n\n <!-- #region Trigger for launch button -->\n @if (onLaunch.observed) {\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 <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: option[optionTextProperty] }\"></ng-template>\n\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.observed && triggerTemplate && triggerTemplate.templateRef) {\n <mat-select-trigger [class]=\"triggerCssClass\">\n <ng-template [ngTemplateOutlet]=\"triggerTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: selectedOptions }\"></ng-template>\n </mat-select-trigger>\n }\n <!-- #endregion -->\n\n <!-- #region Option template as trigger -->\n @if (!onLaunch.observed && !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 <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n @if (optionTemplate && 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\" class=\"option-trigger\">\n @for (option of selectedOptions; track option; let i = $index; let last = $last) {\n @if (multiple) {\n <mat-chip>\n @if(optionIcon || matIconKey || svgIconKey || option.icon) {\n <span matChipAvatar>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n </span>\n }\n <ng-template [ngTemplateOutlet]=\"optionTextTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n </mat-chip>\n } @else {\n <ng-template [ngTemplateOutlet]=\"optionIconChipAvatarTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"optionTextTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n }\n\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\n <!-- #region Text -->\n <span layout=\"column\" layout-align=\"start center\" class=\"option-text\" [ngClass]=\"{'option-has-hint':option.hint?.length>0}\">\n @if (!optionTemplate?.templateRef) {\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: option[optionTextProperty] }\"></ng-template>\n }\n @if (optionTemplate && optionTemplate.templateRef) {\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n }\n <!-- #endregion -->\n <span class=\"mat-caption text-secondary option-hint\" [matTooltip]=\"option.hint\">{{option.hint}}</span>\n </span>\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 @if(!this.multiple) {\n @if(optionIcon || matIconKey || svgIconKey || option.icon) {\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n }\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: currentValue[optionTextProperty] }\"></ng-template>\n }\n\n @else if(currentValue[i]){\n <mat-chip>\n @if(optionIcon || matIconKey || svgIconKey || option.icon) {\n <span matChipAvatar>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue[i] }\"></ng-template>\n </span>\n }\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: currentValue[i][optionTextProperty] }\"></ng-template>\n </mat-chip>\n }\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </span>\n }\n @if (triggerTemplate && triggerTemplate.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"triggerTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: currentValue }\"></ng-template>\n </span>\n }\n @if (optionTemplate && optionTemplate.templateRef && !triggerTemplate?.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: currentValue, text: currentValue[optionTextProperty] }\"></ng-template>\n </span>\n }\n </div>\n @if (onLaunch.observed) {\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-multiple .mat-mdc-form-field-infix{padding-top:8px!important;padding-bottom:8px!important}.mat-mdc-select mat-select-trigger .option-text,.mat-mdc-select .mat-mdc-option .option-text{display:contents!important}.mat-mdc-select mat-select-trigger .option-text.option-has-hint,.mat-mdc-select .mat-mdc-option .option-text.option-has-hint{line-height:.92em}.mat-mdc-select mat-select-trigger .option-text .option-hint,.mat-mdc-select .mat-mdc-option .option-text .option-hint{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}.mat-mdc-select:not(.mat-mdc-select-multiple) mat-select-trigger .option-text,.mat-mdc-select:not(.mat-mdc-select-multiple) .mat-mdc-option .option-text{width:calc(100% - 36px)}.mat-mdc-select:not(.mat-mdc-select-multiple) mat-select-trigger .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}\n"] }]
|
|
16151
16545
|
}], ctorParameters: () => [], propDecorators: { optionTemplate: [{
|
|
16152
16546
|
type: ContentChild,
|
|
16153
16547
|
args: [VdSelectOptionDirective]
|
|
@@ -16162,8 +16556,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
16162
16556
|
args: ['filterInput', { static: false }]
|
|
16163
16557
|
}], triggerCssClass: [{
|
|
16164
16558
|
type: Input
|
|
16165
|
-
}], triggerMode: [{
|
|
16166
|
-
type: Input
|
|
16167
16559
|
}] } });
|
|
16168
16560
|
|
|
16169
16561
|
/**
|
|
@@ -16377,7 +16769,7 @@ class TableDataSource extends DataSource {
|
|
|
16377
16769
|
this.onSortChange.subscribe(() => { this.paginator.pageIndex = 0; });
|
|
16378
16770
|
}
|
|
16379
16771
|
return merge$1(...displayDataChanges)
|
|
16380
|
-
.pipe(skip(1), switchMap(() => {
|
|
16772
|
+
.pipe(skip(1), switchMap$1(() => {
|
|
16381
16773
|
/* Flip flag to show that loading has begun */
|
|
16382
16774
|
this.isLoading = true;
|
|
16383
16775
|
/* Remove empty filters */
|
|
@@ -17014,25 +17406,28 @@ class FilterInputComponent {
|
|
|
17014
17406
|
* @param event
|
|
17015
17407
|
*/
|
|
17016
17408
|
onKeyDown(event) {
|
|
17017
|
-
let e = event;
|
|
17018
17409
|
if (this.onlyNumber) {
|
|
17019
|
-
|
|
17020
|
-
|
|
17021
|
-
|
|
17022
|
-
|
|
17023
|
-
(e.keyCode === 67 && (e.ctrlKey || e.metaKey)) ||
|
|
17024
|
-
/* Allow: Ctrl+V */
|
|
17025
|
-
(e.keyCode === 86 && (e.ctrlKey || e.metaKey)) ||
|
|
17026
|
-
/* Allow: Ctrl+X */
|
|
17027
|
-
(e.keyCode === 88 && (e.ctrlKey || e.metaKey)) ||
|
|
17028
|
-
/* Allow: home, end, left, right */
|
|
17029
|
-
(e.keyCode >= 35 && e.keyCode <= 39)) {
|
|
17030
|
-
/* let it happen, don't do anything */
|
|
17410
|
+
/* Allow navigation keys and control keys */
|
|
17411
|
+
const allowedKeys = ['Backspace', 'Delete', 'Tab', 'Escape', 'Enter', 'ArrowLeft', 'ArrowRight', 'Home', 'End'];
|
|
17412
|
+
/* Allow Ctrl+A, Ctrl+C, Ctrl+V, Ctrl+X */
|
|
17413
|
+
if ((event.ctrlKey || event.metaKey) && ['a', 'c', 'v', 'x'].includes(event.key.toLowerCase())) {
|
|
17031
17414
|
return;
|
|
17032
17415
|
}
|
|
17033
|
-
/*
|
|
17034
|
-
if ((
|
|
17035
|
-
|
|
17416
|
+
/* Allow Ctrl+Z, Ctrl+Y */
|
|
17417
|
+
if ((event.ctrlKey || event.metaKey) && ['z', 'y'].includes(event.key.toLowerCase())) {
|
|
17418
|
+
return;
|
|
17419
|
+
}
|
|
17420
|
+
/* Allow control keys */
|
|
17421
|
+
if (event.ctrlKey || event.metaKey) {
|
|
17422
|
+
return;
|
|
17423
|
+
}
|
|
17424
|
+
/* Allow navigation keys */
|
|
17425
|
+
if (allowedKeys.includes(event.key)) {
|
|
17426
|
+
return;
|
|
17427
|
+
}
|
|
17428
|
+
/* Block non-numeric characters */
|
|
17429
|
+
if (event.key < '0' || event.key > '9') {
|
|
17430
|
+
event.preventDefault();
|
|
17036
17431
|
}
|
|
17037
17432
|
}
|
|
17038
17433
|
}
|
|
@@ -18134,9 +18529,9 @@ class VdDynamicTableComponent {
|
|
|
18134
18529
|
this.changeDetector.detectChanges();
|
|
18135
18530
|
}
|
|
18136
18531
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: VdDynamicTableComponent, deps: [{ token: DynamicBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
18137
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: VdDynamicTableComponent, isStandalone: true, selector: "vd-dynamic-table", inputs: { dataSource: "dataSource", data: "data", parentControl: "parentControl", entityObject: "entityObject", formArray: "formArray", debugValue: "debugValue", classType: "classType", context: "context", dataSourceFilter: "dataSourceFilter", static: "static", filterable: "filterable", sticky: "sticky", tableWidth: "tableWidth", useFilterOperator: "useFilterOperator", paginable: "paginable", selectable: "selectable", sortActive: "sortActive", sortDirection: "sortDirection", stickyHeader: "stickyHeader", stickyFilter: "stickyFilter", columnSets: "columnSets", rowNgClass: "rowNgClass", detailsTemplate: "detailsTemplate", readonly: "readonly", selectAllFilter: "selectAllFilter", paginatorRef: "paginatorRef", columns: "columns", rowMenuItems: "rowMenuItems", rowAction: "rowAction", excludedColumns: "excludedColumns", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions" }, outputs: { rowClick: "rowClick" }, queries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }, { propertyName: "matSort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, static: true }, { propertyName: "detailsTemplateRef", predicate: ["detailsTemplate"], descendants: true, read: ViewContainerRef }, { propertyName: "rowContextMenuTriggers", predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "@if (!static) {\n <div class=\"loading-progress\">\n @if (dataSource?.isLoading) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </div>\n}\n\n<!-- #region Data table -->\n<div class=\"mat-table-container scrollbar-secondary\" [ngClass]=\"{'mat-table-sticky': sticky}\" #scrollContainer>\n <table mat-table #table [dataSource]=\"dataSource\" [dataSourceFilter]=\"dataSourceFilter\" [ngClass]=\"{'table-fixed': !sticky && !detailsTemplate && !templateRef, 'table-stick': sticky}\" [trackBy]=\"trackBy\" matSort matSortDisableClear [matSortActive]=\"sortActive||'id'\" [matSortDirection]=\"sortDirection\" multiTemplateDataRows>\n @for (column of columns$ | async; track columnsTrackBy($index, column)) {\n <!-- #region Column def -->\n <ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\n <ng-template #header [ngTemplateOutlet]=\"header\" let-headerText=\"headerText\" [ngTemplateOutletContext]=\"{headerText: column.header | func:context}\">\n <th mat-header-cell *cdkHeaderCellDef [mat-sort-header]=\"column.sortBy || column.name\" [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [disabled]=\"column.type == ColumnType.Checkbox || column.disabled\" [ngClass]=\"{'gt-xs': column.display == Grid.Xs, 'gt-sm': column.display == Grid.Sm, 'gt-md': column.display == Grid.Md, 'gt-lg': column.display == Grid.Lg, 'gt-xl': column.display == Grid.Xl, 'gt-xxl': column.display == Grid.Xxl, 'hidden': column.display == Grid.None}\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\n @if (column.type == ColumnType.Checkbox) {\n <mat-checkbox (change)=\"$event ? dataSource.toggleSelect($event, selectAllFilter) : null\" [disabled]=\"!dataSource.paginator?.length\" [checked]=\"dataSource.selectionModel.hasValue() && dataSource.isAllSelected()\" [indeterminate]=\"dataSource.selectionModel.hasValue() && !dataSource.isAllSelected()\"></mat-checkbox>\n }\n @if (column.type != ColumnType.Checkbox) {\n <span [matTooltip]=\"headerText\">{{headerText}}</span>\n }\n </th>\n </ng-template>\n <td mat-cell *cdkCellDef=\"let row; let rowIndex = dataIndex\" [matTooltip]=\"column.tooltip?column.tooltip(row, undefined, context):null\" [matTooltipClass]=\"column.tooltipClass??''\" [hidden]=\"column.hidden\" [ngClass]=\"getRowClasses(column, row)\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\">\n <ng-template #rowVal [ngTemplateOutlet]=\"rowVal\" let-rowValue [ngTemplateOutletContext]=\"{$implicit: column?.content && column?.content(row, undefined, context)}\">\n @switch (column.type) {\n <!-- #region Checkbox column -->\n @case (ColumnType.Checkbox) {\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? dataSource.selectionModel.toggle(row) : null\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" [checked]=\"dataSource.selectionModel.isSelected(row)\"></mat-checkbox>\n }\n <!-- #endregion -->\n <!-- #region Enum column -->\n @case (ColumnType.Enum) {\n <span>\n @if (column.enumMetadata) {\n @if (column.multiple) {\n @for (item of rowValue; track item; let i = $index) {\n @if (i < 2) {\n <ng-template let-displayValue=\"displayValue\" [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ displayValue: column.enumMetadata[item].display }\"></ng-template>\n }\n @if (i === 1 && rowValue?.length > 2) {\n <small [matTooltip]=\"(rowValue | slice:2 | map:column.enumMetadata | map:'display') | join:'\\n'\" matTooltipClass=\"mat-tooltip-multiline\">...</small>\n }\n }\n <ng-template #template let-displayValue=\"displayValue\">\n <mat-chip-row disableRipple=\"true\" selectable=\"false\" [matTooltip]=\"displayValue\">\n <span>{{ displayValue }}</span>\n </mat-chip-row>\n </ng-template>\n } @else {\n @if (rowValue >= 0) {\n <span class=\"na\" [ngStyle]=\"{ color: ((column.enumMetadata[rowValue] || {}).textColor || 'inherit') }\" [innerHtml]=\"(column.enumMetadata[rowValue]||{}).display\"></span>\n }\n }\n } @else {\n @if (column.multiple) {\n @for (item of rowValue; track item; let i = $index; let last = $last) {\n <div>\n @if (i<2) {\n <small i18n=\"@@selection\">{item | enum:column.enumType:column.enumPrefix, select, type {type} other {{{item | enum:column.enumType:column.enumPrefix}}}}</small>\n }\n @if (i==1 && rowValue?.length > 2) {\n <small>, ...</small>\n }\n </div>\n }\n } @else {\n @if (rowValue >= 0) {\n <span i18n=\"@@selection\">{rowValue | enum:column.enumType:column.enumPrefix, select, type {type} other {{{rowValue | enum:column.enumType:column.enumPrefix}}}}</span>\n }\n }\n }\n </span>\n }\n <!-- #endregion -->\n <!-- #region Toggle column -->\n @case (ColumnType.Toggle) {\n @if (!formArray) {\n <mat-slide-toggle [ngModel]=\"row | property:column.name\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);handleModelChange(column, row, undefined);\" (click)=\"$event.stopPropagation();\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" color=\"accent\"></mat-slide-toggle>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region Date column -->\n @case (ColumnType.Date) {\n <span>{{rowValue | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\n }\n <!-- #endregion -->\n <!-- #region Text Input column -->\n @case (ColumnType.TextInput) {\n @if (!formArray) {\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\n @if (!formArray) {\n <input matInput type=\"{{column.inputType}}\" autocomplete=\"none\" name=\"{{column.name}}{{rowIndex}}\" [ngModel]=\"row | property:column.name\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" [min]=\"column.inputMin?column.inputMin(row, undefined, context):null\" [max]=\"column.inputMax?column.inputMax(row, undefined, context):null\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);(column.change?column.change(row, undefined, context):patch(row, [column.name], $event, column.patchIncludes));\" [ngModelOptions]=\"{updateOn: 'blur'}\" (keydown.enter)=\"handleKeydownEnter($event)\">\n }\n </mat-form-field>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region VD-Select column -->\n @case (ColumnType.Select) {\n @if (!formArray) {\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\n @if (!formArray) {\n <vd-select name=\"{{column.name}}{{rowIndex}}\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column?.enumFilter | func:row:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [defaultOption]=\"column.defaultOption??true\" [ngModel]=\"row | property:column.name\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" (change)=\"column.change?column.change(row, undefined, context):patch(row, [column.name], $event.value, column.patchIncludes)\" (keydown.enter)=\"handleKeydownEnter($event)\"></vd-select>\n }\n </mat-form-field>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region Action -->\n @case (ColumnType.Action) {\n @if (column.menu) {\n @if (menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)) {\n <div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed;\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu!\"></div>\n }\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\n }\n }\n <!-- #endregion -->\n <!-- #region Menu -->\n @case (ColumnType.Menu) {\n @if (column.menu) {\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\"></vd-dynamic-menu>\n }\n }\n <!-- #endregion -->\n <!-- #region icon -->\n @case (ColumnType.Icon) {\n <span layout=\"row\" layout-align=\"start center\">\n @if (column.icon?.matIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\">{{handleExpression(column.icon?.matIcon!, row)}}</mat-icon>\n }\n @if (column.icon?.svgIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\" [svgIcon]=\"handleExpression(column.icon?.svgIcon!, row)!\"></mat-icon>\n }\n @if (column.icon?.fontIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\" [fontIcon]=\"handleExpression(column.icon?.fontIcon!, row)!\"></mat-icon>\n }\n </span>\n }\n <!-- #endregion -->\n <!-- #region icon button -->\n @case (ColumnType.IconButton) {\n <a mat-icon-button (click)=\"$event.stopPropagation();column.iconButton?.event?column.iconButton?.event(row, context):null\">\n <mat-icon fontSet=\"{{column.iconButton?.iconFontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.iconButton?.iconClass??'', row)\">{{handleExpression(column.iconButton?.icon??'radio_button_checked', row) || 'radio_button_checked'}}</mat-icon>\n </a>\n }\n <!-- #endregion -->\n <!-- #region Other column types -->\n @default {\n <span [innerHtml]=\"rowValue??''\"></span>\n }\n <!-- #endregion -->\n }\n <ng-template #recursiveContainer let-columnNameSegments=\"segments\" let-formGroup=\"formGroup\" let-parentFormGroup=\"parentFormGroup\">\n @if (formGroup) {\n <ng-container [formGroup]=\"formGroup\">\n <!-- If the columnNameSegments array is empty, we're at the leaf node -->\n @if (!columnNameSegments.length) {\n @switch (column.type) {\n <!-- #region Toggle column -->\n @case (ColumnType.Toggle) {\n <mat-slide-toggle [formControl]=\"formGroup\" (click)=\"$event.stopPropagation();\" (change)=\"column.change?column.change(parentFormGroup.value, parentFormGroup, context):handleModelChange(column, parentFormGroup.value, parentFormGroup)\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" color=\"accent\"></mat-slide-toggle>\n }\n <!-- #endregion -->\n <!-- #region Text Input column -->\n @case (ColumnType.TextInput) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\n <input matInput [formControl]=\"formGroup\" type=\"{{column.inputType}}\" autocomplete=\"none\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" [min]=\"column.inputMin?column.inputMin(parentFormGroup.value, parentFormGroup, context):null\" [max]=\"column.inputMax?column.inputMax(parentFormGroup.value, parentFormGroup, context):null\" (keydown.enter)=\"handleKeydownEnter($event)\">\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VD-Select column -->\n @case (ColumnType.Select) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\n <vd-select [formControl]=\"formGroup\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:parentFormGroup.value:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [defaultOption]=\"column.defaultOption??true\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" (selectionChange)=\"column.change?column.change(parentFormGroup.value, parentFormGroup, context):patch(parentFormGroup.value, [column.name], rowValue, column.patchIncludes)\" (keydown.enter)=\"handleKeydownEnter($event)\"></vd-select>\n </mat-form-field>\n }\n <!-- #endregion -->\n }\n } @else {\n <!-- If not the last segment, create a nested form group -->\n <ng-container [formGroupName]=\"columnNameSegments[0]\">\n <!-- Recursive call to handle nested segments -->\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: columnNameSegments.slice(1), parentFormGroup:formGroup, formGroup: formGroup.get(columnNameSegments[0])}\"></ng-container>\n </ng-container>\n }\n </ng-container>\n }\n </ng-template>\n </ng-template>\n </td>\n </ng-container>\n <!-- #endregion -->\n }\n\n <!-- #region Filter row -->\n @if (dataSource && filterable) {\n @for (column of columns$ | async; track column) {\n <ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\n <th mat-header-cell *cdkHeaderCellDef [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [ngClass]=\"{'gt-xs': column.display == Grid.Xs, 'gt-sm': column.display == Grid.Sm, 'gt-md': column.display == Grid.Md, 'gt-lg': column.display == Grid.Lg, 'gt-xl': column.display == Grid.Xl, 'gt-xxl': column.display == Grid.Xxl, 'hidden': column.display == Grid.None}\">\n <!-- #region Select filter -->\n @if(column.endpoint || column.enumType || column.options){\n <span filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:{}:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\n }\n <!-- #region Text filter -->\n @else if(column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number) {\n <span filter-input [onlyNumber]=\"column.filterInputNumber??false\" [operator]=\"!useFilterOperator ? undefined : column.filterOperator\"></span>\n }\n <!-- #endregion -->\n <!-- #region Date filter -->\n @else if (column.type == ColumnType.Date) {\n <span filter-date></span>\n }\n <!-- #endregion -->\n <!-- #region Action filter (clear) -->\n @else if (column.type == ColumnType.Action) {\n <span filter-clear></span>\n }\n <!-- #endregion -->\n </th>\n </ng-container>\n }\n }\n <!-- #endregion -->\n\n <!-- #region Details column -->\n <ng-container cdkColumnDef=\"expandedDetail\">\n <td mat-cell *matCellDef=\"let row; let index = index\" [attr.colspan]=\"(displayedColumns$ | async)?.length\">\n <div class=\"row-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\" #detailsTemplate>\n @if (templateRef && row === expandedRow) {\n <ng-container *ngTemplateOutlet=\"templateRef; context:{row: row, index: index, context: context}\"></ng-container>\n }\n </div>\n </td>\n </ng-container>\n <!-- #endregion -->\n\n <!-- #region Filter header -->\n @if (filterable) {\n <tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\n }\n <!-- #endregion -->\n\n <tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\n <tr mat-row *cdkRowDef=\"let row; columns: displayedColumns$ | async; let index = dataIndex\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\" [class.expanded-row]=\"expandedRow === row\" (click)=\"handleRowClick(index, row)\" (contextmenu)=\"handleRowRightClick($event, row)\"></tr>\n\n <!-- #region Detrails row -->\n @if (detailsTemplate || templateRef) {\n <tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\n }\n <!-- #endregion -->\n </table>\n\n <!-- #region Modern No Results Message -->\n @if (dataSource?.filteredData?.length <= 0 && dataSource?.total <= 0) {\n <div class=\"no-results-overlay\">\n <mat-icon class=\"no-results-icon\">search_off</mat-icon>\n <div class=\"no-results-text mat-body-1\">\n <h3 i18n=\"@@noResultsFound\">No results found</h3>\n <p i18n=\"@@tryAdjustFilters\">Try adjusting your filters or search criteria.</p>\n </div>\n </div>\n }\n <!-- #endregion -->\n</div>\n<!-- #endregion -->\n\n<!-- #region Debug value -->\n@if (debugValue) {\n <code>\n <pre>{{formValue | json}}</pre>\n </code>\n}\n<!-- #endregion -->\n\n<div class=\"table-footer\" layout=\"row\">\n <ng-content select=\"[table-footer]\"></ng-content>\n <span flex></span>\n @if (paginable) {\n <mat-paginator [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\n }\n</div>", styles: ["::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-form-field .mat-form-field-wrapper{width:100%}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip{height:24px;margin-top:2px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip .mdc-evolution-chip__action--primary{padding-left:9px;padding-right:9px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip:last-child{margin-bottom:2px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip *{font-size:.8rem}@media(max-width:389px){::ng-deep .mat-mdc-table [gt-xs],::ng-deep .mat-mdc-table .gt-xs{display:none}::ng-deep .mat-mdc-table [gt-sm],::ng-deep .mat-mdc-table .gt-sm{display:none}::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:599px){::ng-deep .mat-mdc-table [gt-sm],::ng-deep .mat-mdc-table .gt-sm{display:none}::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:959px){::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1279px){::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1919px){::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1979px){::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}.mat-table-container{width:100%;max-width:100%;overflow:auto}.mat-table-container .mat-mdc-header-cell,.mat-table-container .mat-mdc-footer-cell,.mat-table-container .mat-mdc-cell{min-width:80px;box-sizing:border-box}.mat-table-container .mat-mdc-header-row,.mat-table-container .mat-mdc-footer-row,.mat-table-container .mat-mdc-row{min-width:1920px}.mat-table-container.mat-table-sticky .mat-mdc-table-sticky-border-elem-right{box-shadow:-3px 0 5px #0000001a}.mat-table-container.mat-table-sticky .mat-mdc-table-sticky-border-elem-left{box-shadow:3px 0 5px #0000001a}\n"], dependencies: [{ kind: "ngmodule", type: CdkTableModule }, { kind: "directive", type: i2$2.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: i2$2.CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: i2$2.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: i2$2.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: i2$2.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { 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: "ngmodule", type: MatChipsModule }, { 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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "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: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i10.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i3.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1$5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1$5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { 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: MatSlideToggleModule }, { kind: "component", type: i16.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "directive", type:
|
|
18532
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: VdDynamicTableComponent, isStandalone: true, selector: "vd-dynamic-table", inputs: { dataSource: "dataSource", data: "data", parentControl: "parentControl", entityObject: "entityObject", formArray: "formArray", debugValue: "debugValue", classType: "classType", context: "context", dataSourceFilter: "dataSourceFilter", static: "static", filterable: "filterable", sticky: "sticky", tableWidth: "tableWidth", useFilterOperator: "useFilterOperator", paginable: "paginable", selectable: "selectable", sortActive: "sortActive", sortDirection: "sortDirection", stickyHeader: "stickyHeader", stickyFilter: "stickyFilter", columnSets: "columnSets", rowNgClass: "rowNgClass", detailsTemplate: "detailsTemplate", readonly: "readonly", selectAllFilter: "selectAllFilter", paginatorRef: "paginatorRef", columns: "columns", rowMenuItems: "rowMenuItems", rowAction: "rowAction", excludedColumns: "excludedColumns", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions" }, outputs: { rowClick: "rowClick" }, queries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }, { propertyName: "matSort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, static: true }, { propertyName: "detailsTemplateRef", predicate: ["detailsTemplate"], descendants: true, read: ViewContainerRef }, { propertyName: "rowContextMenuTriggers", predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "@if (!static) {\n <div class=\"loading-progress\">\n @if (dataSource?.isLoading) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </div>\n}\n\n<!-- #region Data table -->\n<div class=\"mat-table-container scrollbar-secondary\" [ngClass]=\"{'mat-table-sticky': sticky}\" #scrollContainer>\n <table mat-table #table [dataSource]=\"dataSource\" [dataSourceFilter]=\"dataSourceFilter\" [ngClass]=\"{'table-fixed': !sticky && !detailsTemplate && !templateRef, 'table-stick': sticky}\" [trackBy]=\"trackBy\" matSort matSortDisableClear [matSortActive]=\"sortActive||'id'\" [matSortDirection]=\"sortDirection\" multiTemplateDataRows>\n @for (column of columns$ | async; track columnsTrackBy($index, column)) {\n <!-- #region Column def -->\n <ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\n <ng-template #header [ngTemplateOutlet]=\"header\" let-headerText=\"headerText\" [ngTemplateOutletContext]=\"{headerText: column.header | func:context}\">\n <th mat-header-cell *cdkHeaderCellDef [mat-sort-header]=\"column.sortBy || column.name\" [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [disabled]=\"column.type == ColumnType.Checkbox || column.disabled\" [ngClass]=\"{'gt-xs': column.display == Grid.Xs, 'gt-sm': column.display == Grid.Sm, 'gt-md': column.display == Grid.Md, 'gt-lg': column.display == Grid.Lg, 'gt-xl': column.display == Grid.Xl, 'gt-xxl': column.display == Grid.Xxl, 'hidden': column.display == Grid.None}\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\n @if (column.type == ColumnType.Checkbox) {\n <mat-checkbox (change)=\"$event ? dataSource.toggleSelect($event, selectAllFilter) : null\" [disabled]=\"!dataSource.paginator?.length\" [checked]=\"dataSource.selectionModel.hasValue() && dataSource.isAllSelected()\" [indeterminate]=\"dataSource.selectionModel.hasValue() && !dataSource.isAllSelected()\"></mat-checkbox>\n }\n @if (column.type != ColumnType.Checkbox) {\n <span [matTooltip]=\"headerText\">{{headerText}}</span>\n }\n </th>\n </ng-template>\n <td mat-cell *cdkCellDef=\"let row; let rowIndex = dataIndex\" [matTooltip]=\"column.tooltip?column.tooltip(row, undefined, context):null\" [matTooltipClass]=\"column.tooltipClass??''\" [hidden]=\"column.hidden\" [ngClass]=\"getRowClasses(column, row)\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\">\n <ng-template #rowVal [ngTemplateOutlet]=\"rowVal\" let-rowValue [ngTemplateOutletContext]=\"{$implicit: column?.content && column?.content(row, undefined, context)}\">\n @switch (column.type) {\n <!-- #region Checkbox column -->\n @case (ColumnType.Checkbox) {\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? dataSource.selectionModel.toggle(row) : null\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" [checked]=\"dataSource.selectionModel.isSelected(row)\"></mat-checkbox>\n }\n <!-- #endregion -->\n <!-- #region Enum column -->\n @case (ColumnType.Enum) {\n <span>\n @if (column.enumMetadata) {\n @if (column.multiple) {\n @for (item of rowValue; track item; let i = $index) {\n @if (i < 2) {\n <ng-template let-displayValue=\"displayValue\" [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ displayValue: column.enumMetadata[item].display }\"></ng-template>\n }\n @if (i === 1 && rowValue?.length > 2) {\n <small [matTooltip]=\"(rowValue | slice:2 | map:column.enumMetadata | map:'display') | join:'\\n'\" matTooltipClass=\"mat-tooltip-multiline\">...</small>\n }\n }\n <ng-template #template let-displayValue=\"displayValue\">\n <mat-chip-row disableRipple=\"true\" selectable=\"false\" [matTooltip]=\"displayValue\">\n <span>{{ displayValue }}</span>\n </mat-chip-row>\n </ng-template>\n } @else {\n @if (rowValue >= 0) {\n <span class=\"na\" [ngStyle]=\"{ color: ((column.enumMetadata[rowValue] || {}).textColor || 'inherit') }\" [innerHtml]=\"(column.enumMetadata[rowValue]||{}).display\"></span>\n }\n }\n } @else {\n @if (column.multiple) {\n @for (item of rowValue; track item; let i = $index; let last = $last) {\n <div>\n @if (i<2) {\n <small i18n=\"@@selection\">{item | enum:column.enumType:column.enumPrefix, select, type {type} other {{{item | enum:column.enumType:column.enumPrefix}}}}</small>\n }\n @if (i==1 && rowValue?.length > 2) {\n <small>, ...</small>\n }\n </div>\n }\n } @else {\n @if (rowValue >= 0) {\n <span i18n=\"@@selection\">{rowValue | enum:column.enumType:column.enumPrefix, select, type {type} other {{{rowValue | enum:column.enumType:column.enumPrefix}}}}</span>\n }\n }\n }\n </span>\n }\n <!-- #endregion -->\n <!-- #region Toggle column -->\n @case (ColumnType.Toggle) {\n @if (!formArray) {\n <mat-slide-toggle [ngModel]=\"row | property:column.name\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);handleModelChange(column, row, undefined);\" (click)=\"$event.stopPropagation();\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" color=\"accent\"></mat-slide-toggle>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region Date column -->\n @case (ColumnType.Date) {\n <span>{{rowValue | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\n }\n <!-- #endregion -->\n <!-- #region Text Input column -->\n @case (ColumnType.TextInput) {\n @if (!formArray) {\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\n @if (!formArray) {\n <input matInput type=\"{{column.inputType}}\" autocomplete=\"none\" name=\"{{column.name}}{{rowIndex}}\" [ngModel]=\"row | property:column.name\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" [min]=\"column.inputMin?column.inputMin(row, undefined, context):null\" [max]=\"column.inputMax?column.inputMax(row, undefined, context):null\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);(column.change?column.change(row, undefined, context):patch(row, [column.name], $event, column.patchIncludes));\" [ngModelOptions]=\"{updateOn: 'blur'}\" (keydown.enter)=\"handleKeydownEnter($event)\">\n }\n </mat-form-field>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region VD-Select column -->\n @case (ColumnType.Select) {\n @if (!formArray) {\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\n @if (!formArray) {\n <vd-select name=\"{{column.name}}{{rowIndex}}\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column?.enumFilter | func:row:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [defaultOption]=\"column.defaultOption??true\" [ngModel]=\"row | property:column.name\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" (change)=\"column.change?column.change(row, undefined, context):patch(row, [column.name], $event.value, column.patchIncludes)\" (keydown.enter)=\"handleKeydownEnter($event)\"></vd-select>\n }\n </mat-form-field>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region Action -->\n @case (ColumnType.Action) {\n @if (column.menu) {\n @if (menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)) {\n <div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed;\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu!\"></div>\n }\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\n }\n }\n <!-- #endregion -->\n <!-- #region Menu -->\n @case (ColumnType.Menu) {\n @if (column.menu) {\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\"></vd-dynamic-menu>\n }\n }\n <!-- #endregion -->\n <!-- #region icon -->\n @case (ColumnType.Icon) {\n <span layout=\"row\" layout-align=\"start center\">\n @if (column.icon?.matIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\">{{handleExpression(column.icon?.matIcon!, row)}}</mat-icon>\n }\n @if (column.icon?.svgIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\" [svgIcon]=\"handleExpression(column.icon?.svgIcon!, row)!\"></mat-icon>\n }\n @if (column.icon?.fontIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\" [fontIcon]=\"handleExpression(column.icon?.fontIcon!, row)!\"></mat-icon>\n }\n </span>\n }\n <!-- #endregion -->\n <!-- #region icon button -->\n @case (ColumnType.IconButton) {\n <a mat-icon-button (click)=\"$event.stopPropagation();column.iconButton?.event?column.iconButton?.event(row, context):null\">\n <mat-icon fontSet=\"{{column.iconButton?.iconFontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.iconButton?.iconClass??'', row)\">{{handleExpression(column.iconButton?.icon??'radio_button_checked', row) || 'radio_button_checked'}}</mat-icon>\n </a>\n }\n <!-- #endregion -->\n <!-- #region Other column types -->\n @default {\n <span [innerHtml]=\"rowValue??''\"></span>\n }\n <!-- #endregion -->\n }\n <ng-template #recursiveContainer let-columnNameSegments=\"segments\" let-formGroup=\"formGroup\" let-parentFormGroup=\"parentFormGroup\">\n @if (formGroup) {\n <ng-container [formGroup]=\"formGroup\">\n <!-- If the columnNameSegments array is empty, we're at the leaf node -->\n @if (!columnNameSegments.length) {\n @switch (column.type) {\n <!-- #region Toggle column -->\n @case (ColumnType.Toggle) {\n <mat-slide-toggle [formControl]=\"formGroup\" (click)=\"$event.stopPropagation();\" (change)=\"column.change?column.change(parentFormGroup.value, parentFormGroup, context):handleModelChange(column, parentFormGroup.value, parentFormGroup)\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" color=\"accent\"></mat-slide-toggle>\n }\n <!-- #endregion -->\n <!-- #region Text Input column -->\n @case (ColumnType.TextInput) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\n <input matInput [formControl]=\"formGroup\" type=\"{{column.inputType}}\" autocomplete=\"none\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" [min]=\"column.inputMin?column.inputMin(parentFormGroup.value, parentFormGroup, context):null\" [max]=\"column.inputMax?column.inputMax(parentFormGroup.value, parentFormGroup, context):null\" (keydown.enter)=\"handleKeydownEnter($event)\">\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VD-Select column -->\n @case (ColumnType.Select) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\n <vd-select [formControl]=\"formGroup\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:parentFormGroup.value:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [defaultOption]=\"column.defaultOption??true\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" (selectionChange)=\"column.change?column.change(parentFormGroup.value, parentFormGroup, context):patch(parentFormGroup.value, [column.name], rowValue, column.patchIncludes)\" (keydown.enter)=\"handleKeydownEnter($event)\"></vd-select>\n </mat-form-field>\n }\n <!-- #endregion -->\n }\n } @else {\n <!-- If not the last segment, create a nested form group -->\n <ng-container [formGroupName]=\"columnNameSegments[0]\">\n <!-- Recursive call to handle nested segments -->\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: columnNameSegments.slice(1), parentFormGroup:formGroup, formGroup: formGroup.get(columnNameSegments[0])}\"></ng-container>\n </ng-container>\n }\n </ng-container>\n }\n </ng-template>\n </ng-template>\n </td>\n </ng-container>\n <!-- #endregion -->\n }\n\n <!-- #region Filter row -->\n @if (dataSource && filterable) {\n @for (column of columns$ | async; track column) {\n <ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\n <th mat-header-cell *cdkHeaderCellDef [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [ngClass]=\"{'gt-xs': column.display == Grid.Xs, 'gt-sm': column.display == Grid.Sm, 'gt-md': column.display == Grid.Md, 'gt-lg': column.display == Grid.Lg, 'gt-xl': column.display == Grid.Xl, 'gt-xxl': column.display == Grid.Xxl, 'hidden': column.display == Grid.None}\">\n <!-- #region Select filter -->\n @if(column.endpoint || column.enumType || column.options){\n <span filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:{}:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\n }\n <!-- #region Text filter -->\n @else if(column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number) {\n <span filter-input [onlyNumber]=\"column.filterInputNumber??false\" [matTooltip]=\"column.filterTooltip ? column.filterTooltip(context):null\" [matTooltipClass]=\"column.filterTooltipClass??''\" [operator]=\"!useFilterOperator ? undefined : column.filterOperator\"></span>\n }\n <!-- #endregion -->\n <!-- #region Date filter -->\n @else if (column.type == ColumnType.Date) {\n <span filter-date></span>\n }\n <!-- #endregion -->\n <!-- #region Action filter (clear) -->\n @else if (column.type == ColumnType.Action) {\n <span filter-clear></span>\n }\n <!-- #endregion -->\n </th>\n </ng-container>\n }\n }\n <!-- #endregion -->\n\n <!-- #region Details column -->\n <ng-container cdkColumnDef=\"expandedDetail\">\n <td mat-cell *matCellDef=\"let row; let index = index\" [attr.colspan]=\"(displayedColumns$ | async)?.length\">\n <div class=\"row-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\" #detailsTemplate>\n @if (templateRef && row === expandedRow) {\n <ng-container *ngTemplateOutlet=\"templateRef; context:{row: row, index: index, context: context}\"></ng-container>\n }\n </div>\n </td>\n </ng-container>\n <!-- #endregion -->\n\n <!-- #region Filter header -->\n @if (filterable) {\n <tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\n }\n <!-- #endregion -->\n\n <tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\n <tr mat-row *cdkRowDef=\"let row; columns: displayedColumns$ | async; let index = dataIndex\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\" [class.expanded-row]=\"expandedRow === row\" (click)=\"handleRowClick(index, row)\" (contextmenu)=\"handleRowRightClick($event, row)\"></tr>\n\n <!-- #region Detrails row -->\n @if (detailsTemplate || templateRef) {\n <tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\n }\n <!-- #endregion -->\n </table>\n\n <!-- #region Modern No Results Message -->\n @if (dataSource?.filteredData?.length <= 0 && dataSource?.total <= 0) {\n <div class=\"no-results-overlay\">\n <mat-icon class=\"no-results-icon\">search_off</mat-icon>\n <div class=\"no-results-text mat-body-1\">\n <h3 i18n=\"@@noResultsFound\">No results found</h3>\n <p i18n=\"@@tryAdjustFilters\">Try adjusting your filters or search criteria.</p>\n </div>\n </div>\n }\n <!-- #endregion -->\n</div>\n<!-- #endregion -->\n\n<!-- #region Debug value -->\n@if (debugValue) {\n <code>\n <pre>{{formValue | json}}</pre>\n </code>\n}\n<!-- #endregion -->\n\n<div class=\"table-footer\" layout=\"row\">\n <ng-content select=\"[table-footer]\"></ng-content>\n <span flex></span>\n @if (paginable) {\n <mat-paginator [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\n }\n</div>", styles: ["::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-form-field .mat-form-field-wrapper{width:100%}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip{height:24px;margin-top:2px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip .mdc-evolution-chip__action--primary{padding-left:9px;padding-right:9px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip:last-child{margin-bottom:2px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip *{font-size:.8rem}@media(max-width:389px){::ng-deep .mat-mdc-table [gt-xs],::ng-deep .mat-mdc-table .gt-xs{display:none}::ng-deep .mat-mdc-table [gt-sm],::ng-deep .mat-mdc-table .gt-sm{display:none}::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:599px){::ng-deep .mat-mdc-table [gt-sm],::ng-deep .mat-mdc-table .gt-sm{display:none}::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:959px){::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1279px){::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1919px){::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1979px){::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}.mat-table-container{width:100%;max-width:100%;overflow:auto}.mat-table-container .mat-mdc-header-cell,.mat-table-container .mat-mdc-footer-cell,.mat-table-container .mat-mdc-cell{min-width:80px;box-sizing:border-box}.mat-table-container .mat-mdc-header-row,.mat-table-container .mat-mdc-footer-row,.mat-table-container .mat-mdc-row{min-width:1920px}.mat-table-container.mat-table-sticky .mat-mdc-table-sticky-border-elem-right{box-shadow:-3px 0 5px #0000001a}.mat-table-container.mat-table-sticky .mat-mdc-table-sticky-border-elem-left{box-shadow:3px 0 5px #0000001a}\n"], dependencies: [{ kind: "ngmodule", type: CdkTableModule }, { kind: "directive", type: i2$2.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: i2$2.CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: i2$2.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: i2$2.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: i2$2.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5$1.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: "ngmodule", type: MatChipsModule }, { kind: "component", type: i5.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "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: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i10.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i3.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1$5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1$5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { 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: MatSlideToggleModule }, { kind: "component", type: i16.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "directive", type:
|
|
18138
18533
|
//----------------------
|
|
18139
|
-
DataSourceFilterDirective, selector: "[dataSourceFilter]", inputs: ["dataSource", "dataSourceFilter"] }, { kind: "directive", type: DisableControlDirective, selector: "[disableControl]", inputs: ["disableControl"] }, { kind: "component", type: FilterDateComponent, selector: "mat-header-cell[filter-date], [mat-header-cell][filter-date], [filter-date]", inputs: ["field", "debounce", "placeholder"] }, { kind: "component", type: FilterInputComponent, selector: "mat-header-cell[filter-input], [mat-header-cell][filter-input], [filter-input]", inputs: ["field", "operator", "onlyNumber", "debounce", "placeholder"] }, { kind: "component", type: FilterSelectComponent, selector: "mat-header-cell[filter-select], [mat-header-cell][filter-select], [filter-select]", inputs: ["endpoint", "params", "projection", "sortBy", "sorted", "enumFilter", "enum", "enumMetadata", "key", "text", "prefix", "multiple", "options", "filteredOptions", "filterable", "field", "placeholder", "cache"] }, { kind: "component", type: FilterClearComponent, selector: "mat-header-cell[filter-clear], [mat-header-cell][filter-clear], [filter-clear]" }, { kind: "component", type: VdDynamicMenuComponent, selector: "vd-dynamic-menu", inputs: ["items", "data", "index", "context", "contextMenu"] }, { kind: "component", type: VdSelectComponent, selector: "vd-select", inputs: ["triggerCssClass"
|
|
18534
|
+
DataSourceFilterDirective, selector: "[dataSourceFilter]", inputs: ["dataSource", "dataSourceFilter"] }, { kind: "directive", type: DisableControlDirective, selector: "[disableControl]", inputs: ["disableControl"] }, { kind: "component", type: FilterDateComponent, selector: "mat-header-cell[filter-date], [mat-header-cell][filter-date], [filter-date]", inputs: ["field", "debounce", "placeholder"] }, { kind: "component", type: FilterInputComponent, selector: "mat-header-cell[filter-input], [mat-header-cell][filter-input], [filter-input]", inputs: ["field", "operator", "onlyNumber", "debounce", "placeholder"] }, { kind: "component", type: FilterSelectComponent, selector: "mat-header-cell[filter-select], [mat-header-cell][filter-select], [filter-select]", inputs: ["endpoint", "params", "projection", "sortBy", "sorted", "enumFilter", "enum", "enumMetadata", "key", "text", "prefix", "multiple", "options", "filteredOptions", "filterable", "field", "placeholder", "cache"] }, { kind: "component", type: FilterClearComponent, selector: "mat-header-cell[filter-clear], [mat-header-cell][filter-clear], [filter-clear]" }, { kind: "component", type: VdDynamicMenuComponent, selector: "vd-dynamic-menu", inputs: ["items", "data", "index", "context", "contextMenu"] }, { kind: "component", type: VdSelectComponent, selector: "vd-select", inputs: ["triggerCssClass"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.JsonPipe, name: "json" }, { kind: "pipe", type: i3$1.SlicePipe, name: "slice" }, { kind: "pipe", type: i3$1.DatePipe, name: "date" }, { kind: "pipe", type:
|
|
18140
18535
|
//----------------------
|
|
18141
18536
|
MapPipe, name: "map" }, { kind: "pipe", type: EnumPipe, name: "enum" }, { kind: "pipe", type: FormGroupPipe, name: "formGroup" }, { kind: "pipe", type: FuncPipe, name: "func" }, { kind: "pipe", type: JoinPipe, name: "join" }, { kind: "pipe", type: PropertyPipe, name: "property" }], animations: [
|
|
18142
18537
|
trigger('detailExpand', [
|
|
@@ -18188,7 +18583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
18188
18583
|
state('expanded', style({ height: AUTO_STYLE })),
|
|
18189
18584
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
18190
18585
|
]),
|
|
18191
|
-
], template: "@if (!static) {\n <div class=\"loading-progress\">\n @if (dataSource?.isLoading) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </div>\n}\n\n<!-- #region Data table -->\n<div class=\"mat-table-container scrollbar-secondary\" [ngClass]=\"{'mat-table-sticky': sticky}\" #scrollContainer>\n <table mat-table #table [dataSource]=\"dataSource\" [dataSourceFilter]=\"dataSourceFilter\" [ngClass]=\"{'table-fixed': !sticky && !detailsTemplate && !templateRef, 'table-stick': sticky}\" [trackBy]=\"trackBy\" matSort matSortDisableClear [matSortActive]=\"sortActive||'id'\" [matSortDirection]=\"sortDirection\" multiTemplateDataRows>\n @for (column of columns$ | async; track columnsTrackBy($index, column)) {\n <!-- #region Column def -->\n <ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\n <ng-template #header [ngTemplateOutlet]=\"header\" let-headerText=\"headerText\" [ngTemplateOutletContext]=\"{headerText: column.header | func:context}\">\n <th mat-header-cell *cdkHeaderCellDef [mat-sort-header]=\"column.sortBy || column.name\" [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [disabled]=\"column.type == ColumnType.Checkbox || column.disabled\" [ngClass]=\"{'gt-xs': column.display == Grid.Xs, 'gt-sm': column.display == Grid.Sm, 'gt-md': column.display == Grid.Md, 'gt-lg': column.display == Grid.Lg, 'gt-xl': column.display == Grid.Xl, 'gt-xxl': column.display == Grid.Xxl, 'hidden': column.display == Grid.None}\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\n @if (column.type == ColumnType.Checkbox) {\n <mat-checkbox (change)=\"$event ? dataSource.toggleSelect($event, selectAllFilter) : null\" [disabled]=\"!dataSource.paginator?.length\" [checked]=\"dataSource.selectionModel.hasValue() && dataSource.isAllSelected()\" [indeterminate]=\"dataSource.selectionModel.hasValue() && !dataSource.isAllSelected()\"></mat-checkbox>\n }\n @if (column.type != ColumnType.Checkbox) {\n <span [matTooltip]=\"headerText\">{{headerText}}</span>\n }\n </th>\n </ng-template>\n <td mat-cell *cdkCellDef=\"let row; let rowIndex = dataIndex\" [matTooltip]=\"column.tooltip?column.tooltip(row, undefined, context):null\" [matTooltipClass]=\"column.tooltipClass??''\" [hidden]=\"column.hidden\" [ngClass]=\"getRowClasses(column, row)\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\">\n <ng-template #rowVal [ngTemplateOutlet]=\"rowVal\" let-rowValue [ngTemplateOutletContext]=\"{$implicit: column?.content && column?.content(row, undefined, context)}\">\n @switch (column.type) {\n <!-- #region Checkbox column -->\n @case (ColumnType.Checkbox) {\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? dataSource.selectionModel.toggle(row) : null\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" [checked]=\"dataSource.selectionModel.isSelected(row)\"></mat-checkbox>\n }\n <!-- #endregion -->\n <!-- #region Enum column -->\n @case (ColumnType.Enum) {\n <span>\n @if (column.enumMetadata) {\n @if (column.multiple) {\n @for (item of rowValue; track item; let i = $index) {\n @if (i < 2) {\n <ng-template let-displayValue=\"displayValue\" [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ displayValue: column.enumMetadata[item].display }\"></ng-template>\n }\n @if (i === 1 && rowValue?.length > 2) {\n <small [matTooltip]=\"(rowValue | slice:2 | map:column.enumMetadata | map:'display') | join:'\\n'\" matTooltipClass=\"mat-tooltip-multiline\">...</small>\n }\n }\n <ng-template #template let-displayValue=\"displayValue\">\n <mat-chip-row disableRipple=\"true\" selectable=\"false\" [matTooltip]=\"displayValue\">\n <span>{{ displayValue }}</span>\n </mat-chip-row>\n </ng-template>\n } @else {\n @if (rowValue >= 0) {\n <span class=\"na\" [ngStyle]=\"{ color: ((column.enumMetadata[rowValue] || {}).textColor || 'inherit') }\" [innerHtml]=\"(column.enumMetadata[rowValue]||{}).display\"></span>\n }\n }\n } @else {\n @if (column.multiple) {\n @for (item of rowValue; track item; let i = $index; let last = $last) {\n <div>\n @if (i<2) {\n <small i18n=\"@@selection\">{item | enum:column.enumType:column.enumPrefix, select, type {type} other {{{item | enum:column.enumType:column.enumPrefix}}}}</small>\n }\n @if (i==1 && rowValue?.length > 2) {\n <small>, ...</small>\n }\n </div>\n }\n } @else {\n @if (rowValue >= 0) {\n <span i18n=\"@@selection\">{rowValue | enum:column.enumType:column.enumPrefix, select, type {type} other {{{rowValue | enum:column.enumType:column.enumPrefix}}}}</span>\n }\n }\n }\n </span>\n }\n <!-- #endregion -->\n <!-- #region Toggle column -->\n @case (ColumnType.Toggle) {\n @if (!formArray) {\n <mat-slide-toggle [ngModel]=\"row | property:column.name\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);handleModelChange(column, row, undefined);\" (click)=\"$event.stopPropagation();\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" color=\"accent\"></mat-slide-toggle>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region Date column -->\n @case (ColumnType.Date) {\n <span>{{rowValue | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\n }\n <!-- #endregion -->\n <!-- #region Text Input column -->\n @case (ColumnType.TextInput) {\n @if (!formArray) {\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\n @if (!formArray) {\n <input matInput type=\"{{column.inputType}}\" autocomplete=\"none\" name=\"{{column.name}}{{rowIndex}}\" [ngModel]=\"row | property:column.name\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" [min]=\"column.inputMin?column.inputMin(row, undefined, context):null\" [max]=\"column.inputMax?column.inputMax(row, undefined, context):null\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);(column.change?column.change(row, undefined, context):patch(row, [column.name], $event, column.patchIncludes));\" [ngModelOptions]=\"{updateOn: 'blur'}\" (keydown.enter)=\"handleKeydownEnter($event)\">\n }\n </mat-form-field>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region VD-Select column -->\n @case (ColumnType.Select) {\n @if (!formArray) {\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\n @if (!formArray) {\n <vd-select name=\"{{column.name}}{{rowIndex}}\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column?.enumFilter | func:row:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [defaultOption]=\"column.defaultOption??true\" [ngModel]=\"row | property:column.name\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" (change)=\"column.change?column.change(row, undefined, context):patch(row, [column.name], $event.value, column.patchIncludes)\" (keydown.enter)=\"handleKeydownEnter($event)\"></vd-select>\n }\n </mat-form-field>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region Action -->\n @case (ColumnType.Action) {\n @if (column.menu) {\n @if (menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)) {\n <div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed;\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu!\"></div>\n }\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\n }\n }\n <!-- #endregion -->\n <!-- #region Menu -->\n @case (ColumnType.Menu) {\n @if (column.menu) {\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\"></vd-dynamic-menu>\n }\n }\n <!-- #endregion -->\n <!-- #region icon -->\n @case (ColumnType.Icon) {\n <span layout=\"row\" layout-align=\"start center\">\n @if (column.icon?.matIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\">{{handleExpression(column.icon?.matIcon!, row)}}</mat-icon>\n }\n @if (column.icon?.svgIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\" [svgIcon]=\"handleExpression(column.icon?.svgIcon!, row)!\"></mat-icon>\n }\n @if (column.icon?.fontIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\" [fontIcon]=\"handleExpression(column.icon?.fontIcon!, row)!\"></mat-icon>\n }\n </span>\n }\n <!-- #endregion -->\n <!-- #region icon button -->\n @case (ColumnType.IconButton) {\n <a mat-icon-button (click)=\"$event.stopPropagation();column.iconButton?.event?column.iconButton?.event(row, context):null\">\n <mat-icon fontSet=\"{{column.iconButton?.iconFontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.iconButton?.iconClass??'', row)\">{{handleExpression(column.iconButton?.icon??'radio_button_checked', row) || 'radio_button_checked'}}</mat-icon>\n </a>\n }\n <!-- #endregion -->\n <!-- #region Other column types -->\n @default {\n <span [innerHtml]=\"rowValue??''\"></span>\n }\n <!-- #endregion -->\n }\n <ng-template #recursiveContainer let-columnNameSegments=\"segments\" let-formGroup=\"formGroup\" let-parentFormGroup=\"parentFormGroup\">\n @if (formGroup) {\n <ng-container [formGroup]=\"formGroup\">\n <!-- If the columnNameSegments array is empty, we're at the leaf node -->\n @if (!columnNameSegments.length) {\n @switch (column.type) {\n <!-- #region Toggle column -->\n @case (ColumnType.Toggle) {\n <mat-slide-toggle [formControl]=\"formGroup\" (click)=\"$event.stopPropagation();\" (change)=\"column.change?column.change(parentFormGroup.value, parentFormGroup, context):handleModelChange(column, parentFormGroup.value, parentFormGroup)\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" color=\"accent\"></mat-slide-toggle>\n }\n <!-- #endregion -->\n <!-- #region Text Input column -->\n @case (ColumnType.TextInput) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\n <input matInput [formControl]=\"formGroup\" type=\"{{column.inputType}}\" autocomplete=\"none\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" [min]=\"column.inputMin?column.inputMin(parentFormGroup.value, parentFormGroup, context):null\" [max]=\"column.inputMax?column.inputMax(parentFormGroup.value, parentFormGroup, context):null\" (keydown.enter)=\"handleKeydownEnter($event)\">\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VD-Select column -->\n @case (ColumnType.Select) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\n <vd-select [formControl]=\"formGroup\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:parentFormGroup.value:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [defaultOption]=\"column.defaultOption??true\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" (selectionChange)=\"column.change?column.change(parentFormGroup.value, parentFormGroup, context):patch(parentFormGroup.value, [column.name], rowValue, column.patchIncludes)\" (keydown.enter)=\"handleKeydownEnter($event)\"></vd-select>\n </mat-form-field>\n }\n <!-- #endregion -->\n }\n } @else {\n <!-- If not the last segment, create a nested form group -->\n <ng-container [formGroupName]=\"columnNameSegments[0]\">\n <!-- Recursive call to handle nested segments -->\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: columnNameSegments.slice(1), parentFormGroup:formGroup, formGroup: formGroup.get(columnNameSegments[0])}\"></ng-container>\n </ng-container>\n }\n </ng-container>\n }\n </ng-template>\n </ng-template>\n </td>\n </ng-container>\n <!-- #endregion -->\n }\n\n <!-- #region Filter row -->\n @if (dataSource && filterable) {\n @for (column of columns$ | async; track column) {\n <ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\n <th mat-header-cell *cdkHeaderCellDef [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [ngClass]=\"{'gt-xs': column.display == Grid.Xs, 'gt-sm': column.display == Grid.Sm, 'gt-md': column.display == Grid.Md, 'gt-lg': column.display == Grid.Lg, 'gt-xl': column.display == Grid.Xl, 'gt-xxl': column.display == Grid.Xxl, 'hidden': column.display == Grid.None}\">\n <!-- #region Select filter -->\n @if(column.endpoint || column.enumType || column.options){\n <span filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:{}:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\n }\n <!-- #region Text filter -->\n @else if(column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number) {\n <span filter-input [onlyNumber]=\"column.filterInputNumber??false\" [operator]=\"!useFilterOperator ? undefined : column.filterOperator\"></span>\n }\n <!-- #endregion -->\n <!-- #region Date filter -->\n @else if (column.type == ColumnType.Date) {\n <span filter-date></span>\n }\n <!-- #endregion -->\n <!-- #region Action filter (clear) -->\n @else if (column.type == ColumnType.Action) {\n <span filter-clear></span>\n }\n <!-- #endregion -->\n </th>\n </ng-container>\n }\n }\n <!-- #endregion -->\n\n <!-- #region Details column -->\n <ng-container cdkColumnDef=\"expandedDetail\">\n <td mat-cell *matCellDef=\"let row; let index = index\" [attr.colspan]=\"(displayedColumns$ | async)?.length\">\n <div class=\"row-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\" #detailsTemplate>\n @if (templateRef && row === expandedRow) {\n <ng-container *ngTemplateOutlet=\"templateRef; context:{row: row, index: index, context: context}\"></ng-container>\n }\n </div>\n </td>\n </ng-container>\n <!-- #endregion -->\n\n <!-- #region Filter header -->\n @if (filterable) {\n <tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\n }\n <!-- #endregion -->\n\n <tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\n <tr mat-row *cdkRowDef=\"let row; columns: displayedColumns$ | async; let index = dataIndex\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\" [class.expanded-row]=\"expandedRow === row\" (click)=\"handleRowClick(index, row)\" (contextmenu)=\"handleRowRightClick($event, row)\"></tr>\n\n <!-- #region Detrails row -->\n @if (detailsTemplate || templateRef) {\n <tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\n }\n <!-- #endregion -->\n </table>\n\n <!-- #region Modern No Results Message -->\n @if (dataSource?.filteredData?.length <= 0 && dataSource?.total <= 0) {\n <div class=\"no-results-overlay\">\n <mat-icon class=\"no-results-icon\">search_off</mat-icon>\n <div class=\"no-results-text mat-body-1\">\n <h3 i18n=\"@@noResultsFound\">No results found</h3>\n <p i18n=\"@@tryAdjustFilters\">Try adjusting your filters or search criteria.</p>\n </div>\n </div>\n }\n <!-- #endregion -->\n</div>\n<!-- #endregion -->\n\n<!-- #region Debug value -->\n@if (debugValue) {\n <code>\n <pre>{{formValue | json}}</pre>\n </code>\n}\n<!-- #endregion -->\n\n<div class=\"table-footer\" layout=\"row\">\n <ng-content select=\"[table-footer]\"></ng-content>\n <span flex></span>\n @if (paginable) {\n <mat-paginator [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\n }\n</div>", styles: ["::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-form-field .mat-form-field-wrapper{width:100%}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip{height:24px;margin-top:2px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip .mdc-evolution-chip__action--primary{padding-left:9px;padding-right:9px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip:last-child{margin-bottom:2px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip *{font-size:.8rem}@media(max-width:389px){::ng-deep .mat-mdc-table [gt-xs],::ng-deep .mat-mdc-table .gt-xs{display:none}::ng-deep .mat-mdc-table [gt-sm],::ng-deep .mat-mdc-table .gt-sm{display:none}::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:599px){::ng-deep .mat-mdc-table [gt-sm],::ng-deep .mat-mdc-table .gt-sm{display:none}::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:959px){::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1279px){::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1919px){::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1979px){::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}.mat-table-container{width:100%;max-width:100%;overflow:auto}.mat-table-container .mat-mdc-header-cell,.mat-table-container .mat-mdc-footer-cell,.mat-table-container .mat-mdc-cell{min-width:80px;box-sizing:border-box}.mat-table-container .mat-mdc-header-row,.mat-table-container .mat-mdc-footer-row,.mat-table-container .mat-mdc-row{min-width:1920px}.mat-table-container.mat-table-sticky .mat-mdc-table-sticky-border-elem-right{box-shadow:-3px 0 5px #0000001a}.mat-table-container.mat-table-sticky .mat-mdc-table-sticky-border-elem-left{box-shadow:3px 0 5px #0000001a}\n"] }]
|
|
18586
|
+
], template: "@if (!static) {\n <div class=\"loading-progress\">\n @if (dataSource?.isLoading) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </div>\n}\n\n<!-- #region Data table -->\n<div class=\"mat-table-container scrollbar-secondary\" [ngClass]=\"{'mat-table-sticky': sticky}\" #scrollContainer>\n <table mat-table #table [dataSource]=\"dataSource\" [dataSourceFilter]=\"dataSourceFilter\" [ngClass]=\"{'table-fixed': !sticky && !detailsTemplate && !templateRef, 'table-stick': sticky}\" [trackBy]=\"trackBy\" matSort matSortDisableClear [matSortActive]=\"sortActive||'id'\" [matSortDirection]=\"sortDirection\" multiTemplateDataRows>\n @for (column of columns$ | async; track columnsTrackBy($index, column)) {\n <!-- #region Column def -->\n <ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\n <ng-template #header [ngTemplateOutlet]=\"header\" let-headerText=\"headerText\" [ngTemplateOutletContext]=\"{headerText: column.header | func:context}\">\n <th mat-header-cell *cdkHeaderCellDef [mat-sort-header]=\"column.sortBy || column.name\" [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [disabled]=\"column.type == ColumnType.Checkbox || column.disabled\" [ngClass]=\"{'gt-xs': column.display == Grid.Xs, 'gt-sm': column.display == Grid.Sm, 'gt-md': column.display == Grid.Md, 'gt-lg': column.display == Grid.Lg, 'gt-xl': column.display == Grid.Xl, 'gt-xxl': column.display == Grid.Xxl, 'hidden': column.display == Grid.None}\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\n @if (column.type == ColumnType.Checkbox) {\n <mat-checkbox (change)=\"$event ? dataSource.toggleSelect($event, selectAllFilter) : null\" [disabled]=\"!dataSource.paginator?.length\" [checked]=\"dataSource.selectionModel.hasValue() && dataSource.isAllSelected()\" [indeterminate]=\"dataSource.selectionModel.hasValue() && !dataSource.isAllSelected()\"></mat-checkbox>\n }\n @if (column.type != ColumnType.Checkbox) {\n <span [matTooltip]=\"headerText\">{{headerText}}</span>\n }\n </th>\n </ng-template>\n <td mat-cell *cdkCellDef=\"let row; let rowIndex = dataIndex\" [matTooltip]=\"column.tooltip?column.tooltip(row, undefined, context):null\" [matTooltipClass]=\"column.tooltipClass??''\" [hidden]=\"column.hidden\" [ngClass]=\"getRowClasses(column, row)\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\">\n <ng-template #rowVal [ngTemplateOutlet]=\"rowVal\" let-rowValue [ngTemplateOutletContext]=\"{$implicit: column?.content && column?.content(row, undefined, context)}\">\n @switch (column.type) {\n <!-- #region Checkbox column -->\n @case (ColumnType.Checkbox) {\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? dataSource.selectionModel.toggle(row) : null\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" [checked]=\"dataSource.selectionModel.isSelected(row)\"></mat-checkbox>\n }\n <!-- #endregion -->\n <!-- #region Enum column -->\n @case (ColumnType.Enum) {\n <span>\n @if (column.enumMetadata) {\n @if (column.multiple) {\n @for (item of rowValue; track item; let i = $index) {\n @if (i < 2) {\n <ng-template let-displayValue=\"displayValue\" [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ displayValue: column.enumMetadata[item].display }\"></ng-template>\n }\n @if (i === 1 && rowValue?.length > 2) {\n <small [matTooltip]=\"(rowValue | slice:2 | map:column.enumMetadata | map:'display') | join:'\\n'\" matTooltipClass=\"mat-tooltip-multiline\">...</small>\n }\n }\n <ng-template #template let-displayValue=\"displayValue\">\n <mat-chip-row disableRipple=\"true\" selectable=\"false\" [matTooltip]=\"displayValue\">\n <span>{{ displayValue }}</span>\n </mat-chip-row>\n </ng-template>\n } @else {\n @if (rowValue >= 0) {\n <span class=\"na\" [ngStyle]=\"{ color: ((column.enumMetadata[rowValue] || {}).textColor || 'inherit') }\" [innerHtml]=\"(column.enumMetadata[rowValue]||{}).display\"></span>\n }\n }\n } @else {\n @if (column.multiple) {\n @for (item of rowValue; track item; let i = $index; let last = $last) {\n <div>\n @if (i<2) {\n <small i18n=\"@@selection\">{item | enum:column.enumType:column.enumPrefix, select, type {type} other {{{item | enum:column.enumType:column.enumPrefix}}}}</small>\n }\n @if (i==1 && rowValue?.length > 2) {\n <small>, ...</small>\n }\n </div>\n }\n } @else {\n @if (rowValue >= 0) {\n <span i18n=\"@@selection\">{rowValue | enum:column.enumType:column.enumPrefix, select, type {type} other {{{rowValue | enum:column.enumType:column.enumPrefix}}}}</span>\n }\n }\n }\n </span>\n }\n <!-- #endregion -->\n <!-- #region Toggle column -->\n @case (ColumnType.Toggle) {\n @if (!formArray) {\n <mat-slide-toggle [ngModel]=\"row | property:column.name\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);handleModelChange(column, row, undefined);\" (click)=\"$event.stopPropagation();\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" color=\"accent\"></mat-slide-toggle>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region Date column -->\n @case (ColumnType.Date) {\n <span>{{rowValue | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\n }\n <!-- #endregion -->\n <!-- #region Text Input column -->\n @case (ColumnType.TextInput) {\n @if (!formArray) {\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\n @if (!formArray) {\n <input matInput type=\"{{column.inputType}}\" autocomplete=\"none\" name=\"{{column.name}}{{rowIndex}}\" [ngModel]=\"row | property:column.name\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" [min]=\"column.inputMin?column.inputMin(row, undefined, context):null\" [max]=\"column.inputMax?column.inputMax(row, undefined, context):null\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);(column.change?column.change(row, undefined, context):patch(row, [column.name], $event, column.patchIncludes));\" [ngModelOptions]=\"{updateOn: 'blur'}\" (keydown.enter)=\"handleKeydownEnter($event)\">\n }\n </mat-form-field>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region VD-Select column -->\n @case (ColumnType.Select) {\n @if (!formArray) {\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\n @if (!formArray) {\n <vd-select name=\"{{column.name}}{{rowIndex}}\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column?.enumFilter | func:row:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [defaultOption]=\"column.defaultOption??true\" [ngModel]=\"row | property:column.name\" (ngModelChange)=\"setNestedProperty(row, column.name, $event);\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, undefined, context)))\" (change)=\"column.change?column.change(row, undefined, context):patch(row, [column.name], $event.value, column.patchIncludes)\" (keydown.enter)=\"handleKeydownEnter($event)\"></vd-select>\n }\n </mat-form-field>\n }\n @if (formArray) {\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\n </ng-container>\n }\n }\n <!-- #endregion -->\n <!-- #region Action -->\n @case (ColumnType.Action) {\n @if (column.menu) {\n @if (menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)) {\n <div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed;\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu!\"></div>\n }\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\n }\n }\n <!-- #endregion -->\n <!-- #region Menu -->\n @case (ColumnType.Menu) {\n @if (column.menu) {\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\"></vd-dynamic-menu>\n }\n }\n <!-- #endregion -->\n <!-- #region icon -->\n @case (ColumnType.Icon) {\n <span layout=\"row\" layout-align=\"start center\">\n @if (column.icon?.matIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\">{{handleExpression(column.icon?.matIcon!, row)}}</mat-icon>\n }\n @if (column.icon?.svgIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\" [svgIcon]=\"handleExpression(column.icon?.svgIcon!, row)!\"></mat-icon>\n }\n @if (column.icon?.fontIcon) {\n <mat-icon fontSet=\"{{column.icon?.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon?.cssClass??'', row)\" [fontIcon]=\"handleExpression(column.icon?.fontIcon!, row)!\"></mat-icon>\n }\n </span>\n }\n <!-- #endregion -->\n <!-- #region icon button -->\n @case (ColumnType.IconButton) {\n <a mat-icon-button (click)=\"$event.stopPropagation();column.iconButton?.event?column.iconButton?.event(row, context):null\">\n <mat-icon fontSet=\"{{column.iconButton?.iconFontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.iconButton?.iconClass??'', row)\">{{handleExpression(column.iconButton?.icon??'radio_button_checked', row) || 'radio_button_checked'}}</mat-icon>\n </a>\n }\n <!-- #endregion -->\n <!-- #region Other column types -->\n @default {\n <span [innerHtml]=\"rowValue??''\"></span>\n }\n <!-- #endregion -->\n }\n <ng-template #recursiveContainer let-columnNameSegments=\"segments\" let-formGroup=\"formGroup\" let-parentFormGroup=\"parentFormGroup\">\n @if (formGroup) {\n <ng-container [formGroup]=\"formGroup\">\n <!-- If the columnNameSegments array is empty, we're at the leaf node -->\n @if (!columnNameSegments.length) {\n @switch (column.type) {\n <!-- #region Toggle column -->\n @case (ColumnType.Toggle) {\n <mat-slide-toggle [formControl]=\"formGroup\" (click)=\"$event.stopPropagation();\" (change)=\"column.change?column.change(parentFormGroup.value, parentFormGroup, context):handleModelChange(column, parentFormGroup.value, parentFormGroup)\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" color=\"accent\"></mat-slide-toggle>\n }\n <!-- #endregion -->\n <!-- #region Text Input column -->\n @case (ColumnType.TextInput) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\n <input matInput [formControl]=\"formGroup\" type=\"{{column.inputType}}\" autocomplete=\"none\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" [min]=\"column.inputMin?column.inputMin(parentFormGroup.value, parentFormGroup, context):null\" [max]=\"column.inputMax?column.inputMax(parentFormGroup.value, parentFormGroup, context):null\" (keydown.enter)=\"handleKeydownEnter($event)\">\n </mat-form-field>\n }\n <!-- #endregion -->\n <!-- #region VD-Select column -->\n @case (ColumnType.Select) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\n <vd-select [formControl]=\"formGroup\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:parentFormGroup.value:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [defaultOption]=\"column.defaultOption??true\" [disableControl]=\"readonly || (column.disabled || (column.disable && column.disable(parentFormGroup.value, parentFormGroup, context)))\" (selectionChange)=\"column.change?column.change(parentFormGroup.value, parentFormGroup, context):patch(parentFormGroup.value, [column.name], rowValue, column.patchIncludes)\" (keydown.enter)=\"handleKeydownEnter($event)\"></vd-select>\n </mat-form-field>\n }\n <!-- #endregion -->\n }\n } @else {\n <!-- If not the last segment, create a nested form group -->\n <ng-container [formGroupName]=\"columnNameSegments[0]\">\n <!-- Recursive call to handle nested segments -->\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: columnNameSegments.slice(1), parentFormGroup:formGroup, formGroup: formGroup.get(columnNameSegments[0])}\"></ng-container>\n </ng-container>\n }\n </ng-container>\n }\n </ng-template>\n </ng-template>\n </td>\n </ng-container>\n <!-- #endregion -->\n }\n\n <!-- #region Filter row -->\n @if (dataSource && filterable) {\n @for (column of columns$ | async; track column) {\n <ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\n <th mat-header-cell *cdkHeaderCellDef [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [ngClass]=\"{'gt-xs': column.display == Grid.Xs, 'gt-sm': column.display == Grid.Sm, 'gt-md': column.display == Grid.Md, 'gt-lg': column.display == Grid.Lg, 'gt-xl': column.display == Grid.Xl, 'gt-xxl': column.display == Grid.Xxl, 'hidden': column.display == Grid.None}\">\n <!-- #region Select filter -->\n @if(column.endpoint || column.enumType || column.options){\n <span filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:{}:context\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\n }\n <!-- #region Text filter -->\n @else if(column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number) {\n <span filter-input [onlyNumber]=\"column.filterInputNumber??false\" [matTooltip]=\"column.filterTooltip ? column.filterTooltip(context):null\" [matTooltipClass]=\"column.filterTooltipClass??''\" [operator]=\"!useFilterOperator ? undefined : column.filterOperator\"></span>\n }\n <!-- #endregion -->\n <!-- #region Date filter -->\n @else if (column.type == ColumnType.Date) {\n <span filter-date></span>\n }\n <!-- #endregion -->\n <!-- #region Action filter (clear) -->\n @else if (column.type == ColumnType.Action) {\n <span filter-clear></span>\n }\n <!-- #endregion -->\n </th>\n </ng-container>\n }\n }\n <!-- #endregion -->\n\n <!-- #region Details column -->\n <ng-container cdkColumnDef=\"expandedDetail\">\n <td mat-cell *matCellDef=\"let row; let index = index\" [attr.colspan]=\"(displayedColumns$ | async)?.length\">\n <div class=\"row-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\" #detailsTemplate>\n @if (templateRef && row === expandedRow) {\n <ng-container *ngTemplateOutlet=\"templateRef; context:{row: row, index: index, context: context}\"></ng-container>\n }\n </div>\n </td>\n </ng-container>\n <!-- #endregion -->\n\n <!-- #region Filter header -->\n @if (filterable) {\n <tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\n }\n <!-- #endregion -->\n\n <tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\n <tr mat-row *cdkRowDef=\"let row; columns: displayedColumns$ | async; let index = dataIndex\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\" [class.expanded-row]=\"expandedRow === row\" (click)=\"handleRowClick(index, row)\" (contextmenu)=\"handleRowRightClick($event, row)\"></tr>\n\n <!-- #region Detrails row -->\n @if (detailsTemplate || templateRef) {\n <tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\n }\n <!-- #endregion -->\n </table>\n\n <!-- #region Modern No Results Message -->\n @if (dataSource?.filteredData?.length <= 0 && dataSource?.total <= 0) {\n <div class=\"no-results-overlay\">\n <mat-icon class=\"no-results-icon\">search_off</mat-icon>\n <div class=\"no-results-text mat-body-1\">\n <h3 i18n=\"@@noResultsFound\">No results found</h3>\n <p i18n=\"@@tryAdjustFilters\">Try adjusting your filters or search criteria.</p>\n </div>\n </div>\n }\n <!-- #endregion -->\n</div>\n<!-- #endregion -->\n\n<!-- #region Debug value -->\n@if (debugValue) {\n <code>\n <pre>{{formValue | json}}</pre>\n </code>\n}\n<!-- #endregion -->\n\n<div class=\"table-footer\" layout=\"row\">\n <ng-content select=\"[table-footer]\"></ng-content>\n <span flex></span>\n @if (paginable) {\n <mat-paginator [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\n }\n</div>", styles: ["::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-form-field .mat-form-field-wrapper{width:100%}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip{height:24px;margin-top:2px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip .mdc-evolution-chip__action--primary{padding-left:9px;padding-right:9px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip:last-child{margin-bottom:2px}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .mat-mdc-table .mat-mdc-row .mat-mdc-cell .mat-mdc-chip *{font-size:.8rem}@media(max-width:389px){::ng-deep .mat-mdc-table [gt-xs],::ng-deep .mat-mdc-table .gt-xs{display:none}::ng-deep .mat-mdc-table [gt-sm],::ng-deep .mat-mdc-table .gt-sm{display:none}::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:599px){::ng-deep .mat-mdc-table [gt-sm],::ng-deep .mat-mdc-table .gt-sm{display:none}::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:959px){::ng-deep .mat-mdc-table [gt-md],::ng-deep .mat-mdc-table .gt-md{display:none}::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1279px){::ng-deep .mat-mdc-table [gt-lg],::ng-deep .mat-mdc-table .gt-lg{display:none}::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1919px){::ng-deep .mat-mdc-table [gt-xl],::ng-deep .mat-mdc-table .gt-xl{display:none}::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}@media(max-width:1979px){::ng-deep .mat-mdc-table [gt-xxl],::ng-deep .mat-mdc-table .gt-xxl{display:none}}.mat-table-container{width:100%;max-width:100%;overflow:auto}.mat-table-container .mat-mdc-header-cell,.mat-table-container .mat-mdc-footer-cell,.mat-table-container .mat-mdc-cell{min-width:80px;box-sizing:border-box}.mat-table-container .mat-mdc-header-row,.mat-table-container .mat-mdc-footer-row,.mat-table-container .mat-mdc-row{min-width:1920px}.mat-table-container.mat-table-sticky .mat-mdc-table-sticky-border-elem-right{box-shadow:-3px 0 5px #0000001a}.mat-table-container.mat-table-sticky .mat-mdc-table-sticky-border-elem-left{box-shadow:3px 0 5px #0000001a}\n"] }]
|
|
18192
18587
|
}], ctorParameters: () => [{ type: DynamicBuilder }, { type: i0.ChangeDetectorRef }], propDecorators: { table: [{
|
|
18193
18588
|
type: ViewChild,
|
|
18194
18589
|
args: ['table']
|
|
@@ -18558,7 +18953,7 @@ class VdDynamicTableConfigDialogComponent extends BaseComponent {
|
|
|
18558
18953
|
this.genericList?.updateColumns();
|
|
18559
18954
|
}
|
|
18560
18955
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: VdDynamicTableConfigDialogComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: RxFormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
18561
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: VdDynamicTableConfigDialogComponent, isStandalone: true, selector: "vd-dynamic-table-config-dialog", usesInheritance: true, ngImport: i0, template: "<!-- Title bar with close button -->\r\n<vd-dialog-header [dialogRef]=\"dialogRef\" i18n=\"@@tableConfiguration\">Table configuration</vd-dialog-header>\r\n\r\n@if (configForm) {\r\n <div class=\"pad-xs flex\" layout=\"column\">\r\n <div class=\"pad-bottom-sm\">\r\n @if (configForm) {\r\n <form [formGroup]=\"configForm\" class=\"pad-xs\">\r\n <div layout-gt-sm=\"row\" layout=\"column\">\r\n <mat-checkbox formControlName=\"sticky\">\r\n <span i18n=\"@@sticky\">Sticky</span>\r\n <span class=\"description\" i18n=\"@@tableStickyDescription\"> - Select to make the table headers fixed during scrolling.</span>\r\n </mat-checkbox>\r\n @if (false) {\r\n <mat-form-field layout-margin flex>\r\n <mat-label i18n=\"@@tableWidth\">Table width</mat-label>\r\n <input matInput type=\"number\" formControlName=\"tableWidth\" />\r\n </mat-form-field>\r\n }\r\n </div>\r\n </form>\r\n }\r\n </div>\r\n </div>\r\n <div layout-gt-sm=\"row\" class=\"dialog-container\" flex>\r\n <vd-dynamic-table #table [data]=\"columns\" [paginatorRef]=\"paginator\" [classType]=\"tableColumnConfigClassType\" [filterable]=\"true\" [paginable]=\"false\" [useFilterOperator]=\"false\" [pageSize]=\"10\" [context]=\"this\"></vd-dynamic-table>\r\n </div>\r\n <mat-dialog-actions>\r\n <a mat-flat-button color=\"primary\" (click)=\"save()\" i18n=\"@@save\">Save</a>\r\n <a mat-button (click)=\"apply()\" i18n=\"@@apply\">Apply</a>\r\n <a mat-button (click)=\"dialogRef.close()\" i18n=\"@@close\">Close</a>\r\n <span flex></span>\r\n <mat-paginator #paginator [length]=\"table.dataSource.total\" [pageIndex]=\"table.dataSource.pageIndex\" [pageSize]=\"table.dataSource.pageSize\" [pageSizeOptions]=\"table.pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\r\n </mat-dialog-actions>\r\n}", styles: [".dialog-container{box-sizing:border-box;margin:0;overflow:auto;max-height:100%}.dialog-container vd-dynamic-table{max-height:100%!important}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { 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.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: RxReactiveFormsModule }, { kind: "directive", type: AsyncValidationDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["async"] }, { kind: "directive", type: RxwebFormDirective, selector: "[formGroup],[rxwebForm]", inputs: ["formGroup", "rxwebForm"] }, { kind: "directive", type: RxFormControlDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["rxalpha", "rxalphaNumeric", "rxascii", "rxcompare", "rxcompose", "rxcontains", "rxcreditCard", "rxdataUri", "rxdifferent", "rxdigit", "rxemail", "rxendsWith", "rxeven", "rxextension", "rxfactor", "rxfileSize", "rxgreaterThanEqualTo", "rxgreaterThan", "rxhexColor", "rxjson", "rxlatitude", "rxlatLong", "rxleapYear", "rxlessThan", "rxlessThanEqualTo", "rxlongitude", "rxlowerCase", "rxmac", "rxmaxDate", "rxmaxLength", "rxmaxNumber", "rxminDate", "rxminLength", "rxminNumber", "rxnumeric", "rxodd", "rxpassword", "rxport", "rxprimeNumber", "rxrequired", "rxrange", "rxrule", "rxstartsWith", "rxtime", "rxupperCase", "rxurl", "rxunique", "rxnotEmpty", "rxcusip", "rxgrid", "rxdate"] }, { kind: "ngmodule", type: MatIconModule }, { 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: "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: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i10.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { 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"] }, { kind: "component", type: VdDialogHeaderComponent, selector: "vd-dialog-header", inputs: ["dialogRef"] }] });
|
|
18956
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: VdDynamicTableConfigDialogComponent, isStandalone: true, selector: "vd-dynamic-table-config-dialog", usesInheritance: true, ngImport: i0, template: "<!-- Title bar with close button -->\r\n<vd-dialog-header [dialogRef]=\"dialogRef\" i18n=\"@@tableConfiguration\">Table configuration</vd-dialog-header>\r\n\r\n@if (configForm) {\r\n <div class=\"pad-xs flex\" layout=\"column\">\r\n <div class=\"pad-bottom-sm\">\r\n @if (configForm) {\r\n <form [formGroup]=\"configForm\" class=\"pad-xs\">\r\n <div layout-gt-sm=\"row\" layout=\"column\">\r\n <mat-checkbox formControlName=\"sticky\">\r\n <span i18n=\"@@sticky\">Sticky</span>\r\n <span class=\"description\" i18n=\"@@tableStickyDescription\"> - Select to make the table headers fixed during scrolling.</span>\r\n </mat-checkbox>\r\n @if (false) {\r\n <mat-form-field layout-margin flex>\r\n <mat-label i18n=\"@@tableWidth\">Table width</mat-label>\r\n <input matInput type=\"number\" formControlName=\"tableWidth\" />\r\n </mat-form-field>\r\n }\r\n </div>\r\n </form>\r\n }\r\n </div>\r\n </div>\r\n <div layout-gt-sm=\"row\" class=\"dialog-container\" flex>\r\n <vd-dynamic-table #table [data]=\"columns\" [paginatorRef]=\"paginator\" [classType]=\"tableColumnConfigClassType\" [filterable]=\"true\" [paginable]=\"false\" [useFilterOperator]=\"false\" [pageSize]=\"10\" [context]=\"this\"></vd-dynamic-table>\r\n </div>\r\n <mat-dialog-actions>\r\n <a mat-flat-button color=\"primary\" (click)=\"save()\" i18n=\"@@save\">Save</a>\r\n <a mat-button (click)=\"apply()\" i18n=\"@@apply\">Apply</a>\r\n <a mat-button (click)=\"dialogRef.close()\" i18n=\"@@close\">Close</a>\r\n <span flex></span>\r\n <mat-paginator #paginator [length]=\"table.dataSource.total\" [pageIndex]=\"table.dataSource.pageIndex\" [pageSize]=\"table.dataSource.pageSize\" [pageSizeOptions]=\"table.pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\r\n </mat-dialog-actions>\r\n}", styles: [".dialog-container{box-sizing:border-box;margin:0;overflow:auto;max-height:100%}.dialog-container vd-dynamic-table{max-height:100%!important}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { 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.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: RxReactiveFormsModule }, { kind: "directive", type: AsyncValidationDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["async"] }, { kind: "directive", type: RxwebFormDirective, selector: "[formGroup],[rxwebForm]", inputs: ["formGroup", "rxwebForm"] }, { kind: "directive", type: RxFormControlDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["rxalpha", "rxalphaNumeric", "rxascii", "rxcompare", "rxcompose", "rxcontains", "rxcreditCard", "rxdataUri", "rxdifferent", "rxdigit", "rxemail", "rxendsWith", "rxeven", "rxextension", "rxfactor", "rxfileSize", "rxgreaterThanEqualTo", "rxgreaterThan", "rxhexColor", "rxjson", "rxlatitude", "rxlatLong", "rxleapYear", "rxlessThan", "rxlessThanEqualTo", "rxlongitude", "rxlowerCase", "rxmac", "rxmaxDate", "rxmaxLength", "rxmaxNumber", "rxminDate", "rxminLength", "rxminNumber", "rxnumeric", "rxodd", "rxpassword", "rxport", "rxprimeNumber", "rxrequired", "rxrange", "rxrule", "rxstartsWith", "rxtime", "rxupperCase", "rxurl", "rxunique", "rxnotEmpty", "rxcusip", "rxgrid", "rxdate"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5$1.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: "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: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i10.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { 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"] }, { kind: "component", type: VdDialogHeaderComponent, selector: "vd-dialog-header", inputs: ["dialogRef"] }] });
|
|
18562
18957
|
}
|
|
18563
18958
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: VdDynamicTableConfigDialogComponent, decorators: [{
|
|
18564
18959
|
type: Component,
|
|
@@ -20558,9 +20953,13 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20558
20953
|
: $localize `:@@snackbar.error.required-fields:All fields marked with an asterisk (*) are required.`;
|
|
20559
20954
|
/* Show a notice */
|
|
20560
20955
|
this.snackBarService.open(message, 'Ok', { duration: 3000, panelClass: ['error'] });
|
|
20956
|
+
/* Call the onAfterFormInvalid hook with the collected errors */
|
|
20957
|
+
this.onAfterFormInvalid(errors);
|
|
20561
20958
|
})();
|
|
20562
20959
|
return false;
|
|
20563
20960
|
}
|
|
20961
|
+
/* Call the onAfterFormValid hook if the form is valid */
|
|
20962
|
+
this.onAfterFormValid();
|
|
20564
20963
|
return true;
|
|
20565
20964
|
}
|
|
20566
20965
|
/**
|
|
@@ -20606,46 +21005,6 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20606
21005
|
});
|
|
20607
21006
|
}
|
|
20608
21007
|
}
|
|
20609
|
-
/**
|
|
20610
|
-
* Checks if the form is valid.
|
|
20611
|
-
* This method validates the form, marks invalid controls, and shows error messages if any.
|
|
20612
|
-
* @param form The form to check for validity.
|
|
20613
|
-
* @returns A boolean indicating whether the form is valid.
|
|
20614
|
-
*/
|
|
20615
|
-
isFormValidOld(form) {
|
|
20616
|
-
/* Print some debug information */
|
|
20617
|
-
this.debugForm(form);
|
|
20618
|
-
/* If the form is not valid */
|
|
20619
|
-
if (form && !form.valid) {
|
|
20620
|
-
/* Mark invalid controls as dirty and touched */
|
|
20621
|
-
Object.keys(form.controls)
|
|
20622
|
-
.filter(x => !form.controls[x].valid)
|
|
20623
|
-
.forEach(key => this.invalidateControl(form.controls[key]));
|
|
20624
|
-
/* Show error messages */
|
|
20625
|
-
(async () => {
|
|
20626
|
-
/* Wait until 'mat-error' is displayed */
|
|
20627
|
-
await new Promise(y => setTimeout(y, 200));
|
|
20628
|
-
/* Parse the error messages */
|
|
20629
|
-
var errors = Array();
|
|
20630
|
-
Object.keys(form.controls)
|
|
20631
|
-
.filter(x => !form.controls[x].valid)
|
|
20632
|
-
.forEach(key => {
|
|
20633
|
-
/* Get error text */
|
|
20634
|
-
var error = this.getElementError(form.controls[key]?.nativeElement);
|
|
20635
|
-
if (error) {
|
|
20636
|
-
errors.push(error);
|
|
20637
|
-
}
|
|
20638
|
-
});
|
|
20639
|
-
/* Build error message */
|
|
20640
|
-
var message = errors.length ? errors.slice(0, 3).join('\n') : $localize `:@@snackbar.error.required-fields:All fields marked with an asterisk (*) are required.`;
|
|
20641
|
-
/* Show a notice */
|
|
20642
|
-
this.snackBarService.open(message, 'Ok', { duration: 3000, panelClass: ['error'] });
|
|
20643
|
-
return false;
|
|
20644
|
-
})();
|
|
20645
|
-
return false;
|
|
20646
|
-
}
|
|
20647
|
-
return true;
|
|
20648
|
-
}
|
|
20649
21008
|
/**
|
|
20650
21009
|
* Resets form controls.
|
|
20651
21010
|
* This method marks all controls in the form as pristine, untouched, and updates their validity.
|
|
@@ -20725,24 +21084,6 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20725
21084
|
}
|
|
20726
21085
|
}
|
|
20727
21086
|
}
|
|
20728
|
-
// /**
|
|
20729
|
-
// * Shows form errors.
|
|
20730
|
-
// * This method logs form control errors to the console if debugging is enabled.
|
|
20731
|
-
// * @param form The form to debug.
|
|
20732
|
-
// */
|
|
20733
|
-
// protected debugForm(form?: NgForm | FormGroup | FormArray): void {
|
|
20734
|
-
// if (form && this.debug) {
|
|
20735
|
-
// console.log('Form:', form);
|
|
20736
|
-
// Object.keys(form.controls).forEach(key => {
|
|
20737
|
-
// const controlErrors: ValidationErrors | null = form.controls[key].errors;
|
|
20738
|
-
// if (controlErrors != null) {
|
|
20739
|
-
// Object.keys(controlErrors).forEach(keyError => {
|
|
20740
|
-
// console.log('Key control: ' + key + ', keyError: ' + keyError + ', err value: ', controlErrors[keyError]);
|
|
20741
|
-
// });
|
|
20742
|
-
// }
|
|
20743
|
-
// });
|
|
20744
|
-
// }
|
|
20745
|
-
// }
|
|
20746
21087
|
/**
|
|
20747
21088
|
* Adds toolbar menu items.
|
|
20748
21089
|
* This method adds the 'Delete' menu item to the toolbar if the entity is deletable.
|
|
@@ -20934,6 +21275,17 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20934
21275
|
});
|
|
20935
21276
|
}
|
|
20936
21277
|
}
|
|
21278
|
+
/**
|
|
21279
|
+
* Event emitted when the form is invalid.
|
|
21280
|
+
* This method allows performing operations when the form is found to be invalid.
|
|
21281
|
+
* @param errors The validation errors found in the form.
|
|
21282
|
+
*/
|
|
21283
|
+
onAfterFormInvalid(errors) { }
|
|
21284
|
+
/**
|
|
21285
|
+
* Event emitted when the form is valid.
|
|
21286
|
+
* This method allows performing operations when the form is found to be valid.
|
|
21287
|
+
*/
|
|
21288
|
+
onAfterFormValid() { }
|
|
20937
21289
|
/**
|
|
20938
21290
|
* Event emitted when the entity has been created.
|
|
20939
21291
|
*/
|
|
@@ -21752,8 +22104,13 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
21752
22104
|
set params(params) {
|
|
21753
22105
|
/* Remove empty parameters */
|
|
21754
22106
|
Utils.cleanObject(params);
|
|
22107
|
+
/* Update parameters if they have changed */
|
|
21755
22108
|
if (!Utils.equals(this._params, params)) {
|
|
21756
22109
|
this._params = params;
|
|
22110
|
+
/* Clear the current chips and reset the control state */
|
|
22111
|
+
if (this._params?.projection) {
|
|
22112
|
+
this._params.projection = parseProjectionString(this._params.projection);
|
|
22113
|
+
}
|
|
21757
22114
|
}
|
|
21758
22115
|
}
|
|
21759
22116
|
/**
|
|
@@ -21765,7 +22122,7 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
21765
22122
|
*/
|
|
21766
22123
|
get projection() { return this._projection; }
|
|
21767
22124
|
set projection(projection) {
|
|
21768
|
-
this._projection = projection;
|
|
22125
|
+
this._projection = parseProjectionString(projection);
|
|
21769
22126
|
this.clear();
|
|
21770
22127
|
}
|
|
21771
22128
|
/**
|
|
@@ -22015,6 +22372,10 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
22015
22372
|
this.dataSourceSubscription?.unsubscribe();
|
|
22016
22373
|
this.dataSourceSubscription = this.dataSource?.connect().subscribe();
|
|
22017
22374
|
}
|
|
22375
|
+
/* Reload the data source if it is already connected */
|
|
22376
|
+
else if (this.dataSource?.isConnected) {
|
|
22377
|
+
this.dataSource?.reload();
|
|
22378
|
+
}
|
|
22018
22379
|
/* Trigger change detection */
|
|
22019
22380
|
this.changeDetectorRef.detectChanges();
|
|
22020
22381
|
}
|
|
@@ -22240,7 +22601,7 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
22240
22601
|
provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,
|
|
22241
22602
|
useValue: { overlayPanelClass: 'vd-chips-autocomplete' }
|
|
22242
22603
|
}
|
|
22243
|
-
], 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\" [sticky]=\"true\" (rowClick)=\"addChip($event, filterInput)\" matSort [sortActive]=\"sortActive\" [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}::ng-deep .mat-mdc-table .mat-mdc-form-field .mdc-text-field--outlined .mat-mdc-notch-piece,::ng-deep .mat-mdc-table .mat-mdc-form-field .mdc-text-field--outlined .mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline))!important;border-width:var(--mat-form-field-outlined-outline-width, 1px)!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: "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"] }] });
|
|
22604
|
+
], 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 && autocompleteOptionTemplate.templateRef) {\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\n }\n </span>\n }\n @if (chipTemplate && 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 && 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\" [sticky]=\"true\" (rowClick)=\"addChip($event, filterInput)\" matSort [sortActive]=\"sortActive\" [sortDirection]=\"sortDirection\"></vd-dynamic-table>\n }\n <div class=\"vd-chips-paginator\">\n <mat-divider></mat-divider>\n <mat-paginator [length]=\"dataSource?.total ?? 0\" [pageIndex]=\"dataSource?.pageIndex ?? 0\" [pageSize]=\"dataSource?.pageSize ?? 15\" [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}::ng-deep .mat-mdc-table .mat-mdc-form-field .mdc-text-field--outlined .mat-mdc-notch-piece,::ng-deep .mat-mdc-table .mat-mdc-form-field .mdc-text-field--outlined .mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline))!important;border-width:var(--mat-form-field-outlined-outline-width, 1px)!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: "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.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "component", type: i5.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "directive", type: i5.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"] }] });
|
|
22244
22605
|
}
|
|
22245
22606
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: VdChipsComponent, decorators: [{
|
|
22246
22607
|
type: Component,
|
|
@@ -22260,7 +22621,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
22260
22621
|
MatIconModule,
|
|
22261
22622
|
MatInputModule,
|
|
22262
22623
|
VdDynamicTableComponent,
|
|
22263
|
-
], 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
|
|
22624
|
+
], 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 && autocompleteOptionTemplate.templateRef) {\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\n }\n </span>\n }\n @if (chipTemplate && 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 && 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\" [sticky]=\"true\" (rowClick)=\"addChip($event, filterInput)\" matSort [sortActive]=\"sortActive\" [sortDirection]=\"sortDirection\"></vd-dynamic-table>\n }\n <div class=\"vd-chips-paginator\">\n <mat-divider></mat-divider>\n <mat-paginator [length]=\"dataSource?.total ?? 0\" [pageIndex]=\"dataSource?.pageIndex ?? 0\" [pageSize]=\"dataSource?.pageSize ?? 15\" [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}::ng-deep .mat-mdc-table .mat-mdc-form-field .mdc-text-field--outlined .mat-mdc-notch-piece,::ng-deep .mat-mdc-table .mat-mdc-form-field .mdc-text-field--outlined .mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline))!important;border-width:var(--mat-form-field-outlined-outline-width, 1px)!important}\n"] }]
|
|
22264
22625
|
}], ctorParameters: () => [{ type: VdMediaService }], propDecorators: { dynamicTable: [{
|
|
22265
22626
|
type: ViewChild,
|
|
22266
22627
|
args: [VdDynamicTableComponent, { static: false }]
|
|
@@ -22773,6 +23134,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
22773
23134
|
args: [MAT_DATE_FORMATS]
|
|
22774
23135
|
}] }, { type: i0.ChangeDetectorRef }] });
|
|
22775
23136
|
|
|
23137
|
+
/**
|
|
23138
|
+
* @component EditFormActionsComponent
|
|
23139
|
+
* @description
|
|
23140
|
+
* Reusable action row for edit forms.
|
|
23141
|
+
* Uses the provided form context to derive button states and trigger
|
|
23142
|
+
* standard form actions (save, apply, cancel/back).
|
|
23143
|
+
*/
|
|
23144
|
+
class MsaEditFormActionsComponent {
|
|
23145
|
+
/**
|
|
23146
|
+
* Reference to the generic form context used by this action row.
|
|
23147
|
+
* @type {IGenericFormBaseComponent<any>}
|
|
23148
|
+
*/
|
|
23149
|
+
context;
|
|
23150
|
+
/**
|
|
23151
|
+
* Determines if the save action is disabled.
|
|
23152
|
+
* Save is disabled while saving is in progress or when form is readonly.
|
|
23153
|
+
* @type {boolean}
|
|
23154
|
+
*/
|
|
23155
|
+
get isSaveDisabled() {
|
|
23156
|
+
return !!(this.context.isSaving || this.context.readonly);
|
|
23157
|
+
}
|
|
23158
|
+
/**
|
|
23159
|
+
* Determines whether the apply button should be displayed.
|
|
23160
|
+
* Apply is only visible when the form is in edit mode.
|
|
23161
|
+
* @type {boolean}
|
|
23162
|
+
*/
|
|
23163
|
+
get isApplyVisible() {
|
|
23164
|
+
return !!this.context.isEditMode;
|
|
23165
|
+
}
|
|
23166
|
+
/**
|
|
23167
|
+
* Determines if the apply action is disabled.
|
|
23168
|
+
* Apply is disabled while saving is in progress or when form is readonly.
|
|
23169
|
+
* @type {boolean}
|
|
23170
|
+
*/
|
|
23171
|
+
get isApplyDisabled() {
|
|
23172
|
+
return !!(this.context.isSaving || this.context.readonly);
|
|
23173
|
+
}
|
|
23174
|
+
/**
|
|
23175
|
+
* Determines if the cancel action is disabled.
|
|
23176
|
+
* Cancel remains enabled by default.
|
|
23177
|
+
* @type {boolean}
|
|
23178
|
+
*/
|
|
23179
|
+
get isCancelDisabled() {
|
|
23180
|
+
return false;
|
|
23181
|
+
}
|
|
23182
|
+
/**
|
|
23183
|
+
* Triggers the context save action.
|
|
23184
|
+
*/
|
|
23185
|
+
onSave() {
|
|
23186
|
+
this.context.save();
|
|
23187
|
+
}
|
|
23188
|
+
/**
|
|
23189
|
+
* Triggers the context apply action.
|
|
23190
|
+
*/
|
|
23191
|
+
onApply() {
|
|
23192
|
+
this.context.apply();
|
|
23193
|
+
}
|
|
23194
|
+
/**
|
|
23195
|
+
* Triggers the context back action.
|
|
23196
|
+
*/
|
|
23197
|
+
onCancel() {
|
|
23198
|
+
this.context.back();
|
|
23199
|
+
}
|
|
23200
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MsaEditFormActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23201
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: MsaEditFormActionsComponent, isStandalone: true, selector: "[msa-edit-form-actions]", inputs: { context: "context" }, ngImport: i0, template: "<button type=\"button\" mat-flat-button color=\"primary\" [disabled]=\"isSaveDisabled\" (click)=\"onSave()\" i18n=\"@@save\">Save</button>\r\n@if (isApplyVisible) {\r\n <button type=\"button\" mat-button [disabled]=\"isApplyDisabled\" (click)=\"onApply()\" i18n=\"@@apply\">Apply</button>\r\n}\r\n<button type=\"button\" mat-button [disabled]=\"isCancelDisabled\" (click)=\"onCancel()\" i18n=\"@@cancel\">Cancel</button>\r\n<span class=\"spacer\"></span>", styles: [".spacer{flex:1 1 auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatExpansionModule }] });
|
|
23202
|
+
}
|
|
23203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MsaEditFormActionsComponent, decorators: [{
|
|
23204
|
+
type: Component,
|
|
23205
|
+
args: [{ selector: '[msa-edit-form-actions]', imports: [
|
|
23206
|
+
CommonModule,
|
|
23207
|
+
MatButtonModule,
|
|
23208
|
+
MatExpansionModule
|
|
23209
|
+
], template: "<button type=\"button\" mat-flat-button color=\"primary\" [disabled]=\"isSaveDisabled\" (click)=\"onSave()\" i18n=\"@@save\">Save</button>\r\n@if (isApplyVisible) {\r\n <button type=\"button\" mat-button [disabled]=\"isApplyDisabled\" (click)=\"onApply()\" i18n=\"@@apply\">Apply</button>\r\n}\r\n<button type=\"button\" mat-button [disabled]=\"isCancelDisabled\" (click)=\"onCancel()\" i18n=\"@@cancel\">Cancel</button>\r\n<span class=\"spacer\"></span>", styles: [".spacer{flex:1 1 auto}\n"] }]
|
|
23210
|
+
}], propDecorators: { context: [{
|
|
23211
|
+
type: Input
|
|
23212
|
+
}] } });
|
|
23213
|
+
|
|
22776
23214
|
/**
|
|
22777
23215
|
* VdListOptionDirective class
|
|
22778
23216
|
*/
|
|
@@ -23601,6 +24039,13 @@ class VdGenericFormComponent {
|
|
|
23601
24039
|
* @type {boolean}
|
|
23602
24040
|
*/
|
|
23603
24041
|
readonly;
|
|
24042
|
+
/**
|
|
24043
|
+
* @property onInit
|
|
24044
|
+
* @description Emitted after fields are built and filtered, allowing parent components to mutate `formGroup`,
|
|
24045
|
+
* `fieldRows`, or `fields` before dynamic subscriptions are attached.
|
|
24046
|
+
* @type {EventEmitter<VdGenericFormInitEvent>}
|
|
24047
|
+
*/
|
|
24048
|
+
onInit = new EventEmitter();
|
|
23604
24049
|
/**
|
|
23605
24050
|
* @property Key codes used for separating input values.
|
|
23606
24051
|
* @description The `separatorKeysCodes` is an array of key codes (e.g., for comma or enter) used for
|
|
@@ -23721,8 +24166,15 @@ class VdGenericFormComponent {
|
|
|
23721
24166
|
if (fields) {
|
|
23722
24167
|
this.fields = fields.map(a => ({ ...a }));
|
|
23723
24168
|
}
|
|
24169
|
+
/* Allow parent components to adjust form controls and field metadata before subscriptions are created. */
|
|
24170
|
+
this.onInit.emit({
|
|
24171
|
+
formGroup: this.formGroup,
|
|
24172
|
+
fieldRows: this.fieldRows,
|
|
24173
|
+
fields: this.fields,
|
|
24174
|
+
context: this.context
|
|
24175
|
+
});
|
|
23724
24176
|
/* Subscribe to value change events for fields with custom 'change' handlers */
|
|
23725
|
-
fields
|
|
24177
|
+
this.fields
|
|
23726
24178
|
?.filter(y => y.type != FormFieldType.File && y.change)
|
|
23727
24179
|
?.forEach(x => {
|
|
23728
24180
|
this.formGroup
|
|
@@ -23957,11 +24409,11 @@ class VdGenericFormComponent {
|
|
|
23957
24409
|
console.log(message, optionalParams);
|
|
23958
24410
|
}
|
|
23959
24411
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: VdGenericFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23960
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", 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\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\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\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\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\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\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\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\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\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\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\n <!-- #region Radio -->\n @case(FormFieldType.Radio) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass || 'radio-form-field'\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-radio-group radioMatFormControl [formControlName]=\"field.name!\" layout=\"row\" class=\"radio-group-inside-field\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n @for (option of $any(field.options); track option) {\n <mat-radio-button [value]=\"option.id\" class=\"mat-radio-button-wrap\">\n {{option.name}}\n </mat-radio-button>\n }\n </mat-radio-group>\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 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\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\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\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}.radio-form-field{width:100%}.radio-form-field ::ng-deep .mat-mdc-form-field-infix{padding-top:0!important;padding-bottom:0!important}.radio-form-field ::ng-deep .mat-mdc-floating-label{transform:translateY(-1.5em) scale(1)}.radio-form-field mat-radio-group{display:flex;flex-direction:row;gap:20px;padding-top:4px;margin-left:-12px}.radio-form-field .mat-mdc-form-field-infix{min-height:48px;display:flex;align-items:center}\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:
|
|
24412
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", 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" }, outputs: { onInit: "init" }, 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 [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\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 (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\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\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\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\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 (selectionChange)=\"field.itemSelect && field.itemSelect($event.value, formValue, formGroup, context);\"\n flex>\n @for (option of (field?.options | func:formValue:formGroup:context) ?? []; track option.id) {\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\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\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\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\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\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\n <!-- #region Radio -->\n @case(FormFieldType.Radio) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass || 'radio-form-field'\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-radio-group radioMatFormControl [formControlName]=\"field.name!\" layout=\"row\" class=\"radio-group-inside-field\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n @for (option of $any(field.options); track option) {\n <mat-radio-button [value]=\"option.id\" class=\"mat-radio-button-wrap\">\n {{option.name}}\n </mat-radio-button>\n }\n </mat-radio-group>\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 Editor -->\n @case (FormFieldType.Editor) {\n @if (editorTemplate && editorTemplate.templateRef) {\n <ng-template [ngTemplateOutlet]=\"editorTemplate.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n\n <!-- #region Code -->\n @case (FormFieldType.Code) {\n @if (codeTemplate && codeTemplate.templateRef) {\n <ng-template [ngTemplateOutlet]=\"codeTemplate.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n\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\n <!-- #region Custom -->\n @case (FormFieldType.Custom) {\n @if (customTemplate && 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}.radio-form-field{width:100%}.radio-form-field ::ng-deep .mat-mdc-form-field-infix{padding-top:0!important;padding-bottom:0!important}.radio-form-field ::ng-deep .mat-mdc-floating-label{transform:translateY(-1.5em) scale(1)}.radio-form-field mat-radio-group{display:flex;flex-direction:row;gap:20px;padding-top:4px;margin-left:-12px}.radio-form-field .mat-mdc-form-field-infix{min-height:48px;display:flex;align-items:center}\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:
|
|
23961
24413
|
//--------------------
|
|
23962
|
-
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
|
|
24414
|
+
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.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.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: i5.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$1.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: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i11.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i11.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type:
|
|
23963
24415
|
//--------------------
|
|
23964
|
-
VdChipsComponent, selector: "vd-chips", inputs: ["classType", "chips", "endpoint", "params", "projection", "paginated", "customValue", "context", "key", "searchField", "searchFields", "filters", "removable", "selectFirst", "debounce", "autocompleteCssClass", "suffixButtons"], outputs: ["initSelect", "selected", "cleared", "launch", "chipFocus"] }, { kind: "component", type: VdFileInputComponent, selector: "[vd-file-input]", inputs: ["accept", "placeholder", "required", "multiple", "disabled", "errorState"], outputs: ["select", "clear"] }, { kind: "ngmodule", type: VdFileModule }, { kind: "component", type: VdListComponent, selector: "vd-list" }, { kind: "component", type: VdSelectComponent, selector: "vd-select", inputs: ["triggerCssClass"
|
|
24416
|
+
VdChipsComponent, selector: "vd-chips", inputs: ["classType", "chips", "endpoint", "params", "projection", "paginated", "customValue", "context", "key", "searchField", "searchFields", "filters", "removable", "selectFirst", "debounce", "autocompleteCssClass", "suffixButtons"], outputs: ["initSelect", "selected", "cleared", "launch", "chipFocus"] }, { kind: "component", type: VdFileInputComponent, selector: "[vd-file-input]", inputs: ["accept", "placeholder", "required", "multiple", "disabled", "errorState"], outputs: ["select", "clear"] }, { kind: "ngmodule", type: VdFileModule }, { kind: "component", type: VdListComponent, selector: "vd-list" }, { kind: "component", type: VdSelectComponent, selector: "vd-select", inputs: ["triggerCssClass"] }, { kind: "directive", type: VdSelectOptionDirective, selector: "[vd-select-option]ng-template" }, { kind: "directive", type: VdSelectTriggerDirective, selector: "[vd-select-trigger]ng-template" }, { kind: "directive", type: VdChipDirective, selector: "[vd-chip]ng-template" }, { kind: "directive", type: VdAutocompleteOptionDirective, selector: "[vd-autocomplete-option]ng-template" }, { kind: "directive", type:
|
|
23965
24417
|
//--------------------
|
|
23966
24418
|
AutofocusDirective, selector: "[autoFocus]", inputs: ["focusDelay", "selectText", "autoFocus"] }, { kind: "directive", type: DisableControlDirective, selector: "[disableControl]", inputs: ["disableControl"] }, { kind: "ngmodule", type:
|
|
23967
24419
|
//--------------------
|
|
@@ -24006,7 +24458,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
24006
24458
|
RemoveWhitespaceDirective,
|
|
24007
24459
|
NativeElementInjectorDirective,
|
|
24008
24460
|
MatFormFieldRadioDirective
|
|
24009
|
-
], 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\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\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\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\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\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\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\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\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\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\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\n <!-- #region Radio -->\n @case(FormFieldType.Radio) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass || 'radio-form-field'\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-radio-group radioMatFormControl [formControlName]=\"field.name!\" layout=\"row\" class=\"radio-group-inside-field\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n @for (option of $any(field.options); track option) {\n <mat-radio-button [value]=\"option.id\" class=\"mat-radio-button-wrap\">\n {{option.name}}\n </mat-radio-button>\n }\n </mat-radio-group>\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 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\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\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\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}.radio-form-field{width:100%}.radio-form-field ::ng-deep .mat-mdc-form-field-infix{padding-top:0!important;padding-bottom:0!important}.radio-form-field ::ng-deep .mat-mdc-floating-label{transform:translateY(-1.5em) scale(1)}.radio-form-field mat-radio-group{display:flex;flex-direction:row;gap:20px;padding-top:4px;margin-left:-12px}.radio-form-field .mat-mdc-form-field-infix{min-height:48px;display:flex;align-items:center}\n"] }]
|
|
24461
|
+
], 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 [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\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 (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\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\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\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\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 (selectionChange)=\"field.itemSelect && field.itemSelect($event.value, formValue, formGroup, context);\"\n flex>\n @for (option of (field?.options | func:formValue:formGroup:context) ?? []; track option.id) {\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\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\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\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\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\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\n <!-- #region Radio -->\n @case(FormFieldType.Radio) {\n <mat-form-field [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass || 'radio-form-field'\" layout-margin>\n <mat-label>{{field.label}}</mat-label>\n <mat-radio-group radioMatFormControl [formControlName]=\"field.name!\" layout=\"row\" class=\"radio-group-inside-field\" [disableControl]=\"(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false\">\n @for (option of $any(field.options); track option) {\n <mat-radio-button [value]=\"option.id\" class=\"mat-radio-button-wrap\">\n {{option.name}}\n </mat-radio-button>\n }\n </mat-radio-group>\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 Editor -->\n @case (FormFieldType.Editor) {\n @if (editorTemplate && editorTemplate.templateRef) {\n <ng-template [ngTemplateOutlet]=\"editorTemplate.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n\n <!-- #region Code -->\n @case (FormFieldType.Code) {\n @if (codeTemplate && codeTemplate.templateRef) {\n <ng-template [ngTemplateOutlet]=\"codeTemplate.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\n }\n }\n <!-- #endregion -->\n\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\n <!-- #region Custom -->\n @case (FormFieldType.Custom) {\n @if (customTemplate && 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}.radio-form-field{width:100%}.radio-form-field ::ng-deep .mat-mdc-form-field-infix{padding-top:0!important;padding-bottom:0!important}.radio-form-field ::ng-deep .mat-mdc-floating-label{transform:translateY(-1.5em) scale(1)}.radio-form-field mat-radio-group{display:flex;flex-direction:row;gap:20px;padding-top:4px;margin-left:-12px}.radio-form-field .mat-mdc-form-field-infix{min-height:48px;display:flex;align-items:center}\n"] }]
|
|
24010
24462
|
}], propDecorators: { formGroup: [{
|
|
24011
24463
|
type: Input
|
|
24012
24464
|
}], classType: [{
|
|
@@ -24025,6 +24477,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
24025
24477
|
type: Input
|
|
24026
24478
|
}], readonly: [{
|
|
24027
24479
|
type: Input
|
|
24480
|
+
}], onInit: [{
|
|
24481
|
+
type: Output,
|
|
24482
|
+
args: ['init']
|
|
24028
24483
|
}], separatorKeysCodes: [{
|
|
24029
24484
|
type: Input
|
|
24030
24485
|
}], editorTemplate: [{
|
|
@@ -24813,6 +25268,7 @@ class FormFieldDefinition {
|
|
|
24813
25268
|
triggerMapper;
|
|
24814
25269
|
/**
|
|
24815
25270
|
* Mode of the trigger (e.g., chip).
|
|
25271
|
+
* @deprecated This property is no longer used and will be removed in a future version.
|
|
24816
25272
|
*/
|
|
24817
25273
|
triggerMode;
|
|
24818
25274
|
/**
|
|
@@ -24850,9 +25306,95 @@ class FormFieldDefinition {
|
|
|
24850
25306
|
|
|
24851
25307
|
const unwarppedFormFields = [FormFieldType.Checkbox, FormFieldType.Editor, FormFieldType.Code, FormFieldType.File, FormFieldType.Custom];
|
|
24852
25308
|
/**
|
|
24853
|
-
*
|
|
24854
|
-
* @param
|
|
24855
|
-
* @
|
|
25309
|
+
* Creates a form field definition based on the provided target, property key, and arguments.
|
|
25310
|
+
* @param target The target object containing the property.
|
|
25311
|
+
* @param propertyKey The key of the property for which the form field is being defined.
|
|
25312
|
+
* @param args Partial arguments to customize the form field definition.
|
|
25313
|
+
* @returns A FormFieldDefinition object representing the form field.
|
|
25314
|
+
*/
|
|
25315
|
+
function createFormFieldDefinition(target, propertyKey, args) {
|
|
25316
|
+
/* Get property type */
|
|
25317
|
+
var propertyType = Reflect.getMetadata("design:type", target, propertyKey)?.name;
|
|
25318
|
+
/* Get label from args, metadata, or property key */
|
|
25319
|
+
var label = args.label || Reflect.getMetadata(headerMetadataKey, target, propertyKey) || propertyKey;
|
|
25320
|
+
/* Create table column */
|
|
25321
|
+
var formField = new FormFieldDefinition(Object.assign(args, {
|
|
25322
|
+
name: args.name || propertyKey,
|
|
25323
|
+
label: label,
|
|
25324
|
+
autocompleteTemplate: args.autocompleteTemplate || ((option) => option[formField.autocompleteText ?? '']),
|
|
25325
|
+
chipTemplate: args.chipTemplate || ((chip) => (args.customValue ? chip : chip[formField.chipText ?? '']))
|
|
25326
|
+
}));
|
|
25327
|
+
/* Type enum */
|
|
25328
|
+
if (formField.enumType) {
|
|
25329
|
+
formField.type ||= FormFieldType.Enum;
|
|
25330
|
+
}
|
|
25331
|
+
/* Type VdSelect */
|
|
25332
|
+
else if (formField.endpoint) {
|
|
25333
|
+
formField.type ||= FormFieldType.VdSelect;
|
|
25334
|
+
}
|
|
25335
|
+
/* Type Select */
|
|
25336
|
+
else if (formField.options) {
|
|
25337
|
+
formField.type ||= FormFieldType.Select;
|
|
25338
|
+
}
|
|
25339
|
+
/* Type TextArea */
|
|
25340
|
+
else if (formField.rows) {
|
|
25341
|
+
formField.type ||= FormFieldType.TextArea;
|
|
25342
|
+
}
|
|
25343
|
+
/* Type File */
|
|
25344
|
+
else if (formField.filePath) {
|
|
25345
|
+
formField.type ||= FormFieldType.File;
|
|
25346
|
+
}
|
|
25347
|
+
/* Other types */
|
|
25348
|
+
else {
|
|
25349
|
+
switch (propertyType?.toLowerCase()) {
|
|
25350
|
+
case 'number':
|
|
25351
|
+
formField.type ||= FormFieldType.Text;
|
|
25352
|
+
formField.inputType ||= 'number';
|
|
25353
|
+
break;
|
|
25354
|
+
case 'date':
|
|
25355
|
+
formField.type ||= FormFieldType.Date;
|
|
25356
|
+
break;
|
|
25357
|
+
case 'boolean':
|
|
25358
|
+
formField.type ||= FormFieldType.Checkbox;
|
|
25359
|
+
break;
|
|
25360
|
+
default:
|
|
25361
|
+
formField.type ||= FormFieldType.Text;
|
|
25362
|
+
break;
|
|
25363
|
+
}
|
|
25364
|
+
}
|
|
25365
|
+
/* Set wrapped to false, if the field cant be wrapped in the <mat-form-field> */
|
|
25366
|
+
if (formField.type && unwarppedFormFields?.includes(formField.type)) {
|
|
25367
|
+
formField.wrapped = false;
|
|
25368
|
+
}
|
|
25369
|
+
/* Add class multiline to the form field */
|
|
25370
|
+
if (formField.multiline) {
|
|
25371
|
+
formField.cssClass += ' multiline';
|
|
25372
|
+
formField.cssClass = formField.cssClass?.trim();
|
|
25373
|
+
}
|
|
25374
|
+
/**
|
|
25375
|
+
* If the 'numbersOnly' flag is set to true and no custom pattern is defined,
|
|
25376
|
+
* set the pattern to allow only numbers after the optional prefix.
|
|
25377
|
+
*/
|
|
25378
|
+
if (formField.numbersOnly && !formField.pattern) {
|
|
25379
|
+
/* Get the prefix */
|
|
25380
|
+
const prefix = formField.prefix ?? '';
|
|
25381
|
+
/* Set pattern to allow only numbers after the prefix */
|
|
25382
|
+
if (prefix) {
|
|
25383
|
+
formField.pattern = new RegExp(`^${prefix}[0-9]*$`);
|
|
25384
|
+
}
|
|
25385
|
+
/* No prefix case */
|
|
25386
|
+
else {
|
|
25387
|
+
formField.pattern = /^[0-9]*$/;
|
|
25388
|
+
}
|
|
25389
|
+
}
|
|
25390
|
+
return formField;
|
|
25391
|
+
}
|
|
25392
|
+
|
|
25393
|
+
/**
|
|
25394
|
+
* Class decorator to define a form definition for a given class.
|
|
25395
|
+
* This decorator can be applied to a class to specify its form configuration, including endpoint, projection, actions, and field groups.
|
|
25396
|
+
* @param formDefinition Optional partial configuration to customize the resulting FormDefinition.
|
|
25397
|
+
* @returns A class decorator function.
|
|
24856
25398
|
*/
|
|
24857
25399
|
function Form(formDefinition) {
|
|
24858
25400
|
return function (target) {
|
|
@@ -24861,88 +25403,26 @@ function Form(formDefinition) {
|
|
|
24861
25403
|
};
|
|
24862
25404
|
}
|
|
24863
25405
|
/**
|
|
24864
|
-
* Property decorator to create form fields
|
|
24865
|
-
*
|
|
24866
|
-
* @
|
|
25406
|
+
* Property decorator to create and register form fields.
|
|
25407
|
+
* This decorator can be applied to a class property to automatically generate and register form fields based on the provided arguments.
|
|
25408
|
+
* @param args Partial arguments to customize the resulting FormFieldDefinition.
|
|
25409
|
+
* @returns A property decorator function.
|
|
24867
25410
|
*/
|
|
24868
25411
|
function FormField(args) {
|
|
24869
25412
|
return function (target, propertyKey) {
|
|
24870
25413
|
/* Get property name */
|
|
24871
25414
|
var propertyName = args.name || propertyKey;
|
|
24872
|
-
/* Get property type */
|
|
24873
|
-
var propertyType = Reflect.getMetadata("design:type", target, propertyKey)?.name;
|
|
24874
|
-
/* Create table column */
|
|
24875
|
-
var formField = new FormFieldDefinition(Object.assign(args, {
|
|
24876
|
-
name: args.name || propertyKey,
|
|
24877
|
-
label: args.label || Reflect.getMetadata(headerMetadataKey, target, propertyKey) || propertyName,
|
|
24878
|
-
autocompleteTemplate: args.autocompleteTemplate || ((option) => option[formField.autocompleteText ?? '']),
|
|
24879
|
-
chipTemplate: args.chipTemplate || ((chip) => (args.customValue ? chip : chip[formField.chipText ?? '']))
|
|
24880
|
-
}));
|
|
24881
|
-
/* Type enum */
|
|
24882
|
-
if (formField.enumType) {
|
|
24883
|
-
formField.type ||= FormFieldType.Enum;
|
|
24884
|
-
}
|
|
24885
|
-
/* Type VdSelect */
|
|
24886
|
-
else if (formField.endpoint) {
|
|
24887
|
-
formField.type ||= FormFieldType.VdSelect;
|
|
24888
|
-
}
|
|
24889
|
-
/* Type Select */
|
|
24890
|
-
else if (formField.options) {
|
|
24891
|
-
formField.type ||= FormFieldType.Select;
|
|
24892
|
-
}
|
|
24893
|
-
/* Type TextArea */
|
|
24894
|
-
else if (formField.rows) {
|
|
24895
|
-
formField.type ||= FormFieldType.TextArea;
|
|
24896
|
-
}
|
|
24897
|
-
/* Type File */
|
|
24898
|
-
else if (formField.filePath) {
|
|
24899
|
-
formField.type ||= FormFieldType.File;
|
|
24900
|
-
}
|
|
24901
|
-
/* Other types */
|
|
24902
|
-
else {
|
|
24903
|
-
switch (propertyType?.toLowerCase()) {
|
|
24904
|
-
case 'number':
|
|
24905
|
-
formField.type ||= FormFieldType.Text;
|
|
24906
|
-
formField.inputType ||= 'number';
|
|
24907
|
-
break;
|
|
24908
|
-
case 'date':
|
|
24909
|
-
formField.type ||= FormFieldType.Date;
|
|
24910
|
-
break;
|
|
24911
|
-
case 'boolean':
|
|
24912
|
-
formField.type ||= FormFieldType.Checkbox;
|
|
24913
|
-
break;
|
|
24914
|
-
default:
|
|
24915
|
-
formField.type ||= FormFieldType.Text;
|
|
24916
|
-
break;
|
|
24917
|
-
}
|
|
24918
|
-
}
|
|
24919
|
-
/* Set wrapped to false, if the field cant be wrapped in the <mat-form-field> */
|
|
24920
|
-
if (formField.type && unwarppedFormFields?.includes(formField.type)) {
|
|
24921
|
-
formField.wrapped = false;
|
|
24922
|
-
}
|
|
24923
|
-
/* Add class multiline to the form field */
|
|
24924
|
-
if (formField.multiline) {
|
|
24925
|
-
formField.cssClass += ' multiline';
|
|
24926
|
-
formField.cssClass = formField.cssClass?.trim();
|
|
24927
|
-
}
|
|
24928
|
-
/**
|
|
24929
|
-
* If the 'numbersOnly' flag is set to true and no custom pattern is defined,
|
|
24930
|
-
* set the pattern to allow only numbers after the optional prefix.
|
|
24931
|
-
*/
|
|
24932
|
-
if (formField.numbersOnly && !formField.pattern) {
|
|
24933
|
-
/* Get the prefix */
|
|
24934
|
-
const prefix = formField.prefix ?? '';
|
|
24935
|
-
/* Set pattern to allow only numbers after the prefix */
|
|
24936
|
-
if (prefix) {
|
|
24937
|
-
formField.pattern = new RegExp(`^${prefix}[0-9]*$`);
|
|
24938
|
-
}
|
|
24939
|
-
/* No prefix case */
|
|
24940
|
-
else {
|
|
24941
|
-
formField.pattern = /^[0-9]*$/;
|
|
24942
|
-
}
|
|
24943
|
-
}
|
|
24944
25415
|
/* Get old form fields */
|
|
24945
25416
|
let previousFormFields = Reflect.getMetadata(formFieldsMetadataKey, target);
|
|
25417
|
+
/* Override the field with the args, if exists */
|
|
25418
|
+
const previousFormField = previousFormFields?.find(x => x.name == propertyName);
|
|
25419
|
+
const formFieldArgs = previousFormField
|
|
25420
|
+
? Object.assign({}, previousFormField, args, {
|
|
25421
|
+
label: args.label || Reflect.getMetadata(headerMetadataKey, target, propertyKey) || propertyKey
|
|
25422
|
+
})
|
|
25423
|
+
: args;
|
|
25424
|
+
/* Create a new form field definition */
|
|
25425
|
+
var formField = createFormFieldDefinition(target, propertyKey, formFieldArgs);
|
|
24946
25426
|
/* Override the field, if exists */
|
|
24947
25427
|
previousFormFields = previousFormFields?.filter(x => x.name != formField.name);
|
|
24948
25428
|
/* Create a copy of the result */
|
|
@@ -24964,8 +25444,6 @@ function FormField(args) {
|
|
|
24964
25444
|
*/
|
|
24965
25445
|
function FormFieldGroup(type, args, context) {
|
|
24966
25446
|
return function (target, propertyKey) {
|
|
24967
|
-
/* Create an instance of the group object */
|
|
24968
|
-
var instance = Reflect.construct(type, []);
|
|
24969
25447
|
/* Retrieve form groups from the type, passing args and context */
|
|
24970
25448
|
var groups = getFormGroups(undefined, type, args, context);
|
|
24971
25449
|
/* Get the header of the groups or create one using the property name */
|
|
@@ -25462,6 +25940,12 @@ class VdMenuComponent {
|
|
|
25462
25940
|
*/
|
|
25463
25941
|
ngOnInit() {
|
|
25464
25942
|
this.media.registerQuery(`gt-sm`).subscribe((x) => { this.mobile = !x; });
|
|
25943
|
+
// if (this.items.length > 0) {
|
|
25944
|
+
// var testMenuItem = this.items.find((x: MenuItem) => x.id === 9);
|
|
25945
|
+
// if (testMenuItem) {
|
|
25946
|
+
// this.itemMouseEnter({ type: 'mouseenter' }, testMenuItem);
|
|
25947
|
+
// }
|
|
25948
|
+
// }
|
|
25465
25949
|
}
|
|
25466
25950
|
/**
|
|
25467
25951
|
* Event emitted when a meni item is clicked.
|
|
@@ -25489,10 +25973,10 @@ class VdMenuComponent {
|
|
|
25489
25973
|
* Event emitted when the cursor of the mouse is moved out of it.
|
|
25490
25974
|
*/
|
|
25491
25975
|
itemMouseLeave($event, item) {
|
|
25492
|
-
this.onMouseLeave.emit({ event: $event, item: item });
|
|
25976
|
+
// this.onMouseLeave.emit({ event: $event, item: item });
|
|
25493
25977
|
}
|
|
25494
25978
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: VdMenuComponent, deps: [{ token: VdMediaService }], target: i0.ɵɵFactoryTarget.Component });
|
|
25495
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", 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" }] });
|
|
25979
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", 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 <!-- #region main-menu-accordion -->\r\n <mat-accordion displayMode=\"flat\">\r\n @for (item of items; track item; let last = $last) {\r\n <!-- #region mobile-item-with-submenu -->\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 <!-- #region mobile-parent-item-header -->\r\n <mat-expansion-panel-header [expandedHeight]=\"'48px'\">\r\n <mat-panel-title>\r\n <!-- #region parent-item-icon-and-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 <!-- #endregion -->\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <!-- #endregion -->\r\n\r\n <!-- #region mobile-submenu-items -->\r\n <mat-nav-list>\r\n @for (subItem of item.items; track subItem; let subLast = $last) {\r\n <!-- #region visible-submenu-link -->\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 <!-- #region submenu-icon-and-text -->\r\n @if (!avatar) {\r\n <mat-icon [fontSet]=\"fontSet\" [style.color]=\"subItem.iconColor\" aria-hidden=\"false\">\r\n {{(subItem.icon | func:subItem) || 'radio_button_unchecked'}}\r\n </mat-icon>\r\n }\r\n\r\n @if (!avatar && subItem.title) {\r\n <span [style.color]=\"subItem.textColor\">{{subItem.title}}</span>\r\n }\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\r\n @if (avatar) {\r\n <h3>{{subItem.title}}</h3>\r\n }\r\n\r\n @if (avatar && subItem.description) {\r\n <p>{{subItem.description}}</p>\r\n }\r\n\r\n @if (subItem.badge && subItem.badge() !== 0) {\r\n <span matListItemMeta\r\n [matBadge]=\"subItem.badge()\"\r\n matBadgeOverlap=\"false\"\r\n matBadgePosition=\"above before\"\r\n class=\"menu-badge-align\">\r\n </span>\r\n }\r\n <!-- #endregion -->\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n\r\n <!-- #region submenu-divider-lines -->\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 <!-- #endregion -->\r\n }\r\n </mat-nav-list>\r\n <!-- #endregion -->\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n\r\n <!-- #region regular-menu-item -->\r\n } @else {\r\n <!-- #region regular-item-link -->\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 aria-hidden=\"false\"\r\n matListItemIcon>\r\n {{(item.icon | func:item) || 'radio_button_unchecked'}}\r\n </mat-icon>\r\n }\r\n\r\n @if (!avatar && item.title) {\r\n <span [style.color]=\"item.textColor\" matListItemTitle>{{item.title}}</span>\r\n }\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\r\n @if (avatar) {\r\n <h3 matLine>{{item.title}}</h3>\r\n }\r\n\r\n @if (avatar && item.description) {\r\n <p matLine>{{item.description}}</p>\r\n }\r\n\r\n @if (item.badge && item.badge() !== 0) {\r\n <span matListItemMeta\r\n [matBadge]=\"item.badge()\"\r\n matBadgeOverlap=\"false\"\r\n matBadgePosition=\"above before\"\r\n class=\"menu-badge-align\">\r\n </span>\r\n }\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n\r\n <!-- #region regular-item-divider-lines -->\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 <!-- #endregion -->\r\n }\r\n <!-- #endregion -->\r\n }\r\n </mat-accordion>\r\n <!-- #endregion -->\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}:host ::ng-deep .menu-badge-align{padding-top: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: "directive", type: i4$2.MatListItemMeta, selector: "[matListItemMeta]" }, { 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" }] });
|
|
25496
25980
|
}
|
|
25497
25981
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: VdMenuComponent, decorators: [{
|
|
25498
25982
|
type: Component,
|
|
@@ -25506,7 +25990,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
25506
25990
|
MatBadgeModule,
|
|
25507
25991
|
VdDelayedHoverDirective,
|
|
25508
25992
|
FuncPipe
|
|
25509
|
-
], 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"] }]
|
|
25993
|
+
], template: "<mat-nav-list>\r\n <!-- #region main-menu-accordion -->\r\n <mat-accordion displayMode=\"flat\">\r\n @for (item of items; track item; let last = $last) {\r\n <!-- #region mobile-item-with-submenu -->\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 <!-- #region mobile-parent-item-header -->\r\n <mat-expansion-panel-header [expandedHeight]=\"'48px'\">\r\n <mat-panel-title>\r\n <!-- #region parent-item-icon-and-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 <!-- #endregion -->\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <!-- #endregion -->\r\n\r\n <!-- #region mobile-submenu-items -->\r\n <mat-nav-list>\r\n @for (subItem of item.items; track subItem; let subLast = $last) {\r\n <!-- #region visible-submenu-link -->\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 <!-- #region submenu-icon-and-text -->\r\n @if (!avatar) {\r\n <mat-icon [fontSet]=\"fontSet\" [style.color]=\"subItem.iconColor\" aria-hidden=\"false\">\r\n {{(subItem.icon | func:subItem) || 'radio_button_unchecked'}}\r\n </mat-icon>\r\n }\r\n\r\n @if (!avatar && subItem.title) {\r\n <span [style.color]=\"subItem.textColor\">{{subItem.title}}</span>\r\n }\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\r\n @if (avatar) {\r\n <h3>{{subItem.title}}</h3>\r\n }\r\n\r\n @if (avatar && subItem.description) {\r\n <p>{{subItem.description}}</p>\r\n }\r\n\r\n @if (subItem.badge && subItem.badge() !== 0) {\r\n <span matListItemMeta\r\n [matBadge]=\"subItem.badge()\"\r\n matBadgeOverlap=\"false\"\r\n matBadgePosition=\"above before\"\r\n class=\"menu-badge-align\">\r\n </span>\r\n }\r\n <!-- #endregion -->\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n\r\n <!-- #region submenu-divider-lines -->\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 <!-- #endregion -->\r\n }\r\n </mat-nav-list>\r\n <!-- #endregion -->\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n\r\n <!-- #region regular-menu-item -->\r\n } @else {\r\n <!-- #region regular-item-link -->\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 aria-hidden=\"false\"\r\n matListItemIcon>\r\n {{(item.icon | func:item) || 'radio_button_unchecked'}}\r\n </mat-icon>\r\n }\r\n\r\n @if (!avatar && item.title) {\r\n <span [style.color]=\"item.textColor\" matListItemTitle>{{item.title}}</span>\r\n }\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\r\n @if (avatar) {\r\n <h3 matLine>{{item.title}}</h3>\r\n }\r\n\r\n @if (avatar && item.description) {\r\n <p matLine>{{item.description}}</p>\r\n }\r\n\r\n @if (item.badge && item.badge() !== 0) {\r\n <span matListItemMeta\r\n [matBadge]=\"item.badge()\"\r\n matBadgeOverlap=\"false\"\r\n matBadgePosition=\"above before\"\r\n class=\"menu-badge-align\">\r\n </span>\r\n }\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n\r\n <!-- #region regular-item-divider-lines -->\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 <!-- #endregion -->\r\n }\r\n <!-- #endregion -->\r\n }\r\n </mat-accordion>\r\n <!-- #endregion -->\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}:host ::ng-deep .menu-badge-align{padding-top:8px}\n"] }]
|
|
25510
25994
|
}], ctorParameters: () => [{ type: VdMediaService }], propDecorators: { items: [{
|
|
25511
25995
|
type: Input
|
|
25512
25996
|
}], activeExact: [{
|
|
@@ -25994,7 +26478,6 @@ __decorate([
|
|
|
25994
26478
|
};
|
|
25995
26479
|
},
|
|
25996
26480
|
multiple: true,
|
|
25997
|
-
triggerMode: 'chip',
|
|
25998
26481
|
hide: (_, __, ctx) => !ctx.isAdmin || (!ctx.settings?.multitenantable && !ctx.settings?.multiClients),
|
|
25999
26482
|
compareWith: (o, v) => o.clientId === v.clientId,
|
|
26000
26483
|
mapper: (x) => x.map(y => new MenuItemClient({ clientId: y.id, clientName: y.displayName })),
|
|
@@ -26027,7 +26510,6 @@ __decorate([
|
|
|
26027
26510
|
};
|
|
26028
26511
|
},
|
|
26029
26512
|
multiple: true,
|
|
26030
|
-
triggerMode: 'chip',
|
|
26031
26513
|
hide: (_, __, ctx) => (!ctx.isAdmin && !ctx.isClientAdmin) || (!ctx.settings?.multitenantable && !ctx.settings?.multiDepartments),
|
|
26032
26514
|
compareWith: (o, v) => o.departmentId === v.departmentId,
|
|
26033
26515
|
mapper: (x) => x.map(y => new MenuItemDepartment({ departmentId: y.id, departmentName: y.displayName })),
|
|
@@ -28481,5 +28963,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
28481
28963
|
* Generated bundle index. Do not edit.
|
|
28482
28964
|
*/
|
|
28483
28965
|
|
|
28484
|
-
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, MatFormFieldRadioDirective, 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, VdDialogHeaderActionsComponent, VdDialogHeaderComponent, VdDialogMaximizeDirective, 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 };
|
|
28966
|
+
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, MatFormFieldRadioDirective, MatFormFieldReadonlyDirective, Menu, MenuClient, MenuDepartment, MenuFormIncludesResolve, MenuItem, MenuItemClient, MenuItemDepartment, MenuItemFormIncludesResolve, MenuItemService, MenuItemTarget, MenuListProjectionResolve, MenuResolve, MenuScope, MenuSettings, MenuSettingsResolve, MessageType, ModifiableEntity, MonthNamePipe, MsaEditFormActionsComponent, MsaEnumDisplayComponent, 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, VdDialogHeaderActionsComponent, VdDialogHeaderComponent, VdDialogMaximizeDirective, 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, graphql, 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, parseProjectionString, 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 };
|
|
28485
28967
|
//# sourceMappingURL=messaia-cdk.mjs.map
|