@messaia/cdk 13.3.9 → 13.3.10

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.
@@ -63,6 +63,7 @@ import { MatSidenav, MatSidenavModule } from '@angular/material/sidenav';
63
63
  import * as i1$3 from '@angular/router';
64
64
  import { RouterModule, Router, NavigationEnd } from '@angular/router';
65
65
  import * as i3 from '@angular/material/divider';
66
+ import { MatDividerModule } from '@angular/material/divider';
66
67
  import * as i2 from '@angular/material/core';
67
68
  import { mixinErrorState, MatNativeDateModule } from '@angular/material/core';
68
69
  import { trigger, state, style, AUTO_STYLE, transition, group, query, animateChild, animate } from '@angular/animations';
@@ -75,7 +76,7 @@ import '@angular/localize/init';
75
76
  import { MatStepper } from '@angular/material/stepper';
76
77
  import { saveAs } from 'file-saver';
77
78
  import * as i9$1 from '@angular/material/autocomplete';
78
- import { MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteModule } from '@angular/material/autocomplete';
79
+ import { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteModule } from '@angular/material/autocomplete';
79
80
  import * as i5$2 from '@angular/material/chips';
80
81
  import { MatChipsModule } from '@angular/material/chips';
81
82
  import * as i3$4 from '@angular/cdk/a11y';
@@ -14386,21 +14387,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
14386
14387
  }]
14387
14388
  }] });
14388
14389
 
