@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/fesm2020/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 {
|
|
@@ -714,6 +714,20 @@ class Utils {
|
|
|
714
714
|
catch (error) { }
|
|
715
715
|
return obj;
|
|
716
716
|
}
|
|
717
|
+
/**
|
|
718
|
+
* Checks if the specified objects are equal
|
|
719
|
+
* @param obj1
|
|
720
|
+
* @param obj2
|
|
721
|
+
* @returns
|
|
722
|
+
*/
|
|
723
|
+
static equals(obj1, obj2) {
|
|
724
|
+
try {
|
|
725
|
+
return JSON.stringify(obj1) === JSON.stringify(obj2);
|
|
726
|
+
}
|
|
727
|
+
catch (error) {
|
|
728
|
+
return false;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
717
731
|
/**
|
|
718
732
|
* Gets the query params and the hash from the specified url
|
|
719
733
|
* @param url
|
|
@@ -2998,6 +3012,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
2998
3012
|
}] } });
|
|
2999
3013
|
|
|
3000
3014
|
class VdLayoutNavListComponent {
|
|
3015
|
+
/**
|
|
3016
|
+
* constructor
|
|
3017
|
+
* @param _router
|
|
3018
|
+
*/
|
|
3001
3019
|
constructor(_router) {
|
|
3002
3020
|
this._router = _router;
|
|
3003
3021
|
/**
|
|
@@ -3013,8 +3031,6 @@ class VdLayoutNavListComponent {
|
|
|
3013
3031
|
* The mode or styling of the sidenav.
|
|
3014
3032
|
* Defaults to "side".
|
|
3015
3033
|
* See "MatSidenav" documentation for more info.
|
|
3016
|
-
*
|
|
3017
|
-
* https://github.com/angular/material2/tree/master/src/lib/sidenav
|
|
3018
3034
|
*/
|
|
3019
3035
|
this.mode = 'side';
|
|
3020
3036
|
/**
|
|
@@ -3023,8 +3039,6 @@ class VdLayoutNavListComponent {
|
|
|
3023
3039
|
* Defaults to "true".
|
|
3024
3040
|
*
|
|
3025
3041
|
* See "MatSidenav" documentation for more info.
|
|
3026
|
-
*
|
|
3027
|
-
* https://github.com/angular/material2/tree/master/src/lib/sidenav
|
|
3028
3042
|
*/
|
|
3029
3043
|
this.opened = true;
|
|
3030
3044
|
/**
|
|
@@ -3032,8 +3046,6 @@ class VdLayoutNavListComponent {
|
|
|
3032
3046
|
*
|
|
3033
3047
|
* Sets the "width" of the sidenav in either "px" or "%"
|
|
3034
3048
|
* Defaults to "350px".
|
|
3035
|
-
*
|
|
3036
|
-
* https://github.com/angular/material2/tree/master/src/lib/sidenav
|
|
3037
3049
|
*/
|
|
3038
3050
|
this.sidenavWidth = '350px';
|
|
3039
3051
|
}
|
|
@@ -3041,15 +3053,14 @@ class VdLayoutNavListComponent {
|
|
|
3041
3053
|
* Checks if `ESC` should close the sidenav
|
|
3042
3054
|
* Should only close it for `push` and `over` modes
|
|
3043
3055
|
*/
|
|
3044
|
-
get disableClose() {
|
|
3045
|
-
return this.mode === 'side';
|
|
3046
|
-
}
|
|
3056
|
+
get disableClose() { return this.mode === 'side'; }
|
|
3047
3057
|
/**
|
|
3048
3058
|
* Checks if router was injected.
|
|
3049
3059
|
*/
|
|
3050
|
-
get routerEnabled() {
|
|
3051
|
-
|
|
3052
|
-
|
|
3060
|
+
get routerEnabled() { return !!this._router && !!this.navigationRoute; }
|
|
3061
|
+
/**
|
|
3062
|
+
* Handles navigation click
|
|
3063
|
+
*/
|
|
3053
3064
|
handleNavigationClick() {
|
|
3054
3065
|
if (this.routerEnabled) {
|
|
3055
3066
|
this._router.navigateByUrl(this.navigationRoute);
|
|
@@ -3075,48 +3086,50 @@ class VdLayoutNavListComponent {
|
|
|
3075
3086
|
}
|
|
3076
3087
|
}
|
|
3077
3088
|
/** @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 });
|
|
3078
|
-
/** @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\"
|
|
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<!-- #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]" }] });
|
|
3079
3090
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdLayoutNavListComponent, decorators: [{
|
|
3080
3091
|
type: Component,
|
|
3081
|
-
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\"
|
|
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<!-- #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"] }]
|
|
3082
3093
|
}], ctorParameters: function () { return [{ type: i1$3.Router, decorators: [{
|
|
3083
3094
|
type: Optional
|
|
3084
3095
|
}] }]; }, propDecorators: { sidenav: [{
|
|
3085
3096
|
type: ViewChild,
|
|
3086
3097
|
args: [MatSidenav, { static: true }]
|
|
3087
3098
|
}], toolbarTitle: [{
|
|
3088
|
-
type: Input
|
|
3089
|
-
args: ['toolbarTitle']
|
|
3099
|
+
type: Input
|
|
3090
3100
|
}], icon: [{
|
|
3091
|
-
type: Input
|
|
3092
|
-
args: ['icon']
|
|
3101
|
+
type: Input
|
|
3093
3102
|
}], logo: [{
|
|
3094
|
-
type: Input
|
|
3095
|
-
args: ['logo']
|
|
3103
|
+
type: Input
|
|
3096
3104
|
}], color: [{
|
|
3097
|
-
type: Input
|
|
3098
|
-
args: ['color']
|
|
3105
|
+
type: Input
|
|
3099
3106
|
}], mode: [{
|
|
3100
|
-
type: Input
|
|
3101
|
-
args: ['mode']
|
|
3107
|
+
type: Input
|
|
3102
3108
|
}], opened: [{
|
|
3103
|
-
type: Input
|
|
3104
|
-
args: ['opened']
|
|
3109
|
+
type: Input
|
|
3105
3110
|
}], sidenavWidth: [{
|
|
3106
|
-
type: Input
|
|
3107
|
-
args: ['sidenavWidth']
|
|
3111
|
+
type: Input
|
|
3108
3112
|
}], navigationRoute: [{
|
|
3109
|
-
type: Input
|
|
3110
|
-
args: ['navigationRoute']
|
|
3113
|
+
type: Input
|
|
3111
3114
|
}] } });
|
|
3112
3115
|
|
|
3113
3116
|
class VdLayoutNavListToggleDirective extends LayoutToggle {
|
|
3117
|
+
/**
|
|
3118
|
+
* Constructor
|
|
3119
|
+
* @param layout
|
|
3120
|
+
* @param renderer
|
|
3121
|
+
* @param elementRef
|
|
3122
|
+
*/
|
|
3114
3123
|
constructor(layout, renderer, elementRef) {
|
|
3115
3124
|
super(layout, renderer, elementRef);
|
|
3116
3125
|
}
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3126
|
+
/**
|
|
3127
|
+
* Disables the navbar
|
|
3128
|
+
*/
|
|
3129
|
+
set vdLayoutNavListToggle(vdLayoutNavListToggle) { this.disabled = !(vdLayoutNavListToggle === '' || vdLayoutNavListToggle); }
|
|
3130
|
+
/**
|
|
3131
|
+
* Opens the navbar
|
|
3132
|
+
*/
|
|
3120
3133
|
onClick() {
|
|
3121
3134
|
this._layout.toggle();
|
|
3122
3135
|
}
|
|
@@ -3125,9 +3138,7 @@ class VdLayoutNavListToggleDirective extends LayoutToggle {
|
|
|
3125
3138
|
/** @nocollapse */ VdLayoutNavListToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: VdLayoutNavListToggleDirective, selector: "[vdLayoutNavListToggle]", inputs: { vdLayoutNavListToggle: "vdLayoutNavListToggle" }, usesInheritance: true, ngImport: i0 });
|
|
3126
3139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdLayoutNavListToggleDirective, decorators: [{
|
|
3127
3140
|
type: Directive,
|
|
3128
|
-
args: [{
|
|
3129
|
-
selector: '[vdLayoutNavListToggle]',
|
|
3130
|
-
}]
|
|
3141
|
+
args: [{ selector: '[vdLayoutNavListToggle]' }]
|
|
3131
3142
|
}], ctorParameters: function () { return [{ type: VdLayoutNavListComponent, decorators: [{
|
|
3132
3143
|
type: Inject,
|
|
3133
3144
|
args: [forwardRef(() => VdLayoutNavListComponent)]
|
|
@@ -3136,12 +3147,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
3136
3147
|
args: ['vdLayoutNavListToggle']
|
|
3137
3148
|
}] } });
|
|
3138
3149
|
class VdLayoutNavListCloseDirective extends LayoutToggle {
|
|
3150
|
+
/**
|
|
3151
|
+
* Constructor
|
|
3152
|
+
* @param layout
|
|
3153
|
+
* @param renderer
|
|
3154
|
+
* @param elementRef
|
|
3155
|
+
*/
|
|
3139
3156
|
constructor(layout, renderer, elementRef) {
|
|
3140
3157
|
super(layout, renderer, elementRef);
|
|
3141
3158
|
}
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3159
|
+
/**
|
|
3160
|
+
* Disables the navbar
|
|
3161
|
+
*/
|
|
3162
|
+
set vdLayoutNavListClose(vdLayoutNavListClose) { this.disabled = !(vdLayoutNavListClose === '' || vdLayoutNavListClose); }
|
|
3163
|
+
/**
|
|
3164
|
+
* Opens the navbar
|
|
3165
|
+
*/
|
|
3145
3166
|
onClick() {
|
|
3146
3167
|
this._layout.close();
|
|
3147
3168
|
}
|
|
@@ -3150,9 +3171,7 @@ class VdLayoutNavListCloseDirective extends LayoutToggle {
|
|
|
3150
3171
|
/** @nocollapse */ VdLayoutNavListCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: VdLayoutNavListCloseDirective, selector: "[vdLayoutNavListClose]", inputs: { vdLayoutNavListClose: "vdLayoutNavListClose" }, usesInheritance: true, ngImport: i0 });
|
|
3151
3172
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdLayoutNavListCloseDirective, decorators: [{
|
|
3152
3173
|
type: Directive,
|
|
3153
|
-
args: [{
|
|
3154
|
-
selector: '[vdLayoutNavListClose]',
|
|
3155
|
-
}]
|
|
3174
|
+
args: [{ selector: '[vdLayoutNavListClose]' }]
|
|
3156
3175
|
}], ctorParameters: function () { return [{ type: VdLayoutNavListComponent, decorators: [{
|
|
3157
3176
|
type: Inject,
|
|
3158
3177
|
args: [forwardRef(() => VdLayoutNavListComponent)]
|
|
@@ -3161,12 +3180,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
3161
3180
|
args: ['vdLayoutNavListClose']
|
|
3162
3181
|
}] } });
|
|
3163
3182
|
class VdLayoutNavListOpenDirective extends LayoutToggle {
|
|
3183
|
+
/**
|
|
3184
|
+
* Constructor
|
|
3185
|
+
* @param layout
|
|
3186
|
+
* @param renderer
|
|
3187
|
+
* @param elementRef
|
|
3188
|
+
*/
|
|
3164
3189
|
constructor(layout, renderer, elementRef) {
|
|
3165
3190
|
super(layout, renderer, elementRef);
|
|
3166
3191
|
}
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3192
|
+
/**
|
|
3193
|
+
* Disables the navbar
|
|
3194
|
+
*/
|
|
3195
|
+
set vdLayoutNavListOpen(vdLayoutNavListOpen) { this.disabled = !(vdLayoutNavListOpen === '' || vdLayoutNavListOpen); }
|
|
3196
|
+
/**
|
|
3197
|
+
* Opens the navbar
|
|
3198
|
+
*/
|
|
3170
3199
|
onClick() {
|
|
3171
3200
|
this._layout.open();
|
|
3172
3201
|
}
|
|
@@ -3175,9 +3204,7 @@ class VdLayoutNavListOpenDirective extends LayoutToggle {
|
|
|
3175
3204
|
/** @nocollapse */ VdLayoutNavListOpenDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: VdLayoutNavListOpenDirective, selector: "[vdLayoutNavListOpen]", inputs: { vdLayoutNavListOpen: "vdLayoutNavListOpen" }, usesInheritance: true, ngImport: i0 });
|
|
3176
3205
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdLayoutNavListOpenDirective, decorators: [{
|
|
3177
3206
|
type: Directive,
|
|
3178
|
-
args: [{
|
|
3179
|
-
selector: '[vdLayoutNavListOpen]',
|
|
3180
|
-
}]
|
|
3207
|
+
args: [{ selector: '[vdLayoutNavListOpen]' }]
|
|
3181
3208
|
}], ctorParameters: function () { return [{ type: VdLayoutNavListComponent, decorators: [{
|
|
3182
3209
|
type: Inject,
|
|
3183
3210
|
args: [forwardRef(() => VdLayoutNavListComponent)]
|
|
@@ -4577,11 +4604,11 @@ class TableDataSource extends DataSource {
|
|
|
4577
4604
|
* @param paginator
|
|
4578
4605
|
* @param sort
|
|
4579
4606
|
*/
|
|
4580
|
-
constructor(service, paginator,
|
|
4607
|
+
constructor(service, paginator, sorter) {
|
|
4581
4608
|
super();
|
|
4582
4609
|
this.service = service;
|
|
4583
4610
|
this.paginator = paginator;
|
|
4584
|
-
this.
|
|
4611
|
+
this.sorter = sorter;
|
|
4585
4612
|
/**
|
|
4586
4613
|
* Represents a value that changes over time.
|
|
4587
4614
|
* Observers can subscribe to the subject to receive filter changes
|
|
@@ -4601,6 +4628,18 @@ class TableDataSource extends DataSource {
|
|
|
4601
4628
|
* Used to power selecting one or more options from a list.
|
|
4602
4629
|
*/
|
|
4603
4630
|
this.selectionModel = new SelectionModel(true, []);
|
|
4631
|
+
/**
|
|
4632
|
+
* Sort change event emitter
|
|
4633
|
+
*/
|
|
4634
|
+
this.onSortChange = new EventEmitter();
|
|
4635
|
+
/**
|
|
4636
|
+
* _sort: MatSort | null
|
|
4637
|
+
*/
|
|
4638
|
+
this._sort = new MatSort();
|
|
4639
|
+
/**
|
|
4640
|
+
* isConnected: boolean
|
|
4641
|
+
*/
|
|
4642
|
+
this.isConnected = false;
|
|
4604
4643
|
/**
|
|
4605
4644
|
* The navigations to includes
|
|
4606
4645
|
*/
|
|
@@ -4640,7 +4679,7 @@ class TableDataSource extends DataSource {
|
|
|
4640
4679
|
/**
|
|
4641
4680
|
* A flag to show loading process
|
|
4642
4681
|
*/
|
|
4643
|
-
this.isLoading =
|
|
4682
|
+
this.isLoading = false;
|
|
4644
4683
|
/**
|
|
4645
4684
|
* Get selected Items
|
|
4646
4685
|
*/
|
|
@@ -4649,6 +4688,7 @@ class TableDataSource extends DataSource {
|
|
|
4649
4688
|
* Get selected Items
|
|
4650
4689
|
*/
|
|
4651
4690
|
this.getSelectedIds = () => this.getSelected('id');
|
|
4691
|
+
this.sort = sorter;
|
|
4652
4692
|
}
|
|
4653
4693
|
/**
|
|
4654
4694
|
* Gets filter
|
|
@@ -4664,6 +4704,15 @@ class TableDataSource extends DataSource {
|
|
|
4664
4704
|
}
|
|
4665
4705
|
this._filterChange.next(filter);
|
|
4666
4706
|
}
|
|
4707
|
+
/**
|
|
4708
|
+
* Instance of the MatSort directive used by the table to control its sorting. Sort changes
|
|
4709
|
+
* emitted by the MatSort will trigger an update to the table's rendered data.
|
|
4710
|
+
*/
|
|
4711
|
+
get sort() { return this._sort; }
|
|
4712
|
+
set sort(sort) {
|
|
4713
|
+
this._sort = sort;
|
|
4714
|
+
this._sort?.sortChange.subscribe(x => this.onSortChange.emit(x));
|
|
4715
|
+
}
|
|
4667
4716
|
/**
|
|
4668
4717
|
* Gets reload token
|
|
4669
4718
|
*/
|
|
@@ -4675,32 +4724,33 @@ class TableDataSource extends DataSource {
|
|
|
4675
4724
|
* @returns Observable that emits a new value when the data changes.
|
|
4676
4725
|
*/
|
|
4677
4726
|
connect(_ = null) {
|
|
4727
|
+
this.isConnected = true;
|
|
4678
4728
|
/* A list of fields to observe */
|
|
4679
4729
|
const displayDataChanges = [
|
|
4680
|
-
this.
|
|
4681
|
-
this.paginator?.page
|
|
4730
|
+
this.onSortChange,
|
|
4731
|
+
this.paginator?.page,
|
|
4682
4732
|
this._filterChange,
|
|
4683
4733
|
this._reloadChange
|
|
4684
4734
|
];
|
|
4685
4735
|
/* If the user changes the sort order, reset back to the first page */
|
|
4686
|
-
this.
|
|
4736
|
+
this.onSortChange.subscribe(() => { this.paginator.pageIndex = 0; });
|
|
4687
4737
|
return merge$1(...displayDataChanges)
|
|
4688
4738
|
.pipe(skip(1), switchMap(() => {
|
|
4689
4739
|
/* Flip flag to show that loading has begun */
|
|
4690
4740
|
this.isLoading = true;
|
|
4691
4741
|
/* Remove empty filters */
|
|
4692
|
-
|
|
4693
|
-
|
|
4742
|
+
Utils.cleanObject(this.fieldFilters);
|
|
4743
|
+
Utils.cleanObject(this.staticFieldFilters);
|
|
4694
4744
|
/* Load data and return it */
|
|
4695
|
-
return this.service.getList(Object.assign({
|
|
4745
|
+
return this.service.getList(Utils.cleanObject(Object.assign({
|
|
4696
4746
|
includes: this.includes,
|
|
4697
4747
|
projection: Array.isArray(this.projection) ? this.projection.join(',') : this.projection,
|
|
4698
4748
|
page: this.paginator.pageIndex + 1,
|
|
4699
4749
|
pageSize: this.paginator.pageSize,
|
|
4700
4750
|
search: this.filter.toLowerCase(),
|
|
4701
|
-
sortBy: this.sort
|
|
4702
|
-
sortOrder: this.sort
|
|
4703
|
-
},
|
|
4751
|
+
sortBy: this.sort?.active,
|
|
4752
|
+
sortOrder: this.sort?.direction
|
|
4753
|
+
}, this.fieldFilters ?? {}, this.staticFieldFilters ?? {})), null, { 'CheckOut': 'Yes' });
|
|
4704
4754
|
}), map((result) => {
|
|
4705
4755
|
/* Flip flag to show that loading has finished */
|
|
4706
4756
|
this.isLoading = false;
|
|
@@ -4726,7 +4776,9 @@ class TableDataSource extends DataSource {
|
|
|
4726
4776
|
* @param _ The component that exposes a view over the data provided by this
|
|
4727
4777
|
* data source.
|
|
4728
4778
|
*/
|
|
4729
|
-
disconnect(_ = null) {
|
|
4779
|
+
disconnect(_ = null) {
|
|
4780
|
+
this.isConnected = false;
|
|
4781
|
+
}
|
|
4730
4782
|
/**
|
|
4731
4783
|
* Reloads items
|
|
4732
4784
|
* @param clearSelection
|
|
@@ -4737,6 +4789,13 @@ class TableDataSource extends DataSource {
|
|
|
4737
4789
|
this.selectionModel.clear();
|
|
4738
4790
|
}
|
|
4739
4791
|
}
|
|
4792
|
+
/**
|
|
4793
|
+
* Clears field filters
|
|
4794
|
+
*/
|
|
4795
|
+
applyFilters(newFilters = {}) {
|
|
4796
|
+
this.fieldFilters = newFilters || {};
|
|
4797
|
+
this.reload();
|
|
4798
|
+
}
|
|
4740
4799
|
/**
|
|
4741
4800
|
* Clears field filters
|
|
4742
4801
|
*/
|
|
@@ -5139,7 +5198,7 @@ class VdDynamicTableComponent {
|
|
|
5139
5198
|
}
|
|
5140
5199
|
}
|
|
5141
5200
|
/** @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 });
|
|
5142
|
-
/** @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: [
|
|
5201
|
+
/** @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: [
|
|
5143
5202
|
trigger('detailExpand', [
|
|
5144
5203
|
state('collapsed', style({ display: 'none' })),
|
|
5145
5204
|
state('expanded', style({ display: 'initial' })),
|
|
@@ -5154,7 +5213,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
5154
5213
|
state('expanded', style({ display: 'initial' })),
|
|
5155
5214
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
5156
5215
|
]),
|
|
5157
|
-
], 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"] }]
|
|
5216
|
+
], 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"] }]
|
|
5158
5217
|
}], ctorParameters: function () { return [{ type: DynamicBuilder }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { table: [{
|
|
5159
5218
|
type: ViewChild,
|
|
5160
5219
|
args: ['table']
|
|
@@ -7119,6 +7178,10 @@ class GenericListComponent extends BaseComponent {
|
|
|
7119
7178
|
* If true, show the menu 'Duplicate'
|
|
7120
7179
|
*/
|
|
7121
7180
|
this.duplicable = false;
|
|
7181
|
+
/**
|
|
7182
|
+
* If true, show the menu 'Configure table'
|
|
7183
|
+
*/
|
|
7184
|
+
this.configurable = true;
|
|
7122
7185
|
/**
|
|
7123
7186
|
* rowNgClass: Function
|
|
7124
7187
|
*/
|
|
@@ -7538,11 +7601,14 @@ class GenericListComponent extends BaseComponent {
|
|
|
7538
7601
|
disable: () => !this.canExecuteMultipleOperations((x) => this.canDeleteItem(x))
|
|
7539
7602
|
});
|
|
7540
7603
|
}
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7604
|
+
/* Opens config dialog */
|
|
7605
|
+
if (this.configurable) {
|
|
7606
|
+
this.toolbarMenuItems.push({
|
|
7607
|
+
title: $localize `:@@configureTable:Configure table`,
|
|
7608
|
+
icon: 'settings',
|
|
7609
|
+
event: () => this.openConfigDialog()
|
|
7610
|
+
});
|
|
7611
|
+
}
|
|
7546
7612
|
}
|
|
7547
7613
|
/**
|
|
7548
7614
|
* Add row menu items
|
|
@@ -7591,7 +7657,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
7591
7657
|
title: $localize `:@@edit:Edit`,
|
|
7592
7658
|
icon: 'edit_note',
|
|
7593
7659
|
iconClass: 'tc-blue-400',
|
|
7594
|
-
event: (row) => this.edit(row),
|
|
7660
|
+
event: (row) => this.edit(row, this),
|
|
7595
7661
|
hide: (row) => !this.canEditItem(row)
|
|
7596
7662
|
});
|
|
7597
7663
|
}
|
|
@@ -14543,20 +14609,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
14543
14609
|
args: ["focusout"]
|
|
14544
14610
|
}] } });
|
|
14545
14611
|
|
|
14546
|
-
/**
|
|
14547
|
-
* VdChipDirective class
|
|
14548
|
-
*/
|
|
14549
|
-
class VdChipDirective extends CdkPortal {
|
|
14550
|
-
constructor(templateRef, viewContainerRef) {
|
|
14551
|
-
super(templateRef, viewContainerRef);
|
|
14552
|
-
}
|
|
14553
|
-
}
|
|
14554
|
-
/** @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 });
|
|
14555
|
-
/** @nocollapse */ VdChipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: VdChipDirective, selector: "[vd-chip]ng-template", usesInheritance: true, ngImport: i0 });
|
|
14556
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipDirective, decorators: [{
|
|
14557
|
-
type: Directive,
|
|
14558
|
-
args: [{ selector: '[vd-chip]ng-template' }]
|
|
14559
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
14560
14612
|
/**
|
|
14561
14613
|
* VdAutocompleteOptionDirective class
|
|
14562
14614
|
*/
|
|
@@ -14570,13 +14622,29 @@ class VdAutocompleteOptionDirective extends CdkPortal {
|
|
|
14570
14622
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdAutocompleteOptionDirective, decorators: [{
|
|
14571
14623
|
type: Directive,
|
|
14572
14624
|
args: [{ selector: '[vd-autocomplete-option]ng-template' }]
|
|
14573
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
14625
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
14626
|
+
|
|
14574
14627
|
/**
|
|
14575
|
-
*
|
|
14628
|
+
* VdChipDirective class
|
|
14576
14629
|
*/
|
|
14630
|
+
class VdChipDirective extends CdkPortal {
|
|
14631
|
+
constructor(templateRef, viewContainerRef) {
|
|
14632
|
+
super(templateRef, viewContainerRef);
|
|
14633
|
+
}
|
|
14634
|
+
}
|
|
14635
|
+
/** @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 });
|
|
14636
|
+
/** @nocollapse */ VdChipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: VdChipDirective, selector: "[vd-chip]ng-template", usesInheritance: true, ngImport: i0 });
|
|
14637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipDirective, decorators: [{
|
|
14638
|
+
type: Directive,
|
|
14639
|
+
args: [{ selector: '[vd-chip]ng-template' }]
|
|
14640
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
14641
|
+
|
|
14577
14642
|
class VdChipsComponent extends AbstractMatFormField {
|
|
14578
14643
|
/**
|
|
14579
14644
|
* Constructor
|
|
14645
|
+
* @param injector
|
|
14646
|
+
* @param media
|
|
14647
|
+
* @param changeDetectorRef
|
|
14580
14648
|
* @param ngControl
|
|
14581
14649
|
* @param parentForm
|
|
14582
14650
|
* @param parentFormGroup
|
|
@@ -14584,18 +14652,15 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14584
14652
|
* @param focusMonitor
|
|
14585
14653
|
* @param elementRef
|
|
14586
14654
|
*/
|
|
14587
|
-
constructor(injector, ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef) {
|
|
14655
|
+
constructor(injector, media, changeDetectorRef, ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef) {
|
|
14588
14656
|
super("app-vd-chips", ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef);
|
|
14589
14657
|
this.injector = injector;
|
|
14658
|
+
this.media = media;
|
|
14659
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
14590
14660
|
/**
|
|
14591
|
-
*
|
|
14592
|
-
*/
|
|
14593
|
-
this.http = null;
|
|
14594
|
-
/**
|
|
14595
|
-
* Represents a value that changes over time.
|
|
14596
|
-
* Observers can subscribe to the subject to receive pdf file changes
|
|
14661
|
+
* Page size options
|
|
14597
14662
|
*/
|
|
14598
|
-
this.
|
|
14663
|
+
this.pageSizeOptions = [5, 10, 15, 20, 30, 50, 100, 200];
|
|
14599
14664
|
/**
|
|
14600
14665
|
* Set up reactive formcontrol
|
|
14601
14666
|
*/
|
|
@@ -14609,9 +14674,9 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14609
14674
|
*/
|
|
14610
14675
|
this.chips = [];
|
|
14611
14676
|
/**
|
|
14612
|
-
*
|
|
14677
|
+
* Readonly
|
|
14613
14678
|
*/
|
|
14614
|
-
this.
|
|
14679
|
+
this._paginated = true;
|
|
14615
14680
|
/**
|
|
14616
14681
|
* key: string
|
|
14617
14682
|
*/
|
|
@@ -14624,14 +14689,6 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14624
14689
|
* searchFields: string
|
|
14625
14690
|
*/
|
|
14626
14691
|
this.searchFields = [];
|
|
14627
|
-
/**
|
|
14628
|
-
* termMinlength: number
|
|
14629
|
-
*/
|
|
14630
|
-
this.termMinlength = 2;
|
|
14631
|
-
/**
|
|
14632
|
-
* limit: number
|
|
14633
|
-
*/
|
|
14634
|
-
this.limit = 30;
|
|
14635
14692
|
/**
|
|
14636
14693
|
* removable: boolean
|
|
14637
14694
|
*/
|
|
@@ -14671,16 +14728,34 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14671
14728
|
* Sends chip value as event.
|
|
14672
14729
|
*/
|
|
14673
14730
|
this.chipFocus = new EventEmitter();
|
|
14674
|
-
|
|
14731
|
+
/**
|
|
14732
|
+
* service: BaseService
|
|
14733
|
+
*/
|
|
14734
|
+
this.service = new BaseService();
|
|
14675
14735
|
}
|
|
14736
|
+
/**
|
|
14737
|
+
* A reference to VdDynamicTableComponent element
|
|
14738
|
+
*/
|
|
14739
|
+
get dynamicTable() { return this._dynamicTable; }
|
|
14740
|
+
set dynamicTable(dynamicTable) {
|
|
14741
|
+
this._dynamicTable = dynamicTable;
|
|
14742
|
+
if (this._dynamicTable) {
|
|
14743
|
+
this.dataSource.sort = this._dynamicTable.matSort;
|
|
14744
|
+
}
|
|
14745
|
+
}
|
|
14746
|
+
/**
|
|
14747
|
+
* A reference to MdPaginator element
|
|
14748
|
+
*/
|
|
14749
|
+
set paginator(paginator) { this._paginator = paginator; }
|
|
14750
|
+
get paginator() { return this._paginator; }
|
|
14676
14751
|
/**
|
|
14677
14752
|
* Gets or sets endpoint
|
|
14678
14753
|
*/
|
|
14679
14754
|
get endpoint() { return this._endpoint; }
|
|
14680
14755
|
set endpoint(endpoint) {
|
|
14681
14756
|
this._endpoint = endpoint;
|
|
14757
|
+
this.service.endpoint = typeof endpoint === 'function' ? endpoint(this) : endpoint;
|
|
14682
14758
|
this.clear();
|
|
14683
|
-
this._endpointChange.next([this.endpoint, this.path, this.params, this.projection]);
|
|
14684
14759
|
}
|
|
14685
14760
|
/**
|
|
14686
14761
|
* params: any
|
|
@@ -14688,14 +14763,9 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14688
14763
|
get params() { return this._params; }
|
|
14689
14764
|
set params(params) {
|
|
14690
14765
|
/* Remove empty params */
|
|
14691
|
-
|
|
14692
|
-
|
|
14693
|
-
delete params[key];
|
|
14694
|
-
}
|
|
14695
|
-
});
|
|
14696
|
-
if (JSON.stringify(this._params) !== JSON.stringify(params)) {
|
|
14766
|
+
Utils.cleanObject(params);
|
|
14767
|
+
if (!Utils.equals(this._params, params)) {
|
|
14697
14768
|
this._params = params;
|
|
14698
|
-
this._endpointChange.next([this.endpoint, this.path, this._params, this.projection]);
|
|
14699
14769
|
}
|
|
14700
14770
|
}
|
|
14701
14771
|
/**
|
|
@@ -14705,20 +14775,9 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14705
14775
|
set projection(projection) {
|
|
14706
14776
|
this._projection = projection;
|
|
14707
14777
|
this.clear();
|
|
14708
|
-
this._endpointChange.next([this.endpoint, this.path, this.params, this.projection]);
|
|
14709
14778
|
}
|
|
14710
14779
|
/**
|
|
14711
|
-
* Gets
|
|
14712
|
-
*/
|
|
14713
|
-
get path() { return this._path; }
|
|
14714
|
-
set path(path) {
|
|
14715
|
-
this._path = path;
|
|
14716
|
-
this.clear();
|
|
14717
|
-
this._endpointChange.next([this.endpoint, this.path, this.params, this.projection]);
|
|
14718
|
-
}
|
|
14719
|
-
/**
|
|
14720
|
-
* Sets the disabled.
|
|
14721
|
-
* @param disabled
|
|
14780
|
+
* Gets the disabled.
|
|
14722
14781
|
*/
|
|
14723
14782
|
get disabled() {
|
|
14724
14783
|
if (this._readonly) {
|
|
@@ -14726,31 +14785,51 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14726
14785
|
}
|
|
14727
14786
|
return super.disabled;
|
|
14728
14787
|
}
|
|
14788
|
+
/**
|
|
14789
|
+
* Multiple select option
|
|
14790
|
+
*/
|
|
14791
|
+
get paginated() { return this._paginated; }
|
|
14792
|
+
set paginated(paginated) {
|
|
14793
|
+
this._paginated = coerceBooleanProperty(paginated);
|
|
14794
|
+
this.stateChanges.next();
|
|
14795
|
+
}
|
|
14729
14796
|
/**
|
|
14730
14797
|
* Whether the select has a value.
|
|
14731
14798
|
*/
|
|
14732
14799
|
get empty() { return this.chips.length <= 0; }
|
|
14733
14800
|
/**
|
|
14734
|
-
*
|
|
14735
|
-
*/
|
|
14736
|
-
get
|
|
14737
|
-
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
14743
|
-
|
|
14744
|
-
this.
|
|
14745
|
-
|
|
14746
|
-
|
|
14747
|
-
|
|
14801
|
+
* Whether the `MatFormField` label should try to float.
|
|
14802
|
+
*/
|
|
14803
|
+
get shouldLabelFloat() { return super.shouldLabelFloat || this.autoCompleteChipList?.value; }
|
|
14804
|
+
/**
|
|
14805
|
+
* Lifecycle hook that is called after data-bound properties of a
|
|
14806
|
+
* directive are initialized.
|
|
14807
|
+
*/
|
|
14808
|
+
ngOnInit() {
|
|
14809
|
+
/* Listen to value changes of the search input */
|
|
14810
|
+
this.autoCompleteChipList.valueChanges
|
|
14811
|
+
.pipe(debounceTime(this.debounce))
|
|
14812
|
+
.subscribe(v => {
|
|
14813
|
+
if (typeof v === 'string') {
|
|
14814
|
+
this.filterOptions(v);
|
|
14815
|
+
}
|
|
14816
|
+
});
|
|
14817
|
+
this.ngControl?.valueChanges?.pipe(skip(1)).subscribe((value) => {
|
|
14818
|
+
if (!value) {
|
|
14819
|
+
this.chips = [];
|
|
14820
|
+
this._value = "";
|
|
14821
|
+
this.autoCompleteChipList.setValue("");
|
|
14822
|
+
this.autoCompleteChipList.enable();
|
|
14823
|
+
}
|
|
14824
|
+
});
|
|
14748
14825
|
}
|
|
14749
14826
|
/**
|
|
14750
|
-
*
|
|
14827
|
+
* Lifecycle hook that is called after a component's view has been fully initialized.
|
|
14751
14828
|
*/
|
|
14752
|
-
|
|
14753
|
-
|
|
14829
|
+
ngAfterViewInit() {
|
|
14830
|
+
this.media.broadcast();
|
|
14831
|
+
/* Initilialize the data source with the current service, paginator and sort */
|
|
14832
|
+
this.dataSource ?? (this.dataSource = new TableDataSource(this.service, this.paginator, this.sort));
|
|
14754
14833
|
}
|
|
14755
14834
|
/**
|
|
14756
14835
|
* From ControlValueAccessor interface
|
|
@@ -14776,67 +14855,66 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14776
14855
|
if (this.projection) {
|
|
14777
14856
|
_params.projection = this.projection;
|
|
14778
14857
|
}
|
|
14779
|
-
/* Get endpoint */
|
|
14780
|
-
let endpoint = typeof this.endpoint === 'function' ? this.endpoint(this) : this.endpoint;
|
|
14781
14858
|
/* Get base url */
|
|
14782
|
-
var urlParts = endpoint
|
|
14783
|
-
this.http.get(`${urlParts[0]}/${value}${urlParts.length > 1 ? `?${urlParts[1]}` : ''}`, { params: Utils.cleanObject(_params) }).subscribe(
|
|
14784
|
-
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
|
|
14789
|
-
|
|
14790
|
-
|
|
14791
|
-
|
|
14859
|
+
var urlParts = this.service?.endpoint?.split('?');
|
|
14860
|
+
this.service.http.get(`${urlParts[0]}/${value}${urlParts.length > 1 ? `?${urlParts[1]}` : ''}`, { params: Utils.cleanObject(_params) }).subscribe({
|
|
14861
|
+
next: (x) => {
|
|
14862
|
+
this.loading = false;
|
|
14863
|
+
/* Add chip for selected option */
|
|
14864
|
+
this.chips.push(x);
|
|
14865
|
+
/* Emit selected event */
|
|
14866
|
+
this.initSelect.emit(x);
|
|
14867
|
+
},
|
|
14868
|
+
error: () => this.loading = false
|
|
14869
|
+
});
|
|
14792
14870
|
}
|
|
14793
14871
|
else {
|
|
14794
14872
|
this.clear(false);
|
|
14795
14873
|
}
|
|
14796
14874
|
}
|
|
14797
14875
|
/**
|
|
14798
|
-
*
|
|
14876
|
+
* Connects the data source and subscribe to the data changes
|
|
14799
14877
|
*/
|
|
14800
|
-
|
|
14801
|
-
|
|
14878
|
+
connect() {
|
|
14879
|
+
/* Set focus */
|
|
14880
|
+
this.opened = true;
|
|
14881
|
+
/* Set some params */
|
|
14882
|
+
this.dataSource.fieldFilters = this.getQueryParams();
|
|
14883
|
+
/* Connect the data source manually for 'mat-option' triggers */
|
|
14884
|
+
if (!this.classType && !this.dataSource?.isConnected) {
|
|
14885
|
+
this.dataSourceSubscription?.unsubscribe();
|
|
14886
|
+
this.dataSourceSubscription = this.dataSource.connect().subscribe();
|
|
14887
|
+
}
|
|
14888
|
+
/* Check the change detector and its children */
|
|
14889
|
+
this.changeDetectorRef.detectChanges();
|
|
14802
14890
|
}
|
|
14803
14891
|
/**
|
|
14804
|
-
*
|
|
14805
|
-
* directive are initialized.
|
|
14892
|
+
* Sets control focus
|
|
14806
14893
|
*/
|
|
14807
|
-
|
|
14808
|
-
this.autoCompleteChipList
|
|
14809
|
-
.pipe(debounceTime(this.debounce))
|
|
14810
|
-
.subscribe(v => this.filterOptions(v));
|
|
14811
|
-
this.ngControl?.valueChanges?.pipe(skip(1)).subscribe((value) => {
|
|
14812
|
-
if (!value) {
|
|
14813
|
-
this.chips = [];
|
|
14814
|
-
this._value = "";
|
|
14815
|
-
this.autoCompleteChipList.setValue("");
|
|
14816
|
-
this.autoCompleteChipList.enable();
|
|
14817
|
-
}
|
|
14818
|
-
});
|
|
14894
|
+
focus() {
|
|
14895
|
+
// this.autoCompleteChipList?.focus();
|
|
14819
14896
|
}
|
|
14820
14897
|
/**
|
|
14821
14898
|
* Adds a chip
|
|
14822
14899
|
* @param event
|
|
14823
14900
|
* @param input
|
|
14824
14901
|
*/
|
|
14825
|
-
addChip(
|
|
14826
|
-
/* Define selection constant */
|
|
14827
|
-
const selection = event.option.value;
|
|
14902
|
+
addChip(value, input) {
|
|
14828
14903
|
/* Add chip for selected option */
|
|
14829
|
-
this.chips
|
|
14904
|
+
this.chips = [value];
|
|
14830
14905
|
/* Emit selected event */
|
|
14831
|
-
this.selected.emit(
|
|
14906
|
+
this.selected.emit(value);
|
|
14832
14907
|
/* Set the value (ngModel) */
|
|
14833
|
-
this.value =
|
|
14908
|
+
this.value = value[this.key];
|
|
14834
14909
|
/* Diabled the input, allow only one chip */
|
|
14835
|
-
this.autoCompleteChipList.disable();
|
|
14910
|
+
this.autoCompleteChipList.disable({ emitEvent: false });
|
|
14911
|
+
this.autoCompleteChipList.patchValue('', { emitEvent: false });
|
|
14836
14912
|
/* Reset the autocomplete input text value */
|
|
14837
14913
|
if (input) {
|
|
14838
14914
|
input.value = '';
|
|
14839
14915
|
}
|
|
14916
|
+
/* Close the autocomplete panel, if not already done (for table row click) */
|
|
14917
|
+
this.autocompleteTrigger.closePanel();
|
|
14840
14918
|
}
|
|
14841
14919
|
/**
|
|
14842
14920
|
* Removes all chips
|
|
@@ -14850,49 +14928,43 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14850
14928
|
this.ngControl.control.markAsTouched();
|
|
14851
14929
|
}
|
|
14852
14930
|
/* Reset the value (ngModel) */
|
|
14853
|
-
this.autoCompleteChipList.
|
|
14931
|
+
this.autoCompleteChipList.patchValue('', { emitEvent: false });
|
|
14854
14932
|
if (triggerStateChanges) {
|
|
14855
14933
|
this.stateChanges.next();
|
|
14856
14934
|
}
|
|
14857
14935
|
/* Enable the input */
|
|
14858
|
-
this.autoCompleteChipList.enable();
|
|
14936
|
+
this.autoCompleteChipList.enable({ emitEvent: false });
|
|
14937
|
+
/* Check the change detector and its children */
|
|
14938
|
+
this.changeDetectorRef.detectChanges();
|
|
14859
14939
|
}
|
|
14860
14940
|
/**
|
|
14861
14941
|
* Filters options
|
|
14862
14942
|
* @param text
|
|
14863
14943
|
*/
|
|
14864
14944
|
filterOptions(text) {
|
|
14865
|
-
|
|
14866
|
-
if (this.
|
|
14945
|
+
/* Filter the results */
|
|
14946
|
+
if (this.dataSource) {
|
|
14867
14947
|
/* Init params if null */
|
|
14868
|
-
|
|
14948
|
+
let _params = { ...this.getQueryParams() };
|
|
14869
14949
|
/* Add search word to the params */
|
|
14870
14950
|
if (this.searchField && this.searchFields.length <= 0) {
|
|
14871
14951
|
var result = new RegExp(`(\\${this.searchOperators.join('|\\')})?(.*)`).exec(this.searchField);
|
|
14872
|
-
|
|
14952
|
+
_params[result[2]] = `${result[1] ? result[1] : ''}${text}`;
|
|
14873
14953
|
}
|
|
14874
14954
|
/* Add search word to the params */
|
|
14875
14955
|
this.searchFields?.map(x => x.trim())?.forEach(x => {
|
|
14876
14956
|
var result = new RegExp(`(\\${this.searchOperators.join('|\\')})?(.*)`).exec(x);
|
|
14877
|
-
|
|
14957
|
+
_params[result[2]] = `${result[1] ? result[1] : ''}${text}`;
|
|
14878
14958
|
});
|
|
14879
|
-
/*
|
|
14880
|
-
this._params
|
|
14881
|
-
|
|
14882
|
-
if (this.projection) {
|
|
14883
|
-
this._params.projection = this.projection;
|
|
14959
|
+
/* Nothing has changed? */
|
|
14960
|
+
if (Utils.equals(this._params, _params)) {
|
|
14961
|
+
return;
|
|
14884
14962
|
}
|
|
14963
|
+
/* Set params */
|
|
14964
|
+
this._params = _params;
|
|
14885
14965
|
/* Get results from server */
|
|
14886
14966
|
this.loading = true;
|
|
14887
|
-
this.
|
|
14888
|
-
.subscribe({
|
|
14889
|
-
next: (x) => {
|
|
14890
|
-
this.loading = false;
|
|
14891
|
-
this.filteredOptions = x;
|
|
14892
|
-
this.emptyResult = !x || !x.length;
|
|
14893
|
-
},
|
|
14894
|
-
error: () => this.loading = false
|
|
14895
|
-
});
|
|
14967
|
+
this.dataSource.applyFilters(this._params);
|
|
14896
14968
|
}
|
|
14897
14969
|
}
|
|
14898
14970
|
/**
|
|
@@ -14912,17 +14984,33 @@ class VdChipsComponent extends AbstractMatFormField {
|
|
|
14912
14984
|
this.onLaunch.emit(this.chips[0]);
|
|
14913
14985
|
}
|
|
14914
14986
|
}
|
|
14987
|
+
/**
|
|
14988
|
+
* Gets query params
|
|
14989
|
+
* @returns
|
|
14990
|
+
*/
|
|
14991
|
+
getQueryParams() {
|
|
14992
|
+
/* Init params if null */
|
|
14993
|
+
var params = this._params;
|
|
14994
|
+
/* Add projection, if any */
|
|
14995
|
+
if (this.projection) {
|
|
14996
|
+
params.projection = this.projection;
|
|
14997
|
+
}
|
|
14998
|
+
return params;
|
|
14999
|
+
}
|
|
15000
|
+
/**
|
|
15001
|
+
* A callback method that performs custom clean-up, invoked immediately
|
|
15002
|
+
* before a directive, pipe, or service instance is destroyed.
|
|
15003
|
+
*/
|
|
15004
|
+
ngOnDestroy() {
|
|
15005
|
+
this.dataSourceSubscription?.unsubscribe();
|
|
15006
|
+
}
|
|
14915
15007
|
}
|
|
14916
|
-
/** @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 });
|
|
14917
|
-
/** @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: [
|
|
14918
|
-
{ provide: MatFormFieldControl, useExisting: VdChipsComponent }
|
|
14919
|
-
], 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"] }] });
|
|
15008
|
+
/** @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 });
|
|
15009
|
+
/** @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"] }] });
|
|
14920
15010
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipsComponent, decorators: [{
|
|
14921
15011
|
type: Component,
|
|
14922
|
-
args: [{ selector: 'vd-chips', providers: [
|
|
14923
|
-
|
|
14924
|
-
], 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"] }]
|
|
14925
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.NgControl, decorators: [{
|
|
15012
|
+
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"] }]
|
|
15013
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: VdMediaService }, { type: i0.ChangeDetectorRef }, { type: i1.NgControl, decorators: [{
|
|
14926
15014
|
type: Optional
|
|
14927
15015
|
}, {
|
|
14928
15016
|
type: Self
|
|
@@ -14930,9 +15018,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
14930
15018
|
type: Optional
|
|
14931
15019
|
}] }, { type: i1.FormGroupDirective, decorators: [{
|
|
14932
15020
|
type: Optional
|
|
14933
|
-
}] }, { type: i2.ErrorStateMatcher }, { type: i3$4.FocusMonitor }, { type: i0.ElementRef }]; }, propDecorators: {
|
|
15021
|
+
}] }, { type: i2.ErrorStateMatcher }, { type: i3$4.FocusMonitor }, { type: i0.ElementRef }]; }, propDecorators: { dynamicTable: [{
|
|
14934
15022
|
type: ViewChild,
|
|
14935
|
-
args: [
|
|
15023
|
+
args: [VdDynamicTableComponent, { static: false }]
|
|
15024
|
+
}], classType: [{
|
|
15025
|
+
type: Input
|
|
15026
|
+
}], paginator: [{
|
|
15027
|
+
type: ViewChild,
|
|
15028
|
+
args: [MatPaginator, { static: true }]
|
|
15029
|
+
}], sort: [{
|
|
15030
|
+
type: ViewChild,
|
|
15031
|
+
args: [MatSort, { static: false }]
|
|
14936
15032
|
}], chips: [{
|
|
14937
15033
|
type: Input
|
|
14938
15034
|
}], chipTemplate: [{
|
|
@@ -14941,13 +15037,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
14941
15037
|
}], autocompleteOptionTemplate: [{
|
|
14942
15038
|
type: ContentChild,
|
|
14943
15039
|
args: [VdAutocompleteOptionDirective]
|
|
15040
|
+
}], autocomplete: [{
|
|
15041
|
+
type: ViewChild,
|
|
15042
|
+
args: [MatAutocomplete, { static: false }]
|
|
15043
|
+
}], autocompleteTrigger: [{
|
|
15044
|
+
type: ViewChild,
|
|
15045
|
+
args: [MatAutocompleteTrigger]
|
|
14944
15046
|
}], endpoint: [{
|
|
14945
15047
|
type: Input
|
|
14946
15048
|
}], params: [{
|
|
14947
15049
|
type: Input
|
|
14948
15050
|
}], projection: [{
|
|
14949
15051
|
type: Input
|
|
14950
|
-
}],
|
|
15052
|
+
}], paginated: [{
|
|
14951
15053
|
type: Input
|
|
14952
15054
|
}], context: [{
|
|
14953
15055
|
type: Input
|
|
@@ -14957,15 +15059,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
14957
15059
|
type: Input
|
|
14958
15060
|
}], searchFields: [{
|
|
14959
15061
|
type: Input
|
|
14960
|
-
}], termMinlength: [{
|
|
14961
|
-
type: Input
|
|
14962
|
-
}], limit: [{
|
|
14963
|
-
type: Input
|
|
14964
15062
|
}], removable: [{
|
|
14965
15063
|
type: Input
|
|
14966
15064
|
}], debounce: [{
|
|
14967
|
-
type: Input
|
|
14968
|
-
args: ['debounce']
|
|
15065
|
+
type: Input
|
|
14969
15066
|
}], autocompleteCssClass: [{
|
|
14970
15067
|
type: Input
|
|
14971
15068
|
}], initSelect: [{
|
|
@@ -14981,8 +15078,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
14981
15078
|
type: Input
|
|
14982
15079
|
}], chipFocus: [{
|
|
14983
15080
|
type: Output
|
|
14984
|
-
}], default: [{
|
|
14985
|
-
type: Input
|
|
14986
15081
|
}] } });
|
|
14987
15082
|
|
|
14988
15083
|
const DECLARATIONS$2 = [
|
|
@@ -14997,7 +15092,8 @@ const MATRIAL_DECLARATIONS = [
|
|
|
14997
15092
|
MatInputModule,
|
|
14998
15093
|
MatSelectModule,
|
|
14999
15094
|
MatAutocompleteModule,
|
|
15000
|
-
MatProgressSpinnerModule
|
|
15095
|
+
MatProgressSpinnerModule,
|
|
15096
|
+
MatPaginatorModule
|
|
15001
15097
|
];
|
|
15002
15098
|
class VdChipsModule {
|
|
15003
15099
|
}
|
|
@@ -15006,19 +15102,22 @@ class VdChipsModule {
|
|
|
15006
15102
|
VdAutocompleteOptionDirective,
|
|
15007
15103
|
VdChipDirective], imports: [CommonModule,
|
|
15008
15104
|
FormsModule,
|
|
15009
|
-
ReactiveFormsModule,
|
|
15105
|
+
ReactiveFormsModule,
|
|
15106
|
+
VdTableModule, MatChipsModule,
|
|
15010
15107
|
MatIconModule,
|
|
15011
15108
|
MatButtonModule,
|
|
15012
15109
|
MatInputModule,
|
|
15013
15110
|
MatSelectModule,
|
|
15014
15111
|
MatAutocompleteModule,
|
|
15015
|
-
MatProgressSpinnerModule
|
|
15112
|
+
MatProgressSpinnerModule,
|
|
15113
|
+
MatPaginatorModule], exports: [VdChipsComponent,
|
|
15016
15114
|
VdAutocompleteOptionDirective,
|
|
15017
15115
|
VdChipDirective] });
|
|
15018
15116
|
/** @nocollapse */ VdChipsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipsModule, imports: [[
|
|
15019
15117
|
CommonModule,
|
|
15020
15118
|
FormsModule,
|
|
15021
15119
|
ReactiveFormsModule,
|
|
15120
|
+
VdTableModule,
|
|
15022
15121
|
MATRIAL_DECLARATIONS
|
|
15023
15122
|
]] });
|
|
15024
15123
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipsModule, decorators: [{
|
|
@@ -15028,6 +15127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
15028
15127
|
CommonModule,
|
|
15029
15128
|
FormsModule,
|
|
15030
15129
|
ReactiveFormsModule,
|
|
15130
|
+
VdTableModule,
|
|
15031
15131
|
MATRIAL_DECLARATIONS
|
|
15032
15132
|
],
|
|
15033
15133
|
declarations: [
|
|
@@ -16115,10 +16215,10 @@ class VdGenericFormComponent {
|
|
|
16115
16215
|
}
|
|
16116
16216
|
}
|
|
16117
16217
|
/** @nocollapse */ VdGenericFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdGenericFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16118
|
-
/** @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]" }] });
|
|
16218
|
+
/** @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]" }] });
|
|
16119
16219
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdGenericFormComponent, decorators: [{
|
|
16120
16220
|
type: Component,
|
|
16121
|
-
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: [""] }]
|
|
16221
|
+
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: [""] }]
|
|
16122
16222
|
}], propDecorators: { formGroup: [{
|
|
16123
16223
|
type: Input
|
|
16124
16224
|
}], classType: [{
|
|
@@ -16285,7 +16385,7 @@ class MatFormFieldEditorDirective extends _EditorInputMixinBase {
|
|
|
16285
16385
|
}
|
|
16286
16386
|
}
|
|
16287
16387
|
}
|
|
16288
|
-
/** @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$
|
|
16388
|
+
/** @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 });
|
|
16289
16389
|
/** @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 });
|
|
16290
16390
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatFormFieldEditorDirective, decorators: [{
|
|
16291
16391
|
type: Directive,
|
|
@@ -16307,12 +16407,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
16307
16407
|
type: Optional
|
|
16308
16408
|
}] }, { type: i1.FormGroupDirective, decorators: [{
|
|
16309
16409
|
type: Optional
|
|
16310
|
-
}] }, { type: i2.ErrorStateMatcher }, { type: i5$
|
|
16410
|
+
}] }, { type: i2.ErrorStateMatcher }, { type: i5$3.EditorComponent, decorators: [{
|
|
16311
16411
|
type: Self
|
|
16312
16412
|
}, {
|
|
16313
16413
|
type: Inject,
|
|
16314
16414
|
args: [NG_VALUE_ACCESSOR]
|
|
16315
|
-
}] }, { type: i3$5.Platform }, { type: i4$
|
|
16415
|
+
}] }, { type: i3$5.Platform }, { type: i4$5.AutofillMonitor }, { type: i0.NgZone }]; }, propDecorators: { disabled: [{
|
|
16316
16416
|
type: Input
|
|
16317
16417
|
}], id: [{
|
|
16318
16418
|
type: Input
|