@testgorilla/tgo-ui 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/autocomplete/autocomplete.component.d.ts +106 -0
- package/components/autocomplete/autocomplete.component.module.d.ts +19 -0
- package/components/autocomplete/autocomplete.model.d.ts +13 -0
- package/components/autocomplete/includes.pipe.d.ts +12 -0
- package/components/autocomplete/transform-Item.pipe.d.ts +11 -0
- package/directives/select-text.directive.d.ts +19 -0
- package/esm2022/components/autocomplete/autocomplete.component.mjs +288 -0
- package/esm2022/components/autocomplete/autocomplete.component.module.mjs +81 -0
- package/esm2022/components/autocomplete/autocomplete.model.mjs +16 -0
- package/esm2022/components/autocomplete/includes.pipe.mjs +21 -0
- package/esm2022/components/autocomplete/transform-Item.pipe.mjs +29 -0
- package/esm2022/directives/select-text.directive.mjs +37 -0
- package/esm2022/public-api.mjs +5 -1
- package/esm2022/utils/autocomplete-utils.mjs +61 -0
- package/fesm2022/testgorilla-tgo-ui.mjs +505 -10
- package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/public-api.d.ts +3 -0
- package/src/assets/i18n/en.json +9 -1
- package/utils/autocomplete-utils.d.ts +11 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { trigger, transition, animate, style, state } from '@angular/animations';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ViewEncapsulation, Input, EventEmitter, Output, ChangeDetectionStrategy, NgModule, forwardRef, HostBinding, Directive, HostListener, Injectable, Inject, APP_INITIALIZER, Pipe, ViewChild } from '@angular/core';
|
|
3
|
+
import { Component, ViewEncapsulation, Input, EventEmitter, Output, ChangeDetectionStrategy, NgModule, forwardRef, HostBinding, Directive, HostListener, Injectable, Inject, APP_INITIALIZER, Pipe, ViewChild, inject, ChangeDetectorRef } from '@angular/core';
|
|
4
4
|
import * as i1$1 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
import * as i2$1 from '@angular/material/button';
|
|
@@ -31,7 +31,7 @@ import * as i2$4 from '@angular/material/toolbar';
|
|
|
31
31
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
32
32
|
import * as i5$1 from '@angular/material/menu';
|
|
33
33
|
import { MatMenuModule } from '@angular/material/menu';
|
|
34
|
-
import * as
|
|
34
|
+
import * as i4$2 from '@angular/material/core';
|
|
35
35
|
import { MatRippleModule, MatNativeDateModule } from '@angular/material/core';
|
|
36
36
|
import * as i1$6 from '@angular/material/paginator';
|
|
37
37
|
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
@@ -43,7 +43,7 @@ import { __decorate } from 'tslib';
|
|
|
43
43
|
import { UntilDestroy } from '@ngneat/until-destroy';
|
|
44
44
|
import * as i1$7 from '@ngneat/transloco';
|
|
45
45
|
import { TranslocoModule, TranslocoService } from '@ngneat/transloco';
|
|
46
|
-
import { lastValueFrom, Subscription, ReplaySubject, debounceTime, map } from 'rxjs';
|
|
46
|
+
import { lastValueFrom, Subscription, ReplaySubject, debounceTime, map, startWith } from 'rxjs';
|
|
47
47
|
import * as i4$1 from '@angular/material/sort';
|
|
48
48
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
49
49
|
import * as i3$1 from '@angular/material/table';
|
|
@@ -52,8 +52,11 @@ import * as i6 from '@angular/material/tooltip';
|
|
|
52
52
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
53
53
|
import * as i5$2 from '@angular/material/select';
|
|
54
54
|
import { MatSelectModule } from '@angular/material/select';
|
|
55
|
-
import * as i6$
|
|
55
|
+
import * as i6$1 from '@angular/material/datepicker';
|
|
56
56
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
57
|
+
import * as i3$2 from '@angular/material/autocomplete';
|
|
58
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
59
|
+
import { MatChipsModule } from '@angular/material/chips';
|
|
57
60
|
|
|
58
61
|
const alertBarsUtil = {
|
|
59
62
|
//Set css class and iconName according type
|
|
@@ -3040,7 +3043,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3040
3043
|
type: Injectable
|
|
3041
3044
|
}], ctorParameters: function () { return [{ type: i1$8.MatSnackBar }]; } });
|
|
3042
3045
|
|
|
3043
|
-
const preloadLang = (transloco) => () => {
|
|
3046
|
+
const preloadLang$1 = (transloco) => () => {
|
|
3044
3047
|
transloco.setActiveLang('en');
|
|
3045
3048
|
return lastValueFrom(transloco.load('en'));
|
|
3046
3049
|
};
|
|
@@ -3051,7 +3054,7 @@ class SnackbarComponentModule {
|
|
|
3051
3054
|
SnackbarService,
|
|
3052
3055
|
{
|
|
3053
3056
|
provide: APP_INITIALIZER,
|
|
3054
|
-
useFactory: preloadLang,
|
|
3057
|
+
useFactory: preloadLang$1,
|
|
3055
3058
|
deps: [TranslocoService],
|
|
3056
3059
|
multi: true,
|
|
3057
3060
|
},
|
|
@@ -3067,7 +3070,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3067
3070
|
SnackbarService,
|
|
3068
3071
|
{
|
|
3069
3072
|
provide: APP_INITIALIZER,
|
|
3070
|
-
useFactory: preloadLang,
|
|
3073
|
+
useFactory: preloadLang$1,
|
|
3071
3074
|
deps: [TranslocoService],
|
|
3072
3075
|
multi: true,
|
|
3073
3076
|
},
|
|
@@ -3653,7 +3656,7 @@ class DropdownComponent {
|
|
|
3653
3656
|
useExisting: forwardRef(() => DropdownComponent),
|
|
3654
3657
|
multi: true,
|
|
3655
3658
|
},
|
|
3656
|
-
], ngImport: i0, template: "<mat-form-field appearance=\"outline\" [color]=\"errorsLength ? 'warn' : 'accent'\">\n <mat-label>{{ label }} <span *ngIf=\"required\">*</span></mat-label>\n <mat-select\n #matSelect\n [id]=\"id!\"\n panelClass=\"ui-dropdown-list\"\n [disabled]=\"disabled\"\n [multiple]=\"allowMultipleSelection\"\n [placeholder]=\"placeholder\"\n [value]=\"value\"\n (selectionChange)=\"onChangeOption($event)\"\n [attr.name]=\"name\">\n <div class=\"mat-option-section\" *ngFor=\"let section of valueList\">\n <span *ngIf=\"section.sectionTitle\" class=\"section-title\">{{ section.sectionTitle }}</span>\n <mat-option *ngIf=\"section.value\" #matOption [value]=\"section.value\">\n {{ section.value }}\n </mat-option>\n </div>\n </mat-select>\n <ui-button *ngIf=\"allowClear && !matSelect.empty\" type=\"secondary\" [justIcon]=\"true\" class=\"clear\" iconName=\"Close\" label=\"Clear\" (click)=\"clearValue($event)\"></ui-button>\n <ui-icon color=\"dark\" *ngIf=\"!matSelect.panelOpen\" size=\"24\" name=\"Arrow_down\"></ui-icon>\n <ui-icon color=\"petrol\" *ngIf=\"matSelect.panelOpen\" size=\"24\" name=\"Arrow_up\"></ui-icon>\n <mat-hint class=\"error\" *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of errors\">\n <ui-icon name=\"Error\"></ui-icon>{{ error }}\n </div>\n </mat-hint>\n</mat-form-field>\n", styles: ["ui-dropdown{display:flex}ui-dropdown .mat-mdc-form-field{margin-top:0;width:100%}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper{height:48px;flex:none}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:22px}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mdc-notched-outline{color:#888}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mdc-notched-outline .mdc-floating-label--float-above{transform:translateY(-30px) scale(.75)}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-infix{min-height:48px;padding:4px 0;line-height:22px;display:inline-flex;align-items:center}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-select-arrow-wrapper{display:none}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-floating-label{color:#888}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-bottom-align:before{height:0}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint-wrapper{padding:0}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-infix .mat-mdc-floating-label mat-label{color:#276678}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-focused ui-icon:not(.clear) svg{color:#276678}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline button.mat-mdc-unelevated-button.secondary.only-icon{padding:0;height:auto;background:transparent}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline button.mat-mdc-unelevated-button.secondary.only-icon:hover,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline button.mat-mdc-unelevated-button.secondary.only-icon:focus{background:transparent;color:inherit;border:none;outline:none}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline button.mat-mdc-unelevated-button.secondary.only-icon.focus.cdk-focused.cdk-mouse-focused{background-color:transparent!important}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .clear{position:absolute;right:24px}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .clear mat-icon.black svg{color:#888}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__leading,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__trailing,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__notch{border-color:#cb7b7a}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__leading,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__trailing,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__notch{border-color:#cb7b7a}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-infix .mat-mdc-floating-label mat-label{color:#cb7b7a}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-focused ui-icon svg{color:#888}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-subscript-wrapper{padding:0;margin-top:9px;font-size:12px;line-height:16px;position:relative}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-subscript-wrapper .mat-mdc-form-field-hint-spacer{display:none}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error{display:flex;flex-flow:column;row-gap:4px}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error .errors{display:flex}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error svg{color:#cb7b7a}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error{display:flex}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error ui-icon{margin-right:9px}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled.mat-form-field-appearance-outline .mdc-notched-outline{color:#e0e0e0}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .options .options-container ui-button svg,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .options .options-container ui-icon svg{color:#e0e0e0}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list{margin-top:4px;border-radius:8px!important;box-shadow:0 8px 24px 4px #00000014}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list .mat-mdc-option{display:flex;height:48px;color:#000}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list .mat-mdc-option .mdc-list-item__primary-text{display:flex;align-items:center;justify-content:space-between}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list .mat-option-section .section-title{font-size:12px;text-transform:uppercase;display:flex;height:48px;align-items:center;font-weight:700;padding:0 16px}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple:focus:not(.mdc-list-item--disabled){background-color:#e0e0e0}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mat-mdc-option-active,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mdc-list-item--selected,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mat-mdc-option-active,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mdc-list-item--selected{background-color:#e9f0f1;color:#000}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mat-mdc-option-active:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mat-mdc-option-active:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mdc-list-item--selected:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mdc-list-item--selected:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mat-mdc-option-active:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mat-mdc-option-active:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mdc-list-item--selected:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mdc-list-item--selected:focus:not(.mdc-list-item--disabled){background-color:#c8d7de}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple:focus:not(.mdc-list-item--disabled){background-color:#e0e0e0}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mat-mdc-option-active,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mdc-list-item--selected,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mat-mdc-option-active,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mdc-list-item--selected{background-color:#f0dad9;color:#000}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mat-mdc-option-active:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mat-mdc-option-active:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mdc-list-item--selected:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mdc-list-item--selected:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mat-mdc-option-active:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mat-mdc-option-active:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mdc-list-item--selected:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mdc-list-item--selected:focus:not(.mdc-list-item--disabled){background-color:#e3c3c6}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list .mat-mdc-form-field-hint.error{display:flex;flex-flow:column;row-gap:4px}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list .mat-mdc-form-field-hint.error .errors{display:flex}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color"] }, { kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["size", "type", "label", "iconPosition", "justIcon", "iconName", "disabled", "loading", "fullWidth", "url", "urlTarget", "value"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "component", type: i5$2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i6$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3659
|
+
], ngImport: i0, template: "<mat-form-field appearance=\"outline\" [color]=\"errorsLength ? 'warn' : 'accent'\">\n <mat-label>{{ label }} <span *ngIf=\"required\">*</span></mat-label>\n <mat-select\n #matSelect\n [id]=\"id!\"\n panelClass=\"ui-dropdown-list\"\n [disabled]=\"disabled\"\n [multiple]=\"allowMultipleSelection\"\n [placeholder]=\"placeholder\"\n [value]=\"value\"\n (selectionChange)=\"onChangeOption($event)\"\n [attr.name]=\"name\">\n <div class=\"mat-option-section\" *ngFor=\"let section of valueList\">\n <span *ngIf=\"section.sectionTitle\" class=\"section-title\">{{ section.sectionTitle }}</span>\n <mat-option *ngIf=\"section.value\" #matOption [value]=\"section.value\">\n {{ section.value }}\n </mat-option>\n </div>\n </mat-select>\n <ui-button *ngIf=\"allowClear && !matSelect.empty\" type=\"secondary\" [justIcon]=\"true\" class=\"clear\" iconName=\"Close\" label=\"Clear\" (click)=\"clearValue($event)\"></ui-button>\n <ui-icon color=\"dark\" *ngIf=\"!matSelect.panelOpen\" size=\"24\" name=\"Arrow_down\"></ui-icon>\n <ui-icon color=\"petrol\" *ngIf=\"matSelect.panelOpen\" size=\"24\" name=\"Arrow_up\"></ui-icon>\n <mat-hint class=\"error\" *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of errors\">\n <ui-icon name=\"Error\"></ui-icon>{{ error }}\n </div>\n </mat-hint>\n</mat-form-field>\n", styles: ["ui-dropdown{display:flex}ui-dropdown .mat-mdc-form-field{margin-top:0;width:100%}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper{height:48px;flex:none}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:22px}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mdc-notched-outline{color:#888}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mdc-notched-outline .mdc-floating-label--float-above{transform:translateY(-30px) scale(.75)}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-infix{min-height:48px;padding:4px 0;line-height:22px;display:inline-flex;align-items:center}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-select-arrow-wrapper{display:none}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-floating-label{color:#888}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-bottom-align:before{height:0}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint-wrapper{padding:0}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-infix .mat-mdc-floating-label mat-label{color:#276678}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-focused ui-icon:not(.clear) svg{color:#276678}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline button.mat-mdc-unelevated-button.secondary.only-icon{padding:0;height:auto;background:transparent}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline button.mat-mdc-unelevated-button.secondary.only-icon:hover,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline button.mat-mdc-unelevated-button.secondary.only-icon:focus{background:transparent;color:inherit;border:none;outline:none}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline button.mat-mdc-unelevated-button.secondary.only-icon.focus.cdk-focused.cdk-mouse-focused{background-color:transparent!important}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .clear{position:absolute;right:24px}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .clear mat-icon.black svg{color:#888}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__leading,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__trailing,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__notch{border-color:#cb7b7a}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__leading,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__trailing,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__notch{border-color:#cb7b7a}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-infix .mat-mdc-floating-label mat-label{color:#cb7b7a}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-warn.mat-focused ui-icon svg{color:#888}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-subscript-wrapper{padding:0;margin-top:9px;font-size:12px;line-height:16px;position:relative}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-subscript-wrapper .mat-mdc-form-field-hint-spacer{display:none}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error{display:flex;flex-flow:column;row-gap:4px}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error .errors{display:flex}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error svg{color:#cb7b7a}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error{display:flex}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error ui-icon{margin-right:9px}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled.mat-form-field-appearance-outline .mdc-notched-outline{color:#e0e0e0}ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .options .options-container ui-button svg,ui-dropdown .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .options .options-container ui-icon svg{color:#e0e0e0}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list{margin-top:4px;border-radius:8px!important;box-shadow:0 8px 24px 4px #00000014}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list .mat-mdc-option{display:flex;height:48px;color:#000}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list .mat-mdc-option .mdc-list-item__primary-text{display:flex;align-items:center;justify-content:space-between}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list .mat-option-section .section-title{font-size:12px;text-transform:uppercase;display:flex;height:48px;align-items:center;font-weight:700;padding:0 16px}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple:focus:not(.mdc-list-item--disabled){background-color:#e0e0e0}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mat-mdc-option-active,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mdc-list-item--selected,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mat-mdc-option-active,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mdc-list-item--selected{background-color:#e9f0f1;color:#000}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mat-mdc-option-active:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mat-mdc-option-active:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mdc-list-item--selected:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent mat-option.mdc-list-item--selected:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mat-mdc-option-active:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mat-mdc-option-active:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mdc-list-item--selected:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-accent .mat-mdc-option-multiple.mdc-list-item--selected:focus:not(.mdc-list-item--disabled){background-color:#c8d7de}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple:focus:not(.mdc-list-item--disabled){background-color:#e0e0e0}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mat-mdc-option-active,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mdc-list-item--selected,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mat-mdc-option-active,.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mdc-list-item--selected{background-color:#f0dad9;color:#000}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mat-mdc-option-active:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mat-mdc-option-active:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mdc-list-item--selected:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn mat-option.mdc-list-item--selected:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mat-mdc-option-active:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mat-mdc-option-active:focus:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mdc-list-item--selected:hover:not(.mdc-list-item--disabled),.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list.mat-warn .mat-mdc-option-multiple.mdc-list-item--selected:focus:not(.mdc-list-item--disabled){background-color:#e3c3c6}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list .mat-mdc-form-field-hint.error{display:flex;flex-flow:column;row-gap:4px}.cdk-overlay-container .cdk-overlay-pane .ui-dropdown-list .mat-mdc-form-field-hint.error .errors{display:flex}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color"] }, { kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["size", "type", "label", "iconPosition", "justIcon", "iconName", "disabled", "loading", "fullWidth", "url", "urlTarget", "value"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "component", type: i5$2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i4$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3657
3660
|
}
|
|
3658
3661
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
3659
3662
|
type: Component,
|
|
@@ -3928,7 +3931,7 @@ class DatepickerComponent {
|
|
|
3928
3931
|
useExisting: forwardRef(() => DatepickerComponent),
|
|
3929
3932
|
multi: true,
|
|
3930
3933
|
},
|
|
3931
|
-
], usesOnChanges: true, ngImport: i0, template: "<mat-form-field #uiDatepicker appearance=\"outline\" [color]=\"errorsLength ? 'warn' : 'accent'\">\n <mat-label *ngIf=\"label\">{{ label }}<span *ngIf=\"required\"> *</span></mat-label>\n <ng-container *ngIf=\"!isRange\">\n <input *ngIf=\"!isRange\" matInput\n [matDatepicker]=\"picker\"\n matInput\n (blur)=\"onTouch()\"\n (dateChange)=\"onValueChange($event.value)\"\n [id]=\"id!\"\n [placeholder]=\"placeholder!\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [name]=\"fieldName!\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\">\n <ui-icon matDatepickerToggleIcon name=\"Calendar\" size=\"24\" color=\"inherit\"></ui-icon>\n </mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </ng-container>\n <ng-container *ngIf=\"isRange\">\n <mat-date-range-input *ngIf=\"isRange\" [formGroup]=\"range\" [rangePicker]=\"rangePicker\" >\n <input matStartDate #dateRangeStart formControlName=\"start\" placeholder=\"Start date\" >\n <input matEndDate #dateRangeEnd formControlName=\"end\" placeholder=\"End date\" (dateChange)=\"dateRangeChange(dateRangeStart.value, dateRangeEnd.value)\">\n </mat-date-range-input>\n <mat-datepicker-toggle matIconSuffix [for]=\"rangePicker\">\n <ui-icon matDatepickerToggleIcon name=\"Calendar\" size=\"24\" color=\"inherit\"></ui-icon>\n </mat-datepicker-toggle>\n <mat-date-range-picker #rangePicker></mat-date-range-picker>\n </ng-container>\n <mat-hint class=\"info\" *ngIf=\"hint && !_errors\">{{ hint }}</mat-hint>\n <mat-hint class=\"error\" *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of _errors\"><ui-icon name=\"Error\"></ui-icon>{{ error }}</div>\n </mat-hint>\n</mat-form-field>\n", styles: [".ui-datepicker .mat-mdc-form-field{margin-top:0;min-width:296px}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper{height:48px}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:22px}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mdc-notched-outline{color:#888}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mdc-notched-outline .mdc-floating-label--float-above{transform:translateY(-30px) scale(.75)}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-infix{min-height:48px;max-height:48px;padding:4px 0;line-height:22px;display:inline-flex;align-items:center}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-subscript-wrapper{padding:0 0 12px;margin-top:4px;font-size:12px;line-height:16px;position:relative}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-subscript-wrapper .mat-form-field-hint-spacer{display:none}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.info{color:#888;width:100%}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-bottom-align:before{height:0}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint-wrapper{padding:0}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error,.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error svg{color:#cb7b7a}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error{display:flex}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error ui-icon{margin-right:9px}.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__leading,.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__trailing,.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__notch{border-color:#cb7b7a}.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__leading,.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__trailing,.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__notch{border-color:#cb7b7a}.ui-datepicker .mat-mdc-form-field.mat-warn.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-infix .mat-form-field-label mat-label{color:#cb7b7a}.ui-datepicker .mat-mdc-form-field .mat-mdc-form-field-hint.error{display:flex;flex-flow:column;row-gap:4px}.ui-datepicker .mat-mdc-form-field .mat-mdc-form-field-hint.error .errors{display:flex}.ui-datepicker .mat-mdc-form-field.mat-accent.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline{color:#276678}.ui-datepicker .mat-mdc-form-field.mat-accent.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-infix .mat-form-field-label mat-label{color:#276678}.ui-datepicker .mat-mdc-form-field.mat-form-field-disabled.mat-form-field-appearance-outline .mdc-notched-outline{color:#e0e0e0}.mat-datepicker-content .mat-mdc-button.mat-unthemed .mdc-button__label>span{font-weight:600}.mat-datepicker-content.mat-datepicker-content.mat-accent .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#e9f0f1}.mat-datepicker-content.mat-datepicker-content.mat-accent .mat-calendar-body-in-range:before{background-color:#e9f0f1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6$
|
|
3934
|
+
], usesOnChanges: true, ngImport: i0, template: "<mat-form-field #uiDatepicker appearance=\"outline\" [color]=\"errorsLength ? 'warn' : 'accent'\">\n <mat-label *ngIf=\"label\">{{ label }}<span *ngIf=\"required\"> *</span></mat-label>\n <ng-container *ngIf=\"!isRange\">\n <input *ngIf=\"!isRange\" matInput\n [matDatepicker]=\"picker\"\n matInput\n (blur)=\"onTouch()\"\n (dateChange)=\"onValueChange($event.value)\"\n [id]=\"id!\"\n [placeholder]=\"placeholder!\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [name]=\"fieldName!\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\">\n <ui-icon matDatepickerToggleIcon name=\"Calendar\" size=\"24\" color=\"inherit\"></ui-icon>\n </mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </ng-container>\n <ng-container *ngIf=\"isRange\">\n <mat-date-range-input *ngIf=\"isRange\" [formGroup]=\"range\" [rangePicker]=\"rangePicker\" >\n <input matStartDate #dateRangeStart formControlName=\"start\" placeholder=\"Start date\" >\n <input matEndDate #dateRangeEnd formControlName=\"end\" placeholder=\"End date\" (dateChange)=\"dateRangeChange(dateRangeStart.value, dateRangeEnd.value)\">\n </mat-date-range-input>\n <mat-datepicker-toggle matIconSuffix [for]=\"rangePicker\">\n <ui-icon matDatepickerToggleIcon name=\"Calendar\" size=\"24\" color=\"inherit\"></ui-icon>\n </mat-datepicker-toggle>\n <mat-date-range-picker #rangePicker></mat-date-range-picker>\n </ng-container>\n <mat-hint class=\"info\" *ngIf=\"hint && !_errors\">{{ hint }}</mat-hint>\n <mat-hint class=\"error\" *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of _errors\"><ui-icon name=\"Error\"></ui-icon>{{ error }}</div>\n </mat-hint>\n</mat-form-field>\n", styles: [".ui-datepicker .mat-mdc-form-field{margin-top:0;min-width:296px}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper{height:48px}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:22px}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mdc-notched-outline{color:#888}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mdc-notched-outline .mdc-floating-label--float-above{transform:translateY(-30px) scale(.75)}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-infix{min-height:48px;max-height:48px;padding:4px 0;line-height:22px;display:inline-flex;align-items:center}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-subscript-wrapper{padding:0 0 12px;margin-top:4px;font-size:12px;line-height:16px;position:relative}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-subscript-wrapper .mat-form-field-hint-spacer{display:none}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.info{color:#888;width:100%}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-bottom-align:before{height:0}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint-wrapper{padding:0}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error,.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error svg{color:#cb7b7a}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error{display:flex}.ui-datepicker .mat-mdc-form-field.mat-form-field-appearance-outline .mat-mdc-form-field-hint.error ui-icon{margin-right:9px}.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__leading,.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__trailing,.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline:not(.mdc-text-field--disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline .mdc-notched-outline__notch{border-color:#cb7b7a}.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__leading,.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__trailing,.ui-datepicker .mat-mdc-form-field.mat-warn.mat-form-field-appearance-outline .mdc-notched-outline .mdc-notched-outline__notch{border-color:#cb7b7a}.ui-datepicker .mat-mdc-form-field.mat-warn.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-infix .mat-form-field-label mat-label{color:#cb7b7a}.ui-datepicker .mat-mdc-form-field .mat-mdc-form-field-hint.error{display:flex;flex-flow:column;row-gap:4px}.ui-datepicker .mat-mdc-form-field .mat-mdc-form-field-hint.error .errors{display:flex}.ui-datepicker .mat-mdc-form-field.mat-accent.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-mdc-form-field-flex:hover .mdc-notched-outline{color:#276678}.ui-datepicker .mat-mdc-form-field.mat-accent.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-infix .mat-form-field-label mat-label{color:#276678}.ui-datepicker .mat-mdc-form-field.mat-form-field-disabled.mat-form-field-appearance-outline .mdc-notched-outline{color:#e0e0e0}.mat-datepicker-content .mat-mdc-button.mat-unthemed .mdc-button__label>span{font-weight:600}.mat-datepicker-content.mat-datepicker-content.mat-accent .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:#e9f0f1}.mat-datepicker-content.mat-datepicker-content.mat-accent .mat-calendar-body-in-range:before{background-color:#e9f0f1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3.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"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i6$1.MatDatepickerToggleIcon, selector: "[matDatepickerToggleIcon]" }, { kind: "component", type: i6$1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i6$1.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i6$1.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i6$1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3932
3935
|
}
|
|
3933
3936
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DatepickerComponent, decorators: [{
|
|
3934
3937
|
type: Component,
|
|
@@ -4262,6 +4265,498 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
4262
4265
|
}]
|
|
4263
4266
|
}] });
|
|
4264
4267
|
|
|
4268
|
+
class AutocompleteUtils {
|
|
4269
|
+
static transformDisplayValue(value, textField) {
|
|
4270
|
+
return AutocompleteUtils.isPrimitive(value) ? value : value[textField];
|
|
4271
|
+
}
|
|
4272
|
+
static filterItems(items, inputValue, textField) {
|
|
4273
|
+
if (!AutocompleteUtils.isPrimitive(items) && textField) {
|
|
4274
|
+
return items.filter((item) => item[textField].toLowerCase().includes(inputValue.toLowerCase()));
|
|
4275
|
+
}
|
|
4276
|
+
else {
|
|
4277
|
+
return items.filter((item) => item.toLowerCase().includes(inputValue.toLowerCase()));
|
|
4278
|
+
}
|
|
4279
|
+
}
|
|
4280
|
+
static isPrimitive(value) {
|
|
4281
|
+
if (Array.isArray(value)) {
|
|
4282
|
+
return value.some(item => typeof item !== 'object');
|
|
4283
|
+
}
|
|
4284
|
+
else {
|
|
4285
|
+
return typeof value !== 'object';
|
|
4286
|
+
}
|
|
4287
|
+
}
|
|
4288
|
+
static isArray(value) {
|
|
4289
|
+
return Array.isArray(value);
|
|
4290
|
+
}
|
|
4291
|
+
/// NEW
|
|
4292
|
+
static throwInvalidSetupError() {
|
|
4293
|
+
throw new Error(`AutocompleteComponent textField/valueField properties are not provided!\n
|
|
4294
|
+
Items list that has non primitive values requires textField & valueField to be passed.`);
|
|
4295
|
+
}
|
|
4296
|
+
static excludeSuggestions(items, excludeItems, valueField) {
|
|
4297
|
+
if (AutocompleteUtils.isPrimitive(items)) {
|
|
4298
|
+
return items.filter(item => !excludeItems.find(excludeItem => excludeItem === item));
|
|
4299
|
+
}
|
|
4300
|
+
else {
|
|
4301
|
+
return valueField
|
|
4302
|
+
? items.filter(item => !excludeItems.find(excludeItem => excludeItem[valueField] === item[valueField]))
|
|
4303
|
+
: [];
|
|
4304
|
+
}
|
|
4305
|
+
}
|
|
4306
|
+
static shouldBeObject(value, textField, valueField) {
|
|
4307
|
+
return !!valueField && !!textField && typeof value !== 'object';
|
|
4308
|
+
}
|
|
4309
|
+
static createValueItem(value, textField, valueField) {
|
|
4310
|
+
return AutocompleteUtils.shouldBeObject(value, textField, valueField)
|
|
4311
|
+
? { [textField]: value, [valueField]: value }
|
|
4312
|
+
: value;
|
|
4313
|
+
}
|
|
4314
|
+
static findDuplicate(value, selectedValue, lookupKey) {
|
|
4315
|
+
if (AutocompleteUtils.isArray(value)) {
|
|
4316
|
+
return value.find((v) => {
|
|
4317
|
+
if (!AutocompleteUtils.isPrimitive(v) && lookupKey) {
|
|
4318
|
+
return v[lookupKey] === selectedValue[lookupKey];
|
|
4319
|
+
}
|
|
4320
|
+
return v === selectedValue;
|
|
4321
|
+
});
|
|
4322
|
+
}
|
|
4323
|
+
else {
|
|
4324
|
+
return value === selectedValue;
|
|
4325
|
+
}
|
|
4326
|
+
}
|
|
4327
|
+
}
|
|
4328
|
+
|
|
4329
|
+
var Autocomplete;
|
|
4330
|
+
(function (Autocomplete) {
|
|
4331
|
+
Autocomplete["SINGLE"] = "single";
|
|
4332
|
+
Autocomplete["MULTI"] = "multi";
|
|
4333
|
+
Autocomplete["LARGE"] = "large";
|
|
4334
|
+
})(Autocomplete || (Autocomplete = {}));
|
|
4335
|
+
var Padding;
|
|
4336
|
+
(function (Padding) {
|
|
4337
|
+
Padding[Padding["AUTOCOMPLETE_CONTAINER"] = 80] = "AUTOCOMPLETE_CONTAINER";
|
|
4338
|
+
})(Padding || (Padding = {}));
|
|
4339
|
+
var Timeout;
|
|
4340
|
+
(function (Timeout) {
|
|
4341
|
+
Timeout[Timeout["VIEW_INITIALIZED_AFTER_ACTION"] = 20] = "VIEW_INITIALIZED_AFTER_ACTION";
|
|
4342
|
+
Timeout[Timeout["VIEW_INITIALIZED_COMPONENT_LOAD"] = 500] = "VIEW_INITIALIZED_COMPONENT_LOAD";
|
|
4343
|
+
})(Timeout || (Timeout = {}));
|
|
4344
|
+
|
|
4345
|
+
/**
|
|
4346
|
+
* the SelectTextDirective provides a dynamic way to highlight or style specific text within an element.
|
|
4347
|
+
*/
|
|
4348
|
+
class SelectTextDirective {
|
|
4349
|
+
constructor(el) {
|
|
4350
|
+
this.el = el;
|
|
4351
|
+
}
|
|
4352
|
+
/**
|
|
4353
|
+
* this method utilizes setTimeout to defer the execution until the next tick of the event loop.
|
|
4354
|
+
* The text content of the element is modified by wrapping occurrences of the specified selectText with a <span> element,
|
|
4355
|
+
* applying a bold font-weight style.
|
|
4356
|
+
*/
|
|
4357
|
+
setTextColor() {
|
|
4358
|
+
const textElement = this.el.nativeElement;
|
|
4359
|
+
setTimeout(() => {
|
|
4360
|
+
if (this.selectText && textElement.textContent !== undefined && textElement.textContent !== null) {
|
|
4361
|
+
textElement.innerHTML = textElement.textContent.replace(new RegExp(this.selectText, 'gmi'), match => `<span style="font-weight: bold" >${match}</span>`);
|
|
4362
|
+
}
|
|
4363
|
+
}, 0);
|
|
4364
|
+
}
|
|
4365
|
+
ngOnChanges() {
|
|
4366
|
+
this.setTextColor();
|
|
4367
|
+
}
|
|
4368
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectTextDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4369
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: SelectTextDirective, selector: "[selectText]", inputs: { selectText: "selectText" }, usesOnChanges: true, ngImport: i0 }); }
|
|
4370
|
+
}
|
|
4371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectTextDirective, decorators: [{
|
|
4372
|
+
type: Directive,
|
|
4373
|
+
args: [{
|
|
4374
|
+
selector: '[selectText]',
|
|
4375
|
+
}]
|
|
4376
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { selectText: [{
|
|
4377
|
+
type: Input
|
|
4378
|
+
}] } });
|
|
4379
|
+
|
|
4380
|
+
/**
|
|
4381
|
+
* the TransformItemPipe is designed to selectively extract and return values from objects based on a specified field,
|
|
4382
|
+
* providing a way to transform and display data a template.
|
|
4383
|
+
*/
|
|
4384
|
+
class TransformItemPipe {
|
|
4385
|
+
transform(value, field) {
|
|
4386
|
+
if (AutocompleteUtils.isPrimitive(value)) {
|
|
4387
|
+
return value;
|
|
4388
|
+
}
|
|
4389
|
+
else if (!AutocompleteUtils.isPrimitive(value) && field && value[field]) {
|
|
4390
|
+
return value[field];
|
|
4391
|
+
}
|
|
4392
|
+
else {
|
|
4393
|
+
AutocompleteUtils.throwInvalidSetupError();
|
|
4394
|
+
}
|
|
4395
|
+
}
|
|
4396
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TransformItemPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4397
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TransformItemPipe, name: "transformItem" }); }
|
|
4398
|
+
}
|
|
4399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TransformItemPipe, decorators: [{
|
|
4400
|
+
type: Pipe,
|
|
4401
|
+
args: [{
|
|
4402
|
+
name: 'transformItem',
|
|
4403
|
+
}]
|
|
4404
|
+
}] });
|
|
4405
|
+
|
|
4406
|
+
/**
|
|
4407
|
+
* The purpose of this pipe is to determine if the value is present in the values array.
|
|
4408
|
+
* If values is an array, the method uses the includes method to check for inclusion.
|
|
4409
|
+
* If values is not an array, it checks for strict equality between value and values.
|
|
4410
|
+
*/
|
|
4411
|
+
class IncludesPipe {
|
|
4412
|
+
transform(value, values) {
|
|
4413
|
+
return Array.isArray(values) ? values.includes(value) : value === values;
|
|
4414
|
+
}
|
|
4415
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IncludesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4416
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: IncludesPipe, name: "includes" }); }
|
|
4417
|
+
}
|
|
4418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IncludesPipe, decorators: [{
|
|
4419
|
+
type: Pipe,
|
|
4420
|
+
args: [{
|
|
4421
|
+
name: 'includes',
|
|
4422
|
+
}]
|
|
4423
|
+
}] });
|
|
4424
|
+
|
|
4425
|
+
class AutocompleteComponent {
|
|
4426
|
+
constructor() {
|
|
4427
|
+
/**
|
|
4428
|
+
* @property itemsList
|
|
4429
|
+
* @description The list of items to display in the autocomplete.
|
|
4430
|
+
* @memberof AutocompleteComponent
|
|
4431
|
+
*/
|
|
4432
|
+
this.itemsList = [];
|
|
4433
|
+
/**
|
|
4434
|
+
* @property suggestionsList
|
|
4435
|
+
* @description The list of suggestions to display in the autocomplete.
|
|
4436
|
+
* @memberof AutocompleteComponent
|
|
4437
|
+
*/
|
|
4438
|
+
this.suggestionsList = [];
|
|
4439
|
+
/**
|
|
4440
|
+
* @property disabled
|
|
4441
|
+
* @description If `true`, the autocomplete is disabled.
|
|
4442
|
+
* @memberof AutocompleteComponent
|
|
4443
|
+
*/
|
|
4444
|
+
this.disabled = false;
|
|
4445
|
+
/**
|
|
4446
|
+
* @property allowAdd
|
|
4447
|
+
* @description If `true`, allows adding new values to the autocomplete.
|
|
4448
|
+
* @memberof AutocompleteComponent
|
|
4449
|
+
*/
|
|
4450
|
+
this.allowAdd = true;
|
|
4451
|
+
/**
|
|
4452
|
+
* @property textField
|
|
4453
|
+
* @description The field to be used as the display text in the autocomplete.
|
|
4454
|
+
* @memberof AutocompleteComponent
|
|
4455
|
+
*/
|
|
4456
|
+
this.textField = '';
|
|
4457
|
+
/**
|
|
4458
|
+
* @property valueField
|
|
4459
|
+
* @description The field to be used as the value in the autocomplete.
|
|
4460
|
+
* @memberof AutocompleteComponent
|
|
4461
|
+
*/
|
|
4462
|
+
this.valueField = '';
|
|
4463
|
+
/**
|
|
4464
|
+
* @property label
|
|
4465
|
+
* @description The label for the autocomplete input.
|
|
4466
|
+
* @memberof AutocompleteComponent
|
|
4467
|
+
*/
|
|
4468
|
+
this.label = '';
|
|
4469
|
+
/**
|
|
4470
|
+
* @property type
|
|
4471
|
+
* @description The type of the autocomplete ('single', 'multi', etc.).
|
|
4472
|
+
* @memberof AutocompleteComponent
|
|
4473
|
+
*/
|
|
4474
|
+
this.type = 'multi';
|
|
4475
|
+
/**
|
|
4476
|
+
* @property minCharactersSearch
|
|
4477
|
+
* @description The minimum characters to trigger search.
|
|
4478
|
+
* @memberof AutocompleteComponent
|
|
4479
|
+
*/
|
|
4480
|
+
this.minCharactersSearch = 3;
|
|
4481
|
+
this.selectionChange = new EventEmitter();
|
|
4482
|
+
this.searchTextChange = new EventEmitter();
|
|
4483
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
4484
|
+
this.inputValue = '';
|
|
4485
|
+
this.isInputFocus = false;
|
|
4486
|
+
this.autocompleteType = Autocomplete;
|
|
4487
|
+
this.isOverLapping = false;
|
|
4488
|
+
this.isOverlapChecking = true;
|
|
4489
|
+
this.overlapIndex = 0;
|
|
4490
|
+
this.inputValueSearch$ = new ReplaySubject(1);
|
|
4491
|
+
this.filteredItemsList$ = this.inputValueSearch$.pipe(startWith(''), map(inputValue => inputValue.length ? AutocompleteUtils.filterItems(this.itemsList, inputValue, this.textField) : null));
|
|
4492
|
+
this.filteredSuggestionList$ = this.inputValueSearch$.pipe(map(inputValue => inputValue.length ? AutocompleteUtils.filterItems(this.suggestionsList, inputValue, this.textField) : null));
|
|
4493
|
+
this.searchResult$ = this.inputValueSearch$.pipe(map(inputValue => !!inputValue.trim()));
|
|
4494
|
+
this.translationContext = 'AUTOCOMPLETE.';
|
|
4495
|
+
this.onChange = (_) => { };
|
|
4496
|
+
this.onTouch = () => { };
|
|
4497
|
+
}
|
|
4498
|
+
/**
|
|
4499
|
+
* @property value
|
|
4500
|
+
* @description The selected value(s) in the autocomplete.
|
|
4501
|
+
* @memberof AutocompleteComponent
|
|
4502
|
+
*/
|
|
4503
|
+
set itemValue(v) {
|
|
4504
|
+
this.value = AutocompleteUtils.isArray(v) ? v : [v];
|
|
4505
|
+
}
|
|
4506
|
+
ngOnChanges() {
|
|
4507
|
+
this.itemsList = AutocompleteUtils.excludeSuggestions(this.itemsList, this.suggestionsList, this.valueField);
|
|
4508
|
+
this.initValue();
|
|
4509
|
+
}
|
|
4510
|
+
ngAfterViewInit() {
|
|
4511
|
+
if (this.type !== Autocomplete.LARGE) {
|
|
4512
|
+
this.checkOverlap(Timeout.VIEW_INITIALIZED_COMPONENT_LOAD);
|
|
4513
|
+
}
|
|
4514
|
+
}
|
|
4515
|
+
registerOnChange(fn) {
|
|
4516
|
+
this.onChange = fn;
|
|
4517
|
+
}
|
|
4518
|
+
registerOnTouched(fn) {
|
|
4519
|
+
this.onTouch = fn;
|
|
4520
|
+
}
|
|
4521
|
+
setDisabledState(isDisabled) {
|
|
4522
|
+
this.disabled = isDisabled;
|
|
4523
|
+
}
|
|
4524
|
+
writeValue(value) {
|
|
4525
|
+
this.value = value;
|
|
4526
|
+
}
|
|
4527
|
+
onOptionSelected(event) {
|
|
4528
|
+
const inputValue = event.option.value;
|
|
4529
|
+
const itemValue = AutocompleteUtils.createValueItem(inputValue, this.textField, this.valueField);
|
|
4530
|
+
this.addNewValue(itemValue);
|
|
4531
|
+
if (this.type === this.autocompleteType.MULTI) {
|
|
4532
|
+
this.checkOverlap();
|
|
4533
|
+
}
|
|
4534
|
+
queueMicrotask(() => {
|
|
4535
|
+
if (this.type !== this.autocompleteType.SINGLE) {
|
|
4536
|
+
this.inputValue = '';
|
|
4537
|
+
}
|
|
4538
|
+
else {
|
|
4539
|
+
this.inputValue = AutocompleteUtils.transformDisplayValue(this.value, this.textField);
|
|
4540
|
+
}
|
|
4541
|
+
this.cdr.markForCheck();
|
|
4542
|
+
});
|
|
4543
|
+
this.onUpdate();
|
|
4544
|
+
}
|
|
4545
|
+
onOptionRemoved(input, option) {
|
|
4546
|
+
setTimeout(() => (input.showPanel = false), 0);
|
|
4547
|
+
const foundValue = this.value.find((v) => v === option);
|
|
4548
|
+
if (foundValue) {
|
|
4549
|
+
this.value = this.value.filter((v) => v !== option);
|
|
4550
|
+
}
|
|
4551
|
+
if (this.type === this.autocompleteType.MULTI) {
|
|
4552
|
+
this.checkOverlap();
|
|
4553
|
+
}
|
|
4554
|
+
if (!this.value.length) {
|
|
4555
|
+
this.inputValue = '';
|
|
4556
|
+
}
|
|
4557
|
+
this.onUpdate();
|
|
4558
|
+
}
|
|
4559
|
+
onInputChange(event) {
|
|
4560
|
+
const inputValue = event.target.value;
|
|
4561
|
+
if (inputValue.length >= this.minCharactersSearch) {
|
|
4562
|
+
this.inputValueSearch$.next(inputValue);
|
|
4563
|
+
this.searchTextChange.emit(inputValue);
|
|
4564
|
+
}
|
|
4565
|
+
else {
|
|
4566
|
+
this.inputValueSearch$.next('');
|
|
4567
|
+
}
|
|
4568
|
+
}
|
|
4569
|
+
onClear() {
|
|
4570
|
+
this.inputValue = '';
|
|
4571
|
+
this.value = AutocompleteUtils.isArray(this.value) ? [] : '';
|
|
4572
|
+
this.isOverLapping = false;
|
|
4573
|
+
this.overlapIndex = 0;
|
|
4574
|
+
this.onUpdate();
|
|
4575
|
+
}
|
|
4576
|
+
refillInput() {
|
|
4577
|
+
if (this.value && this.type === this.autocompleteType.SINGLE && !this.inputValue) {
|
|
4578
|
+
this.inputValue = AutocompleteUtils.transformDisplayValue(this.value, this.textField);
|
|
4579
|
+
this.inputValueSearch$.next('');
|
|
4580
|
+
}
|
|
4581
|
+
if (!this.inputValue && this.value?.length) {
|
|
4582
|
+
this.inputValue = ' ';
|
|
4583
|
+
}
|
|
4584
|
+
this.isInputFocus = false;
|
|
4585
|
+
}
|
|
4586
|
+
onFocus() {
|
|
4587
|
+
this.isInputFocus = true;
|
|
4588
|
+
const inputValue = AutocompleteUtils.isArray(this.inputValue) ? this.inputValue[0] : this.inputValue;
|
|
4589
|
+
if (AutocompleteUtils.isPrimitive(inputValue)) {
|
|
4590
|
+
if (inputValue?.match(/^\s+/gm)) {
|
|
4591
|
+
this.inputValue = inputValue.trimStart();
|
|
4592
|
+
}
|
|
4593
|
+
}
|
|
4594
|
+
else {
|
|
4595
|
+
if (inputValue[this.textField]?.match(/^\s+/gm)) {
|
|
4596
|
+
this.inputValue = inputValue[this.textField].trimStart();
|
|
4597
|
+
}
|
|
4598
|
+
}
|
|
4599
|
+
}
|
|
4600
|
+
checkOverlap(delay = Timeout.VIEW_INITIALIZED_AFTER_ACTION) {
|
|
4601
|
+
this.isOverLapping = false;
|
|
4602
|
+
this.isOverlapChecking = true;
|
|
4603
|
+
setTimeout(() => {
|
|
4604
|
+
const inputWidth = this.matFormFieldElement?._textField.nativeElement.clientWidth - Padding.AUTOCOMPLETE_CONTAINER;
|
|
4605
|
+
const tags = this.tagContainer?.nativeElement.querySelectorAll('.value-tag');
|
|
4606
|
+
if (tags) {
|
|
4607
|
+
let width = 0;
|
|
4608
|
+
tags.forEach((tag, index) => {
|
|
4609
|
+
width += tag.getBoundingClientRect().width;
|
|
4610
|
+
if (!this.isOverLapping && width > inputWidth) {
|
|
4611
|
+
this.isOverLapping = true;
|
|
4612
|
+
this.overlapIndex = index;
|
|
4613
|
+
}
|
|
4614
|
+
});
|
|
4615
|
+
this.isOverlapChecking = false;
|
|
4616
|
+
this.cdr.markForCheck();
|
|
4617
|
+
}
|
|
4618
|
+
}, delay);
|
|
4619
|
+
}
|
|
4620
|
+
onUpdate() {
|
|
4621
|
+
this.inputValueSearch$.next('');
|
|
4622
|
+
this.selectionChange.emit(this.value);
|
|
4623
|
+
this.onChange(this.value);
|
|
4624
|
+
}
|
|
4625
|
+
initValue() {
|
|
4626
|
+
if (this.type === this.autocompleteType.SINGLE) {
|
|
4627
|
+
this.inputValue = AutocompleteUtils.transformDisplayValue(this.value[0], this.textField);
|
|
4628
|
+
}
|
|
4629
|
+
if (this.type === this.autocompleteType.MULTI) {
|
|
4630
|
+
this.checkOverlap();
|
|
4631
|
+
}
|
|
4632
|
+
}
|
|
4633
|
+
addNewValue(newValue) {
|
|
4634
|
+
if (this.type !== this.autocompleteType.SINGLE && !this.value) {
|
|
4635
|
+
this.value = [];
|
|
4636
|
+
}
|
|
4637
|
+
const foundDuplicate = AutocompleteUtils.findDuplicate(this.value, newValue, this.textField);
|
|
4638
|
+
if (this.type !== this.autocompleteType.SINGLE) {
|
|
4639
|
+
this.value = foundDuplicate ? this.value.filter((v) => v !== foundDuplicate) : [...this.value, newValue];
|
|
4640
|
+
}
|
|
4641
|
+
else {
|
|
4642
|
+
this.value = newValue;
|
|
4643
|
+
}
|
|
4644
|
+
}
|
|
4645
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4646
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AutocompleteComponent, selector: "ui-autocomplete", inputs: { itemsList: "itemsList", suggestionsList: "suggestionsList", disabled: "disabled", allowAdd: "allowAdd", textField: "textField", valueField: "valueField", label: "label", itemValue: "itemValue", type: "type", minCharactersSearch: "minCharactersSearch" }, outputs: { selectionChange: "selectionChange", searchTextChange: "searchTextChange" }, providers: [
|
|
4647
|
+
{
|
|
4648
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4649
|
+
useExisting: forwardRef(() => AutocompleteComponent),
|
|
4650
|
+
multi: true,
|
|
4651
|
+
},
|
|
4652
|
+
], viewQueries: [{ propertyName: "matFormFieldElement", first: true, predicate: ["matFormField"], descendants: true }, { propertyName: "tagContainer", first: true, predicate: ["tagContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *transloco=\"let t\">\n <div class=\"autocomplete-wrapper\">\n <mat-form-field\n [appearance]=\"'outline'\"\n #matFormField\n [ngClass]=\"{ 'large-size': type === autocompleteType.LARGE, disabled: disabled }\"\n >\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <div class=\"input-container\">\n <div\n class=\"selected-items\"\n #tagContainer\n *ngIf=\"\n (type === autocompleteType.LARGE && this.value) ||\n (!(inputValue && this.isInputFocus) && this.value && type !== autocompleteType.SINGLE)\n \"\n >\n <ui-tag\n class=\"value-tag\"\n [id]=\"'ui-tag-' + i\"\n *ngFor=\"let valueItem of value; let i = index\"\n [label]=\"valueItem | transformItem: textField\"\n [allowClose]=\"true\"\n [style.display]=\"isOverLapping && i >= overlapIndex ? 'none' : 'block'\"\n [ngClass]=\"{\n 'overlap-tag': isOverlapChecking && overlapIndex && i >= overlapIndex && type === autocompleteType.MULTI\n }\"\n (close)=\"onOptionRemoved(autocomplete, valueItem)\"\n ></ui-tag>\n <ng-container *ngIf=\"isOverLapping\">\n <div *ngIf=\"!overlapIndex; else overlapTag\" class=\"overlap-count\">\n {{ t(translationContext + 'SELECTED_AMOUNT', { numberSelected: (value | slice: overlapIndex).length }) }}\n </div>\n <ng-template #overlapTag>\n <ui-tag [readOnly]=\"true\" [label]=\"'+' + (value | slice: overlapIndex).length\"></ui-tag>\n </ng-template>\n </ng-container>\n </div>\n <input\n [disabled]=\"disabled\"\n [ngClass]=\"{ 'unset-margin': this.value && type === autocompleteType.LARGE }\"\n (blur)=\"refillInput()\"\n (focusin)=\"onFocus()\"\n matInput\n [type]=\"'text'\"\n [matAutocomplete]=\"autocomplete\"\n (input)=\"onInputChange($event)\"\n [(ngModel)]=\"inputValue\"\n />\n </div>\n\n <ui-icon\n class=\"remove-selected\"\n [ngClass]=\"{ 'large-input-icon': type === autocompleteType.LARGE }\"\n (click)=\"onClear()\"\n *ngIf=\"inputValue || value?.length\"\n [size]=\"'24'\"\n [name]=\"'Close'\"\n ></ui-icon>\n\n <mat-autocomplete\n #autocomplete\n (optionSelected)=\"onOptionSelected($event)\"\n [hideSingleSelectionIndicator]=\"false\"\n >\n <ng-container *ngIf=\"!(searchResult$ | async)\">\n <mat-optgroup [label]=\"t(translationContext + 'SUGGESTED')\" *ngIf=\"suggestionsList.length\">\n <mat-option\n [ngClass]=\"{ 'selected-option': suggested | includes: value }\"\n *ngFor=\"let suggested of suggestionsList\"\n [value]=\"suggested\"\n >\n <span [selectText]=\"inputValue\">{{ suggested | transformItem: textField }}</span>\n <ui-icon [name]=\"'Check'\"></ui-icon>\n </mat-option>\n </mat-optgroup>\n\n <mat-optgroup [label]=\"t(translationContext + 'SELECTED') | uppercase\" *ngIf=\"value?.length && type !== autocompleteType.SINGLE\">\n <mat-option\n [ngClass]=\"{ 'selected-option': item | includes: value }\"\n *ngFor=\"let item of value\"\n [value]=\"item\"\n >\n <span>{{ item | transformItem: textField }}</span>\n <ui-icon [name]=\"'Check'\"></ui-icon>\n </mat-option>\n </mat-optgroup>\n </ng-container>\n\n <ng-container *ngIf=\"filteredSuggestionList$ | async as filteredSuggestionList\">\n <ng-container *ngIf=\"filteredItemsList$ | async as filteredItemsList\">\n <mat-optgroup [label]=\"t(translationContext + 'SUGGESTED') | uppercase\" *ngIf=\"filteredSuggestionList.length\">\n <mat-option\n [ngClass]=\"{ 'selected-option': item | includes: value }\"\n *ngFor=\"let item of filteredSuggestionList\"\n [value]=\"item\"\n >\n <span [selectText]=\"inputValue\">{{ item | transformItem: textField }}</span>\n <ui-icon [name]=\"'Check'\"></ui-icon>\n </mat-option>\n </mat-optgroup>\n\n <ng-container *ngIf=\"!filteredSuggestionList.length; else showItemListWithGroup\">\n <mat-option\n [ngClass]=\"{ 'selected-option': item | includes: value }\"\n *ngFor=\"let item of filteredItemsList\"\n [value]=\"item\"\n >\n <span [selectText]=\"inputValue\">{{ item | transformItem: textField }}</span>\n <ui-icon [name]=\"'Check'\"></ui-icon>\n </mat-option>\n </ng-container>\n\n <ng-template #showItemListWithGroup>\n <mat-optgroup [label]=\"t(translationContext + 'ALL_ITEMS') | uppercase\" *ngIf=\"filteredItemsList.length\">\n <mat-option\n [ngClass]=\"{ 'selected-option': item | includes: value }\"\n *ngFor=\"let item of filteredItemsList\"\n [value]=\"item\"\n >\n <span [selectText]=\"inputValue\">{{ item | transformItem: textField }}</span>\n <ui-icon [name]=\"'Check'\"></ui-icon>\n </mat-option>\n </mat-optgroup>\n </ng-template>\n\n <ng-container *ngIf=\"!filteredItemsList.length && !filteredSuggestionList.length && inputValue\">\n <ng-container *ngIf=\"allowAdd; else notFound\">\n <mat-option [value]=\"inputValue\">\n <span>{{ t('COMMON.ADD') }}</span>\n <span class=\"add-suggestion\">\"{{ inputValue }}\"</span>\n </mat-option>\n </ng-container>\n\n <ng-template #notFound>\n <mat-option [style.pointer-events]=\"'none'\">\n <span>{{ t(translationContext + 'NO_RESULTS_FOUND') }}</span>\n </mat-option>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n </mat-autocomplete>\n </mat-form-field>\n </div>\n</ng-container>\n", styles: [".large-size input{margin:10px 0}.large-size .selected-items{margin:5px 0;flex-wrap:wrap}.large-size .input-container{display:block}.large-size ::ng-deep .mat-mdc-form-field-infix,.large-size .mat-mdc-form-field-flex{align-items:unset!important}.disabled ui-icon{opacity:.5}.input-container{width:100%;margin:auto;display:flex}.input-container .selected-items{display:flex}.input-container .selected-items .overlap-count{font-size:14px;line-height:20px;width:80px}.input-container .selected-items .overlap-tag{position:absolute;opacity:0}.input-container input{margin-left:4px}.input-container input.unset-margin{margin-top:unset}.add-suggestion{margin:0 5px;color:#000;font-weight:700}.remove-selected{cursor:pointer}.remove-selected.large-input-icon{margin-top:10px}::ng-deep .mdc-menu-surface.mat-mdc-autocomplete-panel{box-shadow:0 8px 24px 4px #00000014;max-height:312px!important}::ng-deep .mat-mdc-form-field{min-width:330px!important}::ng-deep .mat-mdc-option:hover:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-option:focus:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-option.mat-mdc-option-active,::ng-deep .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple):not(.mdc-list-item--disabled){background:#E9F0F1!important}::ng-deep .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important}::ng-deep .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:50%!important}::ng-deep .mat-mdc-text-field-wrapper{padding-left:12px!important}::ng-deep .mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{color:#276678!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch{border-bottom:2px solid #276678!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading{border-left:2px solid #276678!important;border-bottom:2px solid #276678!important;border-top:2px solid #276678!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border:2px solid #276678!important;border-left:unset!important}::ng-deep .mat-mdc-form-field-infix,::ng-deep .mat-mdc-form-field-flex{min-height:48px!important;max-height:184px!important;overflow-y:auto;overflow-x:hidden;padding:0!important;display:flex;justify-content:center;text-align:center;align-items:center;flex-direction:row;width:100%}::ng-deep .mdc-line-ripple{display:none!important}::ng-deep .mat-mdc-option{padding-right:32px;padding-left:12px!important}::ng-deep .mat-mdc-option ui-icon{display:none;position:absolute;right:0;bottom:calc(50% - 8px);margin:0 10px}::ng-deep .mat-mdc-option.selected-option{background:#E9F0F1}::ng-deep .mat-mdc-option.selected-option ui-icon{display:block}::ng-deep .mat-mdc-option.mdc-list-item--selected .mdc-list-item__primary-text,::ng-deep .mat-mdc-option .mdc-list-item--activated .mdc-list-item__primary-text{color:#000!important}::ng-deep .mat-mdc-option .mat-pseudo-checkbox{display:none}::ng-deep .mat-mdc-optgroup .mdc-list-item__primary-text{color:#000;font-size:12px;line-height:16px;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "component", type: i3$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4$2.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: i3$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i3.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"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TagComponent, selector: "ui-tag", inputs: ["label", "icon", "allowClose", "readOnly", "isSelected", "showIconWhenSelected", "isDisabled"], outputs: ["close", "press"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color"] }, { kind: "directive", type: i1$7.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: SelectTextDirective, selector: "[selectText]", inputs: ["selectText"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1$1.SlicePipe, name: "slice" }, { kind: "pipe", type: TransformItemPipe, name: "transformItem" }, { kind: "pipe", type: IncludesPipe, name: "includes" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4653
|
+
}
|
|
4654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
4655
|
+
type: Component,
|
|
4656
|
+
args: [{ selector: 'ui-autocomplete', providers: [
|
|
4657
|
+
{
|
|
4658
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4659
|
+
useExisting: forwardRef(() => AutocompleteComponent),
|
|
4660
|
+
multi: true,
|
|
4661
|
+
},
|
|
4662
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t\">\n <div class=\"autocomplete-wrapper\">\n <mat-form-field\n [appearance]=\"'outline'\"\n #matFormField\n [ngClass]=\"{ 'large-size': type === autocompleteType.LARGE, disabled: disabled }\"\n >\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <div class=\"input-container\">\n <div\n class=\"selected-items\"\n #tagContainer\n *ngIf=\"\n (type === autocompleteType.LARGE && this.value) ||\n (!(inputValue && this.isInputFocus) && this.value && type !== autocompleteType.SINGLE)\n \"\n >\n <ui-tag\n class=\"value-tag\"\n [id]=\"'ui-tag-' + i\"\n *ngFor=\"let valueItem of value; let i = index\"\n [label]=\"valueItem | transformItem: textField\"\n [allowClose]=\"true\"\n [style.display]=\"isOverLapping && i >= overlapIndex ? 'none' : 'block'\"\n [ngClass]=\"{\n 'overlap-tag': isOverlapChecking && overlapIndex && i >= overlapIndex && type === autocompleteType.MULTI\n }\"\n (close)=\"onOptionRemoved(autocomplete, valueItem)\"\n ></ui-tag>\n <ng-container *ngIf=\"isOverLapping\">\n <div *ngIf=\"!overlapIndex; else overlapTag\" class=\"overlap-count\">\n {{ t(translationContext + 'SELECTED_AMOUNT', { numberSelected: (value | slice: overlapIndex).length }) }}\n </div>\n <ng-template #overlapTag>\n <ui-tag [readOnly]=\"true\" [label]=\"'+' + (value | slice: overlapIndex).length\"></ui-tag>\n </ng-template>\n </ng-container>\n </div>\n <input\n [disabled]=\"disabled\"\n [ngClass]=\"{ 'unset-margin': this.value && type === autocompleteType.LARGE }\"\n (blur)=\"refillInput()\"\n (focusin)=\"onFocus()\"\n matInput\n [type]=\"'text'\"\n [matAutocomplete]=\"autocomplete\"\n (input)=\"onInputChange($event)\"\n [(ngModel)]=\"inputValue\"\n />\n </div>\n\n <ui-icon\n class=\"remove-selected\"\n [ngClass]=\"{ 'large-input-icon': type === autocompleteType.LARGE }\"\n (click)=\"onClear()\"\n *ngIf=\"inputValue || value?.length\"\n [size]=\"'24'\"\n [name]=\"'Close'\"\n ></ui-icon>\n\n <mat-autocomplete\n #autocomplete\n (optionSelected)=\"onOptionSelected($event)\"\n [hideSingleSelectionIndicator]=\"false\"\n >\n <ng-container *ngIf=\"!(searchResult$ | async)\">\n <mat-optgroup [label]=\"t(translationContext + 'SUGGESTED')\" *ngIf=\"suggestionsList.length\">\n <mat-option\n [ngClass]=\"{ 'selected-option': suggested | includes: value }\"\n *ngFor=\"let suggested of suggestionsList\"\n [value]=\"suggested\"\n >\n <span [selectText]=\"inputValue\">{{ suggested | transformItem: textField }}</span>\n <ui-icon [name]=\"'Check'\"></ui-icon>\n </mat-option>\n </mat-optgroup>\n\n <mat-optgroup [label]=\"t(translationContext + 'SELECTED') | uppercase\" *ngIf=\"value?.length && type !== autocompleteType.SINGLE\">\n <mat-option\n [ngClass]=\"{ 'selected-option': item | includes: value }\"\n *ngFor=\"let item of value\"\n [value]=\"item\"\n >\n <span>{{ item | transformItem: textField }}</span>\n <ui-icon [name]=\"'Check'\"></ui-icon>\n </mat-option>\n </mat-optgroup>\n </ng-container>\n\n <ng-container *ngIf=\"filteredSuggestionList$ | async as filteredSuggestionList\">\n <ng-container *ngIf=\"filteredItemsList$ | async as filteredItemsList\">\n <mat-optgroup [label]=\"t(translationContext + 'SUGGESTED') | uppercase\" *ngIf=\"filteredSuggestionList.length\">\n <mat-option\n [ngClass]=\"{ 'selected-option': item | includes: value }\"\n *ngFor=\"let item of filteredSuggestionList\"\n [value]=\"item\"\n >\n <span [selectText]=\"inputValue\">{{ item | transformItem: textField }}</span>\n <ui-icon [name]=\"'Check'\"></ui-icon>\n </mat-option>\n </mat-optgroup>\n\n <ng-container *ngIf=\"!filteredSuggestionList.length; else showItemListWithGroup\">\n <mat-option\n [ngClass]=\"{ 'selected-option': item | includes: value }\"\n *ngFor=\"let item of filteredItemsList\"\n [value]=\"item\"\n >\n <span [selectText]=\"inputValue\">{{ item | transformItem: textField }}</span>\n <ui-icon [name]=\"'Check'\"></ui-icon>\n </mat-option>\n </ng-container>\n\n <ng-template #showItemListWithGroup>\n <mat-optgroup [label]=\"t(translationContext + 'ALL_ITEMS') | uppercase\" *ngIf=\"filteredItemsList.length\">\n <mat-option\n [ngClass]=\"{ 'selected-option': item | includes: value }\"\n *ngFor=\"let item of filteredItemsList\"\n [value]=\"item\"\n >\n <span [selectText]=\"inputValue\">{{ item | transformItem: textField }}</span>\n <ui-icon [name]=\"'Check'\"></ui-icon>\n </mat-option>\n </mat-optgroup>\n </ng-template>\n\n <ng-container *ngIf=\"!filteredItemsList.length && !filteredSuggestionList.length && inputValue\">\n <ng-container *ngIf=\"allowAdd; else notFound\">\n <mat-option [value]=\"inputValue\">\n <span>{{ t('COMMON.ADD') }}</span>\n <span class=\"add-suggestion\">\"{{ inputValue }}\"</span>\n </mat-option>\n </ng-container>\n\n <ng-template #notFound>\n <mat-option [style.pointer-events]=\"'none'\">\n <span>{{ t(translationContext + 'NO_RESULTS_FOUND') }}</span>\n </mat-option>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n </mat-autocomplete>\n </mat-form-field>\n </div>\n</ng-container>\n", styles: [".large-size input{margin:10px 0}.large-size .selected-items{margin:5px 0;flex-wrap:wrap}.large-size .input-container{display:block}.large-size ::ng-deep .mat-mdc-form-field-infix,.large-size .mat-mdc-form-field-flex{align-items:unset!important}.disabled ui-icon{opacity:.5}.input-container{width:100%;margin:auto;display:flex}.input-container .selected-items{display:flex}.input-container .selected-items .overlap-count{font-size:14px;line-height:20px;width:80px}.input-container .selected-items .overlap-tag{position:absolute;opacity:0}.input-container input{margin-left:4px}.input-container input.unset-margin{margin-top:unset}.add-suggestion{margin:0 5px;color:#000;font-weight:700}.remove-selected{cursor:pointer}.remove-selected.large-input-icon{margin-top:10px}::ng-deep .mdc-menu-surface.mat-mdc-autocomplete-panel{box-shadow:0 8px 24px 4px #00000014;max-height:312px!important}::ng-deep .mat-mdc-form-field{min-width:330px!important}::ng-deep .mat-mdc-option:hover:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-option:focus:not(.mdc-list-item--disabled),::ng-deep .mat-mdc-option.mat-mdc-option-active,::ng-deep .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple):not(.mdc-list-item--disabled){background:#E9F0F1!important}::ng-deep .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important}::ng-deep .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:50%!important}::ng-deep .mat-mdc-text-field-wrapper{padding-left:12px!important}::ng-deep .mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{color:#276678!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch{border-bottom:2px solid #276678!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading{border-left:2px solid #276678!important;border-bottom:2px solid #276678!important;border-top:2px solid #276678!important}::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border:2px solid #276678!important;border-left:unset!important}::ng-deep .mat-mdc-form-field-infix,::ng-deep .mat-mdc-form-field-flex{min-height:48px!important;max-height:184px!important;overflow-y:auto;overflow-x:hidden;padding:0!important;display:flex;justify-content:center;text-align:center;align-items:center;flex-direction:row;width:100%}::ng-deep .mdc-line-ripple{display:none!important}::ng-deep .mat-mdc-option{padding-right:32px;padding-left:12px!important}::ng-deep .mat-mdc-option ui-icon{display:none;position:absolute;right:0;bottom:calc(50% - 8px);margin:0 10px}::ng-deep .mat-mdc-option.selected-option{background:#E9F0F1}::ng-deep .mat-mdc-option.selected-option ui-icon{display:block}::ng-deep .mat-mdc-option.mdc-list-item--selected .mdc-list-item__primary-text,::ng-deep .mat-mdc-option .mdc-list-item--activated .mdc-list-item__primary-text{color:#000!important}::ng-deep .mat-mdc-option .mat-pseudo-checkbox{display:none}::ng-deep .mat-mdc-optgroup .mdc-list-item__primary-text{color:#000;font-size:12px;line-height:16px;font-weight:700}\n"] }]
|
|
4663
|
+
}], propDecorators: { itemsList: [{
|
|
4664
|
+
type: Input
|
|
4665
|
+
}], suggestionsList: [{
|
|
4666
|
+
type: Input
|
|
4667
|
+
}], disabled: [{
|
|
4668
|
+
type: Input
|
|
4669
|
+
}], allowAdd: [{
|
|
4670
|
+
type: Input
|
|
4671
|
+
}], textField: [{
|
|
4672
|
+
type: Input
|
|
4673
|
+
}], valueField: [{
|
|
4674
|
+
type: Input
|
|
4675
|
+
}], label: [{
|
|
4676
|
+
type: Input
|
|
4677
|
+
}], itemValue: [{
|
|
4678
|
+
type: Input
|
|
4679
|
+
}], type: [{
|
|
4680
|
+
type: Input
|
|
4681
|
+
}], minCharactersSearch: [{
|
|
4682
|
+
type: Input
|
|
4683
|
+
}], selectionChange: [{
|
|
4684
|
+
type: Output
|
|
4685
|
+
}], searchTextChange: [{
|
|
4686
|
+
type: Output
|
|
4687
|
+
}], matFormFieldElement: [{
|
|
4688
|
+
type: ViewChild,
|
|
4689
|
+
args: ['matFormField']
|
|
4690
|
+
}], tagContainer: [{
|
|
4691
|
+
type: ViewChild,
|
|
4692
|
+
args: ['tagContainer']
|
|
4693
|
+
}] } });
|
|
4694
|
+
|
|
4695
|
+
const preloadLang = (transloco) => () => {
|
|
4696
|
+
transloco.setActiveLang('en');
|
|
4697
|
+
return lastValueFrom(transloco.load('en'));
|
|
4698
|
+
};
|
|
4699
|
+
class AutocompleteComponentModule {
|
|
4700
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutocompleteComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4701
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: AutocompleteComponentModule, declarations: [AutocompleteComponent, TransformItemPipe, IncludesPipe, SelectTextDirective], imports: [CommonModule,
|
|
4702
|
+
MatFormFieldModule,
|
|
4703
|
+
MatAutocompleteModule,
|
|
4704
|
+
MatInputModule,
|
|
4705
|
+
FormsModule,
|
|
4706
|
+
TagComponentModule,
|
|
4707
|
+
MatChipsModule,
|
|
4708
|
+
IconComponentModule,
|
|
4709
|
+
TranslocoModule], exports: [AutocompleteComponent] }); }
|
|
4710
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutocompleteComponentModule, providers: [
|
|
4711
|
+
TransformItemPipe,
|
|
4712
|
+
IncludesPipe,
|
|
4713
|
+
SelectTextDirective,
|
|
4714
|
+
{
|
|
4715
|
+
provide: APP_INITIALIZER,
|
|
4716
|
+
useFactory: preloadLang,
|
|
4717
|
+
deps: [TranslocoService],
|
|
4718
|
+
multi: true,
|
|
4719
|
+
},
|
|
4720
|
+
], imports: [CommonModule,
|
|
4721
|
+
MatFormFieldModule,
|
|
4722
|
+
MatAutocompleteModule,
|
|
4723
|
+
MatInputModule,
|
|
4724
|
+
FormsModule,
|
|
4725
|
+
TagComponentModule,
|
|
4726
|
+
MatChipsModule,
|
|
4727
|
+
IconComponentModule,
|
|
4728
|
+
TranslocoModule] }); }
|
|
4729
|
+
}
|
|
4730
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutocompleteComponentModule, decorators: [{
|
|
4731
|
+
type: NgModule,
|
|
4732
|
+
args: [{
|
|
4733
|
+
declarations: [AutocompleteComponent, TransformItemPipe, IncludesPipe, SelectTextDirective],
|
|
4734
|
+
imports: [
|
|
4735
|
+
CommonModule,
|
|
4736
|
+
MatFormFieldModule,
|
|
4737
|
+
MatAutocompleteModule,
|
|
4738
|
+
MatInputModule,
|
|
4739
|
+
FormsModule,
|
|
4740
|
+
TagComponentModule,
|
|
4741
|
+
MatChipsModule,
|
|
4742
|
+
IconComponentModule,
|
|
4743
|
+
TranslocoModule,
|
|
4744
|
+
],
|
|
4745
|
+
exports: [AutocompleteComponent],
|
|
4746
|
+
providers: [
|
|
4747
|
+
TransformItemPipe,
|
|
4748
|
+
IncludesPipe,
|
|
4749
|
+
SelectTextDirective,
|
|
4750
|
+
{
|
|
4751
|
+
provide: APP_INITIALIZER,
|
|
4752
|
+
useFactory: preloadLang,
|
|
4753
|
+
deps: [TranslocoService],
|
|
4754
|
+
multi: true,
|
|
4755
|
+
},
|
|
4756
|
+
],
|
|
4757
|
+
}]
|
|
4758
|
+
}] });
|
|
4759
|
+
|
|
4265
4760
|
/* eslint-disable */
|
|
4266
4761
|
/* Components */
|
|
4267
4762
|
// Alert Banner
|
|
@@ -4270,5 +4765,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
4270
4765
|
* Generated bundle index. Do not edit.
|
|
4271
4766
|
*/
|
|
4272
4767
|
|
|
4273
|
-
export { AlertBannerComponent, AlertBannerComponentModule, AvatarComponent, AvatarComponentModule, BannerActionComponent, BannerActionComponentModule, ButtonComponent, ButtonComponentModule, CardComponent, CardComponentModule, CheckboxComponent, CheckboxComponentModule, ColumnAlignmentEnum, ColumnTypeEnum, ConfirmDialogComponent, ConfirmDialogComponentModule, CreateAccountComponent, CreateAccountComponentModule, CreatePasswordComponent, CreatePasswordComponentModule, DataPropertyGetterPipe, DatepickerComponent, DatepickerComponentModule, DialogComponent, DialogComponentModule, DialogService, DropdownComponent, DropdownComponentModule, ElevationShadowComponent, ElevationShadowComponentModule, ElevationType, FieldComponent, FieldComponentModule, FileUploadComponent, FileUploadComponentModule, ForgotPasswordComponent, ForgotPasswordComponentModule, IconComponent, IconComponentModule, IconLabelComponent, IconLabelComponentModule, LabelComponent, LabelComponentModule, LabelSizeEnum, LoginComponent, LoginComponentModule, LogoComponent, LogoComponentModule, LogoPathEnum, LogoTypeEnum, NavbarComponent, NavbarComponentModule, NavigationComponent, NavigationComponentModule, PaginatorComponent, PaginatorComponentModule, ProgressBarComponent, ProgressBarComponentModule, RadioButtonComponent, RadioButtonComponentModule, RatingComponent, RatingComponentModule, SnackbarComponent, SnackbarComponentModule, SnackbarService, SpinnerComponent, SpinnerComponentModule, TableComponent, TableComponentModule, TagComponent, TagComponentModule, ToggleComponent, ToggleComponentModule, TooltipComponent, TooltipComponentModule, TooltipPositionType, preloadLang };
|
|
4768
|
+
export { AlertBannerComponent, AlertBannerComponentModule, Autocomplete, AutocompleteComponent, AutocompleteComponentModule, AvatarComponent, AvatarComponentModule, BannerActionComponent, BannerActionComponentModule, ButtonComponent, ButtonComponentModule, CardComponent, CardComponentModule, CheckboxComponent, CheckboxComponentModule, ColumnAlignmentEnum, ColumnTypeEnum, ConfirmDialogComponent, ConfirmDialogComponentModule, CreateAccountComponent, CreateAccountComponentModule, CreatePasswordComponent, CreatePasswordComponentModule, DataPropertyGetterPipe, DatepickerComponent, DatepickerComponentModule, DialogComponent, DialogComponentModule, DialogService, DropdownComponent, DropdownComponentModule, ElevationShadowComponent, ElevationShadowComponentModule, ElevationType, FieldComponent, FieldComponentModule, FileUploadComponent, FileUploadComponentModule, ForgotPasswordComponent, ForgotPasswordComponentModule, IconComponent, IconComponentModule, IconLabelComponent, IconLabelComponentModule, LabelComponent, LabelComponentModule, LabelSizeEnum, LoginComponent, LoginComponentModule, LogoComponent, LogoComponentModule, LogoPathEnum, LogoTypeEnum, NavbarComponent, NavbarComponentModule, NavigationComponent, NavigationComponentModule, Padding, PaginatorComponent, PaginatorComponentModule, ProgressBarComponent, ProgressBarComponentModule, RadioButtonComponent, RadioButtonComponentModule, RatingComponent, RatingComponentModule, SnackbarComponent, SnackbarComponentModule, SnackbarService, SpinnerComponent, SpinnerComponentModule, TableComponent, TableComponentModule, TagComponent, TagComponentModule, Timeout, ToggleComponent, ToggleComponentModule, TooltipComponent, TooltipComponentModule, TooltipPositionType, preloadLang$1 as preloadLang };
|
|
4274
4769
|
//# sourceMappingURL=testgorilla-tgo-ui.mjs.map
|