@messaia/cdk 13.3.6-rc10 → 13.3.6-rc13
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/esm2020/lib/base/components/generic-list.component.mjs +14 -7
- package/esm2020/lib/chips/chips.module.mjs +15 -5
- package/esm2020/lib/chips/components/chips.component.mjs +188 -180
- package/esm2020/lib/chips/directives/autocomplete-option.directive.mjs +18 -0
- package/esm2020/lib/chips/directives/chip.directive.mjs +18 -0
- package/esm2020/lib/common/functions/utils.mjs +15 -1
- package/esm2020/lib/forms/components/generic-form/generic-form.component.mjs +5 -3
- package/esm2020/lib/forms/models/form-field-definition.mjs +1 -1
- package/esm2020/lib/layout/layout-nav-list/layout-nav-list.component.mjs +20 -31
- package/esm2020/lib/layout/layout-nav-list/layout-nav-list.directives.mjs +44 -20
- package/esm2020/lib/table/components/dynamic-table/dynamic-table.component.mjs +3 -3
- package/esm2020/lib/table/table.data-source.mjs +48 -14
- package/fesm2015/messaia-cdk.mjs +337 -234
- package/fesm2015/messaia-cdk.mjs.map +1 -1
- package/fesm2020/messaia-cdk.mjs +330 -230
- package/fesm2020/messaia-cdk.mjs.map +1 -1
- package/lib/base/components/generic-list.component.d.ts +4 -0
- package/lib/chips/chips.module.d.ts +17 -10
- package/lib/chips/components/chips.component.d.ts +107 -67
- package/lib/chips/directives/autocomplete-option.directive.d.ts +11 -0
- package/lib/chips/directives/chip.directive.d.ts +11 -0
- package/lib/common/functions/utils.d.ts +7 -0
- package/lib/common/styles/_common-theme.scss +10 -5
- package/lib/forms/models/form-field-definition.d.ts +2 -0
- package/lib/layout/layout-nav-list/layout-nav-list.component.d.ts +12 -9
- package/lib/layout/layout-nav-list/layout-nav-list.directives.d.ts +36 -0
- package/lib/table/table.data-source.d.ts +24 -2
- package/package.json +1 -1
package/fesm2015/messaia-cdk.mjs
CHANGED
|
@@ -74,15 +74,15 @@ import { MatSnackBar } from '@angular/material/snack-bar';
|
|
|
74
74
|
import '@angular/localize/init';
|
|
75
75
|
import { MatStepper } from '@angular/material/stepper';
|
|
76
76
|
import { saveAs } from 'file-saver';
|
|
77
|
-
import * as
|
|
78
|
-
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
79
|
-
import * as
|
|
77
|
+
import * as i9$1 from '@angular/material/autocomplete';
|
|
78
|
+
import { MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
79
|
+
import * as i5$2 from '@angular/material/chips';
|
|
80
80
|
import { MatChipsModule } from '@angular/material/chips';
|
|
81
81
|
import * as i3$4 from '@angular/cdk/a11y';
|
|
82
82
|
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
83
83
|
import * as i3$5 from '@angular/cdk/platform';
|
|
84
|
-
import * as i4$
|
|
85
|
-
import * as i5$
|
|
84
|
+
import * as i4$5 from '@angular/cdk/text-field';
|
|
85
|
+
import * as i5$3 from '@tinymce/tinymce-angular';
|
|
86
86
|
import * as i1$8 from '@angular/cdk/bidi';
|
|
87
87
|
|
|
88
88
|
class DisableControlDirective {
|
|
@@ -715,6 +715,20 @@ class Utils {
|
|
|
715
715
|
catch (error) { }
|
|
716
716
|
return obj;
|
|
717
717
|
}
|
|
718
|
+
/**
|
|
719
|
+
* Checks if the specified objects are equal
|
|
720
|
+
* @param obj1
|
|
721
|
+
* @param obj2
|
|
722
|
+
* @returns
|
|
723
|
+
*/
|
|
724
|
+
static equals(obj1, obj2) {
|
|
725
|
+
try {
|
|
726
|
+
return JSON.stringify(obj1) === JSON.stringify(obj2);
|
|
727
|
+
}
|
|
728
|
+
catch (error) {
|
|
729
|
+
return false;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
718
732
|
/**
|
|
719
733
|
* Gets the query params and the hash from the specified url
|
|
720
734
|
* @param url
|
|
@@ -3009,6 +3023,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
3009
3023
|
}] } });
|
|
3010
3024
|
|
|
3011
3025
|
class VdLayoutNavListComponent {
|
|
3026
|
+
/**
|
|
3027
|
+
* constructor
|
|
3028
|
+
* @param _router
|
|
3029
|
+
*/
|
|
3012
3030
|
constructor(_router) {
|
|
3013
3031
|
this._router = _router;
|
|
3014
3032
|
/**
|
|
@@ -3024,8 +3042,6 @@ class VdLayoutNavListComponent {
|
|
|
3024
3042
|
* The mode or styling of the sidenav.
|
|
3025
3043
|
* Defaults to "side".
|
|
3026
3044
|
* See "MatSidenav" documentation for more info.
|
|
3027
|
-
*
|
|
3028
|
-
* https://github.com/angular/material2/tree/master/src/lib/sidenav
|
|
3029
3045
|
*/
|
|
3030
3046
|
this.mode = 'side';
|
|
3031
3047
|
/**
|
|
@@ -3034,8 +3050,6 @@ class VdLayoutNavListComponent {
|
|
|
3034
3050
|
* Defaults to "true".
|
|
3035
3051
|
*
|
|
3036
3052
|
* See "MatSidenav" documentation for more info.
|
|
3037
|
-
*
|
|
3038
|
-
* https://github.com/angular/material2/tree/master/src/lib/sidenav
|
|
3039
3053
|
*/
|
|
3040
3054
|
this.opened = true;
|
|
3041
3055
|
/**
|
|
@@ -3043,8 +3057,6 @@ class VdLayoutNavListComponent {
|
|
|
3043
3057
|
*
|
|
3044
3058
|
* Sets the "width" of the sidenav in either "px" or "%"
|
|
3045
3059
|
* Defaults to "350px".
|
|
3046
|
-
*
|
|
3047
|
-
* https://github.com/angular/material2/tree/master/src/lib/sidenav
|
|
3048
3060
|
*/
|
|
3049
3061
|
this.sidenavWidth = '350px';
|
|
3050
3062
|
}
|
|
@@ -3052,15 +3064,14 @@ class VdLayoutNavListComponent {
|
|
|
3052
3064
|
* Checks if `ESC` should close the sidenav
|
|
3053
3065
|
* Should only close it for `push` and `over` modes
|
|
3054
3066
|
*/
|
|
3055
|
-
get disableClose() {
|
|
3056
|
-
return this.mode === 'side';
|
|
3057
|
-
}
|
|
3067
|
+
get disableClose() { return this.mode === 'side'; }
|
|
3058
3068
|
/**
|
|
3059
3069
|
* Checks if router was injected.
|
|
3060
3070
|
*/
|
|
3061
|
-
get routerEnabled() {
|
|
3062
|
-
|
|
3063
|
-
|
|
3071
|
+
get routerEnabled() { return !!this._router && !!this.navigationRoute; }
|
|
3072
|
+
/**
|
|
3073
|
+
* Handles navigation click
|
|
3074
|
+
*/
|
|
3064
3075
|
handleNavigationClick() {
|
|
3065
3076
|
if (this.routerEnabled) {
|
|
3066
3077
|
this._router.navigateByUrl(this.navigationRoute);
|
|
@@ -3086,10 +3097,10 @@ class VdLayoutNavListComponent {
|
|
|
3086
3097
|
}
|
|
3087
3098
|
}
|
|
3088
3099
|
/** @nocollapse */ VdLayoutNavListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdLayoutNavListComponent, deps: [{ token: i1$3.Router, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3089
|
-
/** @nocollapse */ VdLayoutNavListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: VdLayoutNavListComponent, selector: "vd-layout-nav-list", inputs: { toolbarTitle: "toolbarTitle", icon: "icon", logo: "logo", color: "color", mode: "mode", opened: "opened", sidenavWidth: "sidenavWidth", navigationRoute: "navigationRoute" }, viewQueries: [{ propertyName: "sidenav", first: true, predicate: MatSidenav, descendants: true, static: true }], ngImport: i0, template: "<div class=\"vd-layout-nav-list-wrapper\">\r\n\t<mat-sidenav-container fullscreen class=\"vd-layout-nav-list\">\r\n\t\t<mat-sidenav #sidenav position=\"start\" [mode]=\"mode\" [opened]=\"opened\" [disableClose]=\"disableClose\" [style.max-width]=\"sidenavWidth\"
|
|
3100
|
+
/** @nocollapse */ VdLayoutNavListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: VdLayoutNavListComponent, selector: "vd-layout-nav-list", inputs: { toolbarTitle: "toolbarTitle", icon: "icon", logo: "logo", color: "color", mode: "mode", opened: "opened", sidenavWidth: "sidenavWidth", navigationRoute: "navigationRoute" }, viewQueries: [{ propertyName: "sidenav", first: true, predicate: MatSidenav, descendants: true, static: true }], ngImport: i0, template: "<div class=\"vd-layout-nav-list-wrapper\">\r\n\t<mat-sidenav-container fullscreen class=\"vd-layout-nav-list\">\r\n\t\t<!-- #region Sidenav -->\r\n\t\t<mat-sidenav #sidenav position=\"start\" [mode]=\"mode\" [opened]=\"opened\" [disableClose]=\"disableClose\" [style.max-width]=\"sidenavWidth\" [style.min-width]=\"sidenavWidth\">\r\n\t\t\t<!-- #region Sidenav toolbar -->\r\n\t\t\t<mat-toolbar [color]=\"color\">\r\n\t\t\t\t<ng-content select=\"[vd-menu-button]\"></ng-content>\r\n\t\t\t\t<span *ngIf=\"icon || logo || toolbarTitle\" class=\"vd-layout-nav-list-toolbar-content\" [class.cursor-pointer]=\"routerEnabled\" (click)=\"handleNavigationClick()\">\r\n\t\t\t\t\t<mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\r\n\t\t\t\t\t<mat-icon *ngIf=\"logo && !icon\" class=\"mat-icon-logo\" [svgIcon]=\"logo\"></mat-icon>\r\n\t\t\t\t\t<span *ngIf=\"toolbarTitle\">{{toolbarTitle}}</span>\r\n\t\t\t\t</span>\r\n\t\t\t\t<ng-content select=\"[vd-sidenav-toolbar-content]\"></ng-content>\r\n\t\t\t</mat-toolbar>\r\n\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t<!-- #region Sidenav content -->\r\n\t\t\t<div class=\"vd-layout-nav-list-content\" cdkScrollable>\r\n\t\t\t\t<ng-content select=\"[vd-sidenav-content]\"></ng-content>\r\n\t\t\t</div>\r\n\t\t\t<!-- #endregion -->\r\n\t\t</mat-sidenav>\r\n\t\t<!-- #endregion -->\r\n\r\n\t\t<div class=\"vd-layout-nav-list-main\">\r\n\t\t\t<!-- #region Toolbar projection -->\r\n\t\t\t<ng-content select=\"mat-toolbar\"></ng-content>\r\n\t\t\t<ng-content select=\"vd-toolbar-content\"></ng-content>\r\n\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t<!-- #region Scrollable content -->\r\n\t\t\t<div class=\"vd-layout-nav-list-content\" cdkScrollable>\r\n\t\t\t\t<ng-content></ng-content>\r\n\t\t\t</div>\r\n\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t<!-- #region Footer content -->\r\n\t\t\t<ng-content select=\"vd-layout-footer-inner\"></ng-content>\r\n\t\t\t<!-- #endregion -->\r\n\t\t</div>\r\n\t</mat-sidenav-container>\r\n</div>\r\n<ng-content select=\"vd-layout-footer\"></ng-content>", styles: [":host{margin:0;width:100%;min-height:100%;height:100%;overflow:hidden;flex-direction:column;box-sizing:border-box;display:flex;flex:1}:host .vd-layout-nav-list-wrapper{flex-direction:column;box-sizing:border-box;display:flex;flex:1;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}:host .vd-layout-nav-list-wrapper .vd-layout-nav-list-toolbar-content{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;align-content:center;max-width:100%;justify-content:flex-start}:host .vd-layout-nav-list-wrapper .vd-layout-nav-list-content{text-align:start;flex:1;display:block;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}:host .vd-layout-nav-list-wrapper .vd-layout-nav-list-main{flex-direction:column;box-sizing:border-box;display:flex;margin:0;width:100%;min-height:100%;height:100%;position:relative;overflow:auto}:host .vd-layout-nav-list-wrapper .vd-layout-nav-list-main .vd-layout-nav-list-content{display:block;position:relative;overflow:auto;-webkit-overflow-scrolling:touch;flex:1}:host .vd-layout-nav-list-wrapper mat-sidenav-container.vd-layout-nav-list{flex:1}:host .vd-layout-nav-list-wrapper mat-sidenav-container.vd-layout-nav-list>mat-sidenav.mat-drawer-opened,:host .vd-layout-nav-list-wrapper mat-sidenav-container.vd-layout-nav-list>mat-sidenav.mat-drawer-opening,:host .vd-layout-nav-list-wrapper mat-sidenav-container.vd-layout-nav-list>mat-sidenav.mat-drawer-closed,:host .vd-layout-nav-list-wrapper mat-sidenav-container.vd-layout-nav-list>mat-sidenav.mat-drawer-closing{box-shadow:none}:host ::ng-deep mat-sidenav-container.vd-layout-nav-list>.mat-drawer-content{flex-grow:1}:host ::ng-deep mat-sidenav-container.vd-layout-nav-list>mat-sidenav{box-shadow:0 1px 3px #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f;box-sizing:border-box;display:flex;flex-direction:column}\n"], components: [{ type: i2$2.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { type: i2$2.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { type: i3$3.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }] });
|
|
3090
3101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdLayoutNavListComponent, decorators: [{
|
|
3091
3102
|
type: Component,
|
|
3092
|
-
args: [{ selector: 'vd-layout-nav-list', template: "<div class=\"vd-layout-nav-list-wrapper\">\r\n\t<mat-sidenav-container fullscreen class=\"vd-layout-nav-list\">\r\n\t\t<mat-sidenav #sidenav position=\"start\" [mode]=\"mode\" [opened]=\"opened\" [disableClose]=\"disableClose\" [style.max-width]=\"sidenavWidth\"
|
|
3103
|
+
args: [{ selector: 'vd-layout-nav-list', template: "<div class=\"vd-layout-nav-list-wrapper\">\r\n\t<mat-sidenav-container fullscreen class=\"vd-layout-nav-list\">\r\n\t\t<!-- #region Sidenav -->\r\n\t\t<mat-sidenav #sidenav position=\"start\" [mode]=\"mode\" [opened]=\"opened\" [disableClose]=\"disableClose\" [style.max-width]=\"sidenavWidth\" [style.min-width]=\"sidenavWidth\">\r\n\t\t\t<!-- #region Sidenav toolbar -->\r\n\t\t\t<mat-toolbar [color]=\"color\">\r\n\t\t\t\t<ng-content select=\"[vd-menu-button]\"></ng-content>\r\n\t\t\t\t<span *ngIf=\"icon || logo || toolbarTitle\" class=\"vd-layout-nav-list-toolbar-content\" [class.cursor-pointer]=\"routerEnabled\" (click)=\"handleNavigationClick()\">\r\n\t\t\t\t\t<mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\r\n\t\t\t\t\t<mat-icon *ngIf=\"logo && !icon\" class=\"mat-icon-logo\" [svgIcon]=\"logo\"></mat-icon>\r\n\t\t\t\t\t<span *ngIf=\"toolbarTitle\">{{toolbarTitle}}</span>\r\n\t\t\t\t</span>\r\n\t\t\t\t<ng-content select=\"[vd-sidenav-toolbar-content]\"></ng-content>\r\n\t\t\t</mat-toolbar>\r\n\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t<!-- #region Sidenav content -->\r\n\t\t\t<div class=\"vd-layout-nav-list-content\" cdkScrollable>\r\n\t\t\t\t<ng-content select=\"[vd-sidenav-content]\"></ng-content>\r\n\t\t\t</div>\r\n\t\t\t<!-- #endregion -->\r\n\t\t</mat-sidenav>\r\n\t\t<!-- #endregion -->\r\n\r\n\t\t<div class=\"vd-layout-nav-list-main\">\r\n\t\t\t<!-- #region Toolbar projection -->\r\n\t\t\t<ng-content select=\"mat-toolbar\"></ng-content>\r\n\t\t\t<ng-content select=\"vd-toolbar-content\"></ng-content>\r\n\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t<!-- #region Scrollable content -->\r\n\t\t\t<div class=\"vd-layout-nav-list-content\" cdkScrollable>\r\n\t\t\t\t<ng-content></ng-content>\r\n\t\t\t</div>\r\n\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t<!-- #region Footer content -->\r\n\t\t\t<ng-content select=\"vd-layout-footer-inner\"></ng-content>\r\n\t\t\t<!-- #endregion -->\r\n\t\t</div>\r\n\t</mat-sidenav-container>\r\n</div>\r\n<ng-content select=\"vd-layout-footer\"></ng-content>", styles: [":host{margin:0;width:100%;min-height:100%;height:100%;overflow:hidden;flex-direction:column;box-sizing:border-box;display:flex;flex:1}:host .vd-layout-nav-list-wrapper{flex-direction:column;box-sizing:border-box;display:flex;flex:1;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}:host .vd-layout-nav-list-wrapper .vd-layout-nav-list-toolbar-content{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;align-content:center;max-width:100%;justify-content:flex-start}:host .vd-layout-nav-list-wrapper .vd-layout-nav-list-content{text-align:start;flex:1;display:block;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}:host .vd-layout-nav-list-wrapper .vd-layout-nav-list-main{flex-direction:column;box-sizing:border-box;display:flex;margin:0;width:100%;min-height:100%;height:100%;position:relative;overflow:auto}:host .vd-layout-nav-list-wrapper .vd-layout-nav-list-main .vd-layout-nav-list-content{display:block;position:relative;overflow:auto;-webkit-overflow-scrolling:touch;flex:1}:host .vd-layout-nav-list-wrapper mat-sidenav-container.vd-layout-nav-list{flex:1}:host .vd-layout-nav-list-wrapper mat-sidenav-container.vd-layout-nav-list>mat-sidenav.mat-drawer-opened,:host .vd-layout-nav-list-wrapper mat-sidenav-container.vd-layout-nav-list>mat-sidenav.mat-drawer-opening,:host .vd-layout-nav-list-wrapper mat-sidenav-container.vd-layout-nav-list>mat-sidenav.mat-drawer-closed,:host .vd-layout-nav-list-wrapper mat-sidenav-container.vd-layout-nav-list>mat-sidenav.mat-drawer-closing{box-shadow:none}:host ::ng-deep mat-sidenav-container.vd-layout-nav-list>.mat-drawer-content{flex-grow:1}:host ::ng-deep mat-sidenav-container.vd-layout-nav-list>mat-sidenav{box-shadow:0 1px 3px #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f;box-sizing:border-box;display:flex;flex-direction:column}\n"] }]
|
|
3093
3104
|
}], ctorParameters: function () {
|
|
3094
3105
|
return [{ type: i1$3.Router, decorators: [{
|
|
3095
3106
|
type: Optional
|
|
@@ -3098,38 +3109,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
3098
3109
|
type: ViewChild,
|
|
3099
3110
|
args: [MatSidenav, { static: true }]
|
|
3100
3111
|
}], toolbarTitle: [{
|
|
3101
|
-
type: Input
|
|
3102
|
-
args: ['toolbarTitle']
|
|
3112
|
+
type: Input
|
|
3103
3113
|
}], icon: [{
|
|
3104
|
-
type: Input
|
|
3105
|
-
args: ['icon']
|
|
3114
|
+
type: Input
|
|
3106
3115
|
}], logo: [{
|
|
3107
|
-
type: Input
|
|
3108
|
-
args: ['logo']
|
|
3116
|
+
type: Input
|
|
3109
3117
|
}], color: [{
|
|
3110
|
-
type: Input
|
|
3111
|
-
args: ['color']
|
|
3118
|
+
type: Input
|
|
3112
3119
|
}], mode: [{
|
|
3113
|
-
type: Input
|
|
3114
|
-
args: ['mode']
|
|
3120
|
+
type: Input
|
|
3115
3121
|
}], opened: [{
|
|
3116
|
-
type: Input
|
|
3117
|
-
args: ['opened']
|
|
3122
|
+
type: Input
|
|
3118
3123
|
}], sidenavWidth: [{
|
|
3119
|
-
type: Input
|
|
3120
|
-
args: ['sidenavWidth']
|
|
3124
|
+
type: Input
|
|
3121
3125
|
}], navigationRoute: [{
|
|
3122
|
-
type: Input
|
|
3123
|
-
args: ['navigationRoute']
|
|
3126
|
+
type: Input
|
|
3124
3127
|
}] } });
|
|
3125
3128
|
|
|
3126
3129
|
class VdLayoutNavListToggleDirective extends LayoutToggle {
|
|
3130
|
+
/**
|
|
3131
|
+
* Constructor
|
|
3132
|
+
* @param layout
|
|
3133
|
+
* @param renderer
|
|
3134
|
+
* @param elementRef
|
|
3135
|
+
*/
|
|
3127
3136
|
constructor(layout, renderer, elementRef) {
|
|
3128
3137
|
super(layout, renderer, elementRef);
|
|
3129
3138
|
}
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3139
|
+
/**
|
|
3140
|
+
* Disables the navbar
|
|
3141
|
+
*/
|
|
3142
|
+
set vdLayoutNavListToggle(vdLayoutNavListToggle) { this.disabled = !(vdLayoutNavListToggle === '' || vdLayoutNavListToggle); }
|
|
3143
|
+
/**
|
|
3144
|
+
* Opens the navbar
|
|
3145
|
+
*/
|
|
3133
3146
|
onClick() {
|
|
3134
3147
|
this._layout.toggle();
|
|
3135
3148
|
}
|
|
@@ -3138,9 +3151,7 @@ class VdLayoutNavListToggleDirective extends LayoutToggle {
|
|
|
3138
3151
|
/** @nocollapse */ VdLayoutNavListToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: VdLayoutNavListToggleDirective, selector: "[vdLayoutNavListToggle]", inputs: { vdLayoutNavListToggle: "vdLayoutNavListToggle" }, usesInheritance: true, ngImport: i0 });
|
|
3139
3152
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdLayoutNavListToggleDirective, decorators: [{
|
|
3140
3153
|
type: Directive,
|
|
3141
|
-
args: [{
|
|
3142
|
-
selector: '[vdLayoutNavListToggle]',
|
|
3143
|
-
}]
|
|
3154
|
+
args: [{ selector: '[vdLayoutNavListToggle]' }]
|
|
3144
3155
|
}], ctorParameters: function () {
|
|
3145
3156
|
return [{ type: VdLayoutNavListComponent, decorators: [{
|
|
3146
3157
|
type: Inject,
|
|
@@ -3151,12 +3162,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
3151
3162
|
args: ['vdLayoutNavListToggle']
|
|
3152
3163
|
}] } });
|
|
3153
3164
|
class VdLayoutNavListCloseDirective extends LayoutToggle {
|
|
3165
|
+
/**
|
|
3166
|
+
* Constructor
|
|
3167
|
+
* @param layout
|
|
3168
|
+
* @param renderer
|
|
3169
|
+
* @param elementRef
|
|
3170
|
+
*/
|
|
3154
3171
|
constructor(layout, renderer, elementRef) {
|
|
3155
3172
|
super(layout, renderer, elementRef);
|
|
3156
3173
|
}
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3174
|
+
/**
|
|
3175
|
+
* Disables the navbar
|
|
3176
|
+
*/
|
|
3177
|
+
set vdLayoutNavListClose(vdLayoutNavListClose) { this.disabled = !(vdLayoutNavListClose === '' || vdLayoutNavListClose); }
|
|
3178
|
+
/**
|
|
3179
|
+
* Opens the navbar
|
|
3180
|
+
*/
|
|
3160
3181
|
onClick() {
|
|
3161
3182
|
this._layout.close();
|
|
3162
3183
|
}
|
|
@@ -3165,9 +3186,7 @@ class VdLayoutNavListCloseDirective extends LayoutToggle {
|
|
|
3165
3186
|
/** @nocollapse */ VdLayoutNavListCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: VdLayoutNavListCloseDirective, selector: "[vdLayoutNavListClose]", inputs: { vdLayoutNavListClose: "vdLayoutNavListClose" }, usesInheritance: true, ngImport: i0 });
|
|
3166
3187
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdLayoutNavListCloseDirective, decorators: [{
|
|
3167
3188
|
type: Directive,
|
|
3168
|
-
args: [{
|
|
3169
|
-
selector: '[vdLayoutNavListClose]',
|
|
3170
|
-
}]
|
|
3189
|
+
args: [{ selector: '[vdLayoutNavListClose]' }]
|
|
3171
3190
|
}], ctorParameters: function () {
|
|
3172
3191
|
return [{ type: VdLayoutNavListComponent, decorators: [{
|
|
3173
3192
|
type: Inject,
|
|
@@ -3178,12 +3197,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
3178
3197
|
args: ['vdLayoutNavListClose']
|
|
3179
3198
|
}] } });
|
|
3180
3199
|
class VdLayoutNavListOpenDirective extends LayoutToggle {
|
|
3200
|
+
/**
|
|
3201
|
+
* Constructor
|
|
3202
|
+
* @param layout
|
|
3203
|
+
* @param renderer
|
|
3204
|
+
* @param elementRef
|
|
3205
|
+
*/
|
|
3181
3206
|
constructor(layout, renderer, elementRef) {
|
|
3182
3207
|
super(layout, renderer, elementRef);
|
|
3183
3208
|
}
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3209
|
+
/**
|
|
3210
|
+
* Disables the navbar
|
|
3211
|
+
*/
|
|
3212
|
+
set vdLayoutNavListOpen(vdLayoutNavListOpen) { this.disabled = !(vdLayoutNavListOpen === '' || vdLayoutNavListOpen); }
|
|
3213
|
+
/**
|
|
3214
|
+
* Opens the navbar
|
|
3215
|
+
*/
|
|
3187
3216
|
onClick() {
|
|
3188
3217
|
this._layout.open();
|
|
3189
3218
|
}
|
|
@@ -3192,9 +3221,7 @@ class VdLayoutNavListOpenDirective extends LayoutToggle {
|
|
|
3192
3221
|
/** @nocollapse */ VdLayoutNavListOpenDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: VdLayoutNavListOpenDirective, selector: "[vdLayoutNavListOpen]", inputs: { vdLayoutNavListOpen: "vdLayoutNavListOpen" }, usesInheritance: true, ngImport: i0 });
|
|
3193
3222
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdLayoutNavListOpenDirective, decorators: [{
|
|
3194
3223
|
type: Directive,
|
|
3195
|
-
args: [{
|
|
3196
|
-
selector: '[vdLayoutNavListOpen]',
|
|
3197
|
-
}]
|
|
3224
|
+
args: [{ selector: '[vdLayoutNavListOpen]' }]
|
|
3198
3225
|
}], ctorParameters: function () {
|
|
3199
3226
|
return [{ type: VdLayoutNavListComponent, decorators: [{
|
|
3200
3227
|
type: Inject,
|
|
@@ -4610,11 +4637,11 @@ class TableDataSource extends DataSource {
|
|
|
4610
4637
|
* @param paginator
|
|
4611
4638
|
* @param sort
|
|
4612
4639
|
*/
|
|
4613
|
-
constructor(service, paginator,
|
|
4640
|
+
constructor(service, paginator, sorter) {
|
|
4614
4641
|
super();
|
|
4615
4642
|
this.service = service;
|
|
4616
4643
|
this.paginator = paginator;
|
|
4617
|
-
this.
|
|
4644
|
+
this.sorter = sorter;
|
|
4618
4645
|
/**
|
|
4619
4646
|
* Represents a value that changes over time.
|
|
4620
4647
|
* Observers can subscribe to the subject to receive filter changes
|
|
@@ -4634,6 +4661,18 @@ class TableDataSource extends DataSource {
|
|
|
4634
4661
|
* Used to power selecting one or more options from a list.
|
|
4635
4662
|
*/
|
|
4636
4663
|
this.selectionModel = new SelectionModel(true, []);
|
|
4664
|
+
/**
|
|
4665
|
+
* Sort change event emitter
|
|
4666
|
+
*/
|
|
4667
|
+
this.onSortChange = new EventEmitter();
|
|
4668
|
+
/**
|
|
4669
|
+
* _sort: MatSort | null
|
|
4670
|
+
*/
|
|
4671
|
+
this._sort = new MatSort();
|
|
4672
|
+
/**
|
|
4673
|
+
* isConnected: boolean
|
|
4674
|
+
*/
|
|
4675
|
+
this.isConnected = false;
|
|
4637
4676
|
/**
|
|
4638
4677
|
* The navigations to includes
|
|
4639
4678
|
*/
|
|
@@ -4673,7 +4712,7 @@ class TableDataSource extends DataSource {
|
|
|
4673
4712
|
/**
|
|
4674
4713
|
* A flag to show loading process
|
|
4675
4714
|
*/
|
|
4676
|
-
this.isLoading =
|
|
4715
|
+
this.isLoading = false;
|
|
4677
4716
|
/**
|
|
4678
4717
|
* Get selected Items
|
|
4679
4718
|
*/
|
|
@@ -4682,6 +4721,7 @@ class TableDataSource extends DataSource {
|
|
|
4682
4721
|
* Get selected Items
|
|
4683
4722
|
*/
|
|
4684
4723
|
this.getSelectedIds = () => this.getSelected('id');
|
|
4724
|
+
this.sort = sorter;
|
|
4685
4725
|
}
|
|
4686
4726
|
/**
|
|
4687
4727
|
* Gets filter
|
|
@@ -4697,6 +4737,16 @@ class TableDataSource extends DataSource {
|
|
|
4697
4737
|
}
|
|
4698
4738
|
this._filterChange.next(filter);
|
|
4699
4739
|
}
|
|
4740
|
+
/**
|
|
4741
|
+
* Instance of the MatSort directive used by the table to control its sorting. Sort changes
|
|
4742
|
+
* emitted by the MatSort will trigger an update to the table's rendered data.
|
|
4743
|
+
*/
|
|
4744
|
+
get sort() { return this._sort; }
|
|
4745
|
+
set sort(sort) {
|
|
4746
|
+
var _a;
|
|
4747
|
+
this._sort = sort;
|
|
4748
|
+
(_a = this._sort) === null || _a === void 0 ? void 0 : _a.sortChange.subscribe(x => this.onSortChange.emit(x));
|
|
4749
|
+
}
|
|
4700
4750
|
/**
|
|
4701
4751
|
* Gets reload token
|
|
4702
4752
|
*/
|
|
@@ -4708,33 +4758,35 @@ class TableDataSource extends DataSource {
|
|
|
4708
4758
|
* @returns Observable that emits a new value when the data changes.
|
|
4709
4759
|
*/
|
|
4710
4760
|
connect(_ = null) {
|
|
4711
|
-
var _a
|
|
4761
|
+
var _a;
|
|
4762
|
+
this.isConnected = true;
|
|
4712
4763
|
/* A list of fields to observe */
|
|
4713
4764
|
const displayDataChanges = [
|
|
4714
|
-
|
|
4715
|
-
(
|
|
4765
|
+
this.onSortChange,
|
|
4766
|
+
(_a = this.paginator) === null || _a === void 0 ? void 0 : _a.page,
|
|
4716
4767
|
this._filterChange,
|
|
4717
4768
|
this._reloadChange
|
|
4718
4769
|
];
|
|
4719
4770
|
/* If the user changes the sort order, reset back to the first page */
|
|
4720
|
-
this.
|
|
4771
|
+
this.onSortChange.subscribe(() => { this.paginator.pageIndex = 0; });
|
|
4721
4772
|
return merge$1(...displayDataChanges)
|
|
4722
4773
|
.pipe(skip(1), switchMap(() => {
|
|
4774
|
+
var _a, _b, _c, _d;
|
|
4723
4775
|
/* Flip flag to show that loading has begun */
|
|
4724
4776
|
this.isLoading = true;
|
|
4725
4777
|
/* Remove empty filters */
|
|
4726
|
-
|
|
4727
|
-
|
|
4778
|
+
Utils.cleanObject(this.fieldFilters);
|
|
4779
|
+
Utils.cleanObject(this.staticFieldFilters);
|
|
4728
4780
|
/* Load data and return it */
|
|
4729
|
-
return this.service.getList(Object.assign({
|
|
4781
|
+
return this.service.getList(Utils.cleanObject(Object.assign({
|
|
4730
4782
|
includes: this.includes,
|
|
4731
4783
|
projection: Array.isArray(this.projection) ? this.projection.join(',') : this.projection,
|
|
4732
4784
|
page: this.paginator.pageIndex + 1,
|
|
4733
4785
|
pageSize: this.paginator.pageSize,
|
|
4734
4786
|
search: this.filter.toLowerCase(),
|
|
4735
|
-
sortBy: this.sort.active,
|
|
4736
|
-
sortOrder: this.sort.direction
|
|
4737
|
-
},
|
|
4787
|
+
sortBy: (_a = this.sort) === null || _a === void 0 ? void 0 : _a.active,
|
|
4788
|
+
sortOrder: (_b = this.sort) === null || _b === void 0 ? void 0 : _b.direction
|
|
4789
|
+
}, (_c = this.fieldFilters) !== null && _c !== void 0 ? _c : {}, (_d = this.staticFieldFilters) !== null && _d !== void 0 ? _d : {})), null, { 'CheckOut': 'Yes' });
|
|
4738
4790
|
}), map((result) => {
|
|
4739
4791
|
/* Flip flag to show that loading has finished */
|
|
4740
4792
|
this.isLoading = false;
|
|
@@ -4760,7 +4812,9 @@ class TableDataSource extends DataSource {
|
|
|
4760
4812
|
* @param _ The component that exposes a view over the data provided by this
|
|
4761
4813
|
* data source.
|
|
4762
4814
|
*/
|
|
4763
|
-
disconnect(_ = null) {
|
|
4815
|
+
disconnect(_ = null) {
|
|
4816
|
+
this.isConnected = false;
|
|
4817
|
+
}
|
|
4764
4818
|
/**
|
|
4765
4819
|
* Reloads items
|
|
4766
4820
|
* @param clearSelection
|
|
@@ -4771,6 +4825,13 @@ class TableDataSource extends DataSource {
|
|
|
4771
4825
|
this.selectionModel.clear();
|
|
4772
4826
|
}
|
|
4773
4827
|
}
|
|
4828
|
+
/**
|
|
4829
|
+
* Clears field filters
|
|
4830
|
+
*/
|
|
4831
|
+
applyFilters(newFilters = {}) {
|
|
4832
|
+
this.fieldFilters = newFilters || {};
|
|
4833
|
+
this.reload();
|
|
4834
|
+
}
|
|
4774
4835
|
/**
|
|
4775
4836
|
* Clears field filters
|
|
4776
4837
|
*/
|
|
@@ -5179,7 +5240,7 @@ class VdDynamicTableComponent {
|
|
|
5179
5240
|
}
|
|
5180
5241
|
}
|
|
5181
5242
|
/** @nocollapse */ VdDynamicTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdDynamicTableComponent, deps: [{ token: DynamicBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5182
|
-
/** @nocollapse */ VdDynamicTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: VdDynamicTableComponent, selector: "vd-dynamic-table", inputs: { dataSource: "dataSource", data: "data", classType: "classType", context: "context", dataSourceFilter: "dataSourceFilter", static: "static", filterable: "filterable", paginable: "paginable", selectable: "selectable", sortActive: "sortActive", sortDirection: "sortDirection", stickyHeader: "stickyHeader", stickyFilter: "stickyFilter", rowNgClass: "rowNgClass", detailsTemplate: "detailsTemplate", readonly: "readonly", selectAllFilter: "selectAllFilter", columns: "columns", rowMenuItems: "rowMenuItems", excludedColumns: "excludedColumns", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions" }, outputs: { rowClick: "rowClick" }, host: { listeners: { "document:contextmenu": "handleContextMenuEvent($event)" } }, 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: "detailsTemplateRef", predicate: ["detailsTemplate"], descendants: true, read: ViewContainerRef }, { propertyName: "rowContextMenuTriggers", predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "<div class=\"loading-progress\" *ngIf=\"!static\">\r\n\t<mat-progress-bar mode=\"indeterminate\" *ngIf=\"dataSource?.isLoading\"></mat-progress-bar>\r\n</div>\r\n\r\n<!-- #region Data table -->\r\n<table mat-table #table [dataSource]=\"dataSource\" [dataSourceFilter]=\"dataSourceFilter\" [ngClass]=\"{'table-fixed': !detailsTemplate}\" [trackBy]=\"trackBy\" matSort matSortDisableClear [matSortActive]=\"sortActive||'id'\" [matSortDirection]=\"sortDirection\" multiTemplateDataRows>\r\n\t<ng-container *ngFor=\"let column of columns$ | async\">\r\n\t\t<!-- #region Column def -->\r\n\t\t<ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\n\t\t\t<th mat-header-cell *cdkHeaderCellDef [mat-sort-header]=\"column.sortBy || column.name\" [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [disabled]=\"column.type == ColumnType.Checkbox || column.disabled\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\r\n\t\t\t\t<mat-checkbox *ngIf=\"column.type == ColumnType.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\t\t\t\t<span *ngIf=\"column.type != ColumnType.Checkbox\">{{column.header}}</span>\r\n\t\t\t</th>\r\n\t\t\t<!-- column.cellNgClass ? column.cellNgClass(row, context) : { 'text-right': column.arrowBefore } -->\r\n\t\t\t<td mat-cell *cdkCellDef=\"let row; let rowIndex = index\" [matTooltip]=\"column.tooltip?column.tooltip(row, context):null\" [matTooltipClass]=\"column.tooltipClass\" [hidden]=\"column.hidden\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\" [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\t\t\t\t<ng-container [ngSwitch]=\"column.type\">\r\n\t\t\t\t\t<!-- #region Enum column -->\r\n\t\t\t\t\t<mat-checkbox *ngSwitchCase=\"ColumnType.Checkbox\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? dataSource.selectionModel.toggle(row) : null\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, context)))\" [checked]=\"dataSource.selectionModel.isSelected(row)\"></mat-checkbox>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Enum column -->\r\n\t\t\t\t\t<span *ngSwitchCase=\"ColumnType.Enum\" i18n=\"@@selection\">{column.content(row) | enum:column.enumType:column.enumPrefix, select, type {type} other {{{column.content(row, context) | enum:column.enumType:column.enumPrefix}}}}</span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Toggle column -->\r\n\t\t\t\t\t<mat-slide-toggle *ngSwitchCase=\"ColumnType.Toggle\" [(ngModel)]=\"row[column.name]\" (click)=\"$event.stopPropagation();\" (ngModelChange)=\"column.event?(column.eventArgs?column.event(row,column.eventArgs):column.event(row, context)):null\" [disabled]=\"readonly || (column.disable && column.disable(row, context))\" color=\"primary\"></mat-slide-toggle>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Date column -->\r\n\t\t\t\t\t<span *ngSwitchCase=\"ColumnType.Date\">{{column.content(row, context) | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Text Input column -->\r\n\t\t\t\t\t<mat-form-field *ngSwitchCase=\"ColumnType.TextInput\" appearance=\"outline\" layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\n\t\t\t\t\t\t<input type=\"{{column.inputType}}\" autocomplete=\"none\" matInput name=\"{{column.name}}{{rowIndex}}\" [(ngModel)]=\"row[column.name]\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, context)))\" (ngModelChange)=\"column.change?column.change(row, context):patch(row, [column.name], row[column.name], column.patchIncludes)\" [ngModelOptions]=\"{updateOn: 'blur'}\" (keydown.enter)=\"$event.target.blur();false\">\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Action -->\r\n\t\t\t\t\t<ng-container *ngSwitchCase=\"ColumnType.Action\">\r\n\t\t\t\t\t\t<div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed;\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu\" *ngIf=\"menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)\"></div>\r\n\t\t\t\t\t\t<vd-dynamic-menu [menu]=\"column.menu\" [item]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Menu -->\r\n\t\t\t\t\t<vd-dynamic-menu *ngSwitchCase=\"ColumnType.Menu\" [menu]=\"column.menu\" [item]=\"row\" [context]=\"context\"></vd-dynamic-menu>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Other column types -->\r\n\t\t\t\t\t<span *ngSwitchDefault [innerHtml]=\"column.content ? column.content(row, context):''\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\t\t\t\t</ng-container>\r\n\t\t\t</td>\r\n\t\t</ng-container>\r\n\t\t<!-- #endregion -->\r\n\t</ng-container>\r\n\r\n\t<!-- #region Filter row -->\r\n\t<ng-container *ngIf=\"dataSource && filterable\">\r\n\t\t<ng-container *ngFor=\"let column of columns$ | async\">\r\n\t\t\t<ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\">\r\n\t\t\t\t<th mat-header-cell *cdkHeaderCellDef [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\">\r\n\t\t\t\t\t<!-- #region Text filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number || column.type == ColumnType.Menu\" filter-input [onlyNumber]=\"column.filterInputNumber\" [operator]=\"column.filterOperator\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Select filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Select || column.type == ColumnType.Enum || column.type == ColumnType.Toggle\" filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Date filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Date\" filter-date></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Action filter (clear) -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Action\" filter-clear></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\t\t\t\t</th>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Details column -->\r\n\t<ng-container cdkColumnDef=\"expandedDetail\">\r\n\t\t<td mat-cell *matCellDef=\"let row\" [attr.colspan]=\"(displayedColumns$ | async).length\">\r\n\t\t\t<div class=\"row-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\" #detailsTemplate></div>\r\n\t\t</td>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Filter header -->\r\n\t<ng-container *ngIf=\"filterable\">\r\n\t\t<tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\r\n\t<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\r\n\t<!-- #region Detrails row -->\r\n\t<ng-container *ngIf=\"detailsTemplate\">\r\n\t\t<tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n</table>\r\n<!-- #endregion -->\r\n\r\n<!-- #region Row shown when there is no matching data.-->\r\n<div class=\"mat-cell pad table-empty txt-italic\" *ngIf=\"!dataSource.filteredData?.length && !dataSource.total\" i18n=\"@@noResultsFound\">No results were found.</div>\r\n<!-- #endregion -->\r\n\r\n<div class=\"table-footer\" layout=\"row\">\r\n\t<ng-content select=\"[table-footer]\"></ng-content>\r\n\t<span flex></span>\r\n\t<mat-paginator *ngIf=\"paginable\" [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\r\n</div>", styles: ["::ng-deep .mat-table .mat-row .mat-cell .mat-form-field .mat-form-field-wrapper{width:100%}@media (max-width: 389px){::ng-deep .mat-table [gt-xs],::ng-deep .mat-table .gt-xs{display:none}::ng-deep .mat-table [gt-sm],::ng-deep .mat-table .gt-sm{display:none}::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 599px){::ng-deep .mat-table [gt-sm],::ng-deep .mat-table .gt-sm{display:none}::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 959px){::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1279px){::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1919px){::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1979px){::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}\n"], components: [{ type: i2$4.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i1$4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i4$4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i6.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: VdDynamicMenuComponent, selector: "vd-dynamic-menu", inputs: ["menu", "item", "context"] }, { type: FilterInputComponent, selector: "mat-header-cell[filter-input], [mat-header-cell][filter-input], [filter-input]", inputs: ["field", "operator", "onlyNumber", "debounce", "placeholder"] }, { type: FilterSelectComponent, selector: "mat-header-cell[filter-select], [mat-header-cell][filter-select], [filter-select]", inputs: ["endpoint", "params", "projection", "sortBy", "sorted", "enum", "key", "text", "prefix", "multiple", "options", "filteredOptions", "filterable", "field", "placeholder", "cache"] }, { type: FilterDateComponent, selector: "mat-header-cell[filter-date], [mat-header-cell][filter-date], [filter-date]", inputs: ["field", "debounce", "placeholder"] }, { type: FilterClearComponent, selector: "mat-header-cell[filter-clear], [mat-header-cell][filter-clear], [filter-clear]" }, { type: i1$4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i1$4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i13.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$4.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: DataSourceFilterDirective, selector: "[dataSourceFilter]", inputs: ["dataSource", "dataSourceFilter"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$3.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["sticky", "cdkColumnDef", "stickyEnd"] }, { type: i2$3.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { type: i1$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2$3.CdkCellDef, selector: "[cdkCellDef]" }, { type: i1$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i17.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i4$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: OnlyNumberDirective, selector: "[onlyNumber]", inputs: ["onlyNumber"] }, { type: i1$4.MatCellDef, selector: "[matCellDef]" }, { type: i2$3.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { type: i2$3.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }], pipes: { "async": i4$1.AsyncPipe, "enum": EnumPipe, "date": i4$1.DatePipe }, animations: [
|
|
5243
|
+
/** @nocollapse */ VdDynamicTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: VdDynamicTableComponent, selector: "vd-dynamic-table", inputs: { dataSource: "dataSource", data: "data", classType: "classType", context: "context", dataSourceFilter: "dataSourceFilter", static: "static", filterable: "filterable", paginable: "paginable", selectable: "selectable", sortActive: "sortActive", sortDirection: "sortDirection", stickyHeader: "stickyHeader", stickyFilter: "stickyFilter", rowNgClass: "rowNgClass", detailsTemplate: "detailsTemplate", readonly: "readonly", selectAllFilter: "selectAllFilter", columns: "columns", rowMenuItems: "rowMenuItems", excludedColumns: "excludedColumns", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions" }, outputs: { rowClick: "rowClick" }, host: { listeners: { "document:contextmenu": "handleContextMenuEvent($event)" } }, 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: "detailsTemplateRef", predicate: ["detailsTemplate"], descendants: true, read: ViewContainerRef }, { propertyName: "rowContextMenuTriggers", predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "<div class=\"loading-progress\" *ngIf=\"!static\">\r\n\t<mat-progress-bar mode=\"indeterminate\" *ngIf=\"dataSource?.isLoading\"></mat-progress-bar>\r\n</div>\r\n\r\n<!-- #region Data table -->\r\n<table mat-table #table [dataSource]=\"dataSource\" [dataSourceFilter]=\"dataSourceFilter\" [ngClass]=\"{'table-fixed': !detailsTemplate}\" [trackBy]=\"trackBy\" matSort matSortDisableClear [matSortActive]=\"sortActive||'id'\" [matSortDirection]=\"sortDirection\" multiTemplateDataRows>\r\n\t<ng-container *ngFor=\"let column of columns$ | async\">\r\n\t\t<!-- #region Column def -->\r\n\t\t<ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\n\t\t\t<th mat-header-cell *cdkHeaderCellDef [mat-sort-header]=\"column.sortBy || column.name\" [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [disabled]=\"column.type == ColumnType.Checkbox || column.disabled\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\r\n\t\t\t\t<mat-checkbox *ngIf=\"column.type == ColumnType.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\t\t\t\t<span *ngIf=\"column.type != ColumnType.Checkbox\">{{column.header}}</span>\r\n\t\t\t</th>\r\n\r\n\t\t\t<!-- column.cellNgClass ? column.cellNgClass(row, context) : { 'text-right': column.arrowBefore } -->\r\n\t\t\t<td mat-cell *cdkCellDef=\"let row; let rowIndex = index\" [matTooltip]=\"column.tooltip?column.tooltip(row, context):null\" [matTooltipClass]=\"column.tooltipClass\" [hidden]=\"column.hidden\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\" [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\t\t\t\t<ng-container [ngSwitch]=\"column.type\">\r\n\t\t\t\t\t<!-- #region Enum column -->\r\n\t\t\t\t\t<mat-checkbox *ngSwitchCase=\"ColumnType.Checkbox\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? dataSource.selectionModel.toggle(row) : null\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, context)))\" [checked]=\"dataSource.selectionModel.isSelected(row)\"></mat-checkbox>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Enum column -->\r\n\t\t\t\t\t<span *ngSwitchCase=\"ColumnType.Enum\" i18n=\"@@selection\">{column.content(row) | enum:column.enumType:column.enumPrefix, select, type {type} other {{{column.content(row, context) | enum:column.enumType:column.enumPrefix}}}}</span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Toggle column -->\r\n\t\t\t\t\t<mat-slide-toggle *ngSwitchCase=\"ColumnType.Toggle\" [(ngModel)]=\"row[column.name]\" (click)=\"$event.stopPropagation();\" (ngModelChange)=\"column.event?(column.eventArgs?column.event(row,column.eventArgs):column.event(row, context)):null\" [disabled]=\"readonly || (column.disable && column.disable(row, context))\" color=\"primary\"></mat-slide-toggle>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Date column -->\r\n\t\t\t\t\t<span *ngSwitchCase=\"ColumnType.Date\">{{column.content(row, context) | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Text Input column -->\r\n\t\t\t\t\t<mat-form-field *ngSwitchCase=\"ColumnType.TextInput\" appearance=\"outline\" layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\n\t\t\t\t\t\t<input type=\"{{column.inputType}}\" autocomplete=\"none\" matInput name=\"{{column.name}}{{rowIndex}}\" [(ngModel)]=\"row[column.name]\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, context)))\" (ngModelChange)=\"column.change?column.change(row, context):patch(row, [column.name], row[column.name], column.patchIncludes)\" [ngModelOptions]=\"{updateOn: 'blur'}\" (keydown.enter)=\"$event.target.blur();false\">\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Action -->\r\n\t\t\t\t\t<ng-container *ngSwitchCase=\"ColumnType.Action\">\r\n\t\t\t\t\t\t<div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed;\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu\" *ngIf=\"menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)\"></div>\r\n\t\t\t\t\t\t<vd-dynamic-menu [menu]=\"column.menu\" [item]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Menu -->\r\n\t\t\t\t\t<vd-dynamic-menu *ngSwitchCase=\"ColumnType.Menu\" [menu]=\"column.menu\" [item]=\"row\" [context]=\"context\"></vd-dynamic-menu>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Other column types -->\r\n\t\t\t\t\t<span *ngSwitchDefault [innerHtml]=\"column.content ? column.content(row, context):''\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\t\t\t\t</ng-container>\r\n\t\t\t</td>\r\n\t\t</ng-container>\r\n\t\t<!-- #endregion -->\r\n\t</ng-container>\r\n\r\n\t<!-- #region Filter row -->\r\n\t<ng-container *ngIf=\"dataSource && filterable\">\r\n\t\t<ng-container *ngFor=\"let column of columns$ | async\">\r\n\t\t\t<ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\">\r\n\t\t\t\t<th mat-header-cell *cdkHeaderCellDef [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\">\r\n\t\t\t\t\t<!-- #region Text filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number || column.type == ColumnType.Menu\" filter-input [onlyNumber]=\"column.filterInputNumber\" [operator]=\"column.filterOperator\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Select filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Select || column.type == ColumnType.Enum || column.type == ColumnType.Toggle\" filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Date filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Date\" filter-date></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Action filter (clear) -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Action\" filter-clear></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\t\t\t\t</th>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Details column -->\r\n\t<ng-container cdkColumnDef=\"expandedDetail\">\r\n\t\t<td mat-cell *matCellDef=\"let row\" [attr.colspan]=\"(displayedColumns$ | async).length\">\r\n\t\t\t<div class=\"row-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\" #detailsTemplate></div>\r\n\t\t</td>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Filter header -->\r\n\t<ng-container *ngIf=\"filterable\">\r\n\t\t<tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\r\n\t<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\r\n\t<!-- #region Detrails row -->\r\n\t<ng-container *ngIf=\"detailsTemplate\">\r\n\t\t<tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n</table>\r\n<!-- #endregion -->\r\n\r\n<!-- #region Row shown when there is no matching data.-->\r\n<div class=\"mat-cell pad table-empty txt-italic\" *ngIf=\"!dataSource?.filteredData?.length && !dataSource?.total\" i18n=\"@@noResultsFound\">No results were found.</div>\r\n<!-- #endregion -->\r\n\r\n<div class=\"table-footer\" layout=\"row\">\r\n\t<ng-content select=\"[table-footer]\"></ng-content>\r\n\t<span flex></span>\r\n\t<mat-paginator *ngIf=\"paginable\" [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\r\n</div>", styles: ["::ng-deep .mat-table .mat-row .mat-cell .mat-form-field .mat-form-field-wrapper{width:100%}@media (max-width: 389px){::ng-deep .mat-table [gt-xs],::ng-deep .mat-table .gt-xs{display:none}::ng-deep .mat-table [gt-sm],::ng-deep .mat-table .gt-sm{display:none}::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 599px){::ng-deep .mat-table [gt-sm],::ng-deep .mat-table .gt-sm{display:none}::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 959px){::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1279px){::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1919px){::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1979px){::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}\n"], components: [{ type: i2$4.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i1$4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i4$4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i6.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: VdDynamicMenuComponent, selector: "vd-dynamic-menu", inputs: ["menu", "item", "context"] }, { type: FilterInputComponent, selector: "mat-header-cell[filter-input], [mat-header-cell][filter-input], [filter-input]", inputs: ["field", "operator", "onlyNumber", "debounce", "placeholder"] }, { type: FilterSelectComponent, selector: "mat-header-cell[filter-select], [mat-header-cell][filter-select], [filter-select]", inputs: ["endpoint", "params", "projection", "sortBy", "sorted", "enum", "key", "text", "prefix", "multiple", "options", "filteredOptions", "filterable", "field", "placeholder", "cache"] }, { type: FilterDateComponent, selector: "mat-header-cell[filter-date], [mat-header-cell][filter-date], [filter-date]", inputs: ["field", "debounce", "placeholder"] }, { type: FilterClearComponent, selector: "mat-header-cell[filter-clear], [mat-header-cell][filter-clear], [filter-clear]" }, { type: i1$4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i1$4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i13.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$4.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: DataSourceFilterDirective, selector: "[dataSourceFilter]", inputs: ["dataSource", "dataSourceFilter"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$3.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["sticky", "cdkColumnDef", "stickyEnd"] }, { type: i2$3.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { type: i1$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2$3.CdkCellDef, selector: "[cdkCellDef]" }, { type: i1$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i17.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i4$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: OnlyNumberDirective, selector: "[onlyNumber]", inputs: ["onlyNumber"] }, { type: i1$4.MatCellDef, selector: "[matCellDef]" }, { type: i2$3.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { type: i2$3.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }], pipes: { "async": i4$1.AsyncPipe, "enum": EnumPipe, "date": i4$1.DatePipe }, animations: [
|
|
5183
5244
|
trigger('detailExpand', [
|
|
5184
5245
|
state('collapsed', style({ display: 'none' })),
|
|
5185
5246
|
state('expanded', style({ display: 'initial' })),
|
|
@@ -5194,7 +5255,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
5194
5255
|
state('expanded', style({ display: 'initial' })),
|
|
5195
5256
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
5196
5257
|
]),
|
|
5197
|
-
], template: "<div class=\"loading-progress\" *ngIf=\"!static\">\r\n\t<mat-progress-bar mode=\"indeterminate\" *ngIf=\"dataSource?.isLoading\"></mat-progress-bar>\r\n</div>\r\n\r\n<!-- #region Data table -->\r\n<table mat-table #table [dataSource]=\"dataSource\" [dataSourceFilter]=\"dataSourceFilter\" [ngClass]=\"{'table-fixed': !detailsTemplate}\" [trackBy]=\"trackBy\" matSort matSortDisableClear [matSortActive]=\"sortActive||'id'\" [matSortDirection]=\"sortDirection\" multiTemplateDataRows>\r\n\t<ng-container *ngFor=\"let column of columns$ | async\">\r\n\t\t<!-- #region Column def -->\r\n\t\t<ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\n\t\t\t<th mat-header-cell *cdkHeaderCellDef [mat-sort-header]=\"column.sortBy || column.name\" [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [disabled]=\"column.type == ColumnType.Checkbox || column.disabled\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\r\n\t\t\t\t<mat-checkbox *ngIf=\"column.type == ColumnType.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\t\t\t\t<span *ngIf=\"column.type != ColumnType.Checkbox\">{{column.header}}</span>\r\n\t\t\t</th>\r\n\t\t\t<!-- column.cellNgClass ? column.cellNgClass(row, context) : { 'text-right': column.arrowBefore } -->\r\n\t\t\t<td mat-cell *cdkCellDef=\"let row; let rowIndex = index\" [matTooltip]=\"column.tooltip?column.tooltip(row, context):null\" [matTooltipClass]=\"column.tooltipClass\" [hidden]=\"column.hidden\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\" [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\t\t\t\t<ng-container [ngSwitch]=\"column.type\">\r\n\t\t\t\t\t<!-- #region Enum column -->\r\n\t\t\t\t\t<mat-checkbox *ngSwitchCase=\"ColumnType.Checkbox\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? dataSource.selectionModel.toggle(row) : null\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, context)))\" [checked]=\"dataSource.selectionModel.isSelected(row)\"></mat-checkbox>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Enum column -->\r\n\t\t\t\t\t<span *ngSwitchCase=\"ColumnType.Enum\" i18n=\"@@selection\">{column.content(row) | enum:column.enumType:column.enumPrefix, select, type {type} other {{{column.content(row, context) | enum:column.enumType:column.enumPrefix}}}}</span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Toggle column -->\r\n\t\t\t\t\t<mat-slide-toggle *ngSwitchCase=\"ColumnType.Toggle\" [(ngModel)]=\"row[column.name]\" (click)=\"$event.stopPropagation();\" (ngModelChange)=\"column.event?(column.eventArgs?column.event(row,column.eventArgs):column.event(row, context)):null\" [disabled]=\"readonly || (column.disable && column.disable(row, context))\" color=\"primary\"></mat-slide-toggle>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Date column -->\r\n\t\t\t\t\t<span *ngSwitchCase=\"ColumnType.Date\">{{column.content(row, context) | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Text Input column -->\r\n\t\t\t\t\t<mat-form-field *ngSwitchCase=\"ColumnType.TextInput\" appearance=\"outline\" layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\n\t\t\t\t\t\t<input type=\"{{column.inputType}}\" autocomplete=\"none\" matInput name=\"{{column.name}}{{rowIndex}}\" [(ngModel)]=\"row[column.name]\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, context)))\" (ngModelChange)=\"column.change?column.change(row, context):patch(row, [column.name], row[column.name], column.patchIncludes)\" [ngModelOptions]=\"{updateOn: 'blur'}\" (keydown.enter)=\"$event.target.blur();false\">\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Action -->\r\n\t\t\t\t\t<ng-container *ngSwitchCase=\"ColumnType.Action\">\r\n\t\t\t\t\t\t<div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed;\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu\" *ngIf=\"menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)\"></div>\r\n\t\t\t\t\t\t<vd-dynamic-menu [menu]=\"column.menu\" [item]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Menu -->\r\n\t\t\t\t\t<vd-dynamic-menu *ngSwitchCase=\"ColumnType.Menu\" [menu]=\"column.menu\" [item]=\"row\" [context]=\"context\"></vd-dynamic-menu>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Other column types -->\r\n\t\t\t\t\t<span *ngSwitchDefault [innerHtml]=\"column.content ? column.content(row, context):''\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\t\t\t\t</ng-container>\r\n\t\t\t</td>\r\n\t\t</ng-container>\r\n\t\t<!-- #endregion -->\r\n\t</ng-container>\r\n\r\n\t<!-- #region Filter row -->\r\n\t<ng-container *ngIf=\"dataSource && filterable\">\r\n\t\t<ng-container *ngFor=\"let column of columns$ | async\">\r\n\t\t\t<ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\">\r\n\t\t\t\t<th mat-header-cell *cdkHeaderCellDef [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\">\r\n\t\t\t\t\t<!-- #region Text filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number || column.type == ColumnType.Menu\" filter-input [onlyNumber]=\"column.filterInputNumber\" [operator]=\"column.filterOperator\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Select filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Select || column.type == ColumnType.Enum || column.type == ColumnType.Toggle\" filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Date filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Date\" filter-date></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Action filter (clear) -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Action\" filter-clear></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\t\t\t\t</th>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Details column -->\r\n\t<ng-container cdkColumnDef=\"expandedDetail\">\r\n\t\t<td mat-cell *matCellDef=\"let row\" [attr.colspan]=\"(displayedColumns$ | async).length\">\r\n\t\t\t<div class=\"row-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\" #detailsTemplate></div>\r\n\t\t</td>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Filter header -->\r\n\t<ng-container *ngIf=\"filterable\">\r\n\t\t<tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\r\n\t<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\r\n\t<!-- #region Detrails row -->\r\n\t<ng-container *ngIf=\"detailsTemplate\">\r\n\t\t<tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n</table>\r\n<!-- #endregion -->\r\n\r\n<!-- #region Row shown when there is no matching data.-->\r\n<div class=\"mat-cell pad table-empty txt-italic\" *ngIf=\"!dataSource.filteredData?.length && !dataSource.total\" i18n=\"@@noResultsFound\">No results were found.</div>\r\n<!-- #endregion -->\r\n\r\n<div class=\"table-footer\" layout=\"row\">\r\n\t<ng-content select=\"[table-footer]\"></ng-content>\r\n\t<span flex></span>\r\n\t<mat-paginator *ngIf=\"paginable\" [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\r\n</div>", styles: ["::ng-deep .mat-table .mat-row .mat-cell .mat-form-field .mat-form-field-wrapper{width:100%}@media (max-width: 389px){::ng-deep .mat-table [gt-xs],::ng-deep .mat-table .gt-xs{display:none}::ng-deep .mat-table [gt-sm],::ng-deep .mat-table .gt-sm{display:none}::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 599px){::ng-deep .mat-table [gt-sm],::ng-deep .mat-table .gt-sm{display:none}::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 959px){::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1279px){::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1919px){::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1979px){::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}\n"] }]
|
|
5258
|
+
], template: "<div class=\"loading-progress\" *ngIf=\"!static\">\r\n\t<mat-progress-bar mode=\"indeterminate\" *ngIf=\"dataSource?.isLoading\"></mat-progress-bar>\r\n</div>\r\n\r\n<!-- #region Data table -->\r\n<table mat-table #table [dataSource]=\"dataSource\" [dataSourceFilter]=\"dataSourceFilter\" [ngClass]=\"{'table-fixed': !detailsTemplate}\" [trackBy]=\"trackBy\" matSort matSortDisableClear [matSortActive]=\"sortActive||'id'\" [matSortDirection]=\"sortDirection\" multiTemplateDataRows>\r\n\t<ng-container *ngFor=\"let column of columns$ | async\">\r\n\t\t<!-- #region Column def -->\r\n\t\t<ng-container [cdkColumnDef]=\"column.name\" [sticky]=\"column.sticky\" [stickyEnd]=\"column.stickyEnd\">\r\n\t\t\t<th mat-header-cell *cdkHeaderCellDef [mat-sort-header]=\"column.sortBy || column.name\" [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [disabled]=\"column.type == ColumnType.Checkbox || column.disabled\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\" [arrowPosition]=\"column.arrowBefore?'before':'after'\">\r\n\t\t\t\t<mat-checkbox *ngIf=\"column.type == ColumnType.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\t\t\t\t<span *ngIf=\"column.type != ColumnType.Checkbox\">{{column.header}}</span>\r\n\t\t\t</th>\r\n\r\n\t\t\t<!-- column.cellNgClass ? column.cellNgClass(row, context) : { 'text-right': column.arrowBefore } -->\r\n\t\t\t<td mat-cell *cdkCellDef=\"let row; let rowIndex = index\" [matTooltip]=\"column.tooltip?column.tooltip(row, context):null\" [matTooltipClass]=\"column.tooltipClass\" [hidden]=\"column.hidden\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\" [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\t\t\t\t<ng-container [ngSwitch]=\"column.type\">\r\n\t\t\t\t\t<!-- #region Enum column -->\r\n\t\t\t\t\t<mat-checkbox *ngSwitchCase=\"ColumnType.Checkbox\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? dataSource.selectionModel.toggle(row) : null\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, context)))\" [checked]=\"dataSource.selectionModel.isSelected(row)\"></mat-checkbox>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Enum column -->\r\n\t\t\t\t\t<span *ngSwitchCase=\"ColumnType.Enum\" i18n=\"@@selection\">{column.content(row) | enum:column.enumType:column.enumPrefix, select, type {type} other {{{column.content(row, context) | enum:column.enumType:column.enumPrefix}}}}</span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Toggle column -->\r\n\t\t\t\t\t<mat-slide-toggle *ngSwitchCase=\"ColumnType.Toggle\" [(ngModel)]=\"row[column.name]\" (click)=\"$event.stopPropagation();\" (ngModelChange)=\"column.event?(column.eventArgs?column.event(row,column.eventArgs):column.event(row, context)):null\" [disabled]=\"readonly || (column.disable && column.disable(row, context))\" color=\"primary\"></mat-slide-toggle>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Date column -->\r\n\t\t\t\t\t<span *ngSwitchCase=\"ColumnType.Date\">{{column.content(row, context) | date:column.shortDate?'dd.MM.yyyy':'dd.MM.yyyy HH:mm:ss'}}</span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Text Input column -->\r\n\t\t\t\t\t<mat-form-field *ngSwitchCase=\"ColumnType.TextInput\" appearance=\"outline\" layout=\"column\" layout-align=\"center start\" (click)=\"$event.stopPropagation();\">\r\n\t\t\t\t\t\t<input type=\"{{column.inputType}}\" autocomplete=\"none\" matInput name=\"{{column.name}}{{rowIndex}}\" [(ngModel)]=\"row[column.name]\" [disabled]=\"readonly || (column.disabled || (column.disable && column.disable(row, context)))\" (ngModelChange)=\"column.change?column.change(row, context):patch(row, [column.name], row[column.name], column.patchIncludes)\" [ngModelOptions]=\"{updateOn: 'blur'}\" (keydown.enter)=\"$event.target.blur();false\">\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Action -->\r\n\t\t\t\t\t<ng-container *ngSwitchCase=\"ColumnType.Action\">\r\n\t\t\t\t\t\t<div id=\"menu-{{row.id}}\" style=\"visibility: hidden; position: fixed;\" #contextMenuTrigger=\"matMenuTrigger\" [matMenuTriggerFor]=\"menu.matMenu\" *ngIf=\"menu?.matMenu && !row.locked && hasVisibleRowMenuItems(row, column)\"></div>\r\n\t\t\t\t\t\t<vd-dynamic-menu [menu]=\"column.menu\" [item]=\"row\" [context]=\"context\" #menu></vd-dynamic-menu>\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Menu -->\r\n\t\t\t\t\t<vd-dynamic-menu *ngSwitchCase=\"ColumnType.Menu\" [menu]=\"column.menu\" [item]=\"row\" [context]=\"context\"></vd-dynamic-menu>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Other column types -->\r\n\t\t\t\t\t<span *ngSwitchDefault [innerHtml]=\"column.content ? column.content(row, context):''\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\t\t\t\t</ng-container>\r\n\t\t\t</td>\r\n\t\t</ng-container>\r\n\t\t<!-- #endregion -->\r\n\t</ng-container>\r\n\r\n\t<!-- #region Filter row -->\r\n\t<ng-container *ngIf=\"dataSource && filterable\">\r\n\t\t<ng-container *ngFor=\"let column of columns$ | async\">\r\n\t\t\t<ng-container cdkColumnDef=\"filter.{{column.filter || column.name}}\">\r\n\t\t\t\t<th mat-header-cell *cdkHeaderCellDef [hidden]=\"column.hidden\" [ngStyle]=\"{maxWidth:column.maxWidth?(column.maxWidth+(column.maxWidthUnit || 'px')):null,minWidth:column.minWidth?(column.minWidth+(column.minWidthUnit || 'px')):null,width:column.width?(column.width+(column.widthUnit || 'px')):null}\" [ngClass]=\"{'gt-xs': column.showGtXs, 'gt-sm': column.showGtSm, 'gt-md': column.showGtMd, 'gt-lg': column.showGtLg, 'gt-xl': column.showGtXl, 'gt-xxl': column.showGtXxl}\">\r\n\t\t\t\t\t<!-- #region Text filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Text || column.type == ColumnType.TextInput || column.type == ColumnType.Number || column.type == ColumnType.Menu\" filter-input [onlyNumber]=\"column.filterInputNumber\" [operator]=\"column.filterOperator\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Select filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Select || column.type == ColumnType.Enum || column.type == ColumnType.Toggle\" filter-select [endpoint]=\"column.endpoint\" [enum]=\"column.enumType\" [prefix]=\"column.enumPrefix\" [options]=\"column.options\" [text]=\"column.filterOptionText || 'name'\"></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Date filter -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Date\" filter-date></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t\t<!-- #region Action filter (clear) -->\r\n\t\t\t\t\t<span *ngIf=\"column.type == ColumnType.Action\" filter-clear></span>\r\n\t\t\t\t\t<!-- #endregion -->\r\n\t\t\t\t</th>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Details column -->\r\n\t<ng-container cdkColumnDef=\"expandedDetail\">\r\n\t\t<td mat-cell *matCellDef=\"let row\" [attr.colspan]=\"(displayedColumns$ | async).length\">\r\n\t\t\t<div class=\"row-detail\" [@detailExpand]=\"row == expandedRow ? 'expanded' : 'collapsed'\" #detailsTemplate></div>\r\n\t\t</td>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Filter header -->\r\n\t<ng-container *ngIf=\"filterable\">\r\n\t\t<tr mat-header-row *cdkHeaderRowDef=\"displayedFilterColumns$ | async\"></tr>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n\r\n\t<tr mat-header-row *cdkHeaderRowDef=\"displayedColumns$ | async; sticky: stickyFilter\"></tr>\r\n\t<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\r\n\t<!-- #region Detrails row -->\r\n\t<ng-container *ngIf=\"detailsTemplate\">\r\n\t\t<tr mat-row *cdkRowDef=\"let row; columns: ['expandedDetail']\" class=\"detail-row\" [ngClass]=\"rowNgClass?rowNgClass(row, context):null\"></tr>\r\n\t</ng-container>\r\n\t<!-- #endregion -->\r\n</table>\r\n<!-- #endregion -->\r\n\r\n<!-- #region Row shown when there is no matching data.-->\r\n<div class=\"mat-cell pad table-empty txt-italic\" *ngIf=\"!dataSource?.filteredData?.length && !dataSource?.total\" i18n=\"@@noResultsFound\">No results were found.</div>\r\n<!-- #endregion -->\r\n\r\n<div class=\"table-footer\" layout=\"row\">\r\n\t<ng-content select=\"[table-footer]\"></ng-content>\r\n\t<span flex></span>\r\n\t<mat-paginator *ngIf=\"paginable\" [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\"></mat-paginator>\r\n</div>", styles: ["::ng-deep .mat-table .mat-row .mat-cell .mat-form-field .mat-form-field-wrapper{width:100%}@media (max-width: 389px){::ng-deep .mat-table [gt-xs],::ng-deep .mat-table .gt-xs{display:none}::ng-deep .mat-table [gt-sm],::ng-deep .mat-table .gt-sm{display:none}::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 599px){::ng-deep .mat-table [gt-sm],::ng-deep .mat-table .gt-sm{display:none}::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 959px){::ng-deep .mat-table [gt-md],::ng-deep .mat-table .gt-md{display:none}::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1279px){::ng-deep .mat-table [gt-lg],::ng-deep .mat-table .gt-lg{display:none}::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1919px){::ng-deep .mat-table [gt-xl],::ng-deep .mat-table .gt-xl{display:none}::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}@media (max-width: 1979px){::ng-deep .mat-table [gt-xxl],::ng-deep .mat-table .gt-xxl{display:none}}\n"] }]
|
|
5198
5259
|
}], ctorParameters: function () { return [{ type: DynamicBuilder }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { table: [{
|
|
5199
5260
|
type: ViewChild,
|
|
5200
5261
|
args: ['table']
|
|
@@ -7170,6 +7231,10 @@ class GenericListComponent extends BaseComponent {
|
|
|
7170
7231
|
* If true, show the menu 'Duplicate'
|
|
7171
7232
|
*/
|
|
7172
7233
|
this.duplicable = false;
|
|
7234
|
+
/**
|
|
7235
|
+
* If true, show the menu 'Configure table'
|
|
7236
|
+
*/
|
|
7237
|
+
this.configurable = true;
|
|
7173
7238
|
/**
|
|
7174
7239
|
* rowNgClass: Function
|
|
7175
7240
|
*/
|
|
@@ -7596,11 +7661,14 @@ class GenericListComponent extends BaseComponent {
|
|
|
7596
7661
|
disable: () => !this.canExecuteMultipleOperations((x) => this.canDeleteItem(x))
|
|
7597
7662
|
});
|
|
7598
7663
|
}
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7664
|
+
/* Opens config dialog */
|
|
7665
|
+
if (this.configurable) {
|
|
7666
|
+
this.toolbarMenuItems.push({
|
|
7667
|
+
title: $localize `:@@configureTable:Configure table`,
|
|
7668
|
+
icon: 'settings',
|
|
7669
|
+
event: () => this.openConfigDialog()
|
|
7670
|
+
});
|
|
7671
|
+
}
|
|
7604
7672
|
}
|
|
7605
7673
|
/**
|
|
7606
7674
|
* Add row menu items
|
|
@@ -7649,7 +7717,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
7649
7717
|
title: $localize `:@@edit:Edit`,
|
|
7650
7718
|
icon: 'edit_note',
|
|
7651
7719
|
iconClass: 'tc-blue-400',
|
|
7652
|
-
event: (row) => this.edit(row),
|
|
7720
|
+
event: (row) => this.edit(row, this),
|
|
7653
7721
|
hide: (row) => !this.canEditItem(row)
|
|
7654
7722
|
});
|
|
7655
7723
|
}
|
|
@@ -14605,20 +14673,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
14605
14673
|
args: ["focusout"]
|
|
14606
14674
|
}] } });
|
|
14607
14675
|
|
|
14608
|
-
/**
|
|
14609
|
-
* VdChipDirective class
|
|
14610
|
-
*/
|
|
14611
|
-
class VdChipDirective extends CdkPortal {
|
|
14612
|
-
constructor(templateRef, viewContainerRef) {
|
|
14613
|
-
super(templateRef, viewContainerRef);
|
|
14614
|
-
}
|
|
14615
|
-
}
|
|
14616
|
-
/** @nocollapse */ VdChipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
14617
|
-
/** @nocollapse */ VdChipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: VdChipDirective, selector: "[vd-chip]ng-template", usesInheritance: true, ngImport: i0 });
|
|
14618
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipDirective, decorators: [{
|
|
14619
|
-
type: Directive,
|
|
14620
|
-
args: [{ selector: '[vd-chip]ng-template' }]
|
|
14621
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
14622
14676
|
/**
|
|
14623
14677
|
* VdAutocompleteOptionDirective class
|
|
14624
14678
|
*/
|
|
@@ -14632,13 +14686,29 @@ class VdAutocompleteOptionDirective extends CdkPortal {
|
|
|
14632
14686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdAutocompleteOptionDirective, decorators: [{
|
|
14633
14687
|
type: Directive,
|
|
14634
14688
|
args: [{ selector: '[vd-autocomplete-option]ng-template' }]
|
|
14635
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
14689
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
14690
|
+
|
|
14636
14691
|
/**
|
|
14637
|
-
*
|
|
14692
|
+
* VdChipDirective class
|
|
14638
14693
|
*/
|
|
14694
|
+
class VdChipDirective extends CdkPortal {
|
|
14695
|
+
constructor(templateRef, viewContainerRef) {
|
|
14696
|
+
super(templateRef, viewContainerRef);
|
|
14697
|
+
}
|
|
14698
|
+
}
|
|
14699
|
+
/** @nocollapse */ VdChipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
14700
|
+
/** @nocollapse */ VdChipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: VdChipDirective, selector: "[vd-chip]ng-template", usesInheritance: true, ngImport: i0 });
|
|
14701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipDirective, decorators: [{
|
|
14702
|
+
type: Directive,
|
|
14703
|
+
args: [{ selector: '[vd-chip]ng-template' }]
|
|
14704
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
14705
|
+
|
|
14639
14706
|
class VdChipsComponent extends AbstractMatFormField {
|
|
14640
14707
|
/**
|
|
14641
14708
|
* Constructor
|
|
14709
|
+
* @param injector
|
|
14710
|
+
* @param media
|
|
14711
|
+
* @param changeDetectorRef
|
|
14642
14712
|
* @param ngControl
|
|
14643
14713
|
* @param parentForm
|
|
14644
14714
|
* @param parentFormGroup
|
|
@@ -14646,18 +14716,15 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14646
14716
|
* @param focusMonitor
|
|
14647
14717
|
* @param elementRef
|
|
14648
14718
|
*/
|
|
14649
|
-
constructor(injector, ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef) {
|
|
14719
|
+
constructor(injector, media, changeDetectorRef, ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef) {
|
|
14650
14720
|
super("app-vd-chips", ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef);
|
|
14651
14721
|
this.injector = injector;
|
|
14722
|
+
this.media = media;
|
|
14723
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
14652
14724
|
/**
|
|
14653
|
-
*
|
|
14654
|
-
*/
|
|
14655
|
-
this.http = null;
|
|
14656
|
-
/**
|
|
14657
|
-
* Represents a value that changes over time.
|
|
14658
|
-
* Observers can subscribe to the subject to receive pdf file changes
|
|
14725
|
+
* Page size options
|
|
14659
14726
|
*/
|
|
14660
|
-
this.
|
|
14727
|
+
this.pageSizeOptions = [5, 10, 15, 20, 30, 50, 100, 200];
|
|
14661
14728
|
/**
|
|
14662
14729
|
* Set up reactive formcontrol
|
|
14663
14730
|
*/
|
|
@@ -14671,9 +14738,9 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14671
14738
|
*/
|
|
14672
14739
|
this.chips = [];
|
|
14673
14740
|
/**
|
|
14674
|
-
*
|
|
14741
|
+
* Readonly
|
|
14675
14742
|
*/
|
|
14676
|
-
this.
|
|
14743
|
+
this._paginated = true;
|
|
14677
14744
|
/**
|
|
14678
14745
|
* key: string
|
|
14679
14746
|
*/
|
|
@@ -14686,14 +14753,6 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14686
14753
|
* searchFields: string
|
|
14687
14754
|
*/
|
|
14688
14755
|
this.searchFields = [];
|
|
14689
|
-
/**
|
|
14690
|
-
* termMinlength: number
|
|
14691
|
-
*/
|
|
14692
|
-
this.termMinlength = 2;
|
|
14693
|
-
/**
|
|
14694
|
-
* limit: number
|
|
14695
|
-
*/
|
|
14696
|
-
this.limit = 30;
|
|
14697
14756
|
/**
|
|
14698
14757
|
* removable: boolean
|
|
14699
14758
|
*/
|
|
@@ -14733,16 +14792,34 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14733
14792
|
* Sends chip value as event.
|
|
14734
14793
|
*/
|
|
14735
14794
|
this.chipFocus = new EventEmitter();
|
|
14736
|
-
|
|
14795
|
+
/**
|
|
14796
|
+
* service: BaseService
|
|
14797
|
+
*/
|
|
14798
|
+
this.service = new BaseService();
|
|
14737
14799
|
}
|
|
14800
|
+
/**
|
|
14801
|
+
* A reference to VdDynamicTableComponent element
|
|
14802
|
+
*/
|
|
14803
|
+
get dynamicTable() { return this._dynamicTable; }
|
|
14804
|
+
set dynamicTable(dynamicTable) {
|
|
14805
|
+
this._dynamicTable = dynamicTable;
|
|
14806
|
+
if (this._dynamicTable) {
|
|
14807
|
+
this.dataSource.sort = this._dynamicTable.matSort;
|
|
14808
|
+
}
|
|
14809
|
+
}
|
|
14810
|
+
/**
|
|
14811
|
+
* A reference to MdPaginator element
|
|
14812
|
+
*/
|
|
14813
|
+
set paginator(paginator) { this._paginator = paginator; }
|
|
14814
|
+
get paginator() { return this._paginator; }
|
|
14738
14815
|
/**
|
|
14739
14816
|
* Gets or sets endpoint
|
|
14740
14817
|
*/
|
|
14741
14818
|
get endpoint() { return this._endpoint; }
|
|
14742
14819
|
set endpoint(endpoint) {
|
|
14743
14820
|
this._endpoint = endpoint;
|
|
14821
|
+
this.service.endpoint = typeof endpoint === 'function' ? endpoint(this) : endpoint;
|
|
14744
14822
|
this.clear();
|
|
14745
|
-
this._endpointChange.next([this.endpoint, this.path, this.params, this.projection]);
|
|
14746
14823
|
}
|
|
14747
14824
|
/**
|
|
14748
14825
|
* params: any
|
|
@@ -14750,14 +14827,9 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14750
14827
|
get params() { return this._params; }
|
|
14751
14828
|
set params(params) {
|
|
14752
14829
|
/* Remove empty params */
|
|
14753
|
-
|
|
14754
|
-
|
|
14755
|
-
delete params[key];
|
|
14756
|
-
}
|
|
14757
|
-
});
|
|
14758
|
-
if (JSON.stringify(this._params) !== JSON.stringify(params)) {
|
|
14830
|
+
Utils.cleanObject(params);
|
|
14831
|
+
if (!Utils.equals(this._params, params)) {
|
|
14759
14832
|
this._params = params;
|
|
14760
|
-
this._endpointChange.next([this.endpoint, this.path, this._params, this.projection]);
|
|
14761
14833
|
}
|
|
14762
14834
|
}
|
|
14763
14835
|
/**
|
|
@@ -14767,20 +14839,9 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14767
14839
|
set projection(projection) {
|
|
14768
14840
|
this._projection = projection;
|
|
14769
14841
|
this.clear();
|
|
14770
|
-
this._endpointChange.next([this.endpoint, this.path, this.params, this.projection]);
|
|
14771
14842
|
}
|
|
14772
14843
|
/**
|
|
14773
|
-
* Gets
|
|
14774
|
-
*/
|
|
14775
|
-
get path() { return this._path; }
|
|
14776
|
-
set path(path) {
|
|
14777
|
-
this._path = path;
|
|
14778
|
-
this.clear();
|
|
14779
|
-
this._endpointChange.next([this.endpoint, this.path, this.params, this.projection]);
|
|
14780
|
-
}
|
|
14781
|
-
/**
|
|
14782
|
-
* Sets the disabled.
|
|
14783
|
-
* @param disabled
|
|
14844
|
+
* Gets the disabled.
|
|
14784
14845
|
*/
|
|
14785
14846
|
get disabled() {
|
|
14786
14847
|
if (this._readonly) {
|
|
@@ -14788,39 +14849,60 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14788
14849
|
}
|
|
14789
14850
|
return super.disabled;
|
|
14790
14851
|
}
|
|
14852
|
+
/**
|
|
14853
|
+
* Multiple select option
|
|
14854
|
+
*/
|
|
14855
|
+
get paginated() { return this._paginated; }
|
|
14856
|
+
set paginated(paginated) {
|
|
14857
|
+
this._paginated = coerceBooleanProperty(paginated);
|
|
14858
|
+
this.stateChanges.next();
|
|
14859
|
+
}
|
|
14791
14860
|
/**
|
|
14792
14861
|
* Whether the select has a value.
|
|
14793
14862
|
*/
|
|
14794
14863
|
get empty() { return this.chips.length <= 0; }
|
|
14795
14864
|
/**
|
|
14796
|
-
*
|
|
14797
|
-
*/
|
|
14798
|
-
get
|
|
14799
|
-
|
|
14800
|
-
|
|
14801
|
-
|
|
14802
|
-
|
|
14803
|
-
|
|
14804
|
-
|
|
14805
|
-
|
|
14806
|
-
|
|
14807
|
-
|
|
14808
|
-
|
|
14809
|
-
|
|
14865
|
+
* Whether the `MatFormField` label should try to float.
|
|
14866
|
+
*/
|
|
14867
|
+
get shouldLabelFloat() { var _a; return super.shouldLabelFloat || ((_a = this.autoCompleteChipList) === null || _a === void 0 ? void 0 : _a.value); }
|
|
14868
|
+
/**
|
|
14869
|
+
* Lifecycle hook that is called after data-bound properties of a
|
|
14870
|
+
* directive are initialized.
|
|
14871
|
+
*/
|
|
14872
|
+
ngOnInit() {
|
|
14873
|
+
var _a, _b;
|
|
14874
|
+
/* Listen to value changes of the search input */
|
|
14875
|
+
this.autoCompleteChipList.valueChanges
|
|
14876
|
+
.pipe(debounceTime(this.debounce))
|
|
14877
|
+
.subscribe(v => {
|
|
14878
|
+
if (typeof v === 'string') {
|
|
14879
|
+
this.filterOptions(v);
|
|
14880
|
+
}
|
|
14881
|
+
});
|
|
14882
|
+
(_b = (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.valueChanges) === null || _b === void 0 ? void 0 : _b.pipe(skip(1)).subscribe((value) => {
|
|
14883
|
+
if (!value) {
|
|
14884
|
+
this.chips = [];
|
|
14885
|
+
this._value = "";
|
|
14886
|
+
this.autoCompleteChipList.setValue("");
|
|
14887
|
+
this.autoCompleteChipList.enable();
|
|
14888
|
+
}
|
|
14889
|
+
});
|
|
14810
14890
|
}
|
|
14811
14891
|
/**
|
|
14812
|
-
*
|
|
14892
|
+
* Lifecycle hook that is called after a component's view has been fully initialized.
|
|
14813
14893
|
*/
|
|
14814
|
-
|
|
14894
|
+
ngAfterViewInit() {
|
|
14815
14895
|
var _a;
|
|
14816
|
-
|
|
14896
|
+
this.media.broadcast();
|
|
14897
|
+
/* Initilialize the data source with the current service, paginator and sort */
|
|
14898
|
+
(_a = this.dataSource) !== null && _a !== void 0 ? _a : (this.dataSource = new TableDataSource(this.service, this.paginator, this.sort));
|
|
14817
14899
|
}
|
|
14818
14900
|
/**
|
|
14819
14901
|
* From ControlValueAccessor interface
|
|
14820
14902
|
* @param value
|
|
14821
14903
|
*/
|
|
14822
14904
|
writeValue(value) {
|
|
14823
|
-
var _a, _b, _c;
|
|
14905
|
+
var _a, _b, _c, _d, _e;
|
|
14824
14906
|
/* Set the value */
|
|
14825
14907
|
this._value = value;
|
|
14826
14908
|
/* Clear the chips list */
|
|
@@ -14840,69 +14922,67 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14840
14922
|
if (this.projection) {
|
|
14841
14923
|
_params.projection = this.projection;
|
|
14842
14924
|
}
|
|
14843
|
-
/* Get endpoint */
|
|
14844
|
-
let endpoint = typeof this.endpoint === 'function' ? this.endpoint(this) : this.endpoint;
|
|
14845
14925
|
/* Get base url */
|
|
14846
|
-
var urlParts = endpoint.split('?');
|
|
14847
|
-
this.http.get(`${urlParts[0]}/${value}${urlParts.length > 1 ? `?${urlParts[1]}` : ''}`, { params: Utils.cleanObject(_params) }).subscribe(
|
|
14848
|
-
|
|
14849
|
-
|
|
14850
|
-
|
|
14851
|
-
|
|
14852
|
-
|
|
14853
|
-
|
|
14854
|
-
|
|
14855
|
-
|
|
14926
|
+
var urlParts = (_e = (_d = this.service) === null || _d === void 0 ? void 0 : _d.endpoint) === null || _e === void 0 ? void 0 : _e.split('?');
|
|
14927
|
+
this.service.http.get(`${urlParts[0]}/${value}${urlParts.length > 1 ? `?${urlParts[1]}` : ''}`, { params: Utils.cleanObject(_params) }).subscribe({
|
|
14928
|
+
next: (x) => {
|
|
14929
|
+
this.loading = false;
|
|
14930
|
+
/* Add chip for selected option */
|
|
14931
|
+
this.chips.push(x);
|
|
14932
|
+
/* Emit selected event */
|
|
14933
|
+
this.initSelect.emit(x);
|
|
14934
|
+
},
|
|
14935
|
+
error: () => this.loading = false
|
|
14936
|
+
});
|
|
14856
14937
|
}
|
|
14857
14938
|
else {
|
|
14858
14939
|
this.clear(false);
|
|
14859
14940
|
}
|
|
14860
14941
|
}
|
|
14861
14942
|
/**
|
|
14862
|
-
*
|
|
14943
|
+
* Connects the data source and subscribe to the data changes
|
|
14863
14944
|
*/
|
|
14864
|
-
|
|
14865
|
-
var _a;
|
|
14866
|
-
|
|
14945
|
+
connect() {
|
|
14946
|
+
var _a, _b;
|
|
14947
|
+
/* Set focus */
|
|
14948
|
+
this.opened = true;
|
|
14949
|
+
/* Set some params */
|
|
14950
|
+
this.dataSource.fieldFilters = this.getQueryParams();
|
|
14951
|
+
/* Connect the data source manually for 'mat-option' triggers */
|
|
14952
|
+
if (!this.classType && !((_a = this.dataSource) === null || _a === void 0 ? void 0 : _a.isConnected)) {
|
|
14953
|
+
(_b = this.dataSourceSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
14954
|
+
this.dataSourceSubscription = this.dataSource.connect().subscribe();
|
|
14955
|
+
}
|
|
14956
|
+
/* Check the change detector and its children */
|
|
14957
|
+
this.changeDetectorRef.detectChanges();
|
|
14867
14958
|
}
|
|
14868
14959
|
/**
|
|
14869
|
-
*
|
|
14870
|
-
* directive are initialized.
|
|
14960
|
+
* Sets control focus
|
|
14871
14961
|
*/
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
this.autoCompleteChipList.valueChanges
|
|
14875
|
-
.pipe(debounceTime(this.debounce))
|
|
14876
|
-
.subscribe(v => this.filterOptions(v));
|
|
14877
|
-
(_b = (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.valueChanges) === null || _b === void 0 ? void 0 : _b.pipe(skip(1)).subscribe((value) => {
|
|
14878
|
-
if (!value) {
|
|
14879
|
-
this.chips = [];
|
|
14880
|
-
this._value = "";
|
|
14881
|
-
this.autoCompleteChipList.setValue("");
|
|
14882
|
-
this.autoCompleteChipList.enable();
|
|
14883
|
-
}
|
|
14884
|
-
});
|
|
14962
|
+
focus() {
|
|
14963
|
+
// this.autoCompleteChipList?.focus();
|
|
14885
14964
|
}
|
|
14886
14965
|
/**
|
|
14887
14966
|
* Adds a chip
|
|
14888
14967
|
* @param event
|
|
14889
14968
|
* @param input
|
|
14890
14969
|
*/
|
|
14891
|
-
addChip(
|
|
14892
|
-
/* Define selection constant */
|
|
14893
|
-
const selection = event.option.value;
|
|
14970
|
+
addChip(value, input) {
|
|
14894
14971
|
/* Add chip for selected option */
|
|
14895
|
-
this.chips
|
|
14972
|
+
this.chips = [value];
|
|
14896
14973
|
/* Emit selected event */
|
|
14897
|
-
this.selected.emit(
|
|
14974
|
+
this.selected.emit(value);
|
|
14898
14975
|
/* Set the value (ngModel) */
|
|
14899
|
-
this.value =
|
|
14976
|
+
this.value = value[this.key];
|
|
14900
14977
|
/* Diabled the input, allow only one chip */
|
|
14901
|
-
this.autoCompleteChipList.disable();
|
|
14978
|
+
this.autoCompleteChipList.disable({ emitEvent: false });
|
|
14979
|
+
this.autoCompleteChipList.patchValue('', { emitEvent: false });
|
|
14902
14980
|
/* Reset the autocomplete input text value */
|
|
14903
14981
|
if (input) {
|
|
14904
14982
|
input.value = '';
|
|
14905
14983
|
}
|
|
14984
|
+
/* Close the autocomplete panel, if not already done (for table row click) */
|
|
14985
|
+
this.autocompleteTrigger.closePanel();
|
|
14906
14986
|
}
|
|
14907
14987
|
/**
|
|
14908
14988
|
* Removes all chips
|
|
@@ -14916,12 +14996,14 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14916
14996
|
this.ngControl.control.markAsTouched();
|
|
14917
14997
|
}
|
|
14918
14998
|
/* Reset the value (ngModel) */
|
|
14919
|
-
this.autoCompleteChipList.
|
|
14999
|
+
this.autoCompleteChipList.patchValue('', { emitEvent: false });
|
|
14920
15000
|
if (triggerStateChanges) {
|
|
14921
15001
|
this.stateChanges.next();
|
|
14922
15002
|
}
|
|
14923
15003
|
/* Enable the input */
|
|
14924
|
-
this.autoCompleteChipList.enable();
|
|
15004
|
+
this.autoCompleteChipList.enable({ emitEvent: false });
|
|
15005
|
+
/* Check the change detector and its children */
|
|
15006
|
+
this.changeDetectorRef.detectChanges();
|
|
14925
15007
|
}
|
|
14926
15008
|
/**
|
|
14927
15009
|
* Filters options
|
|
@@ -14929,37 +15011,29 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14929
15011
|
*/
|
|
14930
15012
|
filterOptions(text) {
|
|
14931
15013
|
var _a, _b;
|
|
14932
|
-
|
|
14933
|
-
if (this.
|
|
15014
|
+
/* Filter the results */
|
|
15015
|
+
if (this.dataSource) {
|
|
14934
15016
|
/* Init params if null */
|
|
14935
|
-
|
|
15017
|
+
let _params = Object.assign({}, this.getQueryParams());
|
|
14936
15018
|
/* Add search word to the params */
|
|
14937
15019
|
if (this.searchField && this.searchFields.length <= 0) {
|
|
14938
15020
|
var result = new RegExp(`(\\${this.searchOperators.join('|\\')})?(.*)`).exec(this.searchField);
|
|
14939
|
-
|
|
15021
|
+
_params[result[2]] = `${result[1] ? result[1] : ''}${text}`;
|
|
14940
15022
|
}
|
|
14941
15023
|
/* Add search word to the params */
|
|
14942
15024
|
(_b = (_a = this.searchFields) === null || _a === void 0 ? void 0 : _a.map(x => x.trim())) === null || _b === void 0 ? void 0 : _b.forEach(x => {
|
|
14943
15025
|
var result = new RegExp(`(\\${this.searchOperators.join('|\\')})?(.*)`).exec(x);
|
|
14944
|
-
|
|
15026
|
+
_params[result[2]] = `${result[1] ? result[1] : ''}${text}`;
|
|
14945
15027
|
});
|
|
14946
|
-
/*
|
|
14947
|
-
this._params
|
|
14948
|
-
|
|
14949
|
-
if (this.projection) {
|
|
14950
|
-
this._params.projection = this.projection;
|
|
15028
|
+
/* Nothing has changed? */
|
|
15029
|
+
if (Utils.equals(this._params, _params)) {
|
|
15030
|
+
return;
|
|
14951
15031
|
}
|
|
15032
|
+
/* Set params */
|
|
15033
|
+
this._params = _params;
|
|
14952
15034
|
/* Get results from server */
|
|
14953
15035
|
this.loading = true;
|
|
14954
|
-
this.
|
|
14955
|
-
.subscribe({
|
|
14956
|
-
next: (x) => {
|
|
14957
|
-
this.loading = false;
|
|
14958
|
-
this.filteredOptions = x;
|
|
14959
|
-
this.emptyResult = !x || !x.length;
|
|
14960
|
-
},
|
|
14961
|
-
error: () => this.loading = false
|
|
14962
|
-
});
|
|
15036
|
+
this.dataSource.applyFilters(this._params);
|
|
14963
15037
|
}
|
|
14964
15038
|
}
|
|
14965
15039
|
/**
|
|
@@ -14981,18 +15055,35 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14981
15055
|
this.onLaunch.emit(this.chips[0]);
|
|
14982
15056
|
}
|
|
14983
15057
|
}
|
|
15058
|
+
/**
|
|
15059
|
+
* Gets query params
|
|
15060
|
+
* @returns
|
|
15061
|
+
*/
|
|
15062
|
+
getQueryParams() {
|
|
15063
|
+
/* Init params if null */
|
|
15064
|
+
var params = this._params;
|
|
15065
|
+
/* Add projection, if any */
|
|
15066
|
+
if (this.projection) {
|
|
15067
|
+
params.projection = this.projection;
|
|
15068
|
+
}
|
|
15069
|
+
return params;
|
|
15070
|
+
}
|
|
15071
|
+
/**
|
|
15072
|
+
* A callback method that performs custom clean-up, invoked immediately
|
|
15073
|
+
* before a directive, pipe, or service instance is destroyed.
|
|
15074
|
+
*/
|
|
15075
|
+
ngOnDestroy() {
|
|
15076
|
+
var _a;
|
|
15077
|
+
(_a = this.dataSourceSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
15078
|
+
}
|
|
14984
15079
|
}
|
|
14985
|
-
/** @nocollapse */ VdChipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipsComponent, deps: [{ token: i0.Injector }, { token: i1.NgControl, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i1.FormGroupDirective, optional: true }, { token: i2.ErrorStateMatcher }, { token: i3$4.FocusMonitor }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
14986
|
-
/** @nocollapse */ VdChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: VdChipsComponent, selector: "vd-chips", inputs: { chips: "chips", endpoint: "endpoint", params: "params", projection: "projection", path: "path", context: "context", key: "key", searchField: "searchField", searchFields: "searchFields", termMinlength: "termMinlength", limit: "limit", removable: "removable", debounce: "debounce", autocompleteCssClass: "autocompleteCssClass", suffixButtons: "suffixButtons", default: "default" }, outputs: { initSelect: "initSelect", selected: "selected", cleared: "cleared", onLaunch: "launch", chipFocus: "chipFocus" }, providers: [
|
|
14987
|
-
{ provide: MatFormFieldControl, useExisting: VdChipsComponent }
|
|
14988
|
-
], queries: [{ propertyName: "chipTemplate", first: true, predicate: VdChipDirective, descendants: true }, { propertyName: "autocompleteOptionTemplate", first: true, predicate: VdAutocompleteOptionDirective, descendants: true }], viewQueries: [{ propertyName: "chipInput", first: true, predicate: MatInput, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-chip-list #chipList [required]=\"required\" [disabled]=\"readonly\">\r\n\t<!-- #region Chips -->\r\n\t<ng-template let-chip let-first=\"first\" let-index=\"index\" ngFor [ngForOf]=\"chips\">\r\n\t\t<mat-basic-chip [selectable]=\"!readonly\" [removable]=\"!readonly\" (removed)=\"handleRemovedEvent()\" disableRipple>\r\n\t\t\t<span class=\"vd-chip-content\">\r\n\t\t\t\t<span *ngIf=\"!chipTemplate?.templateRef\">\r\n\t\t\t\t\t<span *ngIf=\"!autocompleteOptionTemplate?.templateRef\">{{ chip }}</span>\r\n\t\t\t\t\t<ng-template *ngIf=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\r\n\t\t\t\t</span>\r\n\t\t\t\t<ng-template *ngIf=\"chipTemplate?.templateRef\" [ngTemplateOutlet]=\"chipTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ chip: chip }\"></ng-template>\r\n\t\t\t</span>\r\n\t\t\t<ng-template let-button let-first=\"first\" ngFor [ngForOf]=\"suffixButtons\">\r\n\t\t\t\t<a mat-icon-button *ngIf=\"!button.hide || !button.hide(chips[0], context)\" (click)=\"$event.stopPropagation(); button.event && button.event(chips[0], context)\">\r\n\t\t\t\t\t<mat-icon>{{button.icon}}</mat-icon>\r\n\t\t\t\t</a>\r\n\t\t\t</ng-template>\r\n\t\t\t<a mat-icon-button *ngIf=\"onLaunch?.observers?.length > 0\" (click)=\"$event.stopPropagation(); handleLaunchClicked()\">\r\n\t\t\t\t<mat-icon>launch</mat-icon>\r\n\t\t\t</a>\r\n\t\t\t<a mat-icon-button *ngIf=\"!readonly\">\r\n\t\t\t\t<mat-icon matChipRemove>close</mat-icon>\r\n\t\t\t</a>\r\n\t\t</mat-basic-chip>\r\n\t</ng-template>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Search box -->\r\n\t<input matInput [hidden]=\"value && !empty\" placeholder=\"{{placeholder}}\" [readonly]=\"readonly\" [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" [formControl]=\"autoCompleteChipList\" #chipInput />\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Progress -->\r\n\t<mat-spinner diameter=\"18\" *ngIf=\"loading\"></mat-spinner>\r\n\t<!-- #endregion -->\r\n</mat-chip-list>\r\n\r\n<!-- #region Autocomplete -->\r\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"addChip($event, chipInput)\" [class]=\"autocompleteCssClass\">\r\n\t<ng-template let-item let-first=\"first\" ngFor [ngForOf]=\"filteredOptions\">\r\n\t\t<mat-option [value]=\"item\">\r\n\t\t\t<span *ngIf=\"!autocompleteOptionTemplate?.templateRef\">{{ item }}</span>\r\n\t\t\t<ng-template *ngIf=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ option: item }\"></ng-template>\r\n\t\t</mat-option>\r\n\t</ng-template>\r\n</mat-autocomplete>\r\n<!-- #endregion -->", styles: [":host ::ng-deep .mat-chip-list-wrapper{min-height:24px}:host ::ng-deep .mat-chip{display:flex;flex-direction:row;width:100%;padding:0 5px;justify-content:center}:host ::ng-deep .mat-chip.mat-chip-disabled{opacity:.6}:host ::ng-deep .mat-chip .vd-chip-content{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-chip .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;width:2.2em;height:2.2em;margin-top:-10px}:host ::ng-deep .mat-chip .mat-icon-button .mat-button-wrapper{line-height:20px}:host ::ng-deep .mat-chip .mat-icon-button .mat-button-wrapper .mat-icon{font-size:21px;line-height:21px}:host ::ng-deep .mat-chip .mat-icon{cursor:pointer}:host ::ng-deep .mat-chip .vd-chip-launch{font-size:18px;position:absolute;right:4px;top:0;cursor:pointer}:host ::ng-deep .mat-chip .vd-chip-launch.removable{right:34px}mat-spinner{margin-top:-9px;margin-right:6px}\n"], components: [{ type: i4$5.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i4$2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3$2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i2.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$5.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$5.MatChipRemove, selector: "[matChipRemove]" }, { type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i4$5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
15080
|
+
/** @nocollapse */ VdChipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipsComponent, deps: [{ token: i0.Injector }, { token: VdMediaService }, { token: i0.ChangeDetectorRef }, { token: i1.NgControl, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i1.FormGroupDirective, optional: true }, { token: i2.ErrorStateMatcher }, { token: i3$4.FocusMonitor }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
15081
|
+
/** @nocollapse */ VdChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: VdChipsComponent, selector: "vd-chips", inputs: { classType: "classType", chips: "chips", endpoint: "endpoint", params: "params", projection: "projection", paginated: "paginated", context: "context", key: "key", searchField: "searchField", searchFields: "searchFields", removable: "removable", debounce: "debounce", autocompleteCssClass: "autocompleteCssClass", suffixButtons: "suffixButtons" }, outputs: { initSelect: "initSelect", selected: "selected", cleared: "cleared", onLaunch: "launch", chipFocus: "chipFocus" }, providers: [{ provide: MatFormFieldControl, useExisting: VdChipsComponent }], 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: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-chip-list #chipList [required]=\"required\" [disabled]=\"readonly\" matAutocompleteOrigin #origin=\"matAutocompleteOrigin\">\r\n\t<!-- #region Chips -->\r\n\t<ng-template let-chip let-first=\"first\" let-index=\"index\" ngFor [ngForOf]=\"chips\">\r\n\t\t<mat-basic-chip [selectable]=\"!readonly\" [removable]=\"!readonly\" (removed)=\"handleRemovedEvent()\" disableRipple>\r\n\t\t\t<span class=\"vd-chip-content\">\r\n\t\t\t\t<span *ngIf=\"!chipTemplate?.templateRef\">\r\n\t\t\t\t\t<span *ngIf=\"!autocompleteOptionTemplate?.templateRef\">{{ chip }}</span>\r\n\t\t\t\t\t<ng-template *ngIf=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\r\n\t\t\t\t</span>\r\n\t\t\t\t<ng-template *ngIf=\"chipTemplate?.templateRef\" [ngTemplateOutlet]=\"chipTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ chip: chip }\"></ng-template>\r\n\t\t\t</span>\r\n\t\t\t<ng-template let-button let-first=\"first\" ngFor [ngForOf]=\"suffixButtons\">\r\n\t\t\t\t<a mat-icon-button *ngIf=\"!button.hide || !button.hide(chips[0], context)\" (click)=\"$event.stopPropagation(); button.event && button.event(chips[0], context)\">\r\n\t\t\t\t\t<mat-icon>{{button.icon}}</mat-icon>\r\n\t\t\t\t</a>\r\n\t\t\t</ng-template>\r\n\t\t\t<a mat-icon-button *ngIf=\"onLaunch?.observers?.length > 0\" (click)=\"$event.stopPropagation(); handleLaunchClicked()\">\r\n\t\t\t\t<mat-icon>launch</mat-icon>\r\n\t\t\t</a>\r\n\t\t\t<a mat-icon-button *ngIf=\"!readonly\">\r\n\t\t\t\t<mat-icon matChipRemove>close</mat-icon>\r\n\t\t\t</a>\r\n\t\t</mat-basic-chip>\r\n\t</ng-template>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Search box -->\r\n\t<input matInput [hidden]=\"value && !empty\" placeholder=\"{{placeholder}}\" (focus)=\"connect()\" [readonly]=\"readonly\" [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" [matAutocompleteConnectedTo]=\"origin\" [formControl]=\"autoCompleteChipList\" #filterInput />\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Reset button -->\r\n\t<a mat-icon-button trailingIcon *ngIf=\"filterInput.value\" class=\"reset-input\" (click)=\"filterInput.value = ''\">\r\n\t\t<mat-icon>close</mat-icon>\r\n\t</a>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Progress -->\r\n\t<mat-spinner diameter=\"18\" *ngIf=\"dataSource?.isLoading\"></mat-spinner>\r\n\t<!-- #endregion -->\r\n</mat-chip-list>\r\n\r\n<!-- #region Autocomplete -->\r\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"addChip($event.option.value, filterInput)\" class=\"{{autocompleteCssClass}}{{classType?' table-autocomplete':''}}\">\r\n\t<ng-template *ngIf=\"!classType && opened\" let-item let-first=\"first\" ngFor [ngForOf]=\"dataSource?.items\">\r\n\t\t<mat-option [value]=\"item\">\r\n\t\t\t<span *ngIf=\"!autocompleteOptionTemplate?.templateRef\">{{item}}</span>\r\n\t\t\t<ng-template *ngIf=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ option: item }\"></ng-template>\r\n\t\t</mat-option>\r\n\t</ng-template>\r\n\t<ng-container *ngIf=\"classType && opened\">\r\n\t\t<mat-option hide=\"true\"></mat-option>\r\n\t\t<vd-dynamic-table [dataSource]=\"dataSource\" [classType]=\"classType\" (rowClick)=\"addChip($event, filterInput)\" matSort [sortActive]=\"sortActive||'id'\" [sortDirection]=\"sortDirection\"></vd-dynamic-table>\r\n\t</ng-container>\r\n\t<mat-paginator [length]=\"dataSource?.total\" [pageIndex]=\"dataSource?.pageIndex\" [pageSize]=\"dataSource?.pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\" hidePageSize=\"true\"></mat-paginator>\r\n</mat-autocomplete>\r\n<!-- #endregion -->", styles: [":host ::ng-deep .mat-chip-list-wrapper{min-height:24px}:host ::ng-deep .mat-chip{display:flex;flex-direction:row;width:100%;padding:0 5px;justify-content:center}:host ::ng-deep .mat-chip.mat-chip-disabled{opacity:.6}:host ::ng-deep .mat-chip .vd-chip-content{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-chip .mat-icon{cursor:pointer}:host ::ng-deep .mat-chip .vd-chip-launch{font-size:18px;position:absolute;right:4px;top:0;cursor:pointer}:host ::ng-deep .mat-chip .vd-chip-launch.removable{right:34px}:host ::ng-deep .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;width:2.2em;height:2.2em;margin-top:-10px}:host ::ng-deep .mat-icon-button .mat-button-wrapper{line-height:20px}:host ::ng-deep .mat-icon-button .mat-button-wrapper .mat-icon{font-size:21px;line-height:21px}::ng-deep .mat-autocomplete-panel{margin-top:9px}::ng-deep .mat-autocomplete-panel .mat-paginator{position:sticky;bottom:0}::ng-deep .mat-autocomplete-panel .mat-paginator .mat-paginator-container{padding:0}::ng-deep .mat-autocomplete-panel .mat-paginator .mat-paginator-container .mat-paginator-range-actions{align-items:baseline}::ng-deep .mat-autocomplete-panel .mat-paginator .mat-paginator-container .mat-paginator-range-actions .mat-paginator-range-label{margin:0 16px 0 24px}::ng-deep .mat-autocomplete-panel.table-autocomplete{max-height:400px}mat-spinner{margin-top:-9px;margin-right:6px}\n"], components: [{ type: i5$2.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i4$2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3$2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { type: i9$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: VdDynamicTableComponent, selector: "vd-dynamic-table", inputs: ["dataSource", "data", "classType", "context", "dataSourceFilter", "static", "filterable", "paginable", "selectable", "sortActive", "sortDirection", "stickyHeader", "stickyFilter", "rowNgClass", "detailsTemplate", "readonly", "selectAllFilter", "columns", "rowMenuItems", "excludedColumns", "pageSize", "pageSizeOptions"], outputs: ["rowClick"] }, { type: i13.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i9$1.MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i5$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i9$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
14989
15082
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipsComponent, decorators: [{
|
|
14990
15083
|
type: Component,
|
|
14991
|
-
args: [{ selector: 'vd-chips', providers: [
|
|
14992
|
-
{ provide: MatFormFieldControl, useExisting: VdChipsComponent }
|
|
14993
|
-
], template: "<mat-chip-list #chipList [required]=\"required\" [disabled]=\"readonly\">\r\n\t<!-- #region Chips -->\r\n\t<ng-template let-chip let-first=\"first\" let-index=\"index\" ngFor [ngForOf]=\"chips\">\r\n\t\t<mat-basic-chip [selectable]=\"!readonly\" [removable]=\"!readonly\" (removed)=\"handleRemovedEvent()\" disableRipple>\r\n\t\t\t<span class=\"vd-chip-content\">\r\n\t\t\t\t<span *ngIf=\"!chipTemplate?.templateRef\">\r\n\t\t\t\t\t<span *ngIf=\"!autocompleteOptionTemplate?.templateRef\">{{ chip }}</span>\r\n\t\t\t\t\t<ng-template *ngIf=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\r\n\t\t\t\t</span>\r\n\t\t\t\t<ng-template *ngIf=\"chipTemplate?.templateRef\" [ngTemplateOutlet]=\"chipTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ chip: chip }\"></ng-template>\r\n\t\t\t</span>\r\n\t\t\t<ng-template let-button let-first=\"first\" ngFor [ngForOf]=\"suffixButtons\">\r\n\t\t\t\t<a mat-icon-button *ngIf=\"!button.hide || !button.hide(chips[0], context)\" (click)=\"$event.stopPropagation(); button.event && button.event(chips[0], context)\">\r\n\t\t\t\t\t<mat-icon>{{button.icon}}</mat-icon>\r\n\t\t\t\t</a>\r\n\t\t\t</ng-template>\r\n\t\t\t<a mat-icon-button *ngIf=\"onLaunch?.observers?.length > 0\" (click)=\"$event.stopPropagation(); handleLaunchClicked()\">\r\n\t\t\t\t<mat-icon>launch</mat-icon>\r\n\t\t\t</a>\r\n\t\t\t<a mat-icon-button *ngIf=\"!readonly\">\r\n\t\t\t\t<mat-icon matChipRemove>close</mat-icon>\r\n\t\t\t</a>\r\n\t\t</mat-basic-chip>\r\n\t</ng-template>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Search box -->\r\n\t<input matInput [hidden]=\"value && !empty\" placeholder=\"{{placeholder}}\" [readonly]=\"readonly\" [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" [formControl]=\"autoCompleteChipList\" #chipInput />\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Progress -->\r\n\t<mat-spinner diameter=\"18\" *ngIf=\"loading\"></mat-spinner>\r\n\t<!-- #endregion -->\r\n</mat-chip-list>\r\n\r\n<!-- #region Autocomplete -->\r\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"addChip($event, chipInput)\" [class]=\"autocompleteCssClass\">\r\n\t<ng-template let-item let-first=\"first\" ngFor [ngForOf]=\"filteredOptions\">\r\n\t\t<mat-option [value]=\"item\">\r\n\t\t\t<span *ngIf=\"!autocompleteOptionTemplate?.templateRef\">{{ item }}</span>\r\n\t\t\t<ng-template *ngIf=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ option: item }\"></ng-template>\r\n\t\t</mat-option>\r\n\t</ng-template>\r\n</mat-autocomplete>\r\n<!-- #endregion -->", styles: [":host ::ng-deep .mat-chip-list-wrapper{min-height:24px}:host ::ng-deep .mat-chip{display:flex;flex-direction:row;width:100%;padding:0 5px;justify-content:center}:host ::ng-deep .mat-chip.mat-chip-disabled{opacity:.6}:host ::ng-deep .mat-chip .vd-chip-content{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-chip .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;width:2.2em;height:2.2em;margin-top:-10px}:host ::ng-deep .mat-chip .mat-icon-button .mat-button-wrapper{line-height:20px}:host ::ng-deep .mat-chip .mat-icon-button .mat-button-wrapper .mat-icon{font-size:21px;line-height:21px}:host ::ng-deep .mat-chip .mat-icon{cursor:pointer}:host ::ng-deep .mat-chip .vd-chip-launch{font-size:18px;position:absolute;right:4px;top:0;cursor:pointer}:host ::ng-deep .mat-chip .vd-chip-launch.removable{right:34px}mat-spinner{margin-top:-9px;margin-right:6px}\n"] }]
|
|
15084
|
+
args: [{ selector: 'vd-chips', providers: [{ provide: MatFormFieldControl, useExisting: VdChipsComponent }], template: "<mat-chip-list #chipList [required]=\"required\" [disabled]=\"readonly\" matAutocompleteOrigin #origin=\"matAutocompleteOrigin\">\r\n\t<!-- #region Chips -->\r\n\t<ng-template let-chip let-first=\"first\" let-index=\"index\" ngFor [ngForOf]=\"chips\">\r\n\t\t<mat-basic-chip [selectable]=\"!readonly\" [removable]=\"!readonly\" (removed)=\"handleRemovedEvent()\" disableRipple>\r\n\t\t\t<span class=\"vd-chip-content\">\r\n\t\t\t\t<span *ngIf=\"!chipTemplate?.templateRef\">\r\n\t\t\t\t\t<span *ngIf=\"!autocompleteOptionTemplate?.templateRef\">{{ chip }}</span>\r\n\t\t\t\t\t<ng-template *ngIf=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ option: chip }\"></ng-template>\r\n\t\t\t\t</span>\r\n\t\t\t\t<ng-template *ngIf=\"chipTemplate?.templateRef\" [ngTemplateOutlet]=\"chipTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ chip: chip }\"></ng-template>\r\n\t\t\t</span>\r\n\t\t\t<ng-template let-button let-first=\"first\" ngFor [ngForOf]=\"suffixButtons\">\r\n\t\t\t\t<a mat-icon-button *ngIf=\"!button.hide || !button.hide(chips[0], context)\" (click)=\"$event.stopPropagation(); button.event && button.event(chips[0], context)\">\r\n\t\t\t\t\t<mat-icon>{{button.icon}}</mat-icon>\r\n\t\t\t\t</a>\r\n\t\t\t</ng-template>\r\n\t\t\t<a mat-icon-button *ngIf=\"onLaunch?.observers?.length > 0\" (click)=\"$event.stopPropagation(); handleLaunchClicked()\">\r\n\t\t\t\t<mat-icon>launch</mat-icon>\r\n\t\t\t</a>\r\n\t\t\t<a mat-icon-button *ngIf=\"!readonly\">\r\n\t\t\t\t<mat-icon matChipRemove>close</mat-icon>\r\n\t\t\t</a>\r\n\t\t</mat-basic-chip>\r\n\t</ng-template>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Search box -->\r\n\t<input matInput [hidden]=\"value && !empty\" placeholder=\"{{placeholder}}\" (focus)=\"connect()\" [readonly]=\"readonly\" [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" [matAutocompleteConnectedTo]=\"origin\" [formControl]=\"autoCompleteChipList\" #filterInput />\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Reset button -->\r\n\t<a mat-icon-button trailingIcon *ngIf=\"filterInput.value\" class=\"reset-input\" (click)=\"filterInput.value = ''\">\r\n\t\t<mat-icon>close</mat-icon>\r\n\t</a>\r\n\t<!-- #endregion -->\r\n\r\n\t<!-- #region Progress -->\r\n\t<mat-spinner diameter=\"18\" *ngIf=\"dataSource?.isLoading\"></mat-spinner>\r\n\t<!-- #endregion -->\r\n</mat-chip-list>\r\n\r\n<!-- #region Autocomplete -->\r\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"addChip($event.option.value, filterInput)\" class=\"{{autocompleteCssClass}}{{classType?' table-autocomplete':''}}\">\r\n\t<ng-template *ngIf=\"!classType && opened\" let-item let-first=\"first\" ngFor [ngForOf]=\"dataSource?.items\">\r\n\t\t<mat-option [value]=\"item\">\r\n\t\t\t<span *ngIf=\"!autocompleteOptionTemplate?.templateRef\">{{item}}</span>\r\n\t\t\t<ng-template *ngIf=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutlet]=\"autocompleteOptionTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ option: item }\"></ng-template>\r\n\t\t</mat-option>\r\n\t</ng-template>\r\n\t<ng-container *ngIf=\"classType && opened\">\r\n\t\t<mat-option hide=\"true\"></mat-option>\r\n\t\t<vd-dynamic-table [dataSource]=\"dataSource\" [classType]=\"classType\" (rowClick)=\"addChip($event, filterInput)\" matSort [sortActive]=\"sortActive||'id'\" [sortDirection]=\"sortDirection\"></vd-dynamic-table>\r\n\t</ng-container>\r\n\t<mat-paginator [length]=\"dataSource?.total\" [pageIndex]=\"dataSource?.pageIndex\" [pageSize]=\"dataSource?.pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons=\"true\" hidePageSize=\"true\"></mat-paginator>\r\n</mat-autocomplete>\r\n<!-- #endregion -->", styles: [":host ::ng-deep .mat-chip-list-wrapper{min-height:24px}:host ::ng-deep .mat-chip{display:flex;flex-direction:row;width:100%;padding:0 5px;justify-content:center}:host ::ng-deep .mat-chip.mat-chip-disabled{opacity:.6}:host ::ng-deep .mat-chip .vd-chip-content{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-chip .mat-icon{cursor:pointer}:host ::ng-deep .mat-chip .vd-chip-launch{font-size:18px;position:absolute;right:4px;top:0;cursor:pointer}:host ::ng-deep .mat-chip .vd-chip-launch.removable{right:34px}:host ::ng-deep .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;width:2.2em;height:2.2em;margin-top:-10px}:host ::ng-deep .mat-icon-button .mat-button-wrapper{line-height:20px}:host ::ng-deep .mat-icon-button .mat-button-wrapper .mat-icon{font-size:21px;line-height:21px}::ng-deep .mat-autocomplete-panel{margin-top:9px}::ng-deep .mat-autocomplete-panel .mat-paginator{position:sticky;bottom:0}::ng-deep .mat-autocomplete-panel .mat-paginator .mat-paginator-container{padding:0}::ng-deep .mat-autocomplete-panel .mat-paginator .mat-paginator-container .mat-paginator-range-actions{align-items:baseline}::ng-deep .mat-autocomplete-panel .mat-paginator .mat-paginator-container .mat-paginator-range-actions .mat-paginator-range-label{margin:0 16px 0 24px}::ng-deep .mat-autocomplete-panel.table-autocomplete{max-height:400px}mat-spinner{margin-top:-9px;margin-right:6px}\n"] }]
|
|
14994
15085
|
}], ctorParameters: function () {
|
|
14995
|
-
return [{ type: i0.Injector }, { type: i1.NgControl, decorators: [{
|
|
15086
|
+
return [{ type: i0.Injector }, { type: VdMediaService }, { type: i0.ChangeDetectorRef }, { type: i1.NgControl, decorators: [{
|
|
14996
15087
|
type: Optional
|
|
14997
15088
|
}, {
|
|
14998
15089
|
type: Self
|
|
@@ -15001,9 +15092,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
15001
15092
|
}] }, { type: i1.FormGroupDirective, decorators: [{
|
|
15002
15093
|
type: Optional
|
|
15003
15094
|
}] }, { type: i2.ErrorStateMatcher }, { type: i3$4.FocusMonitor }, { type: i0.ElementRef }];
|
|
15004
|
-
}, propDecorators: {
|
|
15095
|
+
}, propDecorators: { dynamicTable: [{
|
|
15005
15096
|
type: ViewChild,
|
|
15006
|
-
args: [
|
|
15097
|
+
args: [VdDynamicTableComponent, { static: false }]
|
|
15098
|
+
}], classType: [{
|
|
15099
|
+
type: Input
|
|
15100
|
+
}], paginator: [{
|
|
15101
|
+
type: ViewChild,
|
|
15102
|
+
args: [MatPaginator, { static: true }]
|
|
15103
|
+
}], sort: [{
|
|
15104
|
+
type: ViewChild,
|
|
15105
|
+
args: [MatSort, { static: false }]
|
|
15007
15106
|
}], chips: [{
|
|
15008
15107
|
type: Input
|
|
15009
15108
|
}], chipTemplate: [{
|
|
@@ -15012,13 +15111,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
15012
15111
|
}], autocompleteOptionTemplate: [{
|
|
15013
15112
|
type: ContentChild,
|
|
15014
15113
|
args: [VdAutocompleteOptionDirective]
|
|
15114
|
+
}], autocomplete: [{
|
|
15115
|
+
type: ViewChild,
|
|
15116
|
+
args: [MatAutocomplete, { static: false }]
|
|
15117
|
+
}], autocompleteTrigger: [{
|
|
15118
|
+
type: ViewChild,
|
|
15119
|
+
args: [MatAutocompleteTrigger]
|
|
15015
15120
|
}], endpoint: [{
|
|
15016
15121
|
type: Input
|
|
15017
15122
|
}], params: [{
|
|
15018
15123
|
type: Input
|
|
15019
15124
|
}], projection: [{
|
|
15020
15125
|
type: Input
|
|
15021
|
-
}],
|
|
15126
|
+
}], paginated: [{
|
|
15022
15127
|
type: Input
|
|
15023
15128
|
}], context: [{
|
|
15024
15129
|
type: Input
|
|
@@ -15028,15 +15133,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
15028
15133
|
type: Input
|
|
15029
15134
|
}], searchFields: [{
|
|
15030
15135
|
type: Input
|
|
15031
|
-
}], termMinlength: [{
|
|
15032
|
-
type: Input
|
|
15033
|
-
}], limit: [{
|
|
15034
|
-
type: Input
|
|
15035
15136
|
}], removable: [{
|
|
15036
15137
|
type: Input
|
|
15037
15138
|
}], debounce: [{
|
|
15038
|
-
type: Input
|
|
15039
|
-
args: ['debounce']
|
|
15139
|
+
type: Input
|
|
15040
15140
|
}], autocompleteCssClass: [{
|
|
15041
15141
|
type: Input
|
|
15042
15142
|
}], initSelect: [{
|
|
@@ -15052,8 +15152,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
15052
15152
|
type: Input
|
|
15053
15153
|
}], chipFocus: [{
|
|
15054
15154
|
type: Output
|
|
15055
|
-
}], default: [{
|
|
15056
|
-
type: Input
|
|
15057
15155
|
}] } });
|
|
15058
15156
|
|
|
15059
15157
|
const DECLARATIONS$2 = [
|
|
@@ -15068,7 +15166,8 @@ const MATRIAL_DECLARATIONS = [
|
|
|
15068
15166
|
MatInputModule,
|
|
15069
15167
|
MatSelectModule,
|
|
15070
15168
|
MatAutocompleteModule,
|
|
15071
|
-
MatProgressSpinnerModule
|
|
15169
|
+
MatProgressSpinnerModule,
|
|
15170
|
+
MatPaginatorModule
|
|
15072
15171
|
];
|
|
15073
15172
|
class VdChipsModule {
|
|
15074
15173
|
}
|
|
@@ -15077,19 +15176,22 @@ class VdChipsModule {
|
|
|
15077
15176
|
VdAutocompleteOptionDirective,
|
|
15078
15177
|
VdChipDirective], imports: [CommonModule,
|
|
15079
15178
|
FormsModule,
|
|
15080
|
-
ReactiveFormsModule,
|
|
15179
|
+
ReactiveFormsModule,
|
|
15180
|
+
VdTableModule, MatChipsModule,
|
|
15081
15181
|
MatIconModule,
|
|
15082
15182
|
MatButtonModule,
|
|
15083
15183
|
MatInputModule,
|
|
15084
15184
|
MatSelectModule,
|
|
15085
15185
|
MatAutocompleteModule,
|
|
15086
|
-
MatProgressSpinnerModule
|
|
15186
|
+
MatProgressSpinnerModule,
|
|
15187
|
+
MatPaginatorModule], exports: [VdChipsComponent,
|
|
15087
15188
|
VdAutocompleteOptionDirective,
|
|
15088
15189
|
VdChipDirective] });
|
|
15089
15190
|
/** @nocollapse */ VdChipsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipsModule, imports: [[
|
|
15090
15191
|
CommonModule,
|
|
15091
15192
|
FormsModule,
|
|
15092
15193
|
ReactiveFormsModule,
|
|
15194
|
+
VdTableModule,
|
|
15093
15195
|
MATRIAL_DECLARATIONS
|
|
15094
15196
|
]] });
|
|
15095
15197
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipsModule, decorators: [{
|
|
@@ -15099,6 +15201,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
15099
15201
|
CommonModule,
|
|
15100
15202
|
FormsModule,
|
|
15101
15203
|
ReactiveFormsModule,
|
|
15204
|
+
VdTableModule,
|
|
15102
15205
|
MATRIAL_DECLARATIONS
|
|
15103
15206
|
],
|
|
15104
15207
|
declarations: [
|
|
@@ -16201,10 +16304,10 @@ class VdGenericFormComponent {
|
|
|
16201
16304
|
}
|
|
16202
16305
|
}
|
|
16203
16306
|
/** @nocollapse */ VdGenericFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdGenericFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16204
|
-
/** @nocollapse */ VdGenericFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: VdGenericFormComponent, selector: "vd-generic-form", inputs: { formGroup: "formGroup", classType: "classType", fieldGroups: "fieldGroups", groupName: "groupName", context: "context", separatorKeysCodes: "separatorKeysCodes" }, queries: [{ propertyName: "editorTemplate", first: true, predicate: VdEditorDirective, descendants: true }, { propertyName: "codeTemplate", first: true, predicate: VdCodeDirective, descendants: true }, { propertyName: "fileTemplate", first: true, predicate: VdFileDirective, descendants: true }, { propertyName: "customTemplate", first: true, predicate: VdCustomDirective, descendants: true }], ngImport: i0, template: "<div *ngIf=\"formGroup && fieldRows\" [formGroup]=\"formGroup\">\r\n <!-- #region Fields -->\r\n <div layout-gt-sm=\"row\" layout=\"column\" *ngFor=\"let fields of fieldRows\">\r\n <ng-container *ngFor=\"let field of fields\" [ngSwitch]=\"field.type\">\r\n <!-- #region Error handling -->\r\n <ng-template #fieldErrors>\r\n <div *ngFor=\"let errorMessage of formGroup.controls[field.name]['errorMessages']\">{{errorMessage}}</div>\r\n </ng-template>\r\n <!-- #endregion -->\r\n\r\n <ng-container *ngIf=\"!field.hide || !field.hide(formGroup?.value, formGroup, context)\">\r\n <ng-container *ngIf=\"field.wrapped\">\r\n <!-- #region Text input -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Text\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input [type]=\"field.inputType\" [minlength]=\"field.minLength||null\" [maxlength]=\"field.maxLength||null\" matInput [formControlName]=\"field.name\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Textarea -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.TextArea\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <textarea matInput [formControlName]=\"field.name\" rows=\"field.rows||2\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\"></textarea>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Enum -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Enum\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-select [formControlName]=\"field.name\" [enum]=\"field.enumType\" [key]=\"field.optionValue\" [text]=\"field.optionText\" [multiple]=\"field.multiple\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" flex>\r\n <ng-template vd-select-trigger let-trigger=\"trigger\" *ngIf=\"field.triggerTemplate\">\r\n <div [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <div [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region VdSelect -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.VdSelect\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-select [formControlName]=\"field.name\" [endpoint]=\"isFunction(field.endpoint)?field.endpoint(formGroup.value, formGroup, context):field.endpoint\" [params]=\"isFunction(field.params)?field.params(formGroup.value, formGroup, context):(field.params||{})\" [projection]=\"field.projection\" [mapper]=\"field.mapper\" [compareWith]=\"field.compareWith\" [key]=\"field.optionValue\" [text]=\"field.optionText\" [multiple]=\"field.multiple\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" (itemSelected)=\"field.itemSelect && field.itemSelect($event, formGroup?.value, formGroup, context);\" (itemChange)=\"field.itemChange && field.itemChange($event, formGroup?.value, formGroup, context);\" flex>\r\n <ng-template vd-select-trigger let-trigger=\"trigger\" *ngIf=\"field.triggerTemplate\">\r\n <div [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <div [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Chips -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Chips\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <mat-chip-list #chipList [formControlName]=\"field.name\" [disableControl]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-chip *ngFor=\"let chip of formGroup.controls[field.name]?.value\" (removed)=\"removeChip(field, chip)\" color=\"primary\" selectable=\"true\" selected>\r\n <span>{{chip}}</span>\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n <input [placeholder]=\"field.header\" #chipInput [matChipInputFor]=\"chipList\" [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" [matAutocomplete]=\"chipAutocomplete\" (input)=\"filterAutocomplete(field, chipInput)\" (matChipInputTokenEnd)=\"addChip(field, $event)\" autocomplete=\"off\">\r\n </mat-chip-list>\r\n <mat-autocomplete autoActiveFirstOption #chipAutocomplete=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\" (optionSelected)=\"autocompleteValueSelected(field, $event, chipInput)\">\r\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions[field.name]\" [value]=\"option.id\">\r\n {{option.name}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region VdChips -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.VdChips\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-chips #vdChip [formControlName]=\"field.name\" [endpoint]=\"isFunction(field.endpoint)?field.endpoint(formGroup.value, formGroup, context):field.endpoint\" [params]=\"isFunction(field.params)?field.params(formGroup.value, formGroup, context):(field.params||{})\" [searchField]=\"field.searchField\" [projection]=\"field.projection\" [key]=\"field.optionValue\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" [removable]=\"!field.clear\" [context]=\"context\" [suffixButtons]=\"field.suffixButtons\" [autocompleteCssClass]=\"field.autocompleteCssClass\" (initSelect)=\"field.itemSelect && field.itemSelect($event, formGroup?.value, formGroup, context);\" (selected)=\"field.itemChange && field.itemChange($event, formGroup?.value, formGroup, context);\" (cleared)=\"field.clear && field.clear(formGroup?.value, formGroup, context);\" flex>\r\n <ng-template vd-chip let-chip=\"chip\" *ngIf=\"field.chipTemplate\">\r\n <div [outerHTML]=\"field.chipTemplate(chip, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-autocomplete-option let-option=\"option\" *ngIf=\"field.autocompleteTemplate\">\r\n <div [outerHTML]=\"field.autocompleteTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-chips>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-hint *ngIf=\"vdChip.emptyResult\" class=\"tc-red-400\" i18n=\"@@noResultsFound\">No results were found.</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Select -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Select\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <mat-select [formControlName]=\"field.name\" [multiple]=\"field.multiple\" flex>\r\n <mat-option *ngFor=\"let option of field.options\" [value]=\"option.id\">{{option.name}}</mat-option>\r\n </mat-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Autocomplete -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Autocomplete\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input type=\"text\" matInput [formControlName]=\"field.name\" [matAutocomplete]=\"auto\" #autocompleteInput (input)=\"filterAutocomplete(field, autocompleteInput)\" autocomplete=\"off\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\">\r\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions[field.name]\" [value]=\"option.id\">\r\n {{option.name}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Date -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Date\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input matInput [formControlName]=\"field.name\" autocomplete=\"off\" [matDatepicker]=\"datePicker\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\r\n <mat-datepicker #datePicker></mat-datepicker>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n </ng-container>\r\n\r\n <!-- #region Checkbox -->\r\n <div *ngSwitchCase=\"FormFieldType.Checkbox\" layout-margin appearance=\"outline\" class=\"pad-bottom-xs\">\r\n <mat-checkbox [formControlName]=\"field.name\" [disableControl]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">{{field.header}}</mat-checkbox>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Editor -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Editor\">\r\n <ng-template *ngIf=\"editorTemplate?.templateRef\" [ngTemplateOutlet]=\"editorTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Code -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Code\">\r\n <ng-template *ngIf=\"codeTemplate?.templateRef\" [ngTemplateOutlet]=\"codeTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region File -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.File\">\r\n <ng-template *ngIf=\"fileTemplate?.templateRef\" [ngTemplateOutlet]=\"fileTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Custom -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Custom\">\r\n <ng-template *ngIf=\"customTemplate?.templateRef\" [ngTemplateOutlet]=\"customTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <!-- #endregion -->\r\n</div>", styles: [""], components: [{ type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: VdSelectComponent, selector: "vd-select", inputs: ["multiple", "disabled", "sorted", "textPrefix", "endpoint", "params", "projection", "enum", "key", "text", "prefix", "options", "filteredOptions", "filterable", "cache", "sortBy", "mapper", "compareWith", "searchField"], outputs: ["change", "itemChange", "selected", "itemSelected", "launch"] }, { type: i4$5.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i8$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: VdChipsComponent, selector: "vd-chips", inputs: ["chips", "endpoint", "params", "projection", "path", "context", "key", "searchField", "searchFields", "termMinlength", "limit", "removable", "debounce", "autocompleteCssClass", "suffixButtons", "default"], outputs: ["initSelect", "selected", "cleared", "launch", "chipFocus"] }, { type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i9.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i9.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: MatFormFieldReadonlyDirective, selector: "mat-form-field" }, { type: i1$5.MatLabel, selector: "mat-label" }, { type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i1$5.MatError, selector: "mat-error", inputs: ["id"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: VdSelectTriggerDirective, selector: "[vd-select-trigger]ng-template" }, { type: VdSelectOptionDirective, selector: "[vd-select-option]ng-template" }, { type: DisableControlDirective, selector: "[disableControl]", inputs: ["disableControl"] }, { type: i4$5.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i4$5.MatChipRemove, selector: "[matChipRemove]" }, { type: i4$5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i8$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: VdChipDirective, selector: "[vd-chip]ng-template" }, { type: VdAutocompleteOptionDirective, selector: "[vd-autocomplete-option]ng-template" }, { type: i9.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { type: i1$5.MatSuffix, selector: "[matSuffix]" }] });
|
|
16307
|
+
/** @nocollapse */ VdGenericFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: VdGenericFormComponent, selector: "vd-generic-form", inputs: { formGroup: "formGroup", classType: "classType", fieldGroups: "fieldGroups", groupName: "groupName", context: "context", separatorKeysCodes: "separatorKeysCodes" }, queries: [{ propertyName: "editorTemplate", first: true, predicate: VdEditorDirective, descendants: true }, { propertyName: "codeTemplate", first: true, predicate: VdCodeDirective, descendants: true }, { propertyName: "fileTemplate", first: true, predicate: VdFileDirective, descendants: true }, { propertyName: "customTemplate", first: true, predicate: VdCustomDirective, descendants: true }], ngImport: i0, template: "<div *ngIf=\"formGroup && fieldRows\" [formGroup]=\"formGroup\">\r\n <!-- #region Fields -->\r\n <div layout-gt-sm=\"row\" layout=\"column\" *ngFor=\"let fields of fieldRows\">\r\n <ng-container *ngFor=\"let field of fields\" [ngSwitch]=\"field.type\">\r\n <!-- #region Error handling -->\r\n <ng-template #fieldErrors>\r\n <div *ngFor=\"let errorMessage of formGroup.controls[field.name]['errorMessages']\">{{errorMessage}}</div>\r\n </ng-template>\r\n <!-- #endregion -->\r\n\r\n <ng-container *ngIf=\"!field.hide || !field.hide(formGroup?.value, formGroup, context)\">\r\n <ng-container *ngIf=\"field.wrapped\">\r\n <!-- #region Text input -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Text\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input [type]=\"field.inputType\" [minlength]=\"field.minLength||null\" [maxlength]=\"field.maxLength||null\" matInput [formControlName]=\"field.name\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Textarea -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.TextArea\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <textarea matInput [formControlName]=\"field.name\" rows=\"field.rows||2\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\"></textarea>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Enum -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Enum\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-select [formControlName]=\"field.name\" [enum]=\"field.enumType\" [key]=\"field.optionValue\" [text]=\"field.optionText\" [multiple]=\"field.multiple\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" flex>\r\n <ng-template vd-select-trigger let-trigger=\"trigger\" *ngIf=\"field.triggerTemplate\">\r\n <div [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <div [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region VdSelect -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.VdSelect\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-select [formControlName]=\"field.name\" [endpoint]=\"isFunction(field.endpoint)?field.endpoint(formGroup.value, formGroup, context):field.endpoint\" [params]=\"isFunction(field.params)?field.params(formGroup.value, formGroup, context):(field.params||{})\" [projection]=\"field.projection\" [mapper]=\"field.mapper\" [compareWith]=\"field.compareWith\" [key]=\"field.optionValue\" [text]=\"field.optionText\" [multiple]=\"field.multiple\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" (itemSelected)=\"field.itemSelect && field.itemSelect($event, formGroup?.value, formGroup, context);\" (itemChange)=\"field.itemChange && field.itemChange($event, formGroup?.value, formGroup, context);\" flex>\r\n <ng-template vd-select-trigger let-trigger=\"trigger\" *ngIf=\"field.triggerTemplate\">\r\n <div [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <div [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Chips -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Chips\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <mat-chip-list #chipList [formControlName]=\"field.name\" [disableControl]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-chip *ngFor=\"let chip of formGroup.controls[field.name]?.value\" (removed)=\"removeChip(field, chip)\" color=\"primary\" selectable=\"true\" selected>\r\n <span>{{chip}}</span>\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n <input [placeholder]=\"field.header\" #chipInput [matChipInputFor]=\"chipList\" [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" [matAutocomplete]=\"chipAutocomplete\" (input)=\"filterAutocomplete(field, chipInput)\" (matChipInputTokenEnd)=\"addChip(field, $event)\" autocomplete=\"off\">\r\n </mat-chip-list>\r\n <mat-autocomplete autoActiveFirstOption #chipAutocomplete=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\" (optionSelected)=\"autocompleteValueSelected(field, $event, chipInput)\">\r\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions[field.name]\" [value]=\"option.id\">\r\n {{option.name}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region VdChips -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.VdChips\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-chips #vdChip [formControlName]=\"field.name\" [endpoint]=\"isFunction(field.endpoint)?field.endpoint(formGroup.value, formGroup, context):field.endpoint\" [params]=\"isFunction(field.params)?field.params(formGroup.value, formGroup, context):(field.params||{})\" [searchField]=\"field.searchField\" [classType]=\"field.classType\" [projection]=\"field.projection\" [key]=\"field.optionValue\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" [removable]=\"!field.clear\" [context]=\"context\" [suffixButtons]=\"field.suffixButtons\" [autocompleteCssClass]=\"field.autocompleteCssClass\" (initSelect)=\"field.itemSelect && field.itemSelect($event, formGroup?.value, formGroup, context);\" (selected)=\"field.itemChange && field.itemChange($event, formGroup?.value, formGroup, context);\" (cleared)=\"field.clear && field.clear(formGroup?.value, formGroup, context);\" flex>\r\n <ng-template vd-chip let-chip=\"chip\" *ngIf=\"field.chipTemplate\">\r\n <div [outerHTML]=\"field.chipTemplate(chip, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-autocomplete-option let-option=\"option\" *ngIf=\"field.autocompleteTemplate\">\r\n <div [outerHTML]=\"field.autocompleteTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-chips>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-hint *ngIf=\"vdChip.emptyResult\" class=\"tc-red-400\" i18n=\"@@noResultsFound\">No results were found.</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Select -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Select\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <mat-select [formControlName]=\"field.name\" [multiple]=\"field.multiple\" flex>\r\n <mat-option *ngFor=\"let option of field.options\" [value]=\"option.id\">{{option.name}}</mat-option>\r\n </mat-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Autocomplete -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Autocomplete\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input type=\"text\" matInput [formControlName]=\"field.name\" [matAutocomplete]=\"auto\" #autocompleteInput (input)=\"filterAutocomplete(field, autocompleteInput)\" autocomplete=\"off\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\">\r\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions[field.name]\" [value]=\"option.id\">\r\n {{option.name}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Date -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Date\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input matInput [formControlName]=\"field.name\" autocomplete=\"off\" [matDatepicker]=\"datePicker\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\r\n <mat-datepicker #datePicker></mat-datepicker>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n </ng-container>\r\n\r\n <!-- #region Checkbox -->\r\n <div *ngSwitchCase=\"FormFieldType.Checkbox\" layout-margin appearance=\"outline\" class=\"pad-bottom-xs\">\r\n <mat-checkbox [formControlName]=\"field.name\" [disableControl]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">{{field.header}}</mat-checkbox>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Editor -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Editor\">\r\n <ng-template *ngIf=\"editorTemplate?.templateRef\" [ngTemplateOutlet]=\"editorTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Code -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Code\">\r\n <ng-template *ngIf=\"codeTemplate?.templateRef\" [ngTemplateOutlet]=\"codeTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region File -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.File\">\r\n <ng-template *ngIf=\"fileTemplate?.templateRef\" [ngTemplateOutlet]=\"fileTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Custom -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Custom\">\r\n <ng-template *ngIf=\"customTemplate?.templateRef\" [ngTemplateOutlet]=\"customTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <!-- #endregion -->\r\n</div>", styles: [""], components: [{ type: i1$5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: VdSelectComponent, selector: "vd-select", inputs: ["multiple", "disabled", "sorted", "textPrefix", "endpoint", "params", "projection", "enum", "key", "text", "prefix", "options", "filteredOptions", "filterable", "cache", "sortBy", "mapper", "compareWith", "searchField"], outputs: ["change", "itemChange", "selected", "itemSelected", "launch"] }, { type: i5$2.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i9$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: VdChipsComponent, selector: "vd-chips", inputs: ["classType", "chips", "endpoint", "params", "projection", "paginated", "context", "key", "searchField", "searchFields", "removable", "debounce", "autocompleteCssClass", "suffixButtons"], outputs: ["initSelect", "selected", "cleared", "launch", "chipFocus"] }, { type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i9.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i9.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: MatFormFieldReadonlyDirective, selector: "mat-form-field" }, { type: i1$5.MatLabel, selector: "mat-label" }, { type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i1$5.MatError, selector: "mat-error", inputs: ["id"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: VdSelectTriggerDirective, selector: "[vd-select-trigger]ng-template" }, { type: VdSelectOptionDirective, selector: "[vd-select-option]ng-template" }, { type: DisableControlDirective, selector: "[disableControl]", inputs: ["disableControl"] }, { type: i5$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i5$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i9$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: VdChipDirective, selector: "[vd-chip]ng-template" }, { type: VdAutocompleteOptionDirective, selector: "[vd-autocomplete-option]ng-template" }, { type: i9.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { type: i1$5.MatSuffix, selector: "[matSuffix]" }] });
|
|
16205
16308
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdGenericFormComponent, decorators: [{
|
|
16206
16309
|
type: Component,
|
|
16207
|
-
args: [{ selector: 'vd-generic-form', template: "<div *ngIf=\"formGroup && fieldRows\" [formGroup]=\"formGroup\">\r\n <!-- #region Fields -->\r\n <div layout-gt-sm=\"row\" layout=\"column\" *ngFor=\"let fields of fieldRows\">\r\n <ng-container *ngFor=\"let field of fields\" [ngSwitch]=\"field.type\">\r\n <!-- #region Error handling -->\r\n <ng-template #fieldErrors>\r\n <div *ngFor=\"let errorMessage of formGroup.controls[field.name]['errorMessages']\">{{errorMessage}}</div>\r\n </ng-template>\r\n <!-- #endregion -->\r\n\r\n <ng-container *ngIf=\"!field.hide || !field.hide(formGroup?.value, formGroup, context)\">\r\n <ng-container *ngIf=\"field.wrapped\">\r\n <!-- #region Text input -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Text\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input [type]=\"field.inputType\" [minlength]=\"field.minLength||null\" [maxlength]=\"field.maxLength||null\" matInput [formControlName]=\"field.name\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Textarea -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.TextArea\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <textarea matInput [formControlName]=\"field.name\" rows=\"field.rows||2\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\"></textarea>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Enum -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Enum\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-select [formControlName]=\"field.name\" [enum]=\"field.enumType\" [key]=\"field.optionValue\" [text]=\"field.optionText\" [multiple]=\"field.multiple\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" flex>\r\n <ng-template vd-select-trigger let-trigger=\"trigger\" *ngIf=\"field.triggerTemplate\">\r\n <div [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <div [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region VdSelect -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.VdSelect\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-select [formControlName]=\"field.name\" [endpoint]=\"isFunction(field.endpoint)?field.endpoint(formGroup.value, formGroup, context):field.endpoint\" [params]=\"isFunction(field.params)?field.params(formGroup.value, formGroup, context):(field.params||{})\" [projection]=\"field.projection\" [mapper]=\"field.mapper\" [compareWith]=\"field.compareWith\" [key]=\"field.optionValue\" [text]=\"field.optionText\" [multiple]=\"field.multiple\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" (itemSelected)=\"field.itemSelect && field.itemSelect($event, formGroup?.value, formGroup, context);\" (itemChange)=\"field.itemChange && field.itemChange($event, formGroup?.value, formGroup, context);\" flex>\r\n <ng-template vd-select-trigger let-trigger=\"trigger\" *ngIf=\"field.triggerTemplate\">\r\n <div [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <div [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Chips -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Chips\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <mat-chip-list #chipList [formControlName]=\"field.name\" [disableControl]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-chip *ngFor=\"let chip of formGroup.controls[field.name]?.value\" (removed)=\"removeChip(field, chip)\" color=\"primary\" selectable=\"true\" selected>\r\n <span>{{chip}}</span>\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n <input [placeholder]=\"field.header\" #chipInput [matChipInputFor]=\"chipList\" [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" [matAutocomplete]=\"chipAutocomplete\" (input)=\"filterAutocomplete(field, chipInput)\" (matChipInputTokenEnd)=\"addChip(field, $event)\" autocomplete=\"off\">\r\n </mat-chip-list>\r\n <mat-autocomplete autoActiveFirstOption #chipAutocomplete=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\" (optionSelected)=\"autocompleteValueSelected(field, $event, chipInput)\">\r\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions[field.name]\" [value]=\"option.id\">\r\n {{option.name}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region VdChips -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.VdChips\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-chips #vdChip [formControlName]=\"field.name\" [endpoint]=\"isFunction(field.endpoint)?field.endpoint(formGroup.value, formGroup, context):field.endpoint\" [params]=\"isFunction(field.params)?field.params(formGroup.value, formGroup, context):(field.params||{})\" [searchField]=\"field.searchField\" [projection]=\"field.projection\" [key]=\"field.optionValue\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" [removable]=\"!field.clear\" [context]=\"context\" [suffixButtons]=\"field.suffixButtons\" [autocompleteCssClass]=\"field.autocompleteCssClass\" (initSelect)=\"field.itemSelect && field.itemSelect($event, formGroup?.value, formGroup, context);\" (selected)=\"field.itemChange && field.itemChange($event, formGroup?.value, formGroup, context);\" (cleared)=\"field.clear && field.clear(formGroup?.value, formGroup, context);\" flex>\r\n <ng-template vd-chip let-chip=\"chip\" *ngIf=\"field.chipTemplate\">\r\n <div [outerHTML]=\"field.chipTemplate(chip, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-autocomplete-option let-option=\"option\" *ngIf=\"field.autocompleteTemplate\">\r\n <div [outerHTML]=\"field.autocompleteTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-chips>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-hint *ngIf=\"vdChip.emptyResult\" class=\"tc-red-400\" i18n=\"@@noResultsFound\">No results were found.</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Select -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Select\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <mat-select [formControlName]=\"field.name\" [multiple]=\"field.multiple\" flex>\r\n <mat-option *ngFor=\"let option of field.options\" [value]=\"option.id\">{{option.name}}</mat-option>\r\n </mat-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Autocomplete -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Autocomplete\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input type=\"text\" matInput [formControlName]=\"field.name\" [matAutocomplete]=\"auto\" #autocompleteInput (input)=\"filterAutocomplete(field, autocompleteInput)\" autocomplete=\"off\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\">\r\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions[field.name]\" [value]=\"option.id\">\r\n {{option.name}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Date -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Date\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input matInput [formControlName]=\"field.name\" autocomplete=\"off\" [matDatepicker]=\"datePicker\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\r\n <mat-datepicker #datePicker></mat-datepicker>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n </ng-container>\r\n\r\n <!-- #region Checkbox -->\r\n <div *ngSwitchCase=\"FormFieldType.Checkbox\" layout-margin appearance=\"outline\" class=\"pad-bottom-xs\">\r\n <mat-checkbox [formControlName]=\"field.name\" [disableControl]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">{{field.header}}</mat-checkbox>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Editor -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Editor\">\r\n <ng-template *ngIf=\"editorTemplate?.templateRef\" [ngTemplateOutlet]=\"editorTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Code -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Code\">\r\n <ng-template *ngIf=\"codeTemplate?.templateRef\" [ngTemplateOutlet]=\"codeTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region File -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.File\">\r\n <ng-template *ngIf=\"fileTemplate?.templateRef\" [ngTemplateOutlet]=\"fileTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Custom -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Custom\">\r\n <ng-template *ngIf=\"customTemplate?.templateRef\" [ngTemplateOutlet]=\"customTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <!-- #endregion -->\r\n</div>", styles: [""] }]
|
|
16310
|
+
args: [{ selector: 'vd-generic-form', template: "<div *ngIf=\"formGroup && fieldRows\" [formGroup]=\"formGroup\">\r\n <!-- #region Fields -->\r\n <div layout-gt-sm=\"row\" layout=\"column\" *ngFor=\"let fields of fieldRows\">\r\n <ng-container *ngFor=\"let field of fields\" [ngSwitch]=\"field.type\">\r\n <!-- #region Error handling -->\r\n <ng-template #fieldErrors>\r\n <div *ngFor=\"let errorMessage of formGroup.controls[field.name]['errorMessages']\">{{errorMessage}}</div>\r\n </ng-template>\r\n <!-- #endregion -->\r\n\r\n <ng-container *ngIf=\"!field.hide || !field.hide(formGroup?.value, formGroup, context)\">\r\n <ng-container *ngIf=\"field.wrapped\">\r\n <!-- #region Text input -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Text\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input [type]=\"field.inputType\" [minlength]=\"field.minLength||null\" [maxlength]=\"field.maxLength||null\" matInput [formControlName]=\"field.name\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Textarea -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.TextArea\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <textarea matInput [formControlName]=\"field.name\" rows=\"field.rows||2\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\"></textarea>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Enum -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Enum\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-select [formControlName]=\"field.name\" [enum]=\"field.enumType\" [key]=\"field.optionValue\" [text]=\"field.optionText\" [multiple]=\"field.multiple\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" flex>\r\n <ng-template vd-select-trigger let-trigger=\"trigger\" *ngIf=\"field.triggerTemplate\">\r\n <div [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <div [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region VdSelect -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.VdSelect\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-select [formControlName]=\"field.name\" [endpoint]=\"isFunction(field.endpoint)?field.endpoint(formGroup.value, formGroup, context):field.endpoint\" [params]=\"isFunction(field.params)?field.params(formGroup.value, formGroup, context):(field.params||{})\" [projection]=\"field.projection\" [mapper]=\"field.mapper\" [compareWith]=\"field.compareWith\" [key]=\"field.optionValue\" [text]=\"field.optionText\" [multiple]=\"field.multiple\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" (itemSelected)=\"field.itemSelect && field.itemSelect($event, formGroup?.value, formGroup, context);\" (itemChange)=\"field.itemChange && field.itemChange($event, formGroup?.value, formGroup, context);\" flex>\r\n <ng-template vd-select-trigger let-trigger=\"trigger\" *ngIf=\"field.triggerTemplate\">\r\n <div [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <div [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Chips -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Chips\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <mat-chip-list #chipList [formControlName]=\"field.name\" [disableControl]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-chip *ngFor=\"let chip of formGroup.controls[field.name]?.value\" (removed)=\"removeChip(field, chip)\" color=\"primary\" selectable=\"true\" selected>\r\n <span>{{chip}}</span>\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n <input [placeholder]=\"field.header\" #chipInput [matChipInputFor]=\"chipList\" [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" [matAutocomplete]=\"chipAutocomplete\" (input)=\"filterAutocomplete(field, chipInput)\" (matChipInputTokenEnd)=\"addChip(field, $event)\" autocomplete=\"off\">\r\n </mat-chip-list>\r\n <mat-autocomplete autoActiveFirstOption #chipAutocomplete=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\" (optionSelected)=\"autocompleteValueSelected(field, $event, chipInput)\">\r\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions[field.name]\" [value]=\"option.id\">\r\n {{option.name}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region VdChips -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.VdChips\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <vd-chips #vdChip [formControlName]=\"field.name\" [endpoint]=\"isFunction(field.endpoint)?field.endpoint(formGroup.value, formGroup, context):field.endpoint\" [params]=\"isFunction(field.params)?field.params(formGroup.value, formGroup, context):(field.params||{})\" [searchField]=\"field.searchField\" [classType]=\"field.classType\" [projection]=\"field.projection\" [key]=\"field.optionValue\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\" [removable]=\"!field.clear\" [context]=\"context\" [suffixButtons]=\"field.suffixButtons\" [autocompleteCssClass]=\"field.autocompleteCssClass\" (initSelect)=\"field.itemSelect && field.itemSelect($event, formGroup?.value, formGroup, context);\" (selected)=\"field.itemChange && field.itemChange($event, formGroup?.value, formGroup, context);\" (cleared)=\"field.clear && field.clear(formGroup?.value, formGroup, context);\" flex>\r\n <ng-template vd-chip let-chip=\"chip\" *ngIf=\"field.chipTemplate\">\r\n <div [outerHTML]=\"field.chipTemplate(chip, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n <ng-template vd-autocomplete-option let-option=\"option\" *ngIf=\"field.autocompleteTemplate\">\r\n <div [outerHTML]=\"field.autocompleteTemplate(option, formGroup.value, formGroup, context)\"></div>\r\n </ng-template>\r\n </vd-chips>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-hint *ngIf=\"vdChip.emptyResult\" class=\"tc-red-400\" i18n=\"@@noResultsFound\">No results were found.</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Select -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Select\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <mat-select [formControlName]=\"field.name\" [multiple]=\"field.multiple\" flex>\r\n <mat-option *ngFor=\"let option of field.options\" [value]=\"option.id\">{{option.name}}</mat-option>\r\n </mat-select>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Autocomplete -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Autocomplete\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input type=\"text\" matInput [formControlName]=\"field.name\" [matAutocomplete]=\"auto\" #autocompleteInput (input)=\"filterAutocomplete(field, autocompleteInput)\" autocomplete=\"off\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\" [class]=\"field.autocompleteCssClass\">\r\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions[field.name]\" [value]=\"option.id\">\r\n {{option.name}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Date -->\r\n <mat-form-field *ngSwitchCase=\"FormFieldType.Date\" [attr.flex]=\"field.flex||0\" [class]=\"field.cssClass\" layout-margin appearance=\"outline\">\r\n <mat-label>{{field.header}}</mat-label>\r\n <input matInput [formControlName]=\"field.name\" autocomplete=\"off\" [matDatepicker]=\"datePicker\" [readonly]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">\r\n <mat-datepicker-toggle matSuffix [for]=\"datePicker\"></mat-datepicker-toggle>\r\n <mat-datepicker #datePicker></mat-datepicker>\r\n <mat-hint *ngIf=\"field.hint\">{{field.hint}}</mat-hint>\r\n <mat-error>\r\n <ng-container *ngTemplateOutlet=\"fieldErrors\"></ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <!-- #endregion -->\r\n </ng-container>\r\n\r\n <!-- #region Checkbox -->\r\n <div *ngSwitchCase=\"FormFieldType.Checkbox\" layout-margin appearance=\"outline\" class=\"pad-bottom-xs\">\r\n <mat-checkbox [formControlName]=\"field.name\" [disableControl]=\"field.readonly && field.readonly(formGroup?.value, formGroup, context)\">{{field.header}}</mat-checkbox>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Editor -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Editor\">\r\n <ng-template *ngIf=\"editorTemplate?.templateRef\" [ngTemplateOutlet]=\"editorTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Code -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Code\">\r\n <ng-template *ngIf=\"codeTemplate?.templateRef\" [ngTemplateOutlet]=\"codeTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region File -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.File\">\r\n <ng-template *ngIf=\"fileTemplate?.templateRef\" [ngTemplateOutlet]=\"fileTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Custom -->\r\n <ng-container *ngSwitchCase=\"FormFieldType.Custom\">\r\n <ng-template *ngIf=\"customTemplate?.templateRef\" [ngTemplateOutlet]=\"customTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ field: field, formGroup: formGroup }\"></ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <!-- #endregion -->\r\n</div>", styles: [""] }]
|
|
16208
16311
|
}], propDecorators: { formGroup: [{
|
|
16209
16312
|
type: Input
|
|
16210
16313
|
}], classType: [{
|
|
@@ -16371,7 +16474,7 @@ class MatFormFieldEditorDirective extends _EditorInputMixinBase {
|
|
|
16371
16474
|
}
|
|
16372
16475
|
}
|
|
16373
16476
|
}
|
|
16374
|
-
/** @nocollapse */ MatFormFieldEditorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatFormFieldEditorDirective, deps: [{ token: i0.ElementRef }, { token: i1.NgControl, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i1.FormGroupDirective, optional: true }, { token: i2.ErrorStateMatcher }, { token: NG_VALUE_ACCESSOR, self: true }, { token: i3$5.Platform }, { token: i4$
|
|
16477
|
+
/** @nocollapse */ MatFormFieldEditorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatFormFieldEditorDirective, deps: [{ token: i0.ElementRef }, { token: i1.NgControl, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i1.FormGroupDirective, optional: true }, { token: i2.ErrorStateMatcher }, { token: NG_VALUE_ACCESSOR, self: true }, { token: i3$5.Platform }, { token: i4$5.AutofillMonitor }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
16375
16478
|
/** @nocollapse */ MatFormFieldEditorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: MatFormFieldEditorDirective, selector: "[tinyMatFormControl]", inputs: { disabled: "disabled", id: "id", placeholder: "placeholder", required: "required", value: "value", errorStateMatcher: "errorStateMatcher" }, outputs: { editorChange: "editorChange" }, host: { listeners: { "onInit": "onEditorInit($event)" }, properties: { "attr.id": "id", "attr.aria-describedby": "ariaDescribedby || null", "attr.aria-invalid": "errorState", "attr.aria-required": "required.toString()" } }, providers: [{ provide: MatFormFieldControl, useExisting: MatFormFieldEditorDirective }], usesInheritance: true, ngImport: i0 });
|
|
16376
16479
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatFormFieldEditorDirective, decorators: [{
|
|
16377
16480
|
type: Directive,
|
|
@@ -16394,12 +16497,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
16394
16497
|
type: Optional
|
|
16395
16498
|
}] }, { type: i1.FormGroupDirective, decorators: [{
|
|
16396
16499
|
type: Optional
|
|
16397
|
-
}] }, { type: i2.ErrorStateMatcher }, { type: i5$
|
|
16500
|
+
}] }, { type: i2.ErrorStateMatcher }, { type: i5$3.EditorComponent, decorators: [{
|
|
16398
16501
|
type: Self
|
|
16399
16502
|
}, {
|
|
16400
16503
|
type: Inject,
|
|
16401
16504
|
args: [NG_VALUE_ACCESSOR]
|
|
16402
|
-
}] }, { type: i3$5.Platform }, { type: i4$
|
|
16505
|
+
}] }, { type: i3$5.Platform }, { type: i4$5.AutofillMonitor }, { type: i0.NgZone }];
|
|
16403
16506
|
}, propDecorators: { disabled: [{
|
|
16404
16507
|
type: Input
|
|
16405
16508
|
}], id: [{
|