@acorex/components 20.2.0-next.19 → 20.2.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/autocomplete/index.d.ts +6 -2
- package/data-list/README.md +356 -0
- package/data-list/index.d.ts +102 -0
- package/fesm2022/acorex-components-autocomplete.mjs +19 -3
- package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +1 -1
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +6 -6
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-list.mjs +386 -0
- package/fesm2022/acorex-components-data-list.mjs.map +1 -0
- package/fesm2022/acorex-components-list.mjs +6 -14
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +1 -1
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-query-builder.mjs +1 -1
- package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-rest-api-generator.mjs +1 -1
- package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
- package/fesm2022/acorex-components-rrule.mjs +1 -1
- package/fesm2022/acorex-components-rrule.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +1 -1
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +62 -19
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +5 -2
- package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +7 -4
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +24 -12
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/list/index.d.ts +3 -9
- package/package.json +13 -9
- package/select-box/index.d.ts +11 -2
- package/tag-box/index.d.ts +2 -2
@@ -11,7 +11,7 @@ import * as i0 from '@angular/core';
|
|
11
11
|
import { input, inject, signal, linkedSignal, forwardRef, HostListener, ViewChild, ContentChild, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
12
12
|
import * as i1 from '@angular/forms';
|
13
13
|
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
14
|
-
import { isEqual, last, findLastIndex, nth } from 'lodash-es';
|
14
|
+
import { isEqual, last, findLastIndex, get, nth } from 'lodash-es';
|
15
15
|
import { classes } from 'polytype';
|
16
16
|
import { AXBadgeModule } from '@acorex/components/badge';
|
17
17
|
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
@@ -102,8 +102,10 @@ class AXSelectBoxComponent extends classes(MXDropdownBoxBaseComponent, MXSelecti
|
|
102
102
|
this.onChangedSubscription?.unsubscribe();
|
103
103
|
this.onChangedSubscription = this._listDataSource.onChanged
|
104
104
|
.pipe(this._unsubscriber.takeUntilDestroy)
|
105
|
-
.subscribe((
|
105
|
+
.subscribe(() => {
|
106
106
|
this.updateDropdownSize();
|
107
|
+
// Force refresh of selected items when data source changes
|
108
|
+
this.forceRefreshSelectedItems();
|
107
109
|
});
|
108
110
|
//
|
109
111
|
this.onLoadingChangedSubscription?.unsubscribe();
|
@@ -112,12 +114,34 @@ class AXSelectBoxComponent extends classes(MXDropdownBoxBaseComponent, MXSelecti
|
|
112
114
|
.subscribe((loading) => {
|
113
115
|
this.isLoading.set(loading);
|
114
116
|
});
|
117
|
+
// After setting data source, try to fetch item data if needed
|
118
|
+
setTimeout(() => this.fetchItemDataIfNeeded(), 0);
|
115
119
|
}
|
116
120
|
/** @ignore */
|
117
121
|
ngOnInit() {
|
118
122
|
super.ngOnInit();
|
119
123
|
//
|
120
124
|
this.registerValidation();
|
125
|
+
// Proactively fetch item data if we have a value but no corresponding item
|
126
|
+
this.fetchItemDataIfNeeded();
|
127
|
+
}
|
128
|
+
/**
|
129
|
+
* Proactively fetches item data if the component has a value but no corresponding item data.
|
130
|
+
* This prevents showing "loading..." when the component has a value.
|
131
|
+
*/
|
132
|
+
async fetchItemDataIfNeeded() {
|
133
|
+
if (this.value && this._listDataSource && !this.selectedItems?.length) {
|
134
|
+
try {
|
135
|
+
const item = await this.getItemByKey(this.value);
|
136
|
+
if (item) {
|
137
|
+
// Force refresh to update the display
|
138
|
+
this.forceRefreshSelectedItems();
|
139
|
+
}
|
140
|
+
}
|
141
|
+
catch (error) {
|
142
|
+
console.warn('Failed to fetch item data:', error);
|
143
|
+
}
|
144
|
+
}
|
121
145
|
}
|
122
146
|
/** @ignore */
|
123
147
|
ngOnDestroy() {
|
@@ -130,19 +154,17 @@ class AXSelectBoxComponent extends classes(MXDropdownBoxBaseComponent, MXSelecti
|
|
130
154
|
* @param {any} key
|
131
155
|
*/
|
132
156
|
getItemByKey(key) {
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
};
|
145
|
-
return check();
|
157
|
+
// Use the data source's byKey method if available
|
158
|
+
if (this._listDataSource && typeof this._listDataSource.byKey === 'function') {
|
159
|
+
return this._listDataSource.byKey(key);
|
160
|
+
}
|
161
|
+
// Fallback to find method if byKey is not available
|
162
|
+
if (this._listDataSource && typeof this._listDataSource.find === 'function') {
|
163
|
+
return this._listDataSource.find(key);
|
164
|
+
}
|
165
|
+
// If neither method is available, return null
|
166
|
+
console.warn('No byKey or find method available on data source');
|
167
|
+
return null;
|
146
168
|
}
|
147
169
|
/** @ignore */
|
148
170
|
_handleOnOpenedEvent(e) {
|
@@ -160,6 +182,8 @@ class AXSelectBoxComponent extends classes(MXDropdownBoxBaseComponent, MXSelecti
|
|
160
182
|
isUserInteraction: e.isUserInteraction,
|
161
183
|
});
|
162
184
|
this.updateDropdownSize();
|
185
|
+
// Force refresh of selected items when opening to show updated text
|
186
|
+
this.forceRefreshSelectedItems();
|
163
187
|
}
|
164
188
|
/** @ignore */
|
165
189
|
_handleOnClosedEvent(e) {
|
@@ -212,6 +236,20 @@ class AXSelectBoxComponent extends classes(MXDropdownBoxBaseComponent, MXSelecti
|
|
212
236
|
}
|
213
237
|
}
|
214
238
|
/** @ignore */
|
239
|
+
_handleItemClick(e) {
|
240
|
+
this.onItemClick.emit(e);
|
241
|
+
if (!this.multiple) {
|
242
|
+
this.close();
|
243
|
+
}
|
244
|
+
}
|
245
|
+
/** @ignore */
|
246
|
+
_handleItemSelected(e) {
|
247
|
+
this.onItemSelected.emit(e);
|
248
|
+
if (!this.multiple) {
|
249
|
+
this.close();
|
250
|
+
}
|
251
|
+
}
|
252
|
+
/** @ignore */
|
215
253
|
setDropdownSize(count = 0) {
|
216
254
|
if (this.dropdown.isActionsheetStyle) {
|
217
255
|
const height = this._dropdownHeight();
|
@@ -232,11 +270,14 @@ class AXSelectBoxComponent extends classes(MXDropdownBoxBaseComponent, MXSelecti
|
|
232
270
|
setTimeout(() => {
|
233
271
|
this.setDropdownSize(this._listDataSource.totalCount);
|
234
272
|
this.updateDropdownPosition();
|
273
|
+
this.list?.render();
|
235
274
|
});
|
236
275
|
}
|
237
276
|
internalValueChanged(value) {
|
238
277
|
super.internalValueChanged(value);
|
239
278
|
this.updateDropdownPosition();
|
279
|
+
// Try to fetch item data when value changes
|
280
|
+
setTimeout(() => this.fetchItemDataIfNeeded(), 0);
|
240
281
|
}
|
241
282
|
/** @ignore */
|
242
283
|
_handleKeydown(e) {
|
@@ -267,7 +308,7 @@ class AXSelectBoxComponent extends classes(MXDropdownBoxBaseComponent, MXSelecti
|
|
267
308
|
const _last = last(this.selectedItems);
|
268
309
|
let i = -1;
|
269
310
|
if (_last) {
|
270
|
-
i = findLastIndex(items, [this.valueField, _last
|
311
|
+
i = findLastIndex(items, [this.valueField, get(_last, this.valueField)]);
|
271
312
|
}
|
272
313
|
i += sign;
|
273
314
|
if (i < 0 || i >= items.length)
|
@@ -312,7 +353,7 @@ class AXSelectBoxComponent extends classes(MXDropdownBoxBaseComponent, MXSelecti
|
|
312
353
|
this.toggle();
|
313
354
|
}
|
314
355
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXSelectBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
315
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXSelectBoxComponent, isStandalone: true, selector: "ax-select-box", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: false, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: false, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: false, isRequired: false, transformFunction: null }, disabledField: { classPropertyName: "disabledField", publicName: "disabledField", isSignal: false, isRequired: false, transformFunction: null }, textTemplate: { classPropertyName: "textTemplate", publicName: "textTemplate", isSignal: false, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: false, isRequired: false, transformFunction: null }, isItemTruncated: { classPropertyName: "isItemTruncated", publicName: "isItemTruncated", isSignal: true, isRequired: false, transformFunction: null }, showItemTooltip: { classPropertyName: "showItemTooltip", publicName: "showItemTooltip", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: false, isRequired: false, transformFunction: null }, minRecordsForSearch: { classPropertyName: "minRecordsForSearch", publicName: "minRecordsForSearch", isSignal: false, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: false, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: false, isRequired: false, transformFunction: null }, selectedTemplate: { classPropertyName: "selectedTemplate", publicName: "selectedTemplate", isSignal: false, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: false, isRequired: false, transformFunction: null }, loadingTemplate: { classPropertyName: "loadingTemplate", publicName: "loadingTemplate", isSignal: false, isRequired: false, transformFunction: null }, dropdownWidth: { classPropertyName: "dropdownWidth", publicName: "dropdownWidth", isSignal: true, isRequired: false, transformFunction: null }, searchBoxAutoFocus: { classPropertyName: "searchBoxAutoFocus", publicName: "searchBoxAutoFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", readonlyChange: "readonlyChange", disabledChange: "disabledChange", onOpened: "onOpened", onClosed: "onClosed" }, host: { attributes: { "ngSkipHydration": "true" }, listeners: { "keydown": "_handleKeydown($event)", "click": "hostClickListener()" } }, providers: [
|
356
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXSelectBoxComponent, isStandalone: true, selector: "ax-select-box", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: false, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: false, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: false, isRequired: false, transformFunction: null }, disabledField: { classPropertyName: "disabledField", publicName: "disabledField", isSignal: false, isRequired: false, transformFunction: null }, textTemplate: { classPropertyName: "textTemplate", publicName: "textTemplate", isSignal: false, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: false, isRequired: false, transformFunction: null }, isItemTruncated: { classPropertyName: "isItemTruncated", publicName: "isItemTruncated", isSignal: true, isRequired: false, transformFunction: null }, showItemTooltip: { classPropertyName: "showItemTooltip", publicName: "showItemTooltip", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: false, isRequired: false, transformFunction: null }, minRecordsForSearch: { classPropertyName: "minRecordsForSearch", publicName: "minRecordsForSearch", isSignal: false, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: false, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: false, isRequired: false, transformFunction: null }, selectedTemplate: { classPropertyName: "selectedTemplate", publicName: "selectedTemplate", isSignal: false, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: false, isRequired: false, transformFunction: null }, loadingTemplate: { classPropertyName: "loadingTemplate", publicName: "loadingTemplate", isSignal: false, isRequired: false, transformFunction: null }, dropdownWidth: { classPropertyName: "dropdownWidth", publicName: "dropdownWidth", isSignal: true, isRequired: false, transformFunction: null }, searchBoxAutoFocus: { classPropertyName: "searchBoxAutoFocus", publicName: "searchBoxAutoFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", readonlyChange: "readonlyChange", disabledChange: "disabledChange", onOpened: "onOpened", onClosed: "onClosed", onItemSelected: "onItemSelected", onItemClick: "onItemClick" }, host: { attributes: { "ngSkipHydration": "true" }, listeners: { "keydown": "_handleKeydown($event)", "click": "hostClickListener()" } }, providers: [
|
316
357
|
{ provide: AXComponent, useExisting: AXSelectBoxComponent },
|
317
358
|
{ provide: AXFocusableComponent, useExisting: AXSelectBoxComponent },
|
318
359
|
{ provide: AXValuableComponent, useExisting: AXSelectBoxComponent },
|
@@ -329,7 +370,7 @@ class AXSelectBoxComponent extends classes(MXDropdownBoxBaseComponent, MXSelecti
|
|
329
370
|
useClass: MXSelectionBridgeService,
|
330
371
|
},
|
331
372
|
AXUnsubscriber,
|
332
|
-
], queries: [{ propertyName: "searchBox", first: true, predicate: AXSearchBoxComponent, descendants: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: ["panel"], descendants: true }, { propertyName: "list", first: true, predicate: AXListComponent, descendants: true }, { propertyName: "dropdown", first: true, predicate: AXDropdownBoxComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ax-dropdown-box\n [class.ax-state-multiple]=\"multiple\"\n (onOpened)=\"_handleOnOpenedEvent($event)\"\n (onClosed)=\"_handleOnClosedEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n [disabled]=\"disabled\"\n [look]=\"look\"\n [popoverWidth]=\"dropdownWidth()\"\n>\n <ng-container input>\n <ng-content select=\"ax-prefix\"> </ng-content>\n <div\n class=\"ax-editor ax-chips-container ax-content ax-input\"\n [class.ax-state-multiple]=\"multiple\"\n [tabindex]=\"tabIndex\"\n >\n @if (selectedItems.length === 0) {\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\n {{ placeholder }}\n </div>\n }\n @for (item of selectedItems; track $index) {\n @if (selectedTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"selectedTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { data: item } }\"\n ></ng-template>\n } @else {\n <div class=\"ax-chips\">\n {{ getDisplayText(item) }}\n @if (!disabled && !readonly && multiple) {\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\n }\n </div>\n }\n }\n </div>\n @if (selectedItems?.length && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n <button type=\"button\" [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-editor-button\">\n @if (isLoading()) {\n <ax-loading></ax-loading>\n } @else {\n <span\n class=\"ax-icon\"\n [ngClass]=\"{\n 'ax-icon-chevron-down': !isOpen,\n 'ax-icon-chevron-up': isOpen,\n }\"\n ></span>\n }\n </button>\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-template #search>\n <ng-content select=\"ax-search-box\"> </ng-content>\n </ng-template>\n </ng-container>\n <ng-container panel>\n <div #panel class=\"ax-select-box-panel\" [style.min-width]=\"_dropdownWidth()\">\n @if (dropdown.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]=\"multiple ? 'ax-icon ax-icon-check' : 'ax-icon ax-icon-close'\"></ax-close-button>\n </ax-header>\n }\n @if (searchBox && (!minRecordsForSearch || _listDataSource.totalCount >= minRecordsForSearch || searchValue())) {\n <div class=\"ax-search-container\">\n <ng-template [ngTemplateOutlet]=\"search\"></ng-template>\n </div>\n }\n @if (renderList()) {\n <ax-list\n [readonly]=\"readonly\"\n [dataSource]=\"_listDataSource\"\n [multiple]=\"multiple\"\n [style.height]=\"_dropdownHeight()\"\n [valueField]=\"valueField\"\n [textField]=\"textField\"\n [textTemplate]=\"textTemplate\"\n [emptyTemplate]=\"emptyTemplate ?? empty\"\n [itemTemplate]=\"itemTemplate\"\n [loadingTemplate]=\"loadingTemplate\"\n [ngModel]=\"value\"\n (onValueChanged)=\"_handleValueChanged($event)\"\n [selectionMode]=\"'item'\"\n [isItemTruncated]=\"isItemTruncated()\"\n [showItemTooltip]=\"showItemTooltip()\"\n >\n </ax-list>\n <ng-template #empty>\n {{ '@acorex:common.general.no-result-found' | translate | async }}\n </ng-template>\n }\n\n @if (isLoading()) {\n @if (loadingTemplate) {\n <ng-template [ngTemplateOutlet]=\"loadingTemplate\"></ng-template>\n }\n }\n\n <ng-content select=\"ax-footer\"> </ng-content>\n </div>\n </ng-container>\n</ax-dropdown-box>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-editor-container.ax-fill .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-surfaceest);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-surface-high)}.ax-editor-container.ax-flat .ax-chips,.ax-editor-container.ax-outline .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-surface);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-surface-high)}.ax-editor-container.ax-solid .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-light-surface);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-light-surface)}ax-select-box .ax-chips-container{outline:0px solid transparent}.ax-xs ax-select-box,ax-select-box.ax-xs{--ax-comp-select-box-chips-padding-x: .25rem;--ax-comp-select-box-chips-padding-y: .125rem;--ax-comp-select-box-chips-font-size: .625rem;--ax-comp-editor-placeholder-space-x: .375rem}.ax-sm ax-select-box,ax-select-box.ax-sm{--ax-comp-select-box-chips-padding-x: .25rem;--ax-comp-select-box-chips-padding-y: .125rem;--ax-comp-select-box-chips-font-size: .75rem;--ax-comp-editor-placeholder-space-x: .5rem}ax-select-box,ax-select-box.ax-md{--ax-comp-select-box-chips-padding-x: .5rem;--ax-comp-select-box-chips-padding-y: .25rem;--ax-comp-select-box-chips-font-size: .875rem;--ax-comp-editor-placeholder-space-x: .75rem}.ax-lg ax-select-box,ax-select-box.ax-lg{--ax-comp-select-box-chips-padding-x: .75rem;--ax-comp-select-box-chips-padding-y: .5rem;--ax-comp-select-box-chips-font-size: 1rem;--ax-comp-editor-placeholder-space-x: .75rem}.ax-xl ax-select-box,ax-select-box.ax-xl{--ax-comp-select-box-chips-padding-x: .875rem;--ax-comp-select-box-chips-padding-y: .75rem;--ax-comp-select-box-chips-font-size: 1.125rem;--ax-comp-editor-placeholder-space-x: .75rem}ax-select-box{display:block;width:100%;border-radius:var(--ax-sys-border-radius)}ax-select-box .ax-state-disabled{opacity:.5;cursor:not-allowed}ax-select-box .ax-state-disabled .ax-content,ax-select-box .ax-state-disabled .ax-editor-button{cursor:not-allowed}ax-select-box .ax-state-disabled .ax-chips-container{cursor:not-allowed!important}ax-select-box ax-dropdown-box{border-radius:inherit!important}ax-select-box ax-dropdown-box.ax-state-multiple{height:auto;min-height:var(--ax-comp-editor-height);--ax-comp-editor-space-start-size: 0}ax-select-box ax-dropdown-box.ax-state-multiple .ax-placeholder{padding:0 var(--ax-comp-editor-placeholder-space-x)}ax-select-box .ax-chips-container{display:flex;flex:1 1 0%;min-width:0;cursor:pointer!important;-webkit-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:var(--ax-comp-select-box-chips-gap, .25rem);min-height:var(--ax-sys-size-base)}ax-select-box .ax-chips-container .ax-chips{display:block;overflow:hidden;text-wrap:nowrap;line-height:normal;text-overflow:ellipsis;padding:0 var(--ax-comp-editor-padding-x, .25rem);color:rgb(var(--ax-comp-select-box-chips-text-color));font-size:var(--ax-comp-select-box-chips-font-size)}ax-select-box .ax-chips-container.ax-state-multiple .ax-chips{background-color:rgb(var(--ax-comp-select-box-chips-bg-color));border-radius:var(--ax-comp-select-box-chips-border-radius, 999rem);border-width:var(--ax-comp-select-box-chips-border-width, 0px);padding:var(--ax-comp-select-box-chips-padding-y, .25rem) var(--ax-comp-select-box-chips-padding-x, .5rem)}ax-select-box .ax-chips-container.ax-state-multiple .ax-chips .ax-icon-close{cursor:pointer;margin-inline-start:var(--ax-comp-select-box-chips-padding-x)}ax-select-box .ax-chips-container .ax-selectbox-input{width:0px;opacity:0}ax-select-box .ax-chips-container.ax-state-multiple:has(.ax-chips){padding:var(--ax-comp-select-box-chips-container-padding, .25rem)}.ax-select-box-panel{height:fit-content}.ax-select-box-panel .ax-select-box-loading-container{display:flex;align-items:center;justify-content:center;padding:1rem}.ax-select-box-panel>ax-header .ax-icon-check{color:rgba(var(--ax-sys-color-primary-500))}.ax-select-box-panel>ax-header.ax-solid{border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-select-box-panel>ax-header.ax-solid ax-title{font-size:1rem;line-height:1.5rem;font-weight:500}\n"], dependencies: [{ kind: "component", type: AXDropdownBoxComponent, selector: "ax-dropdown-box", inputs: ["disabled", "look", "hasInput", "popoverWidth"], outputs: ["disabledChange", "onBlur", "onFocus", "onClick", "onOpened", "onClosed"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: 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: AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["closeAll", "icon"] }, { kind: "component", type: AXListComponent, selector: "ax-list", inputs: ["id", "name", "disabled", "readonly", "valueField", "textField", "textTemplate", "disabledField", "multiple", "selectionMode", "isItemTruncated", "showItemTooltip", "dataSource", "itemHeight", "itemTemplate", "emptyTemplate", "loadingTemplate", "checkbox"], outputs: ["onValueChanged", "disabledChange", "readonlyChange", "onBlur", "onFocus", "onItemClick", "onScrolledIndexChanged"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
373
|
+
], queries: [{ propertyName: "searchBox", first: true, predicate: AXSearchBoxComponent, descendants: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: ["panel"], descendants: true }, { propertyName: "list", first: true, predicate: AXListComponent, descendants: true }, { propertyName: "dropdown", first: true, predicate: AXDropdownBoxComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ax-dropdown-box\n [class.ax-state-multiple]=\"multiple\"\n (onOpened)=\"_handleOnOpenedEvent($event)\"\n (onClosed)=\"_handleOnClosedEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n [disabled]=\"disabled\"\n [look]=\"look\"\n [popoverWidth]=\"dropdownWidth()\"\n>\n <ng-container input>\n <ng-content select=\"ax-prefix\"> </ng-content>\n <div\n class=\"ax-editor ax-chips-container ax-content ax-input\"\n [class.ax-state-multiple]=\"multiple\"\n [tabindex]=\"tabIndex\"\n >\n @if (selectedItems.length === 0) {\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\n {{ placeholder | translate | async }}\n </div>\n }\n @for (item of selectedItems; track $index) {\n @if (selectedTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"selectedTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { data: item } }\"\n ></ng-template>\n } @else {\n <div class=\"ax-chips\">\n {{ getDisplayText(item) | translate | async }}\n @if (!disabled && !readonly && multiple) {\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\n }\n </div>\n }\n }\n </div>\n @if (selectedItems?.length && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n <button type=\"button\" [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-editor-button\">\n @if (isLoading()) {\n <ax-loading></ax-loading>\n } @else {\n <span\n class=\"ax-icon\"\n [ngClass]=\"{\n 'ax-icon-chevron-down': !isOpen,\n 'ax-icon-chevron-up': isOpen,\n }\"\n ></span>\n }\n </button>\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-template #search>\n <ng-content select=\"ax-search-box\"> </ng-content>\n </ng-template>\n </ng-container>\n <ng-container panel>\n <div #panel class=\"ax-select-box-panel\" [style.min-width]=\"_dropdownWidth()\">\n @if (dropdown.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]=\"multiple ? 'ax-icon ax-icon-check' : 'ax-icon ax-icon-close'\"></ax-close-button>\n </ax-header>\n }\n @if (searchBox && (!minRecordsForSearch || _listDataSource.totalCount >= minRecordsForSearch || searchValue())) {\n <div class=\"ax-search-container\">\n <ng-template [ngTemplateOutlet]=\"search\"></ng-template>\n </div>\n }\n @if (renderList()) {\n <ax-list\n [readonly]=\"readonly\"\n [dataSource]=\"_listDataSource\"\n [multiple]=\"multiple\"\n [style.height]=\"_dropdownHeight()\"\n [valueField]=\"valueField\"\n [textField]=\"textField\"\n [textTemplate]=\"textTemplate\"\n [emptyTemplate]=\"emptyTemplate ?? empty\"\n [itemTemplate]=\"itemTemplate\"\n [loadingTemplate]=\"loadingTemplate\"\n [ngModel]=\"value\"\n (onValueChanged)=\"_handleValueChanged($event)\"\n (onItemClick)=\"_handleItemClick($event)\"\n (onItemSelected)=\"_handleItemSelected($event)\"\n [selectionMode]=\"'item'\"\n [isItemTruncated]=\"isItemTruncated()\"\n [showItemTooltip]=\"showItemTooltip()\"\n >\n </ax-list>\n <ng-template #empty>\n {{ '@acorex:common.general.no-result-found' | translate | async }}\n </ng-template>\n }\n\n @if (isLoading()) {\n @if (loadingTemplate) {\n <ng-template [ngTemplateOutlet]=\"loadingTemplate\"></ng-template>\n }\n }\n\n <ng-content select=\"ax-footer\"> </ng-content>\n </div>\n </ng-container>\n</ax-dropdown-box>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-editor-container.ax-fill .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-surfaceest);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-surface-high)}.ax-editor-container.ax-flat .ax-chips,.ax-editor-container.ax-outline .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-surface);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-surface-high)}.ax-editor-container.ax-solid .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-light-surface);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-light-surface)}ax-select-box .ax-chips-container{outline:0px solid transparent}.ax-xs ax-select-box,ax-select-box.ax-xs{--ax-comp-select-box-chips-padding-x: .25rem;--ax-comp-select-box-chips-padding-y: .125rem;--ax-comp-select-box-chips-font-size: .625rem;--ax-comp-editor-placeholder-space-x: .375rem}.ax-sm ax-select-box,ax-select-box.ax-sm{--ax-comp-select-box-chips-padding-x: .25rem;--ax-comp-select-box-chips-padding-y: .125rem;--ax-comp-select-box-chips-font-size: .75rem;--ax-comp-editor-placeholder-space-x: .5rem}ax-select-box,ax-select-box.ax-md{--ax-comp-select-box-chips-padding-x: .5rem;--ax-comp-select-box-chips-padding-y: .25rem;--ax-comp-select-box-chips-font-size: .875rem;--ax-comp-editor-placeholder-space-x: .75rem}.ax-lg ax-select-box,ax-select-box.ax-lg{--ax-comp-select-box-chips-padding-x: .75rem;--ax-comp-select-box-chips-padding-y: .5rem;--ax-comp-select-box-chips-font-size: 1rem;--ax-comp-editor-placeholder-space-x: .75rem}.ax-xl ax-select-box,ax-select-box.ax-xl{--ax-comp-select-box-chips-padding-x: .875rem;--ax-comp-select-box-chips-padding-y: .75rem;--ax-comp-select-box-chips-font-size: 1.125rem;--ax-comp-editor-placeholder-space-x: .75rem}ax-select-box{display:block;width:100%;border-radius:var(--ax-sys-border-radius)}ax-select-box .ax-state-disabled{opacity:.5;cursor:not-allowed}ax-select-box .ax-state-disabled .ax-content,ax-select-box .ax-state-disabled .ax-editor-button{cursor:not-allowed}ax-select-box .ax-state-disabled .ax-chips-container{cursor:not-allowed!important}ax-select-box ax-dropdown-box{border-radius:inherit!important}ax-select-box ax-dropdown-box.ax-state-multiple{height:auto;min-height:var(--ax-comp-editor-height);--ax-comp-editor-space-start-size: 0}ax-select-box ax-dropdown-box.ax-state-multiple .ax-placeholder{padding:0 var(--ax-comp-editor-placeholder-space-x)}ax-select-box .ax-chips-container{display:flex;flex:1 1 0%;min-width:0;cursor:pointer!important;-webkit-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:var(--ax-comp-select-box-chips-gap, .25rem);min-height:var(--ax-sys-size-base)}ax-select-box .ax-chips-container .ax-chips{display:block;overflow:hidden;text-wrap:nowrap;line-height:normal;text-overflow:ellipsis;padding:0 var(--ax-comp-editor-padding-x, .25rem);color:rgb(var(--ax-comp-select-box-chips-text-color));font-size:var(--ax-comp-select-box-chips-font-size)}ax-select-box .ax-chips-container.ax-state-multiple .ax-chips{background-color:rgb(var(--ax-comp-select-box-chips-bg-color));border-radius:var(--ax-comp-select-box-chips-border-radius, 999rem);border-width:var(--ax-comp-select-box-chips-border-width, 0px);padding:var(--ax-comp-select-box-chips-padding-y, .25rem) var(--ax-comp-select-box-chips-padding-x, .5rem)}ax-select-box .ax-chips-container.ax-state-multiple .ax-chips .ax-icon-close{cursor:pointer;margin-inline-start:var(--ax-comp-select-box-chips-padding-x)}ax-select-box .ax-chips-container .ax-selectbox-input{width:0px;opacity:0}ax-select-box .ax-chips-container.ax-state-multiple:has(.ax-chips){padding:var(--ax-comp-select-box-chips-container-padding, .25rem)}.ax-select-box-panel{height:fit-content}.ax-select-box-panel .ax-select-box-loading-container{display:flex;align-items:center;justify-content:center;padding:1rem}.ax-select-box-panel>ax-header .ax-icon-check{color:rgba(var(--ax-sys-color-primary-500))}.ax-select-box-panel>ax-header.ax-solid{border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-select-box-panel>ax-header.ax-solid ax-title{font-size:1rem;line-height:1.5rem;font-weight:500}\n"], dependencies: [{ kind: "component", type: AXDropdownBoxComponent, selector: "ax-dropdown-box", inputs: ["disabled", "look", "hasInput", "popoverWidth"], outputs: ["disabledChange", "onBlur", "onFocus", "onClick", "onOpened", "onClosed"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: 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: AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["closeAll", "icon"] }, { kind: "component", type: AXListComponent, selector: "ax-list", inputs: ["id", "name", "disabled", "readonly", "valueField", "textField", "textTemplate", "disabledField", "multiple", "selectionMode", "isItemTruncated", "showItemTooltip", "dataSource", "itemHeight", "itemTemplate", "emptyTemplate", "loadingTemplate", "checkbox"], outputs: ["onValueChanged", "disabledChange", "readonlyChange", "onBlur", "onFocus", "onItemClick", "onItemSelected", "onScrolledIndexChanged"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
333
374
|
}
|
334
375
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXSelectBoxComponent, decorators: [{
|
335
376
|
type: Component,
|
@@ -362,6 +403,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
362
403
|
'disabledChange',
|
363
404
|
'onOpened',
|
364
405
|
'onClosed',
|
406
|
+
'onItemSelected',
|
407
|
+
'onItemClick',
|
365
408
|
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
366
409
|
{ provide: AXComponent, useExisting: AXSelectBoxComponent },
|
367
410
|
{ provide: AXFocusableComponent, useExisting: AXSelectBoxComponent },
|
@@ -390,7 +433,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
390
433
|
AXLoadingComponent,
|
391
434
|
AsyncPipe,
|
392
435
|
AXTranslatorPipe,
|
393
|
-
], template: "<ax-dropdown-box\n [class.ax-state-multiple]=\"multiple\"\n (onOpened)=\"_handleOnOpenedEvent($event)\"\n (onClosed)=\"_handleOnClosedEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n [disabled]=\"disabled\"\n [look]=\"look\"\n [popoverWidth]=\"dropdownWidth()\"\n>\n <ng-container input>\n <ng-content select=\"ax-prefix\"> </ng-content>\n <div\n class=\"ax-editor ax-chips-container ax-content ax-input\"\n [class.ax-state-multiple]=\"multiple\"\n [tabindex]=\"tabIndex\"\n >\n @if (selectedItems.length === 0) {\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\n {{ placeholder }}\n </div>\n }\n @for (item of selectedItems; track $index) {\n @if (selectedTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"selectedTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { data: item } }\"\n ></ng-template>\n } @else {\n <div class=\"ax-chips\">\n {{ getDisplayText(item) }}\n @if (!disabled && !readonly && multiple) {\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\n }\n </div>\n }\n }\n </div>\n @if (selectedItems?.length && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n <button type=\"button\" [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-editor-button\">\n @if (isLoading()) {\n <ax-loading></ax-loading>\n } @else {\n <span\n class=\"ax-icon\"\n [ngClass]=\"{\n 'ax-icon-chevron-down': !isOpen,\n 'ax-icon-chevron-up': isOpen,\n }\"\n ></span>\n }\n </button>\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-template #search>\n <ng-content select=\"ax-search-box\"> </ng-content>\n </ng-template>\n </ng-container>\n <ng-container panel>\n <div #panel class=\"ax-select-box-panel\" [style.min-width]=\"_dropdownWidth()\">\n @if (dropdown.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]=\"multiple ? 'ax-icon ax-icon-check' : 'ax-icon ax-icon-close'\"></ax-close-button>\n </ax-header>\n }\n @if (searchBox && (!minRecordsForSearch || _listDataSource.totalCount >= minRecordsForSearch || searchValue())) {\n <div class=\"ax-search-container\">\n <ng-template [ngTemplateOutlet]=\"search\"></ng-template>\n </div>\n }\n @if (renderList()) {\n <ax-list\n [readonly]=\"readonly\"\n [dataSource]=\"_listDataSource\"\n [multiple]=\"multiple\"\n [style.height]=\"_dropdownHeight()\"\n [valueField]=\"valueField\"\n [textField]=\"textField\"\n [textTemplate]=\"textTemplate\"\n [emptyTemplate]=\"emptyTemplate ?? empty\"\n [itemTemplate]=\"itemTemplate\"\n [loadingTemplate]=\"loadingTemplate\"\n [ngModel]=\"value\"\n (onValueChanged)=\"_handleValueChanged($event)\"\n [selectionMode]=\"'item'\"\n [isItemTruncated]=\"isItemTruncated()\"\n [showItemTooltip]=\"showItemTooltip()\"\n >\n </ax-list>\n <ng-template #empty>\n {{ '@acorex:common.general.no-result-found' | translate | async }}\n </ng-template>\n }\n\n @if (isLoading()) {\n @if (loadingTemplate) {\n <ng-template [ngTemplateOutlet]=\"loadingTemplate\"></ng-template>\n }\n }\n\n <ng-content select=\"ax-footer\"> </ng-content>\n </div>\n </ng-container>\n</ax-dropdown-box>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-editor-container.ax-fill .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-surfaceest);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-surface-high)}.ax-editor-container.ax-flat .ax-chips,.ax-editor-container.ax-outline .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-surface);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-surface-high)}.ax-editor-container.ax-solid .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-light-surface);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-light-surface)}ax-select-box .ax-chips-container{outline:0px solid transparent}.ax-xs ax-select-box,ax-select-box.ax-xs{--ax-comp-select-box-chips-padding-x: .25rem;--ax-comp-select-box-chips-padding-y: .125rem;--ax-comp-select-box-chips-font-size: .625rem;--ax-comp-editor-placeholder-space-x: .375rem}.ax-sm ax-select-box,ax-select-box.ax-sm{--ax-comp-select-box-chips-padding-x: .25rem;--ax-comp-select-box-chips-padding-y: .125rem;--ax-comp-select-box-chips-font-size: .75rem;--ax-comp-editor-placeholder-space-x: .5rem}ax-select-box,ax-select-box.ax-md{--ax-comp-select-box-chips-padding-x: .5rem;--ax-comp-select-box-chips-padding-y: .25rem;--ax-comp-select-box-chips-font-size: .875rem;--ax-comp-editor-placeholder-space-x: .75rem}.ax-lg ax-select-box,ax-select-box.ax-lg{--ax-comp-select-box-chips-padding-x: .75rem;--ax-comp-select-box-chips-padding-y: .5rem;--ax-comp-select-box-chips-font-size: 1rem;--ax-comp-editor-placeholder-space-x: .75rem}.ax-xl ax-select-box,ax-select-box.ax-xl{--ax-comp-select-box-chips-padding-x: .875rem;--ax-comp-select-box-chips-padding-y: .75rem;--ax-comp-select-box-chips-font-size: 1.125rem;--ax-comp-editor-placeholder-space-x: .75rem}ax-select-box{display:block;width:100%;border-radius:var(--ax-sys-border-radius)}ax-select-box .ax-state-disabled{opacity:.5;cursor:not-allowed}ax-select-box .ax-state-disabled .ax-content,ax-select-box .ax-state-disabled .ax-editor-button{cursor:not-allowed}ax-select-box .ax-state-disabled .ax-chips-container{cursor:not-allowed!important}ax-select-box ax-dropdown-box{border-radius:inherit!important}ax-select-box ax-dropdown-box.ax-state-multiple{height:auto;min-height:var(--ax-comp-editor-height);--ax-comp-editor-space-start-size: 0}ax-select-box ax-dropdown-box.ax-state-multiple .ax-placeholder{padding:0 var(--ax-comp-editor-placeholder-space-x)}ax-select-box .ax-chips-container{display:flex;flex:1 1 0%;min-width:0;cursor:pointer!important;-webkit-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:var(--ax-comp-select-box-chips-gap, .25rem);min-height:var(--ax-sys-size-base)}ax-select-box .ax-chips-container .ax-chips{display:block;overflow:hidden;text-wrap:nowrap;line-height:normal;text-overflow:ellipsis;padding:0 var(--ax-comp-editor-padding-x, .25rem);color:rgb(var(--ax-comp-select-box-chips-text-color));font-size:var(--ax-comp-select-box-chips-font-size)}ax-select-box .ax-chips-container.ax-state-multiple .ax-chips{background-color:rgb(var(--ax-comp-select-box-chips-bg-color));border-radius:var(--ax-comp-select-box-chips-border-radius, 999rem);border-width:var(--ax-comp-select-box-chips-border-width, 0px);padding:var(--ax-comp-select-box-chips-padding-y, .25rem) var(--ax-comp-select-box-chips-padding-x, .5rem)}ax-select-box .ax-chips-container.ax-state-multiple .ax-chips .ax-icon-close{cursor:pointer;margin-inline-start:var(--ax-comp-select-box-chips-padding-x)}ax-select-box .ax-chips-container .ax-selectbox-input{width:0px;opacity:0}ax-select-box .ax-chips-container.ax-state-multiple:has(.ax-chips){padding:var(--ax-comp-select-box-chips-container-padding, .25rem)}.ax-select-box-panel{height:fit-content}.ax-select-box-panel .ax-select-box-loading-container{display:flex;align-items:center;justify-content:center;padding:1rem}.ax-select-box-panel>ax-header .ax-icon-check{color:rgba(var(--ax-sys-color-primary-500))}.ax-select-box-panel>ax-header.ax-solid{border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-select-box-panel>ax-header.ax-solid ax-title{font-size:1rem;line-height:1.5rem;font-weight:500}\n"] }]
|
436
|
+
], template: "<ax-dropdown-box\n [class.ax-state-multiple]=\"multiple\"\n (onOpened)=\"_handleOnOpenedEvent($event)\"\n (onClosed)=\"_handleOnClosedEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n [disabled]=\"disabled\"\n [look]=\"look\"\n [popoverWidth]=\"dropdownWidth()\"\n>\n <ng-container input>\n <ng-content select=\"ax-prefix\"> </ng-content>\n <div\n class=\"ax-editor ax-chips-container ax-content ax-input\"\n [class.ax-state-multiple]=\"multiple\"\n [tabindex]=\"tabIndex\"\n >\n @if (selectedItems.length === 0) {\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\n {{ placeholder | translate | async }}\n </div>\n }\n @for (item of selectedItems; track $index) {\n @if (selectedTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"selectedTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { data: item } }\"\n ></ng-template>\n } @else {\n <div class=\"ax-chips\">\n {{ getDisplayText(item) | translate | async }}\n @if (!disabled && !readonly && multiple) {\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\n }\n </div>\n }\n }\n </div>\n @if (selectedItems?.length && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n <button type=\"button\" [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-editor-button\">\n @if (isLoading()) {\n <ax-loading></ax-loading>\n } @else {\n <span\n class=\"ax-icon\"\n [ngClass]=\"{\n 'ax-icon-chevron-down': !isOpen,\n 'ax-icon-chevron-up': isOpen,\n }\"\n ></span>\n }\n </button>\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-template #search>\n <ng-content select=\"ax-search-box\"> </ng-content>\n </ng-template>\n </ng-container>\n <ng-container panel>\n <div #panel class=\"ax-select-box-panel\" [style.min-width]=\"_dropdownWidth()\">\n @if (dropdown.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]=\"multiple ? 'ax-icon ax-icon-check' : 'ax-icon ax-icon-close'\"></ax-close-button>\n </ax-header>\n }\n @if (searchBox && (!minRecordsForSearch || _listDataSource.totalCount >= minRecordsForSearch || searchValue())) {\n <div class=\"ax-search-container\">\n <ng-template [ngTemplateOutlet]=\"search\"></ng-template>\n </div>\n }\n @if (renderList()) {\n <ax-list\n [readonly]=\"readonly\"\n [dataSource]=\"_listDataSource\"\n [multiple]=\"multiple\"\n [style.height]=\"_dropdownHeight()\"\n [valueField]=\"valueField\"\n [textField]=\"textField\"\n [textTemplate]=\"textTemplate\"\n [emptyTemplate]=\"emptyTemplate ?? empty\"\n [itemTemplate]=\"itemTemplate\"\n [loadingTemplate]=\"loadingTemplate\"\n [ngModel]=\"value\"\n (onValueChanged)=\"_handleValueChanged($event)\"\n (onItemClick)=\"_handleItemClick($event)\"\n (onItemSelected)=\"_handleItemSelected($event)\"\n [selectionMode]=\"'item'\"\n [isItemTruncated]=\"isItemTruncated()\"\n [showItemTooltip]=\"showItemTooltip()\"\n >\n </ax-list>\n <ng-template #empty>\n {{ '@acorex:common.general.no-result-found' | translate | async }}\n </ng-template>\n }\n\n @if (isLoading()) {\n @if (loadingTemplate) {\n <ng-template [ngTemplateOutlet]=\"loadingTemplate\"></ng-template>\n }\n }\n\n <ng-content select=\"ax-footer\"> </ng-content>\n </div>\n </ng-container>\n</ax-dropdown-box>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-editor-container.ax-fill .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-surfaceest);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-surface-high)}.ax-editor-container.ax-flat .ax-chips,.ax-editor-container.ax-outline .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-surface);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-surface-high)}.ax-editor-container.ax-solid .ax-chips{--ax-comp-select-box-chips-bg-color: var(--ax-sys-color-light-surface);--ax-comp-select-box-chips-text-color: var(--ax-sys-color-on-light-surface)}ax-select-box .ax-chips-container{outline:0px solid transparent}.ax-xs ax-select-box,ax-select-box.ax-xs{--ax-comp-select-box-chips-padding-x: .25rem;--ax-comp-select-box-chips-padding-y: .125rem;--ax-comp-select-box-chips-font-size: .625rem;--ax-comp-editor-placeholder-space-x: .375rem}.ax-sm ax-select-box,ax-select-box.ax-sm{--ax-comp-select-box-chips-padding-x: .25rem;--ax-comp-select-box-chips-padding-y: .125rem;--ax-comp-select-box-chips-font-size: .75rem;--ax-comp-editor-placeholder-space-x: .5rem}ax-select-box,ax-select-box.ax-md{--ax-comp-select-box-chips-padding-x: .5rem;--ax-comp-select-box-chips-padding-y: .25rem;--ax-comp-select-box-chips-font-size: .875rem;--ax-comp-editor-placeholder-space-x: .75rem}.ax-lg ax-select-box,ax-select-box.ax-lg{--ax-comp-select-box-chips-padding-x: .75rem;--ax-comp-select-box-chips-padding-y: .5rem;--ax-comp-select-box-chips-font-size: 1rem;--ax-comp-editor-placeholder-space-x: .75rem}.ax-xl ax-select-box,ax-select-box.ax-xl{--ax-comp-select-box-chips-padding-x: .875rem;--ax-comp-select-box-chips-padding-y: .75rem;--ax-comp-select-box-chips-font-size: 1.125rem;--ax-comp-editor-placeholder-space-x: .75rem}ax-select-box{display:block;width:100%;border-radius:var(--ax-sys-border-radius)}ax-select-box .ax-state-disabled{opacity:.5;cursor:not-allowed}ax-select-box .ax-state-disabled .ax-content,ax-select-box .ax-state-disabled .ax-editor-button{cursor:not-allowed}ax-select-box .ax-state-disabled .ax-chips-container{cursor:not-allowed!important}ax-select-box ax-dropdown-box{border-radius:inherit!important}ax-select-box ax-dropdown-box.ax-state-multiple{height:auto;min-height:var(--ax-comp-editor-height);--ax-comp-editor-space-start-size: 0}ax-select-box ax-dropdown-box.ax-state-multiple .ax-placeholder{padding:0 var(--ax-comp-editor-placeholder-space-x)}ax-select-box .ax-chips-container{display:flex;flex:1 1 0%;min-width:0;cursor:pointer!important;-webkit-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:var(--ax-comp-select-box-chips-gap, .25rem);min-height:var(--ax-sys-size-base)}ax-select-box .ax-chips-container .ax-chips{display:block;overflow:hidden;text-wrap:nowrap;line-height:normal;text-overflow:ellipsis;padding:0 var(--ax-comp-editor-padding-x, .25rem);color:rgb(var(--ax-comp-select-box-chips-text-color));font-size:var(--ax-comp-select-box-chips-font-size)}ax-select-box .ax-chips-container.ax-state-multiple .ax-chips{background-color:rgb(var(--ax-comp-select-box-chips-bg-color));border-radius:var(--ax-comp-select-box-chips-border-radius, 999rem);border-width:var(--ax-comp-select-box-chips-border-width, 0px);padding:var(--ax-comp-select-box-chips-padding-y, .25rem) var(--ax-comp-select-box-chips-padding-x, .5rem)}ax-select-box .ax-chips-container.ax-state-multiple .ax-chips .ax-icon-close{cursor:pointer;margin-inline-start:var(--ax-comp-select-box-chips-padding-x)}ax-select-box .ax-chips-container .ax-selectbox-input{width:0px;opacity:0}ax-select-box .ax-chips-container.ax-state-multiple:has(.ax-chips){padding:var(--ax-comp-select-box-chips-container-padding, .25rem)}.ax-select-box-panel{height:fit-content}.ax-select-box-panel .ax-select-box-loading-container{display:flex;align-items:center;justify-content:center;padding:1rem}.ax-select-box-panel>ax-header .ax-icon-check{color:rgba(var(--ax-sys-color-primary-500))}.ax-select-box-panel>ax-header.ax-solid{border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface))}.ax-select-box-panel>ax-header.ax-solid ax-title{font-size:1rem;line-height:1.5rem;font-weight:500}\n"] }]
|
394
437
|
}], propDecorators: { dataSource: [{
|
395
438
|
type: Input
|
396
439
|
}], placeholder: [{
|