@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 () {
|
|
@@ -60,6 +60,7 @@ class IaNotificationBarComponent {
|
|
|
60
60
|
constructor(messageService, dialog) {
|
|
61
61
|
this.messageService = messageService;
|
|
62
62
|
this.dialog = dialog;
|
|
63
|
+
this.errorMessage = null;
|
|
63
64
|
}
|
|
64
65
|
ngOnInit() {
|
|
65
66
|
this.messageService.getLatestErrorMessage().subscribe(value => {
|
|
@@ -77,9 +78,9 @@ class IaNotificationBarComponent {
|
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
IaNotificationBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
81
|
-
IaNotificationBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
81
|
+
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 });
|
|
82
|
+
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"] }] });
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaNotificationBarComponent, decorators: [{
|
|
83
84
|
type: Component,
|
|
84
85
|
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"] }]
|
|
85
86
|
}], ctorParameters: function () { return [{ type: i1$1.MessageService }, { type: i1.MatDialog }]; } });
|
|
@@ -100,6 +101,13 @@ class IaAutocompleteInput {
|
|
|
100
101
|
};
|
|
101
102
|
this._onTouched = () => {
|
|
102
103
|
};
|
|
104
|
+
this.ngControl = null;
|
|
105
|
+
this.errorState = false;
|
|
106
|
+
this._selectedString = null;
|
|
107
|
+
this.inputField = null;
|
|
108
|
+
this._dataSource = null;
|
|
109
|
+
this._placeholder = "";
|
|
110
|
+
this._prefix = "";
|
|
103
111
|
this.searchFormControl = new FormControl();
|
|
104
112
|
this.isLoading = false;
|
|
105
113
|
this._disabled = false;
|
|
@@ -135,7 +143,9 @@ class IaAutocompleteInput {
|
|
|
135
143
|
}
|
|
136
144
|
set required(req) {
|
|
137
145
|
this._required = coerceBooleanProperty(req);
|
|
138
|
-
this.inputField
|
|
146
|
+
if (this.inputField) {
|
|
147
|
+
this.inputField.required = this._required;
|
|
148
|
+
}
|
|
139
149
|
this.stateChanges.next();
|
|
140
150
|
}
|
|
141
151
|
get prefix() {
|
|
@@ -160,7 +170,7 @@ class IaAutocompleteInput {
|
|
|
160
170
|
}
|
|
161
171
|
get empty() {
|
|
162
172
|
let n = this.searchFormControl.value;
|
|
163
|
-
return
|
|
173
|
+
return !n;
|
|
164
174
|
}
|
|
165
175
|
get shouldLabelFloat() {
|
|
166
176
|
return this.focused || !this.empty;
|
|
@@ -175,14 +185,16 @@ class IaAutocompleteInput {
|
|
|
175
185
|
if (this._prefix) {
|
|
176
186
|
this.searchFormControl
|
|
177
187
|
.valueChanges
|
|
178
|
-
.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)))
|
|
188
|
+
.pipe(debounceTime(300), filter(value => typeof value === 'string'), filter(value => value.startsWith(this._prefix)), tap(() => this.value = null), tap(() => this.isLoading = true), map(value => { var _a, _b; return (_b = (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.onPreprocessSearchString(value)) !== null && _b !== void 0 ? _b : ""; }), switchMap(value => { var _a, _b; return (_b = (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.onFilter(value)) !== null && _b !== void 0 ? _b : of(null); }))
|
|
179
189
|
.subscribe(resultSet => {
|
|
180
|
-
if (resultSet.list
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
190
|
+
if (resultSet && resultSet.list) {
|
|
191
|
+
if (resultSet.list.length === 1) {
|
|
192
|
+
this.value = resultSet.list[0];
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
this.filteredStrings = resultSet.list;
|
|
196
|
+
this.searchFormControl.patchValue(resultSet.searchTerm, { emitEvent: false });
|
|
197
|
+
}
|
|
186
198
|
}
|
|
187
199
|
this.isLoading = false;
|
|
188
200
|
});
|
|
@@ -190,12 +202,14 @@ class IaAutocompleteInput {
|
|
|
190
202
|
// This is the search functionality when search by human.
|
|
191
203
|
this.searchFormControl
|
|
192
204
|
.valueChanges
|
|
193
|
-
.pipe(debounceTime(300), tap(
|
|
205
|
+
.pipe(debounceTime(300), tap(_ => {
|
|
194
206
|
this.filteredStrings = [];
|
|
195
|
-
}), 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)))
|
|
207
|
+
}), filter(value => value != null && value.toString().length >= 1), tap(() => this.isLoading = true), map(value => { var _a; return (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.onPreprocessSearchString(value); }), tap(value => this.value = value), switchMap(value => { var _a, _b; return (_b = (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.onFilter(value)) !== null && _b !== void 0 ? _b : of(null); }))
|
|
196
208
|
.subscribe(resultSet => {
|
|
197
|
-
|
|
198
|
-
|
|
209
|
+
if (resultSet && resultSet.list) {
|
|
210
|
+
this.filteredStrings = resultSet.list;
|
|
211
|
+
this.searchFormControl.patchValue(resultSet.searchTerm, { emitEvent: false });
|
|
212
|
+
}
|
|
199
213
|
this.isLoading = false;
|
|
200
214
|
});
|
|
201
215
|
}
|
|
@@ -204,8 +218,9 @@ class IaAutocompleteInput {
|
|
|
204
218
|
this.fm.stopMonitoring(this.elRef.nativeElement);
|
|
205
219
|
}
|
|
206
220
|
ngDoCheck() {
|
|
221
|
+
var _a;
|
|
207
222
|
if (this.ngControl) {
|
|
208
|
-
this.errorState = this.ngControl.invalid && this.ngControl.touched;
|
|
223
|
+
this.errorState = (_a = (this.ngControl.invalid && this.ngControl.touched)) !== null && _a !== void 0 ? _a : false;
|
|
209
224
|
this.stateChanges.next();
|
|
210
225
|
}
|
|
211
226
|
}
|
|
@@ -273,8 +288,8 @@ class IaAutocompleteInput {
|
|
|
273
288
|
}
|
|
274
289
|
}
|
|
275
290
|
IaAutocompleteInput.nextId = 0;
|
|
276
|
-
IaAutocompleteInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
277
|
-
IaAutocompleteInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
291
|
+
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 });
|
|
292
|
+
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: [
|
|
278
293
|
{
|
|
279
294
|
provide: NG_VALUE_ACCESSOR,
|
|
280
295
|
useExisting: forwardRef(() => IaAutocompleteInput),
|
|
@@ -290,7 +305,7 @@ IaAutocompleteInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
290
305
|
multi: true
|
|
291
306
|
}
|
|
292
307
|
], 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"] }] });
|
|
293
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaAutocompleteInput, decorators: [{
|
|
294
309
|
type: Component,
|
|
295
310
|
args: [{ selector: 'ia-autocomplete', host: {
|
|
296
311
|
'[id]': 'id',
|
|
@@ -350,6 +365,12 @@ class IaEntitySelectInput {
|
|
|
350
365
|
};
|
|
351
366
|
this._onTouched = () => {
|
|
352
367
|
};
|
|
368
|
+
this.ngControl = null;
|
|
369
|
+
this.errorState = false;
|
|
370
|
+
this.inputField = null;
|
|
371
|
+
this._dataSource = null;
|
|
372
|
+
this._placeholder = "";
|
|
373
|
+
this._prefix = "";
|
|
353
374
|
this.searchFormControl = new FormControl();
|
|
354
375
|
this.isLoading = false;
|
|
355
376
|
this._disabled = false;
|
|
@@ -385,7 +406,9 @@ class IaEntitySelectInput {
|
|
|
385
406
|
}
|
|
386
407
|
set required(req) {
|
|
387
408
|
this._required = coerceBooleanProperty(req);
|
|
388
|
-
this.inputField
|
|
409
|
+
if (this.inputField) {
|
|
410
|
+
this.inputField.required = this._required;
|
|
411
|
+
}
|
|
389
412
|
this.stateChanges.next();
|
|
390
413
|
}
|
|
391
414
|
get prefix() {
|
|
@@ -407,7 +430,7 @@ class IaEntitySelectInput {
|
|
|
407
430
|
}
|
|
408
431
|
get empty() {
|
|
409
432
|
let n = this.searchFormControl.value;
|
|
410
|
-
return
|
|
433
|
+
return !n;
|
|
411
434
|
}
|
|
412
435
|
get shouldLabelFloat() {
|
|
413
436
|
return this.focused || !this.empty;
|
|
@@ -422,13 +445,15 @@ class IaEntitySelectInput {
|
|
|
422
445
|
if (this._prefix) {
|
|
423
446
|
this.searchFormControl
|
|
424
447
|
.valueChanges
|
|
425
|
-
.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())))
|
|
448
|
+
.pipe(debounceTime(300), filter(value => typeof value === 'string'), filter(value => value.startsWith(this._prefix)), tap(() => this.value = null), tap(() => this.isLoading = true), switchMap(value => { var _a, _b; return (_b = (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.onFilter(value.replace(this._prefix, "").trim())) !== null && _b !== void 0 ? _b : of(null); }))
|
|
426
449
|
.subscribe(resultSet => {
|
|
427
|
-
if (resultSet.list
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
450
|
+
if (resultSet && resultSet.list) {
|
|
451
|
+
if (resultSet.list.length === 1) {
|
|
452
|
+
this.value = resultSet.list[0];
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
this.filteredEntities = resultSet.list;
|
|
456
|
+
}
|
|
432
457
|
}
|
|
433
458
|
this.isLoading = false;
|
|
434
459
|
});
|
|
@@ -436,9 +461,11 @@ class IaEntitySelectInput {
|
|
|
436
461
|
// This is the search functionality when search by human.
|
|
437
462
|
this.searchFormControl
|
|
438
463
|
.valueChanges
|
|
439
|
-
.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)))
|
|
464
|
+
.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 => { var _a, _b; return (_b = (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.onFilter(value)) !== null && _b !== void 0 ? _b : of(null); }))
|
|
440
465
|
.subscribe(resultSet => {
|
|
441
|
-
|
|
466
|
+
if (resultSet && resultSet.list) {
|
|
467
|
+
this.filteredEntities = resultSet.list;
|
|
468
|
+
}
|
|
442
469
|
this.isLoading = false;
|
|
443
470
|
});
|
|
444
471
|
}
|
|
@@ -447,8 +474,9 @@ class IaEntitySelectInput {
|
|
|
447
474
|
this.fm.stopMonitoring(this.elRef.nativeElement);
|
|
448
475
|
}
|
|
449
476
|
ngDoCheck() {
|
|
477
|
+
var _a;
|
|
450
478
|
if (this.ngControl) {
|
|
451
|
-
this.errorState = this.ngControl.invalid && this.ngControl.touched;
|
|
479
|
+
this.errorState = (_a = (this.ngControl.invalid && this.ngControl.touched)) !== null && _a !== void 0 ? _a : false;
|
|
452
480
|
this.stateChanges.next();
|
|
453
481
|
}
|
|
454
482
|
}
|
|
@@ -524,8 +552,8 @@ class IaEntitySelectInput {
|
|
|
524
552
|
}
|
|
525
553
|
}
|
|
526
554
|
IaEntitySelectInput.nextId = 0;
|
|
527
|
-
IaEntitySelectInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
528
|
-
IaEntitySelectInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
555
|
+
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 });
|
|
556
|
+
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: [
|
|
529
557
|
{
|
|
530
558
|
provide: NG_VALUE_ACCESSOR,
|
|
531
559
|
useExisting: forwardRef(() => IaEntitySelectInput),
|
|
@@ -540,8 +568,8 @@ IaEntitySelectInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
540
568
|
useExisting: forwardRef(() => IaEntitySelectInput),
|
|
541
569
|
multi: true
|
|
542
570
|
}
|
|
543
|
-
], 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
|
|
544
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
571
|
+
], 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"] }] });
|
|
572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaEntitySelectInput, decorators: [{
|
|
545
573
|
type: Component,
|
|
546
574
|
args: [{ selector: 'ia-entity-select', host: {
|
|
547
575
|
'[id]': 'id',
|
|
@@ -561,7 +589,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
|
|
|
561
589
|
useExisting: forwardRef(() => IaEntitySelectInput),
|
|
562
590
|
multi: true
|
|
563
591
|
}
|
|
564
|
-
], 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
|
|
592
|
+
], 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"] }]
|
|
565
593
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }, { type: i1$2.FocusMonitor }]; }, propDecorators: { id: [{
|
|
566
594
|
type: HostBinding
|
|
567
595
|
}], inputField: [{
|
|
@@ -602,6 +630,13 @@ class IaMultipleEntitySelectInput {
|
|
|
602
630
|
};
|
|
603
631
|
this._onTouched = () => {
|
|
604
632
|
};
|
|
633
|
+
this.ngControl = null;
|
|
634
|
+
this.errorState = false;
|
|
635
|
+
this.inputField = null;
|
|
636
|
+
this._dataSource = null;
|
|
637
|
+
this._placeholder = "";
|
|
638
|
+
this._prefix = "";
|
|
639
|
+
this._selectedEntities = null;
|
|
605
640
|
this.valuesFormControl = new FormControl();
|
|
606
641
|
this.searchFormControl = new FormControl();
|
|
607
642
|
this.isLoading = false;
|
|
@@ -638,7 +673,9 @@ class IaMultipleEntitySelectInput {
|
|
|
638
673
|
}
|
|
639
674
|
set required(req) {
|
|
640
675
|
this._required = coerceBooleanProperty(req);
|
|
641
|
-
this.inputField
|
|
676
|
+
if (this.inputField) {
|
|
677
|
+
this.inputField.required = this._required;
|
|
678
|
+
}
|
|
642
679
|
this.stateChanges.next();
|
|
643
680
|
}
|
|
644
681
|
get prefix() {
|
|
@@ -660,7 +697,7 @@ class IaMultipleEntitySelectInput {
|
|
|
660
697
|
}
|
|
661
698
|
get empty() {
|
|
662
699
|
let n = this.valuesFormControl.value;
|
|
663
|
-
return
|
|
700
|
+
return !n;
|
|
664
701
|
}
|
|
665
702
|
get shouldLabelFloat() {
|
|
666
703
|
return this.focused || !this.empty;
|
|
@@ -675,23 +712,28 @@ class IaMultipleEntitySelectInput {
|
|
|
675
712
|
if (this._prefix) {
|
|
676
713
|
this.searchFormControl
|
|
677
714
|
.valueChanges
|
|
678
|
-
.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())))
|
|
715
|
+
.pipe(debounceTime(300), filter(value => typeof value === 'string'), filter(value => value.startsWith(this._prefix)), tap(() => this.isLoading = true), switchMap(value => { var _a, _b; return (_b = (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.onFilter(value.replace(this._prefix, "").trim())) !== null && _b !== void 0 ? _b : of(null); }))
|
|
679
716
|
.subscribe(resultSet => {
|
|
680
|
-
|
|
717
|
+
if (resultSet && resultSet.list) {
|
|
718
|
+
this.filteredEntities = resultSet.list;
|
|
719
|
+
}
|
|
681
720
|
this.isLoading = false;
|
|
682
721
|
});
|
|
683
722
|
}
|
|
684
723
|
// This is the search functionality when search by human.
|
|
685
724
|
this.searchFormControl
|
|
686
725
|
.valueChanges
|
|
687
|
-
.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)))
|
|
726
|
+
.pipe(debounceTime(300), tap(() => this.filteredEntities = []), filter(value => typeof value === 'string'), filter(value => value.toString().length >= 3), tap(() => this.isLoading = true), switchMap(value => { var _a, _b; return (_b = (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.onFilter(value)) !== null && _b !== void 0 ? _b : of(null); }))
|
|
688
727
|
.subscribe(resultSet => {
|
|
689
728
|
const resultList = new Array();
|
|
690
|
-
resultSet.list
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
729
|
+
if (resultSet && resultSet.list) {
|
|
730
|
+
resultSet.list.forEach(value1 => {
|
|
731
|
+
var _a;
|
|
732
|
+
if (!((_a = this.value) === null || _a === void 0 ? void 0 : _a.find(value2 => { var _a, _b; return ((_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.getIdEntity(value2)) === ((_b = this._dataSource) === null || _b === void 0 ? void 0 : _b.getIdEntity(value1)); }))) {
|
|
733
|
+
resultList.push(value1);
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
}
|
|
695
737
|
this.filteredEntities = resultList;
|
|
696
738
|
this.isLoading = false;
|
|
697
739
|
});
|
|
@@ -701,8 +743,9 @@ class IaMultipleEntitySelectInput {
|
|
|
701
743
|
this.fm.stopMonitoring(this.elRef.nativeElement);
|
|
702
744
|
}
|
|
703
745
|
ngDoCheck() {
|
|
746
|
+
var _a;
|
|
704
747
|
if (this.ngControl) {
|
|
705
|
-
this.errorState = this.ngControl.invalid && this.ngControl.touched;
|
|
748
|
+
this.errorState = (_a = (this.ngControl.invalid && this.ngControl.touched)) !== null && _a !== void 0 ? _a : false;
|
|
706
749
|
this.stateChanges.next();
|
|
707
750
|
}
|
|
708
751
|
}
|
|
@@ -777,24 +820,27 @@ class IaMultipleEntitySelectInput {
|
|
|
777
820
|
}
|
|
778
821
|
remove(value) {
|
|
779
822
|
const list = this.value;
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
823
|
+
if (list) {
|
|
824
|
+
const index = list.indexOf(value);
|
|
825
|
+
if (index !== -1) {
|
|
826
|
+
list.splice(index, 1);
|
|
827
|
+
}
|
|
828
|
+
this.valuesFormControl.updateValueAndValidity();
|
|
783
829
|
}
|
|
784
|
-
this.valuesFormControl.updateValueAndValidity();
|
|
785
830
|
}
|
|
786
831
|
setValue(values) {
|
|
832
|
+
var _a;
|
|
787
833
|
if (values !== this._selectedEntities) {
|
|
788
834
|
this._selectedEntities = values;
|
|
789
|
-
this.valuesChange.emit(values);
|
|
790
|
-
this._propagateChange(this._selectedEntities);
|
|
835
|
+
this.valuesChange.emit(values !== null && values !== void 0 ? values : []);
|
|
836
|
+
this._propagateChange((_a = this._selectedEntities) !== null && _a !== void 0 ? _a : []);
|
|
791
837
|
this.stateChanges.next();
|
|
792
838
|
}
|
|
793
839
|
}
|
|
794
840
|
}
|
|
795
841
|
IaMultipleEntitySelectInput.nextId = 0;
|
|
796
|
-
IaMultipleEntitySelectInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
797
|
-
IaMultipleEntitySelectInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
842
|
+
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 });
|
|
843
|
+
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: [
|
|
798
844
|
{
|
|
799
845
|
provide: NG_VALUE_ACCESSOR,
|
|
800
846
|
useExisting: forwardRef(() => IaMultipleEntitySelectInput),
|
|
@@ -809,8 +855,8 @@ IaMultipleEntitySelectInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
|
|
|
809
855
|
useExisting: forwardRef(() => IaMultipleEntitySelectInput),
|
|
810
856
|
multi: true
|
|
811
857
|
}
|
|
812
|
-
], 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
|
|
813
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
858
|
+
], 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"] }] });
|
|
859
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaMultipleEntitySelectInput, decorators: [{
|
|
814
860
|
type: Component,
|
|
815
861
|
args: [{ selector: 'ia-multiple-entity-select', host: {
|
|
816
862
|
'[id]': 'id',
|
|
@@ -830,7 +876,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
|
|
|
830
876
|
useExisting: forwardRef(() => IaMultipleEntitySelectInput),
|
|
831
877
|
multi: true
|
|
832
878
|
}
|
|
833
|
-
], 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
|
|
879
|
+
], 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" }]
|
|
834
880
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }, { type: i1$2.FocusMonitor }]; }, propDecorators: { id: [{
|
|
835
881
|
type: HostBinding
|
|
836
882
|
}], inputField: [{
|
|
@@ -856,8 +902,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImpor
|
|
|
856
902
|
|
|
857
903
|
class IaSharedUIModule {
|
|
858
904
|
}
|
|
859
|
-
IaSharedUIModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
860
|
-
IaSharedUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
905
|
+
IaSharedUIModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaSharedUIModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
906
|
+
IaSharedUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: IaSharedUIModule, declarations: [IaNotificationBarComponent,
|
|
861
907
|
MessageDetailsComponent,
|
|
862
908
|
IaAutocompleteInput,
|
|
863
909
|
IaEntitySelectInput,
|
|
@@ -875,7 +921,7 @@ IaSharedUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versio
|
|
|
875
921
|
IaAutocompleteInput,
|
|
876
922
|
IaEntitySelectInput,
|
|
877
923
|
IaMultipleEntitySelectInput] });
|
|
878
|
-
IaSharedUIModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
924
|
+
IaSharedUIModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaSharedUIModule, imports: [CommonModule,
|
|
879
925
|
MatToolbarModule,
|
|
880
926
|
MatButtonModule,
|
|
881
927
|
MatSnackBarModule,
|
|
@@ -886,7 +932,7 @@ IaSharedUIModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
886
932
|
MatChipsModule,
|
|
887
933
|
MatIconModule,
|
|
888
934
|
ReactiveFormsModule] });
|
|
889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
935
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: IaSharedUIModule, decorators: [{
|
|
890
936
|
type: NgModule,
|
|
891
937
|
args: [{
|
|
892
938
|
declarations: [
|
|
@@ -928,6 +974,7 @@ class ProgressWindowComponent {
|
|
|
928
974
|
constructor(data) {
|
|
929
975
|
this.data = data;
|
|
930
976
|
this.statusText = null;
|
|
977
|
+
this.progressValue = 0;
|
|
931
978
|
data.progress.subscribe(value => {
|
|
932
979
|
this.statusText = value.statusText;
|
|
933
980
|
this.progressValue = value.progressValue;
|
|
@@ -939,9 +986,9 @@ class ProgressWindowComponent {
|
|
|
939
986
|
this.data.cancelOperation();
|
|
940
987
|
}
|
|
941
988
|
}
|
|
942
|
-
ProgressWindowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
943
|
-
ProgressWindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
944
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
989
|
+
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 });
|
|
990
|
+
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"] }] });
|
|
991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressWindowComponent, decorators: [{
|
|
945
992
|
type: Component,
|
|
946
993
|
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" }]
|
|
947
994
|
}], ctorParameters: function () {
|
|
@@ -955,7 +1002,8 @@ class ProgressNotifierService {
|
|
|
955
1002
|
constructor(dialog) {
|
|
956
1003
|
this.dialog = dialog;
|
|
957
1004
|
this._currentProgressValue = new BehaviorSubject(null);
|
|
958
|
-
this.
|
|
1005
|
+
this.currentDialogRef = null;
|
|
1006
|
+
this._isCanceled = false;
|
|
959
1007
|
}
|
|
960
1008
|
get isCanceled() {
|
|
961
1009
|
return this._isCanceled;
|
|
@@ -995,12 +1043,13 @@ class ProgressNotifierService {
|
|
|
995
1043
|
});
|
|
996
1044
|
}
|
|
997
1045
|
complete() {
|
|
998
|
-
|
|
1046
|
+
var _a;
|
|
1047
|
+
(_a = this.currentDialogRef) === null || _a === void 0 ? void 0 : _a.close();
|
|
999
1048
|
}
|
|
1000
1049
|
}
|
|
1001
|
-
ProgressNotifierService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1002
|
-
ProgressNotifierService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1003
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1050
|
+
ProgressNotifierService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1051
|
+
ProgressNotifierService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierService });
|
|
1052
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierService, decorators: [{
|
|
1004
1053
|
type: Injectable
|
|
1005
1054
|
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
|
|
1006
1055
|
|
|
@@ -1014,18 +1063,18 @@ class ProgressNotifierModule {
|
|
|
1014
1063
|
};
|
|
1015
1064
|
}
|
|
1016
1065
|
}
|
|
1017
|
-
ProgressNotifierModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1018
|
-
ProgressNotifierModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
1066
|
+
ProgressNotifierModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1067
|
+
ProgressNotifierModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierModule, declarations: [ProgressWindowComponent], imports: [CommonModule,
|
|
1019
1068
|
MatDialogModule,
|
|
1020
1069
|
FlexLayoutModule,
|
|
1021
1070
|
MatButtonModule,
|
|
1022
1071
|
MatProgressBarModule] });
|
|
1023
|
-
ProgressNotifierModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
1072
|
+
ProgressNotifierModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierModule, imports: [CommonModule,
|
|
1024
1073
|
MatDialogModule,
|
|
1025
1074
|
FlexLayoutModule,
|
|
1026
1075
|
MatButtonModule,
|
|
1027
1076
|
MatProgressBarModule] });
|
|
1028
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1077
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProgressNotifierModule, decorators: [{
|
|
1029
1078
|
type: NgModule,
|
|
1030
1079
|
args: [{
|
|
1031
1080
|
declarations: [ProgressWindowComponent],
|
|
@@ -1058,6 +1107,10 @@ class ConfirmationWindowComponent {
|
|
|
1058
1107
|
constructor(dialogRef, data) {
|
|
1059
1108
|
this.dialogRef = dialogRef;
|
|
1060
1109
|
this.data = data;
|
|
1110
|
+
this.button2Text = null;
|
|
1111
|
+
this.button2Result = null;
|
|
1112
|
+
this.button3Text = null;
|
|
1113
|
+
this.button3Result = null;
|
|
1061
1114
|
if (data.dialogType === DialogType.OkCancel) {
|
|
1062
1115
|
this.button1Text = "OK";
|
|
1063
1116
|
this.button1Result = ButtonTypes.Ok;
|
|
@@ -1101,9 +1154,9 @@ class ConfirmationWindowComponent {
|
|
|
1101
1154
|
});
|
|
1102
1155
|
}
|
|
1103
1156
|
}
|
|
1104
|
-
ConfirmationWindowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1105
|
-
ConfirmationWindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
1106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1157
|
+
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 });
|
|
1158
|
+
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"] }] });
|
|
1159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationWindowComponent, decorators: [{
|
|
1107
1160
|
type: Component,
|
|
1108
1161
|
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" }]
|
|
1109
1162
|
}], ctorParameters: function () {
|
|
@@ -1127,7 +1180,7 @@ class ConfirmationService {
|
|
|
1127
1180
|
dialogType: DialogType.YesNo
|
|
1128
1181
|
}
|
|
1129
1182
|
});
|
|
1130
|
-
return dialogRef.afterClosed().pipe(map(value => value.result == ButtonTypes.Yes));
|
|
1183
|
+
return dialogRef.afterClosed().pipe(map(value => (value === null || value === void 0 ? void 0 : value.result) == ButtonTypes.Yes));
|
|
1131
1184
|
}
|
|
1132
1185
|
showYesNoCancelConfirmationDialog(title, message) {
|
|
1133
1186
|
const dialogRef = this.dialog.open(ConfirmationWindowComponent, {
|
|
@@ -1151,7 +1204,7 @@ class ConfirmationService {
|
|
|
1151
1204
|
dialogType: DialogType.OkCancel
|
|
1152
1205
|
}
|
|
1153
1206
|
});
|
|
1154
|
-
return dialogRef.afterClosed().pipe(map(value => value.result == ButtonTypes.Ok));
|
|
1207
|
+
return dialogRef.afterClosed().pipe(map(value => (value === null || value === void 0 ? void 0 : value.result) == ButtonTypes.Ok));
|
|
1155
1208
|
}
|
|
1156
1209
|
showOkDialog(title, message) {
|
|
1157
1210
|
const dialogRef = this.dialog.open(ConfirmationWindowComponent, {
|
|
@@ -1163,12 +1216,12 @@ class ConfirmationService {
|
|
|
1163
1216
|
dialogType: DialogType.Ok
|
|
1164
1217
|
}
|
|
1165
1218
|
});
|
|
1166
|
-
return dialogRef.afterClosed().pipe(map(value => value.result == ButtonTypes.Ok));
|
|
1219
|
+
return dialogRef.afterClosed().pipe(map(value => (value === null || value === void 0 ? void 0 : value.result) == ButtonTypes.Ok));
|
|
1167
1220
|
}
|
|
1168
1221
|
}
|
|
1169
|
-
ConfirmationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1170
|
-
ConfirmationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
1171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1222
|
+
ConfirmationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1223
|
+
ConfirmationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationService, providedIn: 'root' });
|
|
1224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationService, decorators: [{
|
|
1172
1225
|
type: Injectable,
|
|
1173
1226
|
args: [{
|
|
1174
1227
|
providedIn: 'root'
|
|
@@ -1185,16 +1238,16 @@ class ConfirmationDialogModule {
|
|
|
1185
1238
|
};
|
|
1186
1239
|
}
|
|
1187
1240
|
}
|
|
1188
|
-
ConfirmationDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1189
|
-
ConfirmationDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
1241
|
+
ConfirmationDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1242
|
+
ConfirmationDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationDialogModule, declarations: [ConfirmationWindowComponent], imports: [CommonModule,
|
|
1190
1243
|
MatDialogModule,
|
|
1191
1244
|
FlexLayoutModule,
|
|
1192
1245
|
MatButtonModule] });
|
|
1193
|
-
ConfirmationDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
1246
|
+
ConfirmationDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationDialogModule, imports: [CommonModule,
|
|
1194
1247
|
MatDialogModule,
|
|
1195
1248
|
FlexLayoutModule,
|
|
1196
1249
|
MatButtonModule] });
|
|
1197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfirmationDialogModule, decorators: [{
|
|
1198
1251
|
type: NgModule,
|
|
1199
1252
|
args: [{
|
|
1200
1253
|
declarations: [ConfirmationWindowComponent],
|
|
@@ -1220,16 +1273,18 @@ class CommonValidators {
|
|
|
1220
1273
|
}
|
|
1221
1274
|
static conditionalRequired(sourceControlName, sourceValueCompareExpression) {
|
|
1222
1275
|
return (control) => {
|
|
1223
|
-
|
|
1276
|
+
var _a;
|
|
1277
|
+
if (control.parent && sourceValueCompareExpression((_a = control.parent.get(sourceControlName)) === null || _a === void 0 ? void 0 : _a.value)) {
|
|
1224
1278
|
return isEmptyInputValue(control.value) ? { 'required': true } : null;
|
|
1225
1279
|
}
|
|
1280
|
+
return null;
|
|
1226
1281
|
};
|
|
1227
1282
|
}
|
|
1228
1283
|
static dependentControls(controlNames) {
|
|
1229
1284
|
return (control) => {
|
|
1230
1285
|
controlNames.forEach(controlName => {
|
|
1231
|
-
var _a;
|
|
1232
|
-
(_a = control.parent) === null || _a === void 0 ? void 0 : _a.get(controlName).updateValueAndValidity();
|
|
1286
|
+
var _a, _b;
|
|
1287
|
+
(_b = (_a = control.parent) === null || _a === void 0 ? void 0 : _a.get(controlName)) === null || _b === void 0 ? void 0 : _b.updateValueAndValidity();
|
|
1233
1288
|
});
|
|
1234
1289
|
return null;
|
|
1235
1290
|
};
|
|
@@ -1239,13 +1294,16 @@ class CommonValidators {
|
|
|
1239
1294
|
class AbstractDetailsComponent {
|
|
1240
1295
|
constructor() {
|
|
1241
1296
|
this.hasError = (controlName, errorName) => {
|
|
1242
|
-
|
|
1297
|
+
var _a;
|
|
1298
|
+
return (_a = this.ownerForm) === null || _a === void 0 ? void 0 : _a.controls[controlName].hasError(errorName);
|
|
1243
1299
|
};
|
|
1244
1300
|
this.hasFormError = (errorName) => {
|
|
1245
|
-
|
|
1301
|
+
var _a;
|
|
1302
|
+
return (_a = this.ownerForm) === null || _a === void 0 ? void 0 : _a.hasError(errorName);
|
|
1246
1303
|
};
|
|
1247
1304
|
this.loading = true;
|
|
1248
1305
|
this.entity = null;
|
|
1306
|
+
this._ownerForm = null;
|
|
1249
1307
|
}
|
|
1250
1308
|
get ownerForm() {
|
|
1251
1309
|
return this._ownerForm;
|
|
@@ -1254,7 +1312,8 @@ class AbstractDetailsComponent {
|
|
|
1254
1312
|
return this.entity !== null;
|
|
1255
1313
|
}
|
|
1256
1314
|
updateDateTime(controlName) {
|
|
1257
|
-
|
|
1315
|
+
var _a, _b;
|
|
1316
|
+
(_b = (_a = this.ownerForm) === null || _a === void 0 ? void 0 : _a.get(controlName)) === null || _b === void 0 ? void 0 : _b.setValue(IsoDateTime.utcToLocalDateTimeIso(IsoDateTime.currentUtcDateTimeIso()));
|
|
1258
1317
|
}
|
|
1259
1318
|
copyInputMessage(inputElement) {
|
|
1260
1319
|
inputElement.select();
|
|
@@ -1262,12 +1321,14 @@ class AbstractDetailsComponent {
|
|
|
1262
1321
|
inputElement.setSelectionRange(0, 0);
|
|
1263
1322
|
}
|
|
1264
1323
|
onProgressStarting() {
|
|
1324
|
+
var _a, _b;
|
|
1265
1325
|
this.loading = true;
|
|
1266
|
-
this.ownerForm.disable();
|
|
1267
|
-
this.ownerForm.updateValueAndValidity();
|
|
1326
|
+
(_a = this.ownerForm) === null || _a === void 0 ? void 0 : _a.disable();
|
|
1327
|
+
(_b = this.ownerForm) === null || _b === void 0 ? void 0 : _b.updateValueAndValidity();
|
|
1268
1328
|
}
|
|
1269
1329
|
onProgressCompleted() {
|
|
1270
|
-
|
|
1330
|
+
var _a;
|
|
1331
|
+
(_a = this.ownerForm) === null || _a === void 0 ? void 0 : _a.enable();
|
|
1271
1332
|
this.loading = false;
|
|
1272
1333
|
}
|
|
1273
1334
|
}
|