@acorex/components 22.1.0-next.0 → 22.1.0-next.2
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/combo-box/README.md +12 -3
- package/fesm2022/acorex-components-action-sheet.mjs +1 -0
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +2 -2
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-combo-box.mjs +372 -30
- package/fesm2022/acorex-components-combo-box.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +2 -2
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +19 -3
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +4 -2
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +2 -2
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +4 -4
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-fab.mjs +2 -2
- package/fesm2022/acorex-components-fab.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +2 -2
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-lookup.mjs +724 -175
- package/fesm2022/acorex-components-lookup.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +2 -2
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +26 -6
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +9 -2
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +1 -1
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +7 -6
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +4 -2
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +6 -6
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +19 -9
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +2 -2
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +9 -2
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +2 -2
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/lookup/README.md +13 -8
- package/package.json +3 -3
- package/select-box/README.md +5 -0
- package/types/acorex-components-action-sheet.d.ts +9 -1
- package/types/acorex-components-combo-box.d.ts +147 -18
- package/types/acorex-components-decorators.d.ts +1 -0
- package/types/acorex-components-dialog.d.ts +9 -0
- package/types/acorex-components-lookup.d.ts +260 -90
- package/types/acorex-components-menu.d.ts +2 -0
- package/types/acorex-components-notification.d.ts +11 -1
- package/types/acorex-components-popover.d.ts +4 -1
- package/types/acorex-components-popup.d.ts +9 -1
- package/types/acorex-components-select-box.d.ts +10 -4
- package/types/acorex-components-toast.d.ts +10 -1
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import { AXListDataSource, NXComponent, convertArrayToDataSource, AXComponent } from '@acorex/cdk/common';
|
|
1
|
+
import { AXListDataSource, AXDataSource, NXComponent, convertArrayToDataSource, AXComponent, AXClearableComponent, AXClosableComponent } from '@acorex/cdk/common';
|
|
2
|
+
import { AXChipsComponent } from '@acorex/components/chips';
|
|
3
|
+
import * as i1$1 from '@acorex/components/decorators';
|
|
4
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
2
5
|
import { AXPopoverComponent } from '@acorex/components/popover';
|
|
3
|
-
import
|
|
4
|
-
import { input, output, signal, computed, viewChild, inject, NgZone, effect, untracked, Directive, ViewEncapsulation, ChangeDetectionStrategy, Component, model, linkedSignal, NgModule } from '@angular/core';
|
|
5
|
-
import { NgTemplateOutlet, AsyncPipe } from '@angular/common';
|
|
6
|
+
import { AXPlatform } from '@acorex/core/platform';
|
|
6
7
|
import { AXTranslatorPipe } from '@acorex/core/translation';
|
|
8
|
+
import { NgTemplateOutlet, AsyncPipe } from '@angular/common';
|
|
9
|
+
import * as i0 from '@angular/core';
|
|
10
|
+
import { input, output, signal, computed, viewChild, viewChildren, inject, NgZone, effect, untracked, Directive, ViewEncapsulation, ChangeDetectionStrategy, Component, ElementRef, DestroyRef, model, linkedSignal, NgModule } from '@angular/core';
|
|
11
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
12
|
+
import * as i3 from '@acorex/cdk/list-navigation';
|
|
13
|
+
import { AXListNavigationDirective, AXListNavigationItemDirective, AXListNavigationModule } from '@acorex/cdk/list-navigation';
|
|
7
14
|
import * as i1 from '@angular/cdk/scrolling';
|
|
8
15
|
import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
|
|
9
16
|
import { AXTreeViewComponent } from '@acorex/components/tree-view';
|
|
17
|
+
import { AXDataTableComponent, AXDataTableTextColumnComponent } from '@acorex/components/data-table';
|
|
18
|
+
import { fromEvent, auditTime } from 'rxjs';
|
|
10
19
|
|
|
11
20
|
/**
|
|
12
21
|
* Shared `AXDataSource` + CDK virtual scroll plumbing for the list-based lookup views
|
|
13
|
-
* (`ax-lookup-drop-down-list`, `ax-lookup-multi-select
|
|
22
|
+
* (`ax-lookup-drop-down-list`, `ax-lookup-multi-select`).
|
|
14
23
|
*/
|
|
15
24
|
class AXLookupListViewBase {
|
|
16
25
|
#ngZone;
|
|
@@ -65,10 +74,20 @@ class AXLookupListViewBase {
|
|
|
65
74
|
*/
|
|
66
75
|
this.loadingTemplate = input(undefined, /* @ts-ignore */
|
|
67
76
|
...(ngDevMode ? [{ debugName: "loadingTemplate" }] : /* istanbul ignore next */ []));
|
|
77
|
+
/**
|
|
78
|
+
* When `true`, list rows use alternating background colors for easier scanning.
|
|
79
|
+
*/
|
|
80
|
+
this.alternate = input(false, /* @ts-ignore */
|
|
81
|
+
...(ngDevMode ? [{ debugName: "alternate" }] : /* istanbul ignore next */ []));
|
|
68
82
|
/**
|
|
69
83
|
* Emitted when the user picks (or toggles) an item.
|
|
70
84
|
*/
|
|
71
85
|
this.itemClick = output();
|
|
86
|
+
/**
|
|
87
|
+
* Emitted when keyboard navigation should leave the list (e.g. ArrowUp on the first
|
|
88
|
+
* item, or a printable key that should return focus to the trigger search input).
|
|
89
|
+
*/
|
|
90
|
+
this.navigateOut = output();
|
|
72
91
|
/** CDK virtual scroll adapter over the datasource. */
|
|
73
92
|
this.listDataSource = signal(null, /* @ts-ignore */
|
|
74
93
|
...(ngDevMode ? [{ debugName: "listDataSource" }] : /* istanbul ignore next */ []));
|
|
@@ -86,6 +105,10 @@ class AXLookupListViewBase {
|
|
|
86
105
|
...(ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []));
|
|
87
106
|
this.viewportRef = viewChild(CdkVirtualScrollViewport, /* @ts-ignore */
|
|
88
107
|
...(ngDevMode ? [{ debugName: "viewportRef" }] : /* istanbul ignore next */ []));
|
|
108
|
+
this.listNavigation = viewChild(AXListNavigationDirective, /* @ts-ignore */
|
|
109
|
+
...(ngDevMode ? [{ debugName: "listNavigation" }] : /* istanbul ignore next */ []));
|
|
110
|
+
this.navItems = viewChildren(AXListNavigationItemDirective, /* @ts-ignore */
|
|
111
|
+
...(ngDevMode ? [{ debugName: "navItems" }] : /* istanbul ignore next */ []));
|
|
89
112
|
this.#ngZone = inject(NgZone);
|
|
90
113
|
this.trackByIndex = (index) => index;
|
|
91
114
|
// CDK measures the viewport size only once, when it initializes. Inside the popover the
|
|
@@ -120,6 +143,10 @@ class AXLookupListViewBase {
|
|
|
120
143
|
});
|
|
121
144
|
});
|
|
122
145
|
}
|
|
146
|
+
/** Moves keyboard focus to the first rendered list option. */
|
|
147
|
+
focusFirst() {
|
|
148
|
+
this.listNavigation()?.focusOnIndex(0);
|
|
149
|
+
}
|
|
123
150
|
getValue(item) {
|
|
124
151
|
return item?.[this.valueField()];
|
|
125
152
|
}
|
|
@@ -139,12 +166,62 @@ class AXLookupListViewBase {
|
|
|
139
166
|
}
|
|
140
167
|
this.itemClick.emit({ item, value: this.getValue(item) });
|
|
141
168
|
}
|
|
169
|
+
handleItemKeypress(e, item) {
|
|
170
|
+
if (e.nativeEvent.key === 'Enter' || e.nativeEvent.code === 'Space') {
|
|
171
|
+
e.nativeEvent.stopPropagation();
|
|
172
|
+
e.nativeEvent.preventDefault();
|
|
173
|
+
this.handleItemClick(item);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
handleListKeypress(e) {
|
|
177
|
+
const key = e.nativeEvent.key;
|
|
178
|
+
const nav = this.listNavigation();
|
|
179
|
+
const viewport = this.viewportRef();
|
|
180
|
+
if (key === 'ArrowUp' && nav && nav.activeIndex() === 0) {
|
|
181
|
+
const offset = viewport?.measureScrollOffset() ?? 0;
|
|
182
|
+
if (offset > 0) {
|
|
183
|
+
e.nativeEvent.preventDefault();
|
|
184
|
+
viewport.scrollToOffset(Math.max(0, offset - this.itemHeight()));
|
|
185
|
+
queueMicrotask(() => nav.focusOnIndex(0));
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
e.nativeEvent.preventDefault();
|
|
189
|
+
this.navigateOut.emit('up');
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (key === 'ArrowDown' && nav && viewport) {
|
|
193
|
+
const items = this.navItems();
|
|
194
|
+
if (items.length > 0 && nav.activeIndex() >= items.length - 1) {
|
|
195
|
+
const maxOffset = Math.max(0, this.totalCount() * this.itemHeight() - viewport.getViewportSize());
|
|
196
|
+
const nextOffset = Math.min(maxOffset, viewport.measureScrollOffset() + this.itemHeight());
|
|
197
|
+
if (nextOffset > viewport.measureScrollOffset()) {
|
|
198
|
+
e.nativeEvent.preventDefault();
|
|
199
|
+
viewport.scrollToOffset(nextOffset);
|
|
200
|
+
queueMicrotask(() => nav.focusOnIndex(this.navItems().length - 1));
|
|
201
|
+
}
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (key === 'ArrowUp' ||
|
|
206
|
+
key === 'ArrowDown' ||
|
|
207
|
+
key === 'Tab' ||
|
|
208
|
+
key === 'Shift' ||
|
|
209
|
+
key === 'Enter' ||
|
|
210
|
+
key === 'Escape' ||
|
|
211
|
+
key === ' ') {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
this.navigateOut.emit('typeahead');
|
|
215
|
+
}
|
|
216
|
+
activateNavItem(nav, item) {
|
|
217
|
+
nav?.navigateTo(item);
|
|
218
|
+
}
|
|
142
219
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupListViewBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
143
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.8", type: AXLookupListViewBase, isStandalone: true, inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, disabledField: { classPropertyName: "disabledField", publicName: "disabledField", isSignal: true, isRequired: false, transformFunction: null }, selectedValues: { classPropertyName: "selectedValues", publicName: "selectedValues", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, maxVisibleItems: { classPropertyName: "maxVisibleItems", publicName: "maxVisibleItems", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, loadingTemplate: { classPropertyName: "loadingTemplate", publicName: "loadingTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, viewQueries: [{ propertyName: "viewportRef", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
220
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.8", type: AXLookupListViewBase, isStandalone: true, inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, disabledField: { classPropertyName: "disabledField", publicName: "disabledField", isSignal: true, isRequired: false, transformFunction: null }, selectedValues: { classPropertyName: "selectedValues", publicName: "selectedValues", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, maxVisibleItems: { classPropertyName: "maxVisibleItems", publicName: "maxVisibleItems", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, loadingTemplate: { classPropertyName: "loadingTemplate", publicName: "loadingTemplate", isSignal: true, isRequired: false, transformFunction: null }, alternate: { classPropertyName: "alternate", publicName: "alternate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", navigateOut: "navigateOut" }, viewQueries: [{ propertyName: "viewportRef", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }, { propertyName: "listNavigation", first: true, predicate: AXListNavigationDirective, descendants: true, isSignal: true }, { propertyName: "navItems", predicate: AXListNavigationItemDirective, descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
144
221
|
}
|
|
145
222
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupListViewBase, decorators: [{
|
|
146
223
|
type: Directive
|
|
147
|
-
}], ctorParameters: () => [], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], disabledField: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledField", required: false }] }], selectedValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedValues", required: false }] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], maxVisibleItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisibleItems", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], loadingTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingTemplate", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], viewportRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }] } });
|
|
224
|
+
}], ctorParameters: () => [], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], disabledField: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledField", required: false }] }], selectedValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedValues", required: false }] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], maxVisibleItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisibleItems", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], loadingTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingTemplate", required: false }] }], alternate: [{ type: i0.Input, args: [{ isSignal: true, alias: "alternate", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], navigateOut: [{ type: i0.Output, args: ["navigateOut"] }], viewportRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }], listNavigation: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXListNavigationDirective), { isSignal: true }] }], navItems: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => AXListNavigationItemDirective), { isSignal: true }] }] } });
|
|
148
225
|
|
|
149
226
|
/**
|
|
150
227
|
* Internal mini component for the `drop-down-list` lookup mode:
|
|
@@ -154,38 +231,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
154
231
|
*/
|
|
155
232
|
class AXLookupDropDownListComponent extends AXLookupListViewBase {
|
|
156
233
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupDropDownListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXLookupDropDownListComponent, isStandalone: true, selector: "ax-lookup-drop-down-list", usesInheritance: true, ngImport: i0, template: `
|
|
234
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXLookupDropDownListComponent, isStandalone: true, selector: "ax-lookup-drop-down-list", providers: [{ provide: AXLookupListViewBase, useExisting: AXLookupDropDownListComponent }], usesInheritance: true, ngImport: i0, template: `
|
|
158
235
|
@if (isEmpty()) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
236
|
+
@if (emptyTemplate()) {
|
|
237
|
+
<ng-container [ngTemplateOutlet]="emptyTemplate()!" />
|
|
238
|
+
} @else {
|
|
239
|
+
<div class="ax-lookup-empty">
|
|
163
240
|
{{ '@acorex:common.general.no-result-found' | translate | async }}
|
|
164
|
-
|
|
165
|
-
|
|
241
|
+
</div>
|
|
242
|
+
}
|
|
166
243
|
} @else {
|
|
167
244
|
<cdk-virtual-scroll-viewport
|
|
168
245
|
class="ax-lookup-viewport"
|
|
169
246
|
role="listbox"
|
|
247
|
+
axListNavigation
|
|
248
|
+
#nav="axListNavigation"
|
|
170
249
|
[itemSize]="itemHeight()"
|
|
171
250
|
[style.height.px]="viewportHeight()"
|
|
251
|
+
(onKeypress)="handleListKeypress($event)"
|
|
172
252
|
>
|
|
173
253
|
<div
|
|
174
|
-
*cdkVirtualFor="let item of listDataSource(); trackBy: trackByIndex"
|
|
254
|
+
*cdkVirtualFor="let item of listDataSource(); let i = index; trackBy: trackByIndex"
|
|
175
255
|
role="option"
|
|
176
|
-
class="ax-lookup-option"
|
|
256
|
+
class="ax-lookup-option-host"
|
|
257
|
+
axListNavigationItem
|
|
258
|
+
#navItem="axListNavigationItem"
|
|
177
259
|
[style.height.px]="itemHeight()"
|
|
260
|
+
[class.ax-lookup-option]="!itemTemplate()"
|
|
261
|
+
[class.ax-state-alternate]="alternate() && i % 2 === 1"
|
|
178
262
|
[class.ax-state-selected]="item != null && isSelected(item)"
|
|
179
263
|
[class.ax-state-disabled]="item != null && isDisabled(item)"
|
|
264
|
+
[class.ax-state-active]="navItem.isActive()"
|
|
180
265
|
[attr.aria-selected]="item != null ? isSelected(item) : null"
|
|
266
|
+
(mouseenter)="activateNavItem(nav, navItem)"
|
|
181
267
|
(click)="handleItemClick(item)"
|
|
268
|
+
(onKeypress)="handleItemKeypress($event, item)"
|
|
182
269
|
>
|
|
183
270
|
@if (item != null) {
|
|
184
271
|
@if (itemTemplate()) {
|
|
185
272
|
<ng-container [ngTemplateOutlet]="itemTemplate()!" [ngTemplateOutletContext]="{ $implicit: item }" />
|
|
186
273
|
} @else {
|
|
187
274
|
<span class="ax-lookup-option-text">{{ getText(item) }}</span>
|
|
188
|
-
|
|
275
|
+
@if (isSelected(item)) {
|
|
276
|
+
<ax-icon class="ax-lookup-option-check ax-icon ax-icon-check" aria-hidden="true"></ax-icon>
|
|
277
|
+
}
|
|
189
278
|
}
|
|
190
279
|
} @else {
|
|
191
280
|
<ng-container [ngTemplateOutlet]="loadingRow" />
|
|
@@ -201,7 +290,7 @@ class AXLookupDropDownListComponent extends AXLookupListViewBase {
|
|
|
201
290
|
<span class="ax-lookup-option-loading">{{ '@acorex:common.status.loading' | translate | async }}</span>
|
|
202
291
|
}
|
|
203
292
|
</ng-template>
|
|
204
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
293
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXListNavigationModule }, { kind: "directive", type: i3.AXListNavigationDirective, selector: "[axListNavigation]", inputs: ["orientation"], outputs: ["onNavigationChanged", "onKeypress"], exportAs: ["axListNavigation"] }, { kind: "directive", type: i3.AXListNavigationItemDirective, selector: "[axListNavigationItem]", outputs: ["onKeypress"], exportAs: ["axListNavigationItem"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
205
294
|
}
|
|
206
295
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupDropDownListComponent, decorators: [{
|
|
207
296
|
type: Component,
|
|
@@ -209,39 +298,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
209
298
|
selector: 'ax-lookup-drop-down-list',
|
|
210
299
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
211
300
|
encapsulation: ViewEncapsulation.None,
|
|
212
|
-
imports: [
|
|
301
|
+
imports: [
|
|
302
|
+
ScrollingModule,
|
|
303
|
+
NgTemplateOutlet,
|
|
304
|
+
AXTranslatorPipe,
|
|
305
|
+
AsyncPipe,
|
|
306
|
+
AXDecoratorModule,
|
|
307
|
+
AXListNavigationModule,
|
|
308
|
+
],
|
|
309
|
+
providers: [{ provide: AXLookupListViewBase, useExisting: AXLookupDropDownListComponent }],
|
|
213
310
|
template: `
|
|
214
311
|
@if (isEmpty()) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
312
|
+
@if (emptyTemplate()) {
|
|
313
|
+
<ng-container [ngTemplateOutlet]="emptyTemplate()!" />
|
|
314
|
+
} @else {
|
|
315
|
+
<div class="ax-lookup-empty">
|
|
219
316
|
{{ '@acorex:common.general.no-result-found' | translate | async }}
|
|
220
|
-
|
|
221
|
-
|
|
317
|
+
</div>
|
|
318
|
+
}
|
|
222
319
|
} @else {
|
|
223
320
|
<cdk-virtual-scroll-viewport
|
|
224
321
|
class="ax-lookup-viewport"
|
|
225
322
|
role="listbox"
|
|
323
|
+
axListNavigation
|
|
324
|
+
#nav="axListNavigation"
|
|
226
325
|
[itemSize]="itemHeight()"
|
|
227
326
|
[style.height.px]="viewportHeight()"
|
|
327
|
+
(onKeypress)="handleListKeypress($event)"
|
|
228
328
|
>
|
|
229
329
|
<div
|
|
230
|
-
*cdkVirtualFor="let item of listDataSource(); trackBy: trackByIndex"
|
|
330
|
+
*cdkVirtualFor="let item of listDataSource(); let i = index; trackBy: trackByIndex"
|
|
231
331
|
role="option"
|
|
232
|
-
class="ax-lookup-option"
|
|
332
|
+
class="ax-lookup-option-host"
|
|
333
|
+
axListNavigationItem
|
|
334
|
+
#navItem="axListNavigationItem"
|
|
233
335
|
[style.height.px]="itemHeight()"
|
|
336
|
+
[class.ax-lookup-option]="!itemTemplate()"
|
|
337
|
+
[class.ax-state-alternate]="alternate() && i % 2 === 1"
|
|
234
338
|
[class.ax-state-selected]="item != null && isSelected(item)"
|
|
235
339
|
[class.ax-state-disabled]="item != null && isDisabled(item)"
|
|
340
|
+
[class.ax-state-active]="navItem.isActive()"
|
|
236
341
|
[attr.aria-selected]="item != null ? isSelected(item) : null"
|
|
342
|
+
(mouseenter)="activateNavItem(nav, navItem)"
|
|
237
343
|
(click)="handleItemClick(item)"
|
|
344
|
+
(onKeypress)="handleItemKeypress($event, item)"
|
|
238
345
|
>
|
|
239
346
|
@if (item != null) {
|
|
240
347
|
@if (itemTemplate()) {
|
|
241
348
|
<ng-container [ngTemplateOutlet]="itemTemplate()!" [ngTemplateOutletContext]="{ $implicit: item }" />
|
|
242
349
|
} @else {
|
|
243
350
|
<span class="ax-lookup-option-text">{{ getText(item) }}</span>
|
|
244
|
-
|
|
351
|
+
@if (isSelected(item)) {
|
|
352
|
+
<ax-icon class="ax-lookup-option-check ax-icon ax-icon-check" aria-hidden="true"></ax-icon>
|
|
353
|
+
}
|
|
245
354
|
}
|
|
246
355
|
} @else {
|
|
247
356
|
<ng-container [ngTemplateOutlet]="loadingRow" />
|
|
@@ -362,83 +471,275 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
362
471
|
|
|
363
472
|
/**
|
|
364
473
|
* Internal mini component for the `multi-column` lookup mode:
|
|
365
|
-
*
|
|
474
|
+
* renders selectable rows in an `ax-data-table` grid and loads further
|
|
475
|
+
* pages as the user scrolls (no pager UI).
|
|
366
476
|
*
|
|
367
477
|
* @category Components
|
|
368
478
|
*/
|
|
369
|
-
class AXLookupMultiColumnComponent
|
|
479
|
+
class AXLookupMultiColumnComponent {
|
|
480
|
+
/** Accumulated rows fed to the table (grows as pages are scrolled in). */
|
|
481
|
+
#loadedItems;
|
|
482
|
+
/** Total matching rows from the source (used to size the popup). */
|
|
483
|
+
#totalCount;
|
|
484
|
+
#host;
|
|
370
485
|
constructor() {
|
|
371
|
-
super(...arguments);
|
|
372
486
|
/**
|
|
373
|
-
*
|
|
487
|
+
* The datasource providing the grid rows (paged, remote-capable).
|
|
488
|
+
* Pages are fetched on demand as the user scrolls the table body.
|
|
489
|
+
*/
|
|
490
|
+
this.dataSource = input.required(/* @ts-ignore */
|
|
491
|
+
...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
492
|
+
/**
|
|
493
|
+
* The item property used as the selection value.
|
|
494
|
+
*/
|
|
495
|
+
this.valueField = input('id', /* @ts-ignore */
|
|
496
|
+
...(ngDevMode ? [{ debugName: "valueField" }] : /* istanbul ignore next */ []));
|
|
497
|
+
/**
|
|
498
|
+
* The item property used as the display text.
|
|
499
|
+
*/
|
|
500
|
+
this.textField = input('text', /* @ts-ignore */
|
|
501
|
+
...(ngDevMode ? [{ debugName: "textField" }] : /* istanbul ignore next */ []));
|
|
502
|
+
/**
|
|
503
|
+
* The item property marking an item as disabled.
|
|
504
|
+
*/
|
|
505
|
+
this.disabledField = input('disabled', /* @ts-ignore */
|
|
506
|
+
...(ngDevMode ? [{ debugName: "disabledField" }] : /* istanbul ignore next */ []));
|
|
507
|
+
/**
|
|
508
|
+
* Currently selected values (always an array, even for single selection).
|
|
509
|
+
*/
|
|
510
|
+
this.selectedValues = input([], /* @ts-ignore */
|
|
511
|
+
...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
|
|
512
|
+
/**
|
|
513
|
+
* The fixed row height in pixels passed to the data table.
|
|
514
|
+
*/
|
|
515
|
+
this.itemHeight = input(40, /* @ts-ignore */
|
|
516
|
+
...(ngDevMode ? [{ debugName: "itemHeight" }] : /* istanbul ignore next */ []));
|
|
517
|
+
/**
|
|
518
|
+
* The maximum number of body rows visible before the table scrolls.
|
|
519
|
+
*/
|
|
520
|
+
this.maxVisibleItems = input(8, /* @ts-ignore */
|
|
521
|
+
...(ngDevMode ? [{ debugName: "maxVisibleItems" }] : /* istanbul ignore next */ []));
|
|
522
|
+
/**
|
|
523
|
+
* Column definitions rendered as `ax-text-column` instances.
|
|
374
524
|
*/
|
|
375
525
|
this.columns = input([], /* @ts-ignore */
|
|
376
526
|
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
377
|
-
/**
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
527
|
+
/**
|
|
528
|
+
* Optional custom row content. Context: `$implicit` is the row item.
|
|
529
|
+
* When set, replaces the default multi-column cell layout.
|
|
530
|
+
*/
|
|
531
|
+
this.itemTemplate = input(undefined, /* @ts-ignore */
|
|
532
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
533
|
+
/**
|
|
534
|
+
* Custom template rendered when the datasource has no items.
|
|
535
|
+
*/
|
|
536
|
+
this.emptyTemplate = input(undefined, /* @ts-ignore */
|
|
537
|
+
...(ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []));
|
|
538
|
+
/**
|
|
539
|
+
* Custom template rendered while the table is loading.
|
|
540
|
+
*/
|
|
541
|
+
this.loadingTemplate = input(undefined, /* @ts-ignore */
|
|
542
|
+
...(ngDevMode ? [{ debugName: "loadingTemplate" }] : /* istanbul ignore next */ []));
|
|
543
|
+
/**
|
|
544
|
+
* When `true`, table rows use alternating background colors for easier scanning.
|
|
545
|
+
*/
|
|
546
|
+
this.alternate = input(false, /* @ts-ignore */
|
|
547
|
+
...(ngDevMode ? [{ debugName: "alternate" }] : /* istanbul ignore next */ []));
|
|
548
|
+
/**
|
|
549
|
+
* Emitted when the user picks a row.
|
|
550
|
+
*/
|
|
551
|
+
this.itemClick = output();
|
|
552
|
+
this.tableRef = viewChild(AXDataTableComponent, /* @ts-ignore */
|
|
553
|
+
...(ngDevMode ? [{ debugName: "tableRef" }] : /* istanbul ignore next */ []));
|
|
554
|
+
/** Accumulated rows fed to the table (grows as pages are scrolled in). */
|
|
555
|
+
this.#loadedItems = [];
|
|
556
|
+
/** Total matching rows from the source (used to size the popup). */
|
|
557
|
+
this.#totalCount = signal(0, /* @ts-ignore */
|
|
558
|
+
...(ngDevMode ? [{ debugName: "#totalCount" }] : /* istanbul ignore next */ []));
|
|
559
|
+
/**
|
|
560
|
+
* Local table source: one page of whatever has been scrolled in so far.
|
|
561
|
+
* Kept as a stable instance so the table host is not recreated on each page load.
|
|
562
|
+
* `pageSize` grows with `#loadedItems` — never seed with a huge empty array (data-table
|
|
563
|
+
* initializes `displayedRows` as `new Array(pageSize)`, which caused NG0955-level jank).
|
|
564
|
+
*/
|
|
565
|
+
this.tableDataSource = new AXDataSource({
|
|
566
|
+
pageSize: 1,
|
|
567
|
+
key: 'id',
|
|
568
|
+
load: async () => ({
|
|
569
|
+
items: this.#loadedItems,
|
|
570
|
+
total: this.#loadedItems.length,
|
|
571
|
+
}),
|
|
572
|
+
});
|
|
573
|
+
/**
|
|
574
|
+
* Header (~40px) + body rows. Grows with results up to `maxVisibleItems`,
|
|
575
|
+
* then the table body scrolls for the rest.
|
|
576
|
+
*/
|
|
577
|
+
this.tableHeight = computed(() => {
|
|
578
|
+
const header = 40;
|
|
579
|
+
const total = this.#totalCount();
|
|
580
|
+
const rows = total > 0 ? total : Math.min(3, this.maxVisibleItems());
|
|
581
|
+
return header + Math.min(rows, this.maxVisibleItems()) * this.itemHeight();
|
|
582
|
+
}, /* @ts-ignore */
|
|
583
|
+
...(ngDevMode ? [{ debugName: "tableHeight" }] : /* istanbul ignore next */ []));
|
|
584
|
+
this.loadingConfig = computed(() => ({
|
|
585
|
+
enabled: true,
|
|
586
|
+
animation: true,
|
|
587
|
+
loadingTemplate: this.loadingTemplate(),
|
|
588
|
+
}), /* @ts-ignore */
|
|
589
|
+
...(ngDevMode ? [{ debugName: "loadingConfig" }] : /* istanbul ignore next */ []));
|
|
590
|
+
this.#host = inject((ElementRef));
|
|
591
|
+
this.resolveRowCssClass = (row) => {
|
|
592
|
+
const item = row;
|
|
593
|
+
if (!item) {
|
|
594
|
+
return '';
|
|
595
|
+
}
|
|
596
|
+
const classes = [];
|
|
597
|
+
if (this.isSelected(item)) {
|
|
598
|
+
classes.push('ax-state-selected');
|
|
599
|
+
}
|
|
600
|
+
if (this.isDisabled(item)) {
|
|
601
|
+
classes.push('ax-state-disabled');
|
|
602
|
+
}
|
|
603
|
+
return classes.join(' ');
|
|
604
|
+
};
|
|
605
|
+
effect((onCleanup) => {
|
|
606
|
+
const source = this.dataSource();
|
|
607
|
+
this.tableDataSource.config.key = source.config.key || this.valueField();
|
|
608
|
+
untracked(() => {
|
|
609
|
+
this.#loadedItems = [];
|
|
610
|
+
this.#totalCount.set(0);
|
|
611
|
+
this.#syncTablePageSize();
|
|
612
|
+
this.tableDataSource.refresh({ reset: true });
|
|
613
|
+
});
|
|
614
|
+
const changedSub = source.onChanged.subscribe((event) => {
|
|
615
|
+
this.#loadedItems = event.cachedItems.filter((item) => item != null);
|
|
616
|
+
this.#totalCount.set(event.totalCount);
|
|
617
|
+
this.#syncTablePageSize();
|
|
618
|
+
this.tableDataSource.refresh({ reset: true });
|
|
619
|
+
});
|
|
620
|
+
// Kick the first page; later pages come from scroll.
|
|
621
|
+
queueMicrotask(() => source.setPage(0));
|
|
622
|
+
onCleanup(() => changedSub.unsubscribe());
|
|
623
|
+
});
|
|
624
|
+
effect((onCleanup) => {
|
|
625
|
+
// Rebind when the table instance appears / source changes.
|
|
626
|
+
this.tableRef();
|
|
627
|
+
this.dataSource();
|
|
628
|
+
let scrollSub;
|
|
629
|
+
const timer = setTimeout(() => {
|
|
630
|
+
const wrapper = this.tableRef()?.getHostElement()?.querySelector('.ax-data-table-wrapper') ??
|
|
631
|
+
this.#host.nativeElement.querySelector('.ax-data-table-wrapper');
|
|
632
|
+
if (!wrapper) {
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
scrollSub = fromEvent(wrapper, 'scroll')
|
|
636
|
+
.pipe(auditTime(80))
|
|
637
|
+
.subscribe(() => this.#tryLoadMore(wrapper));
|
|
638
|
+
}, 0);
|
|
639
|
+
onCleanup(() => {
|
|
640
|
+
clearTimeout(timer);
|
|
641
|
+
scrollSub?.unsubscribe();
|
|
642
|
+
});
|
|
643
|
+
});
|
|
382
644
|
}
|
|
383
|
-
|
|
384
|
-
|
|
645
|
+
/** Stable unique key for `@for` — avoids NG0955 when `field` is missing or duplicated. */
|
|
646
|
+
trackColumnKey(index, column) {
|
|
647
|
+
return `${column?.field ?? ''}::${index}`;
|
|
385
648
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
@if (emptyTemplate()) {
|
|
391
|
-
<ng-container [ngTemplateOutlet]="emptyTemplate()!" />
|
|
392
|
-
} @else {
|
|
393
|
-
{{ '@acorex:common.general.no-result-found' | translate | async }}
|
|
649
|
+
resolveColumnWidth(column) {
|
|
650
|
+
const width = column.width?.trim();
|
|
651
|
+
if (!width || width.includes('fr')) {
|
|
652
|
+
return 'auto';
|
|
394
653
|
}
|
|
395
|
-
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
654
|
+
return width;
|
|
655
|
+
}
|
|
656
|
+
#syncTablePageSize() {
|
|
657
|
+
this.tableDataSource.config.pageSize = Math.max(this.#loadedItems.length, 1);
|
|
658
|
+
}
|
|
659
|
+
handleRowClick(event) {
|
|
660
|
+
this.handleItemClick(event.data);
|
|
661
|
+
}
|
|
662
|
+
handleItemClick(item) {
|
|
663
|
+
if (!item || this.isDisabled(item)) {
|
|
664
|
+
return;
|
|
400
665
|
}
|
|
401
|
-
|
|
402
|
-
<cdk-virtual-scroll-viewport
|
|
403
|
-
class="ax-lookup-viewport"
|
|
404
|
-
role="listbox"
|
|
405
|
-
[itemSize]="itemHeight()"
|
|
406
|
-
[style.height.px]="viewportHeight()"
|
|
407
|
-
>
|
|
408
|
-
<div
|
|
409
|
-
*cdkVirtualFor="let item of listDataSource(); trackBy: trackByIndex"
|
|
410
|
-
role="option"
|
|
411
|
-
class="ax-lookup-option ax-lookup-column-row"
|
|
412
|
-
[style.height.px]="itemHeight()"
|
|
413
|
-
[style.grid-template-columns]="gridTemplate()"
|
|
414
|
-
[class.ax-state-selected]="item != null && isSelected(item)"
|
|
415
|
-
[class.ax-state-disabled]="item != null && isDisabled(item)"
|
|
416
|
-
[attr.aria-selected]="item != null ? isSelected(item) : null"
|
|
417
|
-
(click)="handleItemClick(item)"
|
|
418
|
-
>
|
|
419
|
-
@if (item != null) {
|
|
420
|
-
@if (itemTemplate()) {
|
|
421
|
-
<ng-container [ngTemplateOutlet]="itemTemplate()!" [ngTemplateOutletContext]="{ $implicit: item }" />
|
|
422
|
-
} @else {
|
|
423
|
-
@for (column of columns(); track column.field) {
|
|
424
|
-
<span class="ax-lookup-column-cell">{{ getCellText(item, column) }}</span>
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
} @else {
|
|
428
|
-
<ng-container [ngTemplateOutlet]="loadingRow" />
|
|
429
|
-
}
|
|
430
|
-
</div>
|
|
431
|
-
</cdk-virtual-scroll-viewport>
|
|
666
|
+
this.itemClick.emit({ item, value: this.getValue(item) });
|
|
432
667
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
668
|
+
isSelected(item) {
|
|
669
|
+
const value = this.getValue(item);
|
|
670
|
+
return this.selectedValues().some((v) => v == value);
|
|
671
|
+
}
|
|
672
|
+
isDisabled(item) {
|
|
673
|
+
return Boolean(item?.[this.disabledField()]);
|
|
674
|
+
}
|
|
675
|
+
#tryLoadMore(wrapper) {
|
|
676
|
+
const nearBottom = wrapper.scrollTop + wrapper.clientHeight >= wrapper.scrollHeight - 48;
|
|
677
|
+
if (!nearBottom) {
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
const source = this.dataSource();
|
|
681
|
+
if (source.isLoading || source.totalCount === 0) {
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
const loadedCount = source.cachedItems.filter((item) => item != null).length;
|
|
685
|
+
if (loadedCount >= source.totalCount) {
|
|
686
|
+
return;
|
|
687
|
+
}
|
|
688
|
+
const nextPage = Math.floor(loadedCount / source.pageSize);
|
|
689
|
+
source.setPage(nextPage);
|
|
690
|
+
}
|
|
691
|
+
getValue(item) {
|
|
692
|
+
return item?.[this.valueField()];
|
|
693
|
+
}
|
|
694
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupMultiColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
695
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXLookupMultiColumnComponent, isStandalone: true, selector: "ax-lookup-multi-column", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, disabledField: { classPropertyName: "disabledField", publicName: "disabledField", isSignal: true, isRequired: false, transformFunction: null }, selectedValues: { classPropertyName: "selectedValues", publicName: "selectedValues", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, maxVisibleItems: { classPropertyName: "maxVisibleItems", publicName: "maxVisibleItems", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, loadingTemplate: { classPropertyName: "loadingTemplate", publicName: "loadingTemplate", isSignal: true, isRequired: false, transformFunction: null }, alternate: { classPropertyName: "alternate", publicName: "alternate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, host: { properties: { "style.height.px": "tableHeight()" }, classAttribute: "ax-lookup-multi-column" }, viewQueries: [{ propertyName: "tableRef", first: true, predicate: AXDataTableComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
696
|
+
<ax-data-table
|
|
697
|
+
class="ax-lookup-multi-column-table"
|
|
698
|
+
look="minimal"
|
|
699
|
+
[dataSource]="tableDataSource"
|
|
700
|
+
[itemHeight]="itemHeight()"
|
|
701
|
+
[alternative]="alternate()"
|
|
702
|
+
[emptyTemplate]="emptyTemplate()"
|
|
703
|
+
[loading]="loadingConfig()"
|
|
704
|
+
[paging]="false"
|
|
705
|
+
[showHeader]="true"
|
|
706
|
+
[fixedHeader]="true"
|
|
707
|
+
[showFooter]="false"
|
|
708
|
+
[allowReordering]="false"
|
|
709
|
+
[rowTemplate]="itemTemplate() ? customRowTemplate : undefined"
|
|
710
|
+
[rowCssClass]="resolveRowCssClass"
|
|
711
|
+
(onRowClick)="handleRowClick($event)"
|
|
712
|
+
>
|
|
713
|
+
@for (column of columns(); track trackColumnKey($index, column)) {
|
|
714
|
+
<ax-text-column
|
|
715
|
+
[dataField]="column.field"
|
|
716
|
+
[caption]="column.title"
|
|
717
|
+
[width]="resolveColumnWidth(column)"
|
|
718
|
+
[allowSorting]="false"
|
|
719
|
+
[allowResizing]="false"
|
|
720
|
+
/>
|
|
439
721
|
}
|
|
722
|
+
</ax-data-table>
|
|
723
|
+
|
|
724
|
+
<ng-template #customRowTemplate let-ctx>
|
|
725
|
+
<tr
|
|
726
|
+
[class.ax-state-selected]="ctx.data != null && isSelected(ctx.data)"
|
|
727
|
+
[class.ax-state-disabled]="ctx.data != null && isDisabled(ctx.data)"
|
|
728
|
+
[style.height.px]="itemHeight()"
|
|
729
|
+
[style.max-height.px]="itemHeight()"
|
|
730
|
+
(click)="handleItemClick(ctx.data)"
|
|
731
|
+
>
|
|
732
|
+
<td [attr.colspan]="columns().length || 1">
|
|
733
|
+
@if (ctx.data != null && itemTemplate()) {
|
|
734
|
+
<ng-container
|
|
735
|
+
[ngTemplateOutlet]="itemTemplate()!"
|
|
736
|
+
[ngTemplateOutletContext]="{ $implicit: ctx.data }"
|
|
737
|
+
/>
|
|
738
|
+
}
|
|
739
|
+
</td>
|
|
740
|
+
</tr>
|
|
440
741
|
</ng-template>
|
|
441
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
742
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "hasChildrenField", "rowDetailsTemplate", "rowCssClass", "cellCssClass", "highlightText", "look", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: ["width", "caption", "allowSorting", "allowResizing", "fixed", "hasTitle", "customExpandIcon", "customCollapseIcon", "dataField", "expandHandler", "wrapText", "cellTemplate", "footerTemplate", "headerTemplate", "format", "formatOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
442
743
|
}
|
|
443
744
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupMultiColumnComponent, decorators: [{
|
|
444
745
|
type: Component,
|
|
@@ -446,64 +747,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
446
747
|
selector: 'ax-lookup-multi-column',
|
|
447
748
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
448
749
|
encapsulation: ViewEncapsulation.None,
|
|
449
|
-
imports: [
|
|
750
|
+
imports: [NgTemplateOutlet, AXDataTableComponent, AXDataTableTextColumnComponent],
|
|
751
|
+
host: {
|
|
752
|
+
class: 'ax-lookup-multi-column',
|
|
753
|
+
'[style.height.px]': 'tableHeight()',
|
|
754
|
+
},
|
|
450
755
|
template: `
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
756
|
+
<ax-data-table
|
|
757
|
+
class="ax-lookup-multi-column-table"
|
|
758
|
+
look="minimal"
|
|
759
|
+
[dataSource]="tableDataSource"
|
|
760
|
+
[itemHeight]="itemHeight()"
|
|
761
|
+
[alternative]="alternate()"
|
|
762
|
+
[emptyTemplate]="emptyTemplate()"
|
|
763
|
+
[loading]="loadingConfig()"
|
|
764
|
+
[paging]="false"
|
|
765
|
+
[showHeader]="true"
|
|
766
|
+
[fixedHeader]="true"
|
|
767
|
+
[showFooter]="false"
|
|
768
|
+
[allowReordering]="false"
|
|
769
|
+
[rowTemplate]="itemTemplate() ? customRowTemplate : undefined"
|
|
770
|
+
[rowCssClass]="resolveRowCssClass"
|
|
771
|
+
(onRowClick)="handleRowClick($event)"
|
|
772
|
+
>
|
|
773
|
+
@for (column of columns(); track trackColumnKey($index, column)) {
|
|
774
|
+
<ax-text-column
|
|
775
|
+
[dataField]="column.field"
|
|
776
|
+
[caption]="column.title"
|
|
777
|
+
[width]="resolveColumnWidth(column)"
|
|
778
|
+
[allowSorting]="false"
|
|
779
|
+
[allowResizing]="false"
|
|
780
|
+
/>
|
|
781
|
+
}
|
|
782
|
+
</ax-data-table>
|
|
783
|
+
|
|
784
|
+
<ng-template #customRowTemplate let-ctx>
|
|
785
|
+
<tr
|
|
786
|
+
[class.ax-state-selected]="ctx.data != null && isSelected(ctx.data)"
|
|
787
|
+
[class.ax-state-disabled]="ctx.data != null && isDisabled(ctx.data)"
|
|
788
|
+
[style.height.px]="itemHeight()"
|
|
789
|
+
[style.max-height.px]="itemHeight()"
|
|
790
|
+
(click)="handleItemClick(ctx.data)"
|
|
470
791
|
>
|
|
471
|
-
<
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
[class.ax-state-selected]="item != null && isSelected(item)"
|
|
478
|
-
[class.ax-state-disabled]="item != null && isDisabled(item)"
|
|
479
|
-
[attr.aria-selected]="item != null ? isSelected(item) : null"
|
|
480
|
-
(click)="handleItemClick(item)"
|
|
481
|
-
>
|
|
482
|
-
@if (item != null) {
|
|
483
|
-
@if (itemTemplate()) {
|
|
484
|
-
<ng-container [ngTemplateOutlet]="itemTemplate()!" [ngTemplateOutletContext]="{ $implicit: item }" />
|
|
485
|
-
} @else {
|
|
486
|
-
@for (column of columns(); track column.field) {
|
|
487
|
-
<span class="ax-lookup-column-cell">{{ getCellText(item, column) }}</span>
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
} @else {
|
|
491
|
-
<ng-container [ngTemplateOutlet]="loadingRow" />
|
|
792
|
+
<td [attr.colspan]="columns().length || 1">
|
|
793
|
+
@if (ctx.data != null && itemTemplate()) {
|
|
794
|
+
<ng-container
|
|
795
|
+
[ngTemplateOutlet]="itemTemplate()!"
|
|
796
|
+
[ngTemplateOutletContext]="{ $implicit: ctx.data }"
|
|
797
|
+
/>
|
|
492
798
|
}
|
|
493
|
-
</
|
|
494
|
-
</
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
<ng-template #loadingRow>
|
|
498
|
-
@if (loadingTemplate()) {
|
|
499
|
-
<ng-container [ngTemplateOutlet]="loadingTemplate()!" />
|
|
500
|
-
} @else {
|
|
501
|
-
<span class="ax-lookup-option-loading">{{ '@acorex:common.status.loading' | translate | async }}</span>
|
|
502
|
-
}
|
|
799
|
+
</td>
|
|
800
|
+
</tr>
|
|
503
801
|
</ng-template>
|
|
504
802
|
`,
|
|
505
803
|
}]
|
|
506
|
-
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }] } });
|
|
804
|
+
}], ctorParameters: () => [], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], disabledField: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledField", required: false }] }], selectedValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedValues", required: false }] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], maxVisibleItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisibleItems", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], loadingTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingTemplate", required: false }] }], alternate: [{ type: i0.Input, args: [{ isSignal: true, alias: "alternate", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], tableRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXDataTableComponent), { isSignal: true }] }] } });
|
|
507
805
|
|
|
508
806
|
/**
|
|
509
807
|
* Internal mini component for the `multi-select-tree` lookup mode:
|
|
@@ -613,32 +911,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
613
911
|
*/
|
|
614
912
|
class AXLookupMultiSelectComponent extends AXLookupListViewBase {
|
|
615
913
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupMultiSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
616
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXLookupMultiSelectComponent, isStandalone: true, selector: "ax-lookup-multi-select", usesInheritance: true, ngImport: i0, template: `
|
|
914
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXLookupMultiSelectComponent, isStandalone: true, selector: "ax-lookup-multi-select", providers: [{ provide: AXLookupListViewBase, useExisting: AXLookupMultiSelectComponent }], usesInheritance: true, ngImport: i0, template: `
|
|
617
915
|
@if (isEmpty()) {
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
916
|
+
@if (emptyTemplate()) {
|
|
917
|
+
<ng-container [ngTemplateOutlet]="emptyTemplate()!" />
|
|
918
|
+
} @else {
|
|
919
|
+
<div class="ax-lookup-empty">
|
|
622
920
|
{{ '@acorex:common.general.no-result-found' | translate | async }}
|
|
623
|
-
|
|
624
|
-
|
|
921
|
+
</div>
|
|
922
|
+
}
|
|
625
923
|
} @else {
|
|
626
924
|
<cdk-virtual-scroll-viewport
|
|
627
925
|
class="ax-lookup-viewport"
|
|
628
926
|
role="listbox"
|
|
629
927
|
aria-multiselectable="true"
|
|
928
|
+
axListNavigation
|
|
929
|
+
#nav="axListNavigation"
|
|
630
930
|
[itemSize]="itemHeight()"
|
|
631
931
|
[style.height.px]="viewportHeight()"
|
|
932
|
+
(onKeypress)="handleListKeypress($event)"
|
|
632
933
|
>
|
|
633
934
|
<div
|
|
634
|
-
*cdkVirtualFor="let item of listDataSource(); trackBy: trackByIndex"
|
|
935
|
+
*cdkVirtualFor="let item of listDataSource(); let i = index; trackBy: trackByIndex"
|
|
635
936
|
role="option"
|
|
636
|
-
class="ax-lookup-option"
|
|
937
|
+
class="ax-lookup-option-host"
|
|
938
|
+
axListNavigationItem
|
|
939
|
+
#navItem="axListNavigationItem"
|
|
637
940
|
[style.height.px]="itemHeight()"
|
|
941
|
+
[class.ax-lookup-option]="!itemTemplate()"
|
|
942
|
+
[class.ax-lookup-option-host--check]="!!itemTemplate()"
|
|
943
|
+
[class.ax-state-alternate]="alternate() && i % 2 === 1"
|
|
638
944
|
[class.ax-state-selected]="item != null && isSelected(item)"
|
|
639
945
|
[class.ax-state-disabled]="item != null && isDisabled(item)"
|
|
946
|
+
[class.ax-state-active]="navItem.isActive()"
|
|
640
947
|
[attr.aria-selected]="item != null ? isSelected(item) : null"
|
|
948
|
+
(mouseenter)="activateNavItem(nav, navItem)"
|
|
641
949
|
(click)="handleItemClick(item)"
|
|
950
|
+
(onKeypress)="handleItemKeypress($event, item)"
|
|
642
951
|
>
|
|
643
952
|
@if (item != null) {
|
|
644
953
|
<input
|
|
@@ -667,7 +976,7 @@ class AXLookupMultiSelectComponent extends AXLookupListViewBase {
|
|
|
667
976
|
<span class="ax-lookup-option-loading">{{ '@acorex:common.status.loading' | translate | async }}</span>
|
|
668
977
|
}
|
|
669
978
|
</ng-template>
|
|
670
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
979
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AXListNavigationModule }, { kind: "directive", type: i3.AXListNavigationDirective, selector: "[axListNavigation]", inputs: ["orientation"], outputs: ["onNavigationChanged", "onKeypress"], exportAs: ["axListNavigation"] }, { kind: "directive", type: i3.AXListNavigationItemDirective, selector: "[axListNavigationItem]", outputs: ["onKeypress"], exportAs: ["axListNavigationItem"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
671
980
|
}
|
|
672
981
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupMultiSelectComponent, decorators: [{
|
|
673
982
|
type: Component,
|
|
@@ -675,33 +984,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
675
984
|
selector: 'ax-lookup-multi-select',
|
|
676
985
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
677
986
|
encapsulation: ViewEncapsulation.None,
|
|
678
|
-
imports: [ScrollingModule, NgTemplateOutlet, AXTranslatorPipe, AsyncPipe],
|
|
987
|
+
imports: [ScrollingModule, NgTemplateOutlet, AXTranslatorPipe, AsyncPipe, AXListNavigationModule],
|
|
988
|
+
providers: [{ provide: AXLookupListViewBase, useExisting: AXLookupMultiSelectComponent }],
|
|
679
989
|
template: `
|
|
680
990
|
@if (isEmpty()) {
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
991
|
+
@if (emptyTemplate()) {
|
|
992
|
+
<ng-container [ngTemplateOutlet]="emptyTemplate()!" />
|
|
993
|
+
} @else {
|
|
994
|
+
<div class="ax-lookup-empty">
|
|
685
995
|
{{ '@acorex:common.general.no-result-found' | translate | async }}
|
|
686
|
-
|
|
687
|
-
|
|
996
|
+
</div>
|
|
997
|
+
}
|
|
688
998
|
} @else {
|
|
689
999
|
<cdk-virtual-scroll-viewport
|
|
690
1000
|
class="ax-lookup-viewport"
|
|
691
1001
|
role="listbox"
|
|
692
1002
|
aria-multiselectable="true"
|
|
1003
|
+
axListNavigation
|
|
1004
|
+
#nav="axListNavigation"
|
|
693
1005
|
[itemSize]="itemHeight()"
|
|
694
1006
|
[style.height.px]="viewportHeight()"
|
|
1007
|
+
(onKeypress)="handleListKeypress($event)"
|
|
695
1008
|
>
|
|
696
1009
|
<div
|
|
697
|
-
*cdkVirtualFor="let item of listDataSource(); trackBy: trackByIndex"
|
|
1010
|
+
*cdkVirtualFor="let item of listDataSource(); let i = index; trackBy: trackByIndex"
|
|
698
1011
|
role="option"
|
|
699
|
-
class="ax-lookup-option"
|
|
1012
|
+
class="ax-lookup-option-host"
|
|
1013
|
+
axListNavigationItem
|
|
1014
|
+
#navItem="axListNavigationItem"
|
|
700
1015
|
[style.height.px]="itemHeight()"
|
|
1016
|
+
[class.ax-lookup-option]="!itemTemplate()"
|
|
1017
|
+
[class.ax-lookup-option-host--check]="!!itemTemplate()"
|
|
1018
|
+
[class.ax-state-alternate]="alternate() && i % 2 === 1"
|
|
701
1019
|
[class.ax-state-selected]="item != null && isSelected(item)"
|
|
702
1020
|
[class.ax-state-disabled]="item != null && isDisabled(item)"
|
|
1021
|
+
[class.ax-state-active]="navItem.isActive()"
|
|
703
1022
|
[attr.aria-selected]="item != null ? isSelected(item) : null"
|
|
1023
|
+
(mouseenter)="activateNavItem(nav, navItem)"
|
|
704
1024
|
(click)="handleItemClick(item)"
|
|
1025
|
+
(onKeypress)="handleItemKeypress($event, item)"
|
|
705
1026
|
>
|
|
706
1027
|
@if (item != null) {
|
|
707
1028
|
<input
|
|
@@ -742,11 +1063,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
742
1063
|
* - `multi-select` — a predefined list of options for multiple item selection (chips in the trigger).
|
|
743
1064
|
* - `drop-down-tree` — a predefined list rendered in a tree-like structure for single item selection.
|
|
744
1065
|
* - `multi-select-tree` — a tree-like structure for multiple item selection.
|
|
745
|
-
* - `multi-column` —
|
|
1066
|
+
* - `multi-column` — an `ax-data-table` grid; when searchable, the trigger input filters as you type.
|
|
1067
|
+
*
|
|
1068
|
+
* With `adaptivityEnabled` (default `true`), the list opens as a bottom actionsheet on small
|
|
1069
|
+
* screens instead of an anchored dropdown — the same alternate presentation as `ax-select-box`.
|
|
1070
|
+
*
|
|
1071
|
+
* Implements {@link FormValueControl} so `[(ngModel)]` / signal forms work via the `value` model
|
|
1072
|
+
* (no `ControlValueAccessor`).
|
|
746
1073
|
*
|
|
747
1074
|
* @category Components
|
|
748
1075
|
*/
|
|
749
1076
|
class AXLookupComponent extends NXComponent {
|
|
1077
|
+
#platform;
|
|
1078
|
+
#destroyRef;
|
|
750
1079
|
#itemsCache;
|
|
751
1080
|
#isUserInteraction;
|
|
752
1081
|
#lastValue;
|
|
@@ -757,6 +1086,8 @@ class AXLookupComponent extends NXComponent {
|
|
|
757
1086
|
#searchDebounce;
|
|
758
1087
|
constructor() {
|
|
759
1088
|
super();
|
|
1089
|
+
this.#platform = inject(AXPlatform);
|
|
1090
|
+
this.#destroyRef = inject(DestroyRef);
|
|
760
1091
|
/**
|
|
761
1092
|
* The lookup rendering mode. Selects which mini component renders in the popup.
|
|
762
1093
|
*/
|
|
@@ -791,7 +1122,7 @@ class AXLookupComponent extends NXComponent {
|
|
|
791
1122
|
this.disabledField = input('disabled', /* @ts-ignore */
|
|
792
1123
|
...(ngDevMode ? [{ debugName: "disabledField" }] : /* istanbul ignore next */ []));
|
|
793
1124
|
/**
|
|
794
|
-
* Column definitions for the `multi-column` mode.
|
|
1125
|
+
* Column definitions for the `multi-column` mode (rendered as `ax-text-column` in `ax-data-table`).
|
|
795
1126
|
*/
|
|
796
1127
|
this.columns = input([], /* @ts-ignore */
|
|
797
1128
|
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
@@ -802,6 +1133,23 @@ class AXLookupComponent extends NXComponent {
|
|
|
802
1133
|
*/
|
|
803
1134
|
this.searchable = input(true, /* @ts-ignore */
|
|
804
1135
|
...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
1136
|
+
/**
|
|
1137
|
+
* When `true` (default), the popup list uses the alternate actionsheet presentation on small
|
|
1138
|
+
* screens (`SM`). When `false`, the list always opens as an anchored dropdown.
|
|
1139
|
+
*/
|
|
1140
|
+
this.adaptivityEnabled = input(true, /* @ts-ignore */
|
|
1141
|
+
...(ngDevMode ? [{ debugName: "adaptivityEnabled" }] : /* istanbul ignore next */ []));
|
|
1142
|
+
/**
|
|
1143
|
+
* Title shown in the actionsheet header on small screens. Falls back to `placeholder`.
|
|
1144
|
+
*/
|
|
1145
|
+
this.caption = input('', /* @ts-ignore */
|
|
1146
|
+
...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
|
|
1147
|
+
/**
|
|
1148
|
+
* When `true`, list rows use alternating background colors for easier scanning
|
|
1149
|
+
* (`drop-down-list`, `multi-select`, and `multi-column` modes).
|
|
1150
|
+
*/
|
|
1151
|
+
this.alternate = input(false, /* @ts-ignore */
|
|
1152
|
+
...(ngDevMode ? [{ debugName: "alternate" }] : /* istanbul ignore next */ []));
|
|
805
1153
|
/**
|
|
806
1154
|
* Placeholder for the trigger search input when items are already selected
|
|
807
1155
|
* (mainly useful in `multi-select`). Falls back to `placeholder` when the selection is empty.
|
|
@@ -816,12 +1164,12 @@ class AXLookupComponent extends NXComponent {
|
|
|
816
1164
|
/**
|
|
817
1165
|
* Whether the lookup is disabled.
|
|
818
1166
|
*/
|
|
819
|
-
this.disabled =
|
|
1167
|
+
this.disabled = input(false, /* @ts-ignore */
|
|
820
1168
|
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
821
1169
|
/**
|
|
822
1170
|
* Whether the lookup is readonly.
|
|
823
1171
|
*/
|
|
824
|
-
this.readonly =
|
|
1172
|
+
this.readonly = input(false, /* @ts-ignore */
|
|
825
1173
|
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
826
1174
|
/**
|
|
827
1175
|
* Predefined look scheme of the editor container. Same looks as other editor components like ax-text-box.
|
|
@@ -865,7 +1213,8 @@ class AXLookupComponent extends NXComponent {
|
|
|
865
1213
|
...(ngDevMode ? [{ debugName: "loadingTemplate" }] : /* istanbul ignore next */ []));
|
|
866
1214
|
/**
|
|
867
1215
|
* The selected value(s): a scalar in single modes, an array in
|
|
868
|
-
* `multi-select` / `multi-select-tree`. Supports
|
|
1216
|
+
* `multi-select` / `multi-select-tree`. Supports `[(value)]`, `[(ngModel)]`, and signal forms
|
|
1217
|
+
* via {@link FormValueControl}.
|
|
869
1218
|
*/
|
|
870
1219
|
this.value = model(null, /* @ts-ignore */
|
|
871
1220
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -877,6 +1226,22 @@ class AXLookupComponent extends NXComponent {
|
|
|
877
1226
|
* Emitted when the selection changes, carrying the resolved selected items.
|
|
878
1227
|
*/
|
|
879
1228
|
this.onSelectionChanged = output();
|
|
1229
|
+
/**
|
|
1230
|
+
* Emitted when the trigger receives focus.
|
|
1231
|
+
*/
|
|
1232
|
+
this.onFocus = output();
|
|
1233
|
+
/**
|
|
1234
|
+
* Emitted when the trigger loses focus.
|
|
1235
|
+
*/
|
|
1236
|
+
this.onBlur = output();
|
|
1237
|
+
/**
|
|
1238
|
+
* Emitted when a list/tree item is clicked.
|
|
1239
|
+
*/
|
|
1240
|
+
this.onItemClick = output();
|
|
1241
|
+
/**
|
|
1242
|
+
* Emitted when an item is selected (click or keyboard).
|
|
1243
|
+
*/
|
|
1244
|
+
this.onItemSelected = output();
|
|
880
1245
|
/**
|
|
881
1246
|
* Emitted when the popup opens.
|
|
882
1247
|
*/
|
|
@@ -888,6 +1253,9 @@ class AXLookupComponent extends NXComponent {
|
|
|
888
1253
|
/** Whether the popup is expanded. */
|
|
889
1254
|
this.expanded = signal(false, /* @ts-ignore */
|
|
890
1255
|
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
1256
|
+
/** Whether the list is currently shown as a bottom actionsheet (small screens + adaptivity). */
|
|
1257
|
+
this.isActionsheetStyle = signal(false, /* @ts-ignore */
|
|
1258
|
+
...(ngDevMode ? [{ debugName: "isActionsheetStyle" }] : /* istanbul ignore next */ []));
|
|
891
1259
|
/** Whether the current mode selects multiple values. */
|
|
892
1260
|
this.isMultiple = computed(() => this.mode() === 'multi-select' || this.mode() === 'multi-select-tree', /* @ts-ignore */
|
|
893
1261
|
...(ngDevMode ? [{ debugName: "isMultiple" }] : /* istanbul ignore next */ []));
|
|
@@ -936,12 +1304,29 @@ class AXLookupComponent extends NXComponent {
|
|
|
936
1304
|
* Text typed in the editable trigger input.
|
|
937
1305
|
* Multi-select starts empty; single modes sync from the selected display text.
|
|
938
1306
|
*/
|
|
939
|
-
this.searchText = linkedSignal(() => (this.mode() === 'multi-select' ? '' : this.displayText()), /* @ts-ignore */
|
|
1307
|
+
this.searchText = linkedSignal(() => (this.mode() === 'multi-select' || this.mode() === 'multi-select-tree' ? '' : this.displayText()), /* @ts-ignore */
|
|
940
1308
|
...(ngDevMode ? [{ debugName: "searchText" }] : /* istanbul ignore next */ []));
|
|
1309
|
+
/**
|
|
1310
|
+
* Whether the trigger should render `selectedTemplate` instead of the plain input text.
|
|
1311
|
+
* Searchable mode shows the template while the popup is closed and the input still matches
|
|
1312
|
+
* the selected display text (same pattern as combo-box).
|
|
1313
|
+
*/
|
|
1314
|
+
this.showSelectedTemplate = computed(() => {
|
|
1315
|
+
if (this.isMultiple() || !this.selectedTemplate() || this.selectedItems().length === 0) {
|
|
1316
|
+
return false;
|
|
1317
|
+
}
|
|
1318
|
+
if (!this.isEditableTrigger()) {
|
|
1319
|
+
return true;
|
|
1320
|
+
}
|
|
1321
|
+
return !this.expanded() && this.searchText() === this.displayText();
|
|
1322
|
+
}, /* @ts-ignore */
|
|
1323
|
+
...(ngDevMode ? [{ debugName: "showSelectedTemplate" }] : /* istanbul ignore next */ []));
|
|
941
1324
|
this.popoverRef = viewChild(AXPopoverComponent, /* @ts-ignore */
|
|
942
1325
|
...(ngDevMode ? [{ debugName: "popoverRef" }] : /* istanbul ignore next */ []));
|
|
943
1326
|
this.triggerSearchInput = viewChild('triggerSearchInput', /* @ts-ignore */
|
|
944
1327
|
...(ngDevMode ? [{ debugName: "triggerSearchInput" }] : /* istanbul ignore next */ []));
|
|
1328
|
+
this.listView = viewChild(AXLookupListViewBase, /* @ts-ignore */
|
|
1329
|
+
...(ngDevMode ? [{ debugName: "listView" }] : /* istanbul ignore next */ []));
|
|
945
1330
|
this.#itemsCache = new Map();
|
|
946
1331
|
this.#isUserInteraction = false;
|
|
947
1332
|
this.#lastValue = undefined;
|
|
@@ -959,6 +1344,19 @@ class AXLookupComponent extends NXComponent {
|
|
|
959
1344
|
...(ngDevMode ? [{ debugName: "triggerSearchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
960
1345
|
effect(() => this.#emitValueChanged(this.value()));
|
|
961
1346
|
effect(() => this.#emitOpenedOrClosed(this.expanded()));
|
|
1347
|
+
effect(() => {
|
|
1348
|
+
this.adaptivityEnabled();
|
|
1349
|
+
untracked(() => this.#syncActionsheetStyle());
|
|
1350
|
+
});
|
|
1351
|
+
this.#platform.resize.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
|
|
1352
|
+
this.#syncActionsheetStyle();
|
|
1353
|
+
// Match dropdown-box: close anchored dropdowns on resize; keep actionsheet open.
|
|
1354
|
+
if (this.expanded() && !this.isActionsheetStyle()) {
|
|
1355
|
+
this.close();
|
|
1356
|
+
}
|
|
1357
|
+
});
|
|
1358
|
+
// Seed the actionsheet flag once.
|
|
1359
|
+
this.#syncActionsheetStyle();
|
|
962
1360
|
// Resolve selected items whenever the value (or the sources) change.
|
|
963
1361
|
effect(() => {
|
|
964
1362
|
const values = this.selectedValues();
|
|
@@ -984,10 +1382,18 @@ class AXLookupComponent extends NXComponent {
|
|
|
984
1382
|
});
|
|
985
1383
|
});
|
|
986
1384
|
}
|
|
1385
|
+
#syncActionsheetStyle() {
|
|
1386
|
+
this.isActionsheetStyle.set(this.adaptivityEnabled() && this.#platform.is('SM'));
|
|
1387
|
+
}
|
|
987
1388
|
/** Returns the display text of an item using the `textField` mapping. */
|
|
988
1389
|
getItemText(item) {
|
|
989
1390
|
return String(item?.[this.textField()] ?? '');
|
|
990
1391
|
}
|
|
1392
|
+
/** Stable unique key for selected chips — avoids NG0955 and remounts on reorder/remove. */
|
|
1393
|
+
trackSelectedKey(item) {
|
|
1394
|
+
const key = item?.[this.valueField()];
|
|
1395
|
+
return key != null ? key : item;
|
|
1396
|
+
}
|
|
991
1397
|
/**
|
|
992
1398
|
* Opens (editable trigger) or toggles the popup on trigger click.
|
|
993
1399
|
*/
|
|
@@ -1001,6 +1407,69 @@ class AXLookupComponent extends NXComponent {
|
|
|
1001
1407
|
return;
|
|
1002
1408
|
}
|
|
1003
1409
|
this.expanded.update((open) => !open);
|
|
1410
|
+
if (!this.expanded()) {
|
|
1411
|
+
return;
|
|
1412
|
+
}
|
|
1413
|
+
queueMicrotask(() => this.focusListFirst());
|
|
1414
|
+
}
|
|
1415
|
+
/**
|
|
1416
|
+
* Focuses the lookup trigger input.
|
|
1417
|
+
*/
|
|
1418
|
+
focus(options) {
|
|
1419
|
+
if (this.disabled()) {
|
|
1420
|
+
return;
|
|
1421
|
+
}
|
|
1422
|
+
this.triggerSearchInput()?.nativeElement.focus(options);
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* Handles keyboard interaction on the trigger input.
|
|
1426
|
+
*/
|
|
1427
|
+
onTriggerKeydown(e) {
|
|
1428
|
+
if (this.disabled() || this.readonly()) {
|
|
1429
|
+
return;
|
|
1430
|
+
}
|
|
1431
|
+
if (e.key === 'Escape') {
|
|
1432
|
+
this.close();
|
|
1433
|
+
return;
|
|
1434
|
+
}
|
|
1435
|
+
if (e.key === 'ArrowDown') {
|
|
1436
|
+
e.preventDefault();
|
|
1437
|
+
this.expanded.set(true);
|
|
1438
|
+
queueMicrotask(() => this.focusListFirst());
|
|
1439
|
+
return;
|
|
1440
|
+
}
|
|
1441
|
+
if (!this.isEditableTrigger() && (e.key === 'Enter' || e.key === ' ')) {
|
|
1442
|
+
e.preventDefault();
|
|
1443
|
+
this.expanded.update((open) => !open);
|
|
1444
|
+
if (this.expanded()) {
|
|
1445
|
+
queueMicrotask(() => this.focusListFirst());
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
/** Blocks typing when the trigger is not editable (keeps Tab / keyboard open working). */
|
|
1450
|
+
onBeforeInput(event) {
|
|
1451
|
+
if (!this.isEditableTrigger() || this.readonly()) {
|
|
1452
|
+
event.preventDefault();
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Returns focus to the trigger input when list navigation requests it.
|
|
1457
|
+
*/
|
|
1458
|
+
onListNavigateOut(_reason) {
|
|
1459
|
+
this.triggerSearchInput()?.nativeElement.focus();
|
|
1460
|
+
}
|
|
1461
|
+
focusListFirst() {
|
|
1462
|
+
const tryFocus = (attempt = 0) => {
|
|
1463
|
+
const list = this.listView();
|
|
1464
|
+
if (list) {
|
|
1465
|
+
list.focusFirst();
|
|
1466
|
+
return;
|
|
1467
|
+
}
|
|
1468
|
+
if (attempt < 5) {
|
|
1469
|
+
setTimeout(() => tryFocus(attempt + 1), 16);
|
|
1470
|
+
}
|
|
1471
|
+
};
|
|
1472
|
+
tryFocus();
|
|
1004
1473
|
}
|
|
1005
1474
|
/**
|
|
1006
1475
|
* Keeps the expanded state in sync when the popover closes (e.g. click outside),
|
|
@@ -1008,7 +1477,7 @@ class AXLookupComponent extends NXComponent {
|
|
|
1008
1477
|
*/
|
|
1009
1478
|
onPopoverClosed() {
|
|
1010
1479
|
this.expanded.set(false);
|
|
1011
|
-
this.searchText.set(this.
|
|
1480
|
+
this.searchText.set(this.isMultiple() ? '' : this.displayText());
|
|
1012
1481
|
if (this.#filterApplied) {
|
|
1013
1482
|
this.#filterApplied = false;
|
|
1014
1483
|
const source = this.resolvedDataSource();
|
|
@@ -1022,6 +1491,12 @@ class AXLookupComponent extends NXComponent {
|
|
|
1022
1491
|
close() {
|
|
1023
1492
|
this.expanded.set(false);
|
|
1024
1493
|
}
|
|
1494
|
+
/**
|
|
1495
|
+
* Closes the popup (alias for {@link close}, required by `AXClosableComponent`).
|
|
1496
|
+
*/
|
|
1497
|
+
closeAll() {
|
|
1498
|
+
this.close();
|
|
1499
|
+
}
|
|
1025
1500
|
/**
|
|
1026
1501
|
* Opens the popup.
|
|
1027
1502
|
*/
|
|
@@ -1035,6 +1510,9 @@ class AXLookupComponent extends NXComponent {
|
|
|
1035
1510
|
* Handles typing in the editable trigger input.
|
|
1036
1511
|
*/
|
|
1037
1512
|
onTriggerSearchInput(text) {
|
|
1513
|
+
if (!this.isEditableTrigger()) {
|
|
1514
|
+
return;
|
|
1515
|
+
}
|
|
1038
1516
|
this.searchText.set(text);
|
|
1039
1517
|
this.expanded.set(true);
|
|
1040
1518
|
this.#applyFilterDebounced(text);
|
|
@@ -1043,6 +1521,8 @@ class AXLookupComponent extends NXComponent {
|
|
|
1043
1521
|
* Commits a single pick (drop-down-list, drop-down-tree, multi-column) and closes the popup.
|
|
1044
1522
|
*/
|
|
1045
1523
|
handleSinglePick(e) {
|
|
1524
|
+
this.#emitItemClick(e.item);
|
|
1525
|
+
this.#emitItemSelected(e.item);
|
|
1046
1526
|
this.#itemsCache.set(e.value, e.item);
|
|
1047
1527
|
if (!this.#valuesEqual(e.value, this.value())) {
|
|
1048
1528
|
this.#isUserInteraction = true;
|
|
@@ -1055,9 +1535,13 @@ class AXLookupComponent extends NXComponent {
|
|
|
1055
1535
|
* Clears the trigger search so the full list returns (select-box-like).
|
|
1056
1536
|
*/
|
|
1057
1537
|
handleMultiToggle(e) {
|
|
1538
|
+
this.#emitItemClick(e.item);
|
|
1058
1539
|
this.#itemsCache.set(e.value, e.item);
|
|
1059
1540
|
const current = this.selectedValues();
|
|
1060
1541
|
const exists = current.some((v) => v == e.value);
|
|
1542
|
+
if (!exists) {
|
|
1543
|
+
this.#emitItemSelected(e.item);
|
|
1544
|
+
}
|
|
1061
1545
|
const next = exists ? current.filter((v) => !(v == e.value)) : [...current, e.value];
|
|
1062
1546
|
this.#isUserInteraction = true;
|
|
1063
1547
|
this.value.set(next);
|
|
@@ -1070,12 +1554,49 @@ class AXLookupComponent extends NXComponent {
|
|
|
1070
1554
|
* Applies the multi-select-tree selection to the value; the popup stays open.
|
|
1071
1555
|
*/
|
|
1072
1556
|
handleTreeSelectionChange(e) {
|
|
1557
|
+
const prev = new Set(this.selectedValues().map((v) => String(v)));
|
|
1558
|
+
const newlySelected = e.nodes.filter((node) => !prev.has(String(node[this.valueField()])));
|
|
1559
|
+
if (newlySelected.length > 0) {
|
|
1560
|
+
this.#emitItemSelected(newlySelected[0]);
|
|
1561
|
+
}
|
|
1073
1562
|
for (const node of e.nodes) {
|
|
1074
1563
|
this.#itemsCache.set(String(node[this.valueField()]), node);
|
|
1075
1564
|
}
|
|
1076
1565
|
this.#isUserInteraction = true;
|
|
1077
1566
|
this.value.set([...e.ids]);
|
|
1078
1567
|
}
|
|
1568
|
+
/** Forwards native focus from the trigger input. */
|
|
1569
|
+
emitOnFocus(e) {
|
|
1570
|
+
this.onFocus.emit({
|
|
1571
|
+
component: this,
|
|
1572
|
+
htmlElement: this.nativeElement,
|
|
1573
|
+
nativeEvent: e,
|
|
1574
|
+
});
|
|
1575
|
+
}
|
|
1576
|
+
/** Forwards native blur from the trigger input. */
|
|
1577
|
+
emitOnBlur(e) {
|
|
1578
|
+
this.onBlur.emit({
|
|
1579
|
+
component: this,
|
|
1580
|
+
htmlElement: this.nativeElement,
|
|
1581
|
+
nativeEvent: e,
|
|
1582
|
+
});
|
|
1583
|
+
}
|
|
1584
|
+
#emitItemClick(item) {
|
|
1585
|
+
this.onItemClick.emit({
|
|
1586
|
+
component: this,
|
|
1587
|
+
item,
|
|
1588
|
+
htmlElement: this.nativeElement,
|
|
1589
|
+
isUserInteraction: true,
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1592
|
+
#emitItemSelected(item) {
|
|
1593
|
+
this.onItemSelected.emit({
|
|
1594
|
+
component: this,
|
|
1595
|
+
item,
|
|
1596
|
+
htmlElement: this.nativeElement,
|
|
1597
|
+
isUserInteraction: true,
|
|
1598
|
+
});
|
|
1599
|
+
}
|
|
1079
1600
|
/**
|
|
1080
1601
|
* Removes a single chip from the multi selection.
|
|
1081
1602
|
*/
|
|
@@ -1090,14 +1611,30 @@ class AXLookupComponent extends NXComponent {
|
|
|
1090
1611
|
}
|
|
1091
1612
|
/**
|
|
1092
1613
|
* Clears the whole selection.
|
|
1614
|
+
* Sets `null` in single modes and `[]` in multi modes. Used by projected `ax-clear-button`.
|
|
1615
|
+
*
|
|
1616
|
+
* @param isUserInteraction - Whether the clear was triggered by the user.
|
|
1093
1617
|
*/
|
|
1094
|
-
|
|
1095
|
-
event.stopPropagation();
|
|
1618
|
+
reset(isUserInteraction = false) {
|
|
1096
1619
|
if (this.disabled() || this.readonly()) {
|
|
1097
1620
|
return;
|
|
1098
1621
|
}
|
|
1099
|
-
|
|
1100
|
-
this.value
|
|
1622
|
+
const next = this.isMultiple() ? [] : null;
|
|
1623
|
+
const current = this.value();
|
|
1624
|
+
if (this.isMultiple()) {
|
|
1625
|
+
if (Array.isArray(current) && current.length === 0) {
|
|
1626
|
+
return;
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
else if (current == null) {
|
|
1630
|
+
return;
|
|
1631
|
+
}
|
|
1632
|
+
this.#isUserInteraction = isUserInteraction;
|
|
1633
|
+
this.value.set(next);
|
|
1634
|
+
if (this.isEditableTrigger() && this.searchText()) {
|
|
1635
|
+
this.searchText.set('');
|
|
1636
|
+
this.#applyFilterDebounced('');
|
|
1637
|
+
}
|
|
1101
1638
|
}
|
|
1102
1639
|
#applyFilterDebounced(text) {
|
|
1103
1640
|
if (this.#searchDebounce) {
|
|
@@ -1227,20 +1764,32 @@ class AXLookupComponent extends NXComponent {
|
|
|
1227
1764
|
expanded ? this.onOpened.emit(event) : this.onClosed.emit(event);
|
|
1228
1765
|
}
|
|
1229
1766
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1230
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXLookupComponent, isStandalone: true, selector: "ax-lookup", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, treeDataSource: { classPropertyName: "treeDataSource", publicName: "treeDataSource", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, disabledField: { classPropertyName: "disabledField", publicName: "disabledField", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, maxVisibleItems: { classPropertyName: "maxVisibleItems", publicName: "maxVisibleItems", isSignal: true, isRequired: false, transformFunction: null }, treeSelectionBehavior: { classPropertyName: "treeSelectionBehavior", publicName: "treeSelectionBehavior", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, selectedTemplate: { classPropertyName: "selectedTemplate", publicName: "selectedTemplate", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, loadingTemplate: { classPropertyName: "loadingTemplate", publicName: "loadingTemplate", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", readonly: "readonlyChange", look: "lookChange", value: "valueChange", onValueChanged: "onValueChanged", onSelectionChanged: "onSelectionChanged", onOpened: "onOpened", onClosed: "onClosed" }, providers: [{ provide: AXComponent, useExisting: AXLookupComponent }], viewQueries: [{ propertyName: "popoverRef", first: true, predicate: AXPopoverComponent, descendants: true, isSignal: true }, { propertyName: "triggerSearchInput", first: true, predicate: ["triggerSearchInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #origin\n class=\"ax-editor-container ax-{{ look() }} ax-default ax-lookup-trigger\"\n [class.ax-lookup-trigger-multiple]=\"isMultiple()\"\n [class.ax-state-disabled]=\"disabled()\"\n [class.ax-state-readonly]=\"readonly()\"\n (click)=\"onTriggerClick()\"\n (keydown.escape)=\"close()\"\n>\n <ng-content select=\"ax-prefix\"></ng-content>\n\n @if (isMultiple()) {\n <div class=\"ax-lookup-chips\">\n @for (item of selectedItems(); track $index) {\n <span class=\"ax-lookup-chip\">\n @if (selectedTemplate()) {\n <ng-container [ngTemplateOutlet]=\"selectedTemplate()!\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <span class=\"ax-lookup-chip-text\">{{ getItemText(item) }}</span>\n }\n <button\n type=\"button\"\n class=\"ax-lookup-chip-remove\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"removeChip($event, item)\"\n >\n <span class=\"ax-icon ax-icon-close\"></span>\n </button>\n </span>\n }\n @if (isEditableTrigger()) {\n <input\n #triggerSearchInput\n type=\"text\"\n class=\"ax-input ax-lookup-trigger-search\"\n [placeholder]=\"triggerSearchPlaceholder()\"\n [disabled]=\"disabled()\"\n [value]=\"searchText()\"\n (input)=\"onTriggerSearchInput($any($event.target).value)\"\n />\n } @else if (selectedItems().length === 0) {\n <span class=\"ax-lookup-placeholder\">{{ placeholder() }}</span>\n }\n </div>\n @if (selectedItems().length > 0) {\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"clearAll($event)\"\n >\n <span class=\"ax-icon ax-icon-close\"></span>\n </button>\n }\n } @else if (isEditableTrigger()) {\n <input\n #triggerSearchInput\n type=\"text\"\n class=\"ax-input\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [value]=\"searchText()\"\n (input)=\"onTriggerSearchInput($any($event.target).value)\"\n />\n } @else {\n @if (selectedTemplate() && selectedItems().length > 0) {\n <div class=\"ax-lookup-selected-content\">\n <ng-container\n [ngTemplateOutlet]=\"selectedTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedItems()[0] }\"\n />\n </div>\n } @else {\n <input\n type=\"text\"\n class=\"ax-input ax-lookup-select-input\"\n readonly\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [value]=\"displayText()\"\n />\n }\n }\n\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n >\n <span\n class=\"ax-icon\"\n [class.ax-icon-chevron-down]=\"!expanded()\"\n [class.ax-icon-chevron-up]=\"expanded()\"\n ></span>\n </button>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n\n<ax-popover\n [target]=\"origin\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n [width]=\"origin.offsetWidth + 'px'\"\n [disabled]=\"disabled() || readonly()\"\n (onClosed)=\"onPopoverClosed()\"\n>\n <div class=\"ax-lookup-popup\" (keydown.escape)=\"close()\">\n @switch (mode()) {\n @case ('drop-down-list') {\n <ax-lookup-drop-down-list\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n (itemClick)=\"handleSinglePick($event)\"\n />\n }\n @case ('multi-select') {\n <ax-lookup-multi-select\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n (itemClick)=\"handleMultiToggle($event)\"\n />\n }\n @case ('drop-down-tree') {\n <ax-lookup-drop-down-tree\n [dataSource]=\"treeDataSource()!\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [nodeTemplate]=\"$any(itemTemplate())\"\n (itemClick)=\"handleSinglePick($event)\"\n />\n }\n @case ('multi-select-tree') {\n <ax-lookup-multi-select-tree\n [dataSource]=\"treeDataSource()!\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [selectionBehavior]=\"treeSelectionBehavior()\"\n [nodeTemplate]=\"$any(itemTemplate())\"\n (selectionChange)=\"handleTreeSelectionChange($event)\"\n />\n }\n @case ('multi-column') {\n <ax-lookup-multi-column\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [columns]=\"columns()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n (itemClick)=\"handleSinglePick($event)\"\n />\n }\n }\n </div>\n</ax-popover>\n", styles: ["@layer properties;@layer components{ax-lookup{display:block;width:100%}ax-lookup .ax-editor-container{justify-content:flex-start;gap:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-editor-container.ax-state-disabled{cursor:not-allowed;opacity:50%}ax-lookup .ax-editor-container.ax-state-disabled .ax-input,ax-lookup .ax-editor-container.ax-state-disabled .ax-editor{cursor:not-allowed}ax-lookup .ax-editor-container.ax-state-readonly{opacity:75%}ax-lookup .ax-lookup-trigger{cursor:pointer;--tw-outline-style: none;outline-style:none;-webkit-user-select:none;user-select:none}ax-lookup .ax-lookup-trigger-multiple{height:auto;min-height:calc(var(--spacing, .25rem) * 9);padding-block:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-lookup-select-input{cursor:pointer;caret-color:transparent;-webkit-user-select:none;user-select:none}ax-lookup .ax-lookup-selected-content{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;align-items:center;overflow:hidden}ax-lookup .ax-lookup-chips{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-wrap:wrap;align-items:center;gap:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-lookup-trigger-search{margin:calc(var(--spacing, .25rem) * 0)!important;height:calc(var(--spacing, .25rem) * 7.5);width:auto!important;min-width:calc(var(--spacing, .25rem) * 16);flex:1;flex-basis:calc(var(--spacing, .25rem) * 16)}ax-lookup .ax-lookup-placeholder{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-lookup .ax-lookup-placeholder{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 50%,transparent)}}ax-lookup .ax-lookup-chip{display:inline-flex;max-width:100%;align-items:center;gap:calc(var(--spacing, .25rem) * 1);border-radius:var(--ax-sys-border-radius);background-color:rgba(var(--ax-sys-color-on-surface));padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * .5);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}@supports (color: color-mix(in lab,red,red)){ax-lookup .ax-lookup-chip{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 10%,transparent)}}ax-lookup .ax-lookup-chip .ax-lookup-chip-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-lookup .ax-lookup-chip .ax-lookup-chip-remove{display:flex;width:calc(var(--spacing, .25rem) * 4);height:calc(var(--spacing, .25rem) * 4);flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0)}ax-lookup .ax-lookup-chip .ax-lookup-chip-remove:hover{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-lookup .ax-lookup-chip .ax-lookup-chip-remove:hover{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 15%,transparent)}}ax-lookup .ax-lookup-chip .ax-lookup-chip-remove .ax-icon{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: 1;line-height:1}.ax-lookup-popup{box-sizing:border-box;display:flex;width:100%;flex-direction:column;overflow:hidden;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-lookup-popup:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-darkest-surface))}.ax-lookup-viewport{width:100%}.ax-lookup-empty{display:flex;min-height:calc(var(--spacing, .25rem) * 12);width:100%;align-items:center;justify-content:center;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 3);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 60%,transparent)}}.ax-lookup-option{box-sizing:border-box;display:flex;cursor:pointer;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-style:var(--tw-border-style);border-width:1px;border-color:transparent;padding-inline:calc(var(--spacing, .25rem) * 3);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface));--tw-outline-style: none;outline-style:none}.ax-lookup-option:hover{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option:hover{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 5%,transparent)}}.ax-lookup-option.ax-state-selected{background-color:rgba(var(--ax-sys-color-primary-lightest-surface));color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-option.ax-state-selected:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option.ax-state-selected:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 25%,transparent)}}.ax-lookup-option.ax-state-selected .ax-lookup-option-check{display:block;width:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 2);rotate:45deg;border-right-style:var(--tw-border-style);border-right-width:2px;border-bottom-style:var(--tw-border-style);border-bottom-width:2px;border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-option.ax-state-disabled{cursor:not-allowed;opacity:50%}.ax-lookup-option .ax-lookup-option-text{min-width:calc(var(--spacing, .25rem) * 0);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ax-lookup-option .ax-lookup-option-check{display:none;flex-shrink:0}.ax-lookup-option .ax-lookup-option-loading{width:100%;color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option .ax-lookup-option-loading{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 50%,transparent)}}.ax-lookup-option .ax-lookup-checkbox{pointer-events:none;width:calc(var(--spacing, .25rem) * 4);height:calc(var(--spacing, .25rem) * 4);flex-shrink:0;accent-color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-column-header{display:grid;width:100%;gap:calc(var(--spacing, .25rem) * 2);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-on-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:rgba(var(--ax-sys-color-on-surface));text-transform:uppercase}@supports (color: color-mix(in lab,red,red)){.ax-lookup-column-header{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 5%,transparent)}}@supports (color: color-mix(in lab,red,red)){.ax-lookup-column-header{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 70%,transparent)}}.ax-lookup-column-row{display:grid;gap:calc(var(--spacing, .25rem) * 2)}.ax-lookup-column-row .ax-lookup-column-cell{min-width:calc(var(--spacing, .25rem) * 0);align-self:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ax-lookup-tree{max-height:calc(var(--spacing, .25rem) * 80);overflow:auto;padding:calc(var(--spacing, .25rem) * 2)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-leading: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXLookupDropDownListComponent, selector: "ax-lookup-drop-down-list" }, { kind: "component", type: AXLookupMultiSelectComponent, selector: "ax-lookup-multi-select" }, { kind: "component", type: AXLookupDropDownTreeComponent, selector: "ax-lookup-drop-down-tree", inputs: ["dataSource", "valueField", "textField", "disabledField", "selectedValues", "nodeTemplate"], outputs: ["itemClick"] }, { kind: "component", type: AXLookupMultiSelectTreeComponent, selector: "ax-lookup-multi-select-tree", inputs: ["dataSource", "valueField", "textField", "disabledField", "selectedValues", "selectionBehavior", "nodeTemplate"], outputs: ["selectionChange"] }, { kind: "component", type: AXLookupMultiColumnComponent, selector: "ax-lookup-multi-column", inputs: ["columns"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1767
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXLookupComponent, isStandalone: true, selector: "ax-lookup", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, treeDataSource: { classPropertyName: "treeDataSource", publicName: "treeDataSource", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, disabledField: { classPropertyName: "disabledField", publicName: "disabledField", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, adaptivityEnabled: { classPropertyName: "adaptivityEnabled", publicName: "adaptivityEnabled", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, alternate: { classPropertyName: "alternate", publicName: "alternate", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, maxVisibleItems: { classPropertyName: "maxVisibleItems", publicName: "maxVisibleItems", isSignal: true, isRequired: false, transformFunction: null }, treeSelectionBehavior: { classPropertyName: "treeSelectionBehavior", publicName: "treeSelectionBehavior", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, selectedTemplate: { classPropertyName: "selectedTemplate", publicName: "selectedTemplate", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, loadingTemplate: { classPropertyName: "loadingTemplate", publicName: "loadingTemplate", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { look: "lookChange", value: "valueChange", onValueChanged: "onValueChanged", onSelectionChanged: "onSelectionChanged", onFocus: "onFocus", onBlur: "onBlur", onItemClick: "onItemClick", onItemSelected: "onItemSelected", onOpened: "onOpened", onClosed: "onClosed" }, providers: [
|
|
1768
|
+
{ provide: AXComponent, useExisting: AXLookupComponent },
|
|
1769
|
+
{ provide: AXClearableComponent, useExisting: AXLookupComponent },
|
|
1770
|
+
{ provide: AXClosableComponent, useExisting: AXLookupComponent },
|
|
1771
|
+
], viewQueries: [{ propertyName: "popoverRef", first: true, predicate: AXPopoverComponent, descendants: true, isSignal: true }, { propertyName: "triggerSearchInput", first: true, predicate: ["triggerSearchInput"], descendants: true, isSignal: true }, { propertyName: "listView", first: true, predicate: AXLookupListViewBase, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #origin\n class=\"ax-editor-container ax-{{ look() }} ax-default\"\n [class.ax-lookup-trigger]=\"!isEditableTrigger()\"\n [class.ax-lookup-trigger-multiple]=\"isMultiple()\"\n [class.ax-state-disabled]=\"disabled()\"\n [class.ax-state-readonly]=\"readonly()\"\n (click)=\"onTriggerClick()\"\n>\n <ng-content select=\"ax-prefix\"></ng-content>\n\n @if (isMultiple()) {\n <div class=\"ax-lookup-chips\">\n @for (item of selectedItems(); track trackSelectedKey(item)) {\n <ax-chips class=\"ax-sm\" color=\"primary\" look=\"twotone\" [text]=\"selectedTemplate() ? '' : getItemText(item)\">\n @if (selectedTemplate()) {\n <ax-prefix>\n <ng-container\n [ngTemplateOutlet]=\"selectedTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </ax-prefix>\n }\n @if (!disabled() && !readonly()) {\n <ax-suffix>\n <button type=\"button\" tabindex=\"-1\" (click)=\"removeChip($event, item)\">\n <span class=\"ax-icon ax-icon-close\"></span>\n </button>\n </ax-suffix>\n }\n </ax-chips>\n }\n <input\n #triggerSearchInput\n type=\"text\"\n class=\"ax-input ax-lookup-trigger-search\"\n [class.ax-lookup-select-input]=\"!isEditableTrigger()\"\n [placeholder]=\"triggerSearchPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || !isEditableTrigger()\"\n [attr.inputmode]=\"isEditableTrigger() ? null : 'none'\"\n [value]=\"searchText()\"\n (input)=\"onTriggerSearchInput($any($event.target).value)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (beforeinput)=\"onBeforeInput($event)\"\n (focus)=\"emitOnFocus($event)\"\n (blur)=\"emitOnBlur($event)\"\n />\n </div>\n } @else {\n <div class=\"ax-lookup-value\">\n @if (showSelectedTemplate()) {\n <div class=\"ax-lookup-selected-content\" aria-hidden=\"true\">\n <ng-container\n [ngTemplateOutlet]=\"selectedTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedItems()[0] }\"\n />\n </div>\n }\n <input\n #triggerSearchInput\n type=\"text\"\n class=\"ax-input\"\n [class.ax-lookup-select-input]=\"!isEditableTrigger()\"\n [class.ax-lookup-input-overlay]=\"showSelectedTemplate()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || !isEditableTrigger()\"\n [attr.inputmode]=\"isEditableTrigger() ? null : 'none'\"\n [value]=\"searchText()\"\n (input)=\"onTriggerSearchInput($any($event.target).value)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (beforeinput)=\"onBeforeInput($event)\"\n (focus)=\"emitOnFocus($event)\"\n (blur)=\"emitOnBlur($event)\"\n />\n </div>\n }\n\n @if (selectedValues().length > 0 && !disabled() && !readonly()) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n >\n <span\n class=\"ax-icon\"\n [class.ax-icon-chevron-down]=\"!expanded()\"\n [class.ax-icon-chevron-up]=\"expanded()\"\n ></span>\n </button>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n\n<ax-popover\n [target]=\"origin\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n [width]=\"isActionsheetStyle() ? '100%' : origin.offsetWidth + 'px'\"\n [adaptivityEnabled]=\"isActionsheetStyle()\"\n [disabled]=\"disabled() || readonly()\"\n (onClosed)=\"onPopoverClosed()\"\n>\n <div class=\"ax-lookup-popup\" [class.ax-is-actionsheet]=\"isActionsheetStyle()\" [class.ax-is-alternate]=\"alternate()\" (keydown.escape)=\"close()\">\n @if (isActionsheetStyle()) {\n <ax-header class=\"ax-solid\">\n <ax-title>{{ caption() || placeholder() || ('@acorex:selectbox.popover.title' | translate | async) }}</ax-title>\n <ax-close-button [icon]=\"isMultiple() ? 'ax-icon ax-icon-check' : 'ax-icon ax-icon-close'\"></ax-close-button>\n </ax-header>\n }\n <ng-content select=\"ax-header\"></ng-content>\n @if (expanded()) {\n @switch (mode()) {\n @case ('drop-down-list') {\n <ax-lookup-drop-down-list\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n [alternate]=\"alternate()\"\n (itemClick)=\"handleSinglePick($event)\"\n (navigateOut)=\"onListNavigateOut($event)\"\n />\n }\n @case ('multi-select') {\n <ax-lookup-multi-select\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n [alternate]=\"alternate()\"\n (itemClick)=\"handleMultiToggle($event)\"\n (navigateOut)=\"onListNavigateOut($event)\"\n />\n }\n @case ('drop-down-tree') {\n <ax-lookup-drop-down-tree\n [dataSource]=\"treeDataSource()!\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [nodeTemplate]=\"$any(itemTemplate())\"\n (itemClick)=\"handleSinglePick($event)\"\n />\n }\n @case ('multi-select-tree') {\n <ax-lookup-multi-select-tree\n [dataSource]=\"treeDataSource()!\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [selectionBehavior]=\"treeSelectionBehavior()\"\n [nodeTemplate]=\"$any(itemTemplate())\"\n (selectionChange)=\"handleTreeSelectionChange($event)\"\n />\n }\n @case ('multi-column') {\n <ax-lookup-multi-column\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [columns]=\"columns()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n [alternate]=\"alternate()\"\n (itemClick)=\"handleSinglePick($event)\"\n />\n }\n }\n }\n <ng-content select=\"ax-footer\"></ng-content>\n </div>\n</ax-popover>\n", styles: ["@layer properties;@layer components{ax-lookup{display:block;width:100%}ax-lookup .ax-editor-container{justify-content:flex-start;gap:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-editor-container.ax-state-disabled{cursor:not-allowed;opacity:50%}ax-lookup .ax-editor-container.ax-state-disabled .ax-input,ax-lookup .ax-editor-container.ax-state-disabled .ax-editor{cursor:not-allowed}ax-lookup .ax-editor-container.ax-state-readonly{opacity:75%}ax-lookup .ax-lookup-trigger{cursor:pointer;-webkit-user-select:none;user-select:none}ax-lookup .ax-lookup-trigger-multiple{height:auto;min-height:calc(var(--spacing, .25rem) * 9);padding-block:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-lookup-value{position:relative;display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;align-items:center;overflow:hidden}ax-lookup .ax-lookup-select-input{cursor:pointer;caret-color:transparent;-webkit-user-select:none;user-select:none}ax-lookup .ax-lookup-selected-content{pointer-events:none;position:relative;z-index:0;display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;align-items:center;overflow:hidden}ax-lookup .ax-lookup-input-overlay{position:absolute;inset:calc(var(--spacing, .25rem) * 0);z-index:10;margin:calc(var(--spacing, .25rem) * 0)!important;height:100%;width:100%;border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0)!important;color:transparent;caret-color:transparent}ax-lookup .ax-lookup-chips{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-wrap:wrap;align-items:center;gap:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-lookup-trigger-search{margin:calc(var(--spacing, .25rem) * 0)!important;height:calc(var(--spacing, .25rem) * 7.5);width:auto!important;min-width:calc(var(--spacing, .25rem) * 16);flex:1;flex-basis:calc(var(--spacing, .25rem) * 16)}ax-lookup .ax-lookup-placeholder{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-lookup .ax-lookup-placeholder{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 50%,transparent)}}ax-lookup ax-chips ax-prefix,ax-lookup ax-chips ax-suffix{padding:calc(var(--spacing, .25rem) * 0)!important}ax-lookup ax-chips ax-suffix button{display:flex;cursor:pointer;align-items:center;border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0)}.ax-lookup-popup{box-sizing:border-box;display:flex;width:100%;flex-direction:column;overflow:hidden;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-lookup-popup:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-darkest-surface))}.ax-lookup-popup.ax-is-actionsheet{border-bottom-right-radius:0;border-bottom-left-radius:0;--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-lookup-popup.ax-is-actionsheet>ax-header.ax-solid{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-lookup-popup.ax-is-actionsheet>ax-header.ax-solid .ax-icon-check{color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-popup.ax-is-actionsheet>ax-header.ax-solid ax-title{font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-leading: calc(var(--spacing, .25rem) * 6);line-height:calc(var(--spacing, .25rem) * 6);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.ax-lookup-popup>ax-header:not(.ax-solid),.ax-lookup-popup>ax-footer{flex-shrink:0;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-lookup-popup>ax-header:not(.ax-solid){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.ax-lookup-popup>ax-footer{border-top-style:var(--tw-border-style);border-top-width:1px}.ax-lookup-viewport{width:100%}.ax-lookup-empty{display:flex;min-height:calc(var(--spacing, .25rem) * 12);width:100%;align-items:center;justify-content:center;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 3);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 60%,transparent)}}.ax-lookup-option-host{box-sizing:border-box;cursor:pointer;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;--tw-outline-style: none;outline-style:none}.ax-lookup-option-host.ax-state-alternate{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option-host.ax-state-alternate{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 5%,transparent)}}.ax-lookup-option-host:hover,.ax-lookup-option-host.ax-state-active{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option-host:hover,.ax-lookup-option-host.ax-state-active{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 10%,transparent)}}.ax-lookup-option-host.ax-state-alternate:hover,.ax-lookup-option-host.ax-state-alternate.ax-state-active{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option-host.ax-state-alternate:hover,.ax-lookup-option-host.ax-state-alternate.ax-state-active{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 15%,transparent)}}.ax-lookup-option-host.ax-state-selected,.ax-lookup-option-host.ax-state-selected:hover,.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate,.ax-lookup-option-host.ax-state-selected.ax-state-alternate:hover,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active{background-color:rgba(var(--ax-sys-color-primary-lightest-surface))}:is(.ax-lookup-option-host.ax-state-selected,.ax-lookup-option-host.ax-state-selected:hover,.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate,.ax-lookup-option-host.ax-state-selected.ax-state-alternate:hover,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){:is(.ax-lookup-option-host.ax-state-selected,.ax-lookup-option-host.ax-state-selected:hover,.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate,.ax-lookup-option-host.ax-state-selected.ax-state-alternate:hover,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 25%,transparent)}}.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active{background-color:rgba(var(--ax-sys-color-primary-lightest-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-lightest-surface)) 80%,transparent)}}:is(.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){:is(.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 40%,transparent)}}.ax-lookup-option-host.ax-state-disabled{cursor:not-allowed;opacity:50%}.ax-lookup-option-host.ax-lookup-option-host--check{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 3)}.ax-lookup-option-host .ax-lookup-checkbox{pointer-events:none;width:calc(var(--spacing, .25rem) * 4);height:calc(var(--spacing, .25rem) * 4);flex-shrink:0;accent-color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-option-host .ax-lookup-option-loading{width:100%;padding-inline:calc(var(--spacing, .25rem) * 3);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option-host .ax-lookup-option-loading{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 50%,transparent)}}.ax-lookup-option{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 3);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}.ax-lookup-option.ax-state-selected{color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-option .ax-lookup-option-text{min-width:calc(var(--spacing, .25rem) * 0);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ax-lookup-option .ax-lookup-option-check{flex-shrink:0;color:rgba(var(--ax-sys-color-primary-surface))}ax-lookup-multi-column,.ax-lookup-multi-column{display:block;min-height:calc(var(--spacing, .25rem) * 0);width:100%}:is(ax-lookup-multi-column,.ax-lookup-multi-column) .ax-lookup-multi-column-table,:is(ax-lookup-multi-column,.ax-lookup-multi-column) ax-data-table{height:100%;min-height:calc(var(--spacing, .25rem) * 0);border-style:var(--tw-border-style)!important;border-width:0px!important}:is(ax-lookup-multi-column,.ax-lookup-multi-column) tr.ax-state-selected{background-color:rgba(var(--ax-sys-color-primary-surface))}@supports (color: color-mix(in lab,red,red)){:is(ax-lookup-multi-column,.ax-lookup-multi-column) tr.ax-state-selected{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-surface)) 10%,transparent)}}:is(ax-lookup-multi-column,.ax-lookup-multi-column) tr.ax-state-disabled{pointer-events:none;opacity:50%}.ax-lookup-tree{max-height:calc(var(--spacing, .25rem) * 80);overflow:auto;padding:calc(var(--spacing, .25rem) * 2)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXChipsComponent, selector: "ax-chips", inputs: ["tabIndex", "color", "look", "text"], outputs: ["textChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["closeAll", "icon"] }, { kind: "component", type: i1$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "visualContextScope", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXLookupDropDownListComponent, selector: "ax-lookup-drop-down-list" }, { kind: "component", type: AXLookupMultiSelectComponent, selector: "ax-lookup-multi-select" }, { kind: "component", type: AXLookupDropDownTreeComponent, selector: "ax-lookup-drop-down-tree", inputs: ["dataSource", "valueField", "textField", "disabledField", "selectedValues", "nodeTemplate"], outputs: ["itemClick"] }, { kind: "component", type: AXLookupMultiSelectTreeComponent, selector: "ax-lookup-multi-select-tree", inputs: ["dataSource", "valueField", "textField", "disabledField", "selectedValues", "selectionBehavior", "nodeTemplate"], outputs: ["selectionChange"] }, { kind: "component", type: AXLookupMultiColumnComponent, selector: "ax-lookup-multi-column", inputs: ["dataSource", "valueField", "textField", "disabledField", "selectedValues", "itemHeight", "maxVisibleItems", "columns", "itemTemplate", "emptyTemplate", "loadingTemplate", "alternate"], outputs: ["itemClick"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1231
1772
|
}
|
|
1232
1773
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupComponent, decorators: [{
|
|
1233
1774
|
type: Component,
|
|
1234
1775
|
args: [{ selector: 'ax-lookup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1235
1776
|
NgTemplateOutlet,
|
|
1777
|
+
AsyncPipe,
|
|
1778
|
+
AXTranslatorPipe,
|
|
1779
|
+
AXChipsComponent,
|
|
1780
|
+
AXDecoratorModule,
|
|
1236
1781
|
AXPopoverComponent,
|
|
1237
1782
|
AXLookupDropDownListComponent,
|
|
1238
1783
|
AXLookupMultiSelectComponent,
|
|
1239
1784
|
AXLookupDropDownTreeComponent,
|
|
1240
1785
|
AXLookupMultiSelectTreeComponent,
|
|
1241
1786
|
AXLookupMultiColumnComponent,
|
|
1242
|
-
], providers: [{ provide: AXComponent, useExisting: AXLookupComponent }], template: "<div\n #origin\n class=\"ax-editor-container ax-{{ look() }} ax-default ax-lookup-trigger\"\n [class.ax-lookup-trigger-multiple]=\"isMultiple()\"\n [class.ax-state-disabled]=\"disabled()\"\n [class.ax-state-readonly]=\"readonly()\"\n (click)=\"onTriggerClick()\"\n (keydown.escape)=\"close()\"\n>\n <ng-content select=\"ax-prefix\"></ng-content>\n\n @if (isMultiple()) {\n <div class=\"ax-lookup-chips\">\n @for (item of selectedItems(); track $index) {\n <span class=\"ax-lookup-chip\">\n @if (selectedTemplate()) {\n <ng-container [ngTemplateOutlet]=\"selectedTemplate()!\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <span class=\"ax-lookup-chip-text\">{{ getItemText(item) }}</span>\n }\n <button\n type=\"button\"\n class=\"ax-lookup-chip-remove\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"removeChip($event, item)\"\n >\n <span class=\"ax-icon ax-icon-close\"></span>\n </button>\n </span>\n }\n @if (isEditableTrigger()) {\n <input\n #triggerSearchInput\n type=\"text\"\n class=\"ax-input ax-lookup-trigger-search\"\n [placeholder]=\"triggerSearchPlaceholder()\"\n [disabled]=\"disabled()\"\n [value]=\"searchText()\"\n (input)=\"onTriggerSearchInput($any($event.target).value)\"\n />\n } @else if (selectedItems().length === 0) {\n <span class=\"ax-lookup-placeholder\">{{ placeholder() }}</span>\n }\n </div>\n @if (selectedItems().length > 0) {\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"clearAll($event)\"\n >\n <span class=\"ax-icon ax-icon-close\"></span>\n </button>\n }\n } @else if (isEditableTrigger()) {\n <input\n #triggerSearchInput\n type=\"text\"\n class=\"ax-input\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [value]=\"searchText()\"\n (input)=\"onTriggerSearchInput($any($event.target).value)\"\n />\n } @else {\n @if (selectedTemplate() && selectedItems().length > 0) {\n <div class=\"ax-lookup-selected-content\">\n <ng-container\n [ngTemplateOutlet]=\"selectedTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedItems()[0] }\"\n />\n </div>\n } @else {\n <input\n type=\"text\"\n class=\"ax-input ax-lookup-select-input\"\n readonly\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [value]=\"displayText()\"\n />\n }\n }\n\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n >\n <span\n class=\"ax-icon\"\n [class.ax-icon-chevron-down]=\"!expanded()\"\n [class.ax-icon-chevron-up]=\"expanded()\"\n ></span>\n </button>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n\n<ax-popover\n [target]=\"origin\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n [width]=\"origin.offsetWidth + 'px'\"\n [disabled]=\"disabled() || readonly()\"\n (onClosed)=\"onPopoverClosed()\"\n>\n <div class=\"ax-lookup-popup\" (keydown.escape)=\"close()\">\n @switch (mode()) {\n @case ('drop-down-list') {\n <ax-lookup-drop-down-list\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n (itemClick)=\"handleSinglePick($event)\"\n />\n }\n @case ('multi-select') {\n <ax-lookup-multi-select\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n (itemClick)=\"handleMultiToggle($event)\"\n />\n }\n @case ('drop-down-tree') {\n <ax-lookup-drop-down-tree\n [dataSource]=\"treeDataSource()!\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [nodeTemplate]=\"$any(itemTemplate())\"\n (itemClick)=\"handleSinglePick($event)\"\n />\n }\n @case ('multi-select-tree') {\n <ax-lookup-multi-select-tree\n [dataSource]=\"treeDataSource()!\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [selectionBehavior]=\"treeSelectionBehavior()\"\n [nodeTemplate]=\"$any(itemTemplate())\"\n (selectionChange)=\"handleTreeSelectionChange($event)\"\n />\n }\n @case ('multi-column') {\n <ax-lookup-multi-column\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [columns]=\"columns()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n (itemClick)=\"handleSinglePick($event)\"\n />\n }\n }\n </div>\n</ax-popover>\n", styles: ["@layer properties;@layer components{ax-lookup{display:block;width:100%}ax-lookup .ax-editor-container{justify-content:flex-start;gap:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-editor-container.ax-state-disabled{cursor:not-allowed;opacity:50%}ax-lookup .ax-editor-container.ax-state-disabled .ax-input,ax-lookup .ax-editor-container.ax-state-disabled .ax-editor{cursor:not-allowed}ax-lookup .ax-editor-container.ax-state-readonly{opacity:75%}ax-lookup .ax-lookup-trigger{cursor:pointer;--tw-outline-style: none;outline-style:none;-webkit-user-select:none;user-select:none}ax-lookup .ax-lookup-trigger-multiple{height:auto;min-height:calc(var(--spacing, .25rem) * 9);padding-block:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-lookup-select-input{cursor:pointer;caret-color:transparent;-webkit-user-select:none;user-select:none}ax-lookup .ax-lookup-selected-content{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;align-items:center;overflow:hidden}ax-lookup .ax-lookup-chips{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-wrap:wrap;align-items:center;gap:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-lookup-trigger-search{margin:calc(var(--spacing, .25rem) * 0)!important;height:calc(var(--spacing, .25rem) * 7.5);width:auto!important;min-width:calc(var(--spacing, .25rem) * 16);flex:1;flex-basis:calc(var(--spacing, .25rem) * 16)}ax-lookup .ax-lookup-placeholder{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-lookup .ax-lookup-placeholder{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 50%,transparent)}}ax-lookup .ax-lookup-chip{display:inline-flex;max-width:100%;align-items:center;gap:calc(var(--spacing, .25rem) * 1);border-radius:var(--ax-sys-border-radius);background-color:rgba(var(--ax-sys-color-on-surface));padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:calc(var(--spacing, .25rem) * .5);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}@supports (color: color-mix(in lab,red,red)){ax-lookup .ax-lookup-chip{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 10%,transparent)}}ax-lookup .ax-lookup-chip .ax-lookup-chip-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-lookup .ax-lookup-chip .ax-lookup-chip-remove{display:flex;width:calc(var(--spacing, .25rem) * 4);height:calc(var(--spacing, .25rem) * 4);flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0)}ax-lookup .ax-lookup-chip .ax-lookup-chip-remove:hover{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-lookup .ax-lookup-chip .ax-lookup-chip-remove:hover{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 15%,transparent)}}ax-lookup .ax-lookup-chip .ax-lookup-chip-remove .ax-icon{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: 1;line-height:1}.ax-lookup-popup{box-sizing:border-box;display:flex;width:100%;flex-direction:column;overflow:hidden;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-lookup-popup:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-darkest-surface))}.ax-lookup-viewport{width:100%}.ax-lookup-empty{display:flex;min-height:calc(var(--spacing, .25rem) * 12);width:100%;align-items:center;justify-content:center;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 3);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 60%,transparent)}}.ax-lookup-option{box-sizing:border-box;display:flex;cursor:pointer;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-style:var(--tw-border-style);border-width:1px;border-color:transparent;padding-inline:calc(var(--spacing, .25rem) * 3);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface));--tw-outline-style: none;outline-style:none}.ax-lookup-option:hover{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option:hover{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 5%,transparent)}}.ax-lookup-option.ax-state-selected{background-color:rgba(var(--ax-sys-color-primary-lightest-surface));color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-option.ax-state-selected:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option.ax-state-selected:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 25%,transparent)}}.ax-lookup-option.ax-state-selected .ax-lookup-option-check{display:block;width:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 2);rotate:45deg;border-right-style:var(--tw-border-style);border-right-width:2px;border-bottom-style:var(--tw-border-style);border-bottom-width:2px;border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-option.ax-state-disabled{cursor:not-allowed;opacity:50%}.ax-lookup-option .ax-lookup-option-text{min-width:calc(var(--spacing, .25rem) * 0);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ax-lookup-option .ax-lookup-option-check{display:none;flex-shrink:0}.ax-lookup-option .ax-lookup-option-loading{width:100%;color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option .ax-lookup-option-loading{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 50%,transparent)}}.ax-lookup-option .ax-lookup-checkbox{pointer-events:none;width:calc(var(--spacing, .25rem) * 4);height:calc(var(--spacing, .25rem) * 4);flex-shrink:0;accent-color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-column-header{display:grid;width:100%;gap:calc(var(--spacing, .25rem) * 2);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-on-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:rgba(var(--ax-sys-color-on-surface));text-transform:uppercase}@supports (color: color-mix(in lab,red,red)){.ax-lookup-column-header{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 5%,transparent)}}@supports (color: color-mix(in lab,red,red)){.ax-lookup-column-header{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 70%,transparent)}}.ax-lookup-column-row{display:grid;gap:calc(var(--spacing, .25rem) * 2)}.ax-lookup-column-row .ax-lookup-column-cell{min-width:calc(var(--spacing, .25rem) * 0);align-self:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ax-lookup-tree{max-height:calc(var(--spacing, .25rem) * 80);overflow:auto;padding:calc(var(--spacing, .25rem) * 2)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-leading: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
1243
|
-
|
|
1787
|
+
], providers: [
|
|
1788
|
+
{ provide: AXComponent, useExisting: AXLookupComponent },
|
|
1789
|
+
{ provide: AXClearableComponent, useExisting: AXLookupComponent },
|
|
1790
|
+
{ provide: AXClosableComponent, useExisting: AXLookupComponent },
|
|
1791
|
+
], template: "<div\n #origin\n class=\"ax-editor-container ax-{{ look() }} ax-default\"\n [class.ax-lookup-trigger]=\"!isEditableTrigger()\"\n [class.ax-lookup-trigger-multiple]=\"isMultiple()\"\n [class.ax-state-disabled]=\"disabled()\"\n [class.ax-state-readonly]=\"readonly()\"\n (click)=\"onTriggerClick()\"\n>\n <ng-content select=\"ax-prefix\"></ng-content>\n\n @if (isMultiple()) {\n <div class=\"ax-lookup-chips\">\n @for (item of selectedItems(); track trackSelectedKey(item)) {\n <ax-chips class=\"ax-sm\" color=\"primary\" look=\"twotone\" [text]=\"selectedTemplate() ? '' : getItemText(item)\">\n @if (selectedTemplate()) {\n <ax-prefix>\n <ng-container\n [ngTemplateOutlet]=\"selectedTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </ax-prefix>\n }\n @if (!disabled() && !readonly()) {\n <ax-suffix>\n <button type=\"button\" tabindex=\"-1\" (click)=\"removeChip($event, item)\">\n <span class=\"ax-icon ax-icon-close\"></span>\n </button>\n </ax-suffix>\n }\n </ax-chips>\n }\n <input\n #triggerSearchInput\n type=\"text\"\n class=\"ax-input ax-lookup-trigger-search\"\n [class.ax-lookup-select-input]=\"!isEditableTrigger()\"\n [placeholder]=\"triggerSearchPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || !isEditableTrigger()\"\n [attr.inputmode]=\"isEditableTrigger() ? null : 'none'\"\n [value]=\"searchText()\"\n (input)=\"onTriggerSearchInput($any($event.target).value)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (beforeinput)=\"onBeforeInput($event)\"\n (focus)=\"emitOnFocus($event)\"\n (blur)=\"emitOnBlur($event)\"\n />\n </div>\n } @else {\n <div class=\"ax-lookup-value\">\n @if (showSelectedTemplate()) {\n <div class=\"ax-lookup-selected-content\" aria-hidden=\"true\">\n <ng-container\n [ngTemplateOutlet]=\"selectedTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedItems()[0] }\"\n />\n </div>\n }\n <input\n #triggerSearchInput\n type=\"text\"\n class=\"ax-input\"\n [class.ax-lookup-select-input]=\"!isEditableTrigger()\"\n [class.ax-lookup-input-overlay]=\"showSelectedTemplate()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || !isEditableTrigger()\"\n [attr.inputmode]=\"isEditableTrigger() ? null : 'none'\"\n [value]=\"searchText()\"\n (input)=\"onTriggerSearchInput($any($event.target).value)\"\n (keydown)=\"onTriggerKeydown($event)\"\n (beforeinput)=\"onBeforeInput($event)\"\n (focus)=\"emitOnFocus($event)\"\n (blur)=\"emitOnBlur($event)\"\n />\n </div>\n }\n\n @if (selectedValues().length > 0 && !disabled() && !readonly()) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n >\n <span\n class=\"ax-icon\"\n [class.ax-icon-chevron-down]=\"!expanded()\"\n [class.ax-icon-chevron-up]=\"expanded()\"\n ></span>\n </button>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n\n<ax-popover\n [target]=\"origin\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n [width]=\"isActionsheetStyle() ? '100%' : origin.offsetWidth + 'px'\"\n [adaptivityEnabled]=\"isActionsheetStyle()\"\n [disabled]=\"disabled() || readonly()\"\n (onClosed)=\"onPopoverClosed()\"\n>\n <div class=\"ax-lookup-popup\" [class.ax-is-actionsheet]=\"isActionsheetStyle()\" [class.ax-is-alternate]=\"alternate()\" (keydown.escape)=\"close()\">\n @if (isActionsheetStyle()) {\n <ax-header class=\"ax-solid\">\n <ax-title>{{ caption() || placeholder() || ('@acorex:selectbox.popover.title' | translate | async) }}</ax-title>\n <ax-close-button [icon]=\"isMultiple() ? 'ax-icon ax-icon-check' : 'ax-icon ax-icon-close'\"></ax-close-button>\n </ax-header>\n }\n <ng-content select=\"ax-header\"></ng-content>\n @if (expanded()) {\n @switch (mode()) {\n @case ('drop-down-list') {\n <ax-lookup-drop-down-list\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n [alternate]=\"alternate()\"\n (itemClick)=\"handleSinglePick($event)\"\n (navigateOut)=\"onListNavigateOut($event)\"\n />\n }\n @case ('multi-select') {\n <ax-lookup-multi-select\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n [alternate]=\"alternate()\"\n (itemClick)=\"handleMultiToggle($event)\"\n (navigateOut)=\"onListNavigateOut($event)\"\n />\n }\n @case ('drop-down-tree') {\n <ax-lookup-drop-down-tree\n [dataSource]=\"treeDataSource()!\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [nodeTemplate]=\"$any(itemTemplate())\"\n (itemClick)=\"handleSinglePick($event)\"\n />\n }\n @case ('multi-select-tree') {\n <ax-lookup-multi-select-tree\n [dataSource]=\"treeDataSource()!\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [selectionBehavior]=\"treeSelectionBehavior()\"\n [nodeTemplate]=\"$any(itemTemplate())\"\n (selectionChange)=\"handleTreeSelectionChange($event)\"\n />\n }\n @case ('multi-column') {\n <ax-lookup-multi-column\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [selectedValues]=\"selectedValues()\"\n [itemHeight]=\"itemHeight()\"\n [maxVisibleItems]=\"maxVisibleItems()\"\n [columns]=\"columns()\"\n [itemTemplate]=\"itemTemplate()\"\n [emptyTemplate]=\"emptyTemplate()\"\n [loadingTemplate]=\"loadingTemplate()\"\n [alternate]=\"alternate()\"\n (itemClick)=\"handleSinglePick($event)\"\n />\n }\n }\n }\n <ng-content select=\"ax-footer\"></ng-content>\n </div>\n</ax-popover>\n", styles: ["@layer properties;@layer components{ax-lookup{display:block;width:100%}ax-lookup .ax-editor-container{justify-content:flex-start;gap:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-editor-container.ax-state-disabled{cursor:not-allowed;opacity:50%}ax-lookup .ax-editor-container.ax-state-disabled .ax-input,ax-lookup .ax-editor-container.ax-state-disabled .ax-editor{cursor:not-allowed}ax-lookup .ax-editor-container.ax-state-readonly{opacity:75%}ax-lookup .ax-lookup-trigger{cursor:pointer;-webkit-user-select:none;user-select:none}ax-lookup .ax-lookup-trigger-multiple{height:auto;min-height:calc(var(--spacing, .25rem) * 9);padding-block:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-lookup-value{position:relative;display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;align-items:center;overflow:hidden}ax-lookup .ax-lookup-select-input{cursor:pointer;caret-color:transparent;-webkit-user-select:none;user-select:none}ax-lookup .ax-lookup-selected-content{pointer-events:none;position:relative;z-index:0;display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;align-items:center;overflow:hidden}ax-lookup .ax-lookup-input-overlay{position:absolute;inset:calc(var(--spacing, .25rem) * 0);z-index:10;margin:calc(var(--spacing, .25rem) * 0)!important;height:100%;width:100%;border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0)!important;color:transparent;caret-color:transparent}ax-lookup .ax-lookup-chips{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-wrap:wrap;align-items:center;gap:calc(var(--spacing, .25rem) * 1)}ax-lookup .ax-lookup-trigger-search{margin:calc(var(--spacing, .25rem) * 0)!important;height:calc(var(--spacing, .25rem) * 7.5);width:auto!important;min-width:calc(var(--spacing, .25rem) * 16);flex:1;flex-basis:calc(var(--spacing, .25rem) * 16)}ax-lookup .ax-lookup-placeholder{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){ax-lookup .ax-lookup-placeholder{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 50%,transparent)}}ax-lookup ax-chips ax-prefix,ax-lookup ax-chips ax-suffix{padding:calc(var(--spacing, .25rem) * 0)!important}ax-lookup ax-chips ax-suffix button{display:flex;cursor:pointer;align-items:center;border-style:var(--tw-border-style);border-width:0px;background-color:transparent;padding:calc(var(--spacing, .25rem) * 0)}.ax-lookup-popup{box-sizing:border-box;display:flex;width:100%;flex-direction:column;overflow:hidden;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-lookup-popup:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-darkest-surface))}.ax-lookup-popup.ax-is-actionsheet{border-bottom-right-radius:0;border-bottom-left-radius:0;--tw-shadow: 0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-lookup-popup.ax-is-actionsheet>ax-header.ax-solid{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-lookup-popup.ax-is-actionsheet>ax-header.ax-solid .ax-icon-check{color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-popup.ax-is-actionsheet>ax-header.ax-solid ax-title{font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-leading: calc(var(--spacing, .25rem) * 6);line-height:calc(var(--spacing, .25rem) * 6);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.ax-lookup-popup>ax-header:not(.ax-solid),.ax-lookup-popup>ax-footer{flex-shrink:0;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-lookup-popup>ax-header:not(.ax-solid){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.ax-lookup-popup>ax-footer{border-top-style:var(--tw-border-style);border-top-width:1px}.ax-lookup-viewport{width:100%}.ax-lookup-empty{display:flex;min-height:calc(var(--spacing, .25rem) * 12);width:100%;align-items:center;justify-content:center;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 3);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 60%,transparent)}}.ax-lookup-option-host{box-sizing:border-box;cursor:pointer;border-style:var(--tw-border-style);border-width:1px;border-color:transparent;--tw-outline-style: none;outline-style:none}.ax-lookup-option-host.ax-state-alternate{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option-host.ax-state-alternate{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 5%,transparent)}}.ax-lookup-option-host:hover,.ax-lookup-option-host.ax-state-active{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option-host:hover,.ax-lookup-option-host.ax-state-active{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 10%,transparent)}}.ax-lookup-option-host.ax-state-alternate:hover,.ax-lookup-option-host.ax-state-alternate.ax-state-active{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option-host.ax-state-alternate:hover,.ax-lookup-option-host.ax-state-alternate.ax-state-active{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 15%,transparent)}}.ax-lookup-option-host.ax-state-selected,.ax-lookup-option-host.ax-state-selected:hover,.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate,.ax-lookup-option-host.ax-state-selected.ax-state-alternate:hover,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active{background-color:rgba(var(--ax-sys-color-primary-lightest-surface))}:is(.ax-lookup-option-host.ax-state-selected,.ax-lookup-option-host.ax-state-selected:hover,.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate,.ax-lookup-option-host.ax-state-selected.ax-state-alternate:hover,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){:is(.ax-lookup-option-host.ax-state-selected,.ax-lookup-option-host.ax-state-selected:hover,.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate,.ax-lookup-option-host.ax-state-selected.ax-state-alternate:hover,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 25%,transparent)}}.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active{background-color:rgba(var(--ax-sys-color-primary-lightest-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-lightest-surface)) 80%,transparent)}}:is(.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){:is(.ax-lookup-option-host.ax-state-selected.ax-state-active,.ax-lookup-option-host.ax-state-selected.ax-state-alternate.ax-state-active):where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 40%,transparent)}}.ax-lookup-option-host.ax-state-disabled{cursor:not-allowed;opacity:50%}.ax-lookup-option-host.ax-lookup-option-host--check{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 3)}.ax-lookup-option-host .ax-lookup-checkbox{pointer-events:none;width:calc(var(--spacing, .25rem) * 4);height:calc(var(--spacing, .25rem) * 4);flex-shrink:0;accent-color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-option-host .ax-lookup-option-loading{width:100%;padding-inline:calc(var(--spacing, .25rem) * 3);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-lookup-option-host .ax-lookup-option-loading{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 50%,transparent)}}.ax-lookup-option{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);padding-inline:calc(var(--spacing, .25rem) * 3);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}.ax-lookup-option.ax-state-selected{color:rgba(var(--ax-sys-color-primary-surface))}.ax-lookup-option .ax-lookup-option-text{min-width:calc(var(--spacing, .25rem) * 0);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ax-lookup-option .ax-lookup-option-check{flex-shrink:0;color:rgba(var(--ax-sys-color-primary-surface))}ax-lookup-multi-column,.ax-lookup-multi-column{display:block;min-height:calc(var(--spacing, .25rem) * 0);width:100%}:is(ax-lookup-multi-column,.ax-lookup-multi-column) .ax-lookup-multi-column-table,:is(ax-lookup-multi-column,.ax-lookup-multi-column) ax-data-table{height:100%;min-height:calc(var(--spacing, .25rem) * 0);border-style:var(--tw-border-style)!important;border-width:0px!important}:is(ax-lookup-multi-column,.ax-lookup-multi-column) tr.ax-state-selected{background-color:rgba(var(--ax-sys-color-primary-surface))}@supports (color: color-mix(in lab,red,red)){:is(ax-lookup-multi-column,.ax-lookup-multi-column) tr.ax-state-selected{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-surface)) 10%,transparent)}}:is(ax-lookup-multi-column,.ax-lookup-multi-column) tr.ax-state-disabled{pointer-events:none;opacity:50%}.ax-lookup-tree{max-height:calc(var(--spacing, .25rem) * 80);overflow:auto;padding:calc(var(--spacing, .25rem) * 2)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
1792
|
+
}], ctorParameters: () => [], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], treeDataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeDataSource", required: false }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], disabledField: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledField", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], adaptivityEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "adaptivityEnabled", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], alternate: [{ type: i0.Input, args: [{ isSignal: true, alias: "alternate", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }, { type: i0.Output, args: ["lookChange"] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], maxVisibleItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisibleItems", required: false }] }], treeSelectionBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeSelectionBehavior", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], selectedTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedTemplate", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], loadingTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingTemplate", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], onValueChanged: [{ type: i0.Output, args: ["onValueChanged"] }], onSelectionChanged: [{ type: i0.Output, args: ["onSelectionChanged"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onItemClick: [{ type: i0.Output, args: ["onItemClick"] }], onItemSelected: [{ type: i0.Output, args: ["onItemSelected"] }], onOpened: [{ type: i0.Output, args: ["onOpened"] }], onClosed: [{ type: i0.Output, args: ["onClosed"] }], popoverRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPopoverComponent), { isSignal: true }] }], triggerSearchInput: [{ type: i0.ViewChild, args: ['triggerSearchInput', { isSignal: true }] }], listView: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXLookupListViewBase), { isSignal: true }] }] } });
|
|
1244
1793
|
|
|
1245
1794
|
class AXLookupModule {
|
|
1246
1795
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|