novo-elements 10.18.0-next.2 → 10.18.0-next.4
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/elements/common/option/option.component.d.ts +2 -1
- package/elements/common/option/option.component.scss +1 -1
- package/elements/query-builder/condition-definitions/picker-condition.definition.d.ts +9 -1
- package/elements/select/Select.d.ts +7 -3
- package/elements/select-search/select-search.component.d.ts +5 -2
- package/esm2022/elements/common/option/option.component.mjs +9 -5
- package/esm2022/elements/query-builder/condition-builder/condition-builder.component.mjs +2 -2
- package/esm2022/elements/query-builder/condition-definitions/picker-condition.definition.mjs +78 -11
- package/esm2022/elements/query-builder/condition-definitions/string-condition.definition.mjs +3 -3
- package/esm2022/elements/select/Select.mjs +23 -9
- package/esm2022/elements/select-search/select-search.component.mjs +28 -8
- package/fesm2022/novo-elements-elements-common.mjs +8 -4
- package/fesm2022/novo-elements-elements-common.mjs.map +1 -1
- package/fesm2022/novo-elements-elements-query-builder.mjs +87 -22
- package/fesm2022/novo-elements-elements-query-builder.mjs.map +1 -1
- package/fesm2022/novo-elements-elements-select-search.mjs +28 -8
- package/fesm2022/novo-elements-elements-select-search.mjs.map +1 -1
- package/fesm2022/novo-elements-elements-select.mjs +21 -7
- package/fesm2022/novo-elements-elements-select.mjs.map +1 -1
- package/package.json +28 -28
|
@@ -31,6 +31,7 @@ export declare class NovoOptionBase implements FocusableOption, AfterViewChecked
|
|
|
31
31
|
keepOpen: boolean;
|
|
32
32
|
novoInert: boolean;
|
|
33
33
|
allowSelection: boolean;
|
|
34
|
+
customViewValue: string;
|
|
34
35
|
/** If there is no parent then nothing is managing the selection. */
|
|
35
36
|
get selectable(): NovoOptionParentComponent;
|
|
36
37
|
/** Whether the wrapping component is in multiple selection mode. */
|
|
@@ -110,7 +111,7 @@ export declare class NovoOptionBase implements FocusableOption, AfterViewChecked
|
|
|
110
111
|
/** Emits the selection change event. */
|
|
111
112
|
private _emitSelectionChangeEvent;
|
|
112
113
|
static ɵfac: i0.ɵɵFactoryDeclaration<NovoOptionBase, [null, null, { optional: true; }, { optional: true; }]>;
|
|
113
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NovoOptionBase, never, never, { "keepOpen": { "alias": "keepOpen"; "required": false; }; "novoInert": { "alias": "novoInert"; "required": false; }; "allowSelection": { "alias": "allowSelection"; "required": false; }; "value": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "onSelectionChange": "onSelectionChange"; }, never, never, false, never>;
|
|
114
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NovoOptionBase, never, never, { "keepOpen": { "alias": "keepOpen"; "required": false; }; "novoInert": { "alias": "novoInert"; "required": false; }; "allowSelection": { "alias": "allowSelection"; "required": false; }; "customViewValue": { "alias": "customViewValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "onSelectionChange": "onSelectionChange"; }, never, never, false, never>;
|
|
114
115
|
}
|
|
115
116
|
/**
|
|
116
117
|
* Single option inside of a `<novo-select>` element.
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { NovoLabelService } from 'novo-elements/services';
|
|
2
|
-
import { Operator } from '../query-builder.types';
|
|
2
|
+
import { BaseFieldDef, Operator } from '../query-builder.types';
|
|
3
3
|
import { AbstractConditionFieldDef } from './abstract-condition.definition';
|
|
4
|
+
import { NovoSelectElement } from 'novo-elements/elements/select';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
type FieldOption = BaseFieldDef['options'][number];
|
|
5
7
|
/**
|
|
6
8
|
* Handle selection of field values when a list of options is provided.
|
|
7
9
|
*/
|
|
8
10
|
export declare class NovoDefaultPickerConditionDef extends AbstractConditionFieldDef {
|
|
9
11
|
defaultOperator: Operator;
|
|
10
12
|
constructor(labelService: NovoLabelService);
|
|
13
|
+
showAddOption(meta: any, select: any, filterValue: string): boolean;
|
|
14
|
+
optionTracker(option: FieldOption): string;
|
|
15
|
+
hideOption(option: FieldOption, filterValue: string): boolean;
|
|
16
|
+
customOptions(options: FieldOption[], select: NovoSelectElement): FieldOption[];
|
|
17
|
+
applyCustomItem(): void;
|
|
11
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<NovoDefaultPickerConditionDef, never>;
|
|
12
19
|
static ɵcmp: i0.ɵɵComponentDeclaration<NovoDefaultPickerConditionDef, "novo-picker-condition-def", never, {}, {}, never, never, false, never>;
|
|
13
20
|
}
|
|
21
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActiveDescendantKeyManager, FocusMonitor } from '@angular/cdk/a11y';
|
|
2
2
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
3
|
-
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
|
|
3
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, Injector, NgZone, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
|
|
4
4
|
import { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
|
5
5
|
import { Observable, Subject } from 'rxjs';
|
|
6
6
|
import { NovoLabelService } from 'novo-elements/services';
|
|
@@ -34,6 +34,7 @@ export declare class NovoSelectElement extends NovoSelectMixins implements OnIni
|
|
|
34
34
|
ref: ChangeDetectorRef;
|
|
35
35
|
private focusMonitor;
|
|
36
36
|
private ngZone;
|
|
37
|
+
private injector;
|
|
37
38
|
private _fieldElement;
|
|
38
39
|
private _uniqueId;
|
|
39
40
|
private _stateChanges;
|
|
@@ -98,6 +99,8 @@ export declare class NovoSelectElement extends NovoSelectMixins implements OnIni
|
|
|
98
99
|
optionGroups: QueryList<NovoOptgroup>;
|
|
99
100
|
contentOptions: QueryList<NovoOption>;
|
|
100
101
|
viewOptions: QueryList<NovoOption>;
|
|
102
|
+
viewOptionsSignal: import("@angular/core").WritableSignal<NovoOption[]>;
|
|
103
|
+
contentOptionsSignal: import("@angular/core").WritableSignal<NovoOption[]>;
|
|
101
104
|
hideLegacyOptionsForSearch: import("@angular/core").WritableSignal<boolean>;
|
|
102
105
|
hideLegacyOptions: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
103
106
|
private displayLegacyOptions;
|
|
@@ -126,7 +129,7 @@ export declare class NovoSelectElement extends NovoSelectMixins implements OnIni
|
|
|
126
129
|
get selected(): NovoOption | NovoOption[];
|
|
127
130
|
/** The value displayed in the trigger. */
|
|
128
131
|
get displayValue(): string;
|
|
129
|
-
constructor(elementRef: ElementRef, labels: NovoLabelService, ref: ChangeDetectorRef, focusMonitor: FocusMonitor, ngZone: NgZone, defaultErrorStateMatcher: ErrorStateMatcher, ngControl: NgControl, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, _fieldElement: NovoFieldElement);
|
|
132
|
+
constructor(elementRef: ElementRef, labels: NovoLabelService, ref: ChangeDetectorRef, focusMonitor: FocusMonitor, ngZone: NgZone, injector: Injector, defaultErrorStateMatcher: ErrorStateMatcher, ngControl: NgControl, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, _fieldElement: NovoFieldElement);
|
|
130
133
|
ngOnInit(): void;
|
|
131
134
|
ngOnChanges(changes: SimpleChanges): void;
|
|
132
135
|
ngAfterViewInit(): void;
|
|
@@ -178,6 +181,7 @@ export declare class NovoSelectElement extends NovoSelectMixins implements OnIni
|
|
|
178
181
|
*/
|
|
179
182
|
focus(options?: FocusOptions): void;
|
|
180
183
|
protected _getOptions(): NovoOption[];
|
|
184
|
+
protected _optionsComputed: import("@angular/core").Signal<NovoOption[]>;
|
|
181
185
|
/** Sorts the selected values in the selected based on their order in the panel. */
|
|
182
186
|
private _sortValues;
|
|
183
187
|
/** Emits change event to set the model value. */
|
|
@@ -207,7 +211,7 @@ export declare class NovoSelectElement extends NovoSelectMixins implements OnIni
|
|
|
207
211
|
saveHeader(): void;
|
|
208
212
|
/** Determines the `aria-activedescendant` to be set on the host. */
|
|
209
213
|
_getAriaActiveDescendant(): string | null;
|
|
210
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NovoSelectElement, [null, null, null, null, null, null, { optional: true; self: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
214
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NovoSelectElement, [null, null, null, null, null, null, null, { optional: true; self: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
211
215
|
static ɵcmp: i0.ɵɵComponentDeclaration<NovoSelectElement, "novo-select", never, { "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "headerConfig": { "alias": "headerConfig"; "required": false; }; "position": { "alias": "position"; "required": false; }; "overlayWidth": { "alias": "overlayWidth"; "required": false; }; "overlayHeight": { "alias": "overlayHeight"; "required": false; }; "displayIcon": { "alias": "displayIcon"; "required": false; }; "displayWith": { "alias": "displayWith"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "hideLegacyOptions": { "alias": "hideLegacyOptions"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "onSelect": "onSelect"; "selectionChange": "selectionChange"; "valueChange": "valueChange"; "openedChange": "openedChange"; "_openedStream": "opened"; "_closedStream": "closed"; }, ["optionGroups", "contentOptions"], ["*"], false, never>;
|
|
212
216
|
}
|
|
213
217
|
export {};
|
|
@@ -117,6 +117,8 @@ export declare class NovoSelectSearchComponent implements OnInit, OnDestroy, Con
|
|
|
117
117
|
disableInitialFocus: boolean;
|
|
118
118
|
/** Enable clear input on escape pressed */
|
|
119
119
|
enableClearOnEscapePressed: boolean;
|
|
120
|
+
/** Allow user to uncheck a value while filtering. */
|
|
121
|
+
allowDeselectDuringFilter: boolean;
|
|
120
122
|
/**
|
|
121
123
|
* Prevents home / end key being propagated to novo-select,
|
|
122
124
|
* allowing to move the cursor within the search input instead of navigating the options
|
|
@@ -156,15 +158,16 @@ export declare class NovoSelectSearchComponent implements OnInit, OnDestroy, Con
|
|
|
156
158
|
get value(): string;
|
|
157
159
|
private _lastExternalInputValue;
|
|
158
160
|
onTouched: Function;
|
|
161
|
+
_formControl: FormControl;
|
|
159
162
|
/** Reference to the NovoSelectElement options */
|
|
160
163
|
set _options(_options: QueryList<NovoOption>);
|
|
161
164
|
get _options(): QueryList<NovoOption>;
|
|
162
165
|
_options$: BehaviorSubject<QueryList<NovoOption>>;
|
|
166
|
+
private _filterFinishedRerender;
|
|
163
167
|
private optionsList$;
|
|
164
168
|
private optionsLength$;
|
|
165
169
|
/** Previously selected values when using <novo-select [multiple]="true">*/
|
|
166
170
|
private previousSelectedValues;
|
|
167
|
-
_formControl: FormControl;
|
|
168
171
|
/** whether to show the no entries found message */
|
|
169
172
|
_showNoEntriesFound$: Observable<boolean>;
|
|
170
173
|
/** Subject that emits when the component has been destroyed. */
|
|
@@ -232,5 +235,5 @@ export declare class NovoSelectSearchComponent implements OnInit, OnDestroy, Con
|
|
|
232
235
|
*/
|
|
233
236
|
private getOptionsLengthOffset;
|
|
234
237
|
static ɵfac: i0.ɵɵFactoryDeclaration<NovoSelectSearchComponent, [null, null, null, { optional: true; }, null, { optional: true; }]>;
|
|
235
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NovoSelectSearchComponent, "novo-select-search", never, { "name": { "alias": "name"; "required": false; }; "placeholderLabel": { "alias": "placeholderLabel"; "required": false; }; "type": { "alias": "type"; "required": false; }; "noEntriesFoundLabel": { "alias": "noEntriesFoundLabel"; "required": false; }; "indexAndLengthScreenReaderText": { "alias": "indexAndLengthScreenReaderText"; "required": false; }; "clearSearchInput": { "alias": "clearSearchInput"; "required": false; }; "searching": { "alias": "searching"; "required": false; }; "disableInitialFocus": { "alias": "disableInitialFocus"; "required": false; }; "enableClearOnEscapePressed": { "alias": "enableClearOnEscapePressed"; "required": false; }; "preventHomeEndKeyPropagation": { "alias": "preventHomeEndKeyPropagation"; "required": false; }; "disableScrollToActiveOnOptionsChanged": { "alias": "disableScrollToActiveOnOptionsChanged"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "showToggleAllCheckbox": { "alias": "showToggleAllCheckbox"; "required": false; }; "toggleAllCheckboxChecked": { "alias": "toggleAllCheckboxChecked"; "required": false; }; "toggleAllCheckboxIndeterminate": { "alias": "toggleAllCheckboxIndeterminate"; "required": false; }; "toggleAllCheckboxTooltipMessage": { "alias": "toggleAllCheckboxTooltipMessage"; "required": false; }; "toogleAllCheckboxTooltipPosition": { "alias": "toogleAllCheckboxTooltipPosition"; "required": false; }; "hideClearSearchButton": { "alias": "hideClearSearchButton"; "required": false; }; "alwaysRestoreSelectedOptionsMulti": { "alias": "alwaysRestoreSelectedOptionsMulti"; "required": false; }; }, { "toggleAll": "toggleAll"; }, ["clearIcon"], ["[novoSelectSearchClear]", ".novo-select-search-custom-header-content"], false, never>;
|
|
238
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NovoSelectSearchComponent, "novo-select-search", never, { "name": { "alias": "name"; "required": false; }; "placeholderLabel": { "alias": "placeholderLabel"; "required": false; }; "type": { "alias": "type"; "required": false; }; "noEntriesFoundLabel": { "alias": "noEntriesFoundLabel"; "required": false; }; "indexAndLengthScreenReaderText": { "alias": "indexAndLengthScreenReaderText"; "required": false; }; "clearSearchInput": { "alias": "clearSearchInput"; "required": false; }; "searching": { "alias": "searching"; "required": false; }; "disableInitialFocus": { "alias": "disableInitialFocus"; "required": false; }; "enableClearOnEscapePressed": { "alias": "enableClearOnEscapePressed"; "required": false; }; "allowDeselectDuringFilter": { "alias": "allowDeselectDuringFilter"; "required": false; }; "preventHomeEndKeyPropagation": { "alias": "preventHomeEndKeyPropagation"; "required": false; }; "disableScrollToActiveOnOptionsChanged": { "alias": "disableScrollToActiveOnOptionsChanged"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "showToggleAllCheckbox": { "alias": "showToggleAllCheckbox"; "required": false; }; "toggleAllCheckboxChecked": { "alias": "toggleAllCheckboxChecked"; "required": false; }; "toggleAllCheckboxIndeterminate": { "alias": "toggleAllCheckboxIndeterminate"; "required": false; }; "toggleAllCheckboxTooltipMessage": { "alias": "toggleAllCheckboxTooltipMessage"; "required": false; }; "toogleAllCheckboxTooltipPosition": { "alias": "toogleAllCheckboxTooltipPosition"; "required": false; }; "hideClearSearchButton": { "alias": "hideClearSearchButton"; "required": false; }; "alwaysRestoreSelectedOptionsMulti": { "alias": "alwaysRestoreSelectedOptionsMulti"; "required": false; }; }, { "toggleAll": "toggleAll"; }, ["clearIcon"], ["[novoSelectSearchClear]", ".novo-select-search-custom-header-content"], false, never>;
|
|
236
239
|
}
|