@acorex/components 22.0.0-next.21 → 22.0.0-next.22

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.
Files changed (42) hide show
  1. package/fesm2022/acorex-components-calendar.mjs +2 -2
  2. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  3. package/fesm2022/acorex-components-color-palette.mjs +2 -2
  4. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  5. package/fesm2022/acorex-components-cron-job.mjs +12 -12
  6. package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
  7. package/fesm2022/acorex-components-datetime-box.mjs +10 -12
  8. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  9. package/fesm2022/acorex-components-datetime-input.mjs +49 -30
  10. package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
  11. package/fesm2022/acorex-components-form.mjs +3 -4
  12. package/fesm2022/acorex-components-form.mjs.map +1 -1
  13. package/fesm2022/acorex-components-list.mjs +19 -265
  14. package/fesm2022/acorex-components-list.mjs.map +1 -1
  15. package/fesm2022/acorex-components-phone-box.mjs +6 -6
  16. package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
  17. package/fesm2022/acorex-components-query-builder.mjs +2 -6
  18. package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
  19. package/fesm2022/acorex-components-rest-api-generator.mjs +2 -2
  20. package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
  21. package/fesm2022/acorex-components-rrule.mjs +2 -2
  22. package/fesm2022/acorex-components-rrule.mjs.map +1 -1
  23. package/fesm2022/acorex-components-scheduler-picker.mjs +16 -16
  24. package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
  25. package/fesm2022/acorex-components-scheduler.mjs +2 -2
  26. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  27. package/fesm2022/acorex-components-select-box.mjs +451 -176
  28. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  29. package/fesm2022/acorex-components-selection-list.mjs +4 -0
  30. package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
  31. package/package.json +3 -7
  32. package/select-box/README.md +0 -2
  33. package/types/acorex-components-datetime-input.d.ts +14 -5
  34. package/types/acorex-components-list.d.ts +3 -65
  35. package/types/acorex-components-phone-box.d.ts +2 -2
  36. package/types/acorex-components-query-builder.d.ts +9 -10
  37. package/types/acorex-components-select-box.d.ts +147 -36
  38. package/types/acorex-components-selection-list.d.ts +2 -1
  39. package/combo-box/README.md +0 -3
  40. package/fesm2022/acorex-components-combo-box.mjs +0 -669
  41. package/fesm2022/acorex-components-combo-box.mjs.map +0 -1
  42. package/types/acorex-components-combo-box.d.ts +0 -202
@@ -1,11 +1,14 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnDestroy, TemplateRef } from '@angular/core';
2
+ import { OnDestroy, TemplateRef, ElementRef } from '@angular/core';
3
3
  import * as polytype from 'polytype';
4
4
  import * as i2 from '@acorex/cdk/common';
5
- import { MXSelectionValueComponent, MXLookComponent, MXSelectionBridgeService, AXEvent, AXValueChangedEvent } from '@acorex/cdk/common';
5
+ import { MXSelectionValueComponent, MXLookComponent, AXDataSource, MXSelectionBridgeService, AXEvent, AXValueChangedEvent, AXItemClickEvent, AXItemSelectedEvent } from '@acorex/cdk/common';
6
6
  import * as i12 from '@acorex/components/dropdown';
7
7
  import { MXDropdownBoxBaseComponent, AXDropdownBoxComponent } from '@acorex/components/dropdown';
8
+ import * as i13 from '@acorex/components/list';
9
+ import { AXListComponent } from '@acorex/components/list';
8
10
  import { AXSearchBoxComponent } from '@acorex/components/search-box';
11
+ import { Observable } from 'rxjs';
9
12
  import * as i1 from '@angular/common';
10
13
  import * as i3 from '@angular/forms';
11
14
  import * as i4 from '@acorex/components/check-box';
@@ -16,26 +19,35 @@ import * as i8 from '@acorex/components/popover';
16
19
  import * as i9 from '@acorex/components/loading';
17
20
  import * as i10 from '@angular/cdk/a11y';
18
21
  import * as i11 from '@acorex/components/text-box';
19
- import * as i13 from '@acorex/components/selection-list';
20
22
 
21
23
  declare const AXSelectBoxComponent_base: polytype.Polytype.ClusteredConstructor<[typeof MXDropdownBoxBaseComponent, typeof MXSelectionValueComponent, typeof MXLookComponent]>;
22
24
  /**
23
- * Simple dropdown select for a static items array.
24
- * For AXDataSource / lazy-load support, use ComboBox.
25
+ * The Button is a component which detects user interaction and triggers a corresponding event
26
+ * @category
25
27
  */
