@meshmakers/shared-ui 0.0.2304-15002 → 0.0.2304-23001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -7
- package/esm2020/lib/confirmation-dialog/confirmation-dialog.module.mjs +4 -4
- package/esm2020/lib/confirmation-dialog/confirmation-window/confirmation-window.component.mjs +8 -4
- package/esm2020/lib/confirmation-dialog/services/confirmation.service.mjs +7 -7
- package/esm2020/lib/ia-shared-ui/ia-autocomplete-input/ia-autocomplete-input.mjs +32 -19
- package/esm2020/lib/ia-shared-ui/ia-entity-select-input/ia-entity-select-input.component.mjs +30 -18
- package/esm2020/lib/ia-shared-ui/ia-multiple-entity-select-input/ia-multiple-entity-select-input.component.mjs +39 -24
- package/esm2020/lib/ia-shared-ui/ia-notification-bar/ia-notification-bar.component.mjs +5 -4
- package/esm2020/lib/ia-shared-ui/ia-shared-ui.module.mjs +4 -4
- package/esm2020/lib/ia-shared-ui/message-details/message-details.component.mjs +3 -3
- package/esm2020/lib/progress-notifier/progress-notifier.module.mjs +4 -4
- package/esm2020/lib/progress-notifier/progress-window/progress-window.component.mjs +5 -4
- package/esm2020/lib/progress-notifier/services/progress-notifier.service.mjs +7 -6
- package/esm2020/lib/progress-notifier/shared/progressValue.mjs +5 -1
- package/esm2020/lib/shared/abstractDetailsComponent.mjs +8 -7
- package/esm2020/lib/shared/commonValidators.mjs +4 -3
- package/fesm2015/meshmakers-shared-ui.mjs +161 -100
- package/fesm2015/meshmakers-shared-ui.mjs.map +1 -1
- package/fesm2020/meshmakers-shared-ui.mjs +148 -99
- package/fesm2020/meshmakers-shared-ui.mjs.map +1 -1
- package/lib/confirmation-dialog/confirmation-window/confirmation-window.component.d.ts +4 -4
- package/lib/confirmation-dialog/services/confirmation.service.d.ts +1 -1
- package/lib/ia-shared-ui/ia-autocomplete-input/ia-autocomplete-input.d.ts +3 -3
- package/lib/ia-shared-ui/ia-entity-select-input/ia-entity-select-input.component.d.ts +4 -4
- package/lib/ia-shared-ui/ia-multiple-entity-select-input/ia-multiple-entity-select-input.component.d.ts +6 -6
- package/lib/ia-shared-ui/ia-notification-bar/ia-notification-bar.component.d.ts +1 -1
- package/lib/progress-notifier/progress-window/progress-window.component.d.ts +1 -1
- package/lib/progress-notifier/shared/progressValue.d.ts +2 -1
- package/lib/shared/abstractDetailsComponent.d.ts +5 -5
- package/package.json +8 -4
|
@@ -16,7 +16,7 @@ import * as i7 from '@angular/forms';
|
|
|
16
16
|
import { FormControl, NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
17
17
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
18
18
|
import { debounceTime, filter, tap, map, switchMap } from 'rxjs/operators';
|
|
19
|
-
import { Subject, BehaviorSubject } from 'rxjs';
|
|
19
|
+
import { Subject, of, BehaviorSubject } from 'rxjs';
|
|
20
20
|
import * as i1$2 from '@angular/cdk/a11y';
|
|
21
21
|
import * as i3$1 from '@angular/material/autocomplete';
|
|
22
22
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
@@ -44,9 +44,9 @@ class MessageDetailsComponent {
|
|
|
44
44
|
ngOnInit() {
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
MessageDetailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
48
|
-
MessageDetailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
47
|
+
MessageDetailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MessageDetailsComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
+
MessageDetailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: MessageDetailsComponent, selector: "app-message-details", ngImport: i0, template: "<mat-dialog-content>\n\n <h2>{{errorMessage.title}}</h2>\n <p>{{errorMessage.message}}</p>\n\n\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <button color=\"primary\" mat-dialog-close mat-raised-button>OK</button>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MessageDetailsComponent, decorators: [{
|
|
50
50
|
type: Component,
|
|
51
51
|
args: [{ selector: 'app-message-details', template: "<mat-dialog-content>\n\n <h2>{{errorMessage.title}}</h2>\n <p>{{errorMessage.message}}</p>\n\n\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <button color=\"primary\" mat-dialog-close mat-raised-button>OK</button>\n</mat-dialog-actions>\n" }]
|
|
52
52
|
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
@@ -58,6 +58,7 @@ class IaNotificationBarComponent {
|
|
|
58
58
|
constructor(messageService, dialog) {
|
|
59
59
|
this.messageService = messageService;
|
|
60
60
|
this.dialog = dialog;
|
|
61
|
+
this.errorMessage = null;
|
|
61
62
|
}
|
|
62
63
|
ngOnInit() {
|
|
63
64
|
this.messageService.getLatestErrorMessage().subscribe(value => {
|
|
@@ -75,9 +76,9 @@ class IaNotificationBarComponent {
|
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
|
-
IaNotificationBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
79
|
-
IaNotificationBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
79
|
+
IaNotificationBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaNotificationBarComponent, deps: [{ token: i1$1.MessageService }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
80
|
+
IaNotificationBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: IaNotificationBarComponent, selector: "ia-notification-bar", ngImport: i0, template: "<mat-toolbar [hidden]=\"!errorMessage\" color=\"warn\">\n <a (click)=\"onShowDetails()\"><span class=\"mat-small\"><u>{{ errorMessage?.title }}</u></span></a>\n\n <!-- This fills the remaining space of the current row -->\n <span class=\"notification-fill-remaining-space\"></span>\n\n <button (click)=\"onHide()\" color=\"warn\" mat-raised-button><i class=\"pi pi-angle-double-up\"></i></button>\n</mat-toolbar>\n", styles: [".notification-fill-remaining-space{flex:1 1 auto}\n"], dependencies: [{ kind: "component", type: i3.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] });
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaNotificationBarComponent, decorators: [{
|
|
81
82
|
type: Component,
|
|
82
83
|
args: [{ selector: 'ia-notification-bar', template: "<mat-toolbar [hidden]=\"!errorMessage\" color=\"warn\">\n <a (click)=\"onShowDetails()\"><span class=\"mat-small\"><u>{{ errorMessage?.title }}</u></span></a>\n\n <!-- This fills the remaining space of the current row -->\n <span class=\"notification-fill-remaining-space\"></span>\n\n <button (click)=\"onHide()\" color=\"warn\" mat-raised-button><i class=\"pi pi-angle-double-up\"></i></button>\n</mat-toolbar>\n", styles: [".notification-fill-remaining-space{flex:1 1 auto}\n"] }]
|
|
83
84
|
}], ctorParameters: function () { return [{ type: i1$1.MessageService }, { type: i1.MatDialog }]; } });
|
|
@@ -98,6 +99,13 @@ class IaAutocompleteInput {
|
|
|
98
99
|
};
|
|
99
100
|
this._onTouched = () => {
|
|
100
101
|
};
|
|
102
|
+
this.ngControl = null;
|
|
103
|
+
this.errorState = false;
|
|
104
|
+
this._selectedString = null;
|
|
105
|
+
this.inputField = null;
|
|
106
|
+
this._dataSource = null;
|
|
107
|
+
this._placeholder = "";
|
|
108
|
+
this._prefix = "";
|
|
101
109
|
this.searchFormControl = new FormControl();
|
|
102
110
|
this.isLoading = false;
|
|
103
111
|
this._disabled = false;
|
|
@@ -133,7 +141,9 @@ class IaAutocompleteInput {
|
|
|
133
141
|
}
|
|
134
142
|
set required(req) {
|
|
135
143
|
this._required = coerceBooleanProperty(req);
|
|
136
|
-
this.inputField
|
|
144
|
+
if (this.inputField) {
|
|
145
|
+
this.inputField.required = this._required;
|
|
146
|
+
}
|
|
137
147
|
this.stateChanges.next();
|
|
138
148
|
}
|
|
139
149
|
get prefix() {
|
|
@@ -158,7 +168,7 @@ class IaAutocompleteInput {
|
|
|
158
168
|
}
|
|
159
169
|
get empty() {
|
|
160
170
|
let n = this.searchFormControl.value;
|
|
161
|
-
return
|
|
171
|
+
return !n;
|
|
162
172
|
}
|
|
163
173
|
get shouldLabelFloat() {
|
|
164
174
|
return this.focused || !this.empty;
|
|
@@ -173,14 +183,16 @@ class IaAutocompleteInput {
|
|
|
173
183
|
if (this._prefix) {
|
|
174
184
|
this.searchFormControl
|
|
175
185
|
.valueChanges
|
|
176
|
-
.pipe(debounceTime(300), filter(value => typeof value === 'string'), filter(value => value.startsWith(this._prefix)), tap(() => this.value = null), tap(() => this.isLoading = true), map(value => this._dataSource
|
|
186
|
+
.pipe(debounceTime(300), filter(value => typeof value === 'string'), filter(value => value.startsWith(this._prefix)), tap(() => this.value = null), tap(() => this.isLoading = true), map(value => this._dataSource?.onPreprocessSearchString(value) ?? ""), switchMap(value => this._dataSource?.onFilter(value) ?? of(null)))
|
|
177
187
|
.subscribe(resultSet => {
|
|
178
|
-
if (resultSet.list
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
188
|
+
if (resultSet && resultSet.list) {
|
|
189
|
+
if (resultSet.list.length === 1) {
|
|
190
|
+
this.value = resultSet.list[0];
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
this.filteredStrings = resultSet.list;
|
|
194
|
+
this.searchFormControl.patchValue(resultSet.searchTerm, { emitEvent: false });
|
|
195
|
+
}
|
|
184
196
|
}
|
|
185
197
|
this.isLoading = false;
|
|
186
198
|
});
|
|
@@ -188,12 +200,14 @@ class IaAutocompleteInput {
|
|
|
188
200
|
// This is the search functionality when search by human.
|
|
189
201
|
this.searchFormControl
|
|
190
202
|
.valueChanges
|
|
191
|
-
.pipe(debounceTime(300), tap(
|
|
203
|
+
.pipe(debounceTime(300), tap(_ => {
|
|
192
204
|
this.filteredStrings = [];
|
|
193
|
-
}), filter(value => value != null && value.toString().length >= 1), tap(() => this.isLoading = true), map(value => this._dataSource
|
|
205
|
+
}), filter(value => value != null && value.toString().length >= 1), tap(() => this.isLoading = true), map(value => this._dataSource?.onPreprocessSearchString(value)), tap(value => this.value = value), switchMap(value => this._dataSource?.onFilter(value) ?? of(null)))
|
|
194
206
|
.subscribe(resultSet => {
|
|
195
|
-
|
|
196
|
-
|
|
207
|
+
if (resultSet && resultSet.list) {
|
|
208
|
+
this.filteredStrings = resultSet.list;
|
|
209
|
+
this.searchFormControl.patchValue(resultSet.searchTerm, { emitEvent: false });
|
|
210
|
+
}
|
|
197
211
|
this.isLoading = false;
|
|
198
212
|
});
|
|
199
213
|
}
|
|
@@ -203,7 +217,7 @@ class IaAutocompleteInput {
|
|
|
203
217
|
}
|
|
204
218
|
ngDoCheck() {
|
|
205
219
|
if (this.ngControl) {
|
|
206
|
-
this.errorState = this.ngControl.invalid && this.ngControl.touched;
|
|
220
|
+
this.errorState = (this.ngControl.invalid && this.ngControl.touched) ?? false;
|
|
207
221
|
this.stateChanges.next();
|
|
208
222
|
}
|
|
209
223
|
}
|
|
@@ -270,8 +284,8 @@ class IaAutocompleteInput {
|
|
|
270
284
|
}
|
|
271
285
|
}
|
|
272
286
|
IaAutocompleteInput.nextId = 0;
|
|
273
|
-
IaAutocompleteInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
274
|
-
IaAutocompleteInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
287
|
+
IaAutocompleteInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaAutocompleteInput, deps: [{ token: i0.ElementRef }, { token: i0.Injector }, { token: i1$2.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
|
|
288
|
+
IaAutocompleteInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: IaAutocompleteInput, selector: "ia-autocomplete", inputs: { dataSource: "dataSource", disabled: "disabled", placeholder: "placeholder", required: "required", prefix: "prefix" }, host: { properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy", "class.floating": "this.shouldLabelFloat" } }, providers: [
|
|
275
289
|
{
|
|
276
290
|
provide: NG_VALUE_ACCESSOR,
|
|
277
291
|
useExisting: forwardRef(() => IaAutocompleteInput),
|
|
@@ -287,7 +301,7 @@ IaAutocompleteInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
287
301
|
multi: true
|
|
288
302
|
}
|
|
289
303
|
], viewQueries: [{ propertyName: "inputField", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<input #input (blur)=\"onTouched()\" (focusout)=\"onFocusOut()\" [formControl]=\"searchFormControl\" [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder\" matInput>\n<mat-autocomplete #auto=\"matAutocomplete\"\n (closed)=\"onAutoCompleteClosed()\" (optionActivated)=\"onOptionActivated($event)\"\n (optionSelected)=\"onOptionSelected($event)\">\n <mat-option *ngIf=\"isLoading\" class=\"is-loading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n </mat-option>\n <ng-container *ngIf=\"!isLoading\">\n <mat-option *ngFor=\"let str of filteredStrings\" [value]=\"str\">\n {{str}}\n </mat-option>\n </ng-container>\n</mat-autocomplete>\n", styles: ["span{opacity:0;transition:opacity .2s}:host.floating span{opacity:1}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i3$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i5.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: i6.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaAutocompleteInput, decorators: [{
|
|
291
305
|
type: Component,
|
|
292
306
|
args: [{ selector: 'ia-autocomplete', host: {
|
|
293
307
|
'[id]': 'id',
|
|
@@ -347,6 +361,12 @@ class IaEntitySelectInput {
|
|
|
347
361
|
};
|
|
348
362
|
this._onTouched = () => {
|
|
349
363
|
};
|
|
364
|
+
this.ngControl = null;
|
|
365
|
+
this.errorState = false;
|
|
366
|
+
this.inputField = null;
|
|
367
|
+
this._dataSource = null;
|
|
368
|
+
this._placeholder = "";
|
|
369
|
+
this._prefix = "";
|
|
350
370
|
this.searchFormControl = new FormControl();
|
|
351
371
|
this.isLoading = false;
|
|
352
372
|
this._disabled = false;
|
|
@@ -382,7 +402,9 @@ class IaEntitySelectInput {
|
|
|
382
402
|
}
|
|
383
403
|
set required(req) {
|
|
384
404
|
this._required = coerceBooleanProperty(req);
|
|
385
|
-
this.inputField
|
|
405
|
+
if (this.inputField) {
|
|
406
|
+
this.inputField.required = this._required;
|
|
407
|
+
}
|
|
386
408
|
this.stateChanges.next();
|
|
387
409
|
}
|
|
388
410
|
get prefix() {
|
|
@@ -404,7 +426,7 @@ class IaEntitySelectInput {
|
|
|
404
426
|
}
|
|
405
427
|
get empty() {
|
|
406
428
|
let n = this.searchFormControl.value;
|
|
407
|
-
return
|
|
429
|
+
return !n;
|
|
408
430
|
}
|
|
409
431
|
get shouldLabelFloat() {
|
|
410
432
|
return this.focused || !this.empty;
|
|
@@ -419,13 +441,15 @@ class IaEntitySelectInput {
|
|
|
419
441
|
if (this._prefix) {
|
|
420
442
|
this.searchFormControl
|
|
421
443
|
.valueChanges
|
|
422
|
-
.pipe(debounceTime(300), filter(value => typeof value === 'string'), filter(value => value.startsWith(this._prefix)), tap(() => this.value = null), tap(() => this.isLoading = true), switchMap(value => this._dataSource
|
|
444
|
+
.pipe(debounceTime(300), filter(value => typeof value === 'string'), filter(value => value.startsWith(this._prefix)), tap(() => this.value = null), tap(() => this.isLoading = true), switchMap(value => this._dataSource?.onFilter(value.replace(this._prefix, "").trim()) ?? of(null)))
|
|
423
445
|
.subscribe(resultSet => {
|
|
424
|
-
if (resultSet.list
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
446
|
+
if (resultSet && resultSet.list) {
|
|
447
|
+
if (resultSet.list.length === 1) {
|
|
448
|
+
this.value = resultSet.list[0];
|
|
449
|
+
}
|
|
450
|
+
else {
|
|
451
|
+
this.filteredEntities = resultSet.list;
|
|
452
|
+
}
|
|
429
453
|
}
|
|
430
454
|
this.isLoading = false;
|
|
431
455
|
});
|
|
@@ -433,9 +457,11 @@ class IaEntitySelectInput {
|
|
|
433
457
|
// This is the search functionality when search by human.
|
|
434
458
|
this.searchFormControl
|
|
435
459
|
.valueChanges
|
|
436
|
-
.pipe(debounceTime(300), tap(() => this.filteredEntities = []), filter(value => typeof value === 'string'), tap(() => this.setValue(null)), filter(value => value.toString().length >= 3), tap(() => this.isLoading = true), switchMap(value => this._dataSource
|
|
460
|
+
.pipe(debounceTime(300), tap(() => this.filteredEntities = []), filter(value => typeof value === 'string'), tap(() => this.setValue(null)), filter(value => value.toString().length >= 3), tap(() => this.isLoading = true), switchMap(value => this._dataSource?.onFilter(value) ?? of(null)))
|
|
437
461
|
.subscribe(resultSet => {
|
|
438
|
-
|
|
462
|
+
if (resultSet && resultSet.list) {
|
|
463
|
+
this.filteredEntities = resultSet.list;
|
|
464
|
+
}
|
|
439
465
|
this.isLoading = false;
|
|
440
466
|
});
|
|
441
467
|
}
|
|
@@ -445,7 +471,7 @@ class IaEntitySelectInput {
|
|
|
445
471
|
}
|
|
446
472
|
ngDoCheck() {
|
|
447
473
|
if (this.ngControl) {
|
|
448
|
-
this.errorState = this.ngControl.invalid && this.ngControl.touched;
|
|
474
|
+
this.errorState = (this.ngControl.invalid && this.ngControl.touched) ?? false;
|
|
449
475
|
this.stateChanges.next();
|
|
450
476
|
}
|
|
451
477
|
}
|
|
@@ -520,8 +546,8 @@ class IaEntitySelectInput {
|
|
|
520
546
|
}
|
|
521
547
|
}
|
|
522
548
|
IaEntitySelectInput.nextId = 0;
|
|
523
|
-
IaEntitySelectInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
524
|
-
IaEntitySelectInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
549
|
+
IaEntitySelectInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaEntitySelectInput, deps: [{ token: i0.ElementRef }, { token: i0.Injector }, { token: i1$2.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
|
|
550
|
+
IaEntitySelectInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: IaEntitySelectInput, selector: "ia-entity-select", inputs: { dataSource: "dataSource", disabled: "disabled", placeholder: "placeholder", required: "required", prefix: "prefix" }, host: { properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy", "class.floating": "this.shouldLabelFloat" } }, providers: [
|
|
525
551
|
{
|
|
526
552
|
provide: NG_VALUE_ACCESSOR,
|
|
527
553
|
useExisting: forwardRef(() => IaEntitySelectInput),
|
|
@@ -536,8 +562,8 @@ IaEntitySelectInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
536
562
|
useExisting: forwardRef(() => IaEntitySelectInput),
|
|
537
563
|
multi: true
|
|
538
564
|
}
|
|
539
|
-
], viewQueries: [{ propertyName: "inputField", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<input #input (blur)=\"onTouched()\" (focusout)=\"onFocusOut()\" [formControl]=\"searchFormControl\" [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder\" matInput>\n<mat-autocomplete #auto=\"matAutocomplete\" (closed)=\"onEntityClosed()\"\n (optionActivated)=\"onEntityActivated($event)\" (optionSelected)=\"onEntitySelected($event)\"\n [displayWith]=\"dataSource
|
|
540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
565
|
+
], viewQueries: [{ propertyName: "inputField", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<input #input (blur)=\"onTouched()\" (focusout)=\"onFocusOut()\" [formControl]=\"searchFormControl\" [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder\" matInput>\n<mat-autocomplete #auto=\"matAutocomplete\" (closed)=\"onEntityClosed()\"\n (optionActivated)=\"onEntityActivated($event)\" (optionSelected)=\"onEntitySelected($event)\"\n [displayWith]=\"dataSource?.onDisplayEntity ?? null\">\n <mat-option *ngIf=\"isLoading\" class=\"is-loading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n </mat-option>\n <ng-container *ngIf=\"!isLoading\">\n <mat-option *ngFor=\"let entity of filteredEntities\" [value]=\"entity\">\n {{dataSource?.onDisplayEntity(entity) ?? null}}\n </mat-option>\n </ng-container>\n</mat-autocomplete>\n", styles: ["span{opacity:0;transition:opacity .2s}:host.floating span{opacity:1}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i3$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i5.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: i6.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaEntitySelectInput, decorators: [{
|
|
541
567
|
type: Component,
|
|
542
568
|
args: [{ selector: 'ia-entity-select', host: {
|
|
543
569
|
'[id]': 'id',
|
|
@@ -557,7 +583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
|
|
|
557
583
|
useExisting: forwardRef(() => IaEntitySelectInput),
|
|
558
584
|
multi: true
|
|
559
585
|
}
|
|
560
|
-
], template: "<input #input (blur)=\"onTouched()\" (focusout)=\"onFocusOut()\" [formControl]=\"searchFormControl\" [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder\" matInput>\n<mat-autocomplete #auto=\"matAutocomplete\" (closed)=\"onEntityClosed()\"\n (optionActivated)=\"onEntityActivated($event)\" (optionSelected)=\"onEntitySelected($event)\"\n [displayWith]=\"dataSource
|
|
586
|
+
], template: "<input #input (blur)=\"onTouched()\" (focusout)=\"onFocusOut()\" [formControl]=\"searchFormControl\" [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder\" matInput>\n<mat-autocomplete #auto=\"matAutocomplete\" (closed)=\"onEntityClosed()\"\n (optionActivated)=\"onEntityActivated($event)\" (optionSelected)=\"onEntitySelected($event)\"\n [displayWith]=\"dataSource?.onDisplayEntity ?? null\">\n <mat-option *ngIf=\"isLoading\" class=\"is-loading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n </mat-option>\n <ng-container *ngIf=\"!isLoading\">\n <mat-option *ngFor=\"let entity of filteredEntities\" [value]=\"entity\">\n {{dataSource?.onDisplayEntity(entity) ?? null}}\n </mat-option>\n </ng-container>\n</mat-autocomplete>\n", styles: ["span{opacity:0;transition:opacity .2s}:host.floating span{opacity:1}\n"] }]
|
|
561
587
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }, { type: i1$2.FocusMonitor }]; }, propDecorators: { id: [{
|
|
562
588
|
type: HostBinding
|
|
563
589
|
}], inputField: [{
|
|
@@ -598,6 +624,13 @@ class IaMultipleEntitySelectInput {
|
|
|
598
624
|
};
|
|
599
625
|
this._onTouched = () => {
|
|
600
626
|
};
|
|
627
|
+
this.ngControl = null;
|
|
628
|
+
this.errorState = false;
|
|
629
|
+
this.inputField = null;
|
|
630
|
+
this._dataSource = null;
|
|
631
|
+
this._placeholder = "";
|
|
632
|
+
this._prefix = "";
|
|
633
|
+
this._selectedEntities = null;
|
|
601
634
|
this.valuesFormControl = new FormControl();
|
|
602
635
|
this.searchFormControl = new FormControl();
|
|
603
636
|
this.isLoading = false;
|
|
@@ -634,7 +667,9 @@ class IaMultipleEntitySelectInput {
|
|
|
634
667
|
}
|
|
635
668
|
set required(req) {
|
|
636
669
|
this._required = coerceBooleanProperty(req);
|
|
637
|
-
this.inputField
|
|
670
|
+
if (this.inputField) {
|
|
671
|
+
this.inputField.required = this._required;
|
|
672
|
+
}
|
|
638
673
|
this.stateChanges.next();
|
|
639
674
|
}
|
|
640
675
|
get prefix() {
|
|
@@ -656,7 +691,7 @@ class IaMultipleEntitySelectInput {
|
|
|
656
691
|
}
|
|
657
692
|
get empty() {
|
|
658
693
|
let n = this.valuesFormControl.value;
|
|
659
|
-
return
|
|
694
|
+
return !n;
|
|
660
695
|
}
|
|
661
696
|
get shouldLabelFloat() {
|
|
662
697
|
return this.focused || !this.empty;
|
|
@@ -671,23 +706,27 @@ class IaMultipleEntitySelectInput {
|
|
|
671
706
|
if (this._prefix) {
|
|
672
707
|
this.searchFormControl
|
|
673
708
|
.valueChanges
|
|
674
|
-
.pipe(debounceTime(300), filter(value => typeof value === 'string'), filter(value => value.startsWith(this._prefix)), tap(() => this.isLoading = true), switchMap(value => this._dataSource
|
|
709
|
+
.pipe(debounceTime(300), filter(value => typeof value === 'string'), filter(value => value.startsWith(this._prefix)), tap(() => this.isLoading = true), switchMap(value => this._dataSource?.onFilter(value.replace(this._prefix, "").trim()) ?? of(null)))
|
|
675
710
|
.subscribe(resultSet => {
|
|
676
|
-
|
|
711
|
+
if (resultSet && resultSet.list) {
|
|
712
|
+
this.filteredEntities = resultSet.list;
|
|
713
|
+
}
|
|
677
714
|
this.isLoading = false;
|
|
678
715
|
});
|
|
679
716
|
}
|
|
680
717
|
// This is the search functionality when search by human.
|
|
681
718
|
this.searchFormControl
|
|
682
719
|
.valueChanges
|
|
683
|
-
.pipe(debounceTime(300), tap(() => this.filteredEntities = []), filter(value => typeof value === 'string'), filter(value => value.toString().length >= 3), tap(() => this.isLoading = true), switchMap(value => this._dataSource
|
|
720
|
+
.pipe(debounceTime(300), tap(() => this.filteredEntities = []), filter(value => typeof value === 'string'), filter(value => value.toString().length >= 3), tap(() => this.isLoading = true), switchMap(value => this._dataSource?.onFilter(value) ?? of(null)))
|
|
684
721
|
.subscribe(resultSet => {
|
|
685
722
|
const resultList = new Array();
|
|
686
|
-
resultSet.list
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
723
|
+
if (resultSet && resultSet.list) {
|
|
724
|
+
resultSet.list.forEach(value1 => {
|
|
725
|
+
if (!this.value?.find(value2 => this._dataSource?.getIdEntity(value2) === this._dataSource?.getIdEntity(value1))) {
|
|
726
|
+
resultList.push(value1);
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
}
|
|
691
730
|
this.filteredEntities = resultList;
|
|
692
731
|
this.isLoading = false;
|
|
693
732
|
});
|
|
@@ -698,7 +737,7 @@ class IaMultipleEntitySelectInput {
|
|
|
698
737
|
}
|
|
699
738
|
ngDoCheck() {
|
|
700
739
|
if (this.ngControl) {
|
|
701
|
-
this.errorState = this.ngControl.invalid && this.ngControl.touched;
|
|
740
|
+
this.errorState = (this.ngControl.invalid && this.ngControl.touched) ?? false;
|
|
702
741
|
this.stateChanges.next();
|
|
703
742
|
}
|
|
704
743
|
}
|
|
@@ -772,24 +811,26 @@ class IaMultipleEntitySelectInput {
|
|
|
772
811
|
}
|
|
773
812
|
remove(value) {
|
|
774
813
|
const list = this.value;
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
814
|
+
if (list) {
|
|
815
|
+
const index = list.indexOf(value);
|
|
816
|
+
if (index !== -1) {
|
|
817
|
+
list.splice(index, 1);
|
|
818
|
+
}
|
|
819
|
+
this.valuesFormControl.updateValueAndValidity();
|
|
778
820
|
}
|
|
779
|
-
this.valuesFormControl.updateValueAndValidity();
|
|
780
821
|
}
|
|
781
822
|
setValue(values) {
|
|
782
823
|
if (values !== this._selectedEntities) {
|
|
783
824
|
this._selectedEntities = values;
|
|
784
|
-
this.valuesChange.emit(values);
|
|
785
|
-
this._propagateChange(this._selectedEntities);
|
|
825
|
+
this.valuesChange.emit(values ?? []);
|
|
826
|
+
this._propagateChange(this._selectedEntities ?? []);
|
|
786
827
|
this.stateChanges.next();
|
|
787
828
|
}
|
|
788
829
|
}
|
|
789
830
|
}
|
|
790
831
|
IaMultipleEntitySelectInput.nextId = 0;
|
|
791
|
-
IaMultipleEntitySelectInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
792
|
-
IaMultipleEntitySelectInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
832
|
+
IaMultipleEntitySelectInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaMultipleEntitySelectInput, deps: [{ token: i0.ElementRef }, { token: i0.Injector }, { token: i1$2.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
|
|
833
|
+
IaMultipleEntitySelectInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: IaMultipleEntitySelectInput, selector: "ia-multiple-entity-select", inputs: { dataSource: "dataSource", disabled: "disabled", placeholder: "placeholder", required: "required", prefix: "prefix" }, host: { properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy", "class.floating": "this.shouldLabelFloat" } }, providers: [
|
|
793
834
|
{
|
|
794
835
|
provide: NG_VALUE_ACCESSOR,
|
|
795
836
|
useExisting: forwardRef(() => IaMultipleEntitySelectInput),
|
|
@@ -804,8 +845,8 @@ IaMultipleEntitySelectInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
|
|
|
804
845
|
useExisting: forwardRef(() => IaMultipleEntitySelectInput),
|
|
805
846
|
multi: true
|
|
806
847
|
}
|
|
807
|
-
], viewQueries: [{ propertyName: "inputField", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<mat-chip-grid #list>\n <mat-chip-row *ngFor=\"let entity of valuesFormControl.value\"\n (removed)=\"remove(entity)\"\n [editable]=\"false\"\n [aria-description]=\"'press enter to edit ' + dataSource
|
|
808
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
848
|
+
], viewQueries: [{ propertyName: "inputField", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<mat-chip-grid #list>\n <mat-chip-row *ngFor=\"let entity of valuesFormControl.value\"\n (removed)=\"remove(entity)\"\n [editable]=\"false\"\n [aria-description]=\"'press enter to edit ' + dataSource?.onDisplayEntity(entity) ?? null\">\n {{dataSource?.onDisplayEntity(entity) ?? null}}\n <button matChipRemove [attr.aria-label]=\"'remove ' + dataSource?.onDisplayEntity(entity) ?? null\">\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n <input #input (blur)=\"onTouched()\" (focusout)=\"onFocusOut()\" [formControl]=\"searchFormControl\"\n [matAutocomplete]=\"auto\"\n [matChipInputFor]=\"list\"\n matChipInputAddOnBlur=\"true\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [placeholder]=\"placeholder\" matInput>\n <mat-autocomplete #auto=\"matAutocomplete\" (closed)=\"onEntityClosed()\"\n (optionActivated)=\"onEntityActivated($event)\" (optionSelected)=\"onEntitySelected($event)\"\n [displayWith]=\"dataSource?.onDisplayEntity ?? null\">\n <mat-option *ngIf=\"isLoading\" class=\"is-loading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n </mat-option>\n <ng-container *ngIf=\"!isLoading\">\n <mat-option *ngFor=\"let entity of filteredEntities\" [value]=\"entity\">\n {{dataSource?.onDisplayEntity(entity) ?? null}}\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n</mat-chip-grid>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i3$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i5.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: i6.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i7$1.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7$1.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7$1.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaMultipleEntitySelectInput, decorators: [{
|
|
809
850
|
type: Component,
|
|
810
851
|
args: [{ selector: 'ia-multiple-entity-select', host: {
|
|
811
852
|
'[id]': 'id',
|
|
@@ -825,7 +866,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
|
|
|
825
866
|
useExisting: forwardRef(() => IaMultipleEntitySelectInput),
|
|
826
867
|
multi: true
|
|
827
868
|
}
|
|
828
|
-
], template: "<mat-chip-grid #list>\n <mat-chip-row *ngFor=\"let entity of valuesFormControl.value\"\n (removed)=\"remove(entity)\"\n [editable]=\"false\"\n [aria-description]=\"'press enter to edit ' + dataSource
|
|
869
|
+
], template: "<mat-chip-grid #list>\n <mat-chip-row *ngFor=\"let entity of valuesFormControl.value\"\n (removed)=\"remove(entity)\"\n [editable]=\"false\"\n [aria-description]=\"'press enter to edit ' + dataSource?.onDisplayEntity(entity) ?? null\">\n {{dataSource?.onDisplayEntity(entity) ?? null}}\n <button matChipRemove [attr.aria-label]=\"'remove ' + dataSource?.onDisplayEntity(entity) ?? null\">\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n <input #input (blur)=\"onTouched()\" (focusout)=\"onFocusOut()\" [formControl]=\"searchFormControl\"\n [matAutocomplete]=\"auto\"\n [matChipInputFor]=\"list\"\n matChipInputAddOnBlur=\"true\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [placeholder]=\"placeholder\" matInput>\n <mat-autocomplete #auto=\"matAutocomplete\" (closed)=\"onEntityClosed()\"\n (optionActivated)=\"onEntityActivated($event)\" (optionSelected)=\"onEntitySelected($event)\"\n [displayWith]=\"dataSource?.onDisplayEntity ?? null\">\n <mat-option *ngIf=\"isLoading\" class=\"is-loading\">\n <mat-spinner diameter=\"50\"></mat-spinner>\n </mat-option>\n <ng-container *ngIf=\"!isLoading\">\n <mat-option *ngFor=\"let entity of filteredEntities\" [value]=\"entity\">\n {{dataSource?.onDisplayEntity(entity) ?? null}}\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n</mat-chip-grid>\n" }]
|
|
829
870
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }, { type: i1$2.FocusMonitor }]; }, propDecorators: { id: [{
|
|
830
871
|
type: HostBinding
|
|
831
872
|
}], inputField: [{
|
|
@@ -851,8 +892,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
|
|
|
851
892
|
|
|
852
893
|
class IaSharedUIModule {
|
|
853
894
|
}
|
|
854
|
-
IaSharedUIModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
855
|
-
IaSharedUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
895
|
+
IaSharedUIModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaSharedUIModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
896
|
+
IaSharedUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: IaSharedUIModule, declarations: [IaNotificationBarComponent,
|
|
856
897
|
MessageDetailsComponent,
|
|
857
898
|
IaAutocompleteInput,
|
|
858
899
|
IaEntitySelectInput,
|
|
@@ -870,7 +911,7 @@ IaSharedUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versio
|
|
|
870
911
|
IaAutocompleteInput,
|
|
871
912
|
IaEntitySelectInput,
|
|
872
913
|
IaMultipleEntitySelectInput] });
|
|
873
|
-
IaSharedUIModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
914
|
+
IaSharedUIModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaSharedUIModule, imports: [CommonModule,
|
|
874
915
|
MatToolbarModule,
|
|
875
916
|
MatButtonModule,
|
|
876
917
|
MatSnackBarModule,
|
|
@@ -881,7 +922,7 @@ IaSharedUIModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
881
922
|
MatChipsModule,
|
|
882
923
|
MatIconModule,
|
|
883
924
|
ReactiveFormsModule] });
|
|
884
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaSharedUIModule, decorators: [{
|
|
885
926
|
type: NgModule,
|
|
886
927
|
args: [{
|
|
887
928
|
declarations: [
|
|
@@ -923,6 +964,7 @@ class ProgressWindowComponent {
|
|
|
923
964
|
constructor(data) {
|
|
924
965
|
this.data = data;
|
|
925
966
|
this.statusText = null;
|
|
967
|
+
this.progressValue = 0;
|
|
926
968
|
data.progress.subscribe(value => {
|
|
927
969
|
this.statusText = value.statusText;
|
|
928
970
|
this.progressValue = value.progressValue;
|
|
@@ -934,9 +976,9 @@ class ProgressWindowComponent {
|
|
|
934
976
|
this.data.cancelOperation();
|
|
935
977
|
}
|
|
936
978
|
}
|
|
937
|
-
ProgressWindowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
938
|
-
ProgressWindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
939
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
979
|
+
ProgressWindowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressWindowComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
980
|
+
ProgressWindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ProgressWindowComponent, selector: "lib-progress-window", ngImport: i0, template: "<h1 mat-dialog-title>{{data.title}}</h1>\n<div mat-dialog-content>\n <div fxLayout=\"column\">\n <mat-progress-bar *ngIf=\"data.isDeterminate\" [value]=\"progressValue\" mode=\"determinate\"></mat-progress-bar>\n <mat-progress-bar *ngIf=\"!data.isDeterminate\" mode=\"indeterminate\"></mat-progress-bar>\n <p>{{statusText}}</p>\n </div>\n</div>\n<div fxLayoutAlign=\"end\" mat-dialog-actions>\n <button (click)=\"onCancelClick()\" *ngIf=\"data.isCancelOperationAvailable\" mat-button>Cancel</button>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i3$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }] });
|
|
981
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressWindowComponent, decorators: [{
|
|
940
982
|
type: Component,
|
|
941
983
|
args: [{ selector: 'lib-progress-window', template: "<h1 mat-dialog-title>{{data.title}}</h1>\n<div mat-dialog-content>\n <div fxLayout=\"column\">\n <mat-progress-bar *ngIf=\"data.isDeterminate\" [value]=\"progressValue\" mode=\"determinate\"></mat-progress-bar>\n <mat-progress-bar *ngIf=\"!data.isDeterminate\" mode=\"indeterminate\"></mat-progress-bar>\n <p>{{statusText}}</p>\n </div>\n</div>\n<div fxLayoutAlign=\"end\" mat-dialog-actions>\n <button (click)=\"onCancelClick()\" *ngIf=\"data.isCancelOperationAvailable\" mat-button>Cancel</button>\n</div>\n" }]
|
|
942
984
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -948,7 +990,8 @@ class ProgressNotifierService {
|
|
|
948
990
|
constructor(dialog) {
|
|
949
991
|
this.dialog = dialog;
|
|
950
992
|
this._currentProgressValue = new BehaviorSubject(null);
|
|
951
|
-
this.
|
|
993
|
+
this.currentDialogRef = null;
|
|
994
|
+
this._isCanceled = false;
|
|
952
995
|
}
|
|
953
996
|
get isCanceled() {
|
|
954
997
|
return this._isCanceled;
|
|
@@ -988,12 +1031,12 @@ class ProgressNotifierService {
|
|
|
988
1031
|
});
|
|
989
1032
|
}
|
|
990
1033
|
complete() {
|
|
991
|
-
this.currentDialogRef
|
|
1034
|
+
this.currentDialogRef?.close();
|
|
992
1035
|
}
|
|
993
1036
|
}
|
|
994
|
-
ProgressNotifierService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
995
|
-
ProgressNotifierService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
996
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1037
|
+
ProgressNotifierService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1038
|
+
ProgressNotifierService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierService });
|
|
1039
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierService, decorators: [{
|
|
997
1040
|
type: Injectable
|
|
998
1041
|
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
|
|
999
1042
|
|
|
@@ -1007,18 +1050,18 @@ class ProgressNotifierModule {
|
|
|
1007
1050
|
};
|
|
1008
1051
|
}
|
|
1009
1052
|
}
|
|
1010
|
-
ProgressNotifierModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1011
|
-
ProgressNotifierModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
1053
|
+
ProgressNotifierModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1054
|
+
ProgressNotifierModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierModule, declarations: [ProgressWindowComponent], imports: [CommonModule,
|
|
1012
1055
|
MatDialogModule,
|
|
1013
1056
|
FlexLayoutModule,
|
|
1014
1057
|
MatButtonModule,
|
|
1015
1058
|
MatProgressBarModule] });
|
|
1016
|
-
ProgressNotifierModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
1059
|
+
ProgressNotifierModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierModule, imports: [CommonModule,
|
|
1017
1060
|
MatDialogModule,
|
|
1018
1061
|
FlexLayoutModule,
|
|
1019
1062
|
MatButtonModule,
|
|
1020
1063
|
MatProgressBarModule] });
|
|
1021
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1064
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierModule, decorators: [{
|
|
1022
1065
|
type: NgModule,
|
|
1023
1066
|
args: [{
|
|
1024
1067
|
declarations: [ProgressWindowComponent],
|
|
@@ -1051,6 +1094,10 @@ class ConfirmationWindowComponent {
|
|
|
1051
1094
|
constructor(dialogRef, data) {
|
|
1052
1095
|
this.dialogRef = dialogRef;
|
|
1053
1096
|
this.data = data;
|
|
1097
|
+
this.button2Text = null;
|
|
1098
|
+
this.button2Result = null;
|
|
1099
|
+
this.button3Text = null;
|
|
1100
|
+
this.button3Result = null;
|
|
1054
1101
|
if (data.dialogType === DialogType.OkCancel) {
|
|
1055
1102
|
this.button1Text = "OK";
|
|
1056
1103
|
this.button1Result = ButtonTypes.Ok;
|
|
@@ -1094,9 +1141,9 @@ class ConfirmationWindowComponent {
|
|
|
1094
1141
|
});
|
|
1095
1142
|
}
|
|
1096
1143
|
}
|
|
1097
|
-
ConfirmationWindowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1098
|
-
ConfirmationWindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
1099
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1144
|
+
ConfirmationWindowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationWindowComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
1145
|
+
ConfirmationWindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ConfirmationWindowComponent, selector: "lib-shared-ui-confirmation-window", ngImport: i0, template: "<h1 mat-dialog-title>{{data.title}}</h1>\n<div mat-dialog-content>{{data.message}}</div>\n<div fxLayoutAlign=\"end\" mat-dialog-actions>\n <button (click)=\"onButton1()\" color=\"primary\" mat-button>{{button1Text}}</button>\n <button (click)=\"onButton2()\" *ngIf=\"button2Text\" mat-button>{{button2Text}}</button>\n <button (click)=\"onButton3()\" *ngIf=\"button3Text\" mat-button>{{button3Text}}</button>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i3$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] });
|
|
1146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationWindowComponent, decorators: [{
|
|
1100
1147
|
type: Component,
|
|
1101
1148
|
args: [{ selector: 'lib-shared-ui-confirmation-window', template: "<h1 mat-dialog-title>{{data.title}}</h1>\n<div mat-dialog-content>{{data.message}}</div>\n<div fxLayoutAlign=\"end\" mat-dialog-actions>\n <button (click)=\"onButton1()\" color=\"primary\" mat-button>{{button1Text}}</button>\n <button (click)=\"onButton2()\" *ngIf=\"button2Text\" mat-button>{{button2Text}}</button>\n <button (click)=\"onButton3()\" *ngIf=\"button3Text\" mat-button>{{button3Text}}</button>\n</div>\n" }]
|
|
1102
1149
|
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
@@ -1118,7 +1165,7 @@ class ConfirmationService {
|
|
|
1118
1165
|
dialogType: DialogType.YesNo
|
|
1119
1166
|
}
|
|
1120
1167
|
});
|
|
1121
|
-
return dialogRef.afterClosed().pipe(map(value => value
|
|
1168
|
+
return dialogRef.afterClosed().pipe(map(value => value?.result == ButtonTypes.Yes));
|
|
1122
1169
|
}
|
|
1123
1170
|
showYesNoCancelConfirmationDialog(title, message) {
|
|
1124
1171
|
const dialogRef = this.dialog.open(ConfirmationWindowComponent, {
|
|
@@ -1142,7 +1189,7 @@ class ConfirmationService {
|
|
|
1142
1189
|
dialogType: DialogType.OkCancel
|
|
1143
1190
|
}
|
|
1144
1191
|
});
|
|
1145
|
-
return dialogRef.afterClosed().pipe(map(value => value
|
|
1192
|
+
return dialogRef.afterClosed().pipe(map(value => value?.result == ButtonTypes.Ok));
|
|
1146
1193
|
}
|
|
1147
1194
|
showOkDialog(title, message) {
|
|
1148
1195
|
const dialogRef = this.dialog.open(ConfirmationWindowComponent, {
|
|
@@ -1154,12 +1201,12 @@ class ConfirmationService {
|
|
|
1154
1201
|
dialogType: DialogType.Ok
|
|
1155
1202
|
}
|
|
1156
1203
|
});
|
|
1157
|
-
return dialogRef.afterClosed().pipe(map(value => value
|
|
1204
|
+
return dialogRef.afterClosed().pipe(map(value => value?.result == ButtonTypes.Ok));
|
|
1158
1205
|
}
|
|
1159
1206
|
}
|
|
1160
|
-
ConfirmationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1161
|
-
ConfirmationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1207
|
+
ConfirmationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1208
|
+
ConfirmationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationService, providedIn: 'root' });
|
|
1209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationService, decorators: [{
|
|
1163
1210
|
type: Injectable,
|
|
1164
1211
|
args: [{
|
|
1165
1212
|
providedIn: 'root'
|
|
@@ -1176,16 +1223,16 @@ class ConfirmationDialogModule {
|
|
|
1176
1223
|
};
|
|
1177
1224
|
}
|
|
1178
1225
|
}
|
|
1179
|
-
ConfirmationDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1180
|
-
ConfirmationDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
1226
|
+
ConfirmationDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1227
|
+
ConfirmationDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationDialogModule, declarations: [ConfirmationWindowComponent], imports: [CommonModule,
|
|
1181
1228
|
MatDialogModule,
|
|
1182
1229
|
FlexLayoutModule,
|
|
1183
1230
|
MatButtonModule] });
|
|
1184
|
-
ConfirmationDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
1231
|
+
ConfirmationDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationDialogModule, imports: [CommonModule,
|
|
1185
1232
|
MatDialogModule,
|
|
1186
1233
|
FlexLayoutModule,
|
|
1187
1234
|
MatButtonModule] });
|
|
1188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationDialogModule, decorators: [{
|
|
1189
1236
|
type: NgModule,
|
|
1190
1237
|
args: [{
|
|
1191
1238
|
declarations: [ConfirmationWindowComponent],
|
|
@@ -1211,15 +1258,16 @@ class CommonValidators {
|
|
|
1211
1258
|
}
|
|
1212
1259
|
static conditionalRequired(sourceControlName, sourceValueCompareExpression) {
|
|
1213
1260
|
return (control) => {
|
|
1214
|
-
if (control.parent && sourceValueCompareExpression(control.parent.get(sourceControlName)
|
|
1261
|
+
if (control.parent && sourceValueCompareExpression(control.parent.get(sourceControlName)?.value)) {
|
|
1215
1262
|
return isEmptyInputValue(control.value) ? { 'required': true } : null;
|
|
1216
1263
|
}
|
|
1264
|
+
return null;
|
|
1217
1265
|
};
|
|
1218
1266
|
}
|
|
1219
1267
|
static dependentControls(controlNames) {
|
|
1220
1268
|
return (control) => {
|
|
1221
1269
|
controlNames.forEach(controlName => {
|
|
1222
|
-
control.parent?.get(controlName)
|
|
1270
|
+
control.parent?.get(controlName)?.updateValueAndValidity();
|
|
1223
1271
|
});
|
|
1224
1272
|
return null;
|
|
1225
1273
|
};
|
|
@@ -1229,13 +1277,14 @@ class CommonValidators {
|
|
|
1229
1277
|
class AbstractDetailsComponent {
|
|
1230
1278
|
constructor() {
|
|
1231
1279
|
this.hasError = (controlName, errorName) => {
|
|
1232
|
-
return this.ownerForm
|
|
1280
|
+
return this.ownerForm?.controls[controlName].hasError(errorName);
|
|
1233
1281
|
};
|
|
1234
1282
|
this.hasFormError = (errorName) => {
|
|
1235
|
-
return this.ownerForm
|
|
1283
|
+
return this.ownerForm?.hasError(errorName);
|
|
1236
1284
|
};
|
|
1237
1285
|
this.loading = true;
|
|
1238
1286
|
this.entity = null;
|
|
1287
|
+
this._ownerForm = null;
|
|
1239
1288
|
}
|
|
1240
1289
|
get ownerForm() {
|
|
1241
1290
|
return this._ownerForm;
|
|
@@ -1244,7 +1293,7 @@ class AbstractDetailsComponent {
|
|
|
1244
1293
|
return this.entity !== null;
|
|
1245
1294
|
}
|
|
1246
1295
|
updateDateTime(controlName) {
|
|
1247
|
-
this.ownerForm
|
|
1296
|
+
this.ownerForm?.get(controlName)?.setValue(IsoDateTime.utcToLocalDateTimeIso(IsoDateTime.currentUtcDateTimeIso()));
|
|
1248
1297
|
}
|
|
1249
1298
|
copyInputMessage(inputElement) {
|
|
1250
1299
|
inputElement.select();
|
|
@@ -1253,11 +1302,11 @@ class AbstractDetailsComponent {
|
|
|
1253
1302
|
}
|
|
1254
1303
|
onProgressStarting() {
|
|
1255
1304
|
this.loading = true;
|
|
1256
|
-
this.ownerForm
|
|
1257
|
-
this.ownerForm
|
|
1305
|
+
this.ownerForm?.disable();
|
|
1306
|
+
this.ownerForm?.updateValueAndValidity();
|
|
1258
1307
|
}
|
|
1259
1308
|
onProgressCompleted() {
|
|
1260
|
-
this.ownerForm
|
|
1309
|
+
this.ownerForm?.enable();
|
|
1261
1310
|
this.loading = false;
|
|
1262
1311
|
}
|
|
1263
1312
|
}
|