@acorex/components 22.1.0-next.2 → 22.1.0-next.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-components-accordion.mjs +2 -2
- package/fesm2022/acorex-components-accordion.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-check-box.mjs +2 -2
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-combo-box.mjs +114 -20
- package/fesm2022/acorex-components-combo-box.mjs.map +1 -1
- package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs → acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs} +6 -19
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation.mjs +7299 -9510
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +33 -18
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +2 -2
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +21 -5
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +2 -2
- package/fesm2022/acorex-components-label.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-loading-dialog.mjs +59 -42
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-lookup.mjs +754 -96
- package/fesm2022/acorex-components-lookup.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +4 -6
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +2 -2
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +22 -0
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +2 -2
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +2 -2
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +38 -11
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +2 -2
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +2 -2
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +2 -2
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +2 -2
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/lookup/README.md +29 -7
- package/package.json +4 -7
- package/types/acorex-components-combo-box.d.ts +38 -8
- package/types/acorex-components-conversation.d.ts +543 -1019
- package/types/acorex-components-data-table.d.ts +3 -2
- package/types/acorex-components-loading-dialog.d.ts +12 -4
- package/types/acorex-components-lookup.d.ts +181 -21
- package/types/acorex-components-popover.d.ts +6 -0
- package/types/acorex-components-select-box.d.ts +11 -0
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs.map +0 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +0 -168
- package/fesm2022/acorex-components-selection-list-2.mjs.map +0 -1
- package/selection-list-2/README.md +0 -3
- package/types/acorex-components-selection-list-2.d.ts +0 -52
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AXDataSource, AXListDataSource, NXValueComponent, convertArrayToDataSource, AXComponent, AXClearableComponent, AXClosableComponent, AXValuableComponent } from '@acorex/cdk/common';
|
|
2
2
|
import { AXChipsComponent } from '@acorex/components/chips';
|
|
3
3
|
import * as i1$1 from '@acorex/components/decorators';
|
|
4
4
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
5
5
|
import { AXPopoverComponent } from '@acorex/components/popover';
|
|
6
|
+
import { AXSearchBoxComponent } from '@acorex/components/search-box';
|
|
6
7
|
import { AXPlatform } from '@acorex/core/platform';
|
|
7
8
|
import { AXTranslatorPipe } from '@acorex/core/translation';
|
|
8
9
|
import { NgTemplateOutlet, AsyncPipe } from '@angular/common';
|
|
9
10
|
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 { input, output, signal, computed, viewChild, viewChildren, inject, NgZone, effect, untracked, afterRenderEffect, Directive, ViewEncapsulation, ChangeDetectionStrategy, Component, ElementRef, DestroyRef, model, linkedSignal, NgModule } from '@angular/core';
|
|
11
12
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
12
|
-
import * as
|
|
13
|
+
import * as i2 from '@acorex/cdk/list-navigation';
|
|
13
14
|
import { AXListNavigationDirective, AXListNavigationItemDirective, AXListNavigationModule } from '@acorex/cdk/list-navigation';
|
|
14
15
|
import * as i1 from '@angular/cdk/scrolling';
|
|
15
16
|
import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
|
|
@@ -17,6 +18,108 @@ import { AXTreeViewComponent } from '@acorex/components/tree-view';
|
|
|
17
18
|
import { AXDataTableComponent, AXDataTableTextColumnComponent } from '@acorex/components/data-table';
|
|
18
19
|
import { fromEvent, auditTime } from 'rxjs';
|
|
19
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Converts a drop-down-tree datasource (nested array or lazy callback) into an
|
|
23
|
+
* `AXDataSource` that a multi-column data table can load and expand.
|
|
24
|
+
*/
|
|
25
|
+
function createLookupTreeTableDataSource(source, options) {
|
|
26
|
+
const isCallback = typeof source === 'function';
|
|
27
|
+
return new AXDataSource({
|
|
28
|
+
pageSize: 8,
|
|
29
|
+
key: options.valueField,
|
|
30
|
+
load: (query) => loadTreeTableRows(source, options, query, isCallback),
|
|
31
|
+
byKey: (key) => findTreeTableItem(source, options.valueField, key),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
async function loadTreeTableRows(source, options, query, isCallback) {
|
|
35
|
+
const parentFilter = query.filter?.field === options.parentField ? query.filter : undefined;
|
|
36
|
+
const textFilter = query.filter && query.filter.field !== options.parentField ? query.filter : undefined;
|
|
37
|
+
if (parentFilter) {
|
|
38
|
+
const children = await loadChildren(source, options, parentFilter.value, isCallback);
|
|
39
|
+
return { items: children, total: children.length };
|
|
40
|
+
}
|
|
41
|
+
const roots = mapTreeNodes(await loadRoots(source, isCallback), options);
|
|
42
|
+
const items = textFilter ? filterTreeNodes(roots, options.textField, String(textFilter.value ?? '')) : roots;
|
|
43
|
+
return { items, total: items.length };
|
|
44
|
+
}
|
|
45
|
+
async function loadRoots(source, isCallback) {
|
|
46
|
+
if (!isCallback) {
|
|
47
|
+
return source ?? [];
|
|
48
|
+
}
|
|
49
|
+
return (await source()) ?? [];
|
|
50
|
+
}
|
|
51
|
+
async function loadChildren(source, options, parentId, isCallback) {
|
|
52
|
+
if (isCallback) {
|
|
53
|
+
const nodes = (await source(String(parentId))) ?? [];
|
|
54
|
+
return mapTreeNodes(nodes, options);
|
|
55
|
+
}
|
|
56
|
+
const parent = findTreeNode(source, options.valueField, parentId);
|
|
57
|
+
const children = Array.isArray(parent?.['children']) ? parent['children'] : [];
|
|
58
|
+
return mapTreeNodes(children, options);
|
|
59
|
+
}
|
|
60
|
+
function mapTreeNodes(nodes, options) {
|
|
61
|
+
return nodes.map((node) => mapTreeNode(node, options));
|
|
62
|
+
}
|
|
63
|
+
function mapTreeNode(node, options) {
|
|
64
|
+
const rawChildren = node['children'];
|
|
65
|
+
const children = Array.isArray(rawChildren) ? mapTreeNodes(rawChildren, options) : undefined;
|
|
66
|
+
const childrenCount = node['childrenCount'];
|
|
67
|
+
const hasChildren = (children?.length ?? 0) > 0 ||
|
|
68
|
+
(typeof childrenCount === 'number' && childrenCount > 0) ||
|
|
69
|
+
node['hasChild'] === true ||
|
|
70
|
+
node['hasChildren'] === true;
|
|
71
|
+
return {
|
|
72
|
+
...node,
|
|
73
|
+
[options.hasChildrenField]: hasChildren,
|
|
74
|
+
...(children && children.length > 0 ? { children } : {}),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function filterTreeNodes(nodes, textField, query) {
|
|
78
|
+
const needle = query.trim().toLowerCase();
|
|
79
|
+
if (!needle) {
|
|
80
|
+
return nodes;
|
|
81
|
+
}
|
|
82
|
+
const result = [];
|
|
83
|
+
for (const node of nodes) {
|
|
84
|
+
const rawChildren = node['children'];
|
|
85
|
+
const children = Array.isArray(rawChildren) ? filterTreeNodes(rawChildren, textField, needle) : undefined;
|
|
86
|
+
const selfMatch = String(node[textField] ?? '')
|
|
87
|
+
.toLowerCase()
|
|
88
|
+
.includes(needle);
|
|
89
|
+
if (selfMatch) {
|
|
90
|
+
result.push(node);
|
|
91
|
+
}
|
|
92
|
+
else if (children && children.length > 0) {
|
|
93
|
+
result.push({
|
|
94
|
+
...node,
|
|
95
|
+
children,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
function findTreeTableItem(source, valueField, key) {
|
|
102
|
+
if (typeof source === 'function' || !Array.isArray(source)) {
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
return findTreeNode(source, valueField, key) ?? undefined;
|
|
106
|
+
}
|
|
107
|
+
function findTreeNode(nodes, valueField, key) {
|
|
108
|
+
for (const node of nodes) {
|
|
109
|
+
if (String(node[valueField]) === String(key)) {
|
|
110
|
+
return node;
|
|
111
|
+
}
|
|
112
|
+
const children = node['children'];
|
|
113
|
+
if (Array.isArray(children)) {
|
|
114
|
+
const found = findTreeNode(children, valueField, key);
|
|
115
|
+
if (found) {
|
|
116
|
+
return found;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
|
|
20
123
|
/**
|
|
21
124
|
* Shared `AXDataSource` + CDK virtual scroll plumbing for the list-based lookup views
|
|
22
125
|
* (`ax-lookup-drop-down-list`, `ax-lookup-multi-select`).
|
|
@@ -95,8 +198,15 @@ class AXLookupListViewBase {
|
|
|
95
198
|
...(ngDevMode ? [{ debugName: "totalCount" }] : /* istanbul ignore next */ []));
|
|
96
199
|
this.isLoading = signal(true, /* @ts-ignore */
|
|
97
200
|
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
201
|
+
this.loadingPlaceholderIndexes = [0, 1, 2];
|
|
98
202
|
this.isEmpty = computed(() => this.totalCount() === 0 && !this.isLoading(), /* @ts-ignore */
|
|
99
203
|
...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
204
|
+
/**
|
|
205
|
+
* Overlay popovers often measure as 0px on first open, so CDK virtual scroll
|
|
206
|
+
* renders no rows. Paint these placeholders outside the viewport until data arrives.
|
|
207
|
+
*/
|
|
208
|
+
this.showLoadingPlaceholder = computed(() => this.isLoading() && this.totalCount() === 0, /* @ts-ignore */
|
|
209
|
+
...(ngDevMode ? [{ debugName: "showLoadingPlaceholder" }] : /* istanbul ignore next */ []));
|
|
100
210
|
/** Viewport height so the popup grows with the items up to `maxVisibleItems`. */
|
|
101
211
|
this.viewportHeight = computed(() => {
|
|
102
212
|
const count = this.totalCount() || (this.isLoading() ? 3 : 1);
|
|
@@ -130,18 +240,46 @@ class AXLookupListViewBase {
|
|
|
130
240
|
effect((onCleanup) => {
|
|
131
241
|
const source = this.dataSource();
|
|
132
242
|
const list = new AXListDataSource({ source });
|
|
243
|
+
const hasRows = source.cachedItems.some((item) => item != null);
|
|
133
244
|
untracked(() => {
|
|
134
245
|
this.totalCount.set(source.totalCount);
|
|
135
|
-
this.isLoading.set(
|
|
246
|
+
this.isLoading.set(hasRows ? source.isLoading : true);
|
|
136
247
|
this.listDataSource.set(list);
|
|
137
248
|
});
|
|
138
249
|
const loadingSub = source.onLoadingChanged.subscribe((value) => this.isLoading.set(value));
|
|
139
|
-
const changedSub = source.onChanged.subscribe((e) =>
|
|
250
|
+
const changedSub = source.onChanged.subscribe((e) => {
|
|
251
|
+
this.totalCount.set(e.totalCount);
|
|
252
|
+
this.#checkViewportSize();
|
|
253
|
+
});
|
|
254
|
+
// Overlay first-open often emits viewChange { start: 0, end: 0 }, which never
|
|
255
|
+
// pages. Kick page 0 when the source is cold; reuse real rows on remount.
|
|
256
|
+
queueMicrotask(() => {
|
|
257
|
+
if (source.cachedItems.some((item) => item != null)) {
|
|
258
|
+
this.totalCount.set(source.totalCount);
|
|
259
|
+
this.isLoading.set(false);
|
|
260
|
+
this.#checkViewportSize();
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
source.setPage(0);
|
|
264
|
+
});
|
|
140
265
|
onCleanup(() => {
|
|
141
266
|
loadingSub.unsubscribe();
|
|
142
267
|
changedSub.unsubscribe();
|
|
143
268
|
});
|
|
144
269
|
});
|
|
270
|
+
afterRenderEffect(() => {
|
|
271
|
+
this.viewportRef();
|
|
272
|
+
this.totalCount();
|
|
273
|
+
this.isLoading();
|
|
274
|
+
this.#checkViewportSize();
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
#checkViewportSize() {
|
|
278
|
+
const viewport = this.viewportRef();
|
|
279
|
+
if (!viewport) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
this.#ngZone.run(() => viewport.checkViewportSize());
|
|
145
283
|
}
|
|
146
284
|
/** Moves keyboard focus to the first rendered list option. */
|
|
147
285
|
focusFirst() {
|
|
@@ -166,6 +304,15 @@ class AXLookupListViewBase {
|
|
|
166
304
|
}
|
|
167
305
|
this.itemClick.emit({ item, value: this.getValue(item) });
|
|
168
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Commit on mousedown (not click) so a searchable trigger blur cannot destroy the
|
|
309
|
+
* list before the pick is applied.
|
|
310
|
+
*/
|
|
311
|
+
handleItemMouseDown(event, item) {
|
|
312
|
+
event.preventDefault();
|
|
313
|
+
event.stopPropagation();
|
|
314
|
+
this.handleItemClick(item);
|
|
315
|
+
}
|
|
169
316
|
handleItemKeypress(e, item) {
|
|
170
317
|
if (e.nativeEvent.key === 'Enter' || e.nativeEvent.code === 'Space') {
|
|
171
318
|
e.nativeEvent.stopPropagation();
|
|
@@ -232,7 +379,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
232
379
|
class AXLookupDropDownListComponent extends AXLookupListViewBase {
|
|
233
380
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupDropDownListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
234
381
|
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: `
|
|
235
|
-
@if (
|
|
382
|
+
@if (showLoadingPlaceholder()) {
|
|
383
|
+
<div class="ax-lookup-viewport" role="listbox">
|
|
384
|
+
@for (index of loadingPlaceholderIndexes; track index) {
|
|
385
|
+
<div class="ax-lookup-option-host ax-lookup-option" [style.height.px]="itemHeight()">
|
|
386
|
+
<ng-container [ngTemplateOutlet]="loadingRow" />
|
|
387
|
+
</div>
|
|
388
|
+
}
|
|
389
|
+
</div>
|
|
390
|
+
} @else if (isEmpty()) {
|
|
236
391
|
@if (emptyTemplate()) {
|
|
237
392
|
<ng-container [ngTemplateOutlet]="emptyTemplate()!" />
|
|
238
393
|
} @else {
|
|
@@ -253,18 +408,17 @@ class AXLookupDropDownListComponent extends AXLookupListViewBase {
|
|
|
253
408
|
<div
|
|
254
409
|
*cdkVirtualFor="let item of listDataSource(); let i = index; trackBy: trackByIndex"
|
|
255
410
|
role="option"
|
|
256
|
-
class="ax-lookup-option-host"
|
|
411
|
+
class="ax-lookup-option-host ax-lookup-option"
|
|
257
412
|
axListNavigationItem
|
|
258
413
|
#navItem="axListNavigationItem"
|
|
259
414
|
[style.height.px]="itemHeight()"
|
|
260
|
-
[class.ax-lookup-option]="!itemTemplate()"
|
|
261
415
|
[class.ax-state-alternate]="alternate() && i % 2 === 1"
|
|
262
416
|
[class.ax-state-selected]="item != null && isSelected(item)"
|
|
263
417
|
[class.ax-state-disabled]="item != null && isDisabled(item)"
|
|
264
418
|
[class.ax-state-active]="navItem.isActive()"
|
|
265
419
|
[attr.aria-selected]="item != null ? isSelected(item) : null"
|
|
266
420
|
(mouseenter)="activateNavItem(nav, navItem)"
|
|
267
|
-
(
|
|
421
|
+
(mousedown)="handleItemMouseDown($event, item)"
|
|
268
422
|
(onKeypress)="handleItemKeypress($event, item)"
|
|
269
423
|
>
|
|
270
424
|
@if (item != null) {
|
|
@@ -272,9 +426,10 @@ class AXLookupDropDownListComponent extends AXLookupListViewBase {
|
|
|
272
426
|
<ng-container [ngTemplateOutlet]="itemTemplate()!" [ngTemplateOutletContext]="{ $implicit: item }" />
|
|
273
427
|
} @else {
|
|
274
428
|
<span class="ax-lookup-option-text">{{ getText(item) }}</span>
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
429
|
+
}
|
|
430
|
+
<!-- Keep check outside itemTemplate so custom rows (platform widgets) still show selection. -->
|
|
431
|
+
@if (isSelected(item)) {
|
|
432
|
+
<span class="ax-lookup-option-check ax-icon ax-icon-check text-primary" aria-hidden="true"></span>
|
|
278
433
|
}
|
|
279
434
|
} @else {
|
|
280
435
|
<ng-container [ngTemplateOutlet]="loadingRow" />
|
|
@@ -290,7 +445,7 @@ class AXLookupDropDownListComponent extends AXLookupListViewBase {
|
|
|
290
445
|
<span class="ax-lookup-option-loading">{{ '@acorex:common.status.loading' | translate | async }}</span>
|
|
291
446
|
}
|
|
292
447
|
</ng-template>
|
|
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:
|
|
448
|
+
`, 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: i2.AXListNavigationDirective, selector: "[axListNavigation]", inputs: ["orientation"], outputs: ["onNavigationChanged", "onKeypress"], exportAs: ["axListNavigation"] }, { kind: "directive", type: i2.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 }); }
|
|
294
449
|
}
|
|
295
450
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupDropDownListComponent, decorators: [{
|
|
296
451
|
type: Component,
|
|
@@ -298,17 +453,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
298
453
|
selector: 'ax-lookup-drop-down-list',
|
|
299
454
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
300
455
|
encapsulation: ViewEncapsulation.None,
|
|
301
|
-
imports: [
|
|
302
|
-
ScrollingModule,
|
|
303
|
-
NgTemplateOutlet,
|
|
304
|
-
AXTranslatorPipe,
|
|
305
|
-
AsyncPipe,
|
|
306
|
-
AXDecoratorModule,
|
|
307
|
-
AXListNavigationModule,
|
|
308
|
-
],
|
|
456
|
+
imports: [ScrollingModule, NgTemplateOutlet, AXTranslatorPipe, AsyncPipe, AXListNavigationModule],
|
|
309
457
|
providers: [{ provide: AXLookupListViewBase, useExisting: AXLookupDropDownListComponent }],
|
|
310
458
|
template: `
|
|
311
|
-
@if (
|
|
459
|
+
@if (showLoadingPlaceholder()) {
|
|
460
|
+
<div class="ax-lookup-viewport" role="listbox">
|
|
461
|
+
@for (index of loadingPlaceholderIndexes; track index) {
|
|
462
|
+
<div class="ax-lookup-option-host ax-lookup-option" [style.height.px]="itemHeight()">
|
|
463
|
+
<ng-container [ngTemplateOutlet]="loadingRow" />
|
|
464
|
+
</div>
|
|
465
|
+
}
|
|
466
|
+
</div>
|
|
467
|
+
} @else if (isEmpty()) {
|
|
312
468
|
@if (emptyTemplate()) {
|
|
313
469
|
<ng-container [ngTemplateOutlet]="emptyTemplate()!" />
|
|
314
470
|
} @else {
|
|
@@ -329,18 +485,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
329
485
|
<div
|
|
330
486
|
*cdkVirtualFor="let item of listDataSource(); let i = index; trackBy: trackByIndex"
|
|
331
487
|
role="option"
|
|
332
|
-
class="ax-lookup-option-host"
|
|
488
|
+
class="ax-lookup-option-host ax-lookup-option"
|
|
333
489
|
axListNavigationItem
|
|
334
490
|
#navItem="axListNavigationItem"
|
|
335
491
|
[style.height.px]="itemHeight()"
|
|
336
|
-
[class.ax-lookup-option]="!itemTemplate()"
|
|
337
492
|
[class.ax-state-alternate]="alternate() && i % 2 === 1"
|
|
338
493
|
[class.ax-state-selected]="item != null && isSelected(item)"
|
|
339
494
|
[class.ax-state-disabled]="item != null && isDisabled(item)"
|
|
340
495
|
[class.ax-state-active]="navItem.isActive()"
|
|
341
496
|
[attr.aria-selected]="item != null ? isSelected(item) : null"
|
|
342
497
|
(mouseenter)="activateNavItem(nav, navItem)"
|
|
343
|
-
(
|
|
498
|
+
(mousedown)="handleItemMouseDown($event, item)"
|
|
344
499
|
(onKeypress)="handleItemKeypress($event, item)"
|
|
345
500
|
>
|
|
346
501
|
@if (item != null) {
|
|
@@ -348,9 +503,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
348
503
|
<ng-container [ngTemplateOutlet]="itemTemplate()!" [ngTemplateOutletContext]="{ $implicit: item }" />
|
|
349
504
|
} @else {
|
|
350
505
|
<span class="ax-lookup-option-text">{{ getText(item) }}</span>
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
506
|
+
}
|
|
507
|
+
<!-- Keep check outside itemTemplate so custom rows (platform widgets) still show selection. -->
|
|
508
|
+
@if (isSelected(item)) {
|
|
509
|
+
<span class="ax-lookup-option-check ax-icon ax-icon-check text-primary" aria-hidden="true"></span>
|
|
354
510
|
}
|
|
355
511
|
} @else {
|
|
356
512
|
<ng-container [ngTemplateOutlet]="loadingRow" />
|
|
@@ -469,6 +625,280 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
469
625
|
}]
|
|
470
626
|
}], 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 }] }], nodeTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeTemplate", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });
|
|
471
627
|
|
|
628
|
+
/**
|
|
629
|
+
* Internal mini component for the `multi-column-tree` lookup mode:
|
|
630
|
+
* a multi-column `ax-data-table` with a drop-down tree inside it.
|
|
631
|
+
* Rows expand/collapse via the data-table hierarchy (`parentField` / nested `children`).
|
|
632
|
+
*
|
|
633
|
+
* @category Components
|
|
634
|
+
*/
|
|
635
|
+
class AXLookupMultiColumnTreeComponent {
|
|
636
|
+
constructor() {
|
|
637
|
+
/**
|
|
638
|
+
* The datasource providing hierarchical rows (roots on load, children via `parentField`).
|
|
639
|
+
*/
|
|
640
|
+
this.dataSource = input.required(/* @ts-ignore */
|
|
641
|
+
...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
642
|
+
/**
|
|
643
|
+
* The item property used as the selection value (also the data-table row key).
|
|
644
|
+
*/
|
|
645
|
+
this.valueField = input('id', /* @ts-ignore */
|
|
646
|
+
...(ngDevMode ? [{ debugName: "valueField" }] : /* istanbul ignore next */ []));
|
|
647
|
+
/**
|
|
648
|
+
* The item property used as the display text. The matching column shows the expand control
|
|
649
|
+
* unless another column sets `expandHandler`.
|
|
650
|
+
*/
|
|
651
|
+
this.textField = input('text', /* @ts-ignore */
|
|
652
|
+
...(ngDevMode ? [{ debugName: "textField" }] : /* istanbul ignore next */ []));
|
|
653
|
+
/**
|
|
654
|
+
* The item property marking an item as disabled.
|
|
655
|
+
*/
|
|
656
|
+
this.disabledField = input('disabled', /* @ts-ignore */
|
|
657
|
+
...(ngDevMode ? [{ debugName: "disabledField" }] : /* istanbul ignore next */ []));
|
|
658
|
+
/**
|
|
659
|
+
* Field used by the data table to fetch children (`AXDataSource` filter on expand).
|
|
660
|
+
*/
|
|
661
|
+
this.parentField = input('parentId', /* @ts-ignore */
|
|
662
|
+
...(ngDevMode ? [{ debugName: "parentField" }] : /* istanbul ignore next */ []));
|
|
663
|
+
/**
|
|
664
|
+
* Field used by the data table to decide whether a row can expand.
|
|
665
|
+
*/
|
|
666
|
+
this.hasChildrenField = input('hasChild', /* @ts-ignore */
|
|
667
|
+
...(ngDevMode ? [{ debugName: "hasChildrenField" }] : /* istanbul ignore next */ []));
|
|
668
|
+
/**
|
|
669
|
+
* Currently selected values (always an array, even for single selection).
|
|
670
|
+
*/
|
|
671
|
+
this.selectedValues = input([], /* @ts-ignore */
|
|
672
|
+
...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
|
|
673
|
+
/**
|
|
674
|
+
* The fixed row height in pixels passed to the data table.
|
|
675
|
+
*/
|
|
676
|
+
this.itemHeight = input(40, /* @ts-ignore */
|
|
677
|
+
...(ngDevMode ? [{ debugName: "itemHeight" }] : /* istanbul ignore next */ []));
|
|
678
|
+
/**
|
|
679
|
+
* The maximum number of body rows visible before the table scrolls.
|
|
680
|
+
*/
|
|
681
|
+
this.maxVisibleItems = input(8, /* @ts-ignore */
|
|
682
|
+
...(ngDevMode ? [{ debugName: "maxVisibleItems" }] : /* istanbul ignore next */ []));
|
|
683
|
+
/**
|
|
684
|
+
* Column definitions rendered as `ax-text-column` instances.
|
|
685
|
+
*/
|
|
686
|
+
this.columns = input([], /* @ts-ignore */
|
|
687
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
688
|
+
/**
|
|
689
|
+
* Optional custom row content. Context: `$implicit` is the row item.
|
|
690
|
+
* When set, replaces the default multi-column cell layout.
|
|
691
|
+
*/
|
|
692
|
+
this.itemTemplate = input(undefined, /* @ts-ignore */
|
|
693
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
694
|
+
/**
|
|
695
|
+
* Custom template rendered when the datasource has no items.
|
|
696
|
+
*/
|
|
697
|
+
this.emptyTemplate = input(undefined, /* @ts-ignore */
|
|
698
|
+
...(ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []));
|
|
699
|
+
/**
|
|
700
|
+
* Custom template rendered while the table is loading.
|
|
701
|
+
*/
|
|
702
|
+
this.loadingTemplate = input(undefined, /* @ts-ignore */
|
|
703
|
+
...(ngDevMode ? [{ debugName: "loadingTemplate" }] : /* istanbul ignore next */ []));
|
|
704
|
+
/**
|
|
705
|
+
* When `true`, table rows use alternating background colors for easier scanning.
|
|
706
|
+
*/
|
|
707
|
+
this.alternate = input(false, /* @ts-ignore */
|
|
708
|
+
...(ngDevMode ? [{ debugName: "alternate" }] : /* istanbul ignore next */ []));
|
|
709
|
+
/**
|
|
710
|
+
* Emitted when the user picks a row (not when expanding/collapsing).
|
|
711
|
+
*/
|
|
712
|
+
this.itemClick = output();
|
|
713
|
+
/**
|
|
714
|
+
* Header (~40px) + up to `maxVisibleItems` body rows. Expanded children scroll inside.
|
|
715
|
+
*/
|
|
716
|
+
this.tableHeight = computed(() => 40 + this.maxVisibleItems() * this.itemHeight(), /* @ts-ignore */
|
|
717
|
+
...(ngDevMode ? [{ debugName: "tableHeight" }] : /* istanbul ignore next */ []));
|
|
718
|
+
this.loadingConfig = computed(() => ({
|
|
719
|
+
enabled: true,
|
|
720
|
+
animation: true,
|
|
721
|
+
loadingTemplate: this.loadingTemplate(),
|
|
722
|
+
}), /* @ts-ignore */
|
|
723
|
+
...(ngDevMode ? [{ debugName: "loadingConfig" }] : /* istanbul ignore next */ []));
|
|
724
|
+
this.resolveRowCssClass = (row) => {
|
|
725
|
+
const item = row;
|
|
726
|
+
if (!item) {
|
|
727
|
+
return '';
|
|
728
|
+
}
|
|
729
|
+
const classes = [];
|
|
730
|
+
if (this.isSelected(item)) {
|
|
731
|
+
classes.push('ax-state-selected');
|
|
732
|
+
}
|
|
733
|
+
if (this.isDisabled(item)) {
|
|
734
|
+
classes.push('ax-state-disabled');
|
|
735
|
+
}
|
|
736
|
+
return classes.join(' ');
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
/** Stable unique key for `@for` — avoids NG0955 when `field` is missing or duplicated. */
|
|
740
|
+
trackColumnKey(index, column) {
|
|
741
|
+
return `${column?.field ?? ''}::${index}`;
|
|
742
|
+
}
|
|
743
|
+
resolveColumnWidth(column) {
|
|
744
|
+
const width = column.width?.trim();
|
|
745
|
+
if (!width || width.includes('fr')) {
|
|
746
|
+
return 'auto';
|
|
747
|
+
}
|
|
748
|
+
return width;
|
|
749
|
+
}
|
|
750
|
+
isExpandColumn(index, column) {
|
|
751
|
+
if (column.expandHandler === true) {
|
|
752
|
+
return true;
|
|
753
|
+
}
|
|
754
|
+
if (this.columns().some((item) => item.expandHandler === true)) {
|
|
755
|
+
return false;
|
|
756
|
+
}
|
|
757
|
+
const textIndex = this.columns().findIndex((item) => item.field === this.textField());
|
|
758
|
+
return (textIndex === -1 ? 0 : textIndex) === index;
|
|
759
|
+
}
|
|
760
|
+
handleRowClick(event) {
|
|
761
|
+
this.handleItemClick(event.data);
|
|
762
|
+
}
|
|
763
|
+
handleItemClick(item) {
|
|
764
|
+
if (!item || this.isDisabled(item)) {
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
this.itemClick.emit({ item, value: this.getValue(item) });
|
|
768
|
+
}
|
|
769
|
+
handleItemMouseDown(event, item) {
|
|
770
|
+
event.preventDefault();
|
|
771
|
+
event.stopPropagation();
|
|
772
|
+
this.handleItemClick(item);
|
|
773
|
+
}
|
|
774
|
+
isSelected(item) {
|
|
775
|
+
const value = this.getValue(item);
|
|
776
|
+
return this.selectedValues().some((v) => v == value);
|
|
777
|
+
}
|
|
778
|
+
isDisabled(item) {
|
|
779
|
+
return Boolean(item?.[this.disabledField()]);
|
|
780
|
+
}
|
|
781
|
+
getValue(item) {
|
|
782
|
+
return item?.[this.valueField()];
|
|
783
|
+
}
|
|
784
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupMultiColumnTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
785
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXLookupMultiColumnTreeComponent, isStandalone: true, selector: "ax-lookup-multi-column-tree", 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 }, parentField: { classPropertyName: "parentField", publicName: "parentField", isSignal: true, isRequired: false, transformFunction: null }, hasChildrenField: { classPropertyName: "hasChildrenField", publicName: "hasChildrenField", 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 ax-lookup-multi-column-tree" }, ngImport: i0, template: `
|
|
786
|
+
<ax-data-table
|
|
787
|
+
class="ax-lookup-multi-column-table"
|
|
788
|
+
look="minimal"
|
|
789
|
+
[dataSource]="dataSource()"
|
|
790
|
+
[parentField]="parentField()"
|
|
791
|
+
[hasChildrenField]="hasChildrenField()"
|
|
792
|
+
[itemHeight]="itemHeight()"
|
|
793
|
+
[alternative]="alternate()"
|
|
794
|
+
[emptyTemplate]="emptyTemplate()"
|
|
795
|
+
[loading]="loadingConfig()"
|
|
796
|
+
[paging]="false"
|
|
797
|
+
[showHeader]="true"
|
|
798
|
+
[fixedHeader]="true"
|
|
799
|
+
[showFooter]="false"
|
|
800
|
+
[allowReordering]="false"
|
|
801
|
+
[rowTemplate]="itemTemplate() ? customRowTemplate : undefined"
|
|
802
|
+
[rowCssClass]="resolveRowCssClass"
|
|
803
|
+
(onRowClick)="handleRowClick($event)"
|
|
804
|
+
>
|
|
805
|
+
@for (column of columns(); track trackColumnKey($index, column)) {
|
|
806
|
+
<ax-text-column
|
|
807
|
+
[dataField]="column.field"
|
|
808
|
+
[caption]="column.title"
|
|
809
|
+
[width]="resolveColumnWidth(column)"
|
|
810
|
+
[expandHandler]="isExpandColumn($index, column)"
|
|
811
|
+
[allowSorting]="false"
|
|
812
|
+
[allowResizing]="false"
|
|
813
|
+
/>
|
|
814
|
+
}
|
|
815
|
+
</ax-data-table>
|
|
816
|
+
|
|
817
|
+
<ng-template #customRowTemplate let-ctx>
|
|
818
|
+
<tr
|
|
819
|
+
[class.ax-state-selected]="ctx.data != null && isSelected(ctx.data)"
|
|
820
|
+
[class.ax-state-disabled]="ctx.data != null && isDisabled(ctx.data)"
|
|
821
|
+
[style.height.px]="itemHeight()"
|
|
822
|
+
[style.max-height.px]="itemHeight()"
|
|
823
|
+
(mousedown)="handleItemMouseDown($event, ctx.data)"
|
|
824
|
+
>
|
|
825
|
+
<td [attr.colspan]="columns().length || 1">
|
|
826
|
+
@if (ctx.data != null && itemTemplate()) {
|
|
827
|
+
<ng-container
|
|
828
|
+
[ngTemplateOutlet]="itemTemplate()!"
|
|
829
|
+
[ngTemplateOutletContext]="{ $implicit: ctx.data }"
|
|
830
|
+
/>
|
|
831
|
+
}
|
|
832
|
+
</td>
|
|
833
|
+
</tr>
|
|
834
|
+
</ng-template>
|
|
835
|
+
`, 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 }); }
|
|
836
|
+
}
|
|
837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupMultiColumnTreeComponent, decorators: [{
|
|
838
|
+
type: Component,
|
|
839
|
+
args: [{
|
|
840
|
+
selector: 'ax-lookup-multi-column-tree',
|
|
841
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
842
|
+
encapsulation: ViewEncapsulation.None,
|
|
843
|
+
imports: [NgTemplateOutlet, AXDataTableComponent, AXDataTableTextColumnComponent],
|
|
844
|
+
host: {
|
|
845
|
+
class: 'ax-lookup-multi-column ax-lookup-multi-column-tree',
|
|
846
|
+
'[style.height.px]': 'tableHeight()',
|
|
847
|
+
},
|
|
848
|
+
template: `
|
|
849
|
+
<ax-data-table
|
|
850
|
+
class="ax-lookup-multi-column-table"
|
|
851
|
+
look="minimal"
|
|
852
|
+
[dataSource]="dataSource()"
|
|
853
|
+
[parentField]="parentField()"
|
|
854
|
+
[hasChildrenField]="hasChildrenField()"
|
|
855
|
+
[itemHeight]="itemHeight()"
|
|
856
|
+
[alternative]="alternate()"
|
|
857
|
+
[emptyTemplate]="emptyTemplate()"
|
|
858
|
+
[loading]="loadingConfig()"
|
|
859
|
+
[paging]="false"
|
|
860
|
+
[showHeader]="true"
|
|
861
|
+
[fixedHeader]="true"
|
|
862
|
+
[showFooter]="false"
|
|
863
|
+
[allowReordering]="false"
|
|
864
|
+
[rowTemplate]="itemTemplate() ? customRowTemplate : undefined"
|
|
865
|
+
[rowCssClass]="resolveRowCssClass"
|
|
866
|
+
(onRowClick)="handleRowClick($event)"
|
|
867
|
+
>
|
|
868
|
+
@for (column of columns(); track trackColumnKey($index, column)) {
|
|
869
|
+
<ax-text-column
|
|
870
|
+
[dataField]="column.field"
|
|
871
|
+
[caption]="column.title"
|
|
872
|
+
[width]="resolveColumnWidth(column)"
|
|
873
|
+
[expandHandler]="isExpandColumn($index, column)"
|
|
874
|
+
[allowSorting]="false"
|
|
875
|
+
[allowResizing]="false"
|
|
876
|
+
/>
|
|
877
|
+
}
|
|
878
|
+
</ax-data-table>
|
|
879
|
+
|
|
880
|
+
<ng-template #customRowTemplate let-ctx>
|
|
881
|
+
<tr
|
|
882
|
+
[class.ax-state-selected]="ctx.data != null && isSelected(ctx.data)"
|
|
883
|
+
[class.ax-state-disabled]="ctx.data != null && isDisabled(ctx.data)"
|
|
884
|
+
[style.height.px]="itemHeight()"
|
|
885
|
+
[style.max-height.px]="itemHeight()"
|
|
886
|
+
(mousedown)="handleItemMouseDown($event, ctx.data)"
|
|
887
|
+
>
|
|
888
|
+
<td [attr.colspan]="columns().length || 1">
|
|
889
|
+
@if (ctx.data != null && itemTemplate()) {
|
|
890
|
+
<ng-container
|
|
891
|
+
[ngTemplateOutlet]="itemTemplate()!"
|
|
892
|
+
[ngTemplateOutletContext]="{ $implicit: ctx.data }"
|
|
893
|
+
/>
|
|
894
|
+
}
|
|
895
|
+
</td>
|
|
896
|
+
</tr>
|
|
897
|
+
</ng-template>
|
|
898
|
+
`,
|
|
899
|
+
}]
|
|
900
|
+
}], 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 }] }], parentField: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentField", required: false }] }], hasChildrenField: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasChildrenField", 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"] }] } });
|
|
901
|
+
|
|
472
902
|
/**
|
|
473
903
|
* Internal mini component for the `multi-column` lookup mode:
|
|
474
904
|
* renders selectable rows in an `ax-data-table` grid and loads further
|
|
@@ -606,19 +1036,18 @@ class AXLookupMultiColumnComponent {
|
|
|
606
1036
|
const source = this.dataSource();
|
|
607
1037
|
this.tableDataSource.config.key = source.config.key || this.valueField();
|
|
608
1038
|
untracked(() => {
|
|
609
|
-
this.#
|
|
610
|
-
this.#totalCount.set(0);
|
|
611
|
-
this.#syncTablePageSize();
|
|
612
|
-
this.tableDataSource.refresh({ reset: true });
|
|
1039
|
+
this.#applyLoadedItems(source.cachedItems, source.totalCount);
|
|
613
1040
|
});
|
|
614
1041
|
const changedSub = source.onChanged.subscribe((event) => {
|
|
615
|
-
this.#
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
1042
|
+
this.#applyLoadedItems(event.cachedItems, event.totalCount);
|
|
1043
|
+
});
|
|
1044
|
+
// Fetch page 0 only when the source has never loaded. Reopen remounts this
|
|
1045
|
+
// view; setPage(0) is a no-op on a warm source and must not force a new API call.
|
|
1046
|
+
queueMicrotask(() => {
|
|
1047
|
+
if (!source.cachedItems.some((item) => item != null)) {
|
|
1048
|
+
source.setPage(0);
|
|
1049
|
+
}
|
|
619
1050
|
});
|
|
620
|
-
// Kick the first page; later pages come from scroll.
|
|
621
|
-
queueMicrotask(() => source.setPage(0));
|
|
622
1051
|
onCleanup(() => changedSub.unsubscribe());
|
|
623
1052
|
});
|
|
624
1053
|
effect((onCleanup) => {
|
|
@@ -653,6 +1082,12 @@ class AXLookupMultiColumnComponent {
|
|
|
653
1082
|
}
|
|
654
1083
|
return width;
|
|
655
1084
|
}
|
|
1085
|
+
#applyLoadedItems(cachedItems, totalCount) {
|
|
1086
|
+
this.#loadedItems = cachedItems.filter((item) => item != null);
|
|
1087
|
+
this.#totalCount.set(totalCount);
|
|
1088
|
+
this.#syncTablePageSize();
|
|
1089
|
+
this.tableDataSource.refresh({ reset: true });
|
|
1090
|
+
}
|
|
656
1091
|
#syncTablePageSize() {
|
|
657
1092
|
this.tableDataSource.config.pageSize = Math.max(this.#loadedItems.length, 1);
|
|
658
1093
|
}
|
|
@@ -665,6 +1100,11 @@ class AXLookupMultiColumnComponent {
|
|
|
665
1100
|
}
|
|
666
1101
|
this.itemClick.emit({ item, value: this.getValue(item) });
|
|
667
1102
|
}
|
|
1103
|
+
handleItemMouseDown(event, item) {
|
|
1104
|
+
event.preventDefault();
|
|
1105
|
+
event.stopPropagation();
|
|
1106
|
+
this.handleItemClick(item);
|
|
1107
|
+
}
|
|
668
1108
|
isSelected(item) {
|
|
669
1109
|
const value = this.getValue(item);
|
|
670
1110
|
return this.selectedValues().some((v) => v == value);
|
|
@@ -727,7 +1167,7 @@ class AXLookupMultiColumnComponent {
|
|
|
727
1167
|
[class.ax-state-disabled]="ctx.data != null && isDisabled(ctx.data)"
|
|
728
1168
|
[style.height.px]="itemHeight()"
|
|
729
1169
|
[style.max-height.px]="itemHeight()"
|
|
730
|
-
(
|
|
1170
|
+
(mousedown)="handleItemMouseDown($event, ctx.data)"
|
|
731
1171
|
>
|
|
732
1172
|
<td [attr.colspan]="columns().length || 1">
|
|
733
1173
|
@if (ctx.data != null && itemTemplate()) {
|
|
@@ -787,7 +1227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
787
1227
|
[class.ax-state-disabled]="ctx.data != null && isDisabled(ctx.data)"
|
|
788
1228
|
[style.height.px]="itemHeight()"
|
|
789
1229
|
[style.max-height.px]="itemHeight()"
|
|
790
|
-
(
|
|
1230
|
+
(mousedown)="handleItemMouseDown($event, ctx.data)"
|
|
791
1231
|
>
|
|
792
1232
|
<td [attr.colspan]="columns().length || 1">
|
|
793
1233
|
@if (ctx.data != null && itemTemplate()) {
|
|
@@ -912,7 +1352,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
912
1352
|
class AXLookupMultiSelectComponent extends AXLookupListViewBase {
|
|
913
1353
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupMultiSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
914
1354
|
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: `
|
|
915
|
-
@if (
|
|
1355
|
+
@if (showLoadingPlaceholder()) {
|
|
1356
|
+
<div class="ax-lookup-viewport" role="listbox" aria-multiselectable="true">
|
|
1357
|
+
@for (index of loadingPlaceholderIndexes; track index) {
|
|
1358
|
+
<div class="ax-lookup-option-host ax-lookup-option" [style.height.px]="itemHeight()">
|
|
1359
|
+
<ng-container [ngTemplateOutlet]="loadingRow" />
|
|
1360
|
+
</div>
|
|
1361
|
+
}
|
|
1362
|
+
</div>
|
|
1363
|
+
} @else if (isEmpty()) {
|
|
916
1364
|
@if (emptyTemplate()) {
|
|
917
1365
|
<ng-container [ngTemplateOutlet]="emptyTemplate()!" />
|
|
918
1366
|
} @else {
|
|
@@ -934,11 +1382,10 @@ class AXLookupMultiSelectComponent extends AXLookupListViewBase {
|
|
|
934
1382
|
<div
|
|
935
1383
|
*cdkVirtualFor="let item of listDataSource(); let i = index; trackBy: trackByIndex"
|
|
936
1384
|
role="option"
|
|
937
|
-
class="ax-lookup-option-host"
|
|
1385
|
+
class="ax-lookup-option-host ax-lookup-option"
|
|
938
1386
|
axListNavigationItem
|
|
939
1387
|
#navItem="axListNavigationItem"
|
|
940
1388
|
[style.height.px]="itemHeight()"
|
|
941
|
-
[class.ax-lookup-option]="!itemTemplate()"
|
|
942
1389
|
[class.ax-lookup-option-host--check]="!!itemTemplate()"
|
|
943
1390
|
[class.ax-state-alternate]="alternate() && i % 2 === 1"
|
|
944
1391
|
[class.ax-state-selected]="item != null && isSelected(item)"
|
|
@@ -946,7 +1393,7 @@ class AXLookupMultiSelectComponent extends AXLookupListViewBase {
|
|
|
946
1393
|
[class.ax-state-active]="navItem.isActive()"
|
|
947
1394
|
[attr.aria-selected]="item != null ? isSelected(item) : null"
|
|
948
1395
|
(mouseenter)="activateNavItem(nav, navItem)"
|
|
949
|
-
(
|
|
1396
|
+
(mousedown)="handleItemMouseDown($event, item)"
|
|
950
1397
|
(onKeypress)="handleItemKeypress($event, item)"
|
|
951
1398
|
>
|
|
952
1399
|
@if (item != null) {
|
|
@@ -976,7 +1423,7 @@ class AXLookupMultiSelectComponent extends AXLookupListViewBase {
|
|
|
976
1423
|
<span class="ax-lookup-option-loading">{{ '@acorex:common.status.loading' | translate | async }}</span>
|
|
977
1424
|
}
|
|
978
1425
|
</ng-template>
|
|
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:
|
|
1426
|
+
`, 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: i2.AXListNavigationDirective, selector: "[axListNavigation]", inputs: ["orientation"], outputs: ["onNavigationChanged", "onKeypress"], exportAs: ["axListNavigation"] }, { kind: "directive", type: i2.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 }); }
|
|
980
1427
|
}
|
|
981
1428
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupMultiSelectComponent, decorators: [{
|
|
982
1429
|
type: Component,
|
|
@@ -987,7 +1434,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
987
1434
|
imports: [ScrollingModule, NgTemplateOutlet, AXTranslatorPipe, AsyncPipe, AXListNavigationModule],
|
|
988
1435
|
providers: [{ provide: AXLookupListViewBase, useExisting: AXLookupMultiSelectComponent }],
|
|
989
1436
|
template: `
|
|
990
|
-
@if (
|
|
1437
|
+
@if (showLoadingPlaceholder()) {
|
|
1438
|
+
<div class="ax-lookup-viewport" role="listbox" aria-multiselectable="true">
|
|
1439
|
+
@for (index of loadingPlaceholderIndexes; track index) {
|
|
1440
|
+
<div class="ax-lookup-option-host ax-lookup-option" [style.height.px]="itemHeight()">
|
|
1441
|
+
<ng-container [ngTemplateOutlet]="loadingRow" />
|
|
1442
|
+
</div>
|
|
1443
|
+
}
|
|
1444
|
+
</div>
|
|
1445
|
+
} @else if (isEmpty()) {
|
|
991
1446
|
@if (emptyTemplate()) {
|
|
992
1447
|
<ng-container [ngTemplateOutlet]="emptyTemplate()!" />
|
|
993
1448
|
} @else {
|
|
@@ -1009,11 +1464,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1009
1464
|
<div
|
|
1010
1465
|
*cdkVirtualFor="let item of listDataSource(); let i = index; trackBy: trackByIndex"
|
|
1011
1466
|
role="option"
|
|
1012
|
-
class="ax-lookup-option-host"
|
|
1467
|
+
class="ax-lookup-option-host ax-lookup-option"
|
|
1013
1468
|
axListNavigationItem
|
|
1014
1469
|
#navItem="axListNavigationItem"
|
|
1015
1470
|
[style.height.px]="itemHeight()"
|
|
1016
|
-
[class.ax-lookup-option]="!itemTemplate()"
|
|
1017
1471
|
[class.ax-lookup-option-host--check]="!!itemTemplate()"
|
|
1018
1472
|
[class.ax-state-alternate]="alternate() && i % 2 === 1"
|
|
1019
1473
|
[class.ax-state-selected]="item != null && isSelected(item)"
|
|
@@ -1021,7 +1475,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1021
1475
|
[class.ax-state-active]="navItem.isActive()"
|
|
1022
1476
|
[attr.aria-selected]="item != null ? isSelected(item) : null"
|
|
1023
1477
|
(mouseenter)="activateNavItem(nav, navItem)"
|
|
1024
|
-
(
|
|
1478
|
+
(mousedown)="handleItemMouseDown($event, item)"
|
|
1025
1479
|
(onKeypress)="handleItemKeypress($event, item)"
|
|
1026
1480
|
>
|
|
1027
1481
|
@if (item != null) {
|
|
@@ -1056,14 +1510,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1056
1510
|
}] });
|
|
1057
1511
|
|
|
1058
1512
|
/**
|
|
1059
|
-
* An advanced drop-down (lookup) editor with
|
|
1513
|
+
* An advanced drop-down (lookup) editor with six modes, `AXDataSource` support, and virtual scrolling.
|
|
1060
1514
|
*
|
|
1061
1515
|
* Modes (each rendered by its own internal mini component):
|
|
1062
1516
|
* - `drop-down-list` — a predefined list of options for picking single values.
|
|
1063
1517
|
* - `multi-select` — a predefined list of options for multiple item selection (chips in the trigger).
|
|
1064
1518
|
* - `drop-down-tree` — a predefined list rendered in a tree-like structure for single item selection.
|
|
1065
1519
|
* - `multi-select-tree` — a tree-like structure for multiple item selection.
|
|
1066
|
-
* - `multi-column` — an `ax-data-table` grid; when searchable, the trigger input filters as you type
|
|
1520
|
+
* - `multi-column` — an `ax-data-table` grid; when searchable, the trigger input filters as you type
|
|
1521
|
+
* (on small screens the search field is inside the actionsheet).
|
|
1522
|
+
* - `multi-column-tree` — a multi-column `ax-data-table` with a drop-down tree inside it
|
|
1523
|
+
* (expandable hierarchical rows). Uses `treeDataSource` + `columns`, or a hierarchical `dataSource`.
|
|
1067
1524
|
*
|
|
1068
1525
|
* With `adaptivityEnabled` (default `true`), the list opens as a bottom actionsheet on small
|
|
1069
1526
|
* screens instead of an anchored dropdown — the same alternate presentation as `ax-select-box`.
|
|
@@ -1073,9 +1530,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1073
1530
|
*
|
|
1074
1531
|
* @category Components
|
|
1075
1532
|
*/
|
|
1076
|
-
class AXLookupComponent extends
|
|
1533
|
+
class AXLookupComponent extends NXValueComponent {
|
|
1077
1534
|
#platform;
|
|
1078
1535
|
#destroyRef;
|
|
1536
|
+
/** Reused so closing/reopening the popup does not create a new AXDataSource (which would miss cache). */
|
|
1537
|
+
#multiColumnTreeTableSource;
|
|
1538
|
+
#multiColumnTreeTableKey;
|
|
1539
|
+
#multiColumnTreeInput;
|
|
1540
|
+
/**
|
|
1541
|
+
* Tree callback results keyed by parent id. Survives popup remount so
|
|
1542
|
+
* drop-down-tree / multi-select-tree do not refetch on every open.
|
|
1543
|
+
*/
|
|
1544
|
+
#treeChildrenCache;
|
|
1079
1545
|
#itemsCache;
|
|
1080
1546
|
#isUserInteraction;
|
|
1081
1547
|
#lastValue;
|
|
@@ -1084,23 +1550,30 @@ class AXLookupComponent extends NXComponent {
|
|
|
1084
1550
|
#selectionInitialized;
|
|
1085
1551
|
#filterApplied;
|
|
1086
1552
|
#searchDebounce;
|
|
1553
|
+
#sheetSearchFocused;
|
|
1087
1554
|
constructor() {
|
|
1088
1555
|
super();
|
|
1089
1556
|
this.#platform = inject(AXPlatform);
|
|
1090
1557
|
this.#destroyRef = inject(DestroyRef);
|
|
1558
|
+
/**
|
|
1559
|
+
* The name of the form field, used by validation rules and `ax-form.validate(names)`.
|
|
1560
|
+
*/
|
|
1561
|
+
this.name = input('', /* @ts-ignore */
|
|
1562
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
1091
1563
|
/**
|
|
1092
1564
|
* The lookup rendering mode. Selects which mini component renders in the popup.
|
|
1093
1565
|
*/
|
|
1094
1566
|
this.mode = input('drop-down-list', /* @ts-ignore */
|
|
1095
1567
|
...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
1096
1568
|
/**
|
|
1097
|
-
* The items source for list-based modes (`drop-down-list`, `multi-select`, `multi-column`)
|
|
1569
|
+
* The items source for list-based modes (`drop-down-list`, `multi-select`, `multi-column`)
|
|
1570
|
+
* and for `multi-column-tree` when `treeDataSource` is not set.
|
|
1098
1571
|
* Accepts an `AXDataSource` (remote paging, `byKey`, server-side filter) or a plain array.
|
|
1099
1572
|
*/
|
|
1100
1573
|
this.dataSource = input(undefined, /* @ts-ignore */
|
|
1101
1574
|
...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
1102
1575
|
/**
|
|
1103
|
-
* The nodes source for tree modes (`drop-down-tree`, `multi-select-tree`):
|
|
1576
|
+
* The nodes source for tree modes (`drop-down-tree`, `multi-select-tree`, `multi-column-tree`):
|
|
1104
1577
|
* an array of nodes or a lazy children callback.
|
|
1105
1578
|
*/
|
|
1106
1579
|
this.treeDataSource = input(undefined, /* @ts-ignore */
|
|
@@ -1122,20 +1595,37 @@ class AXLookupComponent extends NXComponent {
|
|
|
1122
1595
|
this.disabledField = input('disabled', /* @ts-ignore */
|
|
1123
1596
|
...(ngDevMode ? [{ debugName: "disabledField" }] : /* istanbul ignore next */ []));
|
|
1124
1597
|
/**
|
|
1125
|
-
* Column definitions for the `multi-column`
|
|
1598
|
+
* Column definitions for the `multi-column` and `multi-column-tree` modes
|
|
1599
|
+
* (rendered as `ax-text-column` in `ax-data-table`).
|
|
1126
1600
|
*/
|
|
1127
1601
|
this.columns = input([], /* @ts-ignore */
|
|
1128
1602
|
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
1603
|
+
/**
|
|
1604
|
+
* Field used by `multi-column-tree` to fetch children when a row is expanded
|
|
1605
|
+
* (`AXDataSource` filter). Defaults to `parentId`. Nested `children` arrays are also supported.
|
|
1606
|
+
*/
|
|
1607
|
+
this.treeParentField = input('parentId', /* @ts-ignore */
|
|
1608
|
+
...(ngDevMode ? [{ debugName: "treeParentField" }] : /* istanbul ignore next */ []));
|
|
1609
|
+
/**
|
|
1610
|
+
* Field used by `multi-column-tree` to decide whether a row shows an expand control.
|
|
1611
|
+
* Defaults to `hasChild`. Nodes with `children` / `childrenCount` are mapped automatically
|
|
1612
|
+
* when using `treeDataSource`.
|
|
1613
|
+
*/
|
|
1614
|
+
this.hasChildrenField = input('hasChild', /* @ts-ignore */
|
|
1615
|
+
...(ngDevMode ? [{ debugName: "hasChildrenField" }] : /* istanbul ignore next */ []));
|
|
1129
1616
|
/**
|
|
1130
1617
|
* Whether the trigger accepts typing and filters the datasource (`true`),
|
|
1131
1618
|
* or is select-only with no writable input (`false`).
|
|
1132
|
-
* Applies to `drop-down-list`, `multi-select`, and `multi-column`.
|
|
1619
|
+
* Applies to `drop-down-list`, `multi-select`, `multi-column`, and `multi-column-tree`.
|
|
1620
|
+
* Tree-only modes (`drop-down-tree`, `multi-select-tree`) ignore this.
|
|
1621
|
+
* On small screens with `adaptivityEnabled`, search is typed in the actionsheet instead of the trigger.
|
|
1133
1622
|
*/
|
|
1134
1623
|
this.searchable = input(true, /* @ts-ignore */
|
|
1135
1624
|
...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
1136
1625
|
/**
|
|
1137
1626
|
* When `true` (default), the popup list uses the alternate actionsheet presentation on small
|
|
1138
|
-
* screens (`SM`).
|
|
1627
|
+
* screens (`SM`). Searchable list modes then show a search field inside the sheet. When `false`,
|
|
1628
|
+
* the list always opens as an anchored dropdown.
|
|
1139
1629
|
*/
|
|
1140
1630
|
this.adaptivityEnabled = input(true, /* @ts-ignore */
|
|
1141
1631
|
...(ngDevMode ? [{ debugName: "adaptivityEnabled" }] : /* istanbul ignore next */ []));
|
|
@@ -1146,13 +1636,14 @@ class AXLookupComponent extends NXComponent {
|
|
|
1146
1636
|
...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
|
|
1147
1637
|
/**
|
|
1148
1638
|
* When `true`, list rows use alternating background colors for easier scanning
|
|
1149
|
-
* (`drop-down-list`, `multi-select`, and `multi-column` modes).
|
|
1639
|
+
* (`drop-down-list`, `multi-select`, `multi-column`, and `multi-column-tree` modes).
|
|
1150
1640
|
*/
|
|
1151
1641
|
this.alternate = input(false, /* @ts-ignore */
|
|
1152
1642
|
...(ngDevMode ? [{ debugName: "alternate" }] : /* istanbul ignore next */ []));
|
|
1153
1643
|
/**
|
|
1154
1644
|
* Placeholder for the trigger search input when items are already selected
|
|
1155
|
-
* (mainly useful in `multi-select`)
|
|
1645
|
+
* (mainly useful in `multi-select`), and for the in-sheet search field on small screens.
|
|
1646
|
+
* Falls back to `placeholder` when the selection is empty on desktop.
|
|
1156
1647
|
*/
|
|
1157
1648
|
this.searchPlaceholder = input('Search...', /* @ts-ignore */
|
|
1158
1649
|
...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
@@ -1218,6 +1709,13 @@ class AXLookupComponent extends NXComponent {
|
|
|
1218
1709
|
*/
|
|
1219
1710
|
this.value = model(null, /* @ts-ignore */
|
|
1220
1711
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1712
|
+
/**
|
|
1713
|
+
* Full items that resolve the current `value` key(s) without calling datasource `byKey`.
|
|
1714
|
+
* Use when the parent already has the selected entity (e.g. edit forms). Seeds the internal
|
|
1715
|
+
* item cache; missing keys still fall through to `find` / `byKey`.
|
|
1716
|
+
*/
|
|
1717
|
+
this.valueItems = input([], /* @ts-ignore */
|
|
1718
|
+
...(ngDevMode ? [{ debugName: "valueItems" }] : /* istanbul ignore next */ []));
|
|
1221
1719
|
/**
|
|
1222
1720
|
* Emitted when the selected value changes.
|
|
1223
1721
|
*/
|
|
@@ -1260,19 +1758,51 @@ class AXLookupComponent extends NXComponent {
|
|
|
1260
1758
|
this.isMultiple = computed(() => this.mode() === 'multi-select' || this.mode() === 'multi-select-tree', /* @ts-ignore */
|
|
1261
1759
|
...(ngDevMode ? [{ debugName: "isMultiple" }] : /* istanbul ignore next */ []));
|
|
1262
1760
|
/** Whether the current mode renders a tree. */
|
|
1263
|
-
this.isTreeMode = computed(() =>
|
|
1761
|
+
this.isTreeMode = computed(() => {
|
|
1762
|
+
const mode = this.mode();
|
|
1763
|
+
return (mode === 'drop-down-tree' ||
|
|
1764
|
+
mode === 'multi-select-tree' ||
|
|
1765
|
+
(mode === 'multi-column-tree' && this.treeDataSource() != null));
|
|
1766
|
+
}, /* @ts-ignore */
|
|
1264
1767
|
...(ngDevMode ? [{ debugName: "isTreeMode" }] : /* istanbul ignore next */ []));
|
|
1265
|
-
/** Whether the
|
|
1266
|
-
this.
|
|
1267
|
-
if (!this.searchable() || this.readonly()) {
|
|
1268
|
-
return false;
|
|
1269
|
-
}
|
|
1768
|
+
/** Whether the current mode can filter a list/table as you type. */
|
|
1769
|
+
this.isListSearchMode = computed(() => {
|
|
1270
1770
|
const mode = this.mode();
|
|
1271
|
-
return mode === 'drop-down-list' || mode === 'multi-select' || mode === 'multi-column';
|
|
1771
|
+
return (mode === 'drop-down-list' || mode === 'multi-select' || mode === 'multi-column' || mode === 'multi-column-tree');
|
|
1272
1772
|
}, /* @ts-ignore */
|
|
1773
|
+
...(ngDevMode ? [{ debugName: "isListSearchMode" }] : /* istanbul ignore next */ []));
|
|
1774
|
+
/** Whether the trigger input is writable and filters as you type (desktop only). */
|
|
1775
|
+
this.isEditableTrigger = computed(() => this.searchable() && !this.readonly() && !this.isActionsheetStyle() && this.isListSearchMode(), /* @ts-ignore */
|
|
1273
1776
|
...(ngDevMode ? [{ debugName: "isEditableTrigger" }] : /* istanbul ignore next */ []));
|
|
1777
|
+
/** Whether search is typed in the actionsheet instead of the trigger. */
|
|
1778
|
+
this.isSheetSearchEnabled = computed(() => this.searchable() && !this.readonly() && this.isActionsheetStyle() && this.isListSearchMode(), /* @ts-ignore */
|
|
1779
|
+
...(ngDevMode ? [{ debugName: "isSheetSearchEnabled" }] : /* istanbul ignore next */ []));
|
|
1780
|
+
/** Query typed in the actionsheet search field (independent of the trigger display text). */
|
|
1781
|
+
this.sheetSearchText = signal('', /* @ts-ignore */
|
|
1782
|
+
...(ngDevMode ? [{ debugName: "sheetSearchText" }] : /* istanbul ignore next */ []));
|
|
1274
1783
|
/** The datasource for list-based modes; plain arrays are converted. */
|
|
1275
1784
|
this.resolvedDataSource = computed(() => {
|
|
1785
|
+
const tree = this.treeDataSource();
|
|
1786
|
+
if (this.mode() === 'multi-column-tree' && tree) {
|
|
1787
|
+
const key = `${this.valueField()}|${this.textField()}|${this.treeParentField()}|${this.hasChildrenField()}`;
|
|
1788
|
+
if (this.#multiColumnTreeTableSource &&
|
|
1789
|
+
this.#multiColumnTreeInput === tree &&
|
|
1790
|
+
this.#multiColumnTreeTableKey === key) {
|
|
1791
|
+
return this.#multiColumnTreeTableSource;
|
|
1792
|
+
}
|
|
1793
|
+
const cachedTree = Array.isArray(tree)
|
|
1794
|
+
? tree
|
|
1795
|
+
: (nodeId) => this.#loadCachedTreeNodes(tree, nodeId);
|
|
1796
|
+
this.#multiColumnTreeInput = tree;
|
|
1797
|
+
this.#multiColumnTreeTableKey = key;
|
|
1798
|
+
this.#multiColumnTreeTableSource = createLookupTreeTableDataSource(cachedTree, {
|
|
1799
|
+
valueField: this.valueField(),
|
|
1800
|
+
textField: this.textField(),
|
|
1801
|
+
parentField: this.treeParentField(),
|
|
1802
|
+
hasChildrenField: this.hasChildrenField(),
|
|
1803
|
+
});
|
|
1804
|
+
return this.#multiColumnTreeTableSource;
|
|
1805
|
+
}
|
|
1276
1806
|
const source = this.dataSource();
|
|
1277
1807
|
if (!source) {
|
|
1278
1808
|
return convertArrayToDataSource([], { key: this.valueField(), pageSize: 20 });
|
|
@@ -1282,6 +1812,22 @@ class AXLookupComponent extends NXComponent {
|
|
|
1282
1812
|
: source;
|
|
1283
1813
|
}, /* @ts-ignore */
|
|
1284
1814
|
...(ngDevMode ? [{ debugName: "resolvedDataSource" }] : /* istanbul ignore next */ []));
|
|
1815
|
+
/**
|
|
1816
|
+
* Tree callback results keyed by parent id. Survives popup remount so
|
|
1817
|
+
* drop-down-tree / multi-select-tree do not refetch on every open.
|
|
1818
|
+
*/
|
|
1819
|
+
this.#treeChildrenCache = new WeakMap();
|
|
1820
|
+
this.resolvedTreeDataSource = computed(() => {
|
|
1821
|
+
const source = this.treeDataSource();
|
|
1822
|
+
if (!source) {
|
|
1823
|
+
return [];
|
|
1824
|
+
}
|
|
1825
|
+
if (Array.isArray(source)) {
|
|
1826
|
+
return source;
|
|
1827
|
+
}
|
|
1828
|
+
return (nodeId) => this.#loadCachedTreeNodes(source, nodeId);
|
|
1829
|
+
}, /* @ts-ignore */
|
|
1830
|
+
...(ngDevMode ? [{ debugName: "resolvedTreeDataSource" }] : /* istanbul ignore next */ []));
|
|
1285
1831
|
/** The current selection normalized to an array. */
|
|
1286
1832
|
this.selectedValues = computed(() => {
|
|
1287
1833
|
const value = this.value();
|
|
@@ -1304,7 +1850,7 @@ class AXLookupComponent extends NXComponent {
|
|
|
1304
1850
|
* Text typed in the editable trigger input.
|
|
1305
1851
|
* Multi-select starts empty; single modes sync from the selected display text.
|
|
1306
1852
|
*/
|
|
1307
|
-
this.searchText = linkedSignal(() => (this.
|
|
1853
|
+
this.searchText = linkedSignal(() => (this.isMultiple() ? '' : this.displayText()), /* @ts-ignore */
|
|
1308
1854
|
...(ngDevMode ? [{ debugName: "searchText" }] : /* istanbul ignore next */ []));
|
|
1309
1855
|
/**
|
|
1310
1856
|
* Whether the trigger should render `selectedTemplate` instead of the plain input text.
|
|
@@ -1321,12 +1867,25 @@ class AXLookupComponent extends NXComponent {
|
|
|
1321
1867
|
return !this.expanded() && this.searchText() === this.displayText();
|
|
1322
1868
|
}, /* @ts-ignore */
|
|
1323
1869
|
...(ngDevMode ? [{ debugName: "showSelectedTemplate" }] : /* istanbul ignore next */ []));
|
|
1870
|
+
/** Placeholder for the editable trigger search input. */
|
|
1871
|
+
this.triggerSearchPlaceholder = computed(() => {
|
|
1872
|
+
if (this.isActionsheetStyle()) {
|
|
1873
|
+
return this.mode() === 'multi-select' && this.selectedItems().length > 0 ? '' : this.placeholder();
|
|
1874
|
+
}
|
|
1875
|
+
if (this.mode() === 'multi-select' && this.selectedItems().length > 0) {
|
|
1876
|
+
return this.searchPlaceholder();
|
|
1877
|
+
}
|
|
1878
|
+
return this.placeholder();
|
|
1879
|
+
}, /* @ts-ignore */
|
|
1880
|
+
...(ngDevMode ? [{ debugName: "triggerSearchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
1324
1881
|
this.popoverRef = viewChild(AXPopoverComponent, /* @ts-ignore */
|
|
1325
1882
|
...(ngDevMode ? [{ debugName: "popoverRef" }] : /* istanbul ignore next */ []));
|
|
1326
1883
|
this.triggerSearchInput = viewChild('triggerSearchInput', /* @ts-ignore */
|
|
1327
1884
|
...(ngDevMode ? [{ debugName: "triggerSearchInput" }] : /* istanbul ignore next */ []));
|
|
1328
1885
|
this.listView = viewChild(AXLookupListViewBase, /* @ts-ignore */
|
|
1329
1886
|
...(ngDevMode ? [{ debugName: "listView" }] : /* istanbul ignore next */ []));
|
|
1887
|
+
this.sheetSearchRef = viewChild('sheetSearch', /* @ts-ignore */
|
|
1888
|
+
...(ngDevMode ? [{ debugName: "sheetSearchRef" }] : /* istanbul ignore next */ []));
|
|
1330
1889
|
this.#itemsCache = new Map();
|
|
1331
1890
|
this.#isUserInteraction = false;
|
|
1332
1891
|
this.#lastValue = undefined;
|
|
@@ -1334,14 +1893,7 @@ class AXLookupComponent extends NXComponent {
|
|
|
1334
1893
|
this.#resolveRevision = 0;
|
|
1335
1894
|
this.#selectionInitialized = false;
|
|
1336
1895
|
this.#filterApplied = false;
|
|
1337
|
-
|
|
1338
|
-
this.triggerSearchPlaceholder = computed(() => {
|
|
1339
|
-
if (this.mode() === 'multi-select' && this.selectedItems().length > 0) {
|
|
1340
|
-
return this.searchPlaceholder();
|
|
1341
|
-
}
|
|
1342
|
-
return this.placeholder();
|
|
1343
|
-
}, /* @ts-ignore */
|
|
1344
|
-
...(ngDevMode ? [{ debugName: "triggerSearchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
1896
|
+
this.#sheetSearchFocused = false;
|
|
1345
1897
|
effect(() => this.#emitValueChanged(this.value()));
|
|
1346
1898
|
effect(() => this.#emitOpenedOrClosed(this.expanded()));
|
|
1347
1899
|
effect(() => {
|
|
@@ -1357,13 +1909,18 @@ class AXLookupComponent extends NXComponent {
|
|
|
1357
1909
|
});
|
|
1358
1910
|
// Seed the actionsheet flag once.
|
|
1359
1911
|
this.#syncActionsheetStyle();
|
|
1360
|
-
//
|
|
1912
|
+
// Seed the item cache from valueItems, then resolve selection.
|
|
1361
1913
|
effect(() => {
|
|
1914
|
+
const seeded = this.valueItems();
|
|
1362
1915
|
const values = this.selectedValues();
|
|
1916
|
+
this.valueField();
|
|
1363
1917
|
this.mode();
|
|
1364
1918
|
this.dataSource();
|
|
1365
1919
|
this.treeDataSource();
|
|
1366
|
-
untracked(() =>
|
|
1920
|
+
untracked(() => {
|
|
1921
|
+
this.#seedItemsCache(seeded);
|
|
1922
|
+
void this.#resolveSelectedItems(values);
|
|
1923
|
+
});
|
|
1367
1924
|
});
|
|
1368
1925
|
// Keep the popover in sync with the expanded state.
|
|
1369
1926
|
effect(() => {
|
|
@@ -1381,6 +1938,13 @@ class AXLookupComponent extends NXComponent {
|
|
|
1381
1938
|
}
|
|
1382
1939
|
});
|
|
1383
1940
|
});
|
|
1941
|
+
afterRenderEffect(() => {
|
|
1942
|
+
if (!this.expanded()) {
|
|
1943
|
+
this.#sheetSearchFocused = false;
|
|
1944
|
+
return;
|
|
1945
|
+
}
|
|
1946
|
+
this.#tryFocusSheetSearch();
|
|
1947
|
+
});
|
|
1384
1948
|
}
|
|
1385
1949
|
#syncActionsheetStyle() {
|
|
1386
1950
|
this.isActionsheetStyle.set(this.adaptivityEnabled() && this.#platform.is('SM'));
|
|
@@ -1410,7 +1974,7 @@ class AXLookupComponent extends NXComponent {
|
|
|
1410
1974
|
if (!this.expanded()) {
|
|
1411
1975
|
return;
|
|
1412
1976
|
}
|
|
1413
|
-
queueMicrotask(() => this
|
|
1977
|
+
queueMicrotask(() => this.#focusPopupSearchOrList());
|
|
1414
1978
|
}
|
|
1415
1979
|
/**
|
|
1416
1980
|
* Focuses the lookup trigger input.
|
|
@@ -1435,14 +1999,14 @@ class AXLookupComponent extends NXComponent {
|
|
|
1435
1999
|
if (e.key === 'ArrowDown') {
|
|
1436
2000
|
e.preventDefault();
|
|
1437
2001
|
this.expanded.set(true);
|
|
1438
|
-
queueMicrotask(() => this
|
|
2002
|
+
queueMicrotask(() => this.#focusPopupSearchOrList());
|
|
1439
2003
|
return;
|
|
1440
2004
|
}
|
|
1441
2005
|
if (!this.isEditableTrigger() && (e.key === 'Enter' || e.key === ' ')) {
|
|
1442
2006
|
e.preventDefault();
|
|
1443
2007
|
this.expanded.update((open) => !open);
|
|
1444
2008
|
if (this.expanded()) {
|
|
1445
|
-
queueMicrotask(() => this
|
|
2009
|
+
queueMicrotask(() => this.#focusPopupSearchOrList());
|
|
1446
2010
|
}
|
|
1447
2011
|
}
|
|
1448
2012
|
}
|
|
@@ -1453,9 +2017,13 @@ class AXLookupComponent extends NXComponent {
|
|
|
1453
2017
|
}
|
|
1454
2018
|
}
|
|
1455
2019
|
/**
|
|
1456
|
-
* Returns focus to the
|
|
2020
|
+
* Returns focus to the search field when list navigation requests it.
|
|
1457
2021
|
*/
|
|
1458
2022
|
onListNavigateOut(_reason) {
|
|
2023
|
+
if (this.isSheetSearchEnabled()) {
|
|
2024
|
+
this.sheetSearchRef()?.focus();
|
|
2025
|
+
return;
|
|
2026
|
+
}
|
|
1459
2027
|
this.triggerSearchInput()?.nativeElement.focus();
|
|
1460
2028
|
}
|
|
1461
2029
|
focusListFirst() {
|
|
@@ -1478,6 +2046,7 @@ class AXLookupComponent extends NXComponent {
|
|
|
1478
2046
|
onPopoverClosed() {
|
|
1479
2047
|
this.expanded.set(false);
|
|
1480
2048
|
this.searchText.set(this.isMultiple() ? '' : this.displayText());
|
|
2049
|
+
this.sheetSearchText.set('');
|
|
1481
2050
|
if (this.#filterApplied) {
|
|
1482
2051
|
this.#filterApplied = false;
|
|
1483
2052
|
const source = this.resolvedDataSource();
|
|
@@ -1517,17 +2086,23 @@ class AXLookupComponent extends NXComponent {
|
|
|
1517
2086
|
this.expanded.set(true);
|
|
1518
2087
|
this.#applyFilterDebounced(text);
|
|
1519
2088
|
}
|
|
2089
|
+
/** Filters the datasource from the actionsheet search field (reads the input so delayed ngModel cannot block typing). */
|
|
2090
|
+
onSheetSearchInput() {
|
|
2091
|
+
const query = this.#sheetSearchInputValue();
|
|
2092
|
+
this.sheetSearchText.set(query);
|
|
2093
|
+
this.#applyFilterDebounced(query);
|
|
2094
|
+
}
|
|
1520
2095
|
/**
|
|
1521
|
-
* Commits a single pick (drop-down-list, drop-down-tree, multi-column) and closes the popup.
|
|
2096
|
+
* Commits a single pick (drop-down-list, drop-down-tree, multi-column, multi-column-tree) and closes the popup.
|
|
1522
2097
|
*/
|
|
1523
2098
|
handleSinglePick(e) {
|
|
1524
2099
|
this.#emitItemClick(e.item);
|
|
1525
2100
|
this.#emitItemSelected(e.item);
|
|
1526
2101
|
this.#itemsCache.set(e.value, e.item);
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
2102
|
+
this.selectedItems.set([e.item]);
|
|
2103
|
+
this.searchText.set(this.getItemText(e.item));
|
|
2104
|
+
this.#isUserInteraction = true;
|
|
2105
|
+
this.value.set(e.value);
|
|
1531
2106
|
this.close();
|
|
1532
2107
|
}
|
|
1533
2108
|
/**
|
|
@@ -1545,7 +2120,10 @@ class AXLookupComponent extends NXComponent {
|
|
|
1545
2120
|
const next = exists ? current.filter((v) => !(v == e.value)) : [...current, e.value];
|
|
1546
2121
|
this.#isUserInteraction = true;
|
|
1547
2122
|
this.value.set(next);
|
|
1548
|
-
if (this.
|
|
2123
|
+
if (this.isSheetSearchEnabled() && this.sheetSearchText()) {
|
|
2124
|
+
this.#clearSheetSearch();
|
|
2125
|
+
}
|
|
2126
|
+
else if (this.isEditableTrigger() && this.searchText()) {
|
|
1549
2127
|
this.searchText.set('');
|
|
1550
2128
|
this.#applyFilterDebounced('');
|
|
1551
2129
|
}
|
|
@@ -1609,6 +2187,16 @@ class AXLookupComponent extends NXComponent {
|
|
|
1609
2187
|
this.#isUserInteraction = true;
|
|
1610
2188
|
this.value.set(this.selectedValues().filter((v) => !(v == value)));
|
|
1611
2189
|
}
|
|
2190
|
+
/**
|
|
2191
|
+
* Seeds the item cache with known items so matching `value` keys resolve without `byKey`.
|
|
2192
|
+
* Useful after an async parent-entity load when `valueItems` is not bound.
|
|
2193
|
+
*
|
|
2194
|
+
* @param items - Full items that include `valueField` (and ideally `textField`) properties.
|
|
2195
|
+
*/
|
|
2196
|
+
seedItems(items) {
|
|
2197
|
+
this.#seedItemsCache(items);
|
|
2198
|
+
void this.#resolveSelectedItems(this.selectedValues());
|
|
2199
|
+
}
|
|
1612
2200
|
/**
|
|
1613
2201
|
* Clears the whole selection.
|
|
1614
2202
|
* Sets `null` in single modes and `[]` in multi modes. Used by projected `ax-clear-button`.
|
|
@@ -1631,11 +2219,58 @@ class AXLookupComponent extends NXComponent {
|
|
|
1631
2219
|
}
|
|
1632
2220
|
this.#isUserInteraction = isUserInteraction;
|
|
1633
2221
|
this.value.set(next);
|
|
1634
|
-
if (this.
|
|
2222
|
+
if (this.isSheetSearchEnabled() && this.sheetSearchText()) {
|
|
2223
|
+
this.#clearSheetSearch();
|
|
2224
|
+
}
|
|
2225
|
+
else if (this.isEditableTrigger() && this.searchText()) {
|
|
1635
2226
|
this.searchText.set('');
|
|
1636
2227
|
this.#applyFilterDebounced('');
|
|
1637
2228
|
}
|
|
1638
2229
|
}
|
|
2230
|
+
#clearSheetSearch() {
|
|
2231
|
+
this.sheetSearchText.set('');
|
|
2232
|
+
this.sheetSearchRef()?.commitValue('', false);
|
|
2233
|
+
this.#applyFilterDebounced('');
|
|
2234
|
+
}
|
|
2235
|
+
#sheetSearchInputValue() {
|
|
2236
|
+
return this.sheetSearchRef()?.getHostElement()?.querySelector('input')?.value ?? '';
|
|
2237
|
+
}
|
|
2238
|
+
#tryFocusSheetSearch() {
|
|
2239
|
+
if (!this.isSheetSearchEnabled() || this.#sheetSearchFocused) {
|
|
2240
|
+
return;
|
|
2241
|
+
}
|
|
2242
|
+
const search = this.sheetSearchRef();
|
|
2243
|
+
if (!search) {
|
|
2244
|
+
return;
|
|
2245
|
+
}
|
|
2246
|
+
this.#sheetSearchFocused = true;
|
|
2247
|
+
search.focus();
|
|
2248
|
+
}
|
|
2249
|
+
#focusPopupSearchOrList() {
|
|
2250
|
+
if (this.isSheetSearchEnabled()) {
|
|
2251
|
+
this.#tryFocusSheetSearch();
|
|
2252
|
+
return;
|
|
2253
|
+
}
|
|
2254
|
+
this.focusListFirst();
|
|
2255
|
+
}
|
|
2256
|
+
#loadCachedTreeNodes(source, nodeId) {
|
|
2257
|
+
let byParent = this.#treeChildrenCache.get(source);
|
|
2258
|
+
if (!byParent) {
|
|
2259
|
+
byParent = new Map();
|
|
2260
|
+
this.#treeChildrenCache.set(source, byParent);
|
|
2261
|
+
}
|
|
2262
|
+
const key = nodeId ?? '';
|
|
2263
|
+
const cached = byParent.get(key);
|
|
2264
|
+
if (cached) {
|
|
2265
|
+
return cached;
|
|
2266
|
+
}
|
|
2267
|
+
const request = Promise.resolve(source(nodeId)).then((nodes) => nodes ?? [], (error) => {
|
|
2268
|
+
byParent.delete(key);
|
|
2269
|
+
throw error;
|
|
2270
|
+
});
|
|
2271
|
+
byParent.set(key, request);
|
|
2272
|
+
return request;
|
|
2273
|
+
}
|
|
1639
2274
|
#applyFilterDebounced(text) {
|
|
1640
2275
|
if (this.#searchDebounce) {
|
|
1641
2276
|
clearTimeout(this.#searchDebounce);
|
|
@@ -1672,6 +2307,20 @@ class AXLookupComponent extends NXComponent {
|
|
|
1672
2307
|
}
|
|
1673
2308
|
this.#selectionInitialized = true;
|
|
1674
2309
|
}
|
|
2310
|
+
#seedItemsCache(items) {
|
|
2311
|
+
if (!items?.length) {
|
|
2312
|
+
return;
|
|
2313
|
+
}
|
|
2314
|
+
const field = this.valueField();
|
|
2315
|
+
for (const item of items) {
|
|
2316
|
+
const key = item?.[field];
|
|
2317
|
+
if (key == null) {
|
|
2318
|
+
continue;
|
|
2319
|
+
}
|
|
2320
|
+
this.#itemsCache.set(key, item);
|
|
2321
|
+
this.#itemsCache.set(String(key), item);
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
1675
2324
|
#resolveItem(value) {
|
|
1676
2325
|
const cached = this.#itemsCache.get(value) ?? this.#itemsCache.get(String(value));
|
|
1677
2326
|
if (cached) {
|
|
@@ -1764,11 +2413,12 @@ class AXLookupComponent extends NXComponent {
|
|
|
1764
2413
|
expanded ? this.onOpened.emit(event) : this.onClosed.emit(event);
|
|
1765
2414
|
}
|
|
1766
2415
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
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: [
|
|
2416
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXLookupComponent, isStandalone: true, selector: "ax-lookup", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, 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 }, treeParentField: { classPropertyName: "treeParentField", publicName: "treeParentField", isSignal: true, isRequired: false, transformFunction: null }, hasChildrenField: { classPropertyName: "hasChildrenField", publicName: "hasChildrenField", 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 }, valueItems: { classPropertyName: "valueItems", publicName: "valueItems", 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
2417
|
{ provide: AXComponent, useExisting: AXLookupComponent },
|
|
1769
2418
|
{ provide: AXClearableComponent, useExisting: AXLookupComponent },
|
|
1770
2419
|
{ 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 }); }
|
|
2420
|
+
{ provide: AXValuableComponent, useExisting: AXLookupComponent },
|
|
2421
|
+
], 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 }, { propertyName: "sheetSearchRef", first: true, predicate: ["sheetSearch"], 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 @if (isSheetSearchEnabled()) {\n <div class=\"ax-lookup-sheet-search\">\n <ax-search-box\n #sheetSearch\n class=\"ax-sm\"\n look=\"fill\"\n [autoSearch]=\"false\"\n [delayTime]=\"0\"\n [placeholder]=\"searchPlaceholder()\"\n (onValueChanged)=\"onSheetSearchInput()\"\n (onKeyUp)=\"onSheetSearchInput()\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n </div>\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]=\"resolvedTreeDataSource()\"\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]=\"resolvedTreeDataSource()\"\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 @case ('multi-column-tree') {\n <ax-lookup-multi-column-tree\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [parentField]=\"treeParentField()\"\n [hasChildrenField]=\"hasChildrenField()\"\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<ng-content select=\"ax-validation-rule\"></ng-content>\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-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-lookup-sheet-search{flex-shrink:0;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2)}.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;display:flex;cursor:pointer;align-items:center;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-host.ax-state-alternate{background-color:rgba(var(--ax-sys-color-light-surface))}.ax-lookup-option-host.ax-state-alternate:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-surface))}.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-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{justify-content:space-between}.ax-lookup-option-host.ax-state-selected,.ax-lookup-option.ax-state-selected{color:rgba(var(--ax-sys-color-primary-surface))!important}.ax-lookup-option-host.ax-state-selected .ax-lookup-option-text,.ax-lookup-option-host.ax-state-selected .ax-lookup-option-check,.ax-lookup-option-host.ax-state-selected ax-icon{color:rgba(var(--ax-sys-color-primary-surface))!important}.ax-lookup-option-text{min-width:calc(var(--spacing, .25rem) * 0);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ax-lookup-option-check{margin-inline-start:auto;flex-shrink:0;color:rgba(var(--ax-sys-color-primary-surface))!important}ax-lookup-multi-column,ax-lookup-multi-column-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree{display:block;min-height:calc(var(--spacing, .25rem) * 0);width:100%}:is(ax-lookup-multi-column,ax-lookup-multi-column-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree) .ax-lookup-multi-column-table,:is(ax-lookup-multi-column,ax-lookup-multi-column-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree) 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-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree) 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-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree) 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-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree) 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.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { 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: AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { 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: "component", type: AXLookupMultiColumnTreeComponent, selector: "ax-lookup-multi-column-tree", inputs: ["dataSource", "valueField", "textField", "disabledField", "parentField", "hasChildrenField", "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 }); }
|
|
1772
2422
|
}
|
|
1773
2423
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupComponent, decorators: [{
|
|
1774
2424
|
type: Component,
|
|
@@ -1779,17 +2429,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1779
2429
|
AXChipsComponent,
|
|
1780
2430
|
AXDecoratorModule,
|
|
1781
2431
|
AXPopoverComponent,
|
|
2432
|
+
AXSearchBoxComponent,
|
|
1782
2433
|
AXLookupDropDownListComponent,
|
|
1783
2434
|
AXLookupMultiSelectComponent,
|
|
1784
2435
|
AXLookupDropDownTreeComponent,
|
|
1785
2436
|
AXLookupMultiSelectTreeComponent,
|
|
1786
2437
|
AXLookupMultiColumnComponent,
|
|
2438
|
+
AXLookupMultiColumnTreeComponent,
|
|
1787
2439
|
], providers: [
|
|
1788
2440
|
{ provide: AXComponent, useExisting: AXLookupComponent },
|
|
1789
2441
|
{ provide: AXClearableComponent, useExisting: AXLookupComponent },
|
|
1790
2442
|
{ 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 }] }] } });
|
|
2443
|
+
{ provide: AXValuableComponent, useExisting: AXLookupComponent },
|
|
2444
|
+
], 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 @if (isSheetSearchEnabled()) {\n <div class=\"ax-lookup-sheet-search\">\n <ax-search-box\n #sheetSearch\n class=\"ax-sm\"\n look=\"fill\"\n [autoSearch]=\"false\"\n [delayTime]=\"0\"\n [placeholder]=\"searchPlaceholder()\"\n (onValueChanged)=\"onSheetSearchInput()\"\n (onKeyUp)=\"onSheetSearchInput()\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n </div>\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]=\"resolvedTreeDataSource()\"\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]=\"resolvedTreeDataSource()\"\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 @case ('multi-column-tree') {\n <ax-lookup-multi-column-tree\n [dataSource]=\"resolvedDataSource()\"\n [valueField]=\"valueField()\"\n [textField]=\"textField()\"\n [disabledField]=\"disabledField()\"\n [parentField]=\"treeParentField()\"\n [hasChildrenField]=\"hasChildrenField()\"\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<ng-content select=\"ax-validation-rule\"></ng-content>\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-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-lookup-sheet-search{flex-shrink:0;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2)}.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;display:flex;cursor:pointer;align-items:center;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-host.ax-state-alternate{background-color:rgba(var(--ax-sys-color-light-surface))}.ax-lookup-option-host.ax-state-alternate:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-surface))}.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-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{justify-content:space-between}.ax-lookup-option-host.ax-state-selected,.ax-lookup-option.ax-state-selected{color:rgba(var(--ax-sys-color-primary-surface))!important}.ax-lookup-option-host.ax-state-selected .ax-lookup-option-text,.ax-lookup-option-host.ax-state-selected .ax-lookup-option-check,.ax-lookup-option-host.ax-state-selected ax-icon{color:rgba(var(--ax-sys-color-primary-surface))!important}.ax-lookup-option-text{min-width:calc(var(--spacing, .25rem) * 0);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ax-lookup-option-check{margin-inline-start:auto;flex-shrink:0;color:rgba(var(--ax-sys-color-primary-surface))!important}ax-lookup-multi-column,ax-lookup-multi-column-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree{display:block;min-height:calc(var(--spacing, .25rem) * 0);width:100%}:is(ax-lookup-multi-column,ax-lookup-multi-column-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree) .ax-lookup-multi-column-table,:is(ax-lookup-multi-column,ax-lookup-multi-column-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree) 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-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree) 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-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree) 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-tree,.ax-lookup-multi-column,.ax-lookup-multi-column-tree) 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"] }]
|
|
2445
|
+
}], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], 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 }] }], treeParentField: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeParentField", required: false }] }], hasChildrenField: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasChildrenField", 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"] }], valueItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueItems", required: false }] }], 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 }] }], sheetSearchRef: [{ type: i0.ViewChild, args: ['sheetSearch', { isSignal: true }] }] } });
|
|
1793
2446
|
|
|
1794
2447
|
class AXLookupModule {
|
|
1795
2448
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -1798,18 +2451,21 @@ class AXLookupModule {
|
|
|
1798
2451
|
AXLookupMultiSelectComponent,
|
|
1799
2452
|
AXLookupDropDownTreeComponent,
|
|
1800
2453
|
AXLookupMultiSelectTreeComponent,
|
|
1801
|
-
AXLookupMultiColumnComponent
|
|
2454
|
+
AXLookupMultiColumnComponent,
|
|
2455
|
+
AXLookupMultiColumnTreeComponent], exports: [AXLookupComponent,
|
|
1802
2456
|
AXLookupDropDownListComponent,
|
|
1803
2457
|
AXLookupMultiSelectComponent,
|
|
1804
2458
|
AXLookupDropDownTreeComponent,
|
|
1805
2459
|
AXLookupMultiSelectTreeComponent,
|
|
1806
|
-
AXLookupMultiColumnComponent
|
|
2460
|
+
AXLookupMultiColumnComponent,
|
|
2461
|
+
AXLookupMultiColumnTreeComponent] }); }
|
|
1807
2462
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupModule, imports: [AXLookupComponent,
|
|
1808
2463
|
AXLookupDropDownListComponent,
|
|
1809
2464
|
AXLookupMultiSelectComponent,
|
|
1810
2465
|
AXLookupDropDownTreeComponent,
|
|
1811
2466
|
AXLookupMultiSelectTreeComponent,
|
|
1812
|
-
AXLookupMultiColumnComponent
|
|
2467
|
+
AXLookupMultiColumnComponent,
|
|
2468
|
+
AXLookupMultiColumnTreeComponent] }); }
|
|
1813
2469
|
}
|
|
1814
2470
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLookupModule, decorators: [{
|
|
1815
2471
|
type: NgModule,
|
|
@@ -1821,6 +2477,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1821
2477
|
AXLookupDropDownTreeComponent,
|
|
1822
2478
|
AXLookupMultiSelectTreeComponent,
|
|
1823
2479
|
AXLookupMultiColumnComponent,
|
|
2480
|
+
AXLookupMultiColumnTreeComponent,
|
|
1824
2481
|
],
|
|
1825
2482
|
exports: [
|
|
1826
2483
|
AXLookupComponent,
|
|
@@ -1829,6 +2486,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1829
2486
|
AXLookupDropDownTreeComponent,
|
|
1830
2487
|
AXLookupMultiSelectTreeComponent,
|
|
1831
2488
|
AXLookupMultiColumnComponent,
|
|
2489
|
+
AXLookupMultiColumnTreeComponent,
|
|
1832
2490
|
],
|
|
1833
2491
|
}]
|
|
1834
2492
|
}] });
|
|
@@ -1837,5 +2495,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1837
2495
|
* Generated bundle index. Do not edit.
|
|
1838
2496
|
*/
|
|
1839
2497
|
|
|
1840
|
-
export { AXLookupComponent, AXLookupDropDownListComponent, AXLookupDropDownTreeComponent, AXLookupModule, AXLookupMultiColumnComponent, AXLookupMultiSelectComponent, AXLookupMultiSelectTreeComponent };
|
|
2498
|
+
export { AXLookupComponent, AXLookupDropDownListComponent, AXLookupDropDownTreeComponent, AXLookupModule, AXLookupMultiColumnComponent, AXLookupMultiColumnTreeComponent, AXLookupMultiSelectComponent, AXLookupMultiSelectTreeComponent };
|
|
1841
2499
|
//# sourceMappingURL=acorex-components-lookup.mjs.map
|