@mediusinc/mng-commons 5.0.0-rc.2 → 5.0.0-rc.3
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/core/data-providers/base-data-provider.factory.d.ts +13 -0
- package/core/data-providers/base.data-provider.d.ts +2 -14
- package/core/descriptors/editor.descriptor.d.ts +1 -1
- package/core/descriptors/tableview.descriptor.d.ts +5 -5
- package/core/directives/component.directive.d.ts +2 -2
- package/core/index.d.ts +1 -0
- package/core/security/permission.service.d.ts +1 -0
- package/core/services/commons-router.service.d.ts +3 -3
- package/core/services/commons.service.d.ts +31 -42
- package/core/services/tokens/module-config.token.d.ts +2 -2
- package/esm2022/core/components/notification/notification-wrapper.component.mjs +3 -3
- package/esm2022/core/components/pages/error/error.page.component.mjs +3 -3
- package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +3 -3
- package/esm2022/core/data-providers/base-data-provider.factory.mjs +28 -0
- package/esm2022/core/data-providers/base.data-provider.mjs +1 -31
- package/esm2022/core/descriptors/editor.descriptor.mjs +1 -1
- package/esm2022/core/descriptors/tableview.descriptor.mjs +1 -1
- package/esm2022/core/directives/component.directive.mjs +10 -7
- package/esm2022/core/index.mjs +2 -1
- package/esm2022/core/security/permission.service.mjs +4 -2
- package/esm2022/core/services/commons-init.service.mjs +2 -2
- package/esm2022/core/services/commons-router.service.mjs +16 -15
- package/esm2022/core/services/commons.service.mjs +109 -166
- package/esm2022/core/services/tokens/module-config.token.mjs +1 -1
- package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +4 -4
- package/esm2022/form/api/data-providers/lookup-data-provider.factory.mjs +31 -0
- package/esm2022/form/api/data-providers/lookup.data-provider.mjs +1 -31
- package/esm2022/form/api/index.mjs +2 -1
- package/esm2022/form/components/autocomplete/autocomplete.component.mjs +92 -83
- package/esm2022/form/components/dropdown/dropdown.component.mjs +145 -87
- package/esm2022/model/data-providers/base-from-type-data-provider.factory.mjs +8 -0
- package/esm2022/model/descriptors/enum.descriptor.mjs +3 -6
- package/esm2022/model/descriptors/model.descriptor.mjs +22 -9
- package/esm2022/model/descriptors/type.descriptor.mjs +3 -9
- package/esm2022/model/index.mjs +3 -1
- package/esm2022/table/api/data-providers/table-data-provider.factory.mjs +33 -0
- package/esm2022/table/api/data-providers/table.data-provider.mjs +1 -31
- package/esm2022/table/api/descriptors/sort.descriptor.mjs +2 -2
- package/esm2022/table/api/descriptors/table-descriptor.factory.mjs +89 -0
- package/esm2022/table/api/descriptors/table.descriptor.mjs +4 -139
- package/esm2022/table/api/helpers/table-descriptor-helpers.mjs +97 -0
- package/esm2022/table/api/index.mjs +4 -1
- package/esm2022/table/components/column-filter-full/column-filter-full.component.mjs +6 -7
- package/esm2022/table/components/column-value/column-value.component.mjs +2 -2
- package/esm2022/table/components/table/table.component.mjs +5 -5
- package/esm2022/table/pipes/locale-default-row-class.pipe.mjs +2 -2
- package/esm2022/table/services/data-list.service.mjs +1 -1
- package/esm2022/tableview/action/components/action/action.component.mjs +140 -188
- package/esm2022/tableview/action/components/editor/action-editor.component.mjs +56 -66
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +119 -141
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +21 -39
- package/esm2022/tableview/action/components/route/action-route.component.mjs +17 -23
- package/esm2022/tableview/action/components/table/action-table.component.mjs +1 -1
- package/esm2022/tableview/action/services/action-executor.service.mjs +9 -9
- package/esm2022/tableview/action/services/navigation.service.mjs +3 -2
- package/esm2022/tableview/action/services/view-container.service.mjs +5 -21
- package/esm2022/tableview/api/action/descriptors/action-descriptor.factory.mjs +119 -0
- package/esm2022/tableview/api/action/descriptors/action-editor-descriptor.factory.mjs +77 -0
- package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +20 -80
- package/esm2022/tableview/api/action/descriptors/action-link-descriptor.factory.mjs +45 -0
- package/esm2022/tableview/api/action/descriptors/action-link.descriptor.mjs +1 -32
- package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +3 -69
- package/esm2022/tableview/api/action/models/action-component.model.mjs +1 -1
- package/esm2022/tableview/api/action/models/execution/view-container.model.mjs +1 -1
- package/esm2022/tableview/api/editor/data-providers/editor-data-provider.factory.mjs +33 -0
- package/esm2022/tableview/api/editor/data-providers/editor.data-provider.mjs +1 -31
- package/esm2022/tableview/api/editor/descriptors/editor-descriptor.factory.mjs +81 -0
- package/esm2022/tableview/api/editor/descriptors/editor.descriptor.mjs +7 -133
- package/esm2022/tableview/api/editor/descriptors/field-action.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +13 -5
- package/esm2022/tableview/api/editor/descriptors/field-group.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field-lookup.descriptor.mjs +4 -4
- package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +3 -3
- package/esm2022/tableview/api/editor/descriptors/field-validation.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/helpers/editor-descriptor-helpers.mjs +95 -0
- package/esm2022/tableview/api/editor/helpers/field-validators.mjs +7 -7
- package/esm2022/tableview/api/editor/models/editor-fields.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/field-action-context.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/field-validation.model.mjs +2 -0
- package/esm2022/tableview/api/editor/models/field.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/form-editor.event.mjs +1 -1
- package/esm2022/tableview/api/editor/models/form-editor.interface.mjs +1 -1
- package/esm2022/tableview/api/editor/models/formly-field.model.mjs +1 -1
- package/esm2022/tableview/api/index.mjs +11 -1
- package/esm2022/tableview/api/tableview/data-providers/tableview-data-provider.factory.mjs +47 -0
- package/esm2022/tableview/api/tableview/data-providers/tableview.data-provider.mjs +5 -46
- package/esm2022/tableview/api/tableview/descriptors/tableview-descriptor.factory.mjs +111 -0
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +15 -168
- package/esm2022/tableview/api/tableview/helpers/files-export.mjs +2 -2
- package/esm2022/tableview/api/tableview/helpers/tableview-create.mjs +5 -5
- package/esm2022/tableview/api/tableview/helpers/tableview-default-actions.mjs +53 -18
- package/esm2022/tableview/api/tableview/helpers/tableview-descriptor-helpers.mjs +110 -0
- package/esm2022/tableview/api/tableview/helpers/tableview-input-builder.mjs +2 -2
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +16 -11
- package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +6 -2
- package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +10 -11
- package/esm2022/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.mjs +1 -1
- package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +9 -11
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +4 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +16 -18
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +20 -22
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +18 -20
- package/esm2022/tableview/editor/helpers/editor-formly.mjs +27 -6
- package/esm2022/tableview/editor/services/form-editor.service.mjs +96 -0
- package/esm2022/tableview/index.mjs +2 -1
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +3 -3
- package/fesm2022/mediusinc-mng-commons-core.mjs +155 -210
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +3 -3
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form-api.mjs +18 -18
- package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +236 -169
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model.mjs +43 -33
- package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +192 -146
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +11 -12
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +822 -590
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +564 -571
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/form/api/data-providers/lookup-data-provider.factory.d.ts +18 -0
- package/form/api/data-providers/lookup.data-provider.d.ts +2 -14
- package/form/api/index.d.ts +1 -0
- package/form/components/autocomplete/autocomplete.component.d.ts +31 -23
- package/form/components/dropdown/dropdown.component.d.ts +38 -25
- package/model/data-providers/base-from-type-data-provider.factory.d.ts +8 -0
- package/model/descriptors/enum.descriptor.d.ts +1 -2
- package/model/descriptors/model.descriptor.d.ts +11 -4
- package/model/descriptors/type.descriptor.d.ts +2 -4
- package/model/index.d.ts +1 -0
- package/package.json +1 -1
- package/table/api/data-providers/table-data-provider.factory.d.ts +18 -0
- package/table/api/data-providers/table.data-provider.d.ts +2 -14
- package/table/api/descriptors/table-descriptor.factory.d.ts +44 -0
- package/table/api/descriptors/table.descriptor.d.ts +4 -65
- package/table/api/helpers/table-descriptor-helpers.d.ts +44 -0
- package/table/api/index.d.ts +3 -0
- package/table/components/column-filter-full/column-filter-full.component.d.ts +5 -4
- package/table/components/table/table.component.d.ts +11 -11
- package/table/services/data-list.service.d.ts +9 -10
- package/tableview/action/components/action/action.component.d.ts +37 -44
- package/tableview/action/components/editor/action-editor.component.d.ts +20 -18
- package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +23 -23
- package/tableview/action/components/localization/data-language-dropdown.component.d.ts +11 -14
- package/tableview/action/components/route/action-route.component.d.ts +6 -11
- package/tableview/action/components/table/action-table.component.d.ts +3 -3
- package/tableview/action/services/view-container.service.d.ts +3 -9
- package/tableview/api/action/descriptors/action-descriptor.factory.d.ts +36 -0
- package/tableview/api/action/descriptors/action-editor-descriptor.factory.d.ts +31 -0
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +17 -37
- package/tableview/api/action/descriptors/action-link-descriptor.factory.d.ts +15 -0
- package/tableview/api/action/descriptors/action-link.descriptor.d.ts +1 -9
- package/tableview/api/action/descriptors/action.descriptor.d.ts +4 -27
- package/tableview/api/action/models/action-component.model.d.ts +8 -8
- package/tableview/api/action/models/execution/view-container.model.d.ts +4 -3
- package/tableview/api/editor/data-providers/editor-data-provider.factory.d.ts +18 -0
- package/tableview/api/editor/data-providers/editor.data-provider.d.ts +2 -14
- package/tableview/api/editor/descriptors/editor-descriptor.factory.d.ts +44 -0
- package/tableview/api/editor/descriptors/editor.descriptor.d.ts +34 -90
- package/tableview/api/editor/descriptors/field-action.descriptor.d.ts +3 -3
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +15 -13
- package/tableview/api/editor/descriptors/field-group.descriptor.d.ts +7 -6
- package/tableview/api/editor/descriptors/field-lookup.descriptor.d.ts +2 -2
- package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +8 -8
- package/tableview/api/editor/descriptors/field-validation.descriptor.d.ts +6 -6
- package/tableview/api/editor/descriptors/field.descriptor.d.ts +1 -1
- package/tableview/api/editor/helpers/editor-descriptor-helpers.d.ts +43 -0
- package/tableview/api/editor/helpers/field-validators.d.ts +1 -1
- package/tableview/api/editor/models/editor-fields.model.d.ts +24 -22
- package/tableview/api/editor/models/field-action-context.model.d.ts +10 -8
- package/tableview/api/editor/models/field-validation.model.d.ts +26 -0
- package/tableview/api/editor/models/field.model.d.ts +0 -19
- package/tableview/api/editor/models/form-editor.event.d.ts +24 -16
- package/tableview/api/editor/models/form-editor.interface.d.ts +2 -1
- package/tableview/api/editor/models/formly-custom-field.model.d.ts +1 -1
- package/tableview/api/editor/models/formly-field.model.d.ts +4 -4
- package/tableview/api/index.d.ts +10 -0
- package/tableview/api/tableview/data-providers/tableview-data-provider.factory.d.ts +25 -0
- package/tableview/api/tableview/data-providers/tableview.data-provider.d.ts +3 -20
- package/tableview/api/tableview/descriptors/tableview-descriptor.factory.d.ts +49 -0
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +40 -100
- package/tableview/api/tableview/helpers/tableview-create.d.ts +2 -2
- package/tableview/api/tableview/helpers/tableview-default-actions.d.ts +4 -2
- package/tableview/api/tableview/helpers/tableview-descriptor-helpers.d.ts +42 -0
- package/tableview/api/tableview/helpers/tableview-input-builder.d.ts +1 -1
- package/tableview/editor/components/editor/form-editor.component.d.ts +6 -4
- package/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.d.ts +5 -3
- package/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +1 -0
- package/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +1 -1
- package/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +1 -1
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +3 -4
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +3 -4
- package/tableview/editor/helpers/editor-formly.d.ts +1 -1
- package/tableview/editor/services/form-editor.service.d.ts +39 -0
- package/tableview/index.d.ts +1 -0
- package/tableview/tableview/components/route/tableview-route.component.d.ts +1 -1
- package/tableview/tableview/components/tableview/tableview.component.d.ts +1 -1
- package/version-info.json +4 -4
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { AsyncPipe } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { forwardRef, inject, Injector, DestroyRef, input, output, viewChild, signal, computed,
|
|
3
|
+
import { forwardRef, inject, Injector, DestroyRef, input, booleanAttribute, output, viewChild, signal, computed, effect, Component, ChangeDetectionStrategy, Directive, Optional, Input, HostListener } from '@angular/core';
|
|
4
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
5
|
import * as i3 from '@angular/forms';
|
|
5
|
-
import { NG_VALUE_ACCESSOR, FormsModule, FormBuilder, ReactiveFormsModule
|
|
6
|
+
import { NG_VALUE_ACCESSOR, FormsModule, FormBuilder, ReactiveFormsModule } from '@angular/forms';
|
|
6
7
|
import * as i2 from '@ngx-translate/core';
|
|
7
8
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
8
9
|
import * as i1 from 'primeng/autocomplete';
|
|
9
10
|
import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';
|
|
10
11
|
import { ReplaySubject, take, switchMap, of, merge } from 'rxjs';
|
|
11
|
-
import {
|
|
12
|
+
import { map } from 'rxjs/operators';
|
|
12
13
|
import { LoggerService, CommonsInternalError, FilterMatchMode, fromSubscribeError, getErrorLogLevel, toObservable } from '@mediusinc/mng-commons/core';
|
|
13
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
14
14
|
import * as i1$1 from 'primeng/calendar';
|
|
15
15
|
import { CalendarModule } from 'primeng/calendar';
|
|
16
16
|
import * as i1$2 from 'primeng/dropdown';
|
|
17
17
|
import { Dropdown, DropdownModule } from 'primeng/dropdown';
|
|
18
18
|
import * as i2$1 from 'primeng/multiselect';
|
|
19
|
-
import { MultiSelectModule } from 'primeng/multiselect';
|
|
19
|
+
import { MultiSelect, MultiSelectModule } from 'primeng/multiselect';
|
|
20
20
|
|
|
21
21
|
const AUTOCOMPLETE_VALUE_ACCESSOR = {
|
|
22
22
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -24,27 +24,32 @@ const AUTOCOMPLETE_VALUE_ACCESSOR = {
|
|
|
24
24
|
multi: true
|
|
25
25
|
};
|
|
26
26
|
class AutocompleteComponent {
|
|
27
|
+
get value() {
|
|
28
|
+
return this._value;
|
|
29
|
+
}
|
|
27
30
|
constructor() {
|
|
28
31
|
this.injector = inject(Injector);
|
|
32
|
+
this.destroyRef = inject(DestroyRef);
|
|
29
33
|
this.translate = inject(TranslateService);
|
|
30
34
|
this.logger = inject(LoggerService).create('AutocompleteComponent');
|
|
31
|
-
this.destroyRef = inject(DestroyRef);
|
|
32
35
|
this.dataProvider = input.required();
|
|
33
36
|
this.optionsTrackProperty = input();
|
|
34
37
|
this.optionsValuePropertyInit = input(undefined, { alias: 'optionsValueProperty' });
|
|
35
38
|
this.optionsLabelPropertyInit = input(undefined, { alias: 'optionsLabelProperty' });
|
|
36
|
-
this.optionsLabelTranslate = input(false);
|
|
37
|
-
this.inlineSearch = input(false);
|
|
38
|
-
this.openOnFocus = input(false);
|
|
39
|
-
this.multiselect = input(false);
|
|
39
|
+
this.optionsLabelTranslate = input(false, { transform: booleanAttribute });
|
|
40
|
+
this.inlineSearch = input(false, { transform: booleanAttribute });
|
|
41
|
+
this.openOnFocus = input(false, { transform: booleanAttribute });
|
|
42
|
+
this.multiselect = input(false, { transform: booleanAttribute });
|
|
40
43
|
this.placeholder = input();
|
|
41
44
|
this.className = input();
|
|
42
45
|
this.dropdownClassName = input();
|
|
43
|
-
this.showClear = input(false);
|
|
44
|
-
this.autoClear = input(false);
|
|
45
|
-
this.selectFirst = input(false); //on every input field change return first given value (or null)
|
|
46
|
+
this.showClear = input(false, { transform: booleanAttribute });
|
|
47
|
+
this.autoClear = input(false, { transform: booleanAttribute });
|
|
48
|
+
this.selectFirst = input(false, { transform: booleanAttribute }); //on every input field change return first given value (or null)
|
|
46
49
|
this.searchTrim = input(undefined);
|
|
50
|
+
this.disabledInput = input(false, { transform: booleanAttribute, alias: 'disabled' });
|
|
47
51
|
this.valueChange = output();
|
|
52
|
+
this.blur = output();
|
|
48
53
|
this.primeAutocomplete = viewChild(AutoComplete);
|
|
49
54
|
this.isInited = false;
|
|
50
55
|
this.searchSubscription = null;
|
|
@@ -53,9 +58,9 @@ class AutocompleteComponent {
|
|
|
53
58
|
this.onChangeFn = () => { };
|
|
54
59
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
55
60
|
this.onTouchedFn = () => { };
|
|
56
|
-
|
|
57
|
-
this.
|
|
58
|
-
this.
|
|
61
|
+
this.ngModelValue = signal(undefined);
|
|
62
|
+
this._disabled = signal(false);
|
|
63
|
+
this.disabled = computed(() => this._disabled() || this.disabledInput());
|
|
59
64
|
this.suggestions = signal([]);
|
|
60
65
|
this.isPanelShown = false;
|
|
61
66
|
this.isFocused = false;
|
|
@@ -90,16 +95,16 @@ class AutocompleteComponent {
|
|
|
90
95
|
}
|
|
91
96
|
return this.optionsValuePropertyInit();
|
|
92
97
|
});
|
|
98
|
+
effect(() => {
|
|
99
|
+
this._value = this.convertValueWithOptionsValuePropSetting(this.ngModelValue());
|
|
100
|
+
});
|
|
93
101
|
}
|
|
94
102
|
ngOnInit() {
|
|
95
103
|
this.setItemsAndDataProvider();
|
|
96
|
-
if (this.selectFirst() && !this.
|
|
104
|
+
if (this.selectFirst() && !this._value) {
|
|
97
105
|
this.onSearch(undefined, true);
|
|
98
106
|
}
|
|
99
107
|
}
|
|
100
|
-
ngOnDestroy() {
|
|
101
|
-
this.searchSubscription?.unsubscribe();
|
|
102
|
-
}
|
|
103
108
|
onSearch(event, isInit = false) {
|
|
104
109
|
this.searchSubscription?.unsubscribe();
|
|
105
110
|
const optionsLabelProperty = this.optionsLabelProperty();
|
|
@@ -122,11 +127,13 @@ class AutocompleteComponent {
|
|
|
122
127
|
if (!this.queryResultCacheSubject) {
|
|
123
128
|
this.queryResultCacheSubject = new ReplaySubject(1);
|
|
124
129
|
}
|
|
125
|
-
this.searchSubscription = this.getLookup(params, query)
|
|
130
|
+
this.searchSubscription = this.getLookup(params, query)
|
|
131
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
132
|
+
.subscribe({
|
|
126
133
|
next: items => {
|
|
127
134
|
this.queryResultCacheSubject?.next(items);
|
|
128
135
|
this.setSuggestionsFromItems(items, query);
|
|
129
|
-
if (isInit && !this.
|
|
136
|
+
if (isInit && !this._value) {
|
|
130
137
|
this.selectFirstItem();
|
|
131
138
|
}
|
|
132
139
|
},
|
|
@@ -151,9 +158,7 @@ class AutocompleteComponent {
|
|
|
151
158
|
return;
|
|
152
159
|
const suggestions = this.suggestions();
|
|
153
160
|
if (suggestions.length > 0 && !this.userSelectedItem) {
|
|
154
|
-
|
|
155
|
-
const value = optionsValueProperty ? suggestions[0][optionsValueProperty] : suggestions[0];
|
|
156
|
-
this.setValue(value);
|
|
161
|
+
this.setValue(suggestions[0]);
|
|
157
162
|
}
|
|
158
163
|
else if (!this.userSelectedItem) {
|
|
159
164
|
// handles the case if the user provides an input and de-focuses the input field before suggestions are loaded or if there are no suggestions at all
|
|
@@ -170,37 +175,6 @@ class AutocompleteComponent {
|
|
|
170
175
|
this.primeAutocomplete()?.hide();
|
|
171
176
|
}
|
|
172
177
|
}
|
|
173
|
-
/**
|
|
174
|
-
* Selects and sets new value
|
|
175
|
-
*/
|
|
176
|
-
setValue(value, fromUser = false) {
|
|
177
|
-
let outputValue = value;
|
|
178
|
-
const optionsValueProperty = this.optionsValueProperty();
|
|
179
|
-
if (optionsValueProperty && value && typeof value === 'object') {
|
|
180
|
-
outputValue = value[optionsValueProperty];
|
|
181
|
-
}
|
|
182
|
-
if (fromUser) {
|
|
183
|
-
this.userSelectedItem = outputValue;
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
// this.autocompleteFormControl.setValue(outputValue);
|
|
187
|
-
this.value.set(outputValue);
|
|
188
|
-
// this.propagateValueChange(outputValue);
|
|
189
|
-
}
|
|
190
|
-
this.propagateValueChange(outputValue);
|
|
191
|
-
}
|
|
192
|
-
trimValue(value) {
|
|
193
|
-
switch (this.searchTrim()) {
|
|
194
|
-
case 'start':
|
|
195
|
-
return value?.trimStart();
|
|
196
|
-
case 'end':
|
|
197
|
-
return value?.trimEnd();
|
|
198
|
-
case 'both':
|
|
199
|
-
return value?.trim();
|
|
200
|
-
default:
|
|
201
|
-
return value;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
178
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
205
179
|
onFocus(event) {
|
|
206
180
|
this.isFocused = true;
|
|
@@ -211,12 +185,13 @@ class AutocompleteComponent {
|
|
|
211
185
|
/**
|
|
212
186
|
* calls the selectFirst item anytime the input field goes out of focus and if the suggestions panel is not displayed.
|
|
213
187
|
*/
|
|
214
|
-
onBlur() {
|
|
188
|
+
onBlur(event) {
|
|
215
189
|
this.isFocused = false;
|
|
216
190
|
if (!this.isPanelShown) {
|
|
217
191
|
this.selectFirstItem();
|
|
218
192
|
}
|
|
219
193
|
this.onTouchedFn();
|
|
194
|
+
this.blur.emit(event);
|
|
220
195
|
}
|
|
221
196
|
onShow() {
|
|
222
197
|
this.isPanelShown = true;
|
|
@@ -234,25 +209,6 @@ class AutocompleteComponent {
|
|
|
234
209
|
this.onChangeFn();
|
|
235
210
|
this.propagateValueChange(null);
|
|
236
211
|
}
|
|
237
|
-
propagateValueChange(value) {
|
|
238
|
-
let output = value;
|
|
239
|
-
const optionsValueProperty = this.optionsValueProperty();
|
|
240
|
-
if (this.multiselect() && Array.isArray(value)) {
|
|
241
|
-
output = output.map((item) => {
|
|
242
|
-
if (optionsValueProperty && item && typeof item === 'object') {
|
|
243
|
-
return item[optionsValueProperty];
|
|
244
|
-
}
|
|
245
|
-
return null;
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
if (optionsValueProperty && value && typeof value === 'object') {
|
|
250
|
-
output = value[optionsValueProperty];
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
this.onChangeFn(output);
|
|
254
|
-
this.valueChange.emit(output);
|
|
255
|
-
}
|
|
256
212
|
registerOnChange(fn) {
|
|
257
213
|
this.onChangeFn = fn;
|
|
258
214
|
}
|
|
@@ -260,12 +216,12 @@ class AutocompleteComponent {
|
|
|
260
216
|
this.onTouchedFn = fn;
|
|
261
217
|
}
|
|
262
218
|
setDisabledState(isDisabled) {
|
|
263
|
-
setTimeout(() =>
|
|
264
|
-
this.isDisabled.set(isDisabled);
|
|
265
|
-
});
|
|
219
|
+
setTimeout(() => this._disabled.set(isDisabled));
|
|
266
220
|
}
|
|
267
221
|
writeValue(value) {
|
|
268
222
|
this.setItemsAndDataProvider();
|
|
223
|
+
// write value immediately - it is important so that first select is not triggered!
|
|
224
|
+
this._value = value;
|
|
269
225
|
const optionsValuePropertyInit = this.optionsValuePropertyInit();
|
|
270
226
|
if (optionsValuePropertyInit && value != null && typeof value !== 'object') {
|
|
271
227
|
const defaultItem = { [optionsValuePropertyInit]: value };
|
|
@@ -287,7 +243,7 @@ class AutocompleteComponent {
|
|
|
287
243
|
}
|
|
288
244
|
}
|
|
289
245
|
})
|
|
290
|
-
.pipe(
|
|
246
|
+
.pipe(take(1))
|
|
291
247
|
.subscribe({
|
|
292
248
|
next: items => {
|
|
293
249
|
let isMatch = false;
|
|
@@ -332,8 +288,7 @@ class AutocompleteComponent {
|
|
|
332
288
|
if (value && this.optionsLabelTranslate()) {
|
|
333
289
|
value = this.i18nPopulateItems([value], this.translate.instant(this.i18nGetItemsKeys([value])))[0];
|
|
334
290
|
}
|
|
335
|
-
|
|
336
|
-
this.value.set(value);
|
|
291
|
+
this.ngModelValue.set(value);
|
|
337
292
|
}
|
|
338
293
|
getLookup(params, query) {
|
|
339
294
|
return toObservable(this.dataProvider().lookup(params, this.dataProviderService, query)).pipe(switchMap(items => {
|
|
@@ -396,13 +351,66 @@ class AutocompleteComponent {
|
|
|
396
351
|
this.userSelectedItem = undefined;
|
|
397
352
|
}
|
|
398
353
|
}
|
|
354
|
+
/**
|
|
355
|
+
* Selects and sets new value.
|
|
356
|
+
*
|
|
357
|
+
* @param value Represents the object value.
|
|
358
|
+
* @param fromUser If set value is triggered from user.
|
|
359
|
+
*/
|
|
360
|
+
setValue(value, fromUser = false) {
|
|
361
|
+
if (fromUser) {
|
|
362
|
+
this.userSelectedItem = value;
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
this.ngModelValue.set(value);
|
|
366
|
+
}
|
|
367
|
+
this.propagateValueChange(value);
|
|
368
|
+
}
|
|
369
|
+
trimValue(value) {
|
|
370
|
+
switch (this.searchTrim()) {
|
|
371
|
+
case 'start':
|
|
372
|
+
return value?.trimStart();
|
|
373
|
+
case 'end':
|
|
374
|
+
return value?.trimEnd();
|
|
375
|
+
case 'both':
|
|
376
|
+
return value?.trim();
|
|
377
|
+
default:
|
|
378
|
+
return value;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
propagateValueChange(value) {
|
|
382
|
+
const output = this.convertValueWithOptionsValuePropSetting(value);
|
|
383
|
+
this._value = output;
|
|
384
|
+
this.onChangeFn(output);
|
|
385
|
+
this.valueChange.emit(output);
|
|
386
|
+
}
|
|
387
|
+
convertValueWithOptionsValuePropSetting(value) {
|
|
388
|
+
const optionsValueProperty = this.optionsValueProperty();
|
|
389
|
+
if (!optionsValueProperty) {
|
|
390
|
+
return value;
|
|
391
|
+
}
|
|
392
|
+
if (this.multiselect() && Array.isArray(value)) {
|
|
393
|
+
return value.map((item) => {
|
|
394
|
+
if (item && typeof item === 'object') {
|
|
395
|
+
return item[optionsValueProperty];
|
|
396
|
+
}
|
|
397
|
+
return null;
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
else if (value && typeof value === 'object') {
|
|
401
|
+
return value[optionsValueProperty];
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
return value;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
399
407
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
400
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.4", type: AutocompleteComponent, isStandalone: true, selector: "mng-autocomplete", inputs: { dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: true, transformFunction: null }, optionsTrackProperty: { classPropertyName: "optionsTrackProperty", publicName: "optionsTrackProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsValuePropertyInit: { classPropertyName: "optionsValuePropertyInit", publicName: "optionsValueProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelPropertyInit: { classPropertyName: "optionsLabelPropertyInit", publicName: "optionsLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelTranslate: { classPropertyName: "optionsLabelTranslate", publicName: "optionsLabelTranslate", isSignal: true, isRequired: false, transformFunction: null }, inlineSearch: { classPropertyName: "inlineSearch", publicName: "inlineSearch", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "openOnFocus", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, dropdownClassName: { classPropertyName: "dropdownClassName", publicName: "dropdownClassName", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, autoClear: { classPropertyName: "autoClear", publicName: "autoClear", isSignal: true, isRequired: false, transformFunction: null }, selectFirst: { classPropertyName: "selectFirst", publicName: "selectFirst", isSignal: true, isRequired: false, transformFunction: null }, searchTrim: { classPropertyName: "searchTrim", publicName: "searchTrim", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeAutocomplete", first: true, predicate: AutoComplete, descendants: true, isSignal: true }], ngImport: i0, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [ngModel]=\"
|
|
408
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.4", type: AutocompleteComponent, isStandalone: true, selector: "mng-autocomplete", inputs: { dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: true, transformFunction: null }, optionsTrackProperty: { classPropertyName: "optionsTrackProperty", publicName: "optionsTrackProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsValuePropertyInit: { classPropertyName: "optionsValuePropertyInit", publicName: "optionsValueProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelPropertyInit: { classPropertyName: "optionsLabelPropertyInit", publicName: "optionsLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelTranslate: { classPropertyName: "optionsLabelTranslate", publicName: "optionsLabelTranslate", isSignal: true, isRequired: false, transformFunction: null }, inlineSearch: { classPropertyName: "inlineSearch", publicName: "inlineSearch", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "openOnFocus", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, dropdownClassName: { classPropertyName: "dropdownClassName", publicName: "dropdownClassName", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, autoClear: { classPropertyName: "autoClear", publicName: "autoClear", isSignal: true, isRequired: false, transformFunction: null }, selectFirst: { classPropertyName: "selectFirst", publicName: "selectFirst", isSignal: true, isRequired: false, transformFunction: null }, searchTrim: { classPropertyName: "searchTrim", publicName: "searchTrim", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeAutocomplete", first: true, predicate: AutoComplete, descendants: true, isSignal: true }], ngImport: i0, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dropdown]=\"true\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [suggestions]=\"suggestions()\"\n [multiple]=\"multiselect()\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [minLength]=\"openOnFocus() ? 0 : 1\"\n [showClear]=\"showClear()\"\n [forceSelection]=\"autoClear()\"\n [disabled]=\"disabled()\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n (onBlur)=\"onBlur($event)\"\n (onClear)=\"onClear()\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n", dependencies: [{ kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i1.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
401
409
|
}
|
|
402
410
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
403
411
|
type: Component,
|
|
404
|
-
args: [{ standalone: true, selector: 'mng-autocomplete', providers: [AUTOCOMPLETE_VALUE_ACCESSOR], imports: [AutoCompleteModule, AsyncPipe, TranslateModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [ngModel]=\"
|
|
405
|
-
}] });
|
|
412
|
+
args: [{ standalone: true, selector: 'mng-autocomplete', providers: [AUTOCOMPLETE_VALUE_ACCESSOR], imports: [AutoCompleteModule, AsyncPipe, TranslateModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dropdown]=\"true\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [suggestions]=\"suggestions()\"\n [multiple]=\"multiselect()\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [minLength]=\"openOnFocus() ? 0 : 1\"\n [showClear]=\"showClear()\"\n [forceSelection]=\"autoClear()\"\n [disabled]=\"disabled()\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n (onBlur)=\"onBlur($event)\"\n (onClear)=\"onClear()\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n" }]
|
|
413
|
+
}], ctorParameters: () => [] });
|
|
406
414
|
|
|
407
415
|
const DATE_RANGE_VALUE_ACCESSOR = {
|
|
408
416
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -512,46 +520,58 @@ const DROPDOWN_VALUE_ACCESSOR = {
|
|
|
512
520
|
multi: true
|
|
513
521
|
};
|
|
514
522
|
class DropdownComponent {
|
|
523
|
+
get value() {
|
|
524
|
+
return this._value;
|
|
525
|
+
}
|
|
515
526
|
constructor() {
|
|
516
527
|
this.logger = inject(LoggerService).create('DropdownComponent');
|
|
517
528
|
this.injector = inject(Injector);
|
|
518
529
|
this.destroyRef = inject(DestroyRef);
|
|
519
530
|
this.translate = inject(TranslateService);
|
|
520
|
-
// private readonly formlyWrapper = inject(FormlyFieldWrapperComponent, {optional: true}); TODO: find workarround
|
|
521
|
-
this.dropdownFormControl = new FormControl();
|
|
522
531
|
this.dataProvider = input();
|
|
523
532
|
this.options = input([]);
|
|
524
533
|
this.optionsTrackProperty = input();
|
|
525
534
|
this.optionsLabelPropertyInit = input(undefined, { alias: 'optionsLabelProperty' });
|
|
526
|
-
this.optionsLabelTranslate = input(false);
|
|
527
|
-
this.
|
|
535
|
+
this.optionsLabelTranslate = input(false, { transform: booleanAttribute });
|
|
536
|
+
this.optionsValuePropertyInput = input(undefined, { alias: 'optionsValueProperty' });
|
|
528
537
|
this.optionsDisabledProperty = input();
|
|
529
|
-
this.multiselect = input(false);
|
|
538
|
+
this.multiselect = input(false, { transform: booleanAttribute });
|
|
530
539
|
this.placeholder = input();
|
|
531
|
-
this.showClear = input(false);
|
|
532
|
-
this.
|
|
540
|
+
this.showClear = input(false, { transform: booleanAttribute });
|
|
541
|
+
this.selectFirstItemInput = input(false, { transform: booleanAttribute, alias: 'selectFirstItem' });
|
|
533
542
|
this.className = input();
|
|
534
543
|
this.dropdownClassName = input();
|
|
535
|
-
this.changeValueOnBlur = input(false);
|
|
536
|
-
this.
|
|
537
|
-
this.
|
|
544
|
+
this.changeValueOnBlur = input(false, { transform: booleanAttribute });
|
|
545
|
+
this.loadingInput = input(false, { alias: 'loading', transform: booleanAttribute });
|
|
546
|
+
this.disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });
|
|
547
|
+
this.valueChange = output();
|
|
548
|
+
this.blur = output();
|
|
538
549
|
this.primeDropdown = viewChild(Dropdown);
|
|
539
|
-
this.
|
|
550
|
+
this.primeMultiselect = viewChild(MultiSelect);
|
|
551
|
+
this.ngModelValue = signal(undefined);
|
|
552
|
+
this._loading = signal(false);
|
|
553
|
+
this._disabled = signal(false);
|
|
554
|
+
this.loading = computed(() => this.loadingInput() || this._loading());
|
|
555
|
+
this.disabled = computed(() => this.disabledInput() || this._disabled());
|
|
556
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
557
|
+
this.onChangeFn = () => { };
|
|
540
558
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
541
559
|
this.onTouchedFn = () => { };
|
|
560
|
+
this.dataProviderService = null;
|
|
542
561
|
this.items = signal([]);
|
|
543
562
|
this.firstTimeSettingItems = true;
|
|
563
|
+
this.isDropdownPanelShown = false;
|
|
544
564
|
this.optionsLabelProperty = computed(() => {
|
|
545
565
|
if (this.optionsLabelTranslate()) {
|
|
546
566
|
// setup translation properties
|
|
547
567
|
if (this.optionsLabelPropertyInit()) {
|
|
548
568
|
return `${this.optionsLabelPropertyInit()}_i18n`;
|
|
549
569
|
}
|
|
550
|
-
else if (!this.optionsLabelPropertyInit() && !this.
|
|
570
|
+
else if (!this.optionsLabelPropertyInit() && !this.optionsValuePropertyInput()) {
|
|
551
571
|
return 'title_i18n';
|
|
552
572
|
}
|
|
553
573
|
else {
|
|
554
|
-
throw new CommonsInternalError(`Invalid use with value (${this.
|
|
574
|
+
throw new CommonsInternalError(`Invalid use with value (${this.optionsValuePropertyInput()}) and label (${this.optionsLabelPropertyInit()}) property setup.`, {
|
|
555
575
|
name: 'DropdownComponentError'
|
|
556
576
|
});
|
|
557
577
|
}
|
|
@@ -561,28 +581,87 @@ class DropdownComponent {
|
|
|
561
581
|
this.optionsValueProperty = computed(() => {
|
|
562
582
|
if (this.optionsLabelTranslate()) {
|
|
563
583
|
// setup translation properties
|
|
564
|
-
if (!this.optionsLabelPropertyInit() && !this.
|
|
584
|
+
if (!this.optionsLabelPropertyInit() && !this.optionsValuePropertyInput()) {
|
|
565
585
|
return 'value';
|
|
566
586
|
}
|
|
567
587
|
else if (!this.optionsLabelPropertyInit()) {
|
|
568
|
-
throw new CommonsInternalError(`Invalid use with value (${this.
|
|
588
|
+
throw new CommonsInternalError(`Invalid use with value (${this.optionsValuePropertyInput()}) and label (${this.optionsLabelPropertyInit()}) property setup.`, {
|
|
569
589
|
name: 'DropdownComponentError'
|
|
570
590
|
});
|
|
571
591
|
}
|
|
572
592
|
}
|
|
573
|
-
return this.
|
|
593
|
+
return this.optionsValuePropertyInput();
|
|
594
|
+
});
|
|
595
|
+
effect(() => {
|
|
596
|
+
this._value = this.ngModelValue();
|
|
574
597
|
});
|
|
575
598
|
}
|
|
576
599
|
ngOnInit() {
|
|
577
|
-
this.
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
600
|
+
this.setDataProviderAndOptions();
|
|
601
|
+
}
|
|
602
|
+
registerOnChange(fn) {
|
|
603
|
+
this.onChangeFn = fn;
|
|
604
|
+
}
|
|
605
|
+
registerOnTouched(fn) {
|
|
606
|
+
this.onTouchedFn = fn;
|
|
607
|
+
}
|
|
608
|
+
setDisabledState(isDisabled) {
|
|
609
|
+
setTimeout(() => this._disabled.set(isDisabled));
|
|
610
|
+
}
|
|
611
|
+
writeValue(value) {
|
|
612
|
+
// this check is required because angular in some cases writes null value
|
|
613
|
+
// before value accessor is initialized
|
|
614
|
+
// if form control value is of primitive type (ex: enums) then write value is not called (we think)
|
|
615
|
+
if (value == null && this._value == null) {
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
// write value immediately - it is important so that first select is not triggered!
|
|
619
|
+
this._value = value;
|
|
620
|
+
this.adjustValueOnItemsValuePropertyTypeMismatch(true);
|
|
621
|
+
}
|
|
622
|
+
onDropdownBlur(event) {
|
|
623
|
+
if (this.isDropdownPanelShown) {
|
|
624
|
+
// ignore this blur event
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
const primeDropdown = this.primeDropdown();
|
|
628
|
+
if (this.changeValueOnBlur() && primeDropdown) {
|
|
629
|
+
this.propagateValueChange(primeDropdown.value);
|
|
630
|
+
}
|
|
631
|
+
this.onTouchedFn();
|
|
632
|
+
this.blur.emit(event);
|
|
633
|
+
}
|
|
634
|
+
onDropdownChange(event) {
|
|
635
|
+
if (!this.changeValueOnBlur()) {
|
|
636
|
+
this.propagateValueChange(event.value);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
onDropdownPanelShow() {
|
|
640
|
+
this.isDropdownPanelShown = true;
|
|
641
|
+
}
|
|
642
|
+
onDropdownPanelHide() {
|
|
643
|
+
this.isDropdownPanelShown = false;
|
|
644
|
+
}
|
|
645
|
+
onMultiselectChange(event) {
|
|
646
|
+
if (!this.changeValueOnBlur()) {
|
|
647
|
+
this.propagateValueChange(event.value);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
onMultiselectBlur(event) {
|
|
651
|
+
this.onTouchedFn();
|
|
652
|
+
this.blur.emit(event.originalEvent);
|
|
653
|
+
}
|
|
654
|
+
onMultiselectPanelHide() {
|
|
655
|
+
const primeMultiselect = this.primeMultiselect();
|
|
656
|
+
if (this.changeValueOnBlur() && primeMultiselect) {
|
|
657
|
+
this.propagateValueChange(primeMultiselect.value);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
setDataProviderAndOptions() {
|
|
582
661
|
const dataProvider = this.dataProvider();
|
|
583
662
|
const options = this.options();
|
|
584
663
|
if (dataProvider) {
|
|
585
|
-
this.
|
|
664
|
+
this._loading.set(true);
|
|
586
665
|
this.dataProviderService = dataProvider.serviceType ? this.injector.get(dataProvider.serviceType) : null;
|
|
587
666
|
toObservable(dataProvider.lookup({ limit: 50 }, this.dataProviderService))
|
|
588
667
|
.pipe(switchMap(items => {
|
|
@@ -618,15 +697,12 @@ class DropdownComponent {
|
|
|
618
697
|
.subscribe({
|
|
619
698
|
next: res => {
|
|
620
699
|
this.items.set(res);
|
|
621
|
-
this.
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
const value = optionsValueProperty ? res[0][optionsValueProperty] : res[0];
|
|
625
|
-
this.dropdownFormControl?.setValue(value);
|
|
626
|
-
this.firstTimeSettingItems = false;
|
|
627
|
-
}
|
|
700
|
+
this._loading.set(false);
|
|
701
|
+
this.selectFirstItem();
|
|
702
|
+
this.adjustValueOnItemsValuePropertyTypeMismatch();
|
|
628
703
|
},
|
|
629
704
|
error: err => {
|
|
705
|
+
this._loading.set(false);
|
|
630
706
|
const error = fromSubscribeError(err, 'DropdownComponentError');
|
|
631
707
|
this.logger.log(error, getErrorLogLevel(error));
|
|
632
708
|
}
|
|
@@ -635,74 +711,65 @@ class DropdownComponent {
|
|
|
635
711
|
else {
|
|
636
712
|
toObservable(options ?? [])
|
|
637
713
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
638
|
-
.subscribe(
|
|
639
|
-
|
|
640
|
-
|
|
714
|
+
.subscribe({
|
|
715
|
+
next: qr => {
|
|
716
|
+
this.items.set(qr);
|
|
717
|
+
this._loading.set(false);
|
|
718
|
+
this.selectFirstItem();
|
|
719
|
+
this.adjustValueOnItemsValuePropertyTypeMismatch();
|
|
720
|
+
},
|
|
721
|
+
error: err => {
|
|
722
|
+
this.items.set([]);
|
|
723
|
+
this._loading.set(false);
|
|
724
|
+
const error = fromSubscribeError(err, 'DropdownComponentError');
|
|
725
|
+
this.logger.log(error, getErrorLogLevel(error));
|
|
726
|
+
}
|
|
641
727
|
});
|
|
642
728
|
}
|
|
643
729
|
}
|
|
644
|
-
|
|
645
|
-
this.
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
if (this.changeValueOnBlur()) {
|
|
670
|
-
this.propagateValueChange(this.dropdownFormControl.value);
|
|
730
|
+
selectFirstItem() {
|
|
731
|
+
if (this.firstTimeSettingItems && this.items().length > 0 && this.selectFirstItemInput() && !this._value) {
|
|
732
|
+
const optionsValueProperty = this.optionsValueProperty();
|
|
733
|
+
const value = optionsValueProperty ? this.items()[0][optionsValueProperty] : this.items()[0];
|
|
734
|
+
this.ngModelValue.set(value); // set to write for input
|
|
735
|
+
this.firstTimeSettingItems = false;
|
|
736
|
+
this.propagateValueChange(value);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
adjustValueOnItemsValuePropertyTypeMismatch(setNgModelValue = false) {
|
|
740
|
+
const optionsValueProp = this.optionsValueProperty();
|
|
741
|
+
if (optionsValueProp &&
|
|
742
|
+
this._value &&
|
|
743
|
+
this.items().length > 0 &&
|
|
744
|
+
this.items()[0][optionsValueProp] != null &&
|
|
745
|
+
typeof this.items()[0][optionsValueProp] !== typeof this._value) {
|
|
746
|
+
// types dont match, search and compare by string
|
|
747
|
+
const selectedOption = this.items().find(i => i[optionsValueProp] != null && i[optionsValueProp].toString() === this._value.toString());
|
|
748
|
+
if (selectedOption) {
|
|
749
|
+
this.ngModelValue.set(selectedOption[optionsValueProp]);
|
|
750
|
+
}
|
|
751
|
+
else if (setNgModelValue) {
|
|
752
|
+
// force write to ngModelValue anyway
|
|
753
|
+
this.ngModelValue.set(this._value);
|
|
754
|
+
}
|
|
671
755
|
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
if (this.changeValueOnBlur()) {
|
|
676
|
-
this.propagateValueChange(this.dropdownFormControl.value);
|
|
756
|
+
else if (setNgModelValue) {
|
|
757
|
+
// force write to ngModelValue anyway
|
|
758
|
+
this.ngModelValue.set(this._value);
|
|
677
759
|
}
|
|
678
760
|
}
|
|
679
761
|
propagateValueChange(value) {
|
|
680
|
-
|
|
681
|
-
return;
|
|
682
|
-
}
|
|
683
|
-
// this.formlyWrapper?.formControl?.markAsTouched(); TODO
|
|
762
|
+
this._value = value;
|
|
684
763
|
this.onChangeFn(value);
|
|
685
|
-
this.
|
|
686
|
-
}
|
|
687
|
-
/**
|
|
688
|
-
* Prevents executions for writing and outputting value which is sometimes committed as null in cmp initialization stage.
|
|
689
|
-
* In dropdown (from ang. 15 and switch to standalone cmp) null value was always committed to dropdown even if default value was set (using ngModel or formControl) which is incorrect.
|
|
690
|
-
* Github issue: https://github.com/angular/angular/issues/14988
|
|
691
|
-
* @private
|
|
692
|
-
*/
|
|
693
|
-
isValueAccessorInitialized() {
|
|
694
|
-
return typeof this.onChangeFn !== 'undefined';
|
|
764
|
+
this.valueChange.emit(value);
|
|
695
765
|
}
|
|
696
766
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
697
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: DropdownComponent, isStandalone: true, selector: "mng-dropdown", inputs: { dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionsTrackProperty: { classPropertyName: "optionsTrackProperty", publicName: "optionsTrackProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelPropertyInit: { classPropertyName: "optionsLabelPropertyInit", publicName: "optionsLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelTranslate: { classPropertyName: "optionsLabelTranslate", publicName: "optionsLabelTranslate", isSignal: true, isRequired: false, transformFunction: null },
|
|
767
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: DropdownComponent, isStandalone: true, selector: "mng-dropdown", inputs: { dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionsTrackProperty: { classPropertyName: "optionsTrackProperty", publicName: "optionsTrackProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelPropertyInit: { classPropertyName: "optionsLabelPropertyInit", publicName: "optionsLabelProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsLabelTranslate: { classPropertyName: "optionsLabelTranslate", publicName: "optionsLabelTranslate", isSignal: true, isRequired: false, transformFunction: null }, optionsValuePropertyInput: { classPropertyName: "optionsValuePropertyInput", publicName: "optionsValueProperty", isSignal: true, isRequired: false, transformFunction: null }, optionsDisabledProperty: { classPropertyName: "optionsDisabledProperty", publicName: "optionsDisabledProperty", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, selectFirstItemInput: { classPropertyName: "selectFirstItemInput", publicName: "selectFirstItem", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, dropdownClassName: { classPropertyName: "dropdownClassName", publicName: "dropdownClassName", isSignal: true, isRequired: false, transformFunction: null }, changeValueOnBlur: { classPropertyName: "changeValueOnBlur", publicName: "changeValueOnBlur", isSignal: true, isRequired: false, transformFunction: null }, loadingInput: { classPropertyName: "loadingInput", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeDropdown", first: true, predicate: Dropdown, descendants: true, isSignal: true }, { propertyName: "primeMultiselect", first: true, predicate: MultiSelect, descendants: true, isSignal: true }], ngImport: i0, template: "@if (!multiselect()) {\n <p-dropdown\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [showClear]=\"showClear()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [disabled]=\"disabled()\"\n (onBlur)=\"onDropdownBlur($event)\"\n (onChange)=\"onDropdownChange($event)\"\n (onShow)=\"onDropdownPanelShow()\"\n (onHide)=\"onDropdownPanelHide()\"\n [dropdownIcon]=\"loading() ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n appendTo=\"body\">\n </p-dropdown>\n} @else {\n <p-multiSelect\n [ngModel]=\"ngModelValue()\"\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [filter]=\"true\"\n [showToggleAll]=\"false\"\n [disabled]=\"disabled()\"\n (onChange)=\"onMultiselectChange($event)\"\n (onPanelHide)=\"onMultiselectPanelHide()\"\n (onBlur)=\"onMultiselectBlur($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n}\n", dependencies: [{ kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i1$2.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i2$1.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
698
768
|
}
|
|
699
769
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
700
770
|
type: Component,
|
|
701
|
-
args: [{ standalone: true, selector: 'mng-dropdown', providers: [DROPDOWN_VALUE_ACCESSOR], imports: [DropdownModule, MultiSelectModule, TranslateModule,
|
|
702
|
-
}],
|
|
703
|
-
type: Output,
|
|
704
|
-
args: ['valueChange']
|
|
705
|
-
}] } });
|
|
771
|
+
args: [{ standalone: true, selector: 'mng-dropdown', providers: [DROPDOWN_VALUE_ACCESSOR], imports: [DropdownModule, MultiSelectModule, TranslateModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!multiselect()) {\n <p-dropdown\n [ngModel]=\"ngModelValue()\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [showClear]=\"showClear()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [disabled]=\"disabled()\"\n (onBlur)=\"onDropdownBlur($event)\"\n (onChange)=\"onDropdownChange($event)\"\n (onShow)=\"onDropdownPanelShow()\"\n (onHide)=\"onDropdownPanelHide()\"\n [dropdownIcon]=\"loading() ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n appendTo=\"body\">\n </p-dropdown>\n} @else {\n <p-multiSelect\n [ngModel]=\"ngModelValue()\"\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [placeholder]=\"placeholder()\"\n [dataKey]=\"optionsTrackProperty()\"\n [optionLabel]=\"optionsLabelProperty()\"\n [optionValue]=\"optionsValueProperty()\"\n [optionDisabled]=\"optionsDisabledProperty()\"\n [options]=\"items()\"\n [styleClass]=\"className()\"\n [panelStyleClass]=\"dropdownClassName()\"\n [filter]=\"true\"\n [showToggleAll]=\"false\"\n [disabled]=\"disabled()\"\n (onChange)=\"onMultiselectChange($event)\"\n (onPanelHide)=\"onMultiselectPanelHide()\"\n (onBlur)=\"onMultiselectBlur($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n}\n" }]
|
|
772
|
+
}], ctorParameters: () => [] });
|
|
706
773
|
|
|
707
774
|
class InputTrimDirective {
|
|
708
775
|
constructor(el, ngControl) {
|