@messaia/cdk 22.0.1-rc.8 → 22.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/fesm2022/messaia-cdk.mjs +1047 -501
- package/fesm2022/messaia-cdk.mjs.map +1 -1
- package/lib/common/styles/utilities/_general.scss +6 -0
- package/package.json +1 -1
- package/types/messaia-cdk.d.ts +522 -90
package/fesm2022/messaia-cdk.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i1$2 from '@angular/common';
|
|
2
2
|
import { Location, getLocaleNumberSymbol, NumberSymbol, CommonModule, DecimalPipe, NgClass, JsonPipe } from '@angular/common';
|
|
3
3
|
import * as i1$7 from '@angular/common/http';
|
|
4
|
-
import { HttpHeaders, HttpParams, HttpClient, HttpRequest, HttpEventType, HttpResponse } from '@angular/common/http';
|
|
4
|
+
import { HttpErrorResponse, HttpHeaders, HttpParams, HttpClient, HttpRequest, HttpEventType, HttpResponse } from '@angular/common/http';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Injectable, ChangeDetectionStrategy, Component, Directive, ContentChildren, Optional, SkipSelf, NgZone, InjectionToken,
|
|
6
|
+
import { Injectable, ChangeDetectionStrategy, Component, Directive, ContentChildren, Optional, SkipSelf, NgZone, InjectionToken, inject, ChangeDetectorRef, Inject, EventEmitter, ElementRef, ViewChildren, Output, Input, HostListener, forwardRef, LOCALE_ID, NgModule, Pipe, input, computed, ViewChild, HostAttributeToken, HostBinding, ContentChild, ViewContainerRef, TemplateRef, Self, SimpleChange, Attribute, SecurityContext } from '@angular/core';
|
|
7
7
|
import * as i1 from '@angular/material/dialog';
|
|
8
|
-
import { MatDialogModule, MatDialogConfig, MatDialog, MAT_DIALOG_DATA, MatDialogTitle } from '@angular/material/dialog';
|
|
8
|
+
import { MatDialogModule, MatDialogConfig, MatDialog, MatDialogState, MAT_DIALOG_DATA, MatDialogTitle } from '@angular/material/dialog';
|
|
9
9
|
import * as i6$1 from '@angular/material/expansion';
|
|
10
10
|
import { MatExpansionPanel, MatExpansionModule } from '@angular/material/expansion';
|
|
11
11
|
import * as i2$4 from '@angular/material/snack-bar';
|
|
@@ -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$6 from '@angular/router';
|
|
16
16
|
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
17
|
-
import { fromEvent, Subject, switchMap, timer, takeUntil as takeUntil$1, filter, map, tap, merge as merge$1, of, BehaviorSubject, firstValueFrom, throwError,
|
|
17
|
+
import { fromEvent, Subject, switchMap, timer, takeUntil as takeUntil$1, filter, map, tap, merge as merge$1, of, BehaviorSubject, firstValueFrom, throwError, debounceTime, distinctUntilChanged, 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 i4 from '@angular/material/icon';
|
|
@@ -31,7 +31,6 @@ import * as i5 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, style, AUTO_STYLE, transition, animate } from '@angular/animations';
|
|
35
34
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
36
35
|
import * as i2$3 from '@angular/cdk/table';
|
|
37
36
|
import { DataSource, CdkTableModule } from '@angular/cdk/table';
|
|
@@ -848,6 +847,10 @@ class TaskDialogData {
|
|
|
848
847
|
* @type {string}
|
|
849
848
|
*/
|
|
850
849
|
errorMessage;
|
|
850
|
+
/**
|
|
851
|
+
* Opts in to displaying API error messages alongside the task's failure message.
|
|
852
|
+
*/
|
|
853
|
+
showErrorDetails;
|
|
851
854
|
/**
|
|
852
855
|
* Content of the dialog, usually descriptive text
|
|
853
856
|
* @type {string}
|
|
@@ -898,6 +901,10 @@ class TaskDialogData {
|
|
|
898
901
|
* @type {string}
|
|
899
902
|
*/
|
|
900
903
|
successButtonText;
|
|
904
|
+
/**
|
|
905
|
+
* Label for the manual retry button shown after failure. The task must support re-subscription.
|
|
906
|
+
*/
|
|
907
|
+
retryButtonText;
|
|
901
908
|
/**
|
|
902
909
|
* Callback function to execute on success button click
|
|
903
910
|
* @type {Function}
|
|
@@ -917,14 +924,68 @@ class TaskDialogData {
|
|
|
917
924
|
}
|
|
918
925
|
}
|
|
919
926
|
|
|
927
|
+
/**
|
|
928
|
+
* Extracts user-facing text from API error bodies without displaying transport metadata.
|
|
929
|
+
*
|
|
930
|
+
* @param body - The API response body, not the HTTP error wrapper.
|
|
931
|
+
* @returns The messages to display, or an empty array if the caller should use its fallback.
|
|
932
|
+
*/
|
|
933
|
+
function getApiErrorMessages(body) {
|
|
934
|
+
/* Handle simple string messages or arrays of messages directly. */
|
|
935
|
+
if (typeof body === 'string' || Array.isArray(body)) {
|
|
936
|
+
return distinctMessages([body].flat());
|
|
937
|
+
}
|
|
938
|
+
/* If the body is a primitive type or an array, treat it as a list of messages. */
|
|
939
|
+
if (body === null || typeof body !== 'object') {
|
|
940
|
+
return [];
|
|
941
|
+
}
|
|
942
|
+
/* Extract known error fields from the response body */
|
|
943
|
+
const { title, detail, message, error, errors } = body;
|
|
944
|
+
/* Validation errors may be grouped by field name or returned as a single string or list. */
|
|
945
|
+
const validationMessages = errors && typeof errors === 'object' && !Array.isArray(errors)
|
|
946
|
+
? Object.values(errors)
|
|
947
|
+
: [errors];
|
|
948
|
+
/* Combine all extracted messages and remove duplicates */
|
|
949
|
+
const messages = distinctMessages([title, detail, message, error, ...validationMessages.flat()]);
|
|
950
|
+
if (messages.length) {
|
|
951
|
+
return messages;
|
|
952
|
+
}
|
|
953
|
+
/* Older validation responses put message arrays directly under field names. */
|
|
954
|
+
return distinctMessages(Object.values(body).filter(Array.isArray).flat());
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Normalizes candidate messages without converting non-string values to display text.
|
|
958
|
+
*
|
|
959
|
+
* @param values - Candidate message values extracted from the response.
|
|
960
|
+
* @returns Trimmed, non-empty messages with duplicates removed in first-seen order.
|
|
961
|
+
*/
|
|
962
|
+
function distinctMessages(values) {
|
|
963
|
+
/* Normalize candidate messages by filtering out non-string values, trimming, and removing duplicates. */
|
|
964
|
+
const messages = values
|
|
965
|
+
.filter((value) => typeof value === 'string')
|
|
966
|
+
.map(value => value.trim())
|
|
967
|
+
.filter(Boolean);
|
|
968
|
+
return [...new Set(messages)];
|
|
969
|
+
}
|
|
970
|
+
|
|
920
971
|
class VdTaskDialogComponent {
|
|
921
972
|
dialogRef;
|
|
922
973
|
data;
|
|
974
|
+
/**
|
|
975
|
+
* Marks the dialog for a view update when an asynchronous task succeeds or fails.
|
|
976
|
+
* @type {ChangeDetectorRef}
|
|
977
|
+
*/
|
|
978
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
923
979
|
/**
|
|
924
980
|
* The message content displayed within the dialog.
|
|
925
981
|
* @type {string | undefined}
|
|
926
982
|
*/
|
|
927
983
|
content;
|
|
984
|
+
/**
|
|
985
|
+
* User-facing API messages for the current attempt, populated only when enabled.
|
|
986
|
+
* @type {string[]}
|
|
987
|
+
*/
|
|
988
|
+
errorDetails = [];
|
|
928
989
|
/**
|
|
929
990
|
* The result of the task, if available.
|
|
930
991
|
* @type {any}
|
|
@@ -955,10 +1016,37 @@ class VdTaskDialogComponent {
|
|
|
955
1016
|
this.data = data;
|
|
956
1017
|
}
|
|
957
1018
|
/**
|
|
958
|
-
*
|
|
959
|
-
* Subscribes to the task observable and handles success or error callbacks.
|
|
1019
|
+
* Starts the first attempt before Angular checks the task state in the view.
|
|
960
1020
|
*/
|
|
961
|
-
|
|
1021
|
+
ngOnInit() {
|
|
1022
|
+
this.runTask();
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* Retry is opt-in and shown only after a failure. Cancel also ends the in-progress state,
|
|
1026
|
+
* so check that the dialog is still open before offering Retry.
|
|
1027
|
+
*/
|
|
1028
|
+
get canRetry() {
|
|
1029
|
+
return !!this.data.retryButtonText && this.shouldShow('failed')
|
|
1030
|
+
&& this.dialogRef.getState() === MatDialogState.OPEN;
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Re-subscribes to the task without reopening the dialog. Recheck eligibility here
|
|
1034
|
+
* so a second click cannot start an overlapping attempt before the button disappears.
|
|
1035
|
+
*/
|
|
1036
|
+
retry() {
|
|
1037
|
+
if (this.canRetry) {
|
|
1038
|
+
this.runTask();
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* Executes the task and manages its state, including in-progress, success, and error handling.
|
|
1043
|
+
*/
|
|
1044
|
+
runTask() {
|
|
1045
|
+
/* Reset before subscribing so retries cannot overlap and old errors do not carry over. */
|
|
1046
|
+
this.inProgress = true;
|
|
1047
|
+
this.succeeded = false;
|
|
1048
|
+
this.result = undefined;
|
|
1049
|
+
this.errorDetails = [];
|
|
962
1050
|
this.content = this.data.inProgressMessage;
|
|
963
1051
|
this.data.task
|
|
964
1052
|
/* Take until unsubscribe signal */
|
|
@@ -974,6 +1062,7 @@ class VdTaskDialogComponent {
|
|
|
974
1062
|
this.result = result;
|
|
975
1063
|
/* Update the content with the success message */
|
|
976
1064
|
this.content = this.data.successMessage;
|
|
1065
|
+
this.changeDetector.markForCheck();
|
|
977
1066
|
/* If a success callback is provided, invoke it with the result */
|
|
978
1067
|
if (this.data.successCallback) {
|
|
979
1068
|
this.data.successCallback(result, this.dialogRef);
|
|
@@ -989,6 +1078,11 @@ class VdTaskDialogComponent {
|
|
|
989
1078
|
this.result = errors;
|
|
990
1079
|
/* Update the content with the error message */
|
|
991
1080
|
this.content = this.data.errorMessage;
|
|
1081
|
+
/* Read the response body instead of the HTTP status message. Keep the dialog's failure message if the body has no usable details. */
|
|
1082
|
+
if (this.data.showErrorDetails) {
|
|
1083
|
+
this.errorDetails = getApiErrorMessages(errors instanceof HttpErrorResponse ? errors.error : errors);
|
|
1084
|
+
}
|
|
1085
|
+
this.changeDetector.markForCheck();
|
|
992
1086
|
/* If an error callback is provided, invoke it with the errors */
|
|
993
1087
|
if (this.data.errorCallback) {
|
|
994
1088
|
this.data.errorCallback(errors, this.dialogRef);
|
|
@@ -1074,7 +1168,7 @@ class VdTaskDialogComponent {
|
|
|
1074
1168
|
this.unsubscribe.complete();
|
|
1075
1169
|
}
|
|
1076
1170
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: VdTaskDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
1077
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: VdTaskDialogComponent, isStandalone: true, selector: "vd-task-dialog", ngImport: i0, template: "<div mat-dialog-title class=\"mat-headline-6\" cdkDragRootElement=\".cdk-overlay-pane\" cdkDrag cdkDragHandle>{{this.data.title}}</div>\r\n@if (inProgress) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n}\r\n@if (!inProgress) {\r\n <mat-progress-bar mode=\"determinate\" value=\"100\"></mat-progress-bar>\r\n}\r\n<div mat-dialog-content
|
|
1171
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: VdTaskDialogComponent, isStandalone: true, selector: "vd-task-dialog", ngImport: i0, template: "<div mat-dialog-title class=\"mat-headline-6\" cdkDragRootElement=\".cdk-overlay-pane\" cdkDrag cdkDragHandle>{{this.data.title}}</div>\r\n@if (inProgress) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n}\r\n@if (!inProgress) {\r\n <mat-progress-bar mode=\"determinate\" value=\"100\"></mat-progress-bar>\r\n}\r\n<div mat-dialog-content aria-live=\"polite\">\r\n {{content}}\r\n @if (errorDetails.length) {\r\n <ul class=\"task-error-details\">\r\n @for (detail of errorDetails; track detail) {\r\n <li>{{detail}}</li>\r\n }\r\n </ul>\r\n }\r\n</div>\r\n<div mat-dialog-actions class=\"pad-top\">\r\n @for (btn of data.buttons; track btn) {\r\n @if (btn.type === 'flat' && shouldShow(btn.showWhen)) {\r\n <button type=\"button\" mat-flat-button [color]=\"btn.color\" (click)=\"onButtonClick(btn)\">{{ btn.text }}</button>\r\n }\r\n @if (btn.type !== 'flat' && shouldShow(btn.showWhen)) {\r\n <button type=\"button\" mat-button [color]=\"btn.color\" (click)=\"onButtonClick(btn)\">{{ btn.text }}</button>\r\n }\r\n }\r\n @if (this.data.successButtonClick && succeeded) {\r\n <button type=\"button\" mat-flat-button (click)=\"success()\" color=\"primary\" (click)=\"null\">{{this.data.successButtonText}}</button>\r\n }\r\n @if (canRetry) {\r\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"retry()\">{{data.retryButtonText}}</button>\r\n }\r\n @if (inProgress) {\r\n <button type=\"button\" mat-button (click)=\"cancel()\" autofocus>{{this.data.cancelButtonText}}</button>\r\n }\r\n @if (!inProgress) {\r\n <button type=\"button\" mat-button (click)=\"close()\" autofocus>{{this.data.closeButtonText}}</button>\r\n }\r\n</div>", styles: [".task-error-details{white-space:pre-line;overflow-wrap:anywhere;padding-left:16px;padding-top:8px}\n"], dependencies: [{ 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: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i3.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
1078
1172
|
}
|
|
1079
1173
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: VdTaskDialogComponent, decorators: [{
|
|
1080
1174
|
type: Component,
|
|
@@ -1082,7 +1176,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
1082
1176
|
MatButtonModule,
|
|
1083
1177
|
MatDialogModule,
|
|
1084
1178
|
MatProgressBarModule
|
|
1085
|
-
], template: "<div mat-dialog-title class=\"mat-headline-6\" cdkDragRootElement=\".cdk-overlay-pane\" cdkDrag cdkDragHandle>{{this.data.title}}</div>\r\n@if (inProgress) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n}\r\n@if (!inProgress) {\r\n <mat-progress-bar mode=\"determinate\" value=\"100\"></mat-progress-bar>\r\n}\r\n<div mat-dialog-content
|
|
1179
|
+
], template: "<div mat-dialog-title class=\"mat-headline-6\" cdkDragRootElement=\".cdk-overlay-pane\" cdkDrag cdkDragHandle>{{this.data.title}}</div>\r\n@if (inProgress) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n}\r\n@if (!inProgress) {\r\n <mat-progress-bar mode=\"determinate\" value=\"100\"></mat-progress-bar>\r\n}\r\n<div mat-dialog-content aria-live=\"polite\">\r\n {{content}}\r\n @if (errorDetails.length) {\r\n <ul class=\"task-error-details\">\r\n @for (detail of errorDetails; track detail) {\r\n <li>{{detail}}</li>\r\n }\r\n </ul>\r\n }\r\n</div>\r\n<div mat-dialog-actions class=\"pad-top\">\r\n @for (btn of data.buttons; track btn) {\r\n @if (btn.type === 'flat' && shouldShow(btn.showWhen)) {\r\n <button type=\"button\" mat-flat-button [color]=\"btn.color\" (click)=\"onButtonClick(btn)\">{{ btn.text }}</button>\r\n }\r\n @if (btn.type !== 'flat' && shouldShow(btn.showWhen)) {\r\n <button type=\"button\" mat-button [color]=\"btn.color\" (click)=\"onButtonClick(btn)\">{{ btn.text }}</button>\r\n }\r\n }\r\n @if (this.data.successButtonClick && succeeded) {\r\n <button type=\"button\" mat-flat-button (click)=\"success()\" color=\"primary\" (click)=\"null\">{{this.data.successButtonText}}</button>\r\n }\r\n @if (canRetry) {\r\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"retry()\">{{data.retryButtonText}}</button>\r\n }\r\n @if (inProgress) {\r\n <button type=\"button\" mat-button (click)=\"cancel()\" autofocus>{{this.data.cancelButtonText}}</button>\r\n }\r\n @if (!inProgress) {\r\n <button type=\"button\" mat-button (click)=\"close()\" autofocus>{{this.data.closeButtonText}}</button>\r\n }\r\n</div>", styles: [".task-error-details{white-space:pre-line;overflow-wrap:anywhere;padding-left:16px;padding-top:8px}\n"] }]
|
|
1086
1180
|
}], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: TaskDialogData, decorators: [{
|
|
1087
1181
|
type: Inject,
|
|
1088
1182
|
args: [MAT_DIALOG_DATA]
|
|
@@ -1588,6 +1682,13 @@ class BaseComponent {
|
|
|
1588
1682
|
if (errorCallback) {
|
|
1589
1683
|
errorCallback(errors);
|
|
1590
1684
|
}
|
|
1685
|
+
else {
|
|
1686
|
+
/* Provide visible feedback when the caller has no custom error handler */
|
|
1687
|
+
this.parseErrors(errors);
|
|
1688
|
+
if (this.errors.length) {
|
|
1689
|
+
this.showMessage(this.errors.join('\n'), MessageType.Error);
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1591
1692
|
}
|
|
1592
1693
|
});
|
|
1593
1694
|
}
|
|
@@ -1899,6 +2000,25 @@ class BaseComponent {
|
|
|
1899
2000
|
this.errors = [];
|
|
1900
2001
|
this.isLoading = false;
|
|
1901
2002
|
this.isSaving = false;
|
|
2003
|
+
/* Unwrap HttpErrorResponse instances when request-level error handling is disabled */
|
|
2004
|
+
if (errors?.error != null) {
|
|
2005
|
+
errors = errors.error;
|
|
2006
|
+
}
|
|
2007
|
+
/* Keep plain error messages intact instead of iterating over their characters */
|
|
2008
|
+
if (typeof errors === 'string') {
|
|
2009
|
+
this.errors.push(errors);
|
|
2010
|
+
return;
|
|
2011
|
+
}
|
|
2012
|
+
/* Extract user-facing fields from RFC problem responses and ignore transport metadata */
|
|
2013
|
+
if (typeof errors?.title === 'string' || typeof errors?.detail === 'string') {
|
|
2014
|
+
if (typeof errors.title === 'string') {
|
|
2015
|
+
this.errors.push(errors.title);
|
|
2016
|
+
}
|
|
2017
|
+
if (typeof errors.detail === 'string' && errors.detail !== errors.title) {
|
|
2018
|
+
this.errors.push(errors.detail);
|
|
2019
|
+
}
|
|
2020
|
+
return;
|
|
2021
|
+
}
|
|
1902
2022
|
/* If there are errors, iterate through them and add them to the errors array */
|
|
1903
2023
|
if (errors) {
|
|
1904
2024
|
Object.keys(errors).forEach(el => {
|
|
@@ -13242,6 +13362,11 @@ class TableColumn {
|
|
|
13242
13362
|
* @property
|
|
13243
13363
|
*/
|
|
13244
13364
|
multiple = false;
|
|
13365
|
+
/**
|
|
13366
|
+
* The property of the entity that this column represents.
|
|
13367
|
+
* @property
|
|
13368
|
+
*/
|
|
13369
|
+
property;
|
|
13245
13370
|
/**
|
|
13246
13371
|
* The name of the column.
|
|
13247
13372
|
* @property
|
|
@@ -13341,6 +13466,7 @@ function buildColumn(propertyKey, args, propertyType, target) {
|
|
|
13341
13466
|
/* Create a new instance of TableColumn with the provided arguments */
|
|
13342
13467
|
let tableColumn = new TableColumn(args);
|
|
13343
13468
|
/* Set default values for the table column properties */
|
|
13469
|
+
tableColumn.property = propertyKey;
|
|
13344
13470
|
tableColumn.name ||= propertyKey;
|
|
13345
13471
|
tableColumn.header ||= (target ? getDisplay(target, propertyKey) : null) || tableColumn.name;
|
|
13346
13472
|
tableColumn.filter ||= tableColumn.name;
|
|
@@ -13432,14 +13558,14 @@ function Column(args) {
|
|
|
13432
13558
|
/* Get old table columns */
|
|
13433
13559
|
let previousTableColumns = Reflect.getMetadata(TABLE_COLUMNS_METADATA_KEY, target);
|
|
13434
13560
|
/* Override the field with the args, if exists */
|
|
13435
|
-
const previousTableColumn = previousTableColumns?.find(x => x.
|
|
13561
|
+
const previousTableColumn = previousTableColumns?.find(x => x.property == propertyKey);
|
|
13436
13562
|
const tableColumnArgs = previousTableColumn
|
|
13437
13563
|
? Object.assign({}, previousTableColumn, args)
|
|
13438
13564
|
: args;
|
|
13439
13565
|
/* Build the structural column using the factory method */
|
|
13440
13566
|
let tableColumn = buildColumn(propertyKey, tableColumnArgs, designType, target);
|
|
13441
13567
|
/* Override the field, if exists */
|
|
13442
|
-
previousTableColumns = previousTableColumns?.filter(x => x.
|
|
13568
|
+
previousTableColumns = previousTableColumns?.filter(x => x.property != tableColumn.property);
|
|
13443
13569
|
/* Create a copy of the result */
|
|
13444
13570
|
let tableColumns = previousTableColumns ? previousTableColumns.concat([tableColumn]) : [tableColumn];
|
|
13445
13571
|
/* Set column index */
|
|
@@ -15015,72 +15141,39 @@ class GenericService {
|
|
|
15015
15141
|
getListAsObservable() {
|
|
15016
15142
|
return this.list.asObservable();
|
|
15017
15143
|
}
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
* @param path Optional relative path to the action
|
|
15022
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15023
|
-
* @param handleError Whether to handle errors (default: true)
|
|
15024
|
-
*/
|
|
15025
|
-
create(entity, path, httpOptions, handleError = true, showMessage = false) {
|
|
15026
|
-
const options = this.withShowMessage(httpOptions, showMessage);
|
|
15144
|
+
create(entity, path, optionsOrHttpOptions, handleError = true, showMessage = false) {
|
|
15145
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, handleError, showMessage);
|
|
15146
|
+
const options = this.withShowMessage(resolved.httpOptions, resolved.showMessage);
|
|
15027
15147
|
let request = this.http
|
|
15028
15148
|
.post(`${this.endpoint}${path ? path : ''}`, entity, options);
|
|
15029
15149
|
/* Handle error */
|
|
15030
|
-
if (handleError) {
|
|
15150
|
+
if (resolved.handleError) {
|
|
15031
15151
|
request = request.pipe(catchError(this.handleError('create')));
|
|
15032
15152
|
}
|
|
15033
15153
|
return request;
|
|
15034
15154
|
}
|
|
15035
|
-
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
* @param path Optional relative path to the action
|
|
15039
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15040
|
-
* @returns Promise resolving to the created entity
|
|
15041
|
-
*/
|
|
15042
|
-
async createAsync(entity, path, httpOptions, showMessage = false) {
|
|
15043
|
-
return await firstValueFrom(this.create(entity, path, httpOptions, true, showMessage));
|
|
15155
|
+
async createAsync(entity, path, optionsOrHttpOptions, showMessage = false) {
|
|
15156
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, true, showMessage);
|
|
15157
|
+
return await firstValueFrom(this.create(entity, path, resolved.httpOptions, resolved.handleError, resolved.showMessage));
|
|
15044
15158
|
}
|
|
15045
|
-
|
|
15046
|
-
|
|
15047
|
-
|
|
15048
|
-
* @param entity The updated entity data
|
|
15049
|
-
* @param path Optional relative path to the action
|
|
15050
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15051
|
-
* @param handleError Whether to handle errors (default: true)
|
|
15052
|
-
*/
|
|
15053
|
-
update(id, entity, path, httpOptions, handleError = true, showMessage = false) {
|
|
15054
|
-
const options = this.withShowMessage(httpOptions, showMessage);
|
|
15159
|
+
update(id, entity, path, optionsOrHttpOptions, handleError = true, showMessage = false) {
|
|
15160
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, handleError, showMessage);
|
|
15161
|
+
const options = this.withShowMessage(resolved.httpOptions, resolved.showMessage);
|
|
15055
15162
|
let request = this.http
|
|
15056
15163
|
.put(`${this.endpoint}${path ? path : ''}/${id}`, entity, options);
|
|
15057
15164
|
/* Handle error */
|
|
15058
|
-
if (handleError) {
|
|
15165
|
+
if (resolved.handleError) {
|
|
15059
15166
|
request = request.pipe(catchError(this.handleError('update')));
|
|
15060
15167
|
}
|
|
15061
15168
|
return request;
|
|
15062
15169
|
}
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
* @param entity The updated entity data
|
|
15067
|
-
* @param path Optional relative path to the action
|
|
15068
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15069
|
-
* @returns Promise resolving to the updated entity
|
|
15070
|
-
*/
|
|
15071
|
-
async updateAsync(id, entity, path, httpOptions, showMessage = false) {
|
|
15072
|
-
return await firstValueFrom(this.update(id, entity, path, httpOptions, true, showMessage));
|
|
15170
|
+
async updateAsync(id, entity, path, optionsOrHttpOptions, showMessage = false) {
|
|
15171
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, true, showMessage);
|
|
15172
|
+
return await firstValueFrom(this.update(id, entity, path, resolved.httpOptions, resolved.handleError, resolved.showMessage));
|
|
15073
15173
|
}
|
|
15074
|
-
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
* @param body The patch body
|
|
15078
|
-
* @param path Optional relative path to the action
|
|
15079
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15080
|
-
* @param handleError Whether to handle errors (default: true)
|
|
15081
|
-
*/
|
|
15082
|
-
patch(id, body, path, httpOptions, handleError = true, showMessage = false) {
|
|
15083
|
-
const options = this.withShowMessage(httpOptions, showMessage);
|
|
15174
|
+
patch(id, body, path, optionsOrHttpOptions, handleError = true, showMessage = false) {
|
|
15175
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, handleError, showMessage);
|
|
15176
|
+
const options = this.withShowMessage(resolved.httpOptions, resolved.showMessage) || {};
|
|
15084
15177
|
/* Ensure correct content-type for patch */
|
|
15085
15178
|
const mergedHeaders = options?.headers instanceof HttpHeaders
|
|
15086
15179
|
? options.headers
|
|
@@ -15089,103 +15182,58 @@ class GenericService {
|
|
|
15089
15182
|
/* Create request */
|
|
15090
15183
|
let request = this.http.patch(`${this.endpoint}${path ? path : ''}/${id}`, body, options);
|
|
15091
15184
|
/* Handle error */
|
|
15092
|
-
if (handleError) {
|
|
15185
|
+
if (resolved.handleError) {
|
|
15093
15186
|
request = request.pipe(catchError(this.handleError('patch')));
|
|
15094
15187
|
}
|
|
15095
15188
|
return request;
|
|
15096
15189
|
}
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
* @param body The patch body
|
|
15101
|
-
* @param path Optional relative path to the action
|
|
15102
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15103
|
-
* @returns Promise resolving to the patched entity
|
|
15104
|
-
*/
|
|
15105
|
-
async patchAsync(id, body, path, httpOptions, showMessage = false) {
|
|
15106
|
-
return await firstValueFrom(this.patch(id, body, path, httpOptions, true, showMessage));
|
|
15190
|
+
async patchAsync(id, body, path, optionsOrHttpOptions, showMessage = false) {
|
|
15191
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, true, showMessage);
|
|
15192
|
+
return await firstValueFrom(this.patch(id, body, path, resolved.httpOptions, resolved.handleError, resolved.showMessage));
|
|
15107
15193
|
}
|
|
15108
|
-
|
|
15109
|
-
|
|
15110
|
-
|
|
15111
|
-
* @param body The patch body
|
|
15112
|
-
* @param path Optional relative path to the action
|
|
15113
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15114
|
-
* @param handleError Whether to handle errors (default: true)
|
|
15115
|
-
*/
|
|
15116
|
-
patchList(ids, body, path, httpOptions, handleError = true, showMessage = false) {
|
|
15117
|
-
const options = this.withShowMessage(httpOptions, showMessage);
|
|
15194
|
+
patchList(ids, body, path, optionsOrHttpOptions, handleError = true, showMessage = false) {
|
|
15195
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, handleError, showMessage);
|
|
15196
|
+
const options = this.withShowMessage(resolved.httpOptions, resolved.showMessage);
|
|
15118
15197
|
let request = this.http
|
|
15119
15198
|
.patch(`${this.endpoint}${path ? path : ''}`, body, Object.assign(options || {}, { params: Utils.toHttpParams({ ids: ids }) }));
|
|
15120
15199
|
/* Handle error */
|
|
15121
|
-
if (handleError) {
|
|
15200
|
+
if (resolved.handleError) {
|
|
15122
15201
|
request = request.pipe(catchError(this.handleError('patch')));
|
|
15123
15202
|
}
|
|
15124
15203
|
return request;
|
|
15125
15204
|
}
|
|
15126
|
-
|
|
15127
|
-
|
|
15128
|
-
|
|
15129
|
-
* @param body The patch body
|
|
15130
|
-
* @param path Optional relative path to the action
|
|
15131
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15132
|
-
* @returns Promise resolving to the patched entities
|
|
15133
|
-
*/
|
|
15134
|
-
async patchListAsync(ids, body, path, httpOptions, showMessage = false) {
|
|
15135
|
-
return await firstValueFrom(this.patchList(ids, body, path, httpOptions, true, showMessage));
|
|
15205
|
+
async patchListAsync(ids, body, path, optionsOrHttpOptions, showMessage = false) {
|
|
15206
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, true, showMessage);
|
|
15207
|
+
return await firstValueFrom(this.patchList(ids, body, path, resolved.httpOptions, resolved.handleError, resolved.showMessage));
|
|
15136
15208
|
}
|
|
15137
|
-
|
|
15138
|
-
|
|
15139
|
-
|
|
15140
|
-
* @param path Optional relative path to the action
|
|
15141
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15142
|
-
* @param handleError Whether to handle errors (default: true)
|
|
15143
|
-
*/
|
|
15144
|
-
delete(id, path, httpOptions, handleError = true, showMessage = false) {
|
|
15145
|
-
const options = this.withShowMessage(httpOptions, showMessage);
|
|
15209
|
+
delete(id, path, optionsOrHttpOptions, handleError = true, showMessage = false) {
|
|
15210
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, handleError, showMessage);
|
|
15211
|
+
const options = this.withShowMessage(resolved.httpOptions, resolved.showMessage);
|
|
15146
15212
|
let request = this.http
|
|
15147
15213
|
.delete(`${this.endpoint}${path ? path : ''}/${id}`, options);
|
|
15148
15214
|
/* Handle error */
|
|
15149
|
-
if (handleError) {
|
|
15215
|
+
if (resolved.handleError) {
|
|
15150
15216
|
request = request.pipe(catchError(this.handleError('delete')));
|
|
15151
15217
|
}
|
|
15152
15218
|
return request;
|
|
15153
15219
|
}
|
|
15154
|
-
|
|
15155
|
-
|
|
15156
|
-
|
|
15157
|
-
* @param path Optional relative path to the action
|
|
15158
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15159
|
-
* @returns Promise resolving to the delete result
|
|
15160
|
-
*/
|
|
15161
|
-
async deleteAsync(id, path, httpOptions, showMessage = false) {
|
|
15162
|
-
return await firstValueFrom(this.delete(id, path, httpOptions, true, showMessage));
|
|
15220
|
+
async deleteAsync(id, path, optionsOrHttpOptions, showMessage = false) {
|
|
15221
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, true, showMessage);
|
|
15222
|
+
return await firstValueFrom(this.delete(id, path, resolved.httpOptions, resolved.handleError, resolved.showMessage));
|
|
15163
15223
|
}
|
|
15164
|
-
|
|
15165
|
-
|
|
15166
|
-
|
|
15167
|
-
* @param path Optional relative path to the action
|
|
15168
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15169
|
-
* @param handleError Whether to handle errors (default: true)
|
|
15170
|
-
*/
|
|
15171
|
-
deleteList(ids, path, httpOptions, handleError = true, showMessage = false) {
|
|
15172
|
-
const options = this.withShowMessage(httpOptions, showMessage);
|
|
15224
|
+
deleteList(ids, path, optionsOrHttpOptions, handleError = true, showMessage = false) {
|
|
15225
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, handleError, showMessage);
|
|
15226
|
+
const options = this.withShowMessage(resolved.httpOptions, resolved.showMessage);
|
|
15173
15227
|
let request = this.http.delete(`${this.endpoint}${path ? path : ''}`, Object.assign(options || {}, { params: Utils.toHttpParams({ ids: ids }) }));
|
|
15174
15228
|
/* Handle error */
|
|
15175
|
-
if (handleError) {
|
|
15229
|
+
if (resolved.handleError) {
|
|
15176
15230
|
request = request.pipe(catchError(this.handleError('deleteList')));
|
|
15177
15231
|
}
|
|
15178
15232
|
return request;
|
|
15179
15233
|
}
|
|
15180
|
-
|
|
15181
|
-
|
|
15182
|
-
|
|
15183
|
-
* @param path Optional relative path to the action
|
|
15184
|
-
* @param httpOptions Optional HTTP options (headers, etc.)
|
|
15185
|
-
* @returns Promise resolving to the delete result
|
|
15186
|
-
*/
|
|
15187
|
-
async deleteListAsync(ids, path, httpOptions, showMessage = false) {
|
|
15188
|
-
return await firstValueFrom(this.deleteList(ids, path, httpOptions, true, showMessage));
|
|
15234
|
+
async deleteListAsync(ids, path, optionsOrHttpOptions, showMessage = false) {
|
|
15235
|
+
const resolved = this.resolveMutationOptions(optionsOrHttpOptions, true, showMessage);
|
|
15236
|
+
return await firstValueFrom(this.deleteList(ids, path, resolved.httpOptions, resolved.handleError, resolved.showMessage));
|
|
15189
15237
|
}
|
|
15190
15238
|
/**
|
|
15191
15239
|
* Downloads a file from the server
|
|
@@ -15319,6 +15367,33 @@ class GenericService {
|
|
|
15319
15367
|
options.headers = headers.set('Show-Message', 'Yes');
|
|
15320
15368
|
return options;
|
|
15321
15369
|
}
|
|
15370
|
+
/**
|
|
15371
|
+
* Normalizes legacy mutation arguments and options-object overload arguments
|
|
15372
|
+
* @param optionsOrHttpOptions Legacy httpOptions or options object
|
|
15373
|
+
* @param handleError Legacy handleError value
|
|
15374
|
+
* @param showMessage Legacy showMessage value
|
|
15375
|
+
* @returns Normalized mutation options
|
|
15376
|
+
*/
|
|
15377
|
+
resolveMutationOptions(optionsOrHttpOptions, handleError = true, showMessage = false) {
|
|
15378
|
+
if (optionsOrHttpOptions && typeof optionsOrHttpOptions === 'object') {
|
|
15379
|
+
const options = optionsOrHttpOptions;
|
|
15380
|
+
/* Interpret as options-object overload only when one of its dedicated keys exists */
|
|
15381
|
+
if (Object.prototype.hasOwnProperty.call(options, 'httpOptions') ||
|
|
15382
|
+
Object.prototype.hasOwnProperty.call(options, 'handleError') ||
|
|
15383
|
+
Object.prototype.hasOwnProperty.call(options, 'showMessage')) {
|
|
15384
|
+
return {
|
|
15385
|
+
httpOptions: options.httpOptions ?? {},
|
|
15386
|
+
handleError: options.handleError ?? true,
|
|
15387
|
+
showMessage: options.showMessage ?? false
|
|
15388
|
+
};
|
|
15389
|
+
}
|
|
15390
|
+
}
|
|
15391
|
+
return {
|
|
15392
|
+
httpOptions: optionsOrHttpOptions ?? {},
|
|
15393
|
+
handleError,
|
|
15394
|
+
showMessage
|
|
15395
|
+
};
|
|
15396
|
+
}
|
|
15322
15397
|
/**
|
|
15323
15398
|
* Normalizes the 'projection' parameter in query parameters
|
|
15324
15399
|
* @param params The query parameters (HttpParams or object)
|
|
@@ -15382,6 +15457,10 @@ class GenericService {
|
|
|
15382
15457
|
if (error.error instanceof ArrayBuffer) {
|
|
15383
15458
|
return JSON.parse(new TextDecoder().decode(new Uint8Array(error.error)));
|
|
15384
15459
|
}
|
|
15460
|
+
/* Preserve structured API errors such as ASP.NET ProblemDetails */
|
|
15461
|
+
if (error.error && typeof error.error === 'object') {
|
|
15462
|
+
return error.error;
|
|
15463
|
+
}
|
|
15385
15464
|
const message = (error.error instanceof ErrorEvent) ? error.error.message : `server returned code ${error.status} with body "${error.error}"`;
|
|
15386
15465
|
return `${operation} failed: ${message}`;
|
|
15387
15466
|
});
|
|
@@ -16142,6 +16221,12 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16142
16221
|
* @type {BehaviorSubject<any[]>}
|
|
16143
16222
|
*/
|
|
16144
16223
|
_enumChange = new BehaviorSubject([]);
|
|
16224
|
+
/**
|
|
16225
|
+
* @property destroy$
|
|
16226
|
+
* @description Subject used to dispose subscriptions when the component is destroyed.
|
|
16227
|
+
* @type {Subject<void>}
|
|
16228
|
+
*/
|
|
16229
|
+
destroy$ = new Subject();
|
|
16145
16230
|
/**
|
|
16146
16231
|
* @property _http
|
|
16147
16232
|
* @description The HTTP client service used to fetch data from an API.
|
|
@@ -16169,7 +16254,7 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16169
16254
|
/**
|
|
16170
16255
|
* @property _endpoint
|
|
16171
16256
|
* @description The API endpoint or a function returning the endpoint URL.
|
|
16172
|
-
|
|
16257
|
+
* @type {string | URL | Function | undefined}
|
|
16173
16258
|
*/
|
|
16174
16259
|
_endpoint;
|
|
16175
16260
|
/**
|
|
@@ -16196,6 +16281,12 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16196
16281
|
* @type {Function | undefined}
|
|
16197
16282
|
*/
|
|
16198
16283
|
_enumFilter;
|
|
16284
|
+
/**
|
|
16285
|
+
* @property _default
|
|
16286
|
+
* @description A predicate that identifies default option(s) after options are loaded.
|
|
16287
|
+
* @type {((x: any) => boolean) | undefined}
|
|
16288
|
+
*/
|
|
16289
|
+
_default;
|
|
16199
16290
|
/**
|
|
16200
16291
|
* @property _compareWith
|
|
16201
16292
|
* @description A function to compare option values with the selected values.
|
|
@@ -16342,7 +16433,7 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16342
16433
|
/**
|
|
16343
16434
|
* @property endpoint
|
|
16344
16435
|
* @description The API endpoint or a function returning the endpoint URL.
|
|
16345
|
-
|
|
16436
|
+
* @type {string | URL | Function | undefined}
|
|
16346
16437
|
*/
|
|
16347
16438
|
get endpoint() { return this._endpoint; }
|
|
16348
16439
|
set endpoint(endpoint) { this._endpoint = endpoint; this.endpointChanged(); }
|
|
@@ -16354,13 +16445,13 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16354
16445
|
get params() { return this._params; }
|
|
16355
16446
|
set params(params) {
|
|
16356
16447
|
if (params) {
|
|
16357
|
-
|
|
16448
|
+
/* Remove empty parameters before change comparison. */
|
|
16358
16449
|
Object.keys(params).forEach((key) => {
|
|
16359
16450
|
if (params[key] == null || params[key] == '' || params[key] == 'undefined') {
|
|
16360
16451
|
delete params[key];
|
|
16361
16452
|
}
|
|
16362
16453
|
});
|
|
16363
|
-
|
|
16454
|
+
/* Update parameters only when values changed to avoid duplicate endpoint reloads. */
|
|
16364
16455
|
if (JSON.stringify(this._params) !== JSON.stringify(params)) {
|
|
16365
16456
|
this._params = params;
|
|
16366
16457
|
this.endpointChanged();
|
|
@@ -16388,6 +16479,16 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16388
16479
|
*/
|
|
16389
16480
|
get enumFilter() { return this._enumFilter; }
|
|
16390
16481
|
set enumFilter(enumFilter) { this._enumFilter = enumFilter; this.enumChanged(); }
|
|
16482
|
+
/**
|
|
16483
|
+
* @property default
|
|
16484
|
+
* @description A predicate used to select default option(s) from loaded options.
|
|
16485
|
+
* @type {((x: any) => boolean) | undefined}
|
|
16486
|
+
*/
|
|
16487
|
+
get default() { return this._default; }
|
|
16488
|
+
set default(defaultFn) {
|
|
16489
|
+
this._default = defaultFn;
|
|
16490
|
+
this.applyDefaultSelection();
|
|
16491
|
+
}
|
|
16391
16492
|
/**
|
|
16392
16493
|
* @property disabled
|
|
16393
16494
|
* @description Whether the control is disabled.
|
|
@@ -16467,29 +16568,37 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16467
16568
|
*/
|
|
16468
16569
|
constructor(controlType) {
|
|
16469
16570
|
super(controlType);
|
|
16571
|
+
/* Resolve HttpClient only for endpoint-driven mode where options are fetched remotely. */
|
|
16470
16572
|
if (!this.enum) {
|
|
16471
16573
|
this._http = inject(HttpClient);
|
|
16472
16574
|
}
|
|
16473
16575
|
}
|
|
16474
16576
|
/**
|
|
16475
|
-
*
|
|
16476
|
-
*
|
|
16577
|
+
* @description Initializes option sources and runtime subscriptions.
|
|
16578
|
+
* For enum-driven controls, metadata is recalculated on parent form changes
|
|
16579
|
+
* so hide and disable callbacks always use the latest form state.
|
|
16477
16580
|
*/
|
|
16478
16581
|
ngOnInit() {
|
|
16479
|
-
|
|
16582
|
+
/* Keep filtered options aligned with the initial options input. */
|
|
16583
|
+
this.filteredOptions = Array.isArray(this.options) ? this.options : [];
|
|
16584
|
+
this.applyDefaultSelection();
|
|
16480
16585
|
if (this.enum) {
|
|
16481
|
-
|
|
16482
|
-
this.
|
|
16483
|
-
/*
|
|
16484
|
-
|
|
16485
|
-
|
|
16486
|
-
|
|
16487
|
-
|
|
16488
|
-
|
|
16489
|
-
|
|
16586
|
+
/* Build initial enum options before wiring reactive refresh subscriptions. */
|
|
16587
|
+
this.rebuildEnumOptions();
|
|
16588
|
+
/* Recalculate metadata-driven options whenever enum filters are updated at runtime. */
|
|
16589
|
+
this._enumChange
|
|
16590
|
+
.pipe(debounceTime(1), takeUntil$1(this.destroy$))
|
|
16591
|
+
.subscribe(_ => this.rebuildEnumOptions());
|
|
16592
|
+
/* Recalculate metadata-driven options whenever the parent form value changes. */
|
|
16593
|
+
this.ngControl?.control?.root?.valueChanges
|
|
16594
|
+
?.pipe(debounceTime(1), takeUntil$1(this.destroy$))
|
|
16595
|
+
.subscribe(_ => this.rebuildEnumOptions());
|
|
16490
16596
|
}
|
|
16491
16597
|
else if (!this.options) {
|
|
16492
|
-
|
|
16598
|
+
/* Lazy-load options from endpoint only when static options are not provided. */
|
|
16599
|
+
this._endpointChange
|
|
16600
|
+
.pipe(distinctUntilChanged(), debounceTime(1), takeUntil$1(this.destroy$))
|
|
16601
|
+
.subscribe(_ => {
|
|
16493
16602
|
let headers = new HttpHeaders();
|
|
16494
16603
|
if (this.cache) {
|
|
16495
16604
|
headers.set('Client-Cache', 'Yes');
|
|
@@ -16506,17 +16615,24 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16506
16615
|
}
|
|
16507
16616
|
/* Get endpoint */
|
|
16508
16617
|
let endpoint = typeof this.endpoint === 'function' ? this.endpoint(this) : this.endpoint;
|
|
16618
|
+
endpoint = endpoint instanceof URL ? endpoint.toString() : endpoint;
|
|
16509
16619
|
if (this._http && endpoint && this.loadData) {
|
|
16620
|
+
/* Resolve remote options and keep emitted item payloads in sync. */
|
|
16510
16621
|
this._http.get(endpoint, { params: params, headers: headers })
|
|
16511
16622
|
.pipe(map((x) => this.mapper ? this.mapper(x) : x))
|
|
16512
16623
|
.subscribe(x => {
|
|
16513
|
-
this.filteredOptions = this.options = x;
|
|
16624
|
+
this.filteredOptions = this.options = this.normalizeOptions(x);
|
|
16625
|
+
/* Auto-select option(s) marked as default when no value is set. */
|
|
16626
|
+
this.applyDefaultSelection();
|
|
16627
|
+
/* Select the first option by default if applicable */
|
|
16514
16628
|
if (this.selectFirst && !this.value && this.options?.length > 0) {
|
|
16515
16629
|
this.value = this.multiple ? [this.options[0]] : this.options[0][this.optionValueProperty];
|
|
16516
16630
|
}
|
|
16631
|
+
/* Handle item selection for the current value */
|
|
16517
16632
|
if (Array.isArray(this.options)) {
|
|
16518
16633
|
this.handleItemSelected(this.value);
|
|
16519
16634
|
}
|
|
16635
|
+
/* Write the current value to the form control */
|
|
16520
16636
|
super.writeValue(this.value);
|
|
16521
16637
|
this.changeDetectorRef.detectChanges();
|
|
16522
16638
|
});
|
|
@@ -16524,6 +16640,15 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16524
16640
|
});
|
|
16525
16641
|
}
|
|
16526
16642
|
}
|
|
16643
|
+
/**
|
|
16644
|
+
* Disposes runtime subscriptions and delegates common form-field cleanup.
|
|
16645
|
+
*/
|
|
16646
|
+
ngOnDestroy() {
|
|
16647
|
+
/* Complete local lifecycle stream used by takeUntil subscriptions. */
|
|
16648
|
+
this.destroy$.next();
|
|
16649
|
+
this.destroy$.complete();
|
|
16650
|
+
super.ngOnDestroy();
|
|
16651
|
+
}
|
|
16527
16652
|
/**
|
|
16528
16653
|
* From ControlValueAccessor interface
|
|
16529
16654
|
* @param value
|
|
@@ -16541,6 +16666,7 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16541
16666
|
* Method executed when an option changes
|
|
16542
16667
|
*/
|
|
16543
16668
|
handleChange($event) {
|
|
16669
|
+
/* Emit the raw event first, then emit mapped option item(s). */
|
|
16544
16670
|
this.onValueChange.emit($event);
|
|
16545
16671
|
this.handleItemChange($event.value);
|
|
16546
16672
|
}
|
|
@@ -16549,11 +16675,13 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16549
16675
|
* @param value
|
|
16550
16676
|
*/
|
|
16551
16677
|
handleItemSelected(value) {
|
|
16678
|
+
const options = this.normalizeOptions(this.options);
|
|
16679
|
+
/* Map selected primitive values back to option model objects. */
|
|
16552
16680
|
if (this.multiple) {
|
|
16553
|
-
this.onItemSelected.emit(
|
|
16681
|
+
this.onItemSelected.emit(options.filter((x) => (value || []).includes(x[this.optionValueProperty])));
|
|
16554
16682
|
}
|
|
16555
16683
|
else {
|
|
16556
|
-
this.onItemSelected.emit(
|
|
16684
|
+
this.onItemSelected.emit(options.filter((x) => x[this.optionValueProperty] == value)[0]);
|
|
16557
16685
|
}
|
|
16558
16686
|
}
|
|
16559
16687
|
/**
|
|
@@ -16561,11 +16689,13 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16561
16689
|
* @param value
|
|
16562
16690
|
*/
|
|
16563
16691
|
handleItemChange(value) {
|
|
16692
|
+
const options = this.normalizeOptions(this.options);
|
|
16693
|
+
/* Emit changed option model objects to keep consumers decoupled from raw ids. */
|
|
16564
16694
|
if (this.multiple) {
|
|
16565
|
-
this.onItemChange.emit(
|
|
16695
|
+
this.onItemChange.emit(options.filter((x) => (value || []).includes(x[this.optionValueProperty])));
|
|
16566
16696
|
}
|
|
16567
16697
|
else {
|
|
16568
|
-
this.onItemChange.emit(
|
|
16698
|
+
this.onItemChange.emit(options.filter((x) => x[this.optionValueProperty] == value)[0]);
|
|
16569
16699
|
}
|
|
16570
16700
|
}
|
|
16571
16701
|
/**
|
|
@@ -16573,12 +16703,14 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16573
16703
|
* @param $event
|
|
16574
16704
|
*/
|
|
16575
16705
|
handleFilter($event) {
|
|
16706
|
+
const options = this.normalizeOptions(this.options);
|
|
16707
|
+
/* Normalize search text and apply the configured option text projection. */
|
|
16576
16708
|
let searchText = $event?.target?.value ?? '';
|
|
16577
16709
|
if (this.searchField) {
|
|
16578
|
-
this.filteredOptions =
|
|
16710
|
+
this.filteredOptions = options.filter((x) => this.searchField(x)?.toLowerCase().search(searchText.toLowerCase()) > -1);
|
|
16579
16711
|
}
|
|
16580
16712
|
else {
|
|
16581
|
-
this.filteredOptions =
|
|
16713
|
+
this.filteredOptions = options.filter((x) => x[this.optionTextProperty]?.toLowerCase().search(searchText.toLowerCase()) > -1);
|
|
16582
16714
|
}
|
|
16583
16715
|
}
|
|
16584
16716
|
/**
|
|
@@ -16587,26 +16719,104 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16587
16719
|
* @returns An array of filtered options that match the given value.
|
|
16588
16720
|
*/
|
|
16589
16721
|
filterValue(value) {
|
|
16722
|
+
const options = this.normalizeOptions(this.options);
|
|
16590
16723
|
/* Check if a comparison function is defined */
|
|
16591
16724
|
if (this.compareWith) {
|
|
16592
16725
|
/* Return options that match any of the provided values using the compareWith function */
|
|
16593
|
-
return
|
|
16726
|
+
return options.filter((option) => (value || []).some(val => this.compareWith(option, val)));
|
|
16594
16727
|
}
|
|
16595
16728
|
/* If no comparison function is defined, return options that are included in the provided values */
|
|
16596
|
-
return
|
|
16729
|
+
return options.filter((option) => (value || []).includes(option[this.optionValueProperty]));
|
|
16730
|
+
}
|
|
16731
|
+
/**
|
|
16732
|
+
* @description Normalizes endpoint payloads to a safe array for template iteration.
|
|
16733
|
+
* @param source Raw payload from endpoint or mapper.
|
|
16734
|
+
* @returns {any[]} Iterable options array.
|
|
16735
|
+
*/
|
|
16736
|
+
normalizeOptions(source) {
|
|
16737
|
+
/* Handle different types of source payloads */
|
|
16738
|
+
if (Array.isArray(source)) {
|
|
16739
|
+
return source;
|
|
16740
|
+
}
|
|
16741
|
+
/* If the source is null or undefined, return an empty array immediately */
|
|
16742
|
+
if (source && typeof source === 'object') {
|
|
16743
|
+
/* Attempt to extract a collection from common array-containing properties */
|
|
16744
|
+
const collection = [source.items, source.results, source.data, source.values, source.content, source.rows, source.printers]
|
|
16745
|
+
.find((x) => Array.isArray(x));
|
|
16746
|
+
/* If a collection was found, return it */
|
|
16747
|
+
if (Array.isArray(collection)) {
|
|
16748
|
+
return collection;
|
|
16749
|
+
}
|
|
16750
|
+
/* If the source object contains the option value or text properties, wrap it in an array and return it */
|
|
16751
|
+
if (this.optionValueProperty in source || this.optionTextProperty in source) {
|
|
16752
|
+
return [source];
|
|
16753
|
+
}
|
|
16754
|
+
}
|
|
16755
|
+
return [];
|
|
16756
|
+
}
|
|
16757
|
+
/**
|
|
16758
|
+
* @description Applies default option selection when a default predicate is configured.
|
|
16759
|
+
* @returns {void}
|
|
16760
|
+
*/
|
|
16761
|
+
applyDefaultSelection() {
|
|
16762
|
+
/* Skip default selection if no default predicate is defined or a value is already set */
|
|
16763
|
+
if (!this._default || this.value) {
|
|
16764
|
+
return;
|
|
16765
|
+
}
|
|
16766
|
+
/* Normalize the available options before applying default selection */
|
|
16767
|
+
const options = this.normalizeOptions(this.options);
|
|
16768
|
+
if (!options.length) {
|
|
16769
|
+
return;
|
|
16770
|
+
}
|
|
16771
|
+
/* Apply default selection for multiple selection scenario if applicable */
|
|
16772
|
+
if (this.multiple) {
|
|
16773
|
+
this.value = options
|
|
16774
|
+
.filter((option) => this._default(option))
|
|
16775
|
+
.map((option) => option[this.optionValueProperty]);
|
|
16776
|
+
}
|
|
16777
|
+
/* Handle single selection scenario */
|
|
16778
|
+
else {
|
|
16779
|
+
/* Apply default selection for single selection scenario if applicable */
|
|
16780
|
+
const selected = options.filter((option) => this._default(option))[0];
|
|
16781
|
+
if (selected) {
|
|
16782
|
+
this.value = selected[this.optionValueProperty];
|
|
16783
|
+
}
|
|
16784
|
+
}
|
|
16597
16785
|
}
|
|
16598
16786
|
/**
|
|
16599
16787
|
* Trigger endpoint changed
|
|
16600
16788
|
*/
|
|
16601
16789
|
endpointChanged() {
|
|
16790
|
+
/* Emit endpoint signature so subscribers can react to source/query changes. */
|
|
16602
16791
|
this._endpointChange.next([this.endpoint, this._params, this.projection, this._loadData]);
|
|
16603
16792
|
}
|
|
16604
16793
|
/**
|
|
16605
16794
|
* Trigger enum changed
|
|
16606
16795
|
*/
|
|
16607
16796
|
enumChanged() {
|
|
16797
|
+
/* Emit enum filter updates to rebuild enum options with latest constraints. */
|
|
16608
16798
|
this._enumChange.next([this._enumFilter]);
|
|
16609
16799
|
}
|
|
16800
|
+
/**
|
|
16801
|
+
* @description Builds enum options from metadata and then applies runtime enum filters.
|
|
16802
|
+
* @returns {void}
|
|
16803
|
+
*/
|
|
16804
|
+
rebuildEnumOptions() {
|
|
16805
|
+
/* Enable client-side filtering UI when metadata is present. */
|
|
16806
|
+
this.filterable = this.enumMetadata != null;
|
|
16807
|
+
/* Rebuild enum options from metadata so dynamic hide and disable callbacks re-run. */
|
|
16808
|
+
this.options = this.enumMetadata
|
|
16809
|
+
? EnumService.applyMetadata(this.enum, this.enumMetadata, this.context)
|
|
16810
|
+
: EnumService.toArray(this.enum, this.prefix);
|
|
16811
|
+
/* Apply optional enum-level filter after metadata transformation. */
|
|
16812
|
+
if (this._enumFilter && this.options) {
|
|
16813
|
+
this.options = this.options.filter(this._enumFilter);
|
|
16814
|
+
}
|
|
16815
|
+
/* Keep filtered list synchronized with rebuilt options. */
|
|
16816
|
+
this.filteredOptions = this.options;
|
|
16817
|
+
/* Apply default selection for enum-based option sources as well. */
|
|
16818
|
+
this.applyDefaultSelection();
|
|
16819
|
+
}
|
|
16610
16820
|
/**
|
|
16611
16821
|
* Log to console
|
|
16612
16822
|
* @param message
|
|
@@ -16616,7 +16826,7 @@ class AbstractSelectFormField extends AbstractMatFormField {
|
|
|
16616
16826
|
console.log(message, optionalParams);
|
|
16617
16827
|
}
|
|
16618
16828
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AbstractSelectFormField, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
16619
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: AbstractSelectFormField, isStandalone: true, inputs: { enum: "enum", enumMetadata: "enumMetadata", textPrefix: "textPrefix", optionTextProperty: "optionTextProperty", optionValueProperty: "optionValueProperty", matIconKey: "matIconKey", svgIconKey: "svgIconKey", fontSet: "fontSet", prefix: "prefix", options: "options", filteredOptions: "filteredOptions", filterable: "filterable", cache: "cache", selectFirst: "selectFirst", sortBy: "sortBy", mapper: "mapper", optionIcon: "optionIcon", defaultOption: "defaultOption", multiple: "multiple", sorted: "sorted", endpoint: "endpoint", params: "params", projection: "projection", loadData: "loadData", enumFilter: "enumFilter", disabled: "disabled", context: "context", compareWith: "compareWith", searchField: "searchField" }, outputs: { onValueChange: "change", onItemChange: "itemChange", onSelected: "selected", onItemSelected: "itemSelected", onLaunch: "launch" }, usesInheritance: true, ngImport: i0 });
|
|
16829
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: AbstractSelectFormField, isStandalone: true, inputs: { enum: "enum", enumMetadata: "enumMetadata", textPrefix: "textPrefix", optionTextProperty: "optionTextProperty", optionValueProperty: "optionValueProperty", matIconKey: "matIconKey", svgIconKey: "svgIconKey", fontSet: "fontSet", prefix: "prefix", options: "options", filteredOptions: "filteredOptions", filterable: "filterable", cache: "cache", selectFirst: "selectFirst", sortBy: "sortBy", mapper: "mapper", optionIcon: "optionIcon", defaultOption: "defaultOption", multiple: "multiple", sorted: "sorted", endpoint: "endpoint", params: "params", projection: "projection", loadData: "loadData", enumFilter: "enumFilter", default: "default", disabled: "disabled", context: "context", compareWith: "compareWith", searchField: "searchField" }, outputs: { onValueChange: "change", onItemChange: "itemChange", onSelected: "selected", onItemSelected: "itemSelected", onLaunch: "launch" }, usesInheritance: true, ngImport: i0 });
|
|
16620
16830
|
}
|
|
16621
16831
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AbstractSelectFormField, decorators: [{
|
|
16622
16832
|
type: Directive
|
|
@@ -16670,6 +16880,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
16670
16880
|
type: Input
|
|
16671
16881
|
}], enumFilter: [{
|
|
16672
16882
|
type: Input
|
|
16883
|
+
}], default: [{
|
|
16884
|
+
type: Input
|
|
16673
16885
|
}], disabled: [{
|
|
16674
16886
|
type: Input
|
|
16675
16887
|
}], context: [{
|
|
@@ -16748,6 +16960,14 @@ class VdSelectComponent extends AbstractSelectFormField {
|
|
|
16748
16960
|
* Reference to the filter input element.
|
|
16749
16961
|
*/
|
|
16750
16962
|
filterInput;
|
|
16963
|
+
/**
|
|
16964
|
+
* Property whose value is used as the option group label.
|
|
16965
|
+
*/
|
|
16966
|
+
optionGroupProperty;
|
|
16967
|
+
/**
|
|
16968
|
+
* Whether the option group label is appended to built-in trigger text.
|
|
16969
|
+
*/
|
|
16970
|
+
showOptionGroupInTrigger = false;
|
|
16751
16971
|
/**
|
|
16752
16972
|
* CSS class applied to the trigger element.
|
|
16753
16973
|
*/
|
|
@@ -16762,6 +16982,49 @@ class VdSelectComponent extends AbstractSelectFormField {
|
|
|
16762
16982
|
* @returns The display values of the selected options
|
|
16763
16983
|
*/
|
|
16764
16984
|
get triggerValues() { return this.selectedOptions?.map(option => option[this.optionValueProperty]); }
|
|
16985
|
+
/**
|
|
16986
|
+
* Gets the group label for an option.
|
|
16987
|
+
*
|
|
16988
|
+
* @param option The option whose group label should be resolved
|
|
16989
|
+
* @returns The resolved group label
|
|
16990
|
+
*/
|
|
16991
|
+
getOptionGroupLabel(option) {
|
|
16992
|
+
if (!this.optionGroupProperty) {
|
|
16993
|
+
return '';
|
|
16994
|
+
}
|
|
16995
|
+
return String(this.optionGroupProperty
|
|
16996
|
+
.split('.')
|
|
16997
|
+
.reduce((value, property) => value?.[property], option) ?? '');
|
|
16998
|
+
}
|
|
16999
|
+
/**
|
|
17000
|
+
* Gets the text displayed for an option in the built-in trigger.
|
|
17001
|
+
*
|
|
17002
|
+
* @param option The selected option
|
|
17003
|
+
* @returns The option text with its optional group label
|
|
17004
|
+
*/
|
|
17005
|
+
getOptionTriggerLabel(option) {
|
|
17006
|
+
const optionLabel = String(option?.[this.optionTextProperty] ?? '');
|
|
17007
|
+
const groupLabel = this.showOptionGroupInTrigger ? this.getOptionGroupLabel(option) : '';
|
|
17008
|
+
return groupLabel ? `${optionLabel} (${groupLabel})` : optionLabel;
|
|
17009
|
+
}
|
|
17010
|
+
/**
|
|
17011
|
+
* Gets the filtered options grouped by their configured group property.
|
|
17012
|
+
*
|
|
17013
|
+
* @returns The ordered option groups
|
|
17014
|
+
*/
|
|
17015
|
+
get optionGroups() {
|
|
17016
|
+
if (!this.optionGroupProperty) {
|
|
17017
|
+
return [];
|
|
17018
|
+
}
|
|
17019
|
+
const groups = new Map();
|
|
17020
|
+
for (const option of this.filteredOptions ?? []) {
|
|
17021
|
+
const label = this.getOptionGroupLabel(option);
|
|
17022
|
+
const options = groups.get(label) ?? [];
|
|
17023
|
+
options.push(option);
|
|
17024
|
+
groups.set(label, options);
|
|
17025
|
+
}
|
|
17026
|
+
return Array.from(groups, ([label, options]) => ({ label, options }));
|
|
17027
|
+
}
|
|
16765
17028
|
/**
|
|
16766
17029
|
* Retrieves the currently selected options from the filtered options.
|
|
16767
17030
|
* If multiple options are selected, returns them as an array.
|
|
@@ -16852,13 +17115,13 @@ class VdSelectComponent extends AbstractSelectFormField {
|
|
|
16852
17115
|
});
|
|
16853
17116
|
}
|
|
16854
17117
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: VdSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16855
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: VdSelectComponent, isStandalone: true, selector: "vd-select", inputs: { triggerCssClass: "triggerCssClass" }, providers: [
|
|
17118
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: VdSelectComponent, isStandalone: true, selector: "vd-select", inputs: { optionGroupProperty: "optionGroupProperty", showOptionGroupInTrigger: "showOptionGroupInTrigger", triggerCssClass: "triggerCssClass" }, providers: [
|
|
16856
17119
|
{ provide: MatFormFieldControl, useExisting: VdSelectComponent },
|
|
16857
17120
|
{
|
|
16858
17121
|
provide: MAT_SELECT_CONFIG,
|
|
16859
17122
|
useValue: { overlayPanelClass: 'vd-select-filter-overlay' }
|
|
16860
17123
|
}
|
|
16861
|
-
], 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 <!-- #region Selection template -->\n <ng-template #selectionTemplate let-label=\"label\">\n <msa-selection-label [label]=\"label\"></msa-selection-label>\n </ng-template>\n <!-- #endregion -->\n <!-- #region Option template -->\n <ng-template #optionTextTemplate let-option=\"option\">\n <span layout=\"column\" class=\"option-text\" [ngClass]=\"{'option-has-hint': $safeNavigationMigration(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 <!-- #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 <!-- #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]=\"$safeNavigationMigration(option.icon?.svgIcon)\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplate [ngTemplateOutlet]=\"optionIconTemplate\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [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 <!-- #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 <!-- #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 @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 <!-- #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 <!-- #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 @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]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n </mat-chip>\n }\n @else\n {\n <span layout=\"row\" layout-align=\"start center\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n </span>\n }\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\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 }\n @else {\n <ng-template [ngTemplateOutlet]=\"optionIconChipAvatarTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"optionTextTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n }\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\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 <!-- #region Options -->\n @for (option of filteredOptions; track option; let first = $first) {\n <mat-option [value]=\"mapper ? option : option[optionValueProperty]\" [disabled]=\"$safeNavigationMigration(option?.disabled)\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n } @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"$safeNavigationMigration(option.icon?.svgIcon)\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Text -->\n <span layout=\"column\" layout-align=\"start center\" class=\"option-text\" [ngClass]=\"{'option-has-hint':$safeNavigationMigration(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<!-- #region Read only value -->\n@if (readonly) {\n @if (currentValue) {\n <div class=\"readonly-value\">\n @if (!optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"readonly-content\">\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 <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: currentValue[optionTextProperty] }\"></ng-template>\n </span>\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 }\n @if (triggerTemplate && triggerTemplate.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger readonly-content\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"triggerTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: currentValue }\"></ng-template>\n </span>\n </span>\n }\n @if (optionTemplate && optionTemplate.templateRef && !triggerTemplate?.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger readonly-content\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: currentValue, text: currentValue[optionTextProperty] }\"></ng-template>\n </span>\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 }\n @if (!currentValue) {\n <div> </div>\n }\n}\n<!-- #endregion -->", styles: [":host{display:block;width:100%;min-width:0}.vd-select-launch{position:absolute;right:30px;top:-5px;font-size:18px;cursor:pointer}.readonly-value{padding-right:24px;opacity:.6;min-height:15px;display:flex;align-items:center;width:0;flex:1 1 auto;max-width:100%;min-width:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.readonly-value>*{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-content{display:flex;align-items:center;width:0;flex:1 1 auto;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-ellipsis-text{display:block;flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-content [layout=row],.readonly-value .readonly-content .option-text,.readonly-value .readonly-content .mat-mdc-chip,.readonly-value .readonly-content .mat-mdc-chip-action-label,.readonly-value .readonly-content .mat-mdc-standard-chip{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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 .mat-mdc-form-field-infix{display:flex;align-items:center;min-width:0;max-width:100%;width:100%}::ng-deep .mat-mdc-form-field-type-vd-select-multiple .mat-mdc-form-field-infix{padding-top:4px!important;padding-bottom:4px!important}::ng-deep .mat-mdc-form-field-type-vd-select-multiple .mat-mdc-form-field-infix .mat-mdc-select-trigger{height:100%}.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: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$2.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$2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$2.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: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i7.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: i7.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"] }, { kind: "component", type: MsaSelectionLabelComponent, selector: "msa-selection-label", inputs: ["label"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
17124
|
+
], 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 <!-- #region Selection template -->\n <ng-template #selectionTemplate let-label=\"label\">\n <msa-selection-label [label]=\"label\"></msa-selection-label>\n </ng-template>\n <!-- #endregion -->\n <!-- #region Option template -->\n <ng-template #optionTextTemplate let-option=\"option\">\n <span layout=\"column\" class=\"option-text\" [ngClass]=\"{'option-has-hint': $safeNavigationMigration(option.hint?.length) > 0}\">\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: getOptionTriggerLabel(option) }\"></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 <!-- #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 <!-- #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]=\"$safeNavigationMigration(option.icon?.svgIcon)\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplate [ngTemplateOutlet]=\"optionIconTemplate\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [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 <!-- #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 <!-- #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?.[optionValueProperty] ?? i; let i = $index; let last = $last) {\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: getOptionTriggerLabel(option) }\"></ng-template>\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 <!-- #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 <!-- #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?.[optionValueProperty] ?? i; 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]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n </mat-chip>\n }\n @else\n {\n <span layout=\"row\" layout-align=\"start center\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n </span>\n }\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\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?.[optionValueProperty] ?? i; 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 }\n @else {\n <ng-template [ngTemplateOutlet]=\"optionIconChipAvatarTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"optionTextTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n }\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\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 <!-- #region Option -->\n <ng-template #optionItemTemplate let-option=\"option\">\n <mat-option class=\"vd-select-option\" [value]=\"mapper ? option : option[optionValueProperty]\" [disabled]=\"$safeNavigationMigration(option?.disabled)\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n } @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"$safeNavigationMigration(option.icon?.svgIcon)\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Text -->\n <span layout=\"column\" layout-align=\"start center\" class=\"option-text\" [ngClass]=\"{'option-has-hint':$safeNavigationMigration(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 </ng-template>\n <!-- #endregion -->\n <!-- #region Options -->\n @if (optionGroupProperty) {\n @for (group of optionGroups; track group.label) {\n <mat-optgroup class=\"vd-select-option-group\" [label]=\"group.label\">\n @for (option of group.options; track option?.[optionValueProperty] ?? $index) {\n <ng-template [ngTemplateOutlet]=\"optionItemTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of filteredOptions; track option?.[optionValueProperty] ?? $index) {\n <ng-template [ngTemplateOutlet]=\"optionItemTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n }\n }\n <!-- #endregion -->\n</mat-select>\n<!-- #region Read only value -->\n@if (readonly) {\n @if (currentValue) {\n <div class=\"readonly-value\">\n @if (!optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"readonly-content\">\n @for (option of selectedOptions; track option?.[optionValueProperty] ?? i; 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 <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: getOptionTriggerLabel(currentValue) }\"></ng-template>\n </span>\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: getOptionTriggerLabel(currentValue[i]) }\"></ng-template>\n </mat-chip>\n }\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n }\n @if (triggerTemplate && triggerTemplate.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger readonly-content\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"triggerTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: currentValue }\"></ng-template>\n </span>\n </span>\n }\n @if (optionTemplate && optionTemplate.templateRef && !triggerTemplate?.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger readonly-content\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: currentValue, text: currentValue[optionTextProperty] }\"></ng-template>\n </span>\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 }\n @if (!currentValue) {\n <div> </div>\n }\n}\n<!-- #endregion -->", styles: [":host{display:block;width:100%;min-width:0}.vd-select-launch{position:absolute;right:30px;top:-5px;font-size:18px;cursor:pointer}.readonly-value{padding-right:24px;opacity:.6;min-height:15px;display:flex;align-items:center;width:0;flex:1 1 auto;max-width:100%;min-width:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.readonly-value>*{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-content{display:flex;align-items:center;width:0;flex:1 1 auto;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-ellipsis-text{display:block;flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-content [layout=row],.readonly-value .readonly-content .option-text,.readonly-value .readonly-content .mat-mdc-chip,.readonly-value .readonly-content .mat-mdc-chip-action-label,.readonly-value .readonly-content .mat-mdc-standard-chip{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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 .mat-mdc-form-field-infix{display:flex;align-items:center;min-width:0;max-width:100%;width:100%}::ng-deep .mat-mdc-form-field-type-vd-select-multiple .mat-mdc-form-field-infix{padding-top:4px!important;padding-bottom:4px!important}::ng-deep .mat-mdc-form-field-type-vd-select-multiple .mat-mdc-form-field-infix .mat-mdc-select-trigger{height:100%}.vd-select-option-group,.vd-select-option{box-sizing:border-box;width:100%}.vd-select-option-group ::ng-deep .mat-mdc-optgroup-label,.vd-select-option ::ng-deep .mat-mdc-optgroup-label{display:block}.vd-select-option-group{display:block}.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: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$2.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$2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i2$2.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$2.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: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i7.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: i7.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"] }, { kind: "component", type: MsaSelectionLabelComponent, selector: "msa-selection-label", inputs: ["label"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
16862
17125
|
}
|
|
16863
17126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: VdSelectComponent, decorators: [{
|
|
16864
17127
|
type: Component,
|
|
@@ -16877,7 +17140,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
16877
17140
|
provide: MAT_SELECT_CONFIG,
|
|
16878
17141
|
useValue: { overlayPanelClass: 'vd-select-filter-overlay' }
|
|
16879
17142
|
}
|
|
16880
|
-
], 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 <!-- #region Selection template -->\n <ng-template #selectionTemplate let-label=\"label\">\n <msa-selection-label [label]=\"label\"></msa-selection-label>\n </ng-template>\n <!-- #endregion -->\n <!-- #region Option template -->\n <ng-template #optionTextTemplate let-option=\"option\">\n <span layout=\"column\" class=\"option-text\" [ngClass]=\"{'option-has-hint': $safeNavigationMigration(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 <!-- #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 <!-- #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]=\"$safeNavigationMigration(option.icon?.svgIcon)\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplate [ngTemplateOutlet]=\"optionIconTemplate\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [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 <!-- #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 <!-- #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 @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 <!-- #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 <!-- #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 @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]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n </mat-chip>\n }\n @else\n {\n <span layout=\"row\" layout-align=\"start center\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n </span>\n }\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\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 }\n @else {\n <ng-template [ngTemplateOutlet]=\"optionIconChipAvatarTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"optionTextTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n }\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\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 <!-- #region Options -->\n @for (option of filteredOptions; track option; let first = $first) {\n <mat-option [value]=\"mapper ? option : option[optionValueProperty]\" [disabled]=\"$safeNavigationMigration(option?.disabled)\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n } @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"$safeNavigationMigration(option.icon?.svgIcon)\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Text -->\n <span layout=\"column\" layout-align=\"start center\" class=\"option-text\" [ngClass]=\"{'option-has-hint':$safeNavigationMigration(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<!-- #region Read only value -->\n@if (readonly) {\n @if (currentValue) {\n <div class=\"readonly-value\">\n @if (!optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"readonly-content\">\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 <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: currentValue[optionTextProperty] }\"></ng-template>\n </span>\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 }\n @if (triggerTemplate && triggerTemplate.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger readonly-content\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"triggerTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: currentValue }\"></ng-template>\n </span>\n </span>\n }\n @if (optionTemplate && optionTemplate.templateRef && !triggerTemplate?.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger readonly-content\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: currentValue, text: currentValue[optionTextProperty] }\"></ng-template>\n </span>\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 }\n @if (!currentValue) {\n <div> </div>\n }\n}\n<!-- #endregion -->", styles: [":host{display:block;width:100%;min-width:0}.vd-select-launch{position:absolute;right:30px;top:-5px;font-size:18px;cursor:pointer}.readonly-value{padding-right:24px;opacity:.6;min-height:15px;display:flex;align-items:center;width:0;flex:1 1 auto;max-width:100%;min-width:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.readonly-value>*{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-content{display:flex;align-items:center;width:0;flex:1 1 auto;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-ellipsis-text{display:block;flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-content [layout=row],.readonly-value .readonly-content .option-text,.readonly-value .readonly-content .mat-mdc-chip,.readonly-value .readonly-content .mat-mdc-chip-action-label,.readonly-value .readonly-content .mat-mdc-standard-chip{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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 .mat-mdc-form-field-infix{display:flex;align-items:center;min-width:0;max-width:100%;width:100%}::ng-deep .mat-mdc-form-field-type-vd-select-multiple .mat-mdc-form-field-infix{padding-top:4px!important;padding-bottom:4px!important}::ng-deep .mat-mdc-form-field-type-vd-select-multiple .mat-mdc-form-field-infix .mat-mdc-select-trigger{height:100%}.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"] }]
|
|
17143
|
+
], 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 <!-- #region Selection template -->\n <ng-template #selectionTemplate let-label=\"label\">\n <msa-selection-label [label]=\"label\"></msa-selection-label>\n </ng-template>\n <!-- #endregion -->\n <!-- #region Option template -->\n <ng-template #optionTextTemplate let-option=\"option\">\n <span layout=\"column\" class=\"option-text\" [ngClass]=\"{'option-has-hint': $safeNavigationMigration(option.hint?.length) > 0}\">\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: getOptionTriggerLabel(option) }\"></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 <!-- #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 <!-- #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]=\"$safeNavigationMigration(option.icon?.svgIcon)\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Dynamic icon -->\n @if (optionIcon; as optionIcon) {\n <ng-template #optionIconTemplate [ngTemplateOutlet]=\"optionIconTemplate\" let-optionIcon=\"optionIcon\" [ngTemplateOutletContext]=\"{ optionIcon: optionIcon(option) }\">\n @if (optionIcon.svgIcon) {\n <mat-icon [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 <!-- #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 <!-- #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?.[optionValueProperty] ?? i; let i = $index; let last = $last) {\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: getOptionTriggerLabel(option) }\"></ng-template>\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 <!-- #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 <!-- #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?.[optionValueProperty] ?? i; 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]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n </mat-chip>\n }\n @else\n {\n <span layout=\"row\" layout-align=\"start center\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: option, text: option[optionTextProperty] }\"></ng-template>\n </span>\n }\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\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?.[optionValueProperty] ?? i; 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 }\n @else {\n <ng-template [ngTemplateOutlet]=\"optionIconChipAvatarTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"optionTextTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n }\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n </mat-select-trigger>\n }\n <!-- #endregion -->\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 <!-- #region Option -->\n <ng-template #optionItemTemplate let-option=\"option\">\n <mat-option class=\"vd-select-option\" [value]=\"mapper ? option : option[optionValueProperty]\" [disabled]=\"$safeNavigationMigration(option?.disabled)\">\n <!-- #region Property icon -->\n @if (matIconKey && !svgIconKey) {\n <mat-icon [fontSet]=\"fontSet || 'material-symbols-outlined'\">{{option[matIconKey]}}</mat-icon>\n } @if (svgIconKey && !matIconKey) {\n <mat-icon [svgIcon]=\"option[svgIconKey]\" [fontSet]=\"fontSet || 'material-symbols-outlined'\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Option icon -->\n @if (option.icon?.matIcon) {\n <mat-icon [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\">{{option.icon?.matIcon}}</mat-icon>\n }\n @if (option.icon?.svgIcon) {\n <mat-icon [svgIcon]=\"$safeNavigationMigration(option.icon?.svgIcon)\" [fontSet]=\"option.icon?.fontSet || 'material-symbols-outlined'\" [ngStyle]=\"{ color: option.icon?.iconColor??'' }\"></mat-icon>\n }\n <!-- #endregion -->\n <!-- #region Text -->\n <span layout=\"column\" layout-align=\"start center\" class=\"option-text\" [ngClass]=\"{'option-has-hint':$safeNavigationMigration(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 </ng-template>\n <!-- #endregion -->\n <!-- #region Options -->\n @if (optionGroupProperty) {\n @for (group of optionGroups; track group.label) {\n <mat-optgroup class=\"vd-select-option-group\" [label]=\"group.label\">\n @for (option of group.options; track option?.[optionValueProperty] ?? $index) {\n <ng-template [ngTemplateOutlet]=\"optionItemTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of filteredOptions; track option?.[optionValueProperty] ?? $index) {\n <ng-template [ngTemplateOutlet]=\"optionItemTemplate\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\n }\n }\n <!-- #endregion -->\n</mat-select>\n<!-- #region Read only value -->\n@if (readonly) {\n @if (currentValue) {\n <div class=\"readonly-value\">\n @if (!optionTemplate?.templateRef && !triggerTemplate?.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"readonly-content\">\n @for (option of selectedOptions; track option?.[optionValueProperty] ?? i; 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 <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"selectionTemplate\" [ngTemplateOutletContext]=\"{ label: getOptionTriggerLabel(currentValue) }\"></ng-template>\n </span>\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: getOptionTriggerLabel(currentValue[i]) }\"></ng-template>\n </mat-chip>\n }\n </span>\n @if (!last) {\n <span> </span>\n }\n }\n </span>\n }\n @if (triggerTemplate && triggerTemplate.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger readonly-content\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"triggerTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ trigger: currentValue }\"></ng-template>\n </span>\n </span>\n }\n @if (optionTemplate && optionTemplate.templateRef && !triggerTemplate?.templateRef) {\n <span layout=\"row\" layout-align=\"start center\" class=\"option-trigger readonly-content\">\n <ng-template [ngTemplateOutlet]=\"optionIconTemplate\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\n <span> </span>\n <span class=\"readonly-ellipsis-text\">\n <ng-template [ngTemplateOutlet]=\"optionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: currentValue, text: currentValue[optionTextProperty] }\"></ng-template>\n </span>\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 }\n @if (!currentValue) {\n <div> </div>\n }\n}\n<!-- #endregion -->", styles: [":host{display:block;width:100%;min-width:0}.vd-select-launch{position:absolute;right:30px;top:-5px;font-size:18px;cursor:pointer}.readonly-value{padding-right:24px;opacity:.6;min-height:15px;display:flex;align-items:center;width:0;flex:1 1 auto;max-width:100%;min-width:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.readonly-value>*{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-content{display:flex;align-items:center;width:0;flex:1 1 auto;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-ellipsis-text{display:block;flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.readonly-value .readonly-content [layout=row],.readonly-value .readonly-content .option-text,.readonly-value .readonly-content .mat-mdc-chip,.readonly-value .readonly-content .mat-mdc-chip-action-label,.readonly-value .readonly-content .mat-mdc-standard-chip{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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 .mat-mdc-form-field-infix{display:flex;align-items:center;min-width:0;max-width:100%;width:100%}::ng-deep .mat-mdc-form-field-type-vd-select-multiple .mat-mdc-form-field-infix{padding-top:4px!important;padding-bottom:4px!important}::ng-deep .mat-mdc-form-field-type-vd-select-multiple .mat-mdc-form-field-infix .mat-mdc-select-trigger{height:100%}.vd-select-option-group,.vd-select-option{box-sizing:border-box;width:100%}.vd-select-option-group ::ng-deep .mat-mdc-optgroup-label,.vd-select-option ::ng-deep .mat-mdc-optgroup-label{display:block}.vd-select-option-group{display:block}.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"] }]
|
|
16881
17144
|
}], ctorParameters: () => [], propDecorators: { optionTemplate: [{
|
|
16882
17145
|
type: ContentChild,
|
|
16883
17146
|
args: [VdSelectOptionDirective]
|
|
@@ -16890,193 +17153,407 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
16890
17153
|
}], filterInput: [{
|
|
16891
17154
|
type: ViewChild,
|
|
16892
17155
|
args: ['filterInput', { static: false }]
|
|
17156
|
+
}], optionGroupProperty: [{
|
|
17157
|
+
type: Input
|
|
17158
|
+
}], showOptionGroupInTrigger: [{
|
|
17159
|
+
type: Input
|
|
16893
17160
|
}], triggerCssClass: [{
|
|
16894
17161
|
type: Input
|
|
16895
17162
|
}] } });
|
|
16896
17163
|
|
|
16897
17164
|
/**
|
|
16898
|
-
*
|
|
17165
|
+
* Class representing the structure and behavior of a table definition.
|
|
17166
|
+
* It defines various configurations such as column settings, actions,
|
|
17167
|
+
* and callbacks for rows and data handling.
|
|
17168
|
+
*
|
|
17169
|
+
* @template T - The type of data represented in the table rows.
|
|
16899
17170
|
*/
|
|
16900
|
-
class
|
|
16901
|
-
service;
|
|
16902
|
-
paginator;
|
|
16903
|
-
sorter;
|
|
17171
|
+
class TableDefinition {
|
|
16904
17172
|
/**
|
|
16905
|
-
* @property
|
|
16906
|
-
* @description
|
|
16907
|
-
*
|
|
16908
|
-
* @type {BehaviorSubject<string>}
|
|
17173
|
+
* @property endpoint
|
|
17174
|
+
* @description API endpoint from which table data will be fetched.
|
|
17175
|
+
* @type {string}
|
|
16909
17176
|
*/
|
|
16910
|
-
|
|
17177
|
+
endpoint = '';
|
|
16911
17178
|
/**
|
|
16912
|
-
* @property
|
|
16913
|
-
* @description
|
|
16914
|
-
*
|
|
16915
|
-
* @type {
|
|
17179
|
+
* @property projection
|
|
17180
|
+
* @description Optional projection for specifying which fields should be included
|
|
17181
|
+
* in the fetched data. Can be a single string or an array of field names.
|
|
17182
|
+
* @type {string | string[]}
|
|
16916
17183
|
*/
|
|
16917
|
-
|
|
17184
|
+
projection;
|
|
16918
17185
|
/**
|
|
16919
|
-
* @property
|
|
16920
|
-
* @description
|
|
16921
|
-
*
|
|
16922
|
-
* @type {
|
|
17186
|
+
* @property includes
|
|
17187
|
+
* @description Optional array of related data entities (includes) to be retrieved along
|
|
17188
|
+
* with the main data set.
|
|
17189
|
+
* @type {string[]}
|
|
16923
17190
|
*/
|
|
16924
|
-
|
|
17191
|
+
includes;
|
|
16925
17192
|
/**
|
|
16926
|
-
* @property
|
|
16927
|
-
* @description
|
|
16928
|
-
*
|
|
17193
|
+
* @property showAction
|
|
17194
|
+
* @description Flag to indicate if action columns (e.g., edit, delete buttons)
|
|
17195
|
+
* should be displayed in the table. Defaults to `true`.
|
|
17196
|
+
* @type {boolean}
|
|
16929
17197
|
*/
|
|
16930
|
-
|
|
17198
|
+
showAction = true;
|
|
16931
17199
|
/**
|
|
16932
|
-
* @property
|
|
16933
|
-
* @description
|
|
16934
|
-
*
|
|
17200
|
+
* @property selectable
|
|
17201
|
+
* @description Flag to indicate if rows can be selected (e.g., with checkboxes).
|
|
17202
|
+
* Defaults to `true`.
|
|
17203
|
+
* @type {boolean}
|
|
16935
17204
|
*/
|
|
16936
|
-
|
|
17205
|
+
selectable = true;
|
|
16937
17206
|
/**
|
|
16938
|
-
* @property
|
|
16939
|
-
* @description
|
|
16940
|
-
*
|
|
17207
|
+
* @property rememberSelection
|
|
17208
|
+
* @description Restores selected rows in server-backed tables when returning to a list.
|
|
17209
|
+
* Defaults to `false`.
|
|
17210
|
+
* @type {boolean}
|
|
16941
17211
|
*/
|
|
16942
|
-
|
|
16943
|
-
/* If paginator exists, reset the page index */
|
|
16944
|
-
if (this.paginator) {
|
|
16945
|
-
this.paginator.pageIndex = 0;
|
|
16946
|
-
this.pageIndex = 0;
|
|
16947
|
-
}
|
|
16948
|
-
/* Trigger filter change */
|
|
16949
|
-
this._filterChange.next(filter);
|
|
16950
|
-
}
|
|
17212
|
+
rememberSelection = false;
|
|
16951
17213
|
/**
|
|
16952
|
-
* @property
|
|
16953
|
-
* @description
|
|
16954
|
-
*
|
|
17214
|
+
* @property addable
|
|
17215
|
+
* @description Flag to indicate if new items can be added to the table.
|
|
17216
|
+
* Defaults to `true`.
|
|
17217
|
+
* @type {boolean}
|
|
16955
17218
|
*/
|
|
16956
|
-
|
|
17219
|
+
addable = true;
|
|
16957
17220
|
/**
|
|
16958
|
-
* @property
|
|
16959
|
-
* @description
|
|
16960
|
-
* @type {
|
|
17221
|
+
* @property editable
|
|
17222
|
+
* @description Flag to indicate if rows can be edited. Defaults to `true`.
|
|
17223
|
+
* @type {boolean}
|
|
16961
17224
|
*/
|
|
16962
|
-
|
|
17225
|
+
editable = true;
|
|
16963
17226
|
/**
|
|
16964
|
-
* @property
|
|
16965
|
-
* @description
|
|
16966
|
-
*
|
|
16967
|
-
|
|
17227
|
+
* @property deletable
|
|
17228
|
+
* @description Flag to indicate if rows can be deleted. Defaults to `true`.
|
|
17229
|
+
* @type {boolean}
|
|
17230
|
+
*/
|
|
17231
|
+
deletable = true;
|
|
17232
|
+
/**
|
|
17233
|
+
* @property downloadable
|
|
17234
|
+
* @description Flag to indicate if table data can be downloaded (e.g., as CSV or Excel).
|
|
17235
|
+
* @type {boolean}
|
|
17236
|
+
*/
|
|
17237
|
+
downloadable;
|
|
17238
|
+
/**
|
|
17239
|
+
* @property duplicable
|
|
17240
|
+
* @description Flag to indicate if rows can be duplicated.
|
|
17241
|
+
* @type {boolean}
|
|
17242
|
+
*/
|
|
17243
|
+
duplicable;
|
|
17244
|
+
/**
|
|
17245
|
+
* @property exportable
|
|
17246
|
+
* @description Determines if the table is exportable.
|
|
17247
|
+
* @type {boolean}
|
|
17248
|
+
*/
|
|
17249
|
+
exportable = true;
|
|
17250
|
+
/**
|
|
17251
|
+
* @property exportFileName
|
|
17252
|
+
* @description The name of the file to export.
|
|
17253
|
+
* @type {string}
|
|
17254
|
+
*/
|
|
17255
|
+
exportFileName;
|
|
17256
|
+
/**
|
|
17257
|
+
* @property sticky
|
|
17258
|
+
* @description Flag to indicate whether the table headers or columns should stick
|
|
17259
|
+
* to the viewport during scrolling. Defaults to `false`.
|
|
17260
|
+
* @type {boolean}
|
|
17261
|
+
*/
|
|
17262
|
+
sticky = false;
|
|
17263
|
+
/**
|
|
17264
|
+
* @property columns
|
|
17265
|
+
* @description Array of table columns that define the structure and data types
|
|
17266
|
+
* of each column in the table.
|
|
17267
|
+
* @type {TableColumn<T>[]}
|
|
17268
|
+
*/
|
|
17269
|
+
columns = [];
|
|
17270
|
+
/**
|
|
17271
|
+
* @property hideColumns
|
|
17272
|
+
* @description Optional array of column keys that should be hidden from view.
|
|
17273
|
+
* @type {string[]}
|
|
17274
|
+
*/
|
|
17275
|
+
hideColumns;
|
|
17276
|
+
/**
|
|
17277
|
+
* @property rowNgClass
|
|
17278
|
+
* @description Function to dynamically assign CSS classes to rows based on the row data
|
|
17279
|
+
* and context. Can be used for conditional row styling.
|
|
17280
|
+
* @type {(x?: T, ctx?: IGenericListComponent<T>) => any}
|
|
17281
|
+
*/
|
|
17282
|
+
rowNgClass;
|
|
17283
|
+
/**
|
|
17284
|
+
* @property rowClick
|
|
17285
|
+
* @description Callback function for handling row click events.
|
|
17286
|
+
* Invoked when a row is clicked.
|
|
17287
|
+
* @type {(x?: T, ctx?: IGenericListComponent<T>) => any}
|
|
17288
|
+
*/
|
|
17289
|
+
rowClick;
|
|
17290
|
+
/**
|
|
17291
|
+
* @property onEdit
|
|
17292
|
+
* @description Callback function for handling edit actions.
|
|
17293
|
+
* Invoked when the edit button is clicked for a row.
|
|
17294
|
+
* @type {(x?: T, ctx?: IGenericListComponent<T>) => any}
|
|
17295
|
+
*/
|
|
17296
|
+
onEdit;
|
|
17297
|
+
/**
|
|
17298
|
+
* @property detailsTemplate
|
|
17299
|
+
* @description Name of the template to use for displaying additional row details.
|
|
17300
|
+
* @type {string}
|
|
17301
|
+
*/
|
|
17302
|
+
detailsTemplate;
|
|
17303
|
+
/**
|
|
17304
|
+
* @property actions
|
|
17305
|
+
* @description Array of action items (e.g., custom buttons) available for each row in the table.
|
|
17306
|
+
* Actions can be context-sensitive based on the row data and table context.
|
|
17307
|
+
* @type {ActionItem<T, IGenericListComponent<T>>[]}
|
|
17308
|
+
*/
|
|
17309
|
+
actions = [];
|
|
17310
|
+
/**
|
|
17311
|
+
* @property columnSets
|
|
17312
|
+
* @description Used to display specific columns in the table.
|
|
17313
|
+
* This array defines sets of columns that can be shown
|
|
17314
|
+
* based on the active configuration, allowing for dynamic table
|
|
17315
|
+
* column customization.
|
|
17316
|
+
* @type {string[]}
|
|
17317
|
+
*/
|
|
17318
|
+
columnSets = [];
|
|
17319
|
+
/**
|
|
17320
|
+
* Constructor for initializing the table definition with optional values.
|
|
17321
|
+
* Merges the provided initialization object with default properties.
|
|
17322
|
+
*
|
|
17323
|
+
* @param init - Optional partial table definition to initialize values.
|
|
17324
|
+
*/
|
|
17325
|
+
constructor(init) {
|
|
17326
|
+
Object.assign(this, init);
|
|
17327
|
+
}
|
|
17328
|
+
}
|
|
17329
|
+
|
|
17330
|
+
/**
|
|
17331
|
+
* Gets the ID of a table row.
|
|
17332
|
+
* @param row - The row object to extract the ID from.
|
|
17333
|
+
* @returns The ID of the row, or undefined if not available.
|
|
17334
|
+
*/
|
|
17335
|
+
function getTableRowId(row) {
|
|
17336
|
+
return typeof row === 'object' && row !== null && 'id' in row ? row.id : undefined;
|
|
17337
|
+
}
|
|
17338
|
+
/**
|
|
17339
|
+
* Gets the table definition for a given class decorated with @Table.
|
|
17340
|
+
* @param origin - The class to retrieve the table definition from.
|
|
17341
|
+
* @returns The table definition associated with the class.
|
|
17342
|
+
*/
|
|
17343
|
+
function getTableDefinition(origin) {
|
|
17344
|
+
/* Save the table defintion in the metadata */
|
|
17345
|
+
var tableDefinition = Reflect.getMetadata(TABLE_DEFINITION_METADATA_KEY, origin) ?? new TableDefinition({});
|
|
17346
|
+
if (tableDefinition) {
|
|
17347
|
+
/* Set column in the table definition */
|
|
17348
|
+
tableDefinition.columns = Reflect.getMetadata(TABLE_COLUMNS_METADATA_KEY, Reflect.construct(origin, []))
|
|
17349
|
+
?.filter((x) => !x.hidden && !tableDefinition.hideColumns?.some(y => y.trim() == x.name.trim()));
|
|
17350
|
+
/* Sort the columns by index */
|
|
17351
|
+
Utils.sortArray(tableDefinition.columns || [], 'index');
|
|
17352
|
+
/* Set endpoint from the decorator @Api, if any */
|
|
17353
|
+
var endpoint = Reflect.getMetadata(endpointMetadataKey, origin);
|
|
17354
|
+
if (endpoint) {
|
|
17355
|
+
tableDefinition.endpoint = endpoint;
|
|
17356
|
+
}
|
|
17357
|
+
}
|
|
17358
|
+
return tableDefinition;
|
|
17359
|
+
}
|
|
17360
|
+
|
|
17361
|
+
/**
|
|
17362
|
+
* @class TableDataSource
|
|
17363
|
+
* @description Provides a server-backed data source with filtering, sorting, pagination,
|
|
17364
|
+
* reloading, and row selection for an Angular Material table.
|
|
17365
|
+
* @template TEntity - The entity type displayed by the table.
|
|
17366
|
+
* @template TService - The service type used to retrieve entities.
|
|
17367
|
+
*/
|
|
17368
|
+
class TableDataSource extends DataSource {
|
|
17369
|
+
service;
|
|
17370
|
+
paginator;
|
|
17371
|
+
sorter;
|
|
17372
|
+
/**
|
|
17373
|
+
* @property _filterChange
|
|
17374
|
+
* @description Stores and emits the current free-text filter.
|
|
17375
|
+
* @type {BehaviorSubject<string>}
|
|
17376
|
+
*/
|
|
17377
|
+
_filterChange = new BehaviorSubject('');
|
|
17378
|
+
/**
|
|
17379
|
+
* @property _reloadChange
|
|
17380
|
+
* @description Emits a new token whenever the table data must be reloaded.
|
|
17381
|
+
* @type {BehaviorSubject<number>}
|
|
17382
|
+
*/
|
|
17383
|
+
_reloadChange = new BehaviorSubject(0);
|
|
17384
|
+
/**
|
|
17385
|
+
* @property onDataLoaded
|
|
17386
|
+
* @description Emits the latest pagination response after data loads successfully.
|
|
17387
|
+
* The initial value is `null` until the first response is received.
|
|
17388
|
+
* @type {BehaviorSubject<Pagination<TEntity> | any>}
|
|
17389
|
+
*/
|
|
17390
|
+
onDataLoaded = new BehaviorSubject(null);
|
|
17391
|
+
/**
|
|
17392
|
+
* @property selectionModel
|
|
17393
|
+
* @description Tracks entities across pages by non-null ID, falling back to reference
|
|
17394
|
+
* equality for entities without an ID.
|
|
17395
|
+
* @type {SelectionModel<TEntity>}
|
|
17396
|
+
*/
|
|
17397
|
+
selectionModel = new SelectionModel(true, [], true, (selected, item) => {
|
|
17398
|
+
if (selected === item) {
|
|
17399
|
+
return true;
|
|
17400
|
+
}
|
|
17401
|
+
/* Determine the ID of the selected row */
|
|
17402
|
+
const id = getTableRowId(selected);
|
|
17403
|
+
/* Compare the ID of the selected row with the ID of the current item */
|
|
17404
|
+
return id != null && id === getTableRowId(item);
|
|
17405
|
+
});
|
|
17406
|
+
/**
|
|
17407
|
+
* @property filter
|
|
17408
|
+
* @description Gets the current free-text filter.
|
|
17409
|
+
* @type {string}
|
|
17410
|
+
*/
|
|
17411
|
+
get filter() { return this._filterChange.value; }
|
|
17412
|
+
/**
|
|
17413
|
+
* @property filter
|
|
17414
|
+
* @description Sets the free-text filter and returns pagination to the first page.
|
|
17415
|
+
* @param {string} filter - The filter text to apply.
|
|
17416
|
+
*/
|
|
17417
|
+
set filter(filter) {
|
|
17418
|
+
/* Reset the paginator and cached page index before applying the filter. */
|
|
17419
|
+
if (this.paginator) {
|
|
17420
|
+
this.paginator.pageIndex = 0;
|
|
17421
|
+
this.pageIndex = 0;
|
|
17422
|
+
}
|
|
17423
|
+
/* Publish the updated filter to connected table views. */
|
|
17424
|
+
this._filterChange.next(filter);
|
|
17425
|
+
}
|
|
17426
|
+
/**
|
|
17427
|
+
* @property onSortChange
|
|
17428
|
+
* @description Relays changes emitted by the assigned sort controller.
|
|
17429
|
+
* @type {EventEmitter<Sort>}
|
|
17430
|
+
*/
|
|
17431
|
+
onSortChange = new EventEmitter();
|
|
17432
|
+
/**
|
|
17433
|
+
* @property _sort
|
|
17434
|
+
* @description Stores the sort controller currently assigned to the data source.
|
|
17435
|
+
* @type {MatSort | undefined}
|
|
17436
|
+
*/
|
|
17437
|
+
_sort = new MatSort();
|
|
17438
|
+
/**
|
|
17439
|
+
* @property sort
|
|
17440
|
+
* @description Gets or sets the sort controller whose changes reload the table data.
|
|
17441
|
+
* @type {MatSort | undefined}
|
|
16968
17442
|
*/
|
|
16969
17443
|
get sort() { return this._sort; }
|
|
16970
17444
|
set sort(sort) {
|
|
16971
|
-
/*
|
|
17445
|
+
/* Store the controller and relay its sort changes. */
|
|
16972
17446
|
this._sort = sort;
|
|
16973
17447
|
this._sort?.sortChange.subscribe(x => this.onSortChange.emit(x));
|
|
16974
17448
|
}
|
|
16975
17449
|
/**
|
|
16976
17450
|
* @property reloadToken
|
|
16977
|
-
* @description Gets the
|
|
17451
|
+
* @description Gets the token emitted by the most recent reload request.
|
|
16978
17452
|
* @type {number}
|
|
16979
17453
|
*/
|
|
16980
17454
|
get reloadToken() { return this._reloadChange.value; }
|
|
16981
17455
|
/**
|
|
16982
17456
|
* @property isConnected
|
|
16983
|
-
* @description
|
|
17457
|
+
* @description Indicates whether a collection viewer is connected to the data source.
|
|
16984
17458
|
* @type {boolean}
|
|
16985
17459
|
*/
|
|
16986
17460
|
isConnected = false;
|
|
17461
|
+
/**
|
|
17462
|
+
* Scope used by the dynamic table to remember this list's selection.
|
|
17463
|
+
*/
|
|
17464
|
+
rememberSelectionKey;
|
|
16987
17465
|
/**
|
|
16988
17466
|
* @property includes
|
|
16989
|
-
* @description
|
|
17467
|
+
* @description Lists the related resources to include in each data request.
|
|
16990
17468
|
* @type {Array<string>}
|
|
16991
17469
|
*/
|
|
16992
17470
|
includes = [];
|
|
16993
17471
|
/**
|
|
16994
17472
|
* @property path
|
|
16995
|
-
* @description
|
|
17473
|
+
* @description Specifies the optional service endpoint path used to retrieve data.
|
|
16996
17474
|
* @type {string | undefined}
|
|
16997
17475
|
*/
|
|
16998
17476
|
path;
|
|
16999
17477
|
/**
|
|
17000
17478
|
* @property projection
|
|
17001
|
-
* @description
|
|
17479
|
+
* @description Specifies the fields requested from the service, either as a comma-separated
|
|
17480
|
+
* string or an array of field names.
|
|
17002
17481
|
* @type {string | string[]}
|
|
17003
17482
|
*/
|
|
17004
17483
|
projection = '';
|
|
17005
17484
|
/**
|
|
17006
17485
|
* @property items
|
|
17007
|
-
* @description
|
|
17486
|
+
* @description Contains the entities returned for the current page.
|
|
17008
17487
|
* @type {TEntity[]}
|
|
17009
17488
|
*/
|
|
17010
17489
|
items = [];
|
|
17011
17490
|
/**
|
|
17012
17491
|
* @property parameters
|
|
17013
|
-
* @description
|
|
17492
|
+
* @description Contains additional parameters returned by the latest data request.
|
|
17014
17493
|
* @type {any}
|
|
17015
17494
|
*/
|
|
17016
17495
|
parameters;
|
|
17017
17496
|
/**
|
|
17018
17497
|
* @property facets
|
|
17019
|
-
* @description
|
|
17498
|
+
* @description Contains the facets returned by the latest data request.
|
|
17020
17499
|
* @type {Facet[] | undefined}
|
|
17021
17500
|
*/
|
|
17022
17501
|
facets;
|
|
17023
17502
|
/**
|
|
17024
17503
|
* @property fieldFilters
|
|
17025
|
-
* @description
|
|
17504
|
+
* @description Contains mutable field filters applied to data requests.
|
|
17026
17505
|
* @type {any}
|
|
17027
17506
|
*/
|
|
17028
17507
|
fieldFilters = {};
|
|
17029
17508
|
/**
|
|
17030
17509
|
* @property fieldOperators
|
|
17031
|
-
* @description
|
|
17510
|
+
* @description Contains operators associated with field-based filtering.
|
|
17032
17511
|
* @type {any}
|
|
17033
17512
|
*/
|
|
17034
17513
|
fieldOperators = {};
|
|
17035
17514
|
/**
|
|
17036
17515
|
* @property staticFieldFilters
|
|
17037
|
-
* @description
|
|
17516
|
+
* @description Contains persistent field filters applied to every data request.
|
|
17038
17517
|
* @type {any}
|
|
17039
17518
|
*/
|
|
17040
17519
|
staticFieldFilters = {};
|
|
17041
17520
|
/**
|
|
17042
17521
|
* @property pageIndex
|
|
17043
|
-
* @description
|
|
17522
|
+
* @description Stores the zero-based index of the current page.
|
|
17044
17523
|
* @type {number}
|
|
17045
17524
|
*/
|
|
17046
17525
|
pageIndex = 0;
|
|
17047
17526
|
/**
|
|
17048
17527
|
* @property total
|
|
17049
|
-
* @description
|
|
17528
|
+
* @description Stores the total number of entities reported by the service.
|
|
17050
17529
|
* @type {number}
|
|
17051
17530
|
*/
|
|
17052
17531
|
total = 0;
|
|
17053
17532
|
/**
|
|
17054
17533
|
* @property pageSize
|
|
17055
|
-
* @description
|
|
17056
|
-
* It controls how many records are shown on a single page.
|
|
17534
|
+
* @description Stores the number of entities requested per page.
|
|
17057
17535
|
* @type {number}
|
|
17058
17536
|
*/
|
|
17059
17537
|
pageSize = 15;
|
|
17060
17538
|
/**
|
|
17061
17539
|
* @property pageCount
|
|
17062
|
-
* @description
|
|
17540
|
+
* @description Stores the total number of pages reported by the service.
|
|
17063
17541
|
* @type {number}
|
|
17064
17542
|
*/
|
|
17065
17543
|
pageCount = 0;
|
|
17066
17544
|
/**
|
|
17067
17545
|
* @property isLoading
|
|
17068
|
-
* @description
|
|
17546
|
+
* @description Indicates whether a data request is currently in progress.
|
|
17069
17547
|
* @type {boolean}
|
|
17070
17548
|
*/
|
|
17071
17549
|
isLoading = false;
|
|
17072
17550
|
/**
|
|
17073
17551
|
* @constructor
|
|
17074
|
-
* @description
|
|
17075
|
-
*
|
|
17076
|
-
*
|
|
17077
|
-
* @param {
|
|
17078
|
-
* @param {
|
|
17079
|
-
* @param {MatSort} [sorter] - The MatSort instance used for sorting functionality.
|
|
17552
|
+
* @description Creates a data source backed by the supplied service and optional Material
|
|
17553
|
+
* pagination and sorting controllers.
|
|
17554
|
+
* @param {TService} service - The service used to retrieve table data.
|
|
17555
|
+
* @param {MatPaginator} [paginator] - The controller used for server-side pagination.
|
|
17556
|
+
* @param {MatSort} [sorter] - The controller used for server-side sorting.
|
|
17080
17557
|
*/
|
|
17081
17558
|
constructor(service, paginator, sorter) {
|
|
17082
17559
|
super();
|
|
@@ -17086,32 +17563,33 @@ class TableDataSource extends DataSource {
|
|
|
17086
17563
|
this.sort = sorter;
|
|
17087
17564
|
}
|
|
17088
17565
|
/**
|
|
17089
|
-
*
|
|
17090
|
-
* @
|
|
17091
|
-
*
|
|
17092
|
-
* @
|
|
17566
|
+
* @method connect
|
|
17567
|
+
* @description Connects a collection viewer and reloads server data when sorting,
|
|
17568
|
+
* pagination, filtering, or the reload token changes.
|
|
17569
|
+
* @param {CollectionViewer} [_] - The viewer that consumes the emitted entities.
|
|
17570
|
+
* @returns {Observable<TEntity[]>} An observable that emits the current page of entities.
|
|
17093
17571
|
*/
|
|
17094
17572
|
connect(_) {
|
|
17095
17573
|
this.isConnected = true;
|
|
17096
|
-
/*
|
|
17574
|
+
/* Collect every source that can trigger a data request. */
|
|
17097
17575
|
const displayDataChanges = [
|
|
17098
17576
|
this.onSortChange,
|
|
17099
17577
|
this.paginator?.page,
|
|
17100
17578
|
this._filterChange,
|
|
17101
17579
|
this._reloadChange
|
|
17102
17580
|
];
|
|
17103
|
-
/*
|
|
17581
|
+
/* Return to the first page whenever the sort order changes. */
|
|
17104
17582
|
if (this.paginator) {
|
|
17105
17583
|
this.onSortChange.subscribe(() => { this.paginator.pageIndex = 0; });
|
|
17106
17584
|
}
|
|
17107
17585
|
return merge$1(...displayDataChanges)
|
|
17108
17586
|
.pipe(skip(1), switchMap$1(() => {
|
|
17109
|
-
/*
|
|
17587
|
+
/* Mark the data source as loading before issuing the request. */
|
|
17110
17588
|
this.isLoading = true;
|
|
17111
|
-
/* Remove empty filters */
|
|
17589
|
+
/* Remove empty values from mutable and persistent field filters. */
|
|
17112
17590
|
Utils.cleanObject(this.fieldFilters);
|
|
17113
17591
|
Utils.cleanObject(this.staticFieldFilters);
|
|
17114
|
-
/*
|
|
17592
|
+
/* Compose the service request from table state and field filters. */
|
|
17115
17593
|
var params = Object.assign({
|
|
17116
17594
|
includes: this.includes,
|
|
17117
17595
|
projection: Array.isArray(this.projection) ? this.projection.join(',') : this.projection,
|
|
@@ -17121,12 +17599,12 @@ class TableDataSource extends DataSource {
|
|
|
17121
17599
|
sortBy: this.sort?.active,
|
|
17122
17600
|
sortOrder: this.sort?.direction
|
|
17123
17601
|
}, this.fieldFilters ?? {}, this.staticFieldFilters ?? {});
|
|
17124
|
-
/*
|
|
17602
|
+
/* Retrieve the current page from the configured service endpoint. */
|
|
17125
17603
|
return this.service.getList(Utils.cleanObject(params), this.path ?? '', { 'CheckOut': 'Yes' });
|
|
17126
17604
|
}), map$1((result) => {
|
|
17127
|
-
/*
|
|
17605
|
+
/* Clear the loading state after receiving a response. */
|
|
17128
17606
|
this.isLoading = false;
|
|
17129
|
-
/*
|
|
17607
|
+
/* Synchronize rows, pagination metadata, facets, and response parameters. */
|
|
17130
17608
|
this.pageIndex = Math.max(Math.min(result.page - 1, result.pageCount - 1), 0);
|
|
17131
17609
|
this.total = result.total;
|
|
17132
17610
|
this.pageSize = result.pageSize;
|
|
@@ -17134,28 +17612,29 @@ class TableDataSource extends DataSource {
|
|
|
17134
17612
|
this.items = result.items;
|
|
17135
17613
|
this.facets = result.facets;
|
|
17136
17614
|
this.parameters = result.parameters;
|
|
17137
|
-
/*
|
|
17615
|
+
/* Notify subscribers that the response has been applied. */
|
|
17138
17616
|
this.onDataLoaded.next(result);
|
|
17139
17617
|
return this.items;
|
|
17140
17618
|
}), catchError(() => {
|
|
17141
|
-
/*
|
|
17619
|
+
/* Clear the loading state and emit an empty page after a request failure. */
|
|
17142
17620
|
this.isLoading = false;
|
|
17143
17621
|
return of([]);
|
|
17144
17622
|
}));
|
|
17145
17623
|
}
|
|
17146
17624
|
/**
|
|
17147
|
-
*
|
|
17148
|
-
*
|
|
17149
|
-
*
|
|
17150
|
-
* @
|
|
17151
|
-
* data source.
|
|
17625
|
+
* @method disconnect
|
|
17626
|
+
* @description Marks the data source as disconnected from its collection viewer.
|
|
17627
|
+
* @param {CollectionViewer} _ - The viewer that no longer consumes this data source.
|
|
17628
|
+
* @returns {void}
|
|
17152
17629
|
*/
|
|
17153
17630
|
disconnect(_) {
|
|
17154
17631
|
this.isConnected = false;
|
|
17155
17632
|
}
|
|
17156
17633
|
/**
|
|
17157
|
-
*
|
|
17158
|
-
* @
|
|
17634
|
+
* @method reload
|
|
17635
|
+
* @description Requests fresh data and optionally clears the current row selection.
|
|
17636
|
+
* @param {boolean} [clearSelection=true] - Whether to clear selected entities.
|
|
17637
|
+
* @returns {void}
|
|
17159
17638
|
*/
|
|
17160
17639
|
reload(clearSelection = true) {
|
|
17161
17640
|
this._reloadChange.next(Math.random());
|
|
@@ -17164,21 +17643,31 @@ class TableDataSource extends DataSource {
|
|
|
17164
17643
|
}
|
|
17165
17644
|
}
|
|
17166
17645
|
/**
|
|
17167
|
-
*
|
|
17646
|
+
* @method applyFilters
|
|
17647
|
+
* @description Replaces the mutable field filters and requests fresh data.
|
|
17648
|
+
* @param {any} [newFilters={}] - The field filters to apply.
|
|
17649
|
+
* @returns {void}
|
|
17168
17650
|
*/
|
|
17169
17651
|
applyFilters(newFilters = {}) {
|
|
17170
17652
|
this.fieldFilters = newFilters || {};
|
|
17171
17653
|
this.reload();
|
|
17172
17654
|
}
|
|
17173
17655
|
/**
|
|
17174
|
-
*
|
|
17656
|
+
* @method clearFilters
|
|
17657
|
+
* @description Resets mutable field filters to the supplied object, or to an empty object
|
|
17658
|
+
* when no replacement is supplied, and requests fresh data.
|
|
17659
|
+
* @param {any} [newFilters={}] - Optional field filters retained after the reset.
|
|
17660
|
+
* @returns {void}
|
|
17175
17661
|
*/
|
|
17176
17662
|
clearFilters(newFilters = {}) {
|
|
17177
17663
|
this.fieldFilters = newFilters || {};
|
|
17178
17664
|
this.reload();
|
|
17179
17665
|
}
|
|
17180
17666
|
/**
|
|
17181
|
-
*
|
|
17667
|
+
* @method isAllSelected
|
|
17668
|
+
* @description Determines whether the selected entity count matches the total entity count.
|
|
17669
|
+
* An empty selection is never considered complete.
|
|
17670
|
+
* @returns {boolean} `true` when every reported entity is selected; otherwise, `false`.
|
|
17182
17671
|
*/
|
|
17183
17672
|
isAllSelected() {
|
|
17184
17673
|
if (this.selectionModel.isEmpty()) {
|
|
@@ -17187,9 +17676,13 @@ class TableDataSource extends DataSource {
|
|
|
17187
17676
|
return this.selectionModel.selected.length === this.total;
|
|
17188
17677
|
}
|
|
17189
17678
|
/**
|
|
17190
|
-
*
|
|
17191
|
-
* @
|
|
17192
|
-
*
|
|
17679
|
+
* @method toggleSelect
|
|
17680
|
+
* @description Clears an existing selection or selects each unlocked entity on the current
|
|
17681
|
+
* page that satisfies the optional predicate.
|
|
17682
|
+
* @param {MatCheckboxChange} checkbox - The select-all checkbox change event.
|
|
17683
|
+
* @param {(value: TEntity, index: number, array: TEntity[]) => unknown} [predicate] - Optional
|
|
17684
|
+
* condition used to choose selectable entities.
|
|
17685
|
+
* @returns {void}
|
|
17193
17686
|
*/
|
|
17194
17687
|
toggleSelect(checkbox, predicate) {
|
|
17195
17688
|
if (this.selectionModel.hasValue()) {
|
|
@@ -17206,48 +17699,75 @@ class TableDataSource extends DataSource {
|
|
|
17206
17699
|
}
|
|
17207
17700
|
}
|
|
17208
17701
|
/**
|
|
17209
|
-
*
|
|
17702
|
+
* @property getSelected
|
|
17703
|
+
* @description Maps selected entities to the values stored under the specified property key.
|
|
17704
|
+
* @template TType - The expected property value type.
|
|
17705
|
+
* @param {string} key - The entity property key to read.
|
|
17706
|
+
* @returns {TType[]} The selected property values.
|
|
17210
17707
|
*/
|
|
17211
17708
|
getSelected = (key) => this.selectionModel.selected.map(x => x[key]);
|
|
17212
17709
|
/**
|
|
17213
|
-
*
|
|
17710
|
+
* @property getSelectedItems
|
|
17711
|
+
* @description Gets all currently selected entities.
|
|
17712
|
+
* @returns {TEntity[]} The selected entities.
|
|
17713
|
+
*/
|
|
17714
|
+
getSelectedItems = () => this.selectionModel.selected;
|
|
17715
|
+
/**
|
|
17716
|
+
* @property getSelectedIds
|
|
17717
|
+
* @description Gets the numeric identifiers of all selected entities.
|
|
17718
|
+
* @returns {number[]} The selected entity identifiers.
|
|
17214
17719
|
*/
|
|
17215
17720
|
getSelectedIds = () => this.getSelected('id');
|
|
17216
17721
|
}
|
|
17217
17722
|
|
|
17218
17723
|
class DataSourceFilterDirective {
|
|
17219
17724
|
/**
|
|
17220
|
-
*
|
|
17725
|
+
* The table data source to which the filter will be applied.
|
|
17726
|
+
* @type {TableDataSource<any, any>}
|
|
17221
17727
|
*/
|
|
17222
17728
|
dataSource;
|
|
17729
|
+
/**
|
|
17730
|
+
* Keeps restored rows selected on the initial load.
|
|
17731
|
+
* Later filter changes still clear the selection.
|
|
17732
|
+
* @type {boolean}
|
|
17733
|
+
*/
|
|
17734
|
+
preserveInitialSelection = false;
|
|
17223
17735
|
/**
|
|
17224
17736
|
* Represents a value that changes over time.
|
|
17225
17737
|
* Observers can subscribe to the subject to receive filter changes
|
|
17738
|
+
* @type {BehaviorSubject<any>}
|
|
17226
17739
|
*/
|
|
17227
17740
|
_queryChange = new BehaviorSubject(null);
|
|
17228
17741
|
/**
|
|
17229
|
-
* Sets query
|
|
17742
|
+
* Sets the filter query for the data source.
|
|
17743
|
+
* @param query The filter query to apply to the data source.
|
|
17230
17744
|
*/
|
|
17231
17745
|
set dataSourceFilter(query) { this._queryChange.next(query); }
|
|
17232
17746
|
/**
|
|
17233
|
-
* Gets query
|
|
17747
|
+
* Gets the current filter query for the data source.
|
|
17748
|
+
* @returns The current filter query.
|
|
17234
17749
|
*/
|
|
17235
17750
|
get dataSourceFilter() { return this._queryChange.value; }
|
|
17236
17751
|
/**
|
|
17237
17752
|
* Lifecycle hook that is called after data-bound properties of a directive are initialized.
|
|
17238
17753
|
*/
|
|
17239
17754
|
ngOnInit() {
|
|
17755
|
+
let initialLoad = true;
|
|
17240
17756
|
this._queryChange.subscribe(() => {
|
|
17241
17757
|
if (this.dataSource) {
|
|
17242
17758
|
/* Update the filters */
|
|
17243
17759
|
Object.assign(this.dataSource.staticFieldFilters || {}, this.dataSourceFilter != null ? this.dataSourceFilter : {});
|
|
17244
|
-
/*
|
|
17245
|
-
this.
|
|
17760
|
+
/* The first reload applies the starting filters without discarding restored selections. */
|
|
17761
|
+
const clearSelection = !initialLoad || !this.preserveInitialSelection;
|
|
17762
|
+
/* Determine whether to clear the selection based on the initial load and preserveInitialSelection flag */
|
|
17763
|
+
initialLoad = false;
|
|
17764
|
+
/* Reload the data source with the appropriate selection clearing behavior */
|
|
17765
|
+
this.dataSource.reload(clearSelection);
|
|
17246
17766
|
}
|
|
17247
17767
|
});
|
|
17248
17768
|
}
|
|
17249
17769
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: DataSourceFilterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
17250
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: DataSourceFilterDirective, isStandalone: true, selector: "[dataSourceFilter]", inputs: { dataSource: "dataSource", dataSourceFilter: "dataSourceFilter" }, ngImport: i0 });
|
|
17770
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: DataSourceFilterDirective, isStandalone: true, selector: "[dataSourceFilter]", inputs: { dataSource: "dataSource", preserveInitialSelection: "preserveInitialSelection", dataSourceFilter: "dataSourceFilter" }, ngImport: i0 });
|
|
17251
17771
|
}
|
|
17252
17772
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: DataSourceFilterDirective, decorators: [{
|
|
17253
17773
|
type: Directive,
|
|
@@ -17256,192 +17776,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
17256
17776
|
}]
|
|
17257
17777
|
}], propDecorators: { dataSource: [{
|
|
17258
17778
|
type: Input
|
|
17779
|
+
}], preserveInitialSelection: [{
|
|
17780
|
+
type: Input
|
|
17259
17781
|
}], dataSourceFilter: [{
|
|
17260
17782
|
type: Input
|
|
17261
17783
|
}] } });
|
|
17262
17784
|
|
|
17263
|
-
/**
|
|
17264
|
-
* Class representing the structure and behavior of a table definition.
|
|
17265
|
-
* It defines various configurations such as column settings, actions,
|
|
17266
|
-
* and callbacks for rows and data handling.
|
|
17267
|
-
*
|
|
17268
|
-
* @template T - The type of data represented in the table rows.
|
|
17269
|
-
*/
|
|
17270
|
-
class TableDefinition {
|
|
17271
|
-
/**
|
|
17272
|
-
* @property endpoint
|
|
17273
|
-
* @description API endpoint from which table data will be fetched.
|
|
17274
|
-
* @type {string}
|
|
17275
|
-
*/
|
|
17276
|
-
endpoint = '';
|
|
17277
|
-
/**
|
|
17278
|
-
* @property projection
|
|
17279
|
-
* @description Optional projection for specifying which fields should be included
|
|
17280
|
-
* in the fetched data. Can be a single string or an array of field names.
|
|
17281
|
-
* @type {string | string[]}
|
|
17282
|
-
*/
|
|
17283
|
-
projection;
|
|
17284
|
-
/**
|
|
17285
|
-
* @property includes
|
|
17286
|
-
* @description Optional array of related data entities (includes) to be retrieved along
|
|
17287
|
-
* with the main data set.
|
|
17288
|
-
* @type {string[]}
|
|
17289
|
-
*/
|
|
17290
|
-
includes;
|
|
17291
|
-
/**
|
|
17292
|
-
* @property showAction
|
|
17293
|
-
* @description Flag to indicate if action columns (e.g., edit, delete buttons)
|
|
17294
|
-
* should be displayed in the table. Defaults to `true`.
|
|
17295
|
-
* @type {boolean}
|
|
17296
|
-
*/
|
|
17297
|
-
showAction = true;
|
|
17298
|
-
/**
|
|
17299
|
-
* @property selectable
|
|
17300
|
-
* @description Flag to indicate if rows can be selected (e.g., with checkboxes).
|
|
17301
|
-
* Defaults to `true`.
|
|
17302
|
-
* @type {boolean}
|
|
17303
|
-
*/
|
|
17304
|
-
selectable = true;
|
|
17305
|
-
/**
|
|
17306
|
-
* @property addable
|
|
17307
|
-
* @description Flag to indicate if new items can be added to the table.
|
|
17308
|
-
* Defaults to `true`.
|
|
17309
|
-
* @type {boolean}
|
|
17310
|
-
*/
|
|
17311
|
-
addable = true;
|
|
17312
|
-
/**
|
|
17313
|
-
* @property editable
|
|
17314
|
-
* @description Flag to indicate if rows can be edited. Defaults to `true`.
|
|
17315
|
-
* @type {boolean}
|
|
17316
|
-
*/
|
|
17317
|
-
editable = true;
|
|
17318
|
-
/**
|
|
17319
|
-
* @property deletable
|
|
17320
|
-
* @description Flag to indicate if rows can be deleted. Defaults to `true`.
|
|
17321
|
-
* @type {boolean}
|
|
17322
|
-
*/
|
|
17323
|
-
deletable = true;
|
|
17324
|
-
/**
|
|
17325
|
-
* @property downloadable
|
|
17326
|
-
* @description Flag to indicate if table data can be downloaded (e.g., as CSV or Excel).
|
|
17327
|
-
* @type {boolean}
|
|
17328
|
-
*/
|
|
17329
|
-
downloadable;
|
|
17330
|
-
/**
|
|
17331
|
-
* @property duplicable
|
|
17332
|
-
* @description Flag to indicate if rows can be duplicated.
|
|
17333
|
-
* @type {boolean}
|
|
17334
|
-
*/
|
|
17335
|
-
duplicable;
|
|
17336
|
-
/**
|
|
17337
|
-
* @property exportable
|
|
17338
|
-
* @description Determines if the table is exportable.
|
|
17339
|
-
* @type {boolean}
|
|
17340
|
-
*/
|
|
17341
|
-
exportable = true;
|
|
17342
|
-
/**
|
|
17343
|
-
* @property exportFileName
|
|
17344
|
-
* @description The name of the file to export.
|
|
17345
|
-
* @type {string}
|
|
17346
|
-
*/
|
|
17347
|
-
exportFileName;
|
|
17348
|
-
/**
|
|
17349
|
-
* @property sticky
|
|
17350
|
-
* @description Flag to indicate whether the table headers or columns should stick
|
|
17351
|
-
* to the viewport during scrolling. Defaults to `false`.
|
|
17352
|
-
* @type {boolean}
|
|
17353
|
-
*/
|
|
17354
|
-
sticky = false;
|
|
17355
|
-
/**
|
|
17356
|
-
* @property columns
|
|
17357
|
-
* @description Array of table columns that define the structure and data types
|
|
17358
|
-
* of each column in the table.
|
|
17359
|
-
* @type {TableColumn<T>[]}
|
|
17360
|
-
*/
|
|
17361
|
-
columns = [];
|
|
17362
|
-
/**
|
|
17363
|
-
* @property hideColumns
|
|
17364
|
-
* @description Optional array of column keys that should be hidden from view.
|
|
17365
|
-
* @type {string[]}
|
|
17366
|
-
*/
|
|
17367
|
-
hideColumns;
|
|
17368
|
-
/**
|
|
17369
|
-
* @property rowNgClass
|
|
17370
|
-
* @description Function to dynamically assign CSS classes to rows based on the row data
|
|
17371
|
-
* and context. Can be used for conditional row styling.
|
|
17372
|
-
* @type {(x?: T, ctx?: IGenericListComponent<T>) => any}
|
|
17373
|
-
*/
|
|
17374
|
-
rowNgClass;
|
|
17375
|
-
/**
|
|
17376
|
-
* @property rowClick
|
|
17377
|
-
* @description Callback function for handling row click events.
|
|
17378
|
-
* Invoked when a row is clicked.
|
|
17379
|
-
* @type {(x?: T, ctx?: IGenericListComponent<T>) => any}
|
|
17380
|
-
*/
|
|
17381
|
-
rowClick;
|
|
17382
|
-
/**
|
|
17383
|
-
* @property onEdit
|
|
17384
|
-
* @description Callback function for handling edit actions.
|
|
17385
|
-
* Invoked when the edit button is clicked for a row.
|
|
17386
|
-
* @type {(x?: T, ctx?: IGenericListComponent<T>) => any}
|
|
17387
|
-
*/
|
|
17388
|
-
onEdit;
|
|
17389
|
-
/**
|
|
17390
|
-
* @property detailsTemplate
|
|
17391
|
-
* @description Name of the template to use for displaying additional row details.
|
|
17392
|
-
* @type {string}
|
|
17393
|
-
*/
|
|
17394
|
-
detailsTemplate;
|
|
17395
|
-
/**
|
|
17396
|
-
* @property actions
|
|
17397
|
-
* @description Array of action items (e.g., custom buttons) available for each row in the table.
|
|
17398
|
-
* Actions can be context-sensitive based on the row data and table context.
|
|
17399
|
-
* @type {ActionItem<T, IGenericListComponent<T>>[]}
|
|
17400
|
-
*/
|
|
17401
|
-
actions = [];
|
|
17402
|
-
/**
|
|
17403
|
-
* @property columnSets
|
|
17404
|
-
* @description Used to display specific columns in the table.
|
|
17405
|
-
* This array defines sets of columns that can be shown
|
|
17406
|
-
* based on the active configuration, allowing for dynamic table
|
|
17407
|
-
* column customization.
|
|
17408
|
-
* @type {string[]}
|
|
17409
|
-
*/
|
|
17410
|
-
columnSets = [];
|
|
17411
|
-
/**
|
|
17412
|
-
* Constructor for initializing the table definition with optional values.
|
|
17413
|
-
* Merges the provided initialization object with default properties.
|
|
17414
|
-
*
|
|
17415
|
-
* @param init - Optional partial table definition to initialize values.
|
|
17416
|
-
*/
|
|
17417
|
-
constructor(init) {
|
|
17418
|
-
Object.assign(this, init);
|
|
17419
|
-
}
|
|
17420
|
-
}
|
|
17421
|
-
|
|
17422
|
-
/**
|
|
17423
|
-
* Gets classes decoarated with @Table
|
|
17424
|
-
* @param origin
|
|
17425
|
-
* @returns
|
|
17426
|
-
*/
|
|
17427
|
-
function getTableDefinition(origin) {
|
|
17428
|
-
/* Save the table defintion in the metadata */
|
|
17429
|
-
var tableDefinition = Reflect.getMetadata(TABLE_DEFINITION_METADATA_KEY, origin) ?? new TableDefinition({});
|
|
17430
|
-
if (tableDefinition) {
|
|
17431
|
-
/* Set column in the table definition */
|
|
17432
|
-
tableDefinition.columns = Reflect.getMetadata(TABLE_COLUMNS_METADATA_KEY, Reflect.construct(origin, []))
|
|
17433
|
-
?.filter((x) => !x.hidden && !tableDefinition.hideColumns?.some(y => y.trim() == x.name.trim()));
|
|
17434
|
-
/* Sort the columns by index */
|
|
17435
|
-
Utils.sortArray(tableDefinition.columns || [], 'index');
|
|
17436
|
-
/* Set endpoint from the decorator @Api, if any */
|
|
17437
|
-
var endpoint = Reflect.getMetadata(endpointMetadataKey, origin);
|
|
17438
|
-
if (endpoint) {
|
|
17439
|
-
tableDefinition.endpoint = endpoint;
|
|
17440
|
-
}
|
|
17441
|
-
}
|
|
17442
|
-
return tableDefinition;
|
|
17443
|
-
}
|
|
17444
|
-
|
|
17445
17785
|
/**
|
|
17446
17786
|
* A generic datasource class for working with data-tables in Angular Material.
|
|
17447
17787
|
* This class extends MatTableDataSource to provide additional functionality like
|
|
@@ -18362,28 +18702,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
18362
18702
|
args: ["focusout"]
|
|
18363
18703
|
}] } });
|
|
18364
18704
|
|
|
18705
|
+
const REMEMBERED_TABLE_ROWS = new InjectionToken('Remembered table rows', {
|
|
18706
|
+
factory: () => new Map()
|
|
18707
|
+
});
|
|
18365
18708
|
class VdDynamicTableComponent {
|
|
18366
18709
|
dynamicBuilder;
|
|
18367
18710
|
changeDetector;
|
|
18368
18711
|
/**
|
|
18369
18712
|
* Reference to the table component, used for accessing MatTable functionalities.
|
|
18713
|
+
* @type {MatTable<any> | undefined}
|
|
18370
18714
|
*/
|
|
18371
18715
|
table;
|
|
18372
18716
|
/**
|
|
18373
18717
|
* References to the container elements for detail templates, with ViewContainerRef
|
|
18374
18718
|
* allowing dynamic insertion of views.
|
|
18719
|
+
* @type {QueryList<any> | undefined}
|
|
18375
18720
|
*/
|
|
18376
18721
|
detailsTemplateRef;
|
|
18377
18722
|
/**
|
|
18378
18723
|
* Reference to a content child template (details template) of type TemplateRef,
|
|
18379
18724
|
* used for rendering custom templates in the table.
|
|
18725
|
+
* @type {TemplateRef<any> | undefined}
|
|
18380
18726
|
*/
|
|
18381
18727
|
templateRef;
|
|
18382
18728
|
/**
|
|
18383
18729
|
* Data source for the table, which can either be a custom TableDataSource
|
|
18384
18730
|
* implementation or a dynamic object.
|
|
18731
|
+
* @type {TableDataSource<any, any> | any}
|
|
18385
18732
|
*/
|
|
18386
18733
|
dataSource;
|
|
18734
|
+
/**
|
|
18735
|
+
* Overrides the selection scope inferred from the table definition or data source.
|
|
18736
|
+
* Use a distinct key for each table and record scope.
|
|
18737
|
+
* @type {string | undefined}
|
|
18738
|
+
*/
|
|
18739
|
+
rememberSelectionKey;
|
|
18740
|
+
/**
|
|
18741
|
+
* The currently active selection key, used for remembering selection across navigation.
|
|
18742
|
+
* @type {string | undefined}
|
|
18743
|
+
*/
|
|
18744
|
+
route = inject(ActivatedRoute, { optional: true });
|
|
18745
|
+
/**
|
|
18746
|
+
* The table definition object, which contains metadata and configuration for the table.
|
|
18747
|
+
* @type {TableDefinition | undefined}
|
|
18748
|
+
*/
|
|
18749
|
+
tableDefinition;
|
|
18750
|
+
/**
|
|
18751
|
+
* Indicates whether the table should remember selection across navigation.
|
|
18752
|
+
* @type {string | undefined}
|
|
18753
|
+
*/
|
|
18754
|
+
activeSelectionKey;
|
|
18755
|
+
/**
|
|
18756
|
+
* Stores the remembered table rows for persisting selection across navigation.
|
|
18757
|
+
* @type {Map<string, any>}
|
|
18758
|
+
*/
|
|
18759
|
+
rememberedTableRows = inject(REMEMBERED_TABLE_ROWS);
|
|
18760
|
+
/**
|
|
18761
|
+
* Subscription for tracking selection changes in the table.
|
|
18762
|
+
* @type {Subscription | undefined}
|
|
18763
|
+
*/
|
|
18764
|
+
selectionSubscription;
|
|
18387
18765
|
/**
|
|
18388
18766
|
* Input data for the table, which is set as a static data source.
|
|
18389
18767
|
* This method also initializes sorting and pagination for the table.
|
|
@@ -18602,6 +18980,10 @@ class VdDynamicTableComponent {
|
|
|
18602
18980
|
* Observable tracking the filterable columns displayed in the table.
|
|
18603
18981
|
*/
|
|
18604
18982
|
displayedFilterColumns$;
|
|
18983
|
+
/**
|
|
18984
|
+
* Name of the last visible sticky-start column used as right boundary marker.
|
|
18985
|
+
*/
|
|
18986
|
+
lastStickyStartColumnName;
|
|
18605
18987
|
/**
|
|
18606
18988
|
* Input property for row-specific action menu items.
|
|
18607
18989
|
* Defines actions available in the context menu for each row.
|
|
@@ -18687,6 +19069,80 @@ class VdDynamicTableComponent {
|
|
|
18687
19069
|
this.dynamicBuilder = dynamicBuilder;
|
|
18688
19070
|
this.changeDetector = changeDetector;
|
|
18689
19071
|
}
|
|
19072
|
+
/**
|
|
19073
|
+
* Lifecycle hook that is called when any data-bound property of a directive changes.
|
|
19074
|
+
* @param changes - An object of key/value pairs for the changed properties.
|
|
19075
|
+
*/
|
|
19076
|
+
ngOnChanges(changes) {
|
|
19077
|
+
/* If none of the relevant inputs have changed, exit early. */
|
|
19078
|
+
if (!changes.dataSource && !changes.rememberSelectionKey && !changes.classType && !changes.columnSets) {
|
|
19079
|
+
return;
|
|
19080
|
+
}
|
|
19081
|
+
/* Update the table definition if the class type has changed. */
|
|
19082
|
+
if (changes.classType) {
|
|
19083
|
+
this.tableDefinition = this.classType ? getTableDefinition(this.classType) : undefined;
|
|
19084
|
+
}
|
|
19085
|
+
/* Ensure the data source is of the correct type. */
|
|
19086
|
+
const source = this.dataSource;
|
|
19087
|
+
/* If the source is not a TableDataSource, handle accordingly. */
|
|
19088
|
+
if (!(source instanceof TableDataSource)) {
|
|
19089
|
+
/* If the source is not a TableDataSource, clear any existing selection subscriptions and active selection key. */
|
|
19090
|
+
this.selectionSubscription?.unsubscribe();
|
|
19091
|
+
this.selectionSubscription = undefined;
|
|
19092
|
+
this.activeSelectionKey = undefined;
|
|
19093
|
+
/* Warn the developer if rememberSelectionKey is used with an invalid data source. */
|
|
19094
|
+
if (this.rememberSelectionKey && source != null) {
|
|
19095
|
+
console.warn('rememberSelectionKey requires a TableDataSource.');
|
|
19096
|
+
}
|
|
19097
|
+
return;
|
|
19098
|
+
}
|
|
19099
|
+
/* Determine the key used for remembering selection. */
|
|
19100
|
+
let key = this.rememberSelectionKey ?? source.rememberSelectionKey;
|
|
19101
|
+
if (key === undefined && this.tableDefinition?.rememberSelection === true) {
|
|
19102
|
+
/* Include route parameters so different records do not share a selection. */
|
|
19103
|
+
const routeScope = this.route?.snapshot.pathFromRoot.map(route => [route.outlet, route.url.map(segment => segment.toString())]);
|
|
19104
|
+
key = JSON.stringify(['table', routeScope, this.classType.name, source.service.endpoint, source.path, this.columnSets]);
|
|
19105
|
+
}
|
|
19106
|
+
/* Fallback to undefined if the key is falsy. */
|
|
19107
|
+
key ||= undefined;
|
|
19108
|
+
if (key === this.activeSelectionKey && !changes.dataSource) {
|
|
19109
|
+
return;
|
|
19110
|
+
}
|
|
19111
|
+
/* Keep track of whether the table was previously remembering selection. */
|
|
19112
|
+
const wasRemembering = !!this.activeSelectionKey;
|
|
19113
|
+
/* Unsubscribe from any previous selection changes before updating the active selection key. */
|
|
19114
|
+
this.selectionSubscription?.unsubscribe();
|
|
19115
|
+
this.selectionSubscription = undefined;
|
|
19116
|
+
/* Update the active selection key to the new key. */
|
|
19117
|
+
this.activeSelectionKey = key;
|
|
19118
|
+
/* Get the selection model from the data source. */
|
|
19119
|
+
const selection = source.selectionModel;
|
|
19120
|
+
if (wasRemembering && !changes.dataSource) {
|
|
19121
|
+
selection.clear();
|
|
19122
|
+
}
|
|
19123
|
+
/* Retrieve any previously saved rows for the current remember selection key. */
|
|
19124
|
+
const savedRows = key ? this.rememberedTableRows.get(key) : undefined;
|
|
19125
|
+
if (savedRows) {
|
|
19126
|
+
selection.setSelection(...savedRows);
|
|
19127
|
+
}
|
|
19128
|
+
/* Save changes only when the table has a selection scope. */
|
|
19129
|
+
if (key) {
|
|
19130
|
+
/* Save the current selection whenever it changes. */
|
|
19131
|
+
const saveSelection = () => {
|
|
19132
|
+
const rows = selection.selected.filter(row => getTableRowId(row) != null);
|
|
19133
|
+
if (rows.length) {
|
|
19134
|
+
this.rememberedTableRows.set(key, rows);
|
|
19135
|
+
}
|
|
19136
|
+
else {
|
|
19137
|
+
this.rememberedTableRows.delete(key);
|
|
19138
|
+
}
|
|
19139
|
+
};
|
|
19140
|
+
/* Immediately save the current selection to ensure it is persisted. */
|
|
19141
|
+
saveSelection();
|
|
19142
|
+
/* Subscribe to selection changes to keep the remembered rows updated. */
|
|
19143
|
+
this.selectionSubscription = selection.changed.subscribe(saveSelection);
|
|
19144
|
+
}
|
|
19145
|
+
}
|
|
18690
19146
|
/**
|
|
18691
19147
|
* A callback method that is invoked immediately after the
|
|
18692
19148
|
* default change detector has checked the directive's
|
|
@@ -18697,7 +19153,7 @@ class VdDynamicTableComponent {
|
|
|
18697
19153
|
ngOnInit() {
|
|
18698
19154
|
if (this.classType) {
|
|
18699
19155
|
/* Get the table definition using the class type */
|
|
18700
|
-
var tableDefinition = getTableDefinition(this.classType);
|
|
19156
|
+
var tableDefinition = this.tableDefinition ?? getTableDefinition(this.classType);
|
|
18701
19157
|
if (tableDefinition) {
|
|
18702
19158
|
this.columns = [...tableDefinition.columns ?? []];
|
|
18703
19159
|
if (this.rowMenuItems?.length > 0) {
|
|
@@ -18752,6 +19208,7 @@ class VdDynamicTableComponent {
|
|
|
18752
19208
|
const selectedColumns = (this.columnSets?.length ?? 0) > 0
|
|
18753
19209
|
? this.columns?.filter(c => this.columnSets?.some(set => c.columnSets?.includes(set)))
|
|
18754
19210
|
: this.columns;
|
|
19211
|
+
this.updateLastStickyStartColumnName(selectedColumns);
|
|
18755
19212
|
/* Build the displayed columns by filtering out the excluded columns and mapping to their names */
|
|
18756
19213
|
this.displayedColumns$ = of(selectedColumns
|
|
18757
19214
|
/* Exclude columns that are in the excludedColumns list */
|
|
@@ -18858,12 +19315,34 @@ class VdDynamicTableComponent {
|
|
|
18858
19315
|
}
|
|
18859
19316
|
/**
|
|
18860
19317
|
* A function to to compute the identity of items in an iterable.
|
|
18861
|
-
* @param index
|
|
18862
|
-
* @param item
|
|
19318
|
+
* @param index The index of the column in the array
|
|
19319
|
+
* @param item The column item itself
|
|
18863
19320
|
*/
|
|
18864
19321
|
columnsTrackBy(index, item) {
|
|
18865
19322
|
return item.name;
|
|
18866
19323
|
}
|
|
19324
|
+
/**
|
|
19325
|
+
* Checks if the given column is the last sticky start column
|
|
19326
|
+
* @param column The column to check
|
|
19327
|
+
* @returns True if it is the last sticky start column, false otherwise
|
|
19328
|
+
*/
|
|
19329
|
+
isLastStickyStartColumn(column) {
|
|
19330
|
+
return !!column?.sticky && column?.name === this.lastStickyStartColumnName;
|
|
19331
|
+
}
|
|
19332
|
+
/**
|
|
19333
|
+
* Updates the name of the last sticky start column based on the current visible columns.
|
|
19334
|
+
* @param columns The array of table columns to evaluate.
|
|
19335
|
+
*/
|
|
19336
|
+
updateLastStickyStartColumnName(columns) {
|
|
19337
|
+
const visibleColumns = columns
|
|
19338
|
+
?.filter(x => !this.excludedColumns?.includes(x.name))
|
|
19339
|
+
?.filter(x => !x.hide || !x.hide(this.entityObject, this.parentControl, this.context))
|
|
19340
|
+
?.filter(x => !x.hidden);
|
|
19341
|
+
const stickyStartColumns = visibleColumns?.filter(x => !!x.sticky && !x.stickyEnd);
|
|
19342
|
+
this.lastStickyStartColumnName = stickyStartColumns?.length
|
|
19343
|
+
? stickyStartColumns[stickyStartColumns.length - 1].name
|
|
19344
|
+
: undefined;
|
|
19345
|
+
}
|
|
18867
19346
|
/**
|
|
18868
19347
|
* Handles row click event
|
|
18869
19348
|
* @param index
|
|
@@ -19075,18 +19554,19 @@ class VdDynamicTableComponent {
|
|
|
19075
19554
|
ngAfterViewChecked() {
|
|
19076
19555
|
this.changeDetector.detectChanges();
|
|
19077
19556
|
}
|
|
19557
|
+
/**
|
|
19558
|
+
* Lifecycle hook that is called when the directive is destroyed.
|
|
19559
|
+
* It is used to clean up any resources, such as subscriptions.
|
|
19560
|
+
*/
|
|
19561
|
+
ngOnDestroy() {
|
|
19562
|
+
this.selectionSubscription?.unsubscribe();
|
|
19563
|
+
}
|
|
19078
19564
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: VdDynamicTableComponent, deps: [{ token: DynamicBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
19079
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", 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) {\r\n <div class=\"loading-progress\">\r\n @if (dataSource?.isLoading) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n}\r\n<!-- #region Data table -->\r\n<div class=\"mat-table-container scrollbar-secondary\" [ngClass]=\"{'mat-table-sticky': sticky}\" #scrollContainer>\r\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>\r\n @for (column of columns$ | async; track columnsTrackBy($index, column)) {\r\n <!-- #region Column def -->\r\n <ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\n <ng-template #header [ngTemplateOutlet]=\"header\" let-headerText=\"headerText\" [ngTemplateOutletContext]=\"{headerText: column.header | func:context}\">\r\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]=\"column.displayNgClass\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\r\n @if (column.type == ColumnType.Checkbox) {\r\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>\r\n } @if (column.type != ColumnType.Checkbox) {\r\n <span [matTooltip]=\"headerText\">{{headerText}}</span>\r\n }\r\n </th>\r\n </ng-template>\r\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}\">\r\n <ng-template #rowVal [ngTemplateOutlet]=\"rowVal\" let-rowValue [ngTemplateOutletContext]=\"{$implicit: column?.content && column?.content(row, undefined, context)}\">\r\n @switch (column.type) {\r\n <!-- #region Checkbox column -->\r\n @case (ColumnType.Checkbox) {\r\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>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Enum column -->\r\n @case (ColumnType.Enum) {\r\n <span>\r\n @if (column.enumMetadata) {\r\n @if (column.multiple) {\r\n @for (item of rowValue; track item; let i = $index) {\r\n @if (i < 2) {\r\n <ng-template let-displayValue=\"displayValue\" [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ displayValue: column.enumMetadata[item].display }\"></ng-template>\r\n }\r\n @if (i === 1 && rowValue?.length > 2) {\r\n <small [matTooltip]=\"(rowValue | slice:2 | map:column.enumMetadata | map:'display') | join:'\\n'\" matTooltipClass=\"mat-tooltip-multiline\">...</small>\r\n }\r\n }\r\n <ng-template #template let-displayValue=\"displayValue\">\r\n <mat-chip-row disableRipple=\"true\" selectable=\"false\" [matTooltip]=\"displayValue\">\r\n <span>{{ displayValue }}</span>\r\n </mat-chip-row>\r\n </ng-template>\r\n } @else {\r\n @if (rowValue >= 0) {\r\n <span class=\"na\" [ngStyle]=\"{ color: ((column.enumMetadata[rowValue] || {}).textColor || 'inherit') }\" [innerHtml]=\"(column.enumMetadata[rowValue]||{}).display\"></span>\r\n }\r\n }\r\n } @else {\r\n @if (column.multiple) {\r\n @for (item of rowValue; track item; let i = $index; let last = $last) {\r\n <div>\r\n @if (i<2) {\r\n <small>\r\n <msa-enum-display [value]=\"item\" [enumType]=\"column.enumType\" [metadata]=\"column.enumMetadata\"></msa-enum-display>\r\n </small>\r\n } @if (i==1 && rowValue?.length > 2) {\r\n <small>, ...</small>\r\n }\r\n </div>\r\n }\r\n } @else {\r\n @if (rowValue >= 0) {\r\n <msa-enum-display [value]=\"rowValue\" [enumType]=\"column.enumType\" [metadata]=\"column.enumMetadata\"></msa-enum-display>\r\n }\r\n }\r\n }\r\n </span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Toggle column -->\r\n @case (ColumnType.Toggle) {\r\n @if (!formArray) {\r\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>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Date column -->\r\n @case (ColumnType.Date) {\r\n <span>{{rowValue | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Text Input column -->\r\n @case (ColumnType.TextInput) {\r\n @if (!formArray) {\r\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\r\n @if (!formArray) {\r\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)\" />\r\n }\r\n </mat-form-field>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region VD-Select column -->\r\n @case (ColumnType.Select) {\r\n @if (!formArray) {\r\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\r\n @if (!formArray) {\r\n <vd-select name=\"{{column.name}}{{rowIndex}}\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"$safeNavigationMigration(column?.enumFilter) | func:row:context\" [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>\r\n }\r\n </mat-form-field>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Action -->\r\n @case (ColumnType.Action) {\r\n @if (column.menu) {\r\n @if (menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)) {\r\n <div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu!\"></div>\r\n }\r\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Menu -->\r\n @case (ColumnType.Menu) {\r\n @if (column.menu) {\r\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\"></vd-dynamic-menu>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region icon -->\r\n @case (ColumnType.Icon) {\r\n <span layout=\"row\" layout-align=\"start center\">\r\n @if(column && column.icon){\r\n @if ( column.icon.matIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\">{{handleExpression($safeNavigationMigration(column.icon.matIcon)!, row)}}</mat-icon>\r\n }\r\n @if (column.icon.svgIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\" [svgIcon]=\"handleExpression($safeNavigationMigration(column.icon.svgIcon)!, row)!\"></mat-icon>\r\n }\r\n @if (column.icon.fontIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\" [fontIcon]=\"handleExpression($safeNavigationMigration(column.icon.fontIcon)!, row)!\"></mat-icon>\r\n }\r\n }\r\n </span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region icon button -->\r\n @case (ColumnType.IconButton) {\r\n <a mat-icon-button (click)=\"$event.stopPropagation();column.iconButton?.event?column.iconButton.event(row, context):null\">\r\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>\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Other column types -->\r\n @default {\r\n <span [innerHtml]=\"rowValue??''\"></span>\r\n }\r\n <!-- #endregion -->\r\n }\r\n <ng-template #recursiveContainer let-columnNameSegments=\"segments\" let-formGroup=\"formGroup\" let-parentFormGroup=\"parentFormGroup\">\r\n @if (formGroup) {\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- If the columnNameSegments array is empty, we're at the leaf node -->\r\n @if (!columnNameSegments.length) {\r\n @switch (column.type) {\r\n <!-- #region Toggle column -->\r\n @case (ColumnType.Toggle) {\r\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>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Text Input column -->\r\n @case (ColumnType.TextInput) {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\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)\" />\r\n </mat-form-field>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region VD-Select column -->\r\n @case (ColumnType.Select) {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\n <vd-select [formControl]=\"formGroup\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:parentFormGroup.value:context\" [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>\r\n </mat-form-field>\r\n }\r\n <!-- #endregion -->\r\n }\r\n } @else {\r\n <!-- If not the last segment, create a nested form group -->\r\n <ng-container [formGroupName]=\"columnNameSegments[0]\">\r\n <!-- Recursive call to handle nested segments -->\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: columnNameSegments.slice(1), parentFormGroup:formGroup, formGroup: formGroup.get(columnNameSegments[0])}\"></ng-container>\r\n </ng-container>\r\n }\r\n </ng-container>\r\n }\r\n </ng-template>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n <!-- #endregion -->\r\n }\r\n <!-- #region Filter row -->\r\n @if (dataSource && filterable) {\r\n @for (column of columns$ | async; track column) {\r\n <ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\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]=\"column.displayNgClass\">\r\n <!-- #region Select filter -->\r\n @if(column.endpoint || column.enumType || column.options){\r\n <span filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:{}:context\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\r\n }\r\n <!-- #region Text filter -->\r\n @else if(column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number) {\r\n <span filter-input [onlyNumber]=\"column.filterInputNumber??false\" [matTooltip]=\"column.filterTooltip ? column.filterTooltip(context):null\" [matTooltipClass]=\"column.filterTooltipClass??''\" [operator]=\"!useFilterOperator ? undefined : column.filterOperator\"></span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Date filter -->\r\n @else if (column.type == ColumnType.Date) {\r\n <span filter-date></span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Action filter (clear) -->\r\n @else if (column.type == ColumnType.Action) {\r\n <span filter-clear></span>\r\n }\r\n <!-- #endregion -->\r\n </th>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Details column -->\r\n <ng-container cdkColumnDef=\"expandedDetail\">\r\n <td mat-cell *matCellDef=\"let row; let index = index\" [attr.colspan]=\"(displayedColumns$ | async)?.length\">\r\n <div class=\"row-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\" #detailsTemplate>\r\n @if (templateRef && row === expandedRow) {\r\n <ng-container *ngTemplateOutlet=\"templateRef; context:{row: row, index: index, context: context}\"></ng-container>\r\n }\r\n </div>\r\n </td>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region Filter header -->\r\n @if (filterable) {\r\n <tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\r\n }\r\n <!-- #endregion -->\r\n <tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\r\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>\r\n <!-- #region Detrails row -->\r\n @if (detailsTemplate || templateRef) {\r\n <tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\r\n }\r\n <!-- #endregion -->\r\n </table>\r\n <!-- #region Modern No Results Message -->\r\n @if (dataSource?.filteredData?.length <= 0 && dataSource?.total <= 0) {\r\n <div class=\"no-results-overlay\">\r\n <mat-icon class=\"no-results-icon\">search_off</mat-icon>\r\n <div class=\"no-results-text mat-body-1\">\r\n <h3 i18n=\"@@noResultsFound\">No results found</h3>\r\n <p i18n=\"@@tryAdjustFilters\"> Try adjusting your filters or search criteria. </p>\r\n </div>\r\n </div>\r\n }\r\n <!-- #endregion -->\r\n</div>\r\n<!-- #endregion -->\r\n<!-- #region Debug value -->\r\n@if (debugValue) {\r\n <code>\r\n <pre>{{formValue | json}}</pre>\r\n</code>\r\n}\r\n<!-- #endregion -->\r\n<div class=\"table-footer\" layout=\"row\">\r\n <ng-content select=\"[table-footer]\"></ng-content>\r\n <span flex></span>\r\n @if (paginable) {\r\n <mat-paginator [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\r\n }\r\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$3.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: i2$3.CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: i2$3.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: i2$3.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: i2$3.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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: i7.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: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.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$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$2.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:
|
|
19565
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: VdDynamicTableComponent, isStandalone: true, selector: "vd-dynamic-table", inputs: { dataSource: "dataSource", rememberSelectionKey: "rememberSelectionKey", 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 }], usesOnChanges: true, ngImport: i0, template: "@if (!static) {\r\n <div class=\"loading-progress\">\r\n @if (dataSource?.isLoading) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n}\r\n<!-- #region Data table -->\r\n<div class=\"mat-table-container scrollbar-secondary\" [ngClass]=\"{'mat-table-sticky': sticky}\" #scrollContainer>\r\n <table mat-table #table [dataSource]=\"dataSource\" [dataSourceFilter]=\"dataSourceFilter\" [preserveInitialSelection]=\"!!activeSelectionKey\" [ngClass]=\"{'table-fixed': !sticky && !detailsTemplate && !templateRef, 'table-stick': sticky}\" [trackBy]=\"trackBy\" matSort matSortDisableClear [matSortActive]=\"sortActive||'id'\" [matSortDirection]=\"sortDirection\" multiTemplateDataRows>\r\n @for (column of columns$ | async; track columnsTrackBy($index, column)) {\r\n <!-- #region Column def -->\r\n <ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\n <ng-template #header [ngTemplateOutlet]=\"header\" let-headerText=\"headerText\" [ngTemplateOutletContext]=\"{headerText: column.header | func:context}\">\r\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]=\"column.displayNgClass\" [class.msa-sticky-start]=\"column.sticky\" [class.msa-sticky-start-last]=\"isLastStickyStartColumn(column)\" [class.msa-sticky-end]=\"column.stickyEnd\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\r\n @if (column.type == ColumnType.Checkbox) {\r\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>\r\n } @if (column.type != ColumnType.Checkbox) {\r\n <span [matTooltip]=\"headerText\">{{headerText}}</span>\r\n }\r\n </th>\r\n </ng-template>\r\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)\" [class.msa-sticky-start]=\"column.sticky\" [class.msa-sticky-start-last]=\"isLastStickyStartColumn(column)\" [class.msa-sticky-end]=\"column.stickyEnd\" [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}\">\r\n <ng-template #rowVal [ngTemplateOutlet]=\"rowVal\" let-rowValue [ngTemplateOutletContext]=\"{$implicit: column?.content && column?.content(row, undefined, context)}\">\r\n @switch (column.type) {\r\n <!-- #region Checkbox column -->\r\n @case (ColumnType.Checkbox) {\r\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>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Enum column -->\r\n @case (ColumnType.Enum) {\r\n <span>\r\n @if (column.enumMetadata) {\r\n @if (column.multiple) {\r\n @for (item of rowValue; track item; let i = $index) {\r\n @if (i < 2) {\r\n <ng-template let-displayValue=\"displayValue\" [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ displayValue: column.enumMetadata[item].display }\"></ng-template>\r\n }\r\n @if (i === 1 && rowValue?.length > 2) {\r\n <small [matTooltip]=\"(rowValue | slice:2 | map:column.enumMetadata | map:'display') | join:'\\n'\" matTooltipClass=\"mat-tooltip-multiline\">...</small>\r\n }\r\n }\r\n <ng-template #template let-displayValue=\"displayValue\">\r\n <mat-chip-row disableRipple=\"true\" selectable=\"false\" [matTooltip]=\"displayValue\">\r\n <span>{{ displayValue }}</span>\r\n </mat-chip-row>\r\n </ng-template>\r\n } @else {\r\n @if (rowValue >= 0) {\r\n <span class=\"na\" [ngStyle]=\"{ color: ((column.enumMetadata[rowValue] || {}).textColor || 'inherit') }\" [innerHtml]=\"(column.enumMetadata[rowValue]||{}).display\"></span>\r\n }\r\n }\r\n } @else {\r\n @if (column.multiple) {\r\n @for (item of rowValue; track item; let i = $index; let last = $last) {\r\n <div>\r\n @if (i<2) {\r\n <small>\r\n <msa-enum-display [value]=\"item\" [enumType]=\"column.enumType\" [metadata]=\"column.enumMetadata\"></msa-enum-display>\r\n </small>\r\n } @if (i==1 && rowValue?.length > 2) {\r\n <small>, ...</small>\r\n }\r\n </div>\r\n }\r\n } @else {\r\n @if (rowValue >= 0) {\r\n <msa-enum-display [value]=\"rowValue\" [enumType]=\"column.enumType\" [metadata]=\"column.enumMetadata\"></msa-enum-display>\r\n }\r\n }\r\n }\r\n </span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Toggle column -->\r\n @case (ColumnType.Toggle) {\r\n @if (!formArray) {\r\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>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Date column -->\r\n @case (ColumnType.Date) {\r\n <span>{{rowValue | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Text Input column -->\r\n @case (ColumnType.TextInput) {\r\n @if (!formArray) {\r\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\r\n @if (!formArray) {\r\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)\" />\r\n }\r\n </mat-form-field>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region VD-Select column -->\r\n @case (ColumnType.Select) {\r\n @if (!formArray) {\r\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\r\n @if (!formArray) {\r\n <vd-select name=\"{{column.name}}{{rowIndex}}\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"$safeNavigationMigration(column?.enumFilter) | func:row:context\" [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>\r\n }\r\n </mat-form-field>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Action -->\r\n @case (ColumnType.Action) {\r\n @if (column.menu) {\r\n @if (menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)) {\r\n <div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu!\"></div>\r\n }\r\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Menu -->\r\n @case (ColumnType.Menu) {\r\n @if (column.menu) {\r\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\"></vd-dynamic-menu>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region icon -->\r\n @case (ColumnType.Icon) {\r\n <span layout=\"row\" layout-align=\"start center\">\r\n @if(column && column.icon){\r\n @if ( column.icon.matIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\">{{handleExpression($safeNavigationMigration(column.icon.matIcon)!, row)}}</mat-icon>\r\n }\r\n @if (column.icon.svgIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\" [svgIcon]=\"handleExpression($safeNavigationMigration(column.icon.svgIcon)!, row)!\"></mat-icon>\r\n }\r\n @if (column.icon.fontIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\" [fontIcon]=\"handleExpression($safeNavigationMigration(column.icon.fontIcon)!, row)!\"></mat-icon>\r\n }\r\n }\r\n </span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region icon button -->\r\n @case (ColumnType.IconButton) {\r\n <a mat-icon-button (click)=\"$event.stopPropagation();column.iconButton?.event?column.iconButton.event(row, context):null\">\r\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>\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Other column types -->\r\n @default {\r\n <span [innerHtml]=\"rowValue??''\"></span>\r\n }\r\n <!-- #endregion -->\r\n }\r\n <ng-template #recursiveContainer let-columnNameSegments=\"segments\" let-formGroup=\"formGroup\" let-parentFormGroup=\"parentFormGroup\">\r\n @if (formGroup) {\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- If the columnNameSegments array is empty, we're at the leaf node -->\r\n @if (!columnNameSegments.length) {\r\n @switch (column.type) {\r\n <!-- #region Toggle column -->\r\n @case (ColumnType.Toggle) {\r\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>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Text Input column -->\r\n @case (ColumnType.TextInput) {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\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)\" />\r\n </mat-form-field>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region VD-Select column -->\r\n @case (ColumnType.Select) {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\n <vd-select [formControl]=\"formGroup\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:parentFormGroup.value:context\" [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>\r\n </mat-form-field>\r\n }\r\n <!-- #endregion -->\r\n }\r\n } @else {\r\n <!-- If not the last segment, create a nested form group -->\r\n <ng-container [formGroupName]=\"columnNameSegments[0]\">\r\n <!-- Recursive call to handle nested segments -->\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: columnNameSegments.slice(1), parentFormGroup:formGroup, formGroup: formGroup.get(columnNameSegments[0])}\"></ng-container>\r\n </ng-container>\r\n }\r\n </ng-container>\r\n }\r\n </ng-template>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n <!-- #endregion -->\r\n }\r\n <!-- #region Filter row -->\r\n @if (dataSource && filterable) {\r\n @for (column of columns$ | async; track column) {\r\n <ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\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]=\"column.displayNgClass\" [class.msa-sticky-start]=\"column.sticky\" [class.msa-sticky-start-last]=\"isLastStickyStartColumn(column)\" [class.msa-sticky-end]=\"column.stickyEnd\">\r\n <!-- #region Select filter -->\r\n @if(column.endpoint || column.enumType || column.options){\r\n <span filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:{}:context\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\r\n }\r\n <!-- #region Text filter -->\r\n @else if(column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number) {\r\n <span filter-input [onlyNumber]=\"column.filterInputNumber??false\" [matTooltip]=\"column.filterTooltip ? column.filterTooltip(context):null\" [matTooltipClass]=\"column.filterTooltipClass??''\" [operator]=\"!useFilterOperator ? undefined : column.filterOperator\"></span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Date filter -->\r\n @else if (column.type == ColumnType.Date) {\r\n <span filter-date></span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Action filter (clear) -->\r\n @else if (column.type == ColumnType.Action) {\r\n <span filter-clear></span>\r\n }\r\n <!-- #endregion -->\r\n </th>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Details column -->\r\n <ng-container cdkColumnDef=\"expandedDetail\">\r\n <td mat-cell *matCellDef=\"let row; let index = index\" [attr.colspan]=\"(displayedColumns$ | async)?.length\">\r\n <div class=\"row-detail\" #detailsTemplate>\r\n @if (templateRef && row === expandedRow) {\r\n <ng-container *ngTemplateOutlet=\"templateRef; context:{row: row, index: index, context: context}\"></ng-container>\r\n }\r\n </div>\r\n </td>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region Filter header -->\r\n @if (filterable) {\r\n <tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\r\n }\r\n <!-- #endregion -->\r\n <tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\r\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>\r\n <!-- #region Detrails row -->\r\n @if (detailsTemplate || templateRef) {\r\n <tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\r\n }\r\n <!-- #endregion -->\r\n </table>\r\n <!-- #region Modern No Results Message -->\r\n @if ((dataSource?.filteredData?.length??0) <= 0 && dataSource?.total <= 0) {\r\n <div class=\"no-results-overlay\">\r\n <mat-icon class=\"no-results-icon\">search_off</mat-icon>\r\n <div class=\"no-results-text mat-body-1\">\r\n <h3 i18n=\"@@noResultsFound\">No results found</h3>\r\n <p i18n=\"@@tryAdjustFilters\"> Try adjusting your filters or search criteria. </p>\r\n </div>\r\n </div>\r\n }\r\n <!-- #endregion -->\r\n</div>\r\n<!-- #endregion -->\r\n<!-- #region Debug value -->\r\n@if (debugValue) {\r\n <code>\r\n <pre>{{formValue | json}}</pre>\r\n</code>\r\n}\r\n<!-- #endregion -->\r\n<div class=\"table-footer\" layout=\"row\">\r\n <ng-content select=\"[table-footer]\"></ng-content>\r\n <span flex></span>\r\n @if (paginable) {\r\n <mat-paginator [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\r\n }\r\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-mdc-cell.cdk-table-sticky,.mat-table-container .mat-mdc-header-cell.cdk-table-sticky,.mat-table-container .mat-mdc-footer-cell.cdk-table-sticky,.mat-table-container .mat-mdc-cell.mat-mdc-table-sticky,.mat-table-container .mat-mdc-header-cell.mat-mdc-table-sticky,.mat-table-container .mat-mdc-footer-cell.mat-mdc-table-sticky{z-index:2}.mat-table-container.mat-table-sticky{overflow-x:scroll;scrollbar-gutter:stable}.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-cell:not(.msa-sticky-end)+.mat-mdc-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-header-cell:not(.msa-sticky-end)+.mat-mdc-header-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-footer-cell:not(.msa-sticky-end)+.mat-mdc-footer-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-cell:not(.msa-sticky-end)+.mat-mdc-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-header-cell:not(.msa-sticky-end)+.mat-mdc-header-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-footer-cell:not(.msa-sticky-end)+.mat-mdc-footer-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-cell:not(.msa-sticky-end)+.mat-mdc-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-header-cell:not(.msa-sticky-end)+.mat-mdc-header-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-footer-cell:not(.msa-sticky-end)+.mat-mdc-footer-cell.msa-sticky-end{box-shadow:inset 8px 0 8px -8px #0000003d}.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-header-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-footer-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-header-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-footer-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-header-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-footer-cell.msa-sticky-start.msa-sticky-start-last{box-shadow:inset -8px 0 8px -8px #0000003d}\n"], dependencies: [{ kind: "ngmodule", type: CdkTableModule }, { kind: "directive", type: i2$3.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: i2$3.CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: i2$3.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: i2$3.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: i2$3.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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: i7.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: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.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$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$2.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:
|
|
19080
19566
|
//----------------------
|
|
19081
|
-
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: "component", type: MsaEnumDisplayComponent, selector: "msa-enum-display", inputs: ["value", "enumType", "metadata", "showIcon", "entity", "context"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }, { kind: "pipe", type: i1$2.SlicePipe, name: "slice" }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }, { kind: "pipe", type:
|
|
19567
|
+
DataSourceFilterDirective, selector: "[dataSourceFilter]", inputs: ["dataSource", "preserveInitialSelection", "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: ["optionGroupProperty", "showOptionGroupInTrigger", "triggerCssClass"] }, { kind: "component", type: MsaEnumDisplayComponent, selector: "msa-enum-display", inputs: ["value", "enumType", "metadata", "showIcon", "entity", "context"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }, { kind: "pipe", type: i1$2.SlicePipe, name: "slice" }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }, { kind: "pipe", type:
|
|
19082
19568
|
//----------------------
|
|
19083
|
-
MapPipe, name: "map" }, { kind: "pipe", type: FormGroupPipe, name: "formGroup" }, { kind: "pipe", type: FuncPipe, name: "func" }, { kind: "pipe", type: JoinPipe, name: "join" }, { kind: "pipe", type: PropertyPipe, name: "property" }],
|
|
19084
|
-
trigger('detailExpand', [
|
|
19085
|
-
state('collapsed', style({ height: '0px', minHeight: '0' })),
|
|
19086
|
-
state('expanded', style({ height: AUTO_STYLE })),
|
|
19087
|
-
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
19088
|
-
]),
|
|
19089
|
-
], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
19569
|
+
MapPipe, name: "map" }, { kind: "pipe", type: FormGroupPipe, name: "formGroup" }, { kind: "pipe", type: FuncPipe, name: "func" }, { kind: "pipe", type: JoinPipe, name: "join" }, { kind: "pipe", type: PropertyPipe, name: "property" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
19090
19570
|
}
|
|
19091
19571
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: VdDynamicTableComponent, decorators: [{
|
|
19092
19572
|
type: Component,
|
|
@@ -19124,13 +19604,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
19124
19604
|
VdDynamicMenuComponent,
|
|
19125
19605
|
VdSelectComponent,
|
|
19126
19606
|
MsaEnumDisplayComponent
|
|
19127
|
-
], changeDetection: ChangeDetectionStrategy.Eager, animations: [
|
|
19128
|
-
trigger('detailExpand', [
|
|
19129
|
-
state('collapsed', style({ height: '0px', minHeight: '0' })),
|
|
19130
|
-
state('expanded', style({ height: AUTO_STYLE })),
|
|
19131
|
-
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
19132
|
-
]),
|
|
19133
|
-
], template: "@if (!static) {\r\n <div class=\"loading-progress\">\r\n @if (dataSource?.isLoading) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n}\r\n<!-- #region Data table -->\r\n<div class=\"mat-table-container scrollbar-secondary\" [ngClass]=\"{'mat-table-sticky': sticky}\" #scrollContainer>\r\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>\r\n @for (column of columns$ | async; track columnsTrackBy($index, column)) {\r\n <!-- #region Column def -->\r\n <ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\n <ng-template #header [ngTemplateOutlet]=\"header\" let-headerText=\"headerText\" [ngTemplateOutletContext]=\"{headerText: column.header | func:context}\">\r\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]=\"column.displayNgClass\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\r\n @if (column.type == ColumnType.Checkbox) {\r\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>\r\n } @if (column.type != ColumnType.Checkbox) {\r\n <span [matTooltip]=\"headerText\">{{headerText}}</span>\r\n }\r\n </th>\r\n </ng-template>\r\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}\">\r\n <ng-template #rowVal [ngTemplateOutlet]=\"rowVal\" let-rowValue [ngTemplateOutletContext]=\"{$implicit: column?.content && column?.content(row, undefined, context)}\">\r\n @switch (column.type) {\r\n <!-- #region Checkbox column -->\r\n @case (ColumnType.Checkbox) {\r\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>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Enum column -->\r\n @case (ColumnType.Enum) {\r\n <span>\r\n @if (column.enumMetadata) {\r\n @if (column.multiple) {\r\n @for (item of rowValue; track item; let i = $index) {\r\n @if (i < 2) {\r\n <ng-template let-displayValue=\"displayValue\" [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ displayValue: column.enumMetadata[item].display }\"></ng-template>\r\n }\r\n @if (i === 1 && rowValue?.length > 2) {\r\n <small [matTooltip]=\"(rowValue | slice:2 | map:column.enumMetadata | map:'display') | join:'\\n'\" matTooltipClass=\"mat-tooltip-multiline\">...</small>\r\n }\r\n }\r\n <ng-template #template let-displayValue=\"displayValue\">\r\n <mat-chip-row disableRipple=\"true\" selectable=\"false\" [matTooltip]=\"displayValue\">\r\n <span>{{ displayValue }}</span>\r\n </mat-chip-row>\r\n </ng-template>\r\n } @else {\r\n @if (rowValue >= 0) {\r\n <span class=\"na\" [ngStyle]=\"{ color: ((column.enumMetadata[rowValue] || {}).textColor || 'inherit') }\" [innerHtml]=\"(column.enumMetadata[rowValue]||{}).display\"></span>\r\n }\r\n }\r\n } @else {\r\n @if (column.multiple) {\r\n @for (item of rowValue; track item; let i = $index; let last = $last) {\r\n <div>\r\n @if (i<2) {\r\n <small>\r\n <msa-enum-display [value]=\"item\" [enumType]=\"column.enumType\" [metadata]=\"column.enumMetadata\"></msa-enum-display>\r\n </small>\r\n } @if (i==1 && rowValue?.length > 2) {\r\n <small>, ...</small>\r\n }\r\n </div>\r\n }\r\n } @else {\r\n @if (rowValue >= 0) {\r\n <msa-enum-display [value]=\"rowValue\" [enumType]=\"column.enumType\" [metadata]=\"column.enumMetadata\"></msa-enum-display>\r\n }\r\n }\r\n }\r\n </span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Toggle column -->\r\n @case (ColumnType.Toggle) {\r\n @if (!formArray) {\r\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>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Date column -->\r\n @case (ColumnType.Date) {\r\n <span>{{rowValue | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Text Input column -->\r\n @case (ColumnType.TextInput) {\r\n @if (!formArray) {\r\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\r\n @if (!formArray) {\r\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)\" />\r\n }\r\n </mat-form-field>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region VD-Select column -->\r\n @case (ColumnType.Select) {\r\n @if (!formArray) {\r\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\r\n @if (!formArray) {\r\n <vd-select name=\"{{column.name}}{{rowIndex}}\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"$safeNavigationMigration(column?.enumFilter) | func:row:context\" [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>\r\n }\r\n </mat-form-field>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Action -->\r\n @case (ColumnType.Action) {\r\n @if (column.menu) {\r\n @if (menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)) {\r\n <div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu!\"></div>\r\n }\r\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Menu -->\r\n @case (ColumnType.Menu) {\r\n @if (column.menu) {\r\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\"></vd-dynamic-menu>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region icon -->\r\n @case (ColumnType.Icon) {\r\n <span layout=\"row\" layout-align=\"start center\">\r\n @if(column && column.icon){\r\n @if ( column.icon.matIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\">{{handleExpression($safeNavigationMigration(column.icon.matIcon)!, row)}}</mat-icon>\r\n }\r\n @if (column.icon.svgIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\" [svgIcon]=\"handleExpression($safeNavigationMigration(column.icon.svgIcon)!, row)!\"></mat-icon>\r\n }\r\n @if (column.icon.fontIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\" [fontIcon]=\"handleExpression($safeNavigationMigration(column.icon.fontIcon)!, row)!\"></mat-icon>\r\n }\r\n }\r\n </span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region icon button -->\r\n @case (ColumnType.IconButton) {\r\n <a mat-icon-button (click)=\"$event.stopPropagation();column.iconButton?.event?column.iconButton.event(row, context):null\">\r\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>\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Other column types -->\r\n @default {\r\n <span [innerHtml]=\"rowValue??''\"></span>\r\n }\r\n <!-- #endregion -->\r\n }\r\n <ng-template #recursiveContainer let-columnNameSegments=\"segments\" let-formGroup=\"formGroup\" let-parentFormGroup=\"parentFormGroup\">\r\n @if (formGroup) {\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- If the columnNameSegments array is empty, we're at the leaf node -->\r\n @if (!columnNameSegments.length) {\r\n @switch (column.type) {\r\n <!-- #region Toggle column -->\r\n @case (ColumnType.Toggle) {\r\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>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Text Input column -->\r\n @case (ColumnType.TextInput) {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\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)\" />\r\n </mat-form-field>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region VD-Select column -->\r\n @case (ColumnType.Select) {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\n <vd-select [formControl]=\"formGroup\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:parentFormGroup.value:context\" [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>\r\n </mat-form-field>\r\n }\r\n <!-- #endregion -->\r\n }\r\n } @else {\r\n <!-- If not the last segment, create a nested form group -->\r\n <ng-container [formGroupName]=\"columnNameSegments[0]\">\r\n <!-- Recursive call to handle nested segments -->\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: columnNameSegments.slice(1), parentFormGroup:formGroup, formGroup: formGroup.get(columnNameSegments[0])}\"></ng-container>\r\n </ng-container>\r\n }\r\n </ng-container>\r\n }\r\n </ng-template>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n <!-- #endregion -->\r\n }\r\n <!-- #region Filter row -->\r\n @if (dataSource && filterable) {\r\n @for (column of columns$ | async; track column) {\r\n <ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\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]=\"column.displayNgClass\">\r\n <!-- #region Select filter -->\r\n @if(column.endpoint || column.enumType || column.options){\r\n <span filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:{}:context\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\r\n }\r\n <!-- #region Text filter -->\r\n @else if(column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number) {\r\n <span filter-input [onlyNumber]=\"column.filterInputNumber??false\" [matTooltip]=\"column.filterTooltip ? column.filterTooltip(context):null\" [matTooltipClass]=\"column.filterTooltipClass??''\" [operator]=\"!useFilterOperator ? undefined : column.filterOperator\"></span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Date filter -->\r\n @else if (column.type == ColumnType.Date) {\r\n <span filter-date></span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Action filter (clear) -->\r\n @else if (column.type == ColumnType.Action) {\r\n <span filter-clear></span>\r\n }\r\n <!-- #endregion -->\r\n </th>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Details column -->\r\n <ng-container cdkColumnDef=\"expandedDetail\">\r\n <td mat-cell *matCellDef=\"let row; let index = index\" [attr.colspan]=\"(displayedColumns$ | async)?.length\">\r\n <div class=\"row-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\" #detailsTemplate>\r\n @if (templateRef && row === expandedRow) {\r\n <ng-container *ngTemplateOutlet=\"templateRef; context:{row: row, index: index, context: context}\"></ng-container>\r\n }\r\n </div>\r\n </td>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region Filter header -->\r\n @if (filterable) {\r\n <tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\r\n }\r\n <!-- #endregion -->\r\n <tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\r\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>\r\n <!-- #region Detrails row -->\r\n @if (detailsTemplate || templateRef) {\r\n <tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\r\n }\r\n <!-- #endregion -->\r\n </table>\r\n <!-- #region Modern No Results Message -->\r\n @if (dataSource?.filteredData?.length <= 0 && dataSource?.total <= 0) {\r\n <div class=\"no-results-overlay\">\r\n <mat-icon class=\"no-results-icon\">search_off</mat-icon>\r\n <div class=\"no-results-text mat-body-1\">\r\n <h3 i18n=\"@@noResultsFound\">No results found</h3>\r\n <p i18n=\"@@tryAdjustFilters\"> Try adjusting your filters or search criteria. </p>\r\n </div>\r\n </div>\r\n }\r\n <!-- #endregion -->\r\n</div>\r\n<!-- #endregion -->\r\n<!-- #region Debug value -->\r\n@if (debugValue) {\r\n <code>\r\n <pre>{{formValue | json}}</pre>\r\n</code>\r\n}\r\n<!-- #endregion -->\r\n<div class=\"table-footer\" layout=\"row\">\r\n <ng-content select=\"[table-footer]\"></ng-content>\r\n <span flex></span>\r\n @if (paginable) {\r\n <mat-paginator [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\r\n }\r\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"] }]
|
|
19607
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "@if (!static) {\r\n <div class=\"loading-progress\">\r\n @if (dataSource?.isLoading) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n}\r\n<!-- #region Data table -->\r\n<div class=\"mat-table-container scrollbar-secondary\" [ngClass]=\"{'mat-table-sticky': sticky}\" #scrollContainer>\r\n <table mat-table #table [dataSource]=\"dataSource\" [dataSourceFilter]=\"dataSourceFilter\" [preserveInitialSelection]=\"!!activeSelectionKey\" [ngClass]=\"{'table-fixed': !sticky && !detailsTemplate && !templateRef, 'table-stick': sticky}\" [trackBy]=\"trackBy\" matSort matSortDisableClear [matSortActive]=\"sortActive||'id'\" [matSortDirection]=\"sortDirection\" multiTemplateDataRows>\r\n @for (column of columns$ | async; track columnsTrackBy($index, column)) {\r\n <!-- #region Column def -->\r\n <ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\n <ng-template #header [ngTemplateOutlet]=\"header\" let-headerText=\"headerText\" [ngTemplateOutletContext]=\"{headerText: column.header | func:context}\">\r\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]=\"column.displayNgClass\" [class.msa-sticky-start]=\"column.sticky\" [class.msa-sticky-start-last]=\"isLastStickyStartColumn(column)\" [class.msa-sticky-end]=\"column.stickyEnd\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\r\n @if (column.type == ColumnType.Checkbox) {\r\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>\r\n } @if (column.type != ColumnType.Checkbox) {\r\n <span [matTooltip]=\"headerText\">{{headerText}}</span>\r\n }\r\n </th>\r\n </ng-template>\r\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)\" [class.msa-sticky-start]=\"column.sticky\" [class.msa-sticky-start-last]=\"isLastStickyStartColumn(column)\" [class.msa-sticky-end]=\"column.stickyEnd\" [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}\">\r\n <ng-template #rowVal [ngTemplateOutlet]=\"rowVal\" let-rowValue [ngTemplateOutletContext]=\"{$implicit: column?.content && column?.content(row, undefined, context)}\">\r\n @switch (column.type) {\r\n <!-- #region Checkbox column -->\r\n @case (ColumnType.Checkbox) {\r\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>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Enum column -->\r\n @case (ColumnType.Enum) {\r\n <span>\r\n @if (column.enumMetadata) {\r\n @if (column.multiple) {\r\n @for (item of rowValue; track item; let i = $index) {\r\n @if (i < 2) {\r\n <ng-template let-displayValue=\"displayValue\" [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ displayValue: column.enumMetadata[item].display }\"></ng-template>\r\n }\r\n @if (i === 1 && rowValue?.length > 2) {\r\n <small [matTooltip]=\"(rowValue | slice:2 | map:column.enumMetadata | map:'display') | join:'\\n'\" matTooltipClass=\"mat-tooltip-multiline\">...</small>\r\n }\r\n }\r\n <ng-template #template let-displayValue=\"displayValue\">\r\n <mat-chip-row disableRipple=\"true\" selectable=\"false\" [matTooltip]=\"displayValue\">\r\n <span>{{ displayValue }}</span>\r\n </mat-chip-row>\r\n </ng-template>\r\n } @else {\r\n @if (rowValue >= 0) {\r\n <span class=\"na\" [ngStyle]=\"{ color: ((column.enumMetadata[rowValue] || {}).textColor || 'inherit') }\" [innerHtml]=\"(column.enumMetadata[rowValue]||{}).display\"></span>\r\n }\r\n }\r\n } @else {\r\n @if (column.multiple) {\r\n @for (item of rowValue; track item; let i = $index; let last = $last) {\r\n <div>\r\n @if (i<2) {\r\n <small>\r\n <msa-enum-display [value]=\"item\" [enumType]=\"column.enumType\" [metadata]=\"column.enumMetadata\"></msa-enum-display>\r\n </small>\r\n } @if (i==1 && rowValue?.length > 2) {\r\n <small>, ...</small>\r\n }\r\n </div>\r\n }\r\n } @else {\r\n @if (rowValue >= 0) {\r\n <msa-enum-display [value]=\"rowValue\" [enumType]=\"column.enumType\" [metadata]=\"column.enumMetadata\"></msa-enum-display>\r\n }\r\n }\r\n }\r\n </span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Toggle column -->\r\n @case (ColumnType.Toggle) {\r\n @if (!formArray) {\r\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>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Date column -->\r\n @case (ColumnType.Date) {\r\n <span>{{rowValue | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Text Input column -->\r\n @case (ColumnType.TextInput) {\r\n @if (!formArray) {\r\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\r\n @if (!formArray) {\r\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)\" />\r\n }\r\n </mat-form-field>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region VD-Select column -->\r\n @case (ColumnType.Select) {\r\n @if (!formArray) {\r\n <mat-form-field appearance=\"outline\" layout=\"column\" layout-align=\"center start\" subscriptSizing=\"dynamic\" dense-3 (click)=\"$event.stopPropagation();\">\r\n @if (!formArray) {\r\n <vd-select name=\"{{column.name}}{{rowIndex}}\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"$safeNavigationMigration(column?.enumFilter) | func:row:context\" [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>\r\n }\r\n </mat-form-field>\r\n } @if (formArray) {\r\n <ng-container [formGroup]=\"$any(formArray.controls)[rowIndex] | formGroup\">\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: column.name.split('.'), formGroup: formArray.controls[rowIndex]}\"></ng-container>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Action -->\r\n @case (ColumnType.Action) {\r\n @if (column.menu) {\r\n @if (menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)) {\r\n <div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu!\"></div>\r\n }\r\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Menu -->\r\n @case (ColumnType.Menu) {\r\n @if (column.menu) {\r\n <vd-dynamic-menu [items]=\"[column.menu]\" [data]=\"row\" [context]=\"context\"></vd-dynamic-menu>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region icon -->\r\n @case (ColumnType.Icon) {\r\n <span layout=\"row\" layout-align=\"start center\">\r\n @if(column && column.icon){\r\n @if ( column.icon.matIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\">{{handleExpression($safeNavigationMigration(column.icon.matIcon)!, row)}}</mat-icon>\r\n }\r\n @if (column.icon.svgIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\" [svgIcon]=\"handleExpression($safeNavigationMigration(column.icon.svgIcon)!, row)!\"></mat-icon>\r\n }\r\n @if (column.icon.fontIcon) {\r\n <mat-icon fontSet=\"{{column.icon.fontSet || 'material-symbols-outlined'}}\" [class]=\"handleExpression(column.icon.cssClass??'', row)\" [fontIcon]=\"handleExpression($safeNavigationMigration(column.icon.fontIcon)!, row)!\"></mat-icon>\r\n }\r\n }\r\n </span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region icon button -->\r\n @case (ColumnType.IconButton) {\r\n <a mat-icon-button (click)=\"$event.stopPropagation();column.iconButton?.event?column.iconButton.event(row, context):null\">\r\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>\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Other column types -->\r\n @default {\r\n <span [innerHtml]=\"rowValue??''\"></span>\r\n }\r\n <!-- #endregion -->\r\n }\r\n <ng-template #recursiveContainer let-columnNameSegments=\"segments\" let-formGroup=\"formGroup\" let-parentFormGroup=\"parentFormGroup\">\r\n @if (formGroup) {\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- If the columnNameSegments array is empty, we're at the leaf node -->\r\n @if (!columnNameSegments.length) {\r\n @switch (column.type) {\r\n <!-- #region Toggle column -->\r\n @case (ColumnType.Toggle) {\r\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>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Text Input column -->\r\n @case (ColumnType.TextInput) {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\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)\" />\r\n </mat-form-field>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region VD-Select column -->\r\n @case (ColumnType.Select) {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" dense-3 layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\n <vd-select [formControl]=\"formGroup\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:parentFormGroup.value:context\" [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>\r\n </mat-form-field>\r\n }\r\n <!-- #endregion -->\r\n }\r\n } @else {\r\n <!-- If not the last segment, create a nested form group -->\r\n <ng-container [formGroupName]=\"columnNameSegments[0]\">\r\n <!-- Recursive call to handle nested segments -->\r\n <ng-container [ngTemplateOutlet]=\"recursiveContainer\" [ngTemplateOutletContext]=\"{segments: columnNameSegments.slice(1), parentFormGroup:formGroup, formGroup: formGroup.get(columnNameSegments[0])}\"></ng-container>\r\n </ng-container>\r\n }\r\n </ng-container>\r\n }\r\n </ng-template>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n <!-- #endregion -->\r\n }\r\n <!-- #region Filter row -->\r\n @if (dataSource && filterable) {\r\n @for (column of columns$ | async; track column) {\r\n <ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\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]=\"column.displayNgClass\" [class.msa-sticky-start]=\"column.sticky\" [class.msa-sticky-start-last]=\"isLastStickyStartColumn(column)\" [class.msa-sticky-end]=\"column.stickyEnd\">\r\n <!-- #region Select filter -->\r\n @if(column.endpoint || column.enumType || column.options){\r\n <span filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [enumMetadata]=\"column.enumMetadata\" [enumFilter]=\"column.enumFilter | func:{}:context\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\r\n }\r\n <!-- #region Text filter -->\r\n @else if(column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number) {\r\n <span filter-input [onlyNumber]=\"column.filterInputNumber??false\" [matTooltip]=\"column.filterTooltip ? column.filterTooltip(context):null\" [matTooltipClass]=\"column.filterTooltipClass??''\" [operator]=\"!useFilterOperator ? undefined : column.filterOperator\"></span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Date filter -->\r\n @else if (column.type == ColumnType.Date) {\r\n <span filter-date></span>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Action filter (clear) -->\r\n @else if (column.type == ColumnType.Action) {\r\n <span filter-clear></span>\r\n }\r\n <!-- #endregion -->\r\n </th>\r\n </ng-container>\r\n }\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Details column -->\r\n <ng-container cdkColumnDef=\"expandedDetail\">\r\n <td mat-cell *matCellDef=\"let row; let index = index\" [attr.colspan]=\"(displayedColumns$ | async)?.length\">\r\n <div class=\"row-detail\" #detailsTemplate>\r\n @if (templateRef && row === expandedRow) {\r\n <ng-container *ngTemplateOutlet=\"templateRef; context:{row: row, index: index, context: context}\"></ng-container>\r\n }\r\n </div>\r\n </td>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region Filter header -->\r\n @if (filterable) {\r\n <tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\r\n }\r\n <!-- #endregion -->\r\n <tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\r\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>\r\n <!-- #region Detrails row -->\r\n @if (detailsTemplate || templateRef) {\r\n <tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\r\n }\r\n <!-- #endregion -->\r\n </table>\r\n <!-- #region Modern No Results Message -->\r\n @if ((dataSource?.filteredData?.length??0) <= 0 && dataSource?.total <= 0) {\r\n <div class=\"no-results-overlay\">\r\n <mat-icon class=\"no-results-icon\">search_off</mat-icon>\r\n <div class=\"no-results-text mat-body-1\">\r\n <h3 i18n=\"@@noResultsFound\">No results found</h3>\r\n <p i18n=\"@@tryAdjustFilters\"> Try adjusting your filters or search criteria. </p>\r\n </div>\r\n </div>\r\n }\r\n <!-- #endregion -->\r\n</div>\r\n<!-- #endregion -->\r\n<!-- #region Debug value -->\r\n@if (debugValue) {\r\n <code>\r\n <pre>{{formValue | json}}</pre>\r\n</code>\r\n}\r\n<!-- #endregion -->\r\n<div class=\"table-footer\" layout=\"row\">\r\n <ng-content select=\"[table-footer]\"></ng-content>\r\n <span flex></span>\r\n @if (paginable) {\r\n <mat-paginator [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\r\n }\r\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-mdc-cell.cdk-table-sticky,.mat-table-container .mat-mdc-header-cell.cdk-table-sticky,.mat-table-container .mat-mdc-footer-cell.cdk-table-sticky,.mat-table-container .mat-mdc-cell.mat-mdc-table-sticky,.mat-table-container .mat-mdc-header-cell.mat-mdc-table-sticky,.mat-table-container .mat-mdc-footer-cell.mat-mdc-table-sticky{z-index:2}.mat-table-container.mat-table-sticky{overflow-x:scroll;scrollbar-gutter:stable}.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-cell:not(.msa-sticky-end)+.mat-mdc-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-header-cell:not(.msa-sticky-end)+.mat-mdc-header-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-footer-cell:not(.msa-sticky-end)+.mat-mdc-footer-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-cell:not(.msa-sticky-end)+.mat-mdc-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-header-cell:not(.msa-sticky-end)+.mat-mdc-header-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-footer-cell:not(.msa-sticky-end)+.mat-mdc-footer-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-cell:not(.msa-sticky-end)+.mat-mdc-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-header-cell:not(.msa-sticky-end)+.mat-mdc-header-cell.msa-sticky-end,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-footer-cell:not(.msa-sticky-end)+.mat-mdc-footer-cell.msa-sticky-end{box-shadow:inset 8px 0 8px -8px #0000003d}.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-header-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-row>.mat-mdc-footer-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-header-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-header-row>.mat-mdc-footer-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-header-cell.msa-sticky-start.msa-sticky-start-last,.mat-table-container.mat-table-sticky .mat-mdc-footer-row>.mat-mdc-footer-cell.msa-sticky-start.msa-sticky-start-last{box-shadow:inset -8px 0 8px -8px #0000003d}\n"] }]
|
|
19134
19608
|
}], ctorParameters: () => [{ type: DynamicBuilder }, { type: i0.ChangeDetectorRef }], propDecorators: { table: [{
|
|
19135
19609
|
type: ViewChild,
|
|
19136
19610
|
args: ['table']
|
|
@@ -19142,6 +19616,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
19142
19616
|
args: [TemplateRef]
|
|
19143
19617
|
}], dataSource: [{
|
|
19144
19618
|
type: Input
|
|
19619
|
+
}], rememberSelectionKey: [{
|
|
19620
|
+
type: Input
|
|
19145
19621
|
}], data: [{
|
|
19146
19622
|
type: Input
|
|
19147
19623
|
}], parentControl: [{
|
|
@@ -19507,7 +19983,7 @@ class VdDynamicTableConfigDialogComponent extends BaseComponent {
|
|
|
19507
19983
|
this.genericList?.updateColumns();
|
|
19508
19984
|
}
|
|
19509
19985
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: VdDynamicTableConfigDialogComponent, deps: [{ token: i1$6.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: RxFormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
19510
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NumberValueAccessor, selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[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: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.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"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
19986
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NumberValueAccessor, selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[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: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.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", "rememberSelectionKey", "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"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
19511
19987
|
}
|
|
19512
19988
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: VdDynamicTableConfigDialogComponent, decorators: [{
|
|
19513
19989
|
type: Component,
|
|
@@ -19849,11 +20325,15 @@ class GenericListComponent extends BaseComponent {
|
|
|
19849
20325
|
}
|
|
19850
20326
|
});
|
|
19851
20327
|
});
|
|
20328
|
+
/* Keep selection persistence off unless the row model opts in through @Table. */
|
|
20329
|
+
let rememberSelection = false;
|
|
19852
20330
|
/* Get columns from class */
|
|
19853
20331
|
if (this.classType) {
|
|
19854
20332
|
this.classInstance = new this.classType();
|
|
19855
20333
|
/* Get the table definition using the class type */
|
|
19856
20334
|
var tableDefinition = getTableDefinition(this.classType);
|
|
20335
|
+
/* Determine if the table should remember selection */
|
|
20336
|
+
rememberSelection = tableDefinition.rememberSelection === true;
|
|
19857
20337
|
/* Set the props in the current object from the table definition */
|
|
19858
20338
|
Object.keys(tableDefinition || {}).forEach(x => {
|
|
19859
20339
|
if (this.hasOwnProperty(x)) {
|
|
@@ -19940,7 +20420,10 @@ class GenericListComponent extends BaseComponent {
|
|
|
19940
20420
|
this.route.queryParams.subscribe(x => Object.assign(this.query, x || {}, { returnUrl: null }));
|
|
19941
20421
|
/* Initilialize the data source with the current service, paginator and sort */
|
|
19942
20422
|
this.sort = this.dynamicTable?.matSort || (this.sort ? this.sort : new MatSort());
|
|
19943
|
-
|
|
20423
|
+
const dataSource = new TableDataSource(this.service, this.paginator, this.sort);
|
|
20424
|
+
/* Reuse the list configuration key so remembered rows stay scoped to this route and list. */
|
|
20425
|
+
dataSource.rememberSelectionKey = rememberSelection && this.selectable ? this.configsKey : undefined;
|
|
20426
|
+
this.dataSource = dataSource;
|
|
19944
20427
|
/* Set includes */
|
|
19945
20428
|
this.dataSource.includes = this.includes;
|
|
19946
20429
|
this.dataSource.projection = this.projection;
|
|
@@ -20042,11 +20525,12 @@ class GenericListComponent extends BaseComponent {
|
|
|
20042
20525
|
}
|
|
20043
20526
|
}
|
|
20044
20527
|
/**
|
|
20045
|
-
* Navigates to the edit page.
|
|
20528
|
+
* Navigates to the edit page for the specified entity.
|
|
20046
20529
|
* @param entity - The entity to be edited.
|
|
20047
20530
|
* @param context - Additional context data.
|
|
20531
|
+
* @param returnToCurrentRoute - Whether to return to the current route after editing.
|
|
20048
20532
|
*/
|
|
20049
|
-
edit(entity, context) {
|
|
20533
|
+
edit(entity, context, returnToCurrentRoute = false) {
|
|
20050
20534
|
/* Check if entity is null */
|
|
20051
20535
|
if (entity === null || entity === undefined) {
|
|
20052
20536
|
throw new Error('Entity must be defined for editing.');
|
|
@@ -20058,16 +20542,17 @@ class GenericListComponent extends BaseComponent {
|
|
|
20058
20542
|
/* Call the custom onEdit function with the entity and context */
|
|
20059
20543
|
this.onEdit(entity, context);
|
|
20060
20544
|
}
|
|
20545
|
+
/* If onEdit is not provided, construct the edit route and navigate */
|
|
20061
20546
|
else {
|
|
20062
20547
|
/* If the item is not editable, log a warning and return */
|
|
20063
20548
|
if (this.canEditItem(entity) === false) {
|
|
20064
20549
|
this.log('This item is not editable.');
|
|
20065
20550
|
return;
|
|
20066
20551
|
}
|
|
20067
|
-
/*
|
|
20552
|
+
/* Check if there are query parameters in the current route */
|
|
20068
20553
|
const hasParams = Object.keys(this.route.snapshot.queryParams).length > 0;
|
|
20069
20554
|
/* Navigate to the edit page with the entity's id and optional query parameters */
|
|
20070
|
-
this.router.navigate([`${this.currentBaseRoute}/edit`, entity?.id], { queryParams: hasParams ? { returnUrl: this.currentRoute } : {}, relativeTo: this.route });
|
|
20555
|
+
this.router.navigate([`${this.currentBaseRoute}/edit`, entity?.id], { queryParams: hasParams || returnToCurrentRoute ? { returnUrl: this.currentRoute } : {}, relativeTo: this.route });
|
|
20071
20556
|
}
|
|
20072
20557
|
}
|
|
20073
20558
|
}
|
|
@@ -20545,7 +21030,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
20545
21030
|
*/
|
|
20546
21031
|
get [Symbol.toStringTag]() { return 'GenericListComponent'; }
|
|
20547
21032
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: GenericListComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
20548
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: GenericListComponent, isStandalone: true, inputs: { backButton: "backButton" }, host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" } }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "dynamicTable", first: true, predicate: VdDynamicTableComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
|
|
21033
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: GenericListComponent, isStandalone: true, inputs: { columnSets: "columnSets", selectable: "selectable", addable: "addable", editable: "editable", deletable: "deletable", downloadable: "downloadable", duplicable: "duplicable", configurable: "configurable", exportable: "exportable", exportFileName: "exportFileName", sticky: "sticky", backButton: "backButton" }, host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" } }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "dynamicTable", first: true, predicate: VdDynamicTableComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
|
|
20549
21034
|
}
|
|
20550
21035
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: GenericListComponent, decorators: [{
|
|
20551
21036
|
type: Directive
|
|
@@ -20555,9 +21040,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
20555
21040
|
}], sort: [{
|
|
20556
21041
|
type: ViewChild,
|
|
20557
21042
|
args: [MatSort, { static: true }]
|
|
21043
|
+
}], columnSets: [{
|
|
21044
|
+
type: Input
|
|
20558
21045
|
}], dynamicTable: [{
|
|
20559
21046
|
type: ViewChild,
|
|
20560
21047
|
args: [VdDynamicTableComponent, { static: true }]
|
|
21048
|
+
}], selectable: [{
|
|
21049
|
+
type: Input
|
|
21050
|
+
}], addable: [{
|
|
21051
|
+
type: Input
|
|
21052
|
+
}], editable: [{
|
|
21053
|
+
type: Input
|
|
21054
|
+
}], deletable: [{
|
|
21055
|
+
type: Input
|
|
21056
|
+
}], downloadable: [{
|
|
21057
|
+
type: Input
|
|
21058
|
+
}], duplicable: [{
|
|
21059
|
+
type: Input
|
|
21060
|
+
}], configurable: [{
|
|
21061
|
+
type: Input
|
|
21062
|
+
}], exportable: [{
|
|
21063
|
+
type: Input
|
|
21064
|
+
}], exportFileName: [{
|
|
21065
|
+
type: Input
|
|
21066
|
+
}], sticky: [{
|
|
21067
|
+
type: Input
|
|
20561
21068
|
}], backButton: [{
|
|
20562
21069
|
type: Input
|
|
20563
21070
|
}], handleKeyboardEvent: [{
|
|
@@ -20997,13 +21504,31 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20997
21504
|
*/
|
|
20998
21505
|
SaveAction = SaveAction;
|
|
20999
21506
|
/**
|
|
21000
|
-
*
|
|
21507
|
+
* The route to navigate to after saving and editing the form.
|
|
21001
21508
|
*/
|
|
21002
21509
|
editSaveAndCloseRoute = '../../';
|
|
21510
|
+
/**
|
|
21511
|
+
* The route to navigate to after saving and adding a new form.
|
|
21512
|
+
*/
|
|
21003
21513
|
addSaveAndCloseRoute = '../';
|
|
21514
|
+
/**
|
|
21515
|
+
* The route to navigate to after saving and editing the form.
|
|
21516
|
+
*/
|
|
21004
21517
|
addSaveAndEditRoute = '../edit/';
|
|
21518
|
+
/**
|
|
21519
|
+
* The route to navigate to after saving and creating a new form.
|
|
21520
|
+
*/
|
|
21005
21521
|
addSaveAndNewRoute = '../add';
|
|
21522
|
+
/**
|
|
21523
|
+
* The route to navigate to after saving and closing the form.
|
|
21524
|
+
*/
|
|
21006
21525
|
listRoute = this.addSaveAndCloseRoute;
|
|
21526
|
+
/**
|
|
21527
|
+
* The toolbar Back destination, preferring the decoded return URL over the list route.
|
|
21528
|
+
*/
|
|
21529
|
+
get backNavigationRoute() {
|
|
21530
|
+
return this.returnUrl || this.listRoute;
|
|
21531
|
+
}
|
|
21007
21532
|
/**
|
|
21008
21533
|
* The ID of the item to load.
|
|
21009
21534
|
*/
|
|
@@ -22208,19 +22733,13 @@ class BaseInterceptor {
|
|
|
22208
22733
|
if (req.headers.get('Show-Message')?.trim().toLowerCase() != 'yes') {
|
|
22209
22734
|
return;
|
|
22210
22735
|
}
|
|
22211
|
-
/* Handle validation errors for status code 400 (Bad Request) */
|
|
22212
|
-
if (error.status == 400) {
|
|
22213
|
-
let message = this.parseErrors(error.error);
|
|
22214
|
-
if (message) {
|
|
22215
|
-
this.snackBar.open(message, "OK", { duration: 8000, panelClass: ['error'] });
|
|
22216
|
-
}
|
|
22217
|
-
}
|
|
22218
22736
|
/* Handle permission errors for status code 403 (Forbidden) */
|
|
22219
22737
|
if (error.status == 403) {
|
|
22220
22738
|
this.snackBar.open($localize `:@@snackbar.error.not-allowed:You are not allowed to perform this request.`, undefined, {
|
|
22221
22739
|
duration: 6000,
|
|
22222
22740
|
panelClass: ['error']
|
|
22223
22741
|
});
|
|
22742
|
+
return;
|
|
22224
22743
|
}
|
|
22225
22744
|
/* Handle not found errors for status code 404 (Not Found) */
|
|
22226
22745
|
if (error.status == 404) {
|
|
@@ -22228,14 +22747,12 @@ class BaseInterceptor {
|
|
|
22228
22747
|
duration: 6000,
|
|
22229
22748
|
panelClass: ['error']
|
|
22230
22749
|
});
|
|
22750
|
+
return;
|
|
22231
22751
|
}
|
|
22232
|
-
/*
|
|
22233
|
-
|
|
22234
|
-
|
|
22235
|
-
|
|
22236
|
-
/* Handle internal server errors for status code 500 */
|
|
22237
|
-
if (error.status == 500) {
|
|
22238
|
-
this.snackBar.open(error.text(), undefined, { duration: 6000, panelClass: ['error'] });
|
|
22752
|
+
/* Display structured API errors for every remaining HTTP status, including gateway errors */
|
|
22753
|
+
const message = this.parseErrors(error.error) || error.message;
|
|
22754
|
+
if (message) {
|
|
22755
|
+
this.snackBar.open(message, "OK", { duration: 8000, panelClass: ['error'] });
|
|
22239
22756
|
}
|
|
22240
22757
|
}));
|
|
22241
22758
|
}
|
|
@@ -22263,6 +22780,10 @@ class BaseInterceptor {
|
|
|
22263
22780
|
return "Failed to parse error details.";
|
|
22264
22781
|
}
|
|
22265
22782
|
}
|
|
22783
|
+
const messages = getApiErrorMessages(error);
|
|
22784
|
+
if (messages.length) {
|
|
22785
|
+
return messages.join('\n');
|
|
22786
|
+
}
|
|
22266
22787
|
/* Ensure the error is an object (for structured error responses) */
|
|
22267
22788
|
if (typeof error === 'object') {
|
|
22268
22789
|
/* Iterate over the keys of the error object */
|
|
@@ -23184,7 +23705,7 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
23184
23705
|
provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,
|
|
23185
23706
|
useValue: { overlayPanelClass: 'vd-chips-autocomplete' }
|
|
23186
23707
|
}
|
|
23187
|
-
], 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]=\"disabled\">\r\n <!-- #region Chips -->\r\n @for (chip of chips; track chip?.[key] ?? chip ?? $index; let first = $first; let index = $index) {\r\n <mat-chip [removable]=\"!readonly\" (removed)=\"handleRemovedEvent()\">\r\n @if(chip.icon) {\r\n <span matChipAvatar>\r\n <mat-icon fontSet=\"material-symbols-outlined\" [style.color]=\"chip.iconColor\">{{chip.icon}}</mat-icon>\r\n </span>\r\n }\r\n @if (!chipTemplate?.templateRef) {\r\n @if (!autocompleteOptionTemplate?.templateRef) {\r\n <span>{{ chip }}</span>\r\n }\r\n @if (autocompleteOptionTemplate && autocompleteOptionTemplate.templateRef) {\r\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\r\n }\r\n }\r\n @if (chipTemplate && chipTemplate.templateRef) {\r\n <ng-template [ngTemplateOutlet]=\"chipTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ chip: chip }\"></ng-template>\r\n }\r\n @for (button of suffixButtons; track button?.icon ?? $index; let first = $first) {\r\n <a matChipTrailingIcon [hidden]=\"button.hide && button.hide(chips[0], context)\" (click)=\"$event.stopPropagation(); button.event && button.event(chips[0], context)\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">{{button.icon}}</mat-icon>\r\n </a>\r\n }\r\n @if (onLaunch.observed) {\r\n <a matChipTrailingIcon (click)=\"$event.stopPropagation(); handleLaunchClicked()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">launch</mat-icon>\r\n </a>\r\n }\r\n @if (!readonly) {\r\n <a matChipTrailingIcon (click)=\"handleRemovedEvent()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">close</mat-icon>\r\n </a>\r\n }\r\n </mat-chip>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Search box -->\r\n <input matInput [hidden]=\"value && !empty\" placeholder=\"{{placeholder}}\" (focus)=\"connect()\" (click)=\"reopenPanel()\" [readonly]=\"readonly\" [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" [matAutocompleteConnectedTo]=\"origin\" [formControl]=\"autoCompleteChipList\" (blur)=\"customValue && addOnBlur($event)\" #filterInput />\r\n <!-- #endregion -->\r\n <!-- #region Reset button -->\r\n @if ((!value || empty) && !readonly && !disabled) {\r\n <a trailingIcon class=\"mat-mdc-select-arrow\" (click)=\"filterInput.value = ''\">\r\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" class=\"ng-tns-c184-21\">\r\n <path d=\"M7 10l5 5 5-5z\" class=\"ng-tns-c184-21\"></path>\r\n </svg>\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n</mat-chip-grid>\r\n<!-- #region Autocomplete -->\r\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"addChip($event.option.value, filterInput)\" class=\"{{autocompleteCssClass}}{{classType?' table-autocomplete':''}}\">\r\n @if(opened){\r\n @if (loading) {\r\n <mat-option disabled class=\"vd-chips-loading-option\">\r\n <mat-spinner diameter=\"32\"></mat-spinner>\r\n </mat-option>\r\n }\r\n @if (!loading && ((dataSource?.items?.length ?? 0) === 0)) {\r\n <mat-option disabled class=\"vd-chips-loading-option\">\r\n <span i18n=\"@@noResultsFound\">No results found</span>\r\n </mat-option>\r\n }\r\n @if(!classType)\r\n {\r\n @for (item of dataSource?.items; track item?.[key] ?? item ?? $index; let first = $first; let last = $last) {\r\n <mat-option [value]=\"item\">\r\n <div layout=\"row\" layout-align=\"start center\">\r\n @if(item.icon) {\r\n <span matChipAvatar>\r\n <mat-icon fontSet=\"material-symbols-outlined\" [style.color]=\"item.iconColor\">{{item.icon}}</mat-icon>\r\n </span>\r\n }\r\n @if (!autocompleteOptionTemplate?.templateRef) {\r\n <span>{{item}}</span>\r\n }\r\n @if (autocompleteOptionTemplate && autocompleteOptionTemplate.templateRef) {\r\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: item }\"></ng-template>\r\n }\r\n </div>\r\n </mat-option>\r\n @if(!last){\r\n <mat-divider></mat-divider>\r\n }\r\n }\r\n }\r\n @if (classType) {\r\n <mat-option hide=\"true\"></mat-option>\r\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>\r\n }\r\n }\r\n <div class=\"vd-chips-paginator\">\r\n <mat-divider></mat-divider>\r\n <mat-paginator [length]=\"dataSource?.total ?? 0\" [pageIndex]=\"dataSource?.pageIndex ?? 0\" [pageSize]=\"dataSource?.pageSize ?? 15\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\" hidePageSize=\"true\"></mat-paginator>\r\n </div>\r\n</mat-autocomplete>\r\n<!-- #endregion -->\r\n<div matAutocompleteOrigin #origin=\"matAutocompleteOrigin\" class=\"autocomplete-origin\"></div>", styles: [":host ::ng-deep .mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label,:host ::ng-deep .mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:inherit!important}:host ::ng-deep .mat-mdc-chip{height:auto;min-height:32px}: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;padding:0 10px;justify-content:center;margin:-4px}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip.mdc-evolution-chip--disabled{opacity:.8;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 .mdc-evolution-chip__icon--trailing{width:19px}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mdc-evolution-chip__icon--trailing:not(:last-child){padding-right:0}: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;padding-top:4px}: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 .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 .vd-chips-loading-option{display:flex;justify-content:center;align-items:center;padding-left:0!important;padding-right:0!important}::ng-deep .vd-chips-autocomplete .vd-chips-loading-option .mdc-list-item__primary-text{display:flex;width:100%;justify-content:center;align-items:center}::ng-deep .vd-chips-autocomplete .vd-chips-loading-option mat-spinner{margin: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: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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$2.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$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i4$2.MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i6.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: i7.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: i7.MatChipAvatar, selector: "mat-chip-avatar, [matChipAvatar]" }, { kind: "component", type: i7.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7.MatChipTrailingIcon, selector: "mat-chip-trailing-icon, [matChipTrailingIcon]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$2.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: MatProgressSpinnerModule }, { kind: "component", type: i10$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
23708
|
+
], 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]=\"disabled\">\r\n <!-- #region Chips -->\r\n @for (chip of chips; track chip?.[key] ?? chip ?? $index; let first = $first; let index = $index) {\r\n <mat-chip [removable]=\"!readonly\" (removed)=\"handleRemovedEvent()\">\r\n @if(chip.icon) {\r\n <span matChipAvatar>\r\n <mat-icon fontSet=\"material-symbols-outlined\" [style.color]=\"chip.iconColor\">{{chip.icon}}</mat-icon>\r\n </span>\r\n }\r\n @if (!chipTemplate?.templateRef) {\r\n @if (!autocompleteOptionTemplate?.templateRef) {\r\n <span>{{ chip }}</span>\r\n }\r\n @if (autocompleteOptionTemplate && autocompleteOptionTemplate.templateRef) {\r\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\r\n }\r\n }\r\n @if (chipTemplate && chipTemplate.templateRef) {\r\n <ng-template [ngTemplateOutlet]=\"chipTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ chip: chip }\"></ng-template>\r\n }\r\n @for (button of suffixButtons; track button?.icon ?? $index; let first = $first) {\r\n <a matChipTrailingIcon [hidden]=\"button.hide && button.hide(chips[0], context)\" (click)=\"$event.stopPropagation(); button.event && button.event(chips[0], context)\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">{{button.icon}}</mat-icon>\r\n </a>\r\n }\r\n @if (onLaunch.observed) {\r\n <a matChipTrailingIcon (click)=\"$event.stopPropagation(); handleLaunchClicked()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">launch</mat-icon>\r\n </a>\r\n }\r\n @if (!readonly) {\r\n <a matChipTrailingIcon (click)=\"handleRemovedEvent()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">close</mat-icon>\r\n </a>\r\n }\r\n </mat-chip>\r\n }\r\n <!-- #endregion -->\r\n <!-- #region Search box -->\r\n <input matInput [hidden]=\"value && !empty\" placeholder=\"{{placeholder}}\" (focus)=\"connect()\" (click)=\"reopenPanel()\" [readonly]=\"readonly\" [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" [matAutocompleteConnectedTo]=\"origin\" [formControl]=\"autoCompleteChipList\" (blur)=\"customValue && addOnBlur($event)\" #filterInput />\r\n <!-- #endregion -->\r\n <!-- #region Reset button -->\r\n @if ((!value || empty) && !readonly && !disabled) {\r\n <a trailingIcon class=\"mat-mdc-select-arrow\" (click)=\"filterInput.value = ''\">\r\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" class=\"ng-tns-c184-21\">\r\n <path d=\"M7 10l5 5 5-5z\" class=\"ng-tns-c184-21\"></path>\r\n </svg>\r\n </a>\r\n }\r\n <!-- #endregion -->\r\n</mat-chip-grid>\r\n<!-- #region Autocomplete -->\r\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"addChip($event.option.value, filterInput)\" class=\"{{autocompleteCssClass}}{{classType?' table-autocomplete':''}}\">\r\n @if(opened){\r\n @if (loading) {\r\n <mat-option disabled class=\"vd-chips-loading-option\">\r\n <mat-spinner diameter=\"32\"></mat-spinner>\r\n </mat-option>\r\n }\r\n @if (!loading && ((dataSource?.items?.length ?? 0) === 0)) {\r\n <mat-option disabled class=\"vd-chips-loading-option\">\r\n <span i18n=\"@@noResultsFound\">No results found</span>\r\n </mat-option>\r\n }\r\n @if(!classType)\r\n {\r\n @for (item of dataSource?.items; track item?.[key] ?? item ?? $index; let first = $first; let last = $last) {\r\n <mat-option [value]=\"item\">\r\n <div layout=\"row\" layout-align=\"start center\">\r\n @if(item.icon) {\r\n <span matChipAvatar>\r\n <mat-icon fontSet=\"material-symbols-outlined\" [style.color]=\"item.iconColor\">{{item.icon}}</mat-icon>\r\n </span>\r\n }\r\n @if (!autocompleteOptionTemplate?.templateRef) {\r\n <span>{{item}}</span>\r\n }\r\n @if (autocompleteOptionTemplate && autocompleteOptionTemplate.templateRef) {\r\n <ng-template [ngTemplateOutlet]=\"autocompleteOptionTemplate.templateRef!\" [ngTemplateOutletContext]=\"{ option: item }\"></ng-template>\r\n }\r\n </div>\r\n </mat-option>\r\n @if(!last){\r\n <mat-divider></mat-divider>\r\n }\r\n }\r\n }\r\n @if (classType) {\r\n <mat-option hide=\"true\"></mat-option>\r\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>\r\n }\r\n }\r\n <div class=\"vd-chips-paginator\">\r\n <mat-divider></mat-divider>\r\n <mat-paginator [length]=\"dataSource?.total ?? 0\" [pageIndex]=\"dataSource?.pageIndex ?? 0\" [pageSize]=\"dataSource?.pageSize ?? 15\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\" hidePageSize=\"true\"></mat-paginator>\r\n </div>\r\n</mat-autocomplete>\r\n<!-- #endregion -->\r\n<div matAutocompleteOrigin #origin=\"matAutocompleteOrigin\" class=\"autocomplete-origin\"></div>", styles: [":host ::ng-deep .mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label,:host ::ng-deep .mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:inherit!important}:host ::ng-deep .mat-mdc-chip{height:auto;min-height:32px}: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;padding:0 10px;justify-content:center;margin:-4px}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip.mdc-evolution-chip--disabled{opacity:.8;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 .mdc-evolution-chip__icon--trailing{width:19px}:host ::ng-deep .mat-mdc-chip-set .mdc-evolution-chip-set__chips .mat-mdc-chip .mdc-evolution-chip__icon--trailing:not(:last-child){padding-right:0}: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;padding-top:4px}: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 .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 .vd-chips-loading-option{display:flex;justify-content:center;align-items:center;padding-left:0!important;padding-right:0!important}::ng-deep .vd-chips-autocomplete .vd-chips-loading-option .mdc-list-item__primary-text{display:flex;width:100%;justify-content:center;align-items:center}::ng-deep .vd-chips-autocomplete .vd-chips-loading-option mat-spinner{margin: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: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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$2.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$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i4$2.MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i6.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: i7.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: i7.MatChipAvatar, selector: "mat-chip-avatar, [matChipAvatar]" }, { kind: "component", type: i7.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7.MatChipTrailingIcon, selector: "mat-chip-trailing-icon, [matChipTrailingIcon]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$2.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: MatProgressSpinnerModule }, { kind: "component", type: i10$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: VdDynamicTableComponent, selector: "vd-dynamic-table", inputs: ["dataSource", "rememberSelectionKey", "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"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
23188
23709
|
}
|
|
23189
23710
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: VdChipsComponent, decorators: [{
|
|
23190
23711
|
type: Component,
|
|
@@ -24292,6 +24813,11 @@ class FormFieldDefinition {
|
|
|
24292
24813
|
* Defaults to true.
|
|
24293
24814
|
*/
|
|
24294
24815
|
defaultOption = true;
|
|
24816
|
+
/**
|
|
24817
|
+
* Predicate used to resolve the default option(s) from loaded options.
|
|
24818
|
+
* Return true for the option(s) that should be preselected.
|
|
24819
|
+
*/
|
|
24820
|
+
default;
|
|
24295
24821
|
/**
|
|
24296
24822
|
* Template function for rendering options in the selection.
|
|
24297
24823
|
* @param x The current property value.
|
|
@@ -24300,6 +24826,14 @@ class FormFieldDefinition {
|
|
|
24300
24826
|
* @param ctx The context of the generic form component.
|
|
24301
24827
|
*/
|
|
24302
24828
|
optionTemplate;
|
|
24829
|
+
/**
|
|
24830
|
+
* Property name in the option object used as the option group label.
|
|
24831
|
+
*/
|
|
24832
|
+
optionGroupProperty;
|
|
24833
|
+
/**
|
|
24834
|
+
* Whether the option group label is appended in parentheses to built-in trigger text.
|
|
24835
|
+
*/
|
|
24836
|
+
showOptionGroupInTrigger = false;
|
|
24303
24837
|
/**
|
|
24304
24838
|
* Property name in the option object for displaying text.
|
|
24305
24839
|
* Used to specify which property shows as the option's text.
|
|
@@ -25306,6 +25840,8 @@ class MsaGenericFormEnumFieldComponent extends MsaGenericFormFieldBaseComponent
|
|
|
25306
25840
|
[enumFilter]="field.enumFilter | func:formValue:formGroup:context"
|
|
25307
25841
|
[optionValueProperty]="field.optionValueProperty"
|
|
25308
25842
|
[optionTextProperty]="field.optionTextProperty"
|
|
25843
|
+
[optionGroupProperty]="field.optionGroupProperty"
|
|
25844
|
+
[showOptionGroupInTrigger]="field.showOptionGroupInTrigger"
|
|
25309
25845
|
[defaultOption]="field.defaultOption??true"
|
|
25310
25846
|
[multiple]="field.multiple"
|
|
25311
25847
|
[readonly]="(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false"
|
|
@@ -25360,7 +25896,7 @@ class MsaGenericFormEnumFieldComponent extends MsaGenericFormFieldBaseComponent
|
|
|
25360
25896
|
<mat-error>{{errorMessage}}</mat-error>
|
|
25361
25897
|
}
|
|
25362
25898
|
</mat-form-field>
|
|
25363
|
-
`, isInline: true, styles: ["mat-form-field{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: 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: "pipe", type: FuncPipe, name: "func" }], viewProviders: [{ provide: ControlContainer, useExisting: FormGroupDirective }] });
|
|
25899
|
+
`, isInline: true, styles: ["mat-form-field{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: VdSelectComponent, selector: "vd-select", inputs: ["optionGroupProperty", "showOptionGroupInTrigger", "triggerCssClass"] }, { kind: "directive", type: VdSelectOptionDirective, selector: "[vd-select-option]ng-template" }, { kind: "directive", type: VdSelectTriggerDirective, selector: "[vd-select-trigger]ng-template" }, { kind: "pipe", type: FuncPipe, name: "func" }], viewProviders: [{ provide: ControlContainer, useExisting: FormGroupDirective }] });
|
|
25364
25900
|
}
|
|
25365
25901
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: MsaGenericFormEnumFieldComponent, decorators: [{
|
|
25366
25902
|
type: Component,
|
|
@@ -25383,6 +25919,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
25383
25919
|
[enumFilter]="field.enumFilter | func:formValue:formGroup:context"
|
|
25384
25920
|
[optionValueProperty]="field.optionValueProperty"
|
|
25385
25921
|
[optionTextProperty]="field.optionTextProperty"
|
|
25922
|
+
[optionGroupProperty]="field.optionGroupProperty"
|
|
25923
|
+
[showOptionGroupInTrigger]="field.showOptionGroupInTrigger"
|
|
25386
25924
|
[defaultOption]="field.defaultOption??true"
|
|
25387
25925
|
[multiple]="field.multiple"
|
|
25388
25926
|
[readonly]="(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false"
|
|
@@ -25675,6 +26213,7 @@ class MsaGenericFormMsaListFieldComponent extends MsaGenericFormFieldBaseCompone
|
|
|
25675
26213
|
[loadData]="field.fetchCondition | func:formValue:formGroup:context"
|
|
25676
26214
|
[optionValueProperty]="field.optionValueProperty"
|
|
25677
26215
|
[optionTextProperty]="field.optionTextProperty"
|
|
26216
|
+
[default]="field.default"
|
|
25678
26217
|
[multiple]="field.multiple"
|
|
25679
26218
|
[readonly]="(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false"
|
|
25680
26219
|
(itemSelected)="field.itemSelect && field.itemSelect($event, formValue, formGroup, context);"
|
|
@@ -25713,6 +26252,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
25713
26252
|
[loadData]="field.fetchCondition | func:formValue:formGroup:context"
|
|
25714
26253
|
[optionValueProperty]="field.optionValueProperty"
|
|
25715
26254
|
[optionTextProperty]="field.optionTextProperty"
|
|
26255
|
+
[default]="field.default"
|
|
25716
26256
|
[multiple]="field.multiple"
|
|
25717
26257
|
[readonly]="(readonly || (field.readonly && field.readonly(formValue, formGroup, context)))??false"
|
|
25718
26258
|
(itemSelected)="field.itemSelect && field.itemSelect($event, formValue, formGroup, context);"
|
|
@@ -25788,7 +26328,10 @@ class MsaGenericFormMsaSelectFieldComponent extends MsaGenericFormFieldBaseCompo
|
|
|
25788
26328
|
[loadData]="field.fetchCondition | func:formValue:formGroup:context"
|
|
25789
26329
|
[optionValueProperty]="field.optionValueProperty"
|
|
25790
26330
|
[optionTextProperty]="field.optionTextProperty"
|
|
26331
|
+
[optionGroupProperty]="field.optionGroupProperty"
|
|
26332
|
+
[showOptionGroupInTrigger]="field.showOptionGroupInTrigger"
|
|
25791
26333
|
[defaultOption]="field.defaultOption??true"
|
|
26334
|
+
[default]="field.default"
|
|
25792
26335
|
[matIconKey]="field.optionMatIconProperty"
|
|
25793
26336
|
[svgIconKey]="field.optionSvgIconProperty"
|
|
25794
26337
|
[fontSet]="field.optionIconFontSet"
|
|
@@ -25859,7 +26402,7 @@ class MsaGenericFormMsaSelectFieldComponent extends MsaGenericFormFieldBaseCompo
|
|
|
25859
26402
|
<mat-error>{{errorMessage}}</mat-error>
|
|
25860
26403
|
}
|
|
25861
26404
|
</mat-form-field>
|
|
25862
|
-
`, isInline: true, styles: ["mat-form-field{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i7.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: i7.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { 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: MsaSelectRequiredDirective, selector: "vd-select[formControl]:not([required]), vd-select[formControlName]:not([required])" }, { kind: "pipe", type: FuncPipe, name: "func" }], viewProviders: [{ provide: ControlContainer, useExisting: FormGroupDirective }] });
|
|
26405
|
+
`, isInline: true, styles: ["mat-form-field{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i7.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: i7.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "component", type: VdSelectComponent, selector: "vd-select", inputs: ["optionGroupProperty", "showOptionGroupInTrigger", "triggerCssClass"] }, { kind: "directive", type: VdSelectOptionDirective, selector: "[vd-select-option]ng-template" }, { kind: "directive", type: VdSelectTriggerDirective, selector: "[vd-select-trigger]ng-template" }, { kind: "directive", type: MsaSelectRequiredDirective, selector: "vd-select[formControl]:not([required]), vd-select[formControlName]:not([required])" }, { kind: "pipe", type: FuncPipe, name: "func" }], viewProviders: [{ provide: ControlContainer, useExisting: FormGroupDirective }] });
|
|
25863
26406
|
}
|
|
25864
26407
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: MsaGenericFormMsaSelectFieldComponent, decorators: [{
|
|
25865
26408
|
type: Component,
|
|
@@ -25887,7 +26430,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
25887
26430
|
[loadData]="field.fetchCondition | func:formValue:formGroup:context"
|
|
25888
26431
|
[optionValueProperty]="field.optionValueProperty"
|
|
25889
26432
|
[optionTextProperty]="field.optionTextProperty"
|
|
26433
|
+
[optionGroupProperty]="field.optionGroupProperty"
|
|
26434
|
+
[showOptionGroupInTrigger]="field.showOptionGroupInTrigger"
|
|
25890
26435
|
[defaultOption]="field.defaultOption??true"
|
|
26436
|
+
[default]="field.default"
|
|
25891
26437
|
[matIconKey]="field.optionMatIconProperty"
|
|
25892
26438
|
[svgIconKey]="field.optionSvgIconProperty"
|
|
25893
26439
|
[fontSet]="field.optionIconFontSet"
|
|
@@ -28378,7 +28924,7 @@ var MenuScope;
|
|
|
28378
28924
|
|
|
28379
28925
|
/**
|
|
28380
28926
|
* Class decorator to define a table with its configuration.
|
|
28381
|
-
* @param tableDefinition Optional
|
|
28927
|
+
* @param tableDefinition Optional table settings, including `rememberSelection` to restore selected rows on navigation.
|
|
28382
28928
|
* @returns A function that takes the target class and applies the table definition metadata.
|
|
28383
28929
|
*/
|
|
28384
28930
|
function Table(tableDefinition) {
|
|
@@ -31384,5 +31930,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
31384
31930
|
* Generated bundle index. Do not edit.
|
|
31385
31931
|
*/
|
|
31386
31932
|
|
|
31387
|
-
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, MENU_RESOLVE_OPTIONS, MatFormFieldEditorDirective, MatFormFieldRadioDirective, MatFormFieldReadonlyDirective, MatInputRequiredDirective, MatSelectRequiredDirective, Menu, MenuClient, MenuDepartment, MenuFormIncludesResolve, MenuItem, MenuItemClient, MenuItemDepartment, MenuItemFormIncludesResolve, MenuItemService, MenuItemTarget, MenuListProjectionResolve, MenuResolve, MenuScope, MenuService, MenuSettings, MenuSettingsResolve, MessageType, ModifiableEntity, MonthNamePipe, MsaEditFormActionsComponent, MsaEnumDisplayComponent, MsaSelectRequiredDirective, MsaSelectionLabelComponent, 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_COLUMNS_METADATA_KEY, TABLE_DEFINITION_METADATA_KEY, 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, hasRequiredValidator, 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, parseProjectionArray, parseProjectionString, password, passwordAsync, pattern, patternAsync, port, prefix, primeNumber, prop, propArray, propObject, range, rangeAsync, required, requiredTrue, rtrim, rule, sanitize, startsWith, startsWithAsync, stripLow, suffix, time, timeAsync, toBoolean, toDate, toDouble, toFloat, toInt, toString, trim, unique, updateOn, upperCase, url, urlAsync, whitelist };
|
|
31933
|
+
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, MENU_RESOLVE_OPTIONS, MatFormFieldEditorDirective, MatFormFieldRadioDirective, MatFormFieldReadonlyDirective, MatInputRequiredDirective, MatSelectRequiredDirective, Menu, MenuClient, MenuDepartment, MenuFormIncludesResolve, MenuItem, MenuItemClient, MenuItemDepartment, MenuItemFormIncludesResolve, MenuItemService, MenuItemTarget, MenuListProjectionResolve, MenuResolve, MenuScope, MenuService, MenuSettings, MenuSettingsResolve, MessageType, ModifiableEntity, MonthNamePipe, MsaEditFormActionsComponent, MsaEnumDisplayComponent, MsaSelectRequiredDirective, MsaSelectionLabelComponent, 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_COLUMNS_METADATA_KEY, TABLE_DEFINITION_METADATA_KEY, 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, getTableRowId, graphql, greaterThan, greaterThanAsync, greaterThanEqualTo, greaterThanEqualToAsync, grid, hasRequiredValidator, 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, parseProjectionArray, parseProjectionString, password, passwordAsync, pattern, patternAsync, port, prefix, primeNumber, prop, propArray, propObject, range, rangeAsync, required, requiredTrue, rtrim, rule, sanitize, startsWith, startsWithAsync, stripLow, suffix, time, timeAsync, toBoolean, toDate, toDouble, toFloat, toInt, toString, trim, unique, updateOn, upperCase, url, urlAsync, whitelist };
|
|
31388
31934
|
//# sourceMappingURL=messaia-cdk.mjs.map
|