@ardium-ui/ui 5.0.0-alpha.47 → 5.0.0-alpha.49
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/fesm2022/ardium-ui-ui.mjs +57 -27
- package/fesm2022/ardium-ui-ui.mjs.map +1 -1
- package/lib/_internal/item-storages/dropdown-item-storage.d.ts +4 -1
- package/lib/search-functions.d.ts +1 -1
- package/lib/select/select.component.d.ts +5 -4
- package/lib/select/select.defaults.d.ts +2 -2
- package/lib/types/item-storage.types.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Signal } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import { AddCustomFn } from '../../select/select.types';
|
|
3
4
|
import { ArdOption, ArdOptionGroup, CompareWithFn, GroupByFn, SearchFn } from '../../types/item-storage.types';
|
|
4
5
|
import { Nullable } from '../../types/utility.types';
|
|
@@ -29,6 +30,7 @@ export declare class ItemStorage {
|
|
|
29
30
|
readonly highlightedItems: Signal<ArdOption[]>;
|
|
30
31
|
private readonly _lastHighlightedItem;
|
|
31
32
|
private readonly _recentlyHighlightedItem;
|
|
33
|
+
fndjf: import("@angular/core").EffectRef;
|
|
32
34
|
private readonly _groups;
|
|
33
35
|
private _updateItems;
|
|
34
36
|
private _updateItemsFromArray;
|
|
@@ -40,6 +42,7 @@ export declare class ItemStorage {
|
|
|
40
42
|
private _itemsToValue;
|
|
41
43
|
readonly isNoItemsToSelect: Signal<boolean>;
|
|
42
44
|
readonly isNoItemsFound: Signal<boolean>;
|
|
45
|
+
readonly isAnyItemExactMatch: Signal<boolean>;
|
|
43
46
|
readonly isAnyItemSelected: Signal<boolean>;
|
|
44
47
|
readonly isAnyItemHighlighted: Signal<boolean>;
|
|
45
48
|
readonly itemsLeftUntilLimit: Signal<number>;
|
|
@@ -57,7 +60,7 @@ export declare class ItemStorage {
|
|
|
57
60
|
private _wasValueWriteDeferred;
|
|
58
61
|
handleWriteValue(ngModel: any): void;
|
|
59
62
|
findItemByValue(valueToFind: any): ArdOption | undefined;
|
|
60
|
-
addCustomOption(value: string, fn: AddCustomFn<any> | AddCustomFn<Promise<any>>): Promise<ArdOption | null>;
|
|
63
|
+
addCustomOption(value: string, fn: AddCustomFn<any> | AddCustomFn<Promise<any>> | AddCustomFn<Observable<any>>): Promise<ArdOption | null>;
|
|
61
64
|
clearAllSelected(): any[];
|
|
62
65
|
clearLastSelected(): ArdOption;
|
|
63
66
|
selectItem(...items: ArdOption[]): [any[], any[], any[]];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchFn } from './types/item-storage.types';
|
|
2
|
-
export declare function searchInString(searchTerm: string, toSearch:
|
|
2
|
+
export declare function searchInString(searchTerm: string, toSearch: string): boolean;
|
|
3
3
|
export declare const searchFunctions: {
|
|
4
4
|
byLabel: SearchFn;
|
|
5
5
|
byValue: SearchFn;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { AfterContentInit, AfterViewInit, ElementRef, OnChanges, OnDestroy, OnInit, QueryList, Signal, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { BooleanLike, NumberLike } from '@ardium-ui/devkit';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
4
5
|
import { _FormFieldComponentBase } from '../_internal/form-field-component';
|
|
5
6
|
import { ItemStorage, ItemStorageHost } from '../_internal/item-storages/dropdown-item-storage';
|
|
6
7
|
import { ArdiumDropdownPanelComponent } from '../dropdown-panel/dropdown-panel.component';
|
|
7
8
|
import { DropdownPanelAppearance, DropdownPanelVariant } from '../dropdown-panel/dropdown-panel.types';
|
|
8
9
|
import { ArdiumOptionComponent } from '../option/option.component';
|
|
9
|
-
import { ArdOption, ArdOptionGroup, ArdPanelPosition, GroupByFn, OptionContext, SearchFn } from '../types/item-storage.types';
|
|
10
|
+
import { ArdOption, ArdOptionGroup, ArdPanelPosition, CompareWithFn, GroupByFn, OptionContext, SearchFn } from '../types/item-storage.types';
|
|
10
11
|
import { FormElementAppearance } from '../types/theming.types';
|
|
11
12
|
import { Nullable } from '../types/utility.types';
|
|
12
13
|
import { FormElementVariant } from './../types/theming.types';
|
|
@@ -54,7 +55,7 @@ export declare class ArdiumSelectComponent extends _FormFieldComponentBase imple
|
|
|
54
55
|
readonly maxSelectedItems: import("@angular/core").InputSignalWithTransform<number, NumberLike>;
|
|
55
56
|
readonly itemDisplayLimit: import("@angular/core").InputSignalWithTransform<number, NumberLike>;
|
|
56
57
|
readonly searchFn: import("@angular/core").InputSignal<SearchFn>;
|
|
57
|
-
readonly compareWith: import("@angular/core").InputSignal<Nullable<
|
|
58
|
+
readonly compareWith: import("@angular/core").InputSignal<Nullable<CompareWithFn>>;
|
|
58
59
|
readonly appearance: import("@angular/core").InputSignal<FormElementAppearance>;
|
|
59
60
|
readonly variant: import("@angular/core").InputSignal<FormElementVariant>;
|
|
60
61
|
readonly compact: import("@angular/core").InputSignalWithTransform<boolean, BooleanLike>;
|
|
@@ -73,8 +74,8 @@ export declare class ArdiumSelectComponent extends _FormFieldComponentBase imple
|
|
|
73
74
|
readonly searchable: import("@angular/core").InputSignalWithTransform<boolean, BooleanLike>;
|
|
74
75
|
readonly filtered: Signal<boolean>;
|
|
75
76
|
readonly touched: import("@angular/core").WritableSignal<boolean>;
|
|
76
|
-
private _defaultAddCustomFn;
|
|
77
|
-
readonly addCustom: import("@angular/core").InputSignalWithTransform<false | AddCustomFn<any> | AddCustomFn<Promise<any>>, string | boolean | AddCustomFn<any> | AddCustomFn<Promise<any>>>;
|
|
77
|
+
private readonly _defaultAddCustomFn;
|
|
78
|
+
readonly addCustom: import("@angular/core").InputSignalWithTransform<false | AddCustomFn<any> | AddCustomFn<Promise<any>> | AddCustomFn<Observable<any>>, string | boolean | AddCustomFn<any> | AddCustomFn<Promise<any>> | AddCustomFn<Observable<any>>>;
|
|
78
79
|
readonly shouldShowAddCustom: Signal<boolean>;
|
|
79
80
|
addCustomOption(value: string): Promise<void>;
|
|
80
81
|
setDisabledState(state: boolean): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InjectionToken, Provider } from '@angular/core';
|
|
2
2
|
import { _FormFieldComponentDefaults } from '../_internal/form-field-component';
|
|
3
3
|
import { DropdownPanelAppearance, DropdownPanelVariant } from '../dropdown-panel';
|
|
4
|
-
import { ArdPanelPosition, GroupByFn, SearchFn } from '../types/item-storage.types';
|
|
4
|
+
import { ArdPanelPosition, CompareWithFn, GroupByFn, SearchFn } from '../types/item-storage.types';
|
|
5
5
|
import { Nullable } from '../types/utility.types';
|
|
6
6
|
import { FormElementAppearance, FormElementVariant } from './../types/theming.types';
|
|
7
7
|
import { AddCustomFn } from './select.types';
|
|
@@ -35,7 +35,7 @@ export interface ArdSelectDefaults extends _FormFieldComponentDefaults {
|
|
|
35
35
|
maxSelectedItems: number;
|
|
36
36
|
itemDisplayLimit: number;
|
|
37
37
|
searchFn: SearchFn;
|
|
38
|
-
compareWith: Nullable<
|
|
38
|
+
compareWith: Nullable<CompareWithFn>;
|
|
39
39
|
appearance: FormElementAppearance;
|
|
40
40
|
variant: FormElementVariant;
|
|
41
41
|
compact: boolean;
|
|
@@ -17,6 +17,7 @@ export interface ArdOptionSimple extends ArdSimplestStorageItem {
|
|
|
17
17
|
}
|
|
18
18
|
export interface ArdOption extends ArdOptionSimple {
|
|
19
19
|
readonly filtered: boolean;
|
|
20
|
+
readonly isExactMatch: boolean;
|
|
20
21
|
readonly group: unknown;
|
|
21
22
|
readonly highlighted_recently: boolean;
|
|
22
23
|
}
|
|
@@ -33,5 +34,5 @@ export declare const ArdPanelPosition: {
|
|
|
33
34
|
export type ArdPanelPosition = (typeof ArdPanelPosition)[keyof typeof ArdPanelPosition];
|
|
34
35
|
export type ArdItemGroupMap = Map<any, ArdOptionGroup>;
|
|
35
36
|
export type GroupByFn = (item: any) => any;
|
|
36
|
-
export type SearchFn = (searchTerm: string, item: ArdOption) => boolean;
|
|
37
|
+
export type SearchFn = (searchTerm: string, item: ArdOption) => [boolean, boolean];
|
|
37
38
|
export type CompareWithFn = (value: any, optionValue: any) => boolean;
|