26
28
  declare class AXSelectBoxComponent extends AXSelectBoxComponent_base implements OnDestroy {
27
29
  #private;
28
- /** Static items shown in the dropdown. */
29
- readonly items: _angular_core.InputSignal<any[]>;
30
- readonly placeholder: _angular_core.InputSignal<string>;
31
- readonly minRecordsForSearch: _angular_core.InputSignal<number>;
32
- readonly caption: _angular_core.InputSignal<string>;
33
- readonly itemTemplate: _angular_core.InputSignal<TemplateRef<any>>;
34
- readonly selectedTemplate: _angular_core.InputSignal<TemplateRef<any>>;
35
- readonly emptyTemplate: _angular_core.InputSignal<TemplateRef<any>>;
36
- readonly maxVisibleItems: _angular_core.InputSignal<number>;
37
- readonly dropdownWidth: _angular_core.InputSignal<string>;
38
- readonly searchBoxAutoFocus: _angular_core.InputSignal<boolean>;
30
+ /**
31
+ * Determines if an item is truncated.
32
+ *
33
+ * @defaultValue true
34
+ */
35
+ readonly isItemTruncated: _angular_core.InputSignal<boolean>;
36
+ /**
37
+ * Determines if a tooltip is shown for an item.
38
+ *
39
+ * @defaultValue false
40
+ */
41
+ readonly showItemTooltip: _angular_core.InputSignal<boolean>;
42
+ private host;
43
+ /** Height of each list item in pixels, or 'auto' to let list measure. */
44
+ itemHeight: _angular_core.InputSignal<number | "auto">;
45
+ /** Maximum number of visible items before scrolling. */
46
+ maxVisibleItems: _angular_core.InputSignal<number>;
47
+ /** @ignore */
48
+ private hotKeyService;
49
+ /** @ignore */
50
+ protected isLoading: _angular_core.WritableSignal<boolean>;
39
51
  /** @ignore */
40
52
  protected searchValue: _angular_core.WritableSignal<string>;
41
53
  /** @ignore */
@@ -45,42 +57,141 @@ declare class AXSelectBoxComponent extends AXSelectBoxComponent_base implements
45
57
  /** @ignore */
46
58
  protected _dropdownHeight: _angular_core.WritableSignal<string>;
47
59
  /** @ignore */
48
- protected visibleItems: _angular_core.WritableSignal<any[]>;
49
- private hotKeyService;
50
- private _unsubscriber;
60
+ protected _listDataSource: AXDataSource<any>;
61
+ /** @ignore */
62
+ private _originalDataSource;
63
+ /** @ignore */
64
+ private onChangedSubscription;
65
+ /** @ignore */
66
+ private onLoadingChangedSubscription;
67
+ /**
68
+ * Gets the data source for the component, which can be either an `AXDataSource` or an array of items.
69
+ * @returns {AXDataSource<any> | any[]}
70
+ */
71
+ get dataSource(): AXDataSource<any> | any[];
72
+ /**
73
+ * Sets the data source, either as an `AXDataSource` or an array.
74
+ * @param {AXDataSource<any> | any[]} v
75
+ */
76
+ set dataSource(v: AXDataSource<any> | any[]);
77
+ /**
78
+ * The placeholder text displayed when the component is empty.
79
+ * @param {string} placeholder
80
+ */
81
+ placeholder: string;
82
+ /**
83
+ * The minRecordsForSearch defines the minimum number of records required to display the search box.
84
+ * @param {number} minRecordsForSearch
85
+ */
86
+ minRecordsForSearch: number;
87
+ /**
88
+ * The caption text to be displayed in the component.
89
+ * @param {string} caption
90
+ */
91
+ caption: string;
92
+ /**
93
+ * The template used to customize the rendering of items.
94
+ * @param {TemplateRef<any>} itemTemplate
95
+ */
96
+ itemTemplate: TemplateRef<any>;
97
+ /**
98
+ * The template used to customize the rendering of selected items.
99
+ * @param {TemplateRef<any>} selectedTemplate
100
+ */
101
+ selectedTemplate: TemplateRef<any>;
102
+ /**
103
+ * The template used to display when there are no items.
104
+ * @param {TemplateRef<any>} emptyTemplate
105
+ */
106
+ emptyTemplate: TemplateRef<any>;
107
+ /**
108
+ * The template used to display while loading.
109
+ * @param {TemplateRef<any>} loadingTemplate
110
+ */
111
+ loadingTemplate: TemplateRef<any>;
112
+ /**
113
+ * The width of the dropdown in pixels.
114
+ * @defaultValue null
115
+ */
116
+ dropdownWidth: _angular_core.InputSignal<string>;
117
+ /** @ignore */
118
+ panel: ElementRef<HTMLDivElement>;
119
+ /** @ignore */
120
+ list: AXListComponent;
121
+ /** @ignore */
122
+ searchBox: AXSearchBoxComponent;
123
+ searchBoxAutoFocus: _angular_core.InputSignal<boolean>;
124
+ /** @ignore */
125
+ protected dropdown: AXDropdownBoxComponent;
126
+ /**
127
+ * Service for managing selection data, injected via `AX_SELECTION_DATA_TOKEN`.
128
+ */
51
129
  selectionService: MXSelectionBridgeService;
52
- private readonly panel;
53
- private readonly selectionList;
54
- protected readonly searchBox: _angular_core.Signal<AXSearchBoxComponent>;
55
- private readonly dropdownRef;
56
- /** Required by MXDropdownBoxBaseComponent. */
57
- protected get dropdown(): AXDropdownBoxComponent;
130
+ searchEvent: Observable<any>;
131
+ /** @ignore */
132
+ private _unsubscriber;
133
+ /** @ignore */
58
134
  protected ngOnInit(): void;
135
+ /**
136
+ * Proactively fetches item data if the component has a value but no corresponding item data.
137
+ * This prevents showing "loading..." when the component has a value.
138
+ */
139
+ private fetchItemDataIfNeeded;
140
+ /** @ignore */
59
141
  ngOnDestroy(): void;
60
- /** Finds an item by value key in the full items array. */
61
- getItemByKey(key: any): any;
62
- /** Filters visible items by textField contains. */
63
- search(term: string): void;
64
- /** Resets selection and closes the dropdown. */
65
- refresh(): void;
66
- internalValueChanged(value: any): void;
142
+ /**
143
+ * Retrieves an item by its key.
144
+ * @param {any} key
145
+ */
146
+ getItemByKey(key: any): Promise<any> | any;
67
147
  /** @ignore */
68
148
  protected _handleOnOpenedEvent(e: AXEvent): void;
69
149
  /** @ignore */
70
150
  protected _handleOnClosedEvent(e: AXEvent): void;
71
151
  /** @ignore */
72
- protected _handleBadgeRemove(e: MouseEvent, item: unknown): void;
152
+ protected _handleFocus(): void;
153
+ /** @ignore */
154
+ protected _handleBadgeRemove(e: MouseEvent, item: any): void;
73
155
  /** @ignore */
74
156
  protected _handleValueChanged(e: AXValueChangedEvent): void;
75
157
  /** @ignore */
76
- protected _handleKeydown(e: KeyboardEvent): void;
158
+ protected _handleItemClick(e: AXItemClickEvent): void;
159
+ /** @ignore */
160
+ protected _handleItemSelected(e: AXItemSelectedEvent): void;
161
+ private resetSearchAfterSelection;
162
+ /** @ignore */
163
+ private setDropdownSize;
164
+ /**
165
+ * Shrinks list height to the visible overlay area so virtual scroll ends on fully
166
+ * visible rows instead of inside an overflow:hidden clipped region.
167
+ * @ignore
168
+ */
169
+ private _fitListHeightToAvailableSpace;
170
+ private updateDropdownPosition;
171
+ private updateDropdownSize;
172
+ private _fitDropdownToContent;
173
+ internalValueChanged(value: any): void;
174
+ /** @ignore */
175
+ _handleKeydown(e: KeyboardEvent): void;
176
+ /** @ignore */
177
+ private selectItemByNav;
178
+ /**
179
+ * Filters the data source based on the provided search term.
180
+ * @param {string} term
181
+ */
182
+ search(term: string): void;
183
+ /**
184
+ * Refreshes the component by resetting state, clearing selection cache, refreshing the list, and closing the component.
185
+ */
186
+ refresh(): void;
187
+ hostClickListener(): void;
77
188
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXSelectBoxComponent, never>;
78
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXSelectBoxComponent, "ax-select-box", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; "state": { "alias": "state"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "type": { "alias": "type"; "required": false; }; "look": { "alias": "look"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "disabledField": { "alias": "disabledField"; "required": false; }; "textTemplate": { "alias": "textTemplate"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "minRecordsForSearch": { "alias": "minRecordsForSearch"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "selectedTemplate": { "alias": "selectedTemplate"; "required": false; "isSignal": true; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; "isSignal": true; }; "maxVisibleItems": { "alias": "maxVisibleItems"; "required": false; "isSignal": true; }; "dropdownWidth": { "alias": "dropdownWidth"; "required": false; "isSignal": true; }; "searchBoxAutoFocus": { "alias": "searchBoxAutoFocus"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "stateChange": "stateChange"; "onValueChanged": "onValueChanged"; "onBlur": "onBlur"; "onFocus": "onFocus"; "readonlyChange": "readonlyChange"; "disabledChange": "disabledChange"; "onOpened": "onOpened"; "onClosed": "onClosed"; "onItemSelected": "onItemSelected"; "onItemClick": "onItemClick"; }, ["searchBox"], ["ax-prefix", "ax-clear-button", "ax-suffix", "ax-search-box", "ax-footer", "ax-validation-rule"], true, never>;
189
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXSelectBoxComponent, "ax-select-box", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; "state": { "alias": "state"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "type": { "alias": "type"; "required": false; }; "look": { "alias": "look"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "disabledField": { "alias": "disabledField"; "required": false; }; "textTemplate": { "alias": "textTemplate"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "isItemTruncated": { "alias": "isItemTruncated"; "required": false; "isSignal": true; }; "showItemTooltip": { "alias": "showItemTooltip"; "required": false; "isSignal": true; }; "itemHeight": { "alias": "itemHeight"; "required": false; "isSignal": true; }; "maxVisibleItems": { "alias": "maxVisibleItems"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "required": false; }; "minRecordsForSearch": { "alias": "minRecordsForSearch"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "selectedTemplate": { "alias": "selectedTemplate"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; "loadingTemplate": { "alias": "loadingTemplate"; "required": false; }; "dropdownWidth": { "alias": "dropdownWidth"; "required": false; "isSignal": true; }; "searchBoxAutoFocus": { "alias": "searchBoxAutoFocus"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "stateChange": "stateChange"; "onValueChanged": "onValueChanged"; "onBlur": "onBlur"; "onFocus": "onFocus"; "readonlyChange": "readonlyChange"; "disabledChange": "disabledChange"; "onOpened": "onOpened"; "onClosed": "onClosed"; "onItemSelected": "onItemSelected"; "onItemClick": "onItemClick"; }, ["searchBox"], ["ax-prefix", "ax-clear-button", "ax-suffix", "ax-search-box", "ax-footer", "ax-validation-rule"], true, never>;
79
190
  }
80
191
 
81
192
  declare class AXSelectBoxModule {
82
193
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXSelectBoxModule, never>;
83
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXSelectBoxModule, never, [typeof i1.CommonModule, typeof i2.AXCommonModule, typeof i3.FormsModule, typeof i4.AXCheckBoxModule, typeof i5.AXBadgeModule, typeof i6.AXDecoratorModule, typeof i7.AXTranslationModule, typeof i8.AXPopoverModule, typeof i9.AXLoadingModule, typeof i10.A11yModule, typeof i11.AXTextBoxModule, typeof i12.AXDropdownModule, typeof i13.AXSelectionListModule, typeof AXSelectBoxComponent], [typeof AXSelectBoxComponent]>;
194
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXSelectBoxModule, never, [typeof i1.CommonModule, typeof i2.AXCommonModule, typeof i3.FormsModule, typeof i4.AXCheckBoxModule, typeof i5.AXBadgeModule, typeof i6.AXDecoratorModule, typeof i7.AXTranslationModule, typeof i8.AXPopoverModule, typeof i9.AXLoadingModule, typeof i10.A11yModule, typeof i11.AXTextBoxModule, typeof i12.AXDropdownModule, typeof i13.AXListModule, typeof AXSelectBoxComponent], [typeof AXSelectBoxComponent]>;
84
195
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXSelectBoxModule>;
85
196
  }
86
197
 
@@ -6,6 +6,7 @@ import * as i2 from '@angular/forms';
6
6
  import * as i3 from '@acorex/components/check-box';
7
7
  import * as i4 from '@acorex/components/radio';
8
8
  import * as i5 from '@acorex/components/label';
9
+ import * as i6 from '@acorex/components/form';
9
10
 
10
11
  type AXSelectionListLook = 'solid' | 'divided' | 'card';
11
12
  /**
@@ -84,7 +85,7 @@ declare class AXSelectionListComponent extends MXSelectionValueComponent {
84
85
 
85
86
  declare class AXSelectionListModule {
86
87
  static ɵfac: i0.ɵɵFactoryDeclaration<AXSelectionListModule, never>;
87
- static ɵmod: i0.ɵɵNgModuleDeclaration<AXSelectionListModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i3.AXCheckBoxModule, typeof i4.AXRadioModule, typeof i5.AXLabelModule, typeof AXSelectionListComponent], [typeof AXSelectionListComponent]>;
88
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXSelectionListModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i3.AXCheckBoxModule, typeof i4.AXRadioModule, typeof i5.AXLabelModule, typeof i6.AXFormModule, typeof AXSelectionListComponent], [typeof AXSelectionListComponent]>;
88
89
  static ɵinj: i0.ɵɵInjectorDeclaration<AXSelectionListModule>;
89
90
  }
90
91
 
@@ -1,3 +0,0 @@
1
- # @acorex/components/combo-box
2
-
3
- Secondary entry point of `@acorex/components`. It can be used by importing from `@acorex/components/combo-box`.