14389
- /**
14390
- * _AbstractMatFormField class
14391
- */
14392
- class _AbstractMatFormField {
14393
- constructor(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl) {
14390
+ /* Boilerplate for applying mixins to the custom field. */
14391
+ const _AbstractMatFormFieldBase = mixinErrorState(class {
14392
+ /**
14393
+ * Constructor
14394
+ * @param _defaultErrorStateMatcher
14395
+ * @param _parentForm
14396
+ * @param _parentFormGroup
14397
+ * @param ngControl
14398
+ */
14399
+ constructor(_defaultErrorStateMatcher, _parentForm, _parentFormGroup,
14400
+ /**
14401
+ * Form control bound to the component.
14402
+ * Implemented as part of `MatFormFieldControl`.
14403
+ * @docs-private
14404
+ */
14405
+ ngControl) {
14394
14406
  this._defaultErrorStateMatcher = _defaultErrorStateMatcher;
14395
14407
  this._parentForm = _parentForm;
14396
14408
  this._parentFormGroup = _parentFormGroup;
14397
14409
  this.ngControl = ngControl;
14410
+ /**
14411
+ * Emits whenever the component state changes and should cause the parent
14412
+ * form-field to update. Implemented as part of `MatFormFieldControl`.
14413
+ * @docs-private
14414
+ */
14415
+ this.stateChanges = new Subject();
14398
14416
  }
14399
- }
14417
+ });
14400
14418
  /**
14401
14419
  * AbstractMatFormField class
14402
14420
  */
14403
- class AbstractMatFormField extends mixinErrorState(_AbstractMatFormField) {
14421
+ class AbstractMatFormField extends _AbstractMatFormFieldBase {
14404
14422
  /**
14405
14423
  * Constructor
14406
14424
  * @param controlType
@@ -14411,7 +14429,7 @@ class AbstractMatFormField extends mixinErrorState(_AbstractMatFormField) {
14411
14429
  * @param _focusMonitor
14412
14430
  * @param _elementRef
14413
14431
  */
14414
- constructor(controlType, ngControl, _parentForm, _parentFormGroup, _defaultErrorStateMatcher, _focusMonitor, _elementRef) {
14432
+ constructor(controlType, ngControl, _parentForm, _parentFormGroup, _defaultErrorStateMatcher, _focusMonitor, _elementRef, changeDetectorRef) {
14415
14433
  super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);
14416
14434
  this.controlType = controlType;
14417
14435
  this.ngControl = ngControl;
@@ -14420,6 +14438,7 @@ class AbstractMatFormField extends mixinErrorState(_AbstractMatFormField) {
14420
14438
  this._defaultErrorStateMatcher = _defaultErrorStateMatcher;
14421
14439
  this._focusMonitor = _focusMonitor;
14422
14440
  this._elementRef = _elementRef;
14441
+ this.changeDetectorRef = changeDetectorRef;
14423
14442
  /**
14424
14443
  * The placeholder for this control.
14425
14444
  */
@@ -14444,22 +14463,29 @@ class AbstractMatFormField extends mixinErrorState(_AbstractMatFormField) {
14444
14463
  * Whether the control is focused.
14445
14464
  */
14446
14465
  this.focused = false;
14466
+ /**
14467
+ * Whether the control is touched.
14468
+ */
14469
+ this.touched = false;
14447
14470
  if (this.ngControl) {
14448
14471
  this.ngControl.valueAccessor = this;
14449
14472
  }
14450
14473
  _focusMonitor.monitor(this._elementRef.nativeElement, true).subscribe(origin => {
14451
14474
  this.focused = !!origin;
14452
14475
  this.stateChanges.next();
14476
+ this.changeDetectorRef.markForCheck();
14453
14477
  });
14454
14478
  }
14455
14479
  /**
14456
14480
  * Sets the value
14457
14481
  */
14458
14482
  set value(value) {
14483
+ let valueChanged = this._value != value;
14459
14484
  this._value = value;
14460
- if (this.onChange) {
14485
+ if (valueChanged && this.onChange) {
14461
14486
  this.onChange(value);
14462
14487
  }
14488
+ this.stateChanges.next();
14463
14489
  }
14464
14490
  /**
14465
14491
  * Gets the value
@@ -14519,7 +14545,7 @@ class AbstractMatFormField extends mixinErrorState(_AbstractMatFormField) {
14519
14545
  */
14520
14546
  get disabled() {
14521
14547
  if (this.ngControl?.disabled !== null) {
14522
- return this.ngControl.disabled;
14548
+ return this.ngControl?.disabled;
14523
14549
  }
14524
14550
  return this._disabled;
14525
14551
  }
@@ -14610,7 +14636,7 @@ AbstractMatFormField.nextId = 0;
14610
14636
  /** @nocollapse */ AbstractMatFormField.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: AbstractMatFormField, inputs: { placeholder: "placeholder", required: "required", readonly: "readonly", disabled: "disabled" }, host: { listeners: { "focusout": "onBlur()" }, properties: { "id": "this.id", "attr.aria-describedBy": "this.describedBy" } }, usesInheritance: true, ngImport: i0 });
14611
14637
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: AbstractMatFormField, decorators: [{
14612
14638
  type: Directive
14613
- }], ctorParameters: function () { return [{ type: undefined }, { type: i1.NgControl }, { type: i1.NgForm }, { type: i1.FormGroupDirective }, { type: i2.ErrorStateMatcher }, { type: i3$4.FocusMonitor }, { type: i0.ElementRef }]; }, propDecorators: { placeholder: [{
14639
+ }], ctorParameters: function () { return [{ type: undefined }, { type: i1.NgControl }, { type: i1.NgForm }, { type: i1.FormGroupDirective }, { type: i2.ErrorStateMatcher }, { type: i3$4.FocusMonitor }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { placeholder: [{
14614
14640
  type: Input
14615
14641
  }], required: [{
14616
14642
  type: Input
@@ -14672,7 +14698,7 @@ class VdChipsComponent extends AbstractMatFormField {
14672
14698
  * @param elementRef
14673
14699
  */
14674
14700
  constructor(injector, media, changeDetectorRef, ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef) {
14675
- super("app-vd-chips", ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef);
14701
+ super("app-vd-chips", ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef, changeDetectorRef);
14676
14702
  this.injector = injector;
14677
14703
  this.media = media;
14678
14704
  this.changeDetectorRef = changeDetectorRef;
@@ -14696,6 +14722,10 @@ class VdChipsComponent extends AbstractMatFormField {
14696
14722
  * Readonly
14697
14723
  */
14698
14724
  this._paginated = true;
14725
+ /**
14726
+ * Readonly
14727
+ */
14728
+ this._customValue = false;
14699
14729
  /**
14700
14730
  * key: string
14701
14731
  */
@@ -14805,7 +14835,7 @@ class VdChipsComponent extends AbstractMatFormField {
14805
14835
  return super.disabled;
14806
14836
  }
14807
14837
  /**
14808
- * Multiple select option
14838
+ * Pagination
14809
14839
  */
14810
14840
  get paginated() { return this._paginated; }
14811
14841
  set paginated(paginated) {
@@ -14813,9 +14843,14 @@ class VdChipsComponent extends AbstractMatFormField {
14813
14843
  this.stateChanges.next();
14814
14844
  }
14815
14845
  /**
14816
- * Whether the select has a value.
14846
+ * Custom value
14817
14847
  */
14818
- get empty() { return this.chips.length <= 0; }
14848
+ get customValue() { return this._customValue; }
14849
+ set customValue(customValue) {
14850
+ this._customValue = coerceBooleanProperty(customValue);
14851
+ this.key = customValue && this.key == 'id' ? 'name' : this.key;
14852
+ this.stateChanges.next();
14853
+ }
14819
14854
  /**
14820
14855
  * Whether the `MatFormField` label should try to float.
14821
14856
  */
@@ -14859,7 +14894,7 @@ class VdChipsComponent extends AbstractMatFormField {
14859
14894
  this._value = value;
14860
14895
  /* Clear the chips list */
14861
14896
  this.chips = [];
14862
- if (value && this.chips?.length <= 0) {
14897
+ if (!this.customValue && value && this.chips?.length <= 0) {
14863
14898
  this.loading = true;
14864
14899
  let _params = {};
14865
14900
  /* Add includes from params, if any */
@@ -14872,7 +14907,7 @@ class VdChipsComponent extends AbstractMatFormField {
14872
14907
  }
14873
14908
  /* Add projection, if any */
14874
14909
  if (this.projection) {
14875
- _params.projection = this.projection;
14910
+ _params.projection = Array.isArray(this.projection) ? this.projection.join(',') : this.projection;
14876
14911
  }
14877
14912
  /* Get base url */
14878
14913
  var urlParts = this.service?.endpoint?.split('?');
@@ -14883,10 +14918,15 @@ class VdChipsComponent extends AbstractMatFormField {
14883
14918
  this.chips.push(x);
14884
14919
  /* Emit selected event */
14885
14920
  this.initSelect.emit(x);
14921
+ this.focused = true;
14922
+ this.changeDetectorRef.detectChanges();
14886
14923
  },
14887
14924
  error: () => this.loading = false
14888
14925
  });
14889
14926
  }
14927
+ else if (this.customValue) {
14928
+ this.chips = value ? [{ [this.key]: value }] : [];
14929
+ }
14890
14930
  else {
14891
14931
  this.clear(false);
14892
14932
  }
@@ -14911,7 +14951,20 @@ class VdChipsComponent extends AbstractMatFormField {
14911
14951
  * Sets control focus
14912
14952
  */
14913
14953
  focus() {
14914
- // this.autoCompleteChipList?.focus();
14954
+ this.filterInput?.nativeElement?.focus();
14955
+ }
14956
+ /**
14957
+ * Handles blur event of the input box
14958
+ * @param event
14959
+ */
14960
+ addOnBlur(event) {
14961
+ const target = event.relatedTarget;
14962
+ if (!target || target.tagName !== 'MAT-OPTION') {
14963
+ let value = this.filterInput?.nativeElement?.value;
14964
+ if (value) {
14965
+ this.addChip({ [this.key]: value }, this.filterInput);
14966
+ }
14967
+ }
14915
14968
  }
14916
14969
  /**
14917
14970
  * Adds a chip
@@ -15009,7 +15062,7 @@ class VdChipsComponent extends AbstractMatFormField {
15009
15062
  */
15010
15063
  getQueryParams() {
15011
15064
  /* Init params if null */
15012
- var params = this._params;
15065
+ var params = this._params || {};
15013
15066
  /* Add projection, if any */
15014
15067
  if (this.projection) {
15015
15068
  params.projection = this.projection;
@@ -15025,10 +15078,22 @@ class VdChipsComponent extends AbstractMatFormField {
15025
15078
  }
15026
15079
  }
15027
15080
  /** @nocollapse */ VdChipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipsComponent, deps: [{ token: i0.Injector }, { token: VdMediaService }, { token: i0.ChangeDetectorRef }, { token: i1.NgControl, optional: true, self: true }, { token: i1.NgForm, optional: true }, { token: i1.FormGroupDirective, optional: true }, { token: i2.ErrorStateMatcher }, { token: i3$4.FocusMonitor }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
15028
- /** @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:2em;height:2em;margin-top:-6px}: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}::ng-deep mat-form-field.mat-form-field-type-app-vd-chips .mat-form-field-infix{padding:0;min-height:44px;display:flex;align-items:center;flex-direction:row}\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"] }] });
15081
+ /** @nocollapse */ VdChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: VdChipsComponent, selector: "vd-chips", inputs: { classType: "classType", chips: "chips", endpoint: "endpoint", params: "params", projection: "projection", paginated: "paginated", customValue: "customValue", 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: [
15082
+ { provide: MatFormFieldControl, useExisting: VdChipsComponent },
15083
+ {
15084
+ provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,
15085
+ useValue: { overlayPanelClass: 'vd-chips-autocomplete' }
15086
+ }
15087
+ ], queries: [{ propertyName: "chipTemplate", first: true, predicate: VdChipDirective, descendants: true }, { propertyName: "autocompleteOptionTemplate", first: true, predicate: VdAutocompleteOptionDirective, descendants: true }], viewQueries: [{ propertyName: "dynamicTable", first: true, predicate: VdDynamicTableComponent, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }, { propertyName: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-chip-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:2em;height:2em;margin-top:-6px}: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}::ng-deep mat-form-field.mat-form-field-type-app-vd-chips .mat-form-field-infix{padding:0;min-height:44px;display:flex;align-items:center;flex-direction:row}\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"] }] });
15029
15088
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipsComponent, decorators: [{
15030
15089
  type: Component,
15031
- 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:2em;height:2em;margin-top:-6px}: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}::ng-deep mat-form-field.mat-form-field-type-app-vd-chips .mat-form-field-infix{padding:0;min-height:44px;display:flex;align-items:center;flex-direction:row}\n"] }]
15090
+ args: [{ selector: 'vd-chips', providers: [
15091
+ { provide: MatFormFieldControl, useExisting: VdChipsComponent },
15092
+ {
15093
+ provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,
15094
+ useValue: { overlayPanelClass: 'vd-chips-autocomplete' }
15095
+ }
15096
+ ], 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:2em;height:2em;margin-top:-6px}: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}::ng-deep mat-form-field.mat-form-field-type-app-vd-chips .mat-form-field-infix{padding:0;min-height:44px;display:flex;align-items:center;flex-direction:row}\n"] }]
15032
15097
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: VdMediaService }, { type: i0.ChangeDetectorRef }, { type: i1.NgControl, decorators: [{
15033
15098
  type: Optional
15034
15099
  }, {
@@ -15048,6 +15113,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
15048
15113
  }], sort: [{
15049
15114
  type: ViewChild,
15050
15115
  args: [MatSort, { static: false }]
15116
+ }], filterInput: [{
15117
+ type: ViewChild,
15118
+ args: ['filterInput', { static: false }]
15051
15119
  }], chips: [{
15052
15120
  type: Input
15053
15121
  }], chipTemplate: [{
@@ -15070,6 +15138,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
15070
15138
  type: Input
15071
15139
  }], paginated: [{
15072
15140
  type: Input
15141
+ }], customValue: [{
15142
+ type: Input
15073
15143
  }], context: [{
15074
15144
  type: Input
15075
15145
  }], key: [{
@@ -15112,7 +15182,8 @@ const MATRIAL_DECLARATIONS = [
15112
15182
  MatSelectModule,
15113
15183
  MatAutocompleteModule,
15114
15184
  MatProgressSpinnerModule,
15115
- MatPaginatorModule
15185
+ MatPaginatorModule,
15186
+ MatDividerModule
15116
15187
  ];
15117
15188
  class VdChipsModule {
15118
15189
  }
@@ -15129,7 +15200,8 @@ class VdChipsModule {
15129
15200
  MatSelectModule,
15130
15201
  MatAutocompleteModule,
15131
15202
  MatProgressSpinnerModule,
15132
- MatPaginatorModule], exports: [VdChipsComponent,
15203
+ MatPaginatorModule,
15204
+ MatDividerModule], exports: [VdChipsComponent,
15133
15205
  VdAutocompleteOptionDirective,
15134
15206
  VdChipDirective] });
15135
15207
  /** @nocollapse */ VdChipsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdChipsModule, imports: [[
@@ -15642,9 +15714,10 @@ class VdSelectComponent extends AbstractMatFormField {
15642
15714
  * @param focusMonitor
15643
15715
  * @param elementRef
15644
15716
  */
15645
- constructor(injector, ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef) {
15646
- super("vd-select", ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef);
15717
+ constructor(injector, ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef, changeDetectorRef) {
15718
+ super("vd-select", ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, focusMonitor, elementRef, changeDetectorRef);
15647
15719
  this.injector = injector;
15720
+ this.changeDetectorRef = changeDetectorRef;
15648
15721
  /**
15649
15722
  * The http service from to get the data
15650
15723
  */
@@ -15951,7 +16024,7 @@ class VdSelectComponent extends AbstractMatFormField {
15951
16024
  }
15952
16025
  }
15953
16026
  }
15954
- /** @nocollapse */ VdSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdSelectComponent, 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 });
16027
+ /** @nocollapse */ VdSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdSelectComponent, 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 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
15955
16028
  /** @nocollapse */ VdSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: VdSelectComponent, selector: "vd-select", inputs: { multiple: "multiple", disabled: "disabled", sorted: "sorted", textPrefix: "textPrefix", endpoint: "endpoint", params: "params", projection: "projection", enum: "enum", key: "key", text: "text", prefix: "prefix", options: "options", filteredOptions: "filteredOptions", filterable: "filterable", cache: "cache", sortBy: "sortBy", mapper: "mapper", compareWith: "compareWith", searchField: "searchField" }, outputs: { onValueChange: "change", onItemChange: "itemChange", onSelected: "selected", onItemSelected: "itemSelected", onLaunch: "launch" }, providers: [{ provide: MatFormFieldControl, useExisting: VdSelectComponent }], queries: [{ propertyName: "optionTemplate", first: true, predicate: VdSelectOptionDirective, descendants: true }, { propertyName: "triggerTemplate", first: true, predicate: VdSelectTriggerDirective, descendants: true }], viewQueries: [{ propertyName: "selectEl", first: true, predicate: MatSelect, descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-select [placeholder]=\"placeholder\" i18n-placeholder [(ngModel)]=\"value\" #select=\"matSelect\" (selectionChange)=\"handleChange($event)\" *ngIf=\"!readonly\" [multiple]=\"multiple\" [compareWith]=\"compareWith\" [disabled]=\"disabled\" flex>\r\n <!-- #region Filter input -->\r\n <div *ngIf=\"filterable\" class=\"vd-select-filter-wrap\">\r\n <div class=\"vd-select-filter-inner\">\r\n <a mat-icon-button disabled *ngIf=\"!filterInput.value\">\r\n <mat-icon>search</mat-icon>\r\n </a>\r\n <a mat-icon-button *ngIf=\"filterInput.value\" (click)=\"filterInput.value = null; handleFilter('')\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n <input #filterInput type=\"text\" placeholder=\"Filter...\" class=\"vd-select-filter mat-input-element\" (keyup)=\"handleFilter($event.target.value)\">\r\n </div>\r\n <div class=\"mat-divider\"></div>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Trigger for launch button -->\r\n <mat-select-trigger *ngIf=\"onLaunch?.observers?.length > 0\">\r\n <span>{{getTriggerValues(select.selected)}}</span>\r\n <mat-icon class=\"vd-select-launch\" (click)=\"$event.stopPropagation(); handleLaunchClicked(value)\">launch</mat-icon>\r\n </mat-select-trigger>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Custom trigger template -->\r\n <mat-select-trigger *ngIf=\"!onLaunch?.observers?.length && triggerTemplate?.templateRef\">\r\n <ng-template *ngIf=\"triggerTemplate?.templateRef\" [ngTemplateOutlet]=\"triggerTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ trigger: getTriggerValues(select.selected) }\"></ng-template>\r\n </mat-select-trigger>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Option template as trigger -->\r\n <mat-select-trigger *ngIf=\"!onLaunch?.observers?.length && !triggerTemplate?.templateRef && optionTemplate?.templateRef\">\r\n <ng-template *ngIf=\"optionTemplate?.templateRef\" [ngTemplateOutlet]=\"optionTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ trigger: getTriggerValues(select.selected) }\"></ng-template>\r\n </mat-select-trigger>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Default option -->\r\n <mat-option class=\"tc-grey-500\" *ngIf=\"!multiple\" i18n=\"@@pleaseSelect\">--- Please Select ---</mat-option>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Options -->\r\n <ng-template let-option let-first=\"first\" ngFor [ngForOf]=\"filteredOptions\">\r\n <mat-option [value]=\"mapper ? option : option[key]\">\r\n <span *ngIf=\"!optionTemplate?.templateRef\" i18n=\"@@selection\">{option[text], select, option {option} other {{{option[text]}}}}</span>\r\n <ng-template *ngIf=\"optionTemplate?.templateRef\" [ngTemplateOutlet]=\"optionTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ option: option }\"></ng-template>\r\n </mat-option>\r\n </ng-template>\r\n <!-- #endregion -->\r\n</mat-select>\r\n\r\n<!-- #region Read only value -->\r\n<div *ngIf=\"readonly\">\r\n <div *ngIf=\"currentValue\">\r\n <div class=\"readonly-value\">\r\n <span *ngIf=\"!optionTemplate?.templateRef && !triggerTemplate?.templateRef\">\r\n <span *ngIf=\"!multiple\" i18n=\"@@selection\">{currentValue[text], select, option {option} other {{{currentValue[text]}}}}</span>\r\n <ng-container *ngIf=\"multiple\">\r\n <span *ngFor=\"let optionValue of currentValue; let last = last\">\r\n <span i18n=\"@@selection\">{optionValue[text], select, option {option} other {{{optionValue[text]}}}}</span>\r\n <span *ngIf=\"!last\">,&nbsp;</span>\r\n </span>\r\n </ng-container>\r\n </span>\r\n <ng-template *ngIf=\"triggerTemplate?.templateRef\" [ngTemplateOutlet]=\"triggerTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ trigger: currentValue }\"></ng-template>\r\n <ng-template *ngIf=\"optionTemplate?.templateRef && !triggerTemplate?.templateRef\" [ngTemplateOutlet]=\"optionTemplate?.templateRef\" [ngTemplateOutletContext]=\"{ option: currentValue }\"></ng-template>\r\n </div>\r\n <mat-icon *ngIf=\"onLaunch?.observers?.length > 0\" class=\"vd-select-launch-readonly\" (click)=\"$event.stopPropagation(); handleLaunchClicked(value)\">launch</mat-icon>\r\n </div>\r\n <div *ngIf=\"!currentValue\">&nbsp;</div>\r\n</div>\r\n<!-- #endregion -->", styles: [".vd-select-launch{position:absolute;right:30px;top:-5px;font-size:18px;cursor:pointer}.readonly-value{padding-right:24px;opacity:.6;min-height:15px}.vd-select-launch-readonly{position:absolute;right:0px;top:9px;font-size:18px;cursor:pointer}.vd-select-filter-wrap{background:inherit;position:sticky;top:0;box-sizing:border-box;z-index:100}.vd-select-filter-wrap .vd-select-filter-inner{z-index:100;display:flex;flex-direction:row;align-items:center;background:inherit}.vd-select-filter-wrap .vd-select-filter-inner .mat-icon-button{margin:4px}.vd-select-filter-wrap .vd-select-filter-inner .vd-select-filter{box-shadow:none;padding:16px 16px 16px 0;box-sizing:border-box}.vd-select-filter-wrap .mat-divider{display:block;width:100%;border-top-width:1px;border-top-style:solid;box-sizing:border-box}\n"], components: [{ type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { 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: i2.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: i4$3.MatSelectTrigger, selector: "mat-select-trigger" }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
15956
16029
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdSelectComponent, decorators: [{
15957
16030
  type: Component,
@@ -15964,7 +16037,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
15964
16037
  type: Optional
15965
16038
  }] }, { type: i1.FormGroupDirective, decorators: [{
15966
16039
  type: Optional
15967
- }] }, { type: i2.ErrorStateMatcher }, { type: i3$4.FocusMonitor }, { type: i0.ElementRef }]; }, propDecorators: { optionTemplate: [{
16040
+ }] }, { type: i2.ErrorStateMatcher }, { type: i3$4.FocusMonitor }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { optionTemplate: [{
15968
16041
  type: ContentChild,
15969
16042
  args: [VdSelectOptionDirective]
15970
16043
  }], triggerTemplate: [{
@@ -16234,7 +16307,7 @@ class VdGenericFormComponent {
16234
16307
  }
16235
16308
  }
16236
16309
  /** @nocollapse */ VdGenericFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdGenericFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16237
- /** @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 <span [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></span>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <span [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></span>\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 <span [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></span>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <span [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></span>\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]" }] });
16310
+ /** @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 <span [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></span>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <span [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></span>\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 <span [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></span>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <span [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></span>\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", "customValue", "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]" }] });
16238
16311
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: VdGenericFormComponent, decorators: [{
16239
16312
  type: Component,
16240
16313
  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 <span [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></span>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <span [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></span>\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 <span [innerHTML]=\"field.triggerTemplate(trigger, formGroup.value, formGroup, context)\"></span>\r\n </ng-template>\r\n <ng-template vd-select-option let-option=\"option\" *ngIf=\"field.optionTemplate\">\r\n <span [outerHTML]=\"field.optionTemplate(option, formGroup.value, formGroup, context)\"></span>\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: [""] }]