@acorex/components 18.12.44 → 18.14.1-next.0
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/alert/lib/alert.component.mjs +10 -14
- package/esm2022/avatar/lib/avatar.component.mjs +2 -2
- package/esm2022/calendar/lib/calendar.component.mjs +3 -3
- package/esm2022/common/lib/components/selection-base.component.class.mjs +2 -1
- package/esm2022/common/lib/components/value-component.class.mjs +5 -4
- package/esm2022/menu/lib/context-menu.component.mjs +2 -2
- package/esm2022/menu/lib/menu.component.mjs +2 -2
- package/esm2022/rate-picker/lib/rate-picker.component.mjs +2 -2
- package/esm2022/search-box/lib/search-box.component.mjs +3 -3
- package/esm2022/select-box/lib/select-box.component.mjs +2 -2
- package/esm2022/selection-list/lib/selection-list.component.mjs +39 -91
- package/esm2022/time-line/lib/time-line-item.component.mjs +3 -3
- package/esm2022/time-line/lib/time-line.component.mjs +18 -4
- package/esm2022/uploader/lib/uploader-zone.directive.mjs +2 -2
- package/fesm2022/acorex-components-action-sheet.mjs +1 -1
- package/fesm2022/acorex-components-alert.mjs +10 -14
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +1 -1
- package/fesm2022/acorex-components-avatar.mjs +3 -3
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +1 -1
- package/fesm2022/acorex-components-button-group.mjs +1 -1
- package/fesm2022/acorex-components-button.mjs +1 -1
- package/fesm2022/acorex-components-calendar.mjs +3 -3
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +1 -1
- package/fesm2022/acorex-components-chips.mjs +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +1 -1
- package/fesm2022/acorex-components-collapse.mjs +1 -1
- package/fesm2022/acorex-components-color-box.mjs +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +1 -1
- package/fesm2022/acorex-components-comment.mjs +1 -1
- package/fesm2022/acorex-components-common.mjs +6 -4
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +1 -1
- package/fesm2022/acorex-components-data-table.mjs +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +1 -1
- package/fesm2022/acorex-components-decorators.mjs +1 -1
- package/fesm2022/acorex-components-dialog.mjs +1 -1
- package/fesm2022/acorex-components-drawer.mjs +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +1 -1
- package/fesm2022/acorex-components-form.mjs +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +1 -1
- package/fesm2022/acorex-components-image.mjs +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +1 -1
- package/fesm2022/acorex-components-label.mjs +1 -1
- package/fesm2022/acorex-components-list.mjs +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +1 -1
- package/fesm2022/acorex-components-loading.mjs +1 -1
- package/fesm2022/acorex-components-map.mjs +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +1 -1
- package/fesm2022/acorex-components-menu.mjs +5 -5
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-nav.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +1 -1
- package/fesm2022/acorex-components-notification.mjs +1 -1
- package/fesm2022/acorex-components-number-box.mjs +1 -1
- package/fesm2022/acorex-components-otp.mjs +1 -1
- package/fesm2022/acorex-components-page.mjs +1 -1
- package/fesm2022/acorex-components-paint.mjs +1 -1
- package/fesm2022/acorex-components-password-box.mjs +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +1 -1
- package/fesm2022/acorex-components-picker.mjs +1 -1
- package/fesm2022/acorex-components-popover.mjs +1 -1
- package/fesm2022/acorex-components-popup.mjs +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +1 -1
- package/fesm2022/acorex-components-radio.mjs +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +2 -2
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +1 -1
- package/fesm2022/acorex-components-search-box.mjs +3 -3
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +2 -2
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +39 -91
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +1 -1
- package/fesm2022/acorex-components-slider.mjs +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +1 -1
- package/fesm2022/acorex-components-switch.mjs +1 -1
- package/fesm2022/acorex-components-tabs.mjs +1 -1
- package/fesm2022/acorex-components-tag.mjs +1 -1
- package/fesm2022/acorex-components-text-area.mjs +1 -1
- package/fesm2022/acorex-components-text-box.mjs +1 -1
- package/fesm2022/acorex-components-time-line.mjs +19 -5
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +1 -1
- package/fesm2022/acorex-components-uploader.mjs +2 -2
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +1 -1
- package/package.json +1 -1
- package/selection-list/lib/selection-list.component.d.ts +9 -37
- package/time-line/lib/time-line.component.d.ts +2 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-select-box.mjs","sources":["../../../../libs/components/select-box/src/lib/select-box.component.ts","../../../../libs/components/select-box/src/lib/select-box.component.html","../../../../libs/components/select-box/src/lib/select-box.module.ts","../../../../libs/components/select-box/src/acorex-components-select-box.ts"],"sourcesContent":["import {\r\n AXClearableComponent,\r\n AXClosbaleComponent,\r\n AXComponent,\r\n AXDataSource,\r\n AXEvent,\r\n AXFocusableComponent,\r\n AXHotkeysService,\r\n AXItemClickEvent,\r\n AXSearchableComponent,\r\n AXValuableComponent,\r\n AXValueChangedEvent,\r\n AX_SELECTION_DATA_TOKEN,\r\n MXLookComponent,\r\n MXSelectionBridgeService,\r\n MXSelectionValueComponent,\r\n convertArrayToDataSource,\r\n} from '@acorex/components/common';\r\nimport { AXDropdownBoxComponent, MXDropdownBoxBaseComponent } from '@acorex/components/dropdown';\r\nimport { AXListComponent } from '@acorex/components/list';\r\nimport { AXSearchBoxComponent } from '@acorex/components/search-box';\r\nimport { AXUnsubscriber } from '@acorex/core/utils';\r\nimport {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChild,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnDestroy,\r\n TemplateRef,\r\n ViewChild,\r\n ViewEncapsulation,\r\n WritableSignal,\r\n forwardRef,\r\n inject,\r\n signal,\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { findLastIndex, last, nth } from 'lodash-es';\r\nimport { classes } from 'polytype';\r\nimport { Observable } from 'rxjs';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n * @category\r\n */\r\n@Component({\r\n selector: 'ax-select-box',\r\n templateUrl: './select-box.component.html',\r\n styleUrls: ['./select-box.component.scss'],\r\n inputs: [\r\n 'disabled',\r\n 'readonly',\r\n 'tabIndex',\r\n 'placeholder',\r\n 'minValue',\r\n 'maxValue',\r\n 'value',\r\n 'state',\r\n 'name',\r\n 'id',\r\n 'type',\r\n 'look',\r\n 'multiple',\r\n 'valueField',\r\n 'textField',\r\n 'textTemplate',\r\n ],\r\n outputs: [\r\n 'valueChange',\r\n 'stateChange',\r\n 'onValueChanged',\r\n 'onBlur',\r\n 'onFocus',\r\n 'readonlyChange',\r\n 'disabledChange',\r\n 'onOpened',\r\n 'onClosed',\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [\r\n { provide: AXComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXFocusableComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXValuableComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXClearableComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXClosbaleComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXSearchableComponent, useExisting: AXSelectBoxComponent },\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => AXSelectBoxComponent),\r\n multi: true,\r\n },\r\n {\r\n provide: AX_SELECTION_DATA_TOKEN,\r\n useClass: MXSelectionBridgeService,\r\n },\r\n AXUnsubscriber,\r\n ],\r\n host: { ngSkipHydration: 'true' },\r\n})\r\nexport class AXSelectBoxComponent\r\n extends classes(MXDropdownBoxBaseComponent, MXSelectionValueComponent, MXLookComponent)\r\n implements AfterViewInit, OnDestroy\r\n{\r\n /** @ignore */\r\n private hotKeyService: AXHotkeysService = inject(AXHotkeysService);\r\n\r\n /** @ignore */\r\n protected isLoading: WritableSignal<boolean> = signal(false);\r\n\r\n /** @ignore */\r\n protected renderList = false;\r\n\r\n /** @ignore */\r\n protected dropdownSizes: { width: string; height: string } = {\r\n width: '100%',\r\n height: 'auto',\r\n };\r\n\r\n /** @ignore */\r\n protected _listDataSource: AXDataSource<any> = convertArrayToDataSource([], {\r\n key: this.valueField,\r\n pageSize: 10,\r\n });\r\n\r\n /** @ignore */\r\n private _dataSource: AXDataSource<any> | any[];\r\n\r\n /**\r\n * Gets the data source for the component, which can be either an `AXDataSource` or an array of items.\r\n * @returns {AXDataSource<any> | any[]}\r\n */\r\n public get dataSource(): AXDataSource<any> | any[] {\r\n return this._dataSource;\r\n }\r\n\r\n /**\r\n * Sets the data source, either as an `AXDataSource` or an array.\r\n * @param {AXDataSource<any> | any[]} v\r\n */\r\n @Input()\r\n\r\n /**\r\n * Sets the data source, either as `AXDataSource` or an array. Converts arrays to `AXDataSource` and subscribes to data and loading changes.\r\n * @param {AXDataSource<any> | any[]} v\r\n */\r\n public set dataSource(v: AXDataSource<any> | any[]) {\r\n this._dataSource = v;\r\n if (Array.isArray(v)) {\r\n this._listDataSource = convertArrayToDataSource(v, {\r\n key: this.valueField,\r\n pageSize: 10,\r\n });\r\n } else {\r\n this._listDataSource = this.dataSource as AXDataSource<any>;\r\n }\r\n //\r\n //\r\n this._listDataSource.onChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((data) => {\r\n this.setDropdownSize(data.totalCount);\r\n });\r\n this._listDataSource.onLoadingChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((loading) => {\r\n this.isLoading.set(loading);\r\n });\r\n }\r\n\r\n /**\r\n * The placeholder text displayed when the component is empty.\r\n * @param {string} placeholder\r\n */\r\n @Input()\r\n placeholder: string;\r\n\r\n /**\r\n * The caption text to be displayed in the component.\r\n * @param {string} caption\r\n */\r\n @Input()\r\n caption: string;\r\n\r\n /**\r\n * The template used to customize the rendering of items.\r\n * @param {TemplateRef<any>} itemTemplate\r\n */\r\n @Input()\r\n itemTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The template used to customize the rendering of selected items.\r\n * @param {TemplateRef<any>} selectedTemplate\r\n */\r\n @Input()\r\n selectedTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The template used to display when there are no items.\r\n * @param {TemplateRef<any>} emptyTemplate\r\n */\r\n @Input()\r\n emptyTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The template used to display while loading.\r\n * @param {TemplateRef<any>} loadingTemplate\r\n */\r\n @Input()\r\n loadingTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The width of the dropdown in pixels.\r\n * @defaultValue 260\r\n */\r\n @Input()\r\n dropdownWidth = 260;\r\n\r\n /** @ignore */\r\n @ViewChild('panel') panel!: ElementRef<HTMLDivElement>;\r\n\r\n /** @ignore */\r\n @ViewChild(AXListComponent)\r\n list: AXListComponent;\r\n\r\n /** @ignore */\r\n @ContentChild(AXSearchBoxComponent, { static: true })\r\n searchBox: AXSearchBoxComponent;\r\n\r\n /** @ignore */\r\n @ViewChild(AXDropdownBoxComponent, { static: true })\r\n protected dropdown: AXDropdownBoxComponent;\r\n\r\n /** @ignore */\r\n protected autoHeight = false;\r\n\r\n /**\r\n * Service for managing selection data, injected via `AX_SELECTION_DATA_TOKEN`.\r\n */\r\n public selectionService = inject(AX_SELECTION_DATA_TOKEN);\r\n\r\n searchEvent: Observable<any>;\r\n\r\n /** @ignore */\r\n private _unsubscriber = inject(AXUnsubscriber);\r\n\r\n /** @ignore */\r\n protected override ngOnInit(): void {\r\n super.ngOnInit();\r\n //\r\n this.registerValidation();\r\n }\r\n\r\n /** @ignore */\r\n ngAfterViewInit() {\r\n this.setDropdownSize();\r\n }\r\n\r\n /** @ignore */\r\n override ngOnDestroy(): void {\r\n this.searchBox?.onKeyDown.unsubscribe();\r\n }\r\n\r\n /**\r\n * Retrieves an item by its key.\r\n * @param {any} key\r\n */\r\n getItemByKey(key: any): Promise<any> | any {\r\n const startTime = Date.now();\r\n\r\n const check = async () => {\r\n while (Date.now() - startTime < 2000) {\r\n if (typeof this._listDataSource.find === 'function') {\r\n return this._listDataSource.find(key);\r\n } else {\r\n await new Promise((resolve) => setTimeout(resolve, 50));\r\n }\r\n }\r\n console.log('Timeout reached without finding the \"getItemByKey\" method');\r\n };\r\n return check();\r\n }\r\n\r\n /** @ignore */\r\n protected _handleOnOpenedEvent(e: AXEvent) {\r\n this.renderList = true;\r\n this.list?.render();\r\n this._handleFocus();\r\n //\r\n this.onOpened.emit({\r\n component: this,\r\n isUserInteraction: e.isUserInteraction,\r\n });\r\n }\r\n\r\n /** @ignore */\r\n protected _handleOnClosedEvent(e: AXEvent) {\r\n //this.input.focus();\r\n this.onClosed.emit({\r\n component: this,\r\n isUserInteraction: e.isUserInteraction,\r\n });\r\n this._unsubscriber.unsubscribe();\r\n }\r\n\r\n /** @ignore */\r\n protected _handleFocus() {\r\n setTimeout(() => {\r\n if (this.searchBox) {\r\n this.searchBox.focus();\r\n //TODO: unsubscribe\r\n this.hotKeyService\r\n .addShortcut({ keys: 'Control.f', element: this.panel.nativeElement })\r\n .pipe(this._unsubscriber.takeUntilDestroy)\r\n .subscribe(() => {\r\n this.searchBox.focus();\r\n });\r\n this.searchBox.onKeyDown.pipe(this._unsubscriber.takeUntilDestroy).subscribe((e) => {\r\n if (e.nativeEvent.code === 'ArrowDown' || e.nativeEvent.key === 'ArrowDown') {\r\n this.list?.focus();\r\n e.nativeEvent.preventDefault();\r\n }\r\n });\r\n } else {\r\n this.list?.focus();\r\n }\r\n });\r\n }\r\n\r\n /** @ignore */\r\n protected _handleBadgeRemove(e: MouseEvent, item) {\r\n this.unselectItems(item);\r\n e.stopPropagation();\r\n }\r\n\r\n /** @ignore */\r\n protected _handleValueChanged(e: AXValueChangedEvent) {\r\n if (e.isUserInteraction) {\r\n this.commitValue(e.component.selectedItems, true);\r\n }\r\n }\r\n\r\n /** @ignore */\r\n protected _handleOnItemClick(e: AXItemClickEvent) {\r\n if (!this.multiple) {\r\n this.close();\r\n }\r\n }\r\n\r\n /**\r\n * Handles changes to the internal value. Closes the component if not in multiple mode, and adjusts height after a short delay.\r\n */\r\n override internalValueChanged(): void {\r\n if (!this.multiple) this.close();\r\n setTimeout(() => {\r\n this.detectAutoHeight();\r\n }, 100);\r\n }\r\n\r\n /** @ignore */\r\n private detectAutoHeight() {\r\n const containerWidth: number =\r\n this.getHostElement().querySelector<HTMLDivElement>('.ax-select-box-selection').clientWidth;\r\n const itemsWidth: number = Array.from(\r\n this.getHostElement().querySelectorAll<HTMLDivElement>('.ax-selected-token'),\r\n ).reduce((a, i) => a + i.clientWidth, 0);\r\n this.autoHeight = containerWidth - itemsWidth <= 8;\r\n this.dropdown.updatePosition();\r\n this.cdr.markForCheck();\r\n }\r\n\r\n /** @ignore */\r\n private setDropdownSize(count = 0) {\r\n if (this.dropdown.isActionsheetStyle) {\r\n this.dropdownSizes = {\r\n width: '100%',\r\n height: ['auto', '0px'].includes(this.dropdownSizes.height)\r\n ? `${Math.min(15, count) * 40}px`\r\n : this.dropdownSizes.height,\r\n };\r\n } else {\r\n //TODO: calc min-with from formula or config\r\n const hostWidth = Math.max(this.getHostElement().offsetWidth, this.dropdownWidth);\r\n this.dropdownSizes = {\r\n width: `${hostWidth}px`,\r\n height: count == 0 ? 'auto' : `${Math.min(5, count) * 40}px`,\r\n };\r\n }\r\n setTimeout(() => {\r\n this.dropdown.updatePosition();\r\n });\r\n }\r\n\r\n /** @ignore */\r\n @HostListener('keydown', ['$event'])\r\n _handleKeydown(e: KeyboardEvent) {\r\n if (e.code === 'ArrowDown' || e.code === 'ArrowUp') {\r\n this.selectItemByNav(e.code === 'ArrowDown' ? 1 : -1);\r\n e.preventDefault();\r\n } else if (e.code === 'Backspace') {\r\n this.unselectItems(this.selectedItems.pop());\r\n e.preventDefault();\r\n }\r\n // if ((e.code === 'Space' || e.code === 'Enter') && this.hasItems) {\r\n // if (this.readonly || this.disabled) {\r\n // e.preventDefault();\r\n // e.stopPropagation();\r\n // return;\r\n // }\r\n // const id = document.activeElement?.closest('li')?.dataset?.id;\r\n // this.toggleSelect(id);\r\n // e.preventDefault();\r\n // e.stopPropagation()\r\n // }\r\n }\r\n\r\n /** @ignore */\r\n private selectItemByNav(sign: 1 | -1) {\r\n if (Array.isArray(this.dataSource) && !this.multiple) {\r\n const items = this.normalizeItemsList(this.dataSource);\r\n const _last: any = last(this.selectedItems);\r\n let i = -1;\r\n if (_last) {\r\n i = findLastIndex(items, [this.valueField, _last[this.valueField]]);\r\n }\r\n i += sign;\r\n if (i < 0 || i >= items.length) return;\r\n const next = nth<any>(items, i);\r\n if (next) {\r\n this.selectItems(next);\r\n }\r\n } else {\r\n this.open();\r\n }\r\n }\r\n\r\n /**\r\n * Filters the data source based on the provided search term.\r\n * @param {string} term\r\n */\r\n search(term: string) {\r\n if (term) {\r\n this._listDataSource.filter({\r\n field: this.textField,\r\n value: term,\r\n operator: { type: 'contains' },\r\n });\r\n } else {\r\n this._listDataSource.clearFilter();\r\n }\r\n this._listDataSource.refresh();\r\n }\r\n\r\n /**\r\n * Refreshes the component by resetting state, clearing selection cache, refreshing the list, and closing the component.\r\n */\r\n refresh() {\r\n this.reset(false);\r\n this.clearSelectionCache();\r\n this.list?.refresh();\r\n this.close();\r\n }\r\n}\r\n","<ax-dropdown-box\r\n [disabled]=\"disabled\"\r\n (onOpened)=\"_handleOnOpenedEvent($event)\"\r\n (onClosed)=\"_handleOnClosedEvent($event)\"\r\n [look]=\"look\"\r\n [class.ax-auto-height]=\"autoHeight\"\r\n (focus)=\"emitOnFocusEvent($event)\"\r\n (blur)=\"emitOnBlurEvent($event)\"\r\n>\r\n <ng-container input>\r\n <ng-content select=\"ax-prefix\"> </ng-content>\r\n <div\r\n class=\"ax-select-box-selection ax-content\"\r\n [class.ax-multiple]=\"multiple\"\r\n [tabindex]=\"tabIndex\"\r\n (click)=\"toggle()\"\r\n >\r\n @if (selectedItems.length === 0) {\r\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\r\n {{ placeholder }}\r\n </div>\r\n }\r\n @for (item of selectedItems; track $index) {\r\n @if (selectedTemplate) {\r\n <ng-template\r\n *ngTemplateOutlet=\"selectedTemplate; context: { $implicit: { data: item } }\"\r\n ></ng-template>\r\n } @else {\r\n <div class=\"ax-selected-token\">\r\n {{ getDisplayText(item) }}\r\n @if (!disabled && !readonly && multiple) {\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n @if (selectedItems?.length && !disabled && !readonly) {\r\n <ng-content select=\"ax-clear-button\"></ng-content>\r\n }\r\n <button\r\n type=\"button\"\r\n [disabled]=\"disabled\"\r\n [tabIndex]=\"-1\"\r\n class=\"ax-general-button ax-button-icon\"\r\n (click)=\"toggle()\"\r\n >\r\n <!-- @if (isLoading() && !isOpen) {\r\n <ax-loading type=\"spinner\"></ax-loading>\r\n } @else { -->\r\n <span\r\n class=\"ax-icon ax-icon-chevron-left ax-arrow-button\"\r\n [ngClass]=\"{\r\n '-rotation-90': !isOpen,\r\n 'rotation-90': isOpen,\r\n }\"\r\n ></span>\r\n <!-- } -->\r\n </button>\r\n <ng-content select=\"ax-suffix\"> </ng-content>\r\n <ng-template #search>\r\n <ng-content select=\"ax-search-box\"> </ng-content>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container panel>\r\n <div #panel class=\"ax-select-box-panel\" [style.min-width]=\"dropdownSizes.width\">\r\n @if (dropdown.isActionsheetStyle) {\r\n <ax-header class=\"ax-solid\">\r\n <ax-title>{{ caption || placeholder || 'selectbox.popover.title' | translate | async }}</ax-title>\r\n <ax-close-button\r\n [icon]=\"multiple ? 'ax-icon ax-icon-check !ax-text-primary-500' : 'ax-icon ax-icon-close'\"\r\n ></ax-close-button>\r\n </ax-header>\r\n }\r\n @if (searchBox) {\r\n <div class=\"ax-search-container\">\r\n <ng-template [ngTemplateOutlet]=\"search\"></ng-template>\r\n </div>\r\n }\r\n @if (renderList) {\r\n <ax-list\r\n [readonly]=\"readonly\"\r\n [dataSource]=\"_listDataSource\"\r\n [multiple]=\"multiple\"\r\n [style.height]=\"dropdownSizes.height\"\r\n [valueField]=\"valueField\"\r\n [textField]=\"textField\"\r\n [textTemplate]=\"textTemplate\"\r\n [emptyTemplate]=\"emptyTemplate ?? empty\"\r\n [itemTemplate]=\"itemTemplate\"\r\n [loadingTemplate]=\"loadingTemplate\"\r\n [ngModel]=\"value\"\r\n (onValueChanged)=\"_handleValueChanged($event)\"\r\n [selectionMode]=\"'item'\"\r\n (onItemClick)=\"_handleOnItemClick($event)\"\r\n >\r\n <ng-template #empty> {{ 'no-result-found' | translate | async }} </ng-template>\r\n </ax-list>\r\n }\r\n\r\n @if (isLoading()) {\r\n @if (loadingTemplate) {\r\n <ng-template *ngTemplateOutlet=\"loadingTemplate\"></ng-template>\r\n } @else {\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading></ax-loading>\r\n </div>\r\n }\r\n }\r\n\r\n <ng-content select=\"ax-footer\"> </ng-content>\r\n </div>\r\n </ng-container>\r\n</ax-dropdown-box>\r\n<ng-content select=\"ax-validation-rule\"> </ng-content>\r\n","import { AXBadgeModule } from '@acorex/components/badge';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { AXCommonModule } from '@acorex/components/common';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXListModule } from '@acorex/components/list';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXSelectBoxComponent } from './select-box.component';\n\n@NgModule({\n imports: [\n CommonModule,\n AXCommonModule,\n FormsModule,\n AXCheckBoxModule,\n AXBadgeModule,\n AXDecoratorModule,\n AXTranslationModule,\n AXPopoverModule,\n AXLoadingModule,\n A11yModule,\n AXTextBoxModule,\n AXDropdownModule,\n AXListModule,\n ],\n exports: [AXSelectBoxComponent],\n declarations: [AXSelectBoxComponent],\n providers: [],\n})\nexport class AXSelectBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA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;YACf,gBAAgB;YAChB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAMH,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBApB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,WAAW;wBACX,gBAAgB;wBAChB,aAAa;wBACb,iBAAiB;wBACjB,mBAAmB;wBACnB,eAAe;wBACf,eAAe;wBACf,UAAU;wBACV,eAAe;wBACf,gBAAgB;wBAChB,YAAY;AACb,qBAAA;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACpCD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-select-box.mjs","sources":["../../../../libs/components/select-box/src/lib/select-box.component.ts","../../../../libs/components/select-box/src/lib/select-box.component.html","../../../../libs/components/select-box/src/lib/select-box.module.ts","../../../../libs/components/select-box/src/acorex-components-select-box.ts"],"sourcesContent":["import {\r\n AXClearableComponent,\r\n AXClosbaleComponent,\r\n AXComponent,\r\n AXDataSource,\r\n AXEvent,\r\n AXFocusableComponent,\r\n AXHotkeysService,\r\n AXItemClickEvent,\r\n AXSearchableComponent,\r\n AXValuableComponent,\r\n AXValueChangedEvent,\r\n AX_SELECTION_DATA_TOKEN,\r\n MXLookComponent,\r\n MXSelectionBridgeService,\r\n MXSelectionValueComponent,\r\n convertArrayToDataSource,\r\n} from '@acorex/components/common';\r\nimport { AXDropdownBoxComponent, MXDropdownBoxBaseComponent } from '@acorex/components/dropdown';\r\nimport { AXListComponent } from '@acorex/components/list';\r\nimport { AXSearchBoxComponent } from '@acorex/components/search-box';\r\nimport { AXUnsubscriber } from '@acorex/core/utils';\r\nimport {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChild,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnDestroy,\r\n TemplateRef,\r\n ViewChild,\r\n ViewEncapsulation,\r\n WritableSignal,\r\n forwardRef,\r\n inject,\r\n signal,\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { findLastIndex, last, nth } from 'lodash-es';\r\nimport { classes } from 'polytype';\r\nimport { Observable } from 'rxjs';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n * @category\r\n */\r\n@Component({\r\n selector: 'ax-select-box',\r\n templateUrl: './select-box.component.html',\r\n styleUrls: ['./select-box.component.scss'],\r\n inputs: [\r\n 'disabled',\r\n 'readonly',\r\n 'tabIndex',\r\n 'placeholder',\r\n 'minValue',\r\n 'maxValue',\r\n 'value',\r\n 'state',\r\n 'name',\r\n 'id',\r\n 'type',\r\n 'look',\r\n 'multiple',\r\n 'valueField',\r\n 'textField',\r\n 'textTemplate',\r\n ],\r\n outputs: [\r\n 'valueChange',\r\n 'stateChange',\r\n 'onValueChanged',\r\n 'onBlur',\r\n 'onFocus',\r\n 'readonlyChange',\r\n 'disabledChange',\r\n 'onOpened',\r\n 'onClosed',\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [\r\n { provide: AXComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXFocusableComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXValuableComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXClearableComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXClosbaleComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXSearchableComponent, useExisting: AXSelectBoxComponent },\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => AXSelectBoxComponent),\r\n multi: true,\r\n },\r\n {\r\n provide: AX_SELECTION_DATA_TOKEN,\r\n useClass: MXSelectionBridgeService,\r\n },\r\n AXUnsubscriber,\r\n ],\r\n host: { ngSkipHydration: 'true' },\r\n})\r\nexport class AXSelectBoxComponent\r\n extends classes(MXDropdownBoxBaseComponent, MXSelectionValueComponent, MXLookComponent)\r\n implements AfterViewInit, OnDestroy\r\n{\r\n /** @ignore */\r\n private hotKeyService: AXHotkeysService = inject(AXHotkeysService);\r\n\r\n /** @ignore */\r\n protected isLoading: WritableSignal<boolean> = signal(false);\r\n\r\n /** @ignore */\r\n protected renderList = false;\r\n\r\n /** @ignore */\r\n protected dropdownSizes: { width: string; height: string } = {\r\n width: '100%',\r\n height: 'auto',\r\n };\r\n\r\n /** @ignore */\r\n protected _listDataSource: AXDataSource<any> = convertArrayToDataSource([], {\r\n key: this.valueField,\r\n pageSize: 10,\r\n });\r\n\r\n /** @ignore */\r\n private _dataSource: AXDataSource<any> | any[];\r\n\r\n /**\r\n * Gets the data source for the component, which can be either an `AXDataSource` or an array of items.\r\n * @returns {AXDataSource<any> | any[]}\r\n */\r\n public get dataSource(): AXDataSource<any> | any[] {\r\n return this._dataSource;\r\n }\r\n\r\n /**\r\n * Sets the data source, either as an `AXDataSource` or an array.\r\n * @param {AXDataSource<any> | any[]} v\r\n */\r\n @Input()\r\n\r\n /**\r\n * Sets the data source, either as `AXDataSource` or an array. Converts arrays to `AXDataSource` and subscribes to data and loading changes.\r\n * @param {AXDataSource<any> | any[]} v\r\n */\r\n public set dataSource(v: AXDataSource<any> | any[]) {\r\n this._dataSource = v;\r\n if (Array.isArray(v)) {\r\n this._listDataSource = convertArrayToDataSource(v, {\r\n key: this.valueField,\r\n pageSize: 10,\r\n });\r\n } else {\r\n this._listDataSource = this.dataSource as AXDataSource<any>;\r\n }\r\n //\r\n //\r\n this._listDataSource.onChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((data) => {\r\n this.setDropdownSize(data.totalCount);\r\n });\r\n this._listDataSource.onLoadingChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((loading) => {\r\n this.isLoading.set(loading);\r\n });\r\n }\r\n\r\n /**\r\n * The placeholder text displayed when the component is empty.\r\n * @param {string} placeholder\r\n */\r\n @Input()\r\n placeholder: string;\r\n\r\n /**\r\n * The caption text to be displayed in the component.\r\n * @param {string} caption\r\n */\r\n @Input()\r\n caption: string;\r\n\r\n /**\r\n * The template used to customize the rendering of items.\r\n * @param {TemplateRef<any>} itemTemplate\r\n */\r\n @Input()\r\n itemTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The template used to customize the rendering of selected items.\r\n * @param {TemplateRef<any>} selectedTemplate\r\n */\r\n @Input()\r\n selectedTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The template used to display when there are no items.\r\n * @param {TemplateRef<any>} emptyTemplate\r\n */\r\n @Input()\r\n emptyTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The template used to display while loading.\r\n * @param {TemplateRef<any>} loadingTemplate\r\n */\r\n @Input()\r\n loadingTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The width of the dropdown in pixels.\r\n * @defaultValue 260\r\n */\r\n @Input()\r\n dropdownWidth = 260;\r\n\r\n /** @ignore */\r\n @ViewChild('panel') panel!: ElementRef<HTMLDivElement>;\r\n\r\n /** @ignore */\r\n @ViewChild(AXListComponent)\r\n list: AXListComponent;\r\n\r\n /** @ignore */\r\n @ContentChild(AXSearchBoxComponent, { static: true })\r\n searchBox: AXSearchBoxComponent;\r\n\r\n /** @ignore */\r\n @ViewChild(AXDropdownBoxComponent, { static: true })\r\n protected dropdown: AXDropdownBoxComponent;\r\n\r\n /** @ignore */\r\n protected autoHeight = false;\r\n\r\n /**\r\n * Service for managing selection data, injected via `AX_SELECTION_DATA_TOKEN`.\r\n */\r\n public selectionService = inject(AX_SELECTION_DATA_TOKEN);\r\n\r\n searchEvent: Observable<any>;\r\n\r\n /** @ignore */\r\n private _unsubscriber = inject(AXUnsubscriber);\r\n\r\n /** @ignore */\r\n protected override ngOnInit(): void {\r\n super.ngOnInit();\r\n //\r\n this.registerValidation();\r\n }\r\n\r\n /** @ignore */\r\n ngAfterViewInit() {\r\n this.setDropdownSize();\r\n }\r\n\r\n /** @ignore */\r\n override ngOnDestroy(): void {\r\n this.searchBox?.onKeyDown.unsubscribe();\r\n }\r\n\r\n /**\r\n * Retrieves an item by its key.\r\n * @param {any} key\r\n */\r\n getItemByKey(key: any): Promise<any> | any {\r\n const startTime = Date.now();\r\n\r\n const check = async () => {\r\n while (Date.now() - startTime < 2000) {\r\n if (typeof this._listDataSource.find === 'function') {\r\n return this._listDataSource.find(key);\r\n } else {\r\n await new Promise((resolve) => setTimeout(resolve, 50));\r\n }\r\n }\r\n console.warn('Timeout reached without finding the \"getItemByKey\" method');\r\n };\r\n return check();\r\n }\r\n\r\n /** @ignore */\r\n protected _handleOnOpenedEvent(e: AXEvent) {\r\n this.renderList = true;\r\n this.list?.render();\r\n this._handleFocus();\r\n //\r\n this.onOpened.emit({\r\n component: this,\r\n isUserInteraction: e.isUserInteraction,\r\n });\r\n }\r\n\r\n /** @ignore */\r\n protected _handleOnClosedEvent(e: AXEvent) {\r\n //this.input.focus();\r\n this.onClosed.emit({\r\n component: this,\r\n isUserInteraction: e.isUserInteraction,\r\n });\r\n this._unsubscriber.unsubscribe();\r\n }\r\n\r\n /** @ignore */\r\n protected _handleFocus() {\r\n setTimeout(() => {\r\n if (this.searchBox) {\r\n this.searchBox.focus();\r\n //TODO: unsubscribe\r\n this.hotKeyService\r\n .addShortcut({ keys: 'Control.f', element: this.panel.nativeElement })\r\n .pipe(this._unsubscriber.takeUntilDestroy)\r\n .subscribe(() => {\r\n this.searchBox.focus();\r\n });\r\n this.searchBox.onKeyDown.pipe(this._unsubscriber.takeUntilDestroy).subscribe((e) => {\r\n if (e.nativeEvent.code === 'ArrowDown' || e.nativeEvent.key === 'ArrowDown') {\r\n this.list?.focus();\r\n e.nativeEvent.preventDefault();\r\n }\r\n });\r\n } else {\r\n this.list?.focus();\r\n }\r\n });\r\n }\r\n\r\n /** @ignore */\r\n protected _handleBadgeRemove(e: MouseEvent, item) {\r\n this.unselectItems(item);\r\n e.stopPropagation();\r\n }\r\n\r\n /** @ignore */\r\n protected _handleValueChanged(e: AXValueChangedEvent) {\r\n if (e.isUserInteraction) {\r\n this.commitValue(e.component.selectedItems, true);\r\n }\r\n }\r\n\r\n /** @ignore */\r\n protected _handleOnItemClick(e: AXItemClickEvent) {\r\n if (!this.multiple) {\r\n this.close();\r\n }\r\n }\r\n\r\n /**\r\n * Handles changes to the internal value. Closes the component if not in multiple mode, and adjusts height after a short delay.\r\n */\r\n override internalValueChanged(): void {\r\n if (!this.multiple) this.close();\r\n setTimeout(() => {\r\n this.detectAutoHeight();\r\n }, 100);\r\n }\r\n\r\n /** @ignore */\r\n private detectAutoHeight() {\r\n const containerWidth: number =\r\n this.getHostElement().querySelector<HTMLDivElement>('.ax-select-box-selection').clientWidth;\r\n const itemsWidth: number = Array.from(\r\n this.getHostElement().querySelectorAll<HTMLDivElement>('.ax-selected-token'),\r\n ).reduce((a, i) => a + i.clientWidth, 0);\r\n this.autoHeight = containerWidth - itemsWidth <= 8;\r\n this.dropdown.updatePosition();\r\n this.cdr.markForCheck();\r\n }\r\n\r\n /** @ignore */\r\n private setDropdownSize(count = 0) {\r\n if (this.dropdown.isActionsheetStyle) {\r\n this.dropdownSizes = {\r\n width: '100%',\r\n height: ['auto', '0px'].includes(this.dropdownSizes.height)\r\n ? `${Math.min(15, count) * 40}px`\r\n : this.dropdownSizes.height,\r\n };\r\n } else {\r\n //TODO: calc min-with from formula or config\r\n const hostWidth = Math.max(this.getHostElement().offsetWidth, this.dropdownWidth);\r\n this.dropdownSizes = {\r\n width: `${hostWidth}px`,\r\n height: count == 0 ? 'auto' : `${Math.min(5, count) * 40}px`,\r\n };\r\n }\r\n setTimeout(() => {\r\n this.dropdown.updatePosition();\r\n });\r\n }\r\n\r\n /** @ignore */\r\n @HostListener('keydown', ['$event'])\r\n _handleKeydown(e: KeyboardEvent) {\r\n if (e.code === 'ArrowDown' || e.code === 'ArrowUp') {\r\n this.selectItemByNav(e.code === 'ArrowDown' ? 1 : -1);\r\n e.preventDefault();\r\n } else if (e.code === 'Backspace') {\r\n this.unselectItems(this.selectedItems.pop());\r\n e.preventDefault();\r\n }\r\n // if ((e.code === 'Space' || e.code === 'Enter') && this.hasItems) {\r\n // if (this.readonly || this.disabled) {\r\n // e.preventDefault();\r\n // e.stopPropagation();\r\n // return;\r\n // }\r\n // const id = document.activeElement?.closest('li')?.dataset?.id;\r\n // this.toggleSelect(id);\r\n // e.preventDefault();\r\n // e.stopPropagation()\r\n // }\r\n }\r\n\r\n /** @ignore */\r\n private selectItemByNav(sign: 1 | -1) {\r\n if (Array.isArray(this.dataSource) && !this.multiple) {\r\n const items = this.normalizeItemsList(this.dataSource);\r\n const _last: any = last(this.selectedItems);\r\n let i = -1;\r\n if (_last) {\r\n i = findLastIndex(items, [this.valueField, _last[this.valueField]]);\r\n }\r\n i += sign;\r\n if (i < 0 || i >= items.length) return;\r\n const next = nth<any>(items, i);\r\n if (next) {\r\n this.selectItems(next);\r\n }\r\n } else {\r\n this.open();\r\n }\r\n }\r\n\r\n /**\r\n * Filters the data source based on the provided search term.\r\n * @param {string} term\r\n */\r\n search(term: string) {\r\n if (term) {\r\n this._listDataSource.filter({\r\n field: this.textField,\r\n value: term,\r\n operator: { type: 'contains' },\r\n });\r\n } else {\r\n this._listDataSource.clearFilter();\r\n }\r\n this._listDataSource.refresh();\r\n }\r\n\r\n /**\r\n * Refreshes the component by resetting state, clearing selection cache, refreshing the list, and closing the component.\r\n */\r\n refresh() {\r\n this.reset(false);\r\n this.clearSelectionCache();\r\n this.list?.refresh();\r\n this.close();\r\n }\r\n}\r\n","<ax-dropdown-box\r\n [disabled]=\"disabled\"\r\n (onOpened)=\"_handleOnOpenedEvent($event)\"\r\n (onClosed)=\"_handleOnClosedEvent($event)\"\r\n [look]=\"look\"\r\n [class.ax-auto-height]=\"autoHeight\"\r\n (focus)=\"emitOnFocusEvent($event)\"\r\n (blur)=\"emitOnBlurEvent($event)\"\r\n>\r\n <ng-container input>\r\n <ng-content select=\"ax-prefix\"> </ng-content>\r\n <div\r\n class=\"ax-select-box-selection ax-content\"\r\n [class.ax-multiple]=\"multiple\"\r\n [tabindex]=\"tabIndex\"\r\n (click)=\"toggle()\"\r\n >\r\n @if (selectedItems.length === 0) {\r\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\r\n {{ placeholder }}\r\n </div>\r\n }\r\n @for (item of selectedItems; track $index) {\r\n @if (selectedTemplate) {\r\n <ng-template\r\n *ngTemplateOutlet=\"selectedTemplate; context: { $implicit: { data: item } }\"\r\n ></ng-template>\r\n } @else {\r\n <div class=\"ax-selected-token\">\r\n {{ getDisplayText(item) }}\r\n @if (!disabled && !readonly && multiple) {\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n @if (selectedItems?.length && !disabled && !readonly) {\r\n <ng-content select=\"ax-clear-button\"></ng-content>\r\n }\r\n <button\r\n type=\"button\"\r\n [disabled]=\"disabled\"\r\n [tabIndex]=\"-1\"\r\n class=\"ax-general-button ax-button-icon\"\r\n (click)=\"toggle()\"\r\n >\r\n <!-- @if (isLoading() && !isOpen) {\r\n <ax-loading type=\"spinner\"></ax-loading>\r\n } @else { -->\r\n <span\r\n class=\"ax-icon ax-icon-chevron-left ax-arrow-button\"\r\n [ngClass]=\"{\r\n '-rotation-90': !isOpen,\r\n 'rotation-90': isOpen,\r\n }\"\r\n ></span>\r\n <!-- } -->\r\n </button>\r\n <ng-content select=\"ax-suffix\"> </ng-content>\r\n <ng-template #search>\r\n <ng-content select=\"ax-search-box\"> </ng-content>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container panel>\r\n <div #panel class=\"ax-select-box-panel\" [style.min-width]=\"dropdownSizes.width\">\r\n @if (dropdown.isActionsheetStyle) {\r\n <ax-header class=\"ax-solid\">\r\n <ax-title>{{ caption || placeholder || 'selectbox.popover.title' | translate | async }}</ax-title>\r\n <ax-close-button\r\n [icon]=\"multiple ? 'ax-icon ax-icon-check !ax-text-primary-500' : 'ax-icon ax-icon-close'\"\r\n ></ax-close-button>\r\n </ax-header>\r\n }\r\n @if (searchBox) {\r\n <div class=\"ax-search-container\">\r\n <ng-template [ngTemplateOutlet]=\"search\"></ng-template>\r\n </div>\r\n }\r\n @if (renderList) {\r\n <ax-list\r\n [readonly]=\"readonly\"\r\n [dataSource]=\"_listDataSource\"\r\n [multiple]=\"multiple\"\r\n [style.height]=\"dropdownSizes.height\"\r\n [valueField]=\"valueField\"\r\n [textField]=\"textField\"\r\n [textTemplate]=\"textTemplate\"\r\n [emptyTemplate]=\"emptyTemplate ?? empty\"\r\n [itemTemplate]=\"itemTemplate\"\r\n [loadingTemplate]=\"loadingTemplate\"\r\n [ngModel]=\"value\"\r\n (onValueChanged)=\"_handleValueChanged($event)\"\r\n [selectionMode]=\"'item'\"\r\n (onItemClick)=\"_handleOnItemClick($event)\"\r\n >\r\n <ng-template #empty> {{ 'no-result-found' | translate | async }} </ng-template>\r\n </ax-list>\r\n }\r\n\r\n @if (isLoading()) {\r\n @if (loadingTemplate) {\r\n <ng-template *ngTemplateOutlet=\"loadingTemplate\"></ng-template>\r\n } @else {\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading></ax-loading>\r\n </div>\r\n }\r\n }\r\n\r\n <ng-content select=\"ax-footer\"> </ng-content>\r\n </div>\r\n </ng-container>\r\n</ax-dropdown-box>\r\n<ng-content select=\"ax-validation-rule\"> </ng-content>\r\n","import { AXBadgeModule } from '@acorex/components/badge';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { AXCommonModule } from '@acorex/components/common';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXListModule } from '@acorex/components/list';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXSelectBoxComponent } from './select-box.component';\n\n@NgModule({\n imports: [\n CommonModule,\n AXCommonModule,\n FormsModule,\n AXCheckBoxModule,\n AXBadgeModule,\n AXDecoratorModule,\n AXTranslationModule,\n AXPopoverModule,\n AXLoadingModule,\n A11yModule,\n AXTextBoxModule,\n AXDropdownModule,\n AXListModule,\n ],\n exports: [AXSelectBoxComponent],\n declarations: [AXSelectBoxComponent],\n providers: [],\n})\nexport class AXSelectBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA;;;AAGG;AAwDG,MAAO,oBACX,SAAQ,OAAO,CAAC,0BAA0B,EAAE,yBAAyB,EAAE,eAAe,CAAC,CAAA;AAxDzF,IAAA,WAAA,GAAA;;;AA4DU,QAAA,IAAA,CAAA,aAAa,GAAqB,MAAM,CAAC,gBAAgB,CAAC;;AAGxD,QAAA,IAAA,CAAA,SAAS,GAA4B,MAAM,CAAC,KAAK,CAAC;;QAGlD,IAAU,CAAA,UAAA,GAAG,KAAK;;AAGlB,QAAA,IAAA,CAAA,aAAa,GAAsC;AAC3D,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE,MAAM;SACf;;AAGS,QAAA,IAAA,CAAA,eAAe,GAAsB,wBAAwB,CAAC,EAAE,EAAE;YAC1E,GAAG,EAAE,IAAI,CAAC,UAAU;AACpB,YAAA,QAAQ,EAAE,EAAE;AACb,SAAA,CAAC;AAqFF;;;AAGG;QAEH,IAAa,CAAA,aAAA,GAAG,GAAG;;QAkBT,IAAU,CAAA,UAAA,GAAG,KAAK;AAE5B;;AAEG;AACI,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,uBAAuB,CAAC;;AAKjD,QAA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,CAfjC,YAAY;YACZ,cAAc;YACd,WAAW;YACX,gBAAgB;YAChB,aAAa;YACb,iBAAiB;YACjB,mBAAmB;YACnB,eAAe;YACf,eAAe;YACf,UAAU;YACV,eAAe;YACf,gBAAgB;AAChB,YAAA,YAAY,aAEJ,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAInB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAlB1B,YAAY;YACZ,cAAc;YACd,WAAW;YACX,gBAAgB;YAChB,aAAa;YACb,iBAAiB;YACjB,mBAAmB;YACnB,eAAe;YACf,eAAe;YACf,UAAU;YACV,eAAe;YACf,gBAAgB;YAChB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAMH,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBApB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,WAAW;wBACX,gBAAgB;wBAChB,aAAa;wBACb,iBAAiB;wBACjB,mBAAmB;wBACnB,eAAe;wBACf,eAAe;wBACf,UAAU;wBACV,eAAe;wBACf,gBAAgB;wBAChB,YAAY;AACb,qBAAA;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACpCD;;AAEG;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { MXSelectionValueComponent, AXComponent, AXFocusableComponent, AXValuableComponent,
|
1
|
+
import { MXSelectionValueComponent, AXComponent, AXFocusableComponent, AXValuableComponent, MXSelectionBridgeService, AX_SELECTION_DATA_TOKEN } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { forwardRef,
|
3
|
+
import { input, effect, forwardRef, HostBinding, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
5
5
|
import * as i1 from '@angular/common';
|
6
6
|
import { CommonModule } from '@angular/common';
|
@@ -18,14 +18,37 @@ import { AXRadioModule } from '@acorex/components/radio';
|
|
18
18
|
class AXSelectionListComponent extends MXSelectionValueComponent {
|
19
19
|
constructor() {
|
20
20
|
super(...arguments);
|
21
|
-
/**
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
/**
|
22
|
+
* sets the direction of the component.
|
23
|
+
* @param {AXDirection} value
|
24
|
+
*/
|
25
|
+
this.direction = input('horizontal');
|
26
|
+
/**
|
27
|
+
* The custom template used for rendering content.
|
28
|
+
*
|
29
|
+
* @param {TemplateRef<unknown>} customTemplate
|
30
|
+
*/
|
31
|
+
this.customTemplate = input();
|
32
|
+
/**
|
33
|
+
* @param {boolean} v
|
34
|
+
* Sets the visibility state of the control.
|
35
|
+
*/
|
36
|
+
this.showControl = input(true);
|
37
|
+
/**
|
38
|
+
* Sets the list of items.
|
39
|
+
* @param {void}
|
40
|
+
*/
|
41
|
+
this.items = input([]);
|
42
|
+
this.#onItemsChange = effect(() => {
|
43
|
+
this.items();
|
44
|
+
this.clearSelectionCache();
|
45
|
+
});
|
46
|
+
/**
|
47
|
+
* Sets the field used for displaying hints.
|
48
|
+
*
|
49
|
+
* @param {string} v
|
50
|
+
*/
|
51
|
+
this.hintField = input('hint');
|
29
52
|
/**
|
30
53
|
* Defines the visual appearance of the selection list.
|
31
54
|
*
|
@@ -33,80 +56,14 @@ class AXSelectionListComponent extends MXSelectionValueComponent {
|
|
33
56
|
*/
|
34
57
|
this.look = 'solid';
|
35
58
|
}
|
36
|
-
|
37
|
-
* Gets or sets the direction of the component.
|
38
|
-
* @param {AXDirection} value
|
39
|
-
*/
|
40
|
-
get direction() {
|
41
|
-
return this._direction;
|
42
|
-
}
|
43
|
-
/**
|
44
|
-
* Sets the direction of the component.
|
45
|
-
*
|
46
|
-
* @param {AXDirection} v
|
47
|
-
*/
|
48
|
-
set direction(v) {
|
49
|
-
this._direction = v;
|
50
|
-
}
|
51
|
-
/**
|
52
|
-
* @param {void}
|
53
|
-
* Gets the current state of the control visibility.
|
54
|
-
*/
|
55
|
-
get showControl() {
|
56
|
-
return this._showControl;
|
57
|
-
}
|
58
|
-
/**
|
59
|
-
* @param {boolean} v
|
60
|
-
* Sets the visibility state of the control.
|
61
|
-
*/
|
62
|
-
set showControl(v) {
|
63
|
-
this.setOption({
|
64
|
-
name: 'showControl',
|
65
|
-
value: v,
|
66
|
-
});
|
67
|
-
}
|
68
|
-
/**
|
69
|
-
* Gets the list of items.
|
70
|
-
* @param {void}
|
71
|
-
*/
|
72
|
-
get items() {
|
73
|
-
return this._items;
|
74
|
-
}
|
75
|
-
/**
|
76
|
-
* Sets the list of items.
|
77
|
-
*
|
78
|
-
* @param {any[]} v
|
79
|
-
*/
|
80
|
-
set items(v) {
|
81
|
-
this.setOption({
|
82
|
-
name: 'items',
|
83
|
-
value: v,
|
84
|
-
});
|
85
|
-
}
|
86
|
-
/**
|
87
|
-
* Gets the field used for displaying hints.
|
88
|
-
*/
|
89
|
-
get hintField() {
|
90
|
-
return this._hintField;
|
91
|
-
}
|
92
|
-
/**
|
93
|
-
* Sets the field used for displaying hints.
|
94
|
-
*
|
95
|
-
* @param {string} v
|
96
|
-
*/
|
97
|
-
set hintField(v) {
|
98
|
-
this.setOption({
|
99
|
-
name: 'hintField',
|
100
|
-
value: v,
|
101
|
-
});
|
102
|
-
}
|
59
|
+
#onItemsChange;
|
103
60
|
/**
|
104
61
|
* Retrieves an item from the list by its key.
|
105
62
|
*
|
106
63
|
* @param {unknown} key - The key to search for.
|
107
64
|
*/
|
108
65
|
getItemByKey(key) {
|
109
|
-
return this.items.find((c) => c == this.value || c[this.valueField] == key);
|
66
|
+
return this.items().find((c) => c == this.value || c[this.valueField] == key);
|
110
67
|
}
|
111
68
|
/** @ignore */
|
112
69
|
_handleOnItemValueChange(item, e) {
|
@@ -127,7 +84,7 @@ class AXSelectionListComponent extends MXSelectionValueComponent {
|
|
127
84
|
];
|
128
85
|
}
|
129
86
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXSelectionListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
130
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXSelectionListComponent, selector: "ax-selection-list", inputs: { id: "id", name: "name", disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", size: "size", value: "value", valueField: "valueField", textField: "textField",
|
87
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXSelectionListComponent, selector: "ax-selection-list", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, 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 }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", 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 }, readonlyField: { classPropertyName: "readonlyField", publicName: "readonlyField", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, customTemplate: { classPropertyName: "customTemplate", publicName: "customTemplate", isSignal: true, isRequired: false, transformFunction: null }, showControl: { classPropertyName: "showControl", publicName: "showControl", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, hintField: { classPropertyName: "hintField", publicName: "hintField", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
|
131
88
|
{ provide: AXComponent, useExisting: AXSelectionListComponent },
|
132
89
|
{ provide: AXFocusableComponent, useExisting: AXSelectionListComponent },
|
133
90
|
{ provide: AXValuableComponent, useExisting: AXSelectionListComponent },
|
@@ -140,7 +97,7 @@ class AXSelectionListComponent extends MXSelectionValueComponent {
|
|
140
97
|
provide: AX_SELECTION_DATA_TOKEN,
|
141
98
|
useClass: MXSelectionBridgeService,
|
142
99
|
},
|
143
|
-
], usesInheritance: true, ngImport: i0, template: "<ul class=\"ax-{{ direction }}\">\n @for (item of items; let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate; context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-dark ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,.ax-dark ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{background-color:rgba(var(--ax-color-primary-900),.25)}ax-selection-list.ax-look-divided ul.ax-vertical li:last-child label,ax-selection-list.ax-look-divided ul.ax-horizontal li:last-child label{border-style:none}ax-selection-list.ax-look-divided ul.ax-vertical>li label{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default));padding-bottom:.875rem}ax-selection-list.ax-look-divided ul.ax-horizontal>li label{border-inline-end-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul{gap:.75rem}ax-selection-list.ax-look-card ul.ax-vertical>li label,ax-selection-list.ax-look-card ul.ax-horizontal>li label{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{border-color:rgba(var(--ax-color-primary-500));background-color:rgba(var(--ax-color-primary-50))}ax-selection-list.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-selection-list ul{display:flex;flex-wrap:wrap}ax-selection-list ul.ax-vertical{flex-direction:column}ax-selection-list ul.ax-horizontal{flex-direction:row}ax-selection-list ul li{cursor:pointer;-webkit-user-select:none;user-select:none}ax-selection-list ul li label{display:flex;cursor:pointer;align-items:flex-start;padding:.5rem .75rem}ax-selection-list ul li label.ax-hide-control .ax-checkbox,ax-selection-list ul li label.ax-hide-control .ax-radio{display:none}ax-selection-list ul li label.ax-hide-control>div{margin-inline-start:0px}ax-selection-list ul li label .ax-checkbox,ax-selection-list ul li label .ax-radio{margin-top:.25rem}ax-selection-list ul li label>div{margin-inline-start:.75rem;font-size:.875rem;line-height:1.25rem;font-weight:500}ax-selection-list ul li label>div .ax-hint-text{margin-top:.25rem;font-weight:400;color:rgb(var(--ax-color-text-default),.75)}ax-selection-list ul li.ax-state-disabled{opacity:.5}ax-selection-list ul li.ax-state-disabled *{cursor:not-allowed}ax-selection-list.ax-state-error{color:rgba(var(--ax-color-danger-500))}ax-selection-list.ax-state-error .ax-checkbox-checkmark,ax-selection-list.ax-state-error .ax-radio-checkmark{border-color:rgba(var(--ax-color-danger-500))}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
100
|
+
], usesInheritance: true, ngImport: i0, template: "<ul class=\"ax-{{ direction() }}\">\n @for (item of items(); let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl()\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate()) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate(); context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField()]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField()] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-dark ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,.ax-dark ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{background-color:rgba(var(--ax-color-primary-900),.25)}ax-selection-list.ax-look-divided ul.ax-vertical li:last-child label,ax-selection-list.ax-look-divided ul.ax-horizontal li:last-child label{border-style:none}ax-selection-list.ax-look-divided ul.ax-vertical>li label{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default));padding-bottom:.875rem}ax-selection-list.ax-look-divided ul.ax-horizontal>li label{border-inline-end-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul{gap:.75rem}ax-selection-list.ax-look-card ul.ax-vertical>li label,ax-selection-list.ax-look-card ul.ax-horizontal>li label{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{border-color:rgba(var(--ax-color-primary-500));background-color:rgba(var(--ax-color-primary-50))}ax-selection-list.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-selection-list ul{display:flex;flex-wrap:wrap}ax-selection-list ul.ax-vertical{flex-direction:column}ax-selection-list ul.ax-horizontal{flex-direction:row}ax-selection-list ul li{cursor:pointer;-webkit-user-select:none;user-select:none}ax-selection-list ul li label{display:flex;cursor:pointer;align-items:flex-start;padding:.5rem .75rem}ax-selection-list ul li label.ax-hide-control .ax-checkbox,ax-selection-list ul li label.ax-hide-control .ax-radio{display:none}ax-selection-list ul li label.ax-hide-control>div{margin-inline-start:0px}ax-selection-list ul li label .ax-checkbox,ax-selection-list ul li label .ax-radio{margin-top:.25rem}ax-selection-list ul li label>div{margin-inline-start:.75rem;font-size:.875rem;line-height:1.25rem;font-weight:500}ax-selection-list ul li label>div .ax-hint-text{margin-top:.25rem;font-weight:400;color:rgb(var(--ax-color-text-default),.75)}ax-selection-list ul li.ax-state-disabled{opacity:.5}ax-selection-list ul li.ax-state-disabled *{cursor:not-allowed}ax-selection-list.ax-state-error{color:rgba(var(--ax-color-danger-500))}ax-selection-list.ax-state-error .ax-checkbox-checkmark,ax-selection-list.ax-state-error .ax-radio-checkmark{border-color:rgba(var(--ax-color-danger-500))}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
144
101
|
}
|
145
102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXSelectionListComponent, decorators: [{
|
146
103
|
type: Component,
|
@@ -154,7 +111,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
154
111
|
'value',
|
155
112
|
'valueField',
|
156
113
|
'textField',
|
157
|
-
'hintField',
|
158
114
|
'disabledField',
|
159
115
|
'readonlyField',
|
160
116
|
'multiple',
|
@@ -171,16 +127,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
171
127
|
provide: AX_SELECTION_DATA_TOKEN,
|
172
128
|
useClass: MXSelectionBridgeService,
|
173
129
|
},
|
174
|
-
], template: "<ul class=\"ax-{{ direction }}\">\n @for (item of items; let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate; context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-dark ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,.ax-dark ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{background-color:rgba(var(--ax-color-primary-900),.25)}ax-selection-list.ax-look-divided ul.ax-vertical li:last-child label,ax-selection-list.ax-look-divided ul.ax-horizontal li:last-child label{border-style:none}ax-selection-list.ax-look-divided ul.ax-vertical>li label{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default));padding-bottom:.875rem}ax-selection-list.ax-look-divided ul.ax-horizontal>li label{border-inline-end-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul{gap:.75rem}ax-selection-list.ax-look-card ul.ax-vertical>li label,ax-selection-list.ax-look-card ul.ax-horizontal>li label{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{border-color:rgba(var(--ax-color-primary-500));background-color:rgba(var(--ax-color-primary-50))}ax-selection-list.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-selection-list ul{display:flex;flex-wrap:wrap}ax-selection-list ul.ax-vertical{flex-direction:column}ax-selection-list ul.ax-horizontal{flex-direction:row}ax-selection-list ul li{cursor:pointer;-webkit-user-select:none;user-select:none}ax-selection-list ul li label{display:flex;cursor:pointer;align-items:flex-start;padding:.5rem .75rem}ax-selection-list ul li label.ax-hide-control .ax-checkbox,ax-selection-list ul li label.ax-hide-control .ax-radio{display:none}ax-selection-list ul li label.ax-hide-control>div{margin-inline-start:0px}ax-selection-list ul li label .ax-checkbox,ax-selection-list ul li label .ax-radio{margin-top:.25rem}ax-selection-list ul li label>div{margin-inline-start:.75rem;font-size:.875rem;line-height:1.25rem;font-weight:500}ax-selection-list ul li label>div .ax-hint-text{margin-top:.25rem;font-weight:400;color:rgb(var(--ax-color-text-default),.75)}ax-selection-list ul li.ax-state-disabled{opacity:.5}ax-selection-list ul li.ax-state-disabled *{cursor:not-allowed}ax-selection-list.ax-state-error{color:rgba(var(--ax-color-danger-500))}ax-selection-list.ax-state-error .ax-checkbox-checkmark,ax-selection-list.ax-state-error .ax-radio-checkmark{border-color:rgba(var(--ax-color-danger-500))}\n"] }]
|
175
|
-
}], propDecorators: {
|
176
|
-
type: Input
|
177
|
-
}], customTemplate: [{
|
178
|
-
type: Input
|
179
|
-
}], showControl: [{
|
180
|
-
type: Input
|
181
|
-
}], items: [{
|
182
|
-
type: Input
|
183
|
-
}], look: [{
|
130
|
+
], template: "<ul class=\"ax-{{ direction() }}\">\n @for (item of items(); let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl()\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate()) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate(); context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField()]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField()] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-dark ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,.ax-dark ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{background-color:rgba(var(--ax-color-primary-900),.25)}ax-selection-list.ax-look-divided ul.ax-vertical li:last-child label,ax-selection-list.ax-look-divided ul.ax-horizontal li:last-child label{border-style:none}ax-selection-list.ax-look-divided ul.ax-vertical>li label{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default));padding-bottom:.875rem}ax-selection-list.ax-look-divided ul.ax-horizontal>li label{border-inline-end-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul{gap:.75rem}ax-selection-list.ax-look-card ul.ax-vertical>li label,ax-selection-list.ax-look-card ul.ax-horizontal>li label{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{border-color:rgba(var(--ax-color-primary-500));background-color:rgba(var(--ax-color-primary-50))}ax-selection-list.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-selection-list ul{display:flex;flex-wrap:wrap}ax-selection-list ul.ax-vertical{flex-direction:column}ax-selection-list ul.ax-horizontal{flex-direction:row}ax-selection-list ul li{cursor:pointer;-webkit-user-select:none;user-select:none}ax-selection-list ul li label{display:flex;cursor:pointer;align-items:flex-start;padding:.5rem .75rem}ax-selection-list ul li label.ax-hide-control .ax-checkbox,ax-selection-list ul li label.ax-hide-control .ax-radio{display:none}ax-selection-list ul li label.ax-hide-control>div{margin-inline-start:0px}ax-selection-list ul li label .ax-checkbox,ax-selection-list ul li label .ax-radio{margin-top:.25rem}ax-selection-list ul li label>div{margin-inline-start:.75rem;font-size:.875rem;line-height:1.25rem;font-weight:500}ax-selection-list ul li label>div .ax-hint-text{margin-top:.25rem;font-weight:400;color:rgb(var(--ax-color-text-default),.75)}ax-selection-list ul li.ax-state-disabled{opacity:.5}ax-selection-list ul li.ax-state-disabled *{cursor:not-allowed}ax-selection-list.ax-state-error{color:rgba(var(--ax-color-danger-500))}ax-selection-list.ax-state-error .ax-checkbox-checkmark,ax-selection-list.ax-state-error .ax-radio-checkmark{border-color:rgba(var(--ax-color-danger-500))}\n"] }]
|
131
|
+
}], propDecorators: { look: [{
|
184
132
|
type: Input
|
185
133
|
}], __hostClass: [{
|
186
134
|
type: HostBinding,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-selection-list.mjs","sources":["../../../../libs/components/selection-list/src/lib/selection-list.component.ts","../../../../libs/components/selection-list/src/lib/selection-list.component.html","../../../../libs/components/selection-list/src/lib/selection-list.module.ts","../../../../libs/components/selection-list/src/acorex-components-selection-list.ts"],"sourcesContent":["import {\n AXComponent,\n AXDirection,\n AXFocusableComponent,\n AXValuableComponent,\n AX_SELECTION_DATA_TOKEN,\n MXSelectionBridgeService,\n MXSelectionValueComponent,\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n TemplateRef,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport type AXSelectionListLook = 'solid' | 'divided' | 'card';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-selection-list',\n templateUrl: './selection-list.component.html',\n styleUrls: ['./selection-list.component.scss'],\n inputs: [\n 'id',\n 'name',\n 'disabled',\n 'readonly',\n 'tabIndex',\n 'size',\n 'value',\n 'valueField',\n 'textField',\n 'hintField',\n 'disabledField',\n 'readonlyField',\n 'multiple',\n ],\n outputs: ['onValueChanged', 'onBlur', 'onFocus'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: AXComponent, useExisting: AXSelectionListComponent },\n { provide: AXFocusableComponent, useExisting: AXSelectionListComponent },\n { provide: AXValuableComponent, useExisting: AXSelectionListComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXSelectionListComponent),\n multi: true,\n },\n {\n provide: AX_SELECTION_DATA_TOKEN,\n useClass: MXSelectionBridgeService,\n },\n ],\n})\n\n//TODO: on parent click (card style) -> checkbox or radio change value\nexport class AXSelectionListComponent extends MXSelectionValueComponent {\n /** @ignore */\n private _direction: AXDirection = 'horizontal';\n\n /**\n * Gets or sets the direction of the component.\n * @param {AXDirection} value\n */\n @Input()\n public get direction(): AXDirection {\n return this._direction;\n }\n\n /**\n * Sets the direction of the component.\n *\n * @param {AXDirection} v\n */\n public set direction(v: AXDirection) {\n this._direction = v;\n }\n\n /**\n * The custom template used for rendering content.\n *\n * @param {TemplateRef<unknown>} customTemplate\n */\n @Input()\n customTemplate: TemplateRef<unknown>;\n\n /** @ignore */\n private _showControl = true;\n\n /**\n * @param {void}\n * Gets the current state of the control visibility.\n */\n @Input()\n public get showControl(): boolean {\n return this._showControl;\n }\n\n /**\n * @param {boolean} v\n * Sets the visibility state of the control.\n */\n public set showControl(v: boolean) {\n this.setOption({\n name: 'showControl',\n value: v,\n });\n }\n\n /** @ignore */\n private _items: any[] = [];\n\n /**\n * Gets the list of items.\n * @param {void}\n */\n @Input()\n\n /**\n * Gets the list of items.\n */\n public get items(): any[] {\n return this._items;\n }\n\n /**\n * Sets the list of items.\n *\n * @param {any[]} v\n */\n public set items(v: any[]) {\n this.setOption({\n name: 'items',\n value: v,\n });\n }\n\n /** @ignore */\n private _hintField = 'hint';\n\n /**\n * Gets the field used for displaying hints.\n */\n public get hintField(): string {\n return this._hintField;\n }\n\n /**\n * Sets the field used for displaying hints.\n *\n * @param {string} v\n */\n public set hintField(v: string) {\n this.setOption({\n name: 'hintField',\n value: v,\n });\n }\n\n /**\n * Retrieves an item from the list by its key.\n *\n * @param {unknown} key - The key to search for.\n */\n getItemByKey(key: unknown): unknown {\n return this.items.find((c) => c == this.value || c[this.valueField] == key);\n }\n\n /**\n * Defines the visual appearance of the selection list.\n *\n * @defaultValue 'solid'\n */\n @Input() look: AXSelectionListLook = 'solid';\n\n /** @ignore */\n protected _handleOnItemValueChange(item: any, e: Event) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n } else {\n (e.target as any).checked ? this.selectItems(item) : this.unselectItems(item);\n }\n }\n\n /** @ignore */\n @HostBinding('class')\n private get __hostClass(): string[] {\n return [\n `ax-look-${this.look}`,\n `${this.disabled ? 'ax-state-disabled' : ''}`,\n `${this.readonly ? 'ax-state-readonly' : ''}`,\n ];\n }\n}\n","<ul class=\"ax-{{ direction }}\">\n @for (item of items; let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate; context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXSelectionListComponent } from './selection-list.component';\n\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXRadioModule } from '@acorex/components/radio';\n\n@NgModule({\n declarations: [AXSelectionListComponent],\n imports: [CommonModule, FormsModule, AXCheckBoxModule, AXRadioModule, AXLabelModule, AXFormModule],\n exports: [AXSelectionListComponent],\n providers: [],\n})\nexport class AXSelectionListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAsBA;;;;AAIG;AAuCH;AACM,MAAO,wBAAyB,SAAQ,yBAAyB,CAAA;AAvCvE,IAAA,WAAA,GAAA;;;QAyCU,IAAU,CAAA,UAAA,GAAgB,YAAY;;QA6BtC,IAAY,CAAA,YAAA,GAAG,IAAI;;QAuBnB,IAAM,CAAA,MAAA,GAAU,EAAE;;QA4BlB,IAAU,CAAA,UAAA,GAAG,MAAM;AA8B3B;;;;AAIG;QACM,IAAI,CAAA,IAAA,GAAwB,OAAO;AAqB7C;AAtIC;;;AAGG;AACH,IAAA,IACW,SAAS,GAAA;QAClB,OAAO,IAAI,CAAC,UAAU;;AAGxB;;;;AAIG;IACH,IAAW,SAAS,CAAC,CAAc,EAAA;AACjC,QAAA,IAAI,CAAC,UAAU,GAAG,CAAC;;AAcrB;;;AAGG;AACH,IAAA,IACW,WAAW,GAAA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JtB,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAItF,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,wBAAwB,CAAC;AACxC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,CAAC;oBAClG,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACnC,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACfD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-selection-list.mjs","sources":["../../../../libs/components/selection-list/src/lib/selection-list.component.ts","../../../../libs/components/selection-list/src/lib/selection-list.component.html","../../../../libs/components/selection-list/src/lib/selection-list.module.ts","../../../../libs/components/selection-list/src/acorex-components-selection-list.ts"],"sourcesContent":["import {\n AXComponent,\n AXDirection,\n AXFocusableComponent,\n AXValuableComponent,\n AX_SELECTION_DATA_TOKEN,\n MXSelectionBridgeService,\n MXSelectionValueComponent,\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n TemplateRef,\n ViewEncapsulation,\n effect,\n forwardRef,\n input,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport type AXSelectionListLook = 'solid' | 'divided' | 'card';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-selection-list',\n templateUrl: './selection-list.component.html',\n styleUrls: ['./selection-list.component.scss'],\n inputs: [\n 'id',\n 'name',\n 'disabled',\n 'readonly',\n 'tabIndex',\n 'size',\n 'value',\n 'valueField',\n 'textField',\n 'disabledField',\n 'readonlyField',\n 'multiple',\n ],\n outputs: ['onValueChanged', 'onBlur', 'onFocus'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: AXComponent, useExisting: AXSelectionListComponent },\n { provide: AXFocusableComponent, useExisting: AXSelectionListComponent },\n { provide: AXValuableComponent, useExisting: AXSelectionListComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXSelectionListComponent),\n multi: true,\n },\n {\n provide: AX_SELECTION_DATA_TOKEN,\n useClass: MXSelectionBridgeService,\n },\n ],\n})\n\n//TODO: on parent click (card style) -> checkbox or radio change value\nexport class AXSelectionListComponent extends MXSelectionValueComponent {\n /**\n * sets the direction of the component.\n * @param {AXDirection} value\n */\n direction = input<AXDirection>('horizontal');\n\n /**\n * The custom template used for rendering content.\n *\n * @param {TemplateRef<unknown>} customTemplate\n */\n customTemplate = input<TemplateRef<unknown>>();\n\n /**\n * @param {boolean} v\n * Sets the visibility state of the control.\n */\n showControl = input(true);\n\n /**\n * Sets the list of items.\n * @param {void}\n */\n items = input<any[]>([]);\n\n #onItemsChange = effect(() => {\n this.items();\n this.clearSelectionCache();\n });\n\n /**\n * Sets the field used for displaying hints.\n *\n * @param {string} v\n */\n hintField = input('hint');\n\n /**\n * Retrieves an item from the list by its key.\n *\n * @param {unknown} key - The key to search for.\n */\n getItemByKey(key: unknown): unknown {\n return this.items().find((c) => c == this.value || c[this.valueField] == key);\n }\n\n /**\n * Defines the visual appearance of the selection list.\n *\n * @defaultValue 'solid'\n */\n @Input() look: AXSelectionListLook = 'solid';\n\n /** @ignore */\n protected _handleOnItemValueChange(item: any, e: Event) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n } else {\n (e.target as any).checked ? this.selectItems(item) : this.unselectItems(item);\n }\n }\n\n /** @ignore */\n @HostBinding('class')\n private get __hostClass(): string[] {\n return [\n `ax-look-${this.look}`,\n `${this.disabled ? 'ax-state-disabled' : ''}`,\n `${this.readonly ? 'ax-state-readonly' : ''}`,\n ];\n }\n}\n","<ul class=\"ax-{{ direction() }}\">\n @for (item of items(); let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl()\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate()) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate(); context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField()]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField()] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXSelectionListComponent } from './selection-list.component';\n\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXRadioModule } from '@acorex/components/radio';\n\n@NgModule({\n declarations: [AXSelectionListComponent],\n imports: [CommonModule, FormsModule, AXCheckBoxModule, AXRadioModule, AXLabelModule, AXFormModule],\n exports: [AXSelectionListComponent],\n providers: [],\n})\nexport class AXSelectionListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAwBA;;;;AAIG;AAsCH;AACM,MAAO,wBAAyB,SAAQ,yBAAyB,CAAA;AAtCv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@ import * as i1 from '@acorex/components/common';
|
|
2
2
|
import { AXClickEvent, MXInteractiveComponent, MXColorComponent, NXComponent, AXCommonModule, AXRippleDirective } from '@acorex/components/common';
|
3
3
|
import { trigger, state, style, AUTO_STYLE, transition, animate } from '@angular/animations';
|
4
4
|
import * as i0 from '@angular/core';
|
5
|
-
import { model, output, signal, afterNextRender,
|
5
|
+
import { model, output, signal, afterNextRender, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
6
6
|
import { classes } from 'polytype';
|
7
7
|
import * as i2 from '@acorex/components/loading';
|
8
8
|
import { AXLoadingModule } from '@acorex/components/loading';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXBaseComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import {
|
3
|
+
import { HostBinding, Input, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
|
6
6
|
/**
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXValueComponent, MXColorComponent, AXValuableComponent, AXCommonModule } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { output, forwardRef,
|
3
|
+
import { output, forwardRef, HostBinding, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
4
4
|
import * as i1 from '@angular/forms';
|
5
5
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
6
6
|
import { classes } from 'polytype';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXBaseComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { signal, computed,
|
3
|
+
import { signal, computed, HostBinding, Input, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, model, effect, contentChildren, NgModule } from '@angular/core';
|
4
4
|
import * as i1 from '@angular/common';
|
5
5
|
import { CommonModule } from '@angular/common';
|
6
6
|
import * as i2 from '@acorex/components/decorators';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXBaseComponent, MXValueComponent, MXColorComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { Component, forwardRef,
|
3
|
+
import { Component, forwardRef, HostBinding, Input, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
5
5
|
import { classes } from 'polytype';
|
6
6
|
import { CommonModule } from '@angular/common';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Directive, EventEmitter,
|
2
|
+
import { Directive, EventEmitter, HostListener, Input, Output, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, HostBinding, ContentChildren, NgModule } from '@angular/core';
|
3
3
|
import { MXInteractiveComponent, AXEvent, MXBaseComponent } from '@acorex/components/common';
|
4
4
|
import * as i1 from '@angular/common';
|
5
5
|
import { CommonModule } from '@angular/common';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXColorLookComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import {
|
3
|
+
import { HostBinding, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
|
6
6
|
/**
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXInputBaseValueComponent, MXLookComponent, AXComponent, AXFocusableComponent, AXClearableComponent, AXValuableComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { forwardRef,
|
3
|
+
import { forwardRef, Input, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
4
4
|
import * as i1 from '@angular/forms';
|
5
5
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
6
6
|
import { classes } from 'polytype';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { EventEmitter,
|
2
|
+
import { EventEmitter, Input, Output, Directive, forwardRef, ContentChild, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
3
3
|
import { MXInputBaseValueComponent, MXLookComponent, AXComponent, AXFocusableComponent, AXClearableComponent, AXValuableComponent, AXCommonModule } from '@acorex/components/common';
|
4
4
|
import * as i1 from '@angular/forms';
|
5
5
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|