@acorex/components 21.0.1-next.53 → 21.0.1-next.56
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/fab/README.md +3 -0
- package/fesm2022/acorex-components-accordion.mjs +4 -4
- package/fesm2022/acorex-components-action-sheet.mjs +2 -2
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +2 -2
- package/fesm2022/acorex-components-audio-wave.mjs +2 -2
- package/fesm2022/acorex-components-avatar.mjs +2 -2
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +2 -2
- package/fesm2022/acorex-components-bottom-navigation.mjs +2 -2
- package/fesm2022/acorex-components-breadcrumbs.mjs +2 -2
- package/fesm2022/acorex-components-button-group.mjs +2 -2
- package/fesm2022/acorex-components-button.mjs +4 -4
- package/fesm2022/acorex-components-calendar.mjs +4 -4
- package/fesm2022/acorex-components-check-box.mjs +2 -2
- package/fesm2022/acorex-components-chips.mjs +2 -2
- package/fesm2022/acorex-components-circular-progress.mjs +2 -2
- package/fesm2022/acorex-components-code-editor.mjs +2 -2
- package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +2 -2
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +2 -2
- package/fesm2022/acorex-components-command.mjs +2 -2
- package/fesm2022/acorex-components-command.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +6 -6
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation2.mjs +3817 -2952
- package/fesm2022/acorex-components-conversation2.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +2 -2
- package/fesm2022/acorex-components-data-table.mjs +2 -2
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +2 -2
- package/fesm2022/acorex-components-datetime-input.mjs +2 -2
- package/fesm2022/acorex-components-datetime-picker.mjs +2 -2
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +8 -8
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +2 -2
- package/fesm2022/acorex-components-drawer.mjs +4 -4
- package/fesm2022/acorex-components-dropdown-button.mjs +2 -2
- package/fesm2022/acorex-components-dropdown.mjs +3 -3
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-editor.mjs +2 -2
- package/fesm2022/acorex-components-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-fab.mjs +114 -0
- package/fesm2022/acorex-components-fab.mjs.map +1 -0
- package/fesm2022/acorex-components-file-explorer.mjs +1 -1
- package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +2 -2
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +14 -14
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +2 -2
- package/fesm2022/acorex-components-json-viewer.mjs +2 -2
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-kanban.mjs +2 -2
- package/fesm2022/acorex-components-kanban.mjs.map +1 -1
- package/fesm2022/acorex-components-kbd.mjs +2 -2
- package/fesm2022/acorex-components-label.mjs +2 -2
- package/fesm2022/acorex-components-list.mjs +62 -14
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +2 -2
- package/fesm2022/acorex-components-loading.mjs +76 -36
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +2 -2
- package/fesm2022/acorex-components-media-viewer.mjs +10 -10
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +33 -13
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/{acorex-components-modal-acorex-components-modal-B03hJbP8.mjs → acorex-components-modal-acorex-components-modal-Bjw8EpLk.mjs} +4 -4
- package/fesm2022/{acorex-components-modal-acorex-components-modal-B03hJbP8.mjs.map → acorex-components-modal-acorex-components-modal-Bjw8EpLk.mjs.map} +1 -1
- package/fesm2022/{acorex-components-modal-modal-content.component-DrHm0mZ4.mjs → acorex-components-modal-modal-content.component-A2h_OC6e.mjs} +4 -4
- package/fesm2022/{acorex-components-modal-modal-content.component-DrHm0mZ4.mjs.map → acorex-components-modal-modal-content.component-A2h_OC6e.mjs.map} +1 -1
- package/fesm2022/acorex-components-modal.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +2 -2
- package/fesm2022/acorex-components-notification.mjs +2 -2
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +2 -2
- package/fesm2022/acorex-components-otp.mjs +2 -2
- package/fesm2022/acorex-components-paint.mjs +4 -4
- package/fesm2022/acorex-components-password-box.mjs +2 -2
- package/fesm2022/acorex-components-pdf-reader.mjs +2 -2
- package/fesm2022/acorex-components-phone-box.mjs +2 -2
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +6 -6
- package/fesm2022/acorex-components-popover.mjs +4 -3
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +3 -2
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +2 -2
- package/fesm2022/acorex-components-qrcode.mjs +2 -2
- package/fesm2022/acorex-components-query-builder.mjs +2 -2
- package/fesm2022/acorex-components-radio.mjs +2 -2
- package/fesm2022/acorex-components-rail-navigation.mjs +2 -2
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +2 -2
- 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 +2 -2
- package/fesm2022/acorex-components-routing-progress.mjs +2 -2
- package/fesm2022/acorex-components-scheduler.mjs +18 -18
- package/fesm2022/acorex-components-scheduler.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-2.mjs +2 -2
- package/fesm2022/acorex-components-selection-list.mjs +2 -2
- package/fesm2022/acorex-components-side-menu.mjs +2 -2
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +2 -2
- package/fesm2022/acorex-components-sliding-item.mjs +2 -2
- package/fesm2022/acorex-components-step-wizard.mjs +2 -2
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +2 -2
- package/fesm2022/acorex-components-tabs.mjs +2 -2
- package/fesm2022/acorex-components-tag-box.mjs +2 -2
- package/fesm2022/acorex-components-tag.mjs +2 -2
- package/fesm2022/acorex-components-text-area.mjs +2 -2
- package/fesm2022/acorex-components-text-box.mjs +2 -2
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-duration.mjs +5 -0
- package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +4 -4
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +2 -2
- package/fesm2022/acorex-components-toolbar.mjs +2 -2
- package/fesm2022/acorex-components-tooltip.mjs +26 -15
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +6 -6
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +6 -6
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/package.json +7 -6
- package/types/acorex-components-action-sheet.d.ts +1 -1
- package/types/acorex-components-conversation2.d.ts +1106 -863
- package/types/acorex-components-fab.d.ts +50 -0
- package/types/acorex-components-list.d.ts +23 -1
- package/types/acorex-components-loading.d.ts +3 -1
- package/types/acorex-components-menu.d.ts +3 -1
- package/types/acorex-components-popover.d.ts +2 -1
- package/types/acorex-components-select-box.d.ts +6 -6
- package/types/acorex-components-tooltip.d.ts +2 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MXSelectionValueComponent, convertArrayToDataSource, AXListDataSource, AXComponent, AXFocusableComponent, AXValuableComponent, AX_SELECTION_DATA_TOKEN, MXSelectionBridgeService } from '@acorex/cdk/common';
|
|
2
2
|
import * as i1 from '@acorex/components/tooltip';
|
|
3
|
-
import {
|
|
3
|
+
import { AXTooltipDirective, AXTooltipModule } from '@acorex/components/tooltip';
|
|
4
4
|
import { AXTranslatorPipe } from '@acorex/core/translation';
|
|
5
5
|
import { CdkVirtualScrollableElement, CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf } from '@angular/cdk/scrolling';
|
|
6
6
|
import { isPlatformBrowser, NgTemplateOutlet, AsyncPipe } from '@angular/common';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { input, signal, EventEmitter, computed, Optional, SkipSelf, forwardRef, HostListener, ViewChild, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
8
|
+
import { viewChildren, input, signal, EventEmitter, computed, Optional, SkipSelf, forwardRef, HostListener, ViewChild, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
9
9
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -16,6 +16,7 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
|
16
16
|
class AXListComponent extends MXSelectionValueComponent {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
|
+
this.tooltipRef = viewChildren(AXTooltipDirective, ...(ngDevMode ? [{ debugName: "tooltipRef" }] : []));
|
|
19
20
|
/**
|
|
20
21
|
* Determines if an item is truncated.
|
|
21
22
|
*
|
|
@@ -28,12 +29,10 @@ class AXListComponent extends MXSelectionValueComponent {
|
|
|
28
29
|
* @defaultValue false
|
|
29
30
|
*/
|
|
30
31
|
this.showItemTooltip = input(false, ...(ngDevMode ? [{ debugName: "showItemTooltip" }] : []));
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*/
|
|
36
|
-
this.dataSource = convertArrayToDataSource([]);
|
|
32
|
+
/** @ignore */
|
|
33
|
+
this._dataSource = convertArrayToDataSource([]);
|
|
34
|
+
/** @ignore */
|
|
35
|
+
this._isInitialized = false;
|
|
37
36
|
/**
|
|
38
37
|
* @ignore
|
|
39
38
|
*/
|
|
@@ -72,6 +71,23 @@ class AXListComponent extends MXSelectionValueComponent {
|
|
|
72
71
|
*/
|
|
73
72
|
this.showEmptyTemplate = computed(() => this.isLoading() === false && this.emptyTemplate && this.hasItems === false, ...(ngDevMode ? [{ debugName: "showEmptyTemplate" }] : []));
|
|
74
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Defines the data source for the list.
|
|
76
|
+
*
|
|
77
|
+
* @defaultValue convertArrayToDataSource([])
|
|
78
|
+
*/
|
|
79
|
+
set dataSource(v) {
|
|
80
|
+
if (!v || v === this._dataSource) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this._dataSource = v;
|
|
84
|
+
if (this._isInitialized) {
|
|
85
|
+
this._setupListDataSource();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
get dataSource() {
|
|
89
|
+
return this._dataSource;
|
|
90
|
+
}
|
|
75
91
|
/**
|
|
76
92
|
* Sets the height of each item in the list.
|
|
77
93
|
*/
|
|
@@ -86,13 +102,42 @@ class AXListComponent extends MXSelectionValueComponent {
|
|
|
86
102
|
*/
|
|
87
103
|
ngOnInit() {
|
|
88
104
|
super.ngOnInit();
|
|
105
|
+
this._setupListDataSource();
|
|
106
|
+
this._isInitialized = true;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @ignore
|
|
110
|
+
*/
|
|
111
|
+
ngOnDestroy() {
|
|
112
|
+
this._onChangedSub?.unsubscribe();
|
|
113
|
+
this._onLoadingChangedSub?.unsubscribe();
|
|
114
|
+
super.ngOnDestroy();
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* (Re)creates the internal `AXListDataSource` wrapper used by `cdkVirtualFor`
|
|
118
|
+
* and (re)subscribes to the underlying source's events. This is invoked
|
|
119
|
+
* whenever the `dataSource` input changes so that the list properly reflects
|
|
120
|
+
* the new source.
|
|
121
|
+
* @ignore
|
|
122
|
+
*/
|
|
123
|
+
_setupListDataSource() {
|
|
124
|
+
this._onChangedSub?.unsubscribe();
|
|
125
|
+
this._onLoadingChangedSub?.unsubscribe();
|
|
89
126
|
this.listDataSource = new AXListDataSource({
|
|
90
|
-
source: this.
|
|
127
|
+
source: this._dataSource,
|
|
91
128
|
});
|
|
92
|
-
|
|
129
|
+
// Only mirror the source's state if it has already produced data.
|
|
130
|
+
// Otherwise keep `isLoading=true` so the empty template doesn't render,
|
|
131
|
+
// which would add `.ax-height-auto` and collapse the container, starving
|
|
132
|
+
// the virtual viewport of size — preventing `viewChange` from firing and
|
|
133
|
+
// the data source's `load` callback from ever being invoked.
|
|
134
|
+
const hasLoadedItems = this._dataSource.totalCount > 0;
|
|
135
|
+
this.isLoading.set(hasLoadedItems ? this._dataSource.isLoading : true);
|
|
136
|
+
this.hasItems = hasLoadedItems;
|
|
137
|
+
this._onLoadingChangedSub = this.listDataSource.source.onLoadingChanged.subscribe((data) => {
|
|
93
138
|
this.isLoading.set(data);
|
|
94
139
|
});
|
|
95
|
-
this.listDataSource.source.onChanged.subscribe((data) => {
|
|
140
|
+
this._onChangedSub = this.listDataSource.source.onChanged.subscribe((data) => {
|
|
96
141
|
this.hasItems = data.totalCount > 0;
|
|
97
142
|
setTimeout(() => {
|
|
98
143
|
this.render();
|
|
@@ -111,6 +156,9 @@ class AXListComponent extends MXSelectionValueComponent {
|
|
|
111
156
|
if (this.isItemDisabled(item)) {
|
|
112
157
|
return;
|
|
113
158
|
}
|
|
159
|
+
this.tooltipRef().forEach((item) => {
|
|
160
|
+
item.close();
|
|
161
|
+
});
|
|
114
162
|
this.toggleSelect(item);
|
|
115
163
|
this.onItemClick.emit({
|
|
116
164
|
component: this,
|
|
@@ -235,7 +283,7 @@ class AXListComponent extends MXSelectionValueComponent {
|
|
|
235
283
|
},
|
|
236
284
|
deps: [[new Optional(), new SkipSelf(), AX_SELECTION_DATA_TOKEN]],
|
|
237
285
|
},
|
|
238
|
-
], viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"list-container\" cdkVirtualScrollingElement [class.ax-height-auto]=\"showEmptyTemplate()\">\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport\n [itemSize]=\"itemHeightSignal()\"\n [style.--item-height]=\"itemHeightSignal() + 'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\"\n [class.ax-truncated-container]=\"isItemTruncated()\"\n >\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource; let i = index; trackBy: trackByIdx\">\n @if (item !== null && item !== undefined) {\n <li\n [class.ax-state-selected]=\"isItemSelected(item)\"\n class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"getValue(item)\"\n >\n <!-- Custom Item Template -->\n @if (itemTemplate) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: { data: item } }\">\n </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultItemTpl\"></ng-container>\n }\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n @if (item !== null && item !== undefined) {\n <div class=\"ax-label-container\">\n @if (multiple && checkbox) {\n <input\n class=\"ax-checkbox\"\n type=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\"\n />\n }\n\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\"\n [class.ax-truncated]=\"isItemTruncated()\"\n [axTooltip]=\"getDisplayText(item)\"\n [axTooltipDisabled]=\"!showItemTooltip()\"\n >\n {{ getDisplayText(item) | translate | async }}\n </span>\n </div>\n <!-- @if (isItemSelected(item)) {\n <i class=\"ax-icon ax-icon-check ax-selected-icon\"></i>\n } -->\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-template>\n </li>\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n @if (loadingTemplate) {\n <ng-container [ngTemplateOutlet]=\"loadingTemplate\"> </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultLoadingTpl\"> </ng-container>\n }\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>{{ '@acorex:common.status.loading' | translate | async }}</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n@if (showEmptyTemplate()) {\n <div class=\"empty-container\">\n <ng-container [ngTemplateOutlet]=\"emptyTemplate\"></ng-container>\n </div>\n}\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer components{ax-list{width:100%;height:100%;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-leading:calc(var(--spacing,.25rem) * 5);line-height:calc(var(--spacing,.25rem) * 5);display:block}ax-list .list-container{flex-direction:column;height:100%;display:flex}ax-list .list-container.ax-height-auto{height:auto}ax-list ax-footer,ax-list ax-header{background-color:var(--color-lighter,rgba(var(--ax-sys-color-lighter-surface)))}ax-list .empty-container{height:calc(var(--spacing,.25rem) * 10);width:100%;padding-inline:calc(var(--spacing,.25rem) * 3);justify-content:center;align-items:center;display:flex}ax-list .cdk-virtual-scroll-viewport.ax-truncated-container .cdk-virtual-scroll-content-wrapper{width:100%;min-width:unset}ax-list .cdk-virtual-scroll-viewport ul li{min-height:calc(var(--spacing,.25rem) * 10);cursor:pointer;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-leading:calc(var(--spacing,.25rem) * 5);line-height:calc(var(--spacing,.25rem) * 5);-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding-inline-start:calc(var(--spacing,.25rem) * 3);padding-inline-end:calc(var(--spacing,.25rem) * 4);position:relative;display:flex!important}ax-list .cdk-virtual-scroll-viewport ul li:hover{background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)))}ax-list .cdk-virtual-scroll-viewport ul li:focus-visible{--tw-inset-ring-shadow:inset 0 0 0 2px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-inset-ring-color:var(--color-primary,rgba(var(--ax-sys-color-primary-surface)));--tw-outline-style:none;outline-style:none}ax-list .cdk-virtual-scroll-viewport ul li .ax-label-container{align-items:center;width:100%;display:flex}ax-list .cdk-virtual-scroll-viewport ul li .ax-checkbox-label{margin-inline-start:calc(var(--spacing,.25rem) * 2)}ax-list .cdk-virtual-scroll-viewport ul li.ax-state-selected{background-color:color-mix(in srgb,rgba(var(--ax-sys-color-primary-surface)) 20%,transparent)}@supports (color:color-mix(in lab,red,red)){ax-list .cdk-virtual-scroll-viewport ul li.ax-state-selected{background-color:color-mix(in oklab,var(--color-primary,rgba(var(--ax-sys-color-primary-surface))) 20%,transparent)}}ax-list .cdk-virtual-scroll-viewport ul li.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-list .cdk-virtual-scroll-viewport ul li .ax-truncated{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}\n/*! tailwindcss v4.2.
|
|
286
|
+
], viewQueries: [{ propertyName: "tooltipRef", predicate: AXTooltipDirective, descendants: true, isSignal: true }, { propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"list-container\" cdkVirtualScrollingElement [class.ax-height-auto]=\"showEmptyTemplate()\">\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport\n [itemSize]=\"itemHeightSignal()\"\n [style.--item-height]=\"itemHeightSignal() + 'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\"\n [class.ax-truncated-container]=\"isItemTruncated()\"\n >\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource; let i = index; trackBy: trackByIdx\">\n @if (item !== null && item !== undefined) {\n <li\n [class.ax-state-selected]=\"isItemSelected(item)\"\n class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"getValue(item)\"\n >\n <!-- Custom Item Template -->\n @if (itemTemplate) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: { data: item } }\">\n </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultItemTpl\"></ng-container>\n }\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n @if (item !== null && item !== undefined) {\n <div class=\"ax-label-container\">\n @if (multiple && checkbox) {\n <input\n class=\"ax-checkbox\"\n type=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\"\n />\n }\n\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\"\n [class.ax-truncated]=\"isItemTruncated()\"\n [axTooltip]=\"getDisplayText(item)\"\n [axTooltipDisabled]=\"!showItemTooltip()\"\n >\n {{ getDisplayText(item) | translate | async }}\n </span>\n </div>\n <!-- @if (isItemSelected(item)) {\n <i class=\"ax-icon ax-icon-check ax-selected-icon\"></i>\n } -->\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-template>\n </li>\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n @if (loadingTemplate) {\n <ng-container [ngTemplateOutlet]=\"loadingTemplate\"> </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultLoadingTpl\"> </ng-container>\n }\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>{{ '@acorex:common.status.loading' | translate | async }}</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n@if (showEmptyTemplate()) {\n <div class=\"empty-container\">\n <ng-container [ngTemplateOutlet]=\"emptyTemplate\"></ng-container>\n </div>\n}\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer components{ax-list{width:100%;height:100%;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-leading:calc(var(--spacing,.25rem) * 5);line-height:calc(var(--spacing,.25rem) * 5);display:block}ax-list .list-container{flex-direction:column;height:100%;display:flex}ax-list .list-container.ax-height-auto{height:auto}ax-list ax-footer,ax-list ax-header{background-color:var(--color-lighter,rgba(var(--ax-sys-color-lighter-surface)))}ax-list .empty-container{height:calc(var(--spacing,.25rem) * 10);width:100%;padding-inline:calc(var(--spacing,.25rem) * 3);justify-content:center;align-items:center;display:flex}ax-list .cdk-virtual-scroll-viewport.ax-truncated-container .cdk-virtual-scroll-content-wrapper{width:100%;min-width:unset}ax-list .cdk-virtual-scroll-viewport ul li{min-height:calc(var(--spacing,.25rem) * 10);cursor:pointer;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-leading:calc(var(--spacing,.25rem) * 5);line-height:calc(var(--spacing,.25rem) * 5);-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding-inline-start:calc(var(--spacing,.25rem) * 3);padding-inline-end:calc(var(--spacing,.25rem) * 4);position:relative;display:flex!important}ax-list .cdk-virtual-scroll-viewport ul li:hover{background-color:var(--color-surface);background-color:var(--color-surface,rgba(var(--ax-sys-color-surface-surface)))}ax-list .cdk-virtual-scroll-viewport ul li:focus-visible{--tw-inset-ring-shadow:inset 0 0 0 2px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-inset-ring-color:var(--color-primary,rgba(var(--ax-sys-color-primary-surface)));--tw-outline-style:none;outline-style:none}ax-list .cdk-virtual-scroll-viewport ul li .ax-label-container{align-items:center;width:100%;display:flex}ax-list .cdk-virtual-scroll-viewport ul li .ax-checkbox-label{margin-inline-start:calc(var(--spacing,.25rem) * 2)}ax-list .cdk-virtual-scroll-viewport ul li.ax-state-selected{background-color:color-mix(in srgb,rgba(var(--ax-sys-color-primary-surface)) 20%,transparent)}@supports (color:color-mix(in lab,red,red)){ax-list .cdk-virtual-scroll-viewport ul li.ax-state-selected{background-color:color-mix(in oklab,var(--color-primary,rgba(var(--ax-sys-color-primary-surface))) 20%,transparent)}}ax-list .cdk-virtual-scroll-viewport ul li.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-list .cdk-virtual-scroll-viewport ul li .ax-truncated{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}\n/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: CdkVirtualScrollableElement, selector: "[cdkVirtualScrollingElement]" }, { kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "directive", type: i1.AXTooltipDirective, selector: "[axTooltip]", inputs: ["axTooltipDisabled", "axTooltip", "axTooltipContext", "axTooltipPlacement", "axTooltipOffsetX", "axTooltipOffsetY", "axTooltipOpenAfter", "axTooltipCloseAfter"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
239
287
|
}
|
|
240
288
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXListComponent, decorators: [{
|
|
241
289
|
type: Component,
|
|
@@ -276,8 +324,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
276
324
|
AXTranslatorPipe,
|
|
277
325
|
AXTooltipModule,
|
|
278
326
|
AXTooltipDirective,
|
|
279
|
-
], template: "<div class=\"list-container\" cdkVirtualScrollingElement [class.ax-height-auto]=\"showEmptyTemplate()\">\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport\n [itemSize]=\"itemHeightSignal()\"\n [style.--item-height]=\"itemHeightSignal() + 'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\"\n [class.ax-truncated-container]=\"isItemTruncated()\"\n >\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource; let i = index; trackBy: trackByIdx\">\n @if (item !== null && item !== undefined) {\n <li\n [class.ax-state-selected]=\"isItemSelected(item)\"\n class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"getValue(item)\"\n >\n <!-- Custom Item Template -->\n @if (itemTemplate) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: { data: item } }\">\n </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultItemTpl\"></ng-container>\n }\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n @if (item !== null && item !== undefined) {\n <div class=\"ax-label-container\">\n @if (multiple && checkbox) {\n <input\n class=\"ax-checkbox\"\n type=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\"\n />\n }\n\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\"\n [class.ax-truncated]=\"isItemTruncated()\"\n [axTooltip]=\"getDisplayText(item)\"\n [axTooltipDisabled]=\"!showItemTooltip()\"\n >\n {{ getDisplayText(item) | translate | async }}\n </span>\n </div>\n <!-- @if (isItemSelected(item)) {\n <i class=\"ax-icon ax-icon-check ax-selected-icon\"></i>\n } -->\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-template>\n </li>\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n @if (loadingTemplate) {\n <ng-container [ngTemplateOutlet]=\"loadingTemplate\"> </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultLoadingTpl\"> </ng-container>\n }\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>{{ '@acorex:common.status.loading' | translate | async }}</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n@if (showEmptyTemplate()) {\n <div class=\"empty-container\">\n <ng-container [ngTemplateOutlet]=\"emptyTemplate\"></ng-container>\n </div>\n}\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer components{ax-list{width:100%;height:100%;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-leading:calc(var(--spacing,.25rem) * 5);line-height:calc(var(--spacing,.25rem) * 5);display:block}ax-list .list-container{flex-direction:column;height:100%;display:flex}ax-list .list-container.ax-height-auto{height:auto}ax-list ax-footer,ax-list ax-header{background-color:var(--color-lighter,rgba(var(--ax-sys-color-lighter-surface)))}ax-list .empty-container{height:calc(var(--spacing,.25rem) * 10);width:100%;padding-inline:calc(var(--spacing,.25rem) * 3);justify-content:center;align-items:center;display:flex}ax-list .cdk-virtual-scroll-viewport.ax-truncated-container .cdk-virtual-scroll-content-wrapper{width:100%;min-width:unset}ax-list .cdk-virtual-scroll-viewport ul li{min-height:calc(var(--spacing,.25rem) * 10);cursor:pointer;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-leading:calc(var(--spacing,.25rem) * 5);line-height:calc(var(--spacing,.25rem) * 5);-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding-inline-start:calc(var(--spacing,.25rem) * 3);padding-inline-end:calc(var(--spacing,.25rem) * 4);position:relative;display:flex!important}ax-list .cdk-virtual-scroll-viewport ul li:hover{background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)))}ax-list .cdk-virtual-scroll-viewport ul li:focus-visible{--tw-inset-ring-shadow:inset 0 0 0 2px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-inset-ring-color:var(--color-primary,rgba(var(--ax-sys-color-primary-surface)));--tw-outline-style:none;outline-style:none}ax-list .cdk-virtual-scroll-viewport ul li .ax-label-container{align-items:center;width:100%;display:flex}ax-list .cdk-virtual-scroll-viewport ul li .ax-checkbox-label{margin-inline-start:calc(var(--spacing,.25rem) * 2)}ax-list .cdk-virtual-scroll-viewport ul li.ax-state-selected{background-color:color-mix(in srgb,rgba(var(--ax-sys-color-primary-surface)) 20%,transparent)}@supports (color:color-mix(in lab,red,red)){ax-list .cdk-virtual-scroll-viewport ul li.ax-state-selected{background-color:color-mix(in oklab,var(--color-primary,rgba(var(--ax-sys-color-primary-surface))) 20%,transparent)}}ax-list .cdk-virtual-scroll-viewport ul li.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-list .cdk-virtual-scroll-viewport ul li .ax-truncated{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}\n/*! tailwindcss v4.2.
|
|
280
|
-
}], propDecorators: { isItemTruncated: [{ type: i0.Input, args: [{ isSignal: true, alias: "isItemTruncated", required: false }] }], showItemTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "showItemTooltip", required: false }] }], dataSource: [{
|
|
327
|
+
], template: "<div class=\"list-container\" cdkVirtualScrollingElement [class.ax-height-auto]=\"showEmptyTemplate()\">\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport\n [itemSize]=\"itemHeightSignal()\"\n [style.--item-height]=\"itemHeightSignal() + 'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\"\n [class.ax-truncated-container]=\"isItemTruncated()\"\n >\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource; let i = index; trackBy: trackByIdx\">\n @if (item !== null && item !== undefined) {\n <li\n [class.ax-state-selected]=\"isItemSelected(item)\"\n class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"getValue(item)\"\n >\n <!-- Custom Item Template -->\n @if (itemTemplate) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: { data: item } }\">\n </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultItemTpl\"></ng-container>\n }\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n @if (item !== null && item !== undefined) {\n <div class=\"ax-label-container\">\n @if (multiple && checkbox) {\n <input\n class=\"ax-checkbox\"\n type=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\"\n />\n }\n\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\"\n [class.ax-truncated]=\"isItemTruncated()\"\n [axTooltip]=\"getDisplayText(item)\"\n [axTooltipDisabled]=\"!showItemTooltip()\"\n >\n {{ getDisplayText(item) | translate | async }}\n </span>\n </div>\n <!-- @if (isItemSelected(item)) {\n <i class=\"ax-icon ax-icon-check ax-selected-icon\"></i>\n } -->\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-template>\n </li>\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n @if (loadingTemplate) {\n <ng-container [ngTemplateOutlet]=\"loadingTemplate\"> </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultLoadingTpl\"> </ng-container>\n }\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>{{ '@acorex:common.status.loading' | translate | async }}</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n@if (showEmptyTemplate()) {\n <div class=\"empty-container\">\n <ng-container [ngTemplateOutlet]=\"emptyTemplate\"></ng-container>\n </div>\n}\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer components{ax-list{width:100%;height:100%;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-leading:calc(var(--spacing,.25rem) * 5);line-height:calc(var(--spacing,.25rem) * 5);display:block}ax-list .list-container{flex-direction:column;height:100%;display:flex}ax-list .list-container.ax-height-auto{height:auto}ax-list ax-footer,ax-list ax-header{background-color:var(--color-lighter,rgba(var(--ax-sys-color-lighter-surface)))}ax-list .empty-container{height:calc(var(--spacing,.25rem) * 10);width:100%;padding-inline:calc(var(--spacing,.25rem) * 3);justify-content:center;align-items:center;display:flex}ax-list .cdk-virtual-scroll-viewport.ax-truncated-container .cdk-virtual-scroll-content-wrapper{width:100%;min-width:unset}ax-list .cdk-virtual-scroll-viewport ul li{min-height:calc(var(--spacing,.25rem) * 10);cursor:pointer;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-leading:calc(var(--spacing,.25rem) * 5);line-height:calc(var(--spacing,.25rem) * 5);-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding-inline-start:calc(var(--spacing,.25rem) * 3);padding-inline-end:calc(var(--spacing,.25rem) * 4);position:relative;display:flex!important}ax-list .cdk-virtual-scroll-viewport ul li:hover{background-color:var(--color-surface);background-color:var(--color-surface,rgba(var(--ax-sys-color-surface-surface)))}ax-list .cdk-virtual-scroll-viewport ul li:focus-visible{--tw-inset-ring-shadow:inset 0 0 0 2px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-inset-ring-color:var(--color-primary,rgba(var(--ax-sys-color-primary-surface)));--tw-outline-style:none;outline-style:none}ax-list .cdk-virtual-scroll-viewport ul li .ax-label-container{align-items:center;width:100%;display:flex}ax-list .cdk-virtual-scroll-viewport ul li .ax-checkbox-label{margin-inline-start:calc(var(--spacing,.25rem) * 2)}ax-list .cdk-virtual-scroll-viewport ul li.ax-state-selected{background-color:color-mix(in srgb,rgba(var(--ax-sys-color-primary-surface)) 20%,transparent)}@supports (color:color-mix(in lab,red,red)){ax-list .cdk-virtual-scroll-viewport ul li.ax-state-selected{background-color:color-mix(in oklab,var(--color-primary,rgba(var(--ax-sys-color-primary-surface))) 20%,transparent)}}ax-list .cdk-virtual-scroll-viewport ul li.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-list .cdk-virtual-scroll-viewport ul li .ax-truncated{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}\n/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */\n"] }]
|
|
328
|
+
}], propDecorators: { tooltipRef: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => AXTooltipDirective), { isSignal: true }] }], isItemTruncated: [{ type: i0.Input, args: [{ isSignal: true, alias: "isItemTruncated", required: false }] }], showItemTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "showItemTooltip", required: false }] }], dataSource: [{
|
|
281
329
|
type: Input
|
|
282
330
|
}], itemHeight: [{
|
|
283
331
|
type: Input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-list.mjs","sources":["../../../../packages/components/list/src/lib/list.component.ts","../../../../packages/components/list/src/lib/list.component.html","../../../../packages/components/list/src/lib/list.module.ts","../../../../packages/components/list/src/acorex-components-list.ts"],"sourcesContent":["import {\n AXComponent,\n AXDataSource,\n AXEvent,\n AXFocusableComponent,\n AXListDataSource,\n AXValuableComponent,\n AX_SELECTION_DATA_TOKEN,\n MXSelectionBridgeService,\n MXSelectionValueComponent,\n convertArrayToDataSource,\n} from '@acorex/cdk/common';\nimport { AXTooltipDirective, AXTooltipModule } from '@acorex/components/tooltip';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport {\n CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollViewport,\n CdkVirtualScrollableElement,\n} from '@angular/cdk/scrolling';\nimport { AsyncPipe, NgTemplateOutlet, isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Optional,\n Output,\n SkipSelf,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n WritableSignal,\n computed,\n forwardRef,\n input,\n signal,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport interface AXListScrollIndexChanged extends AXEvent {\n index: number;\n}\n\n/**\n * provides a list control with various input options and events for user interaction.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-list',\n templateUrl: './list.component.html',\n styleUrls: ['./list.component.compiled.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n inputs: [\n 'id',\n 'name',\n 'disabled',\n 'readonly',\n 'valueField',\n 'textField',\n 'textTemplate',\n 'disabledField',\n 'multiple',\n 'selectionMode',\n ],\n outputs: ['onValueChanged', 'disabledChange', 'readonlyChange', 'onBlur', 'onFocus', 'onItemClick', 'onItemSelected'],\n providers: [\n { provide: AXComponent, useExisting: AXListComponent },\n { provide: AXFocusableComponent, useExisting: AXListComponent },\n { provide: AXValuableComponent, useExisting: AXListComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXListComponent),\n multi: true,\n },\n {\n provide: AX_SELECTION_DATA_TOKEN,\n useFactory: (existingService: MXSelectionBridgeService) => {\n return existingService || new MXSelectionBridgeService();\n },\n deps: [[new Optional(), new SkipSelf(), AX_SELECTION_DATA_TOKEN]],\n },\n ],\n imports: [\n CdkVirtualScrollableElement,\n CdkVirtualScrollViewport,\n CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n NgTemplateOutlet,\n AsyncPipe,\n AXTranslatorPipe,\n AXTooltipModule,\n AXTooltipDirective,\n ],\n})\nexport class AXListComponent extends MXSelectionValueComponent implements OnInit {\n /**\n * Determines if an item is truncated.\n *\n * @defaultValue true\n */\n isItemTruncated = input(true);\n\n /**\n * Determines if a tooltip is shown for an item.\n *\n * @defaultValue false\n */\n showItemTooltip = input(false);\n\n /**\n * Defines the data source for the list.\n *\n * @defaultValue convertArrayToDataSource([])\n */\n @Input()\n dataSource: AXDataSource<unknown> = convertArrayToDataSource([]);\n\n /**\n * @ignore\n */\n itemHeightSignal: WritableSignal<number | 'auto'> = signal(40);\n\n /**\n * Sets the height of each item in the list.\n */\n @Input()\n public set itemHeight(v: number | 'auto') {\n this.itemHeightSignal.set(v);\n }\n\n /**\n * Template for rendering individual items in the list.\n */\n @Input()\n itemTemplate: TemplateRef<unknown>;\n\n /**\n * Template to display when the list is empty.\n */\n @Input()\n emptyTemplate: TemplateRef<unknown>;\n\n /**\n * Template to show while the list is loading.\n */\n @Input()\n loadingTemplate: TemplateRef<unknown>;\n\n /**\n * Emitted when the index of the scrolled item changes.\n *\n * @event\n */\n @Output()\n onScrolledIndexChanged: EventEmitter<AXListScrollIndexChanged> = new EventEmitter<AXListScrollIndexChanged>();\n\n /**\n * Specifies whether the checkbox is enabled.\n *\n * @defaultValue true\n */\n @Input()\n checkbox = true;\n\n /**\n * @ignore\n */\n protected listDataSource: AXListDataSource<unknown>;\n\n /**\n * @ignore\n */\n protected isLoading = signal(true);\n\n /**\n * @ignore\n */\n protected hasItems = false;\n\n /**\n * @ignore\n */\n private lastIndex = 0;\n\n /**\n * @ignore\n */\n private postponeFocus = false;\n\n /**\n * @ignore\n */\n @ViewChild(CdkVirtualScrollViewport)\n private viewport: CdkVirtualScrollViewport;\n\n trackByIdx(i) {\n return i;\n }\n\n /**\n * @ignore\n */\n override ngOnInit() {\n super.ngOnInit();\n this.listDataSource = new AXListDataSource<unknown>({\n source: this.dataSource,\n });\n this.listDataSource.source.onLoadingChanged.subscribe((data) => {\n this.isLoading.set(data);\n });\n this.listDataSource.source.onChanged.subscribe((data) => {\n this.hasItems = data.totalCount > 0;\n setTimeout(() => {\n this.render();\n }, 100);\n });\n }\n /**\n * @ignore\n */\n _handleOnItemClick(e: MouseEvent, item: any) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n if (this.isItemDisabled(item)) {\n return;\n }\n this.toggleSelect(item);\n this.onItemClick.emit({\n component: this,\n item,\n htmlElement: e.target as HTMLElement,\n isUserInteraction: true,\n nativeEvent: e,\n });\n }\n\n /**\n * @ignore\n */\n @HostListener('keydown', ['$event'])\n _handleKeydown(e: KeyboardEvent) {\n if ((e.code === 'ArrowDown' || e.code === 'ArrowUp') && this.hasItems) {\n this.focusItemByNav(e.key === 'ArrowDown' ? 1 : -1);\n e.preventDefault();\n }\n if ((e.code === 'Space' || e.code === 'Enter') && this.hasItems) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n if (isPlatformBrowser(this.platformID)) {\n const id = this.document.activeElement?.closest('li')?.dataset['id'];\n this.toggleSelect(id);\n }\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n /**\n * @ignore\n */\n private focusItemByNav(sign: -1 | 1): void {\n if (isPlatformBrowser(this.platformID)) {\n const list = this.getHostElement().querySelector('ul');\n const fn = (s) => list.querySelector<HTMLDivElement>(s);\n const itemDiv: HTMLElement = this.document.activeElement?.closest('li') || fn(`li.ax-state-selected`) || fn(`li`);\n const next = (sign == 1 ? itemDiv.nextElementSibling : itemDiv.previousElementSibling) as HTMLElement;\n if (next) {\n next.focus();\n }\n }\n }\n\n /**\n * @ignore\n */\n protected _handleOnscrolledIndexChange(e: number) {\n this.lastIndex = e;\n this.onScrolledIndexChanged.emit({\n component: this,\n index: this.lastIndex,\n isUserInteraction: true,\n });\n }\n\n /**\n * Retrieves an item from the data source based on the provided key.\n *\n * @param key The key used to identify the item.\n * @ignore\n */\n getItemByKey(key: unknown): Promise<unknown> | unknown {\n return this.dataSource.find(key);\n }\n\n /**\n * Renders the component by updating the viewport size, scrolling to the last index, and optionally focusing the element.\n */\n public render() {\n this.viewport.checkViewportSize();\n this.viewport.scrollToIndex(this.lastIndex);\n if (this.postponeFocus) {\n this.postponeFocus = false;\n this.focus();\n }\n }\n\n /**\n * Refreshes the list by clearing the selection cache and reloading the data source.\n * @ignore\n */\n public refresh(clearSelection = true) {\n if (clearSelection) {\n this.clearSelectionCache();\n }\n this.listDataSource.refresh();\n }\n\n /**\n * Scrolls the viewport to the specified item index.\n * @param index The index of the item to scroll to.\n * @ignore\n */\n public scrollToIndex(index: number) {\n this.viewport.scrollToIndex(index);\n }\n /**\n * Sets focus to the first selectable list item. If no item is available, postpones focus.\n */\n override focus(): void {\n const list = this.getHostElement().querySelector('ul');\n const focusable =\n list.querySelector<HTMLElement>('li.ax-state-selected') ?? list.querySelector<HTMLElement>('li.list-item');\n if (focusable) {\n focusable.focus();\n } else {\n this.postponeFocus = true;\n }\n }\n\n /**\n * Determines whether to show the empty template based on the presence of items and loading state.\n * @ignore\n */\n showEmptyTemplate = computed(() => this.isLoading() === false && this.emptyTemplate && this.hasItems === false);\n}\n","<div class=\"list-container\" cdkVirtualScrollingElement [class.ax-height-auto]=\"showEmptyTemplate()\">\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport\n [itemSize]=\"itemHeightSignal()\"\n [style.--item-height]=\"itemHeightSignal() + 'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\"\n [class.ax-truncated-container]=\"isItemTruncated()\"\n >\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource; let i = index; trackBy: trackByIdx\">\n @if (item !== null && item !== undefined) {\n <li\n [class.ax-state-selected]=\"isItemSelected(item)\"\n class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"getValue(item)\"\n >\n <!-- Custom Item Template -->\n @if (itemTemplate) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: { data: item } }\">\n </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultItemTpl\"></ng-container>\n }\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n @if (item !== null && item !== undefined) {\n <div class=\"ax-label-container\">\n @if (multiple && checkbox) {\n <input\n class=\"ax-checkbox\"\n type=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\"\n />\n }\n\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\"\n [class.ax-truncated]=\"isItemTruncated()\"\n [axTooltip]=\"getDisplayText(item)\"\n [axTooltipDisabled]=\"!showItemTooltip()\"\n >\n {{ getDisplayText(item) | translate | async }}\n </span>\n </div>\n <!-- @if (isItemSelected(item)) {\n <i class=\"ax-icon ax-icon-check ax-selected-icon\"></i>\n } -->\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-template>\n </li>\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n @if (loadingTemplate) {\n <ng-container [ngTemplateOutlet]=\"loadingTemplate\"> </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultLoadingTpl\"> </ng-container>\n }\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>{{ '@acorex:common.status.loading' | translate | async }}</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n@if (showEmptyTemplate()) {\n <div class=\"empty-container\">\n <ng-container [ngTemplateOutlet]=\"emptyTemplate\"></ng-container>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { AXListComponent } from './list.component';\n\n@NgModule({\n imports: [AXListComponent],\n exports: [AXListComponent],\n})\nexport class AXListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AA8CA;;;;AAIG;AAiDG,MAAO,eAAgB,SAAQ,yBAAyB,CAAA;AAhD9D,IAAA,WAAA,GAAA;;AAiDE;;;;AAIG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,IAAI,2DAAC;AAE7B;;;;AAIG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,KAAK,2DAAC;AAE9B;;;;AAIG;AAEH,QAAA,IAAA,CAAA,UAAU,GAA0B,wBAAwB,CAAC,EAAE,CAAC;AAEhE;;AAEG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAoC,MAAM,CAAC,EAAE,4DAAC;AA4B9D;;;;AAIG;AAEH,QAAA,IAAA,CAAA,sBAAsB,GAA2C,IAAI,YAAY,EAA4B;AAE7G;;;;AAIG;QAEH,IAAA,CAAA,QAAQ,GAAG,IAAI;AAOf;;AAEG;AACO,QA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;sBA+BA,SAAS;uBAAC,wBAAwB;;sBAkDlC,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;;MEhPxB,YAAY,CAAA;8GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAZ,YAAY,EAAA,OAAA,EAAA,CAHb,eAAe,CAAA,EAAA,OAAA,EAAA,CACf,eAAe,CAAA,EAAA,CAAA,CAAA;AAEd,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,YAAY,YAHb,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAGd,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe,CAAC;AAC3B,iBAAA;;;ACND;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-list.mjs","sources":["../../../../packages/components/list/src/lib/list.component.ts","../../../../packages/components/list/src/lib/list.component.html","../../../../packages/components/list/src/lib/list.module.ts","../../../../packages/components/list/src/acorex-components-list.ts"],"sourcesContent":["import {\n AXComponent,\n AXDataSource,\n AXEvent,\n AXFocusableComponent,\n AXListDataSource,\n AXValuableComponent,\n AX_SELECTION_DATA_TOKEN,\n MXSelectionBridgeService,\n MXSelectionValueComponent,\n convertArrayToDataSource,\n} from '@acorex/cdk/common';\nimport { AXTooltipDirective, AXTooltipModule } from '@acorex/components/tooltip';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport {\n CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollViewport,\n CdkVirtualScrollableElement,\n} from '@angular/cdk/scrolling';\nimport { AsyncPipe, NgTemplateOutlet, isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Optional,\n Output,\n SkipSelf,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n WritableSignal,\n computed,\n forwardRef,\n input,\n signal,\n viewChildren,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Subscription } from 'rxjs';\n\nexport interface AXListScrollIndexChanged extends AXEvent {\n index: number;\n}\n\n/**\n * provides a list control with various input options and events for user interaction.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-list',\n templateUrl: './list.component.html',\n styleUrls: ['./list.component.compiled.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n inputs: [\n 'id',\n 'name',\n 'disabled',\n 'readonly',\n 'valueField',\n 'textField',\n 'textTemplate',\n 'disabledField',\n 'multiple',\n 'selectionMode',\n ],\n outputs: ['onValueChanged', 'disabledChange', 'readonlyChange', 'onBlur', 'onFocus', 'onItemClick', 'onItemSelected'],\n providers: [\n { provide: AXComponent, useExisting: AXListComponent },\n { provide: AXFocusableComponent, useExisting: AXListComponent },\n { provide: AXValuableComponent, useExisting: AXListComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXListComponent),\n multi: true,\n },\n {\n provide: AX_SELECTION_DATA_TOKEN,\n useFactory: (existingService: MXSelectionBridgeService) => {\n return existingService || new MXSelectionBridgeService();\n },\n deps: [[new Optional(), new SkipSelf(), AX_SELECTION_DATA_TOKEN]],\n },\n ],\n imports: [\n CdkVirtualScrollableElement,\n CdkVirtualScrollViewport,\n CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n NgTemplateOutlet,\n AsyncPipe,\n AXTranslatorPipe,\n AXTooltipModule,\n AXTooltipDirective,\n ],\n})\nexport class AXListComponent extends MXSelectionValueComponent implements OnInit {\n private tooltipRef = viewChildren(AXTooltipDirective);\n\n /**\n * Determines if an item is truncated.\n *\n * @defaultValue true\n */\n isItemTruncated = input(true);\n\n /**\n * Determines if a tooltip is shown for an item.\n *\n * @defaultValue false\n */\n showItemTooltip = input(false);\n\n /** @ignore */\n private _dataSource: AXDataSource<unknown> = convertArrayToDataSource([]);\n\n /** @ignore */\n private _isInitialized = false;\n\n /** @ignore */\n private _onChangedSub?: Subscription;\n\n /** @ignore */\n private _onLoadingChangedSub?: Subscription;\n\n /**\n * Defines the data source for the list.\n *\n * @defaultValue convertArrayToDataSource([])\n */\n @Input()\n public set dataSource(v: AXDataSource<unknown>) {\n if (!v || v === this._dataSource) {\n return;\n }\n this._dataSource = v;\n if (this._isInitialized) {\n this._setupListDataSource();\n }\n }\n\n public get dataSource(): AXDataSource<unknown> {\n return this._dataSource;\n }\n\n /**\n * @ignore\n */\n itemHeightSignal: WritableSignal<number | 'auto'> = signal(40);\n\n /**\n * Sets the height of each item in the list.\n */\n @Input()\n public set itemHeight(v: number | 'auto') {\n this.itemHeightSignal.set(v);\n }\n\n /**\n * Template for rendering individual items in the list.\n */\n @Input()\n itemTemplate: TemplateRef<unknown>;\n\n /**\n * Template to display when the list is empty.\n */\n @Input()\n emptyTemplate: TemplateRef<unknown>;\n\n /**\n * Template to show while the list is loading.\n */\n @Input()\n loadingTemplate: TemplateRef<unknown>;\n\n /**\n * Emitted when the index of the scrolled item changes.\n *\n * @event\n */\n @Output()\n onScrolledIndexChanged: EventEmitter<AXListScrollIndexChanged> = new EventEmitter<AXListScrollIndexChanged>();\n\n /**\n * Specifies whether the checkbox is enabled.\n *\n * @defaultValue true\n */\n @Input()\n checkbox = true;\n\n /**\n * @ignore\n */\n protected listDataSource: AXListDataSource<unknown>;\n\n /**\n * @ignore\n */\n protected isLoading = signal(true);\n\n /**\n * @ignore\n */\n protected hasItems = false;\n\n /**\n * @ignore\n */\n private lastIndex = 0;\n\n /**\n * @ignore\n */\n private postponeFocus = false;\n\n /**\n * @ignore\n */\n @ViewChild(CdkVirtualScrollViewport)\n private viewport: CdkVirtualScrollViewport;\n\n trackByIdx(i) {\n return i;\n }\n\n /**\n * @ignore\n */\n override ngOnInit() {\n super.ngOnInit();\n this._setupListDataSource();\n this._isInitialized = true;\n }\n\n /**\n * @ignore\n */\n protected override ngOnDestroy(): void {\n this._onChangedSub?.unsubscribe();\n this._onLoadingChangedSub?.unsubscribe();\n super.ngOnDestroy();\n }\n\n /**\n * (Re)creates the internal `AXListDataSource` wrapper used by `cdkVirtualFor`\n * and (re)subscribes to the underlying source's events. This is invoked\n * whenever the `dataSource` input changes so that the list properly reflects\n * the new source.\n * @ignore\n */\n private _setupListDataSource(): void {\n this._onChangedSub?.unsubscribe();\n this._onLoadingChangedSub?.unsubscribe();\n\n this.listDataSource = new AXListDataSource<unknown>({\n source: this._dataSource,\n });\n\n // Only mirror the source's state if it has already produced data.\n // Otherwise keep `isLoading=true` so the empty template doesn't render,\n // which would add `.ax-height-auto` and collapse the container, starving\n // the virtual viewport of size — preventing `viewChange` from firing and\n // the data source's `load` callback from ever being invoked.\n const hasLoadedItems = this._dataSource.totalCount > 0;\n this.isLoading.set(hasLoadedItems ? this._dataSource.isLoading : true);\n this.hasItems = hasLoadedItems;\n\n this._onLoadingChangedSub = this.listDataSource.source.onLoadingChanged.subscribe((data) => {\n this.isLoading.set(data);\n });\n this._onChangedSub = this.listDataSource.source.onChanged.subscribe((data) => {\n this.hasItems = data.totalCount > 0;\n setTimeout(() => {\n this.render();\n }, 100);\n });\n }\n /**\n * @ignore\n */\n _handleOnItemClick(e: MouseEvent, item: any) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n if (this.isItemDisabled(item)) {\n return;\n }\n\n this.tooltipRef().forEach((item) => {\n item.close();\n });\n this.toggleSelect(item);\n this.onItemClick.emit({\n component: this,\n item,\n htmlElement: e.target as HTMLElement,\n isUserInteraction: true,\n nativeEvent: e,\n });\n }\n\n /**\n * @ignore\n */\n @HostListener('keydown', ['$event'])\n _handleKeydown(e: KeyboardEvent) {\n if ((e.code === 'ArrowDown' || e.code === 'ArrowUp') && this.hasItems) {\n this.focusItemByNav(e.key === 'ArrowDown' ? 1 : -1);\n e.preventDefault();\n }\n if ((e.code === 'Space' || e.code === 'Enter') && this.hasItems) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n if (isPlatformBrowser(this.platformID)) {\n const id = this.document.activeElement?.closest('li')?.dataset['id'];\n this.toggleSelect(id);\n }\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n /**\n * @ignore\n */\n private focusItemByNav(sign: -1 | 1): void {\n if (isPlatformBrowser(this.platformID)) {\n const list = this.getHostElement().querySelector('ul');\n const fn = (s) => list.querySelector<HTMLDivElement>(s);\n const itemDiv: HTMLElement = this.document.activeElement?.closest('li') || fn(`li.ax-state-selected`) || fn(`li`);\n const next = (sign == 1 ? itemDiv.nextElementSibling : itemDiv.previousElementSibling) as HTMLElement;\n if (next) {\n next.focus();\n }\n }\n }\n\n /**\n * @ignore\n */\n protected _handleOnscrolledIndexChange(e: number) {\n this.lastIndex = e;\n this.onScrolledIndexChanged.emit({\n component: this,\n index: this.lastIndex,\n isUserInteraction: true,\n });\n }\n\n /**\n * Retrieves an item from the data source based on the provided key.\n *\n * @param key The key used to identify the item.\n * @ignore\n */\n getItemByKey(key: unknown): Promise<unknown> | unknown {\n return this.dataSource.find(key);\n }\n\n /**\n * Renders the component by updating the viewport size, scrolling to the last index, and optionally focusing the element.\n */\n public render() {\n this.viewport.checkViewportSize();\n this.viewport.scrollToIndex(this.lastIndex);\n if (this.postponeFocus) {\n this.postponeFocus = false;\n this.focus();\n }\n }\n\n /**\n * Refreshes the list by clearing the selection cache and reloading the data source.\n * @ignore\n */\n public refresh(clearSelection = true) {\n if (clearSelection) {\n this.clearSelectionCache();\n }\n this.listDataSource.refresh();\n }\n\n /**\n * Scrolls the viewport to the specified item index.\n * @param index The index of the item to scroll to.\n * @ignore\n */\n public scrollToIndex(index: number) {\n this.viewport.scrollToIndex(index);\n }\n /**\n * Sets focus to the first selectable list item. If no item is available, postpones focus.\n */\n override focus(): void {\n const list = this.getHostElement().querySelector('ul');\n const focusable =\n list.querySelector<HTMLElement>('li.ax-state-selected') ?? list.querySelector<HTMLElement>('li.list-item');\n if (focusable) {\n focusable.focus();\n } else {\n this.postponeFocus = true;\n }\n }\n\n /**\n * Determines whether to show the empty template based on the presence of items and loading state.\n * @ignore\n */\n showEmptyTemplate = computed(() => this.isLoading() === false && this.emptyTemplate && this.hasItems === false);\n}\n","<div class=\"list-container\" cdkVirtualScrollingElement [class.ax-height-auto]=\"showEmptyTemplate()\">\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport\n [itemSize]=\"itemHeightSignal()\"\n [style.--item-height]=\"itemHeightSignal() + 'px'\"\n (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\"\n [class.ax-truncated-container]=\"isItemTruncated()\"\n >\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource; let i = index; trackBy: trackByIdx\">\n @if (item !== null && item !== undefined) {\n <li\n [class.ax-state-selected]=\"isItemSelected(item)\"\n class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"getValue(item)\"\n >\n <!-- Custom Item Template -->\n @if (itemTemplate) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: { data: item } }\">\n </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultItemTpl\"></ng-container>\n }\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n @if (item !== null && item !== undefined) {\n <div class=\"ax-label-container\">\n @if (multiple && checkbox) {\n <input\n class=\"ax-checkbox\"\n type=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\"\n />\n }\n\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\"\n [class.ax-truncated]=\"isItemTruncated()\"\n [axTooltip]=\"getDisplayText(item)\"\n [axTooltipDisabled]=\"!showItemTooltip()\"\n >\n {{ getDisplayText(item) | translate | async }}\n </span>\n </div>\n <!-- @if (isItemSelected(item)) {\n <i class=\"ax-icon ax-icon-check ax-selected-icon\"></i>\n } -->\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-template>\n </li>\n } @else {\n <ng-container [ngTemplateOutlet]=\"loadingTpl\"> </ng-container>\n }\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n @if (loadingTemplate) {\n <ng-container [ngTemplateOutlet]=\"loadingTemplate\"> </ng-container>\n } @else {\n <ng-container [ngTemplateOutlet]=\"defaultLoadingTpl\"> </ng-container>\n }\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>{{ '@acorex:common.status.loading' | translate | async }}</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n@if (showEmptyTemplate()) {\n <div class=\"empty-container\">\n <ng-container [ngTemplateOutlet]=\"emptyTemplate\"></ng-container>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { AXListComponent } from './list.component';\n\n@NgModule({\n imports: [AXListComponent],\n exports: [AXListComponent],\n})\nexport class AXListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAgDA;;;;AAIG;AAiDG,MAAO,eAAgB,SAAQ,yBAAyB,CAAA;AAhD9D,IAAA,WAAA,GAAA;;AAiDU,QAAA,IAAA,CAAA,UAAU,GAAG,YAAY,CAAC,kBAAkB,sDAAC;AAErD;;;;AAIG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,IAAI,2D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,EAAA,YAAY,YAHb,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAGd,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe,CAAC;AAC3B,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -121,7 +121,7 @@ class AXLoadingDialogComponent extends MXBaseComponent {
|
|
|
121
121
|
return false;
|
|
122
122
|
}
|
|
123
123
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLoadingDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
124
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: AXLoadingDialogComponent, isStandalone: true, selector: "ax-loading-dialog", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, onClose: { classPropertyName: "onClose", publicName: "onClose", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXLoadingDialogComponent }], usesInheritance: true, ngImport: i0, template: "<ax-title>{{ dialogTitle() }}</ax-title>\n\n<ax-progress-bar [mode]=\"data().mode\" [progress]=\"progressValue()\" [color]=\"progressColor()\"></ax-progress-bar>\n<div class=\"progress-decorators\">\n <div>{{ progressText() }}</div>\n <div>{{ progressStatus() }}</div>\n</div>\n<ax-footer>\n @for (button of data().buttons; track $index) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"$index\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n</ax-footer>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial}}}@layer components{ax-loading-dialog{gap:calc(var(--spacing,.25rem) * 2);border-radius:var(--radius-lg,.5rem);background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));width:93vw;padding:calc(var(--spacing,.25rem) * 4);flex-direction:column;display:flex}@media(min-width:40rem){ax-loading-dialog{width:80vw}}@media(min-width:48rem){ax-loading-dialog{width:55vw}}@media(min-width:64rem){ax-loading-dialog{width:30vw}}@media(min-width:80rem){ax-loading-dialog{width:25vw}}ax-loading-dialog ax-title{margin-bottom:calc(var(--spacing,.25rem) * 2);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}ax-loading-dialog .progress-decorators{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));justify-content:space-between;display:flex}ax-loading-dialog ax-footer{padding-top:calc(var(--spacing,.25rem) * 3);justify-content:flex-end}}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.2.
|
|
124
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: AXLoadingDialogComponent, isStandalone: true, selector: "ax-loading-dialog", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, onClose: { classPropertyName: "onClose", publicName: "onClose", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXLoadingDialogComponent }], usesInheritance: true, ngImport: i0, template: "<ax-title>{{ dialogTitle() }}</ax-title>\n\n<ax-progress-bar [mode]=\"data().mode\" [progress]=\"progressValue()\" [color]=\"progressColor()\"></ax-progress-bar>\n<div class=\"progress-decorators\">\n <div>{{ progressText() }}</div>\n <div>{{ progressStatus() }}</div>\n</div>\n<ax-footer>\n @for (button of data().buttons; track $index) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"$index\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n</ax-footer>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial}}}@layer components{ax-loading-dialog{gap:calc(var(--spacing,.25rem) * 2);border-radius:var(--radius-lg,.5rem);background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));width:93vw;padding:calc(var(--spacing,.25rem) * 4);flex-direction:column;display:flex}@media(min-width:40rem){ax-loading-dialog{width:80vw}}@media(min-width:48rem){ax-loading-dialog{width:55vw}}@media(min-width:64rem){ax-loading-dialog{width:30vw}}@media(min-width:80rem){ax-loading-dialog{width:25vw}}ax-loading-dialog ax-title{margin-bottom:calc(var(--spacing,.25rem) * 2);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}ax-loading-dialog .progress-decorators{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));justify-content:space-between;display:flex}ax-loading-dialog ax-footer{padding-top:calc(var(--spacing,.25rem) * 3);justify-content:flex-end}}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ 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: AXProgressBarComponent, selector: "ax-progress-bar", inputs: ["color", "mode", "progress", "height"], outputs: ["ValueChange", "sizeChange"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "directive", type: AXHotkeyDirective, selector: "[axHotkey]", inputs: ["axHotkey"] }, { kind: "directive", type: AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "component", type: AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
125
125
|
}
|
|
126
126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLoadingDialogComponent, decorators: [{
|
|
127
127
|
type: Component,
|
|
@@ -134,7 +134,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
134
134
|
AXLoadingComponent,
|
|
135
135
|
AXTranslatorPipe,
|
|
136
136
|
AsyncPipe,
|
|
137
|
-
], providers: [{ provide: AXComponent, useExisting: AXLoadingDialogComponent }], template: "<ax-title>{{ dialogTitle() }}</ax-title>\n\n<ax-progress-bar [mode]=\"data().mode\" [progress]=\"progressValue()\" [color]=\"progressColor()\"></ax-progress-bar>\n<div class=\"progress-decorators\">\n <div>{{ progressText() }}</div>\n <div>{{ progressStatus() }}</div>\n</div>\n<ax-footer>\n @for (button of data().buttons; track $index) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"$index\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n</ax-footer>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial}}}@layer components{ax-loading-dialog{gap:calc(var(--spacing,.25rem) * 2);border-radius:var(--radius-lg,.5rem);background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));width:93vw;padding:calc(var(--spacing,.25rem) * 4);flex-direction:column;display:flex}@media(min-width:40rem){ax-loading-dialog{width:80vw}}@media(min-width:48rem){ax-loading-dialog{width:55vw}}@media(min-width:64rem){ax-loading-dialog{width:30vw}}@media(min-width:80rem){ax-loading-dialog{width:25vw}}ax-loading-dialog ax-title{margin-bottom:calc(var(--spacing,.25rem) * 2);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}ax-loading-dialog .progress-decorators{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));justify-content:space-between;display:flex}ax-loading-dialog ax-footer{padding-top:calc(var(--spacing,.25rem) * 3);justify-content:flex-end}}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.2.
|
|
137
|
+
], providers: [{ provide: AXComponent, useExisting: AXLoadingDialogComponent }], template: "<ax-title>{{ dialogTitle() }}</ax-title>\n\n<ax-progress-bar [mode]=\"data().mode\" [progress]=\"progressValue()\" [color]=\"progressColor()\"></ax-progress-bar>\n<div class=\"progress-decorators\">\n <div>{{ progressText() }}</div>\n <div>{{ progressStatus() }}</div>\n</div>\n<ax-footer>\n @for (button of data().buttons; track $index) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"$index\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n</ax-footer>\n", styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial}}}@layer components{ax-loading-dialog{gap:calc(var(--spacing,.25rem) * 2);border-radius:var(--radius-lg,.5rem);background-color:var(--color-lightest,rgba(var(--ax-sys-color-lightest-surface)));width:93vw;padding:calc(var(--spacing,.25rem) * 4);flex-direction:column;display:flex}@media(min-width:40rem){ax-loading-dialog{width:80vw}}@media(min-width:48rem){ax-loading-dialog{width:55vw}}@media(min-width:64rem){ax-loading-dialog{width:30vw}}@media(min-width:80rem){ax-loading-dialog{width:25vw}}ax-loading-dialog ax-title{margin-bottom:calc(var(--spacing,.25rem) * 2);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}ax-loading-dialog .progress-decorators{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));justify-content:space-between;display:flex}ax-loading-dialog ax-footer{padding-top:calc(var(--spacing,.25rem) * 3);justify-content:flex-end}}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */\n"] }]
|
|
138
138
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], onClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "onClose", required: false }] }] } });
|
|
139
139
|
|
|
140
140
|
class AXLoadingDialogModule {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AXComponent, MXBaseComponent } from '@acorex/cdk/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { HostBinding, Input, ViewEncapsulation, Component, InjectionToken, inject, EventEmitter, Output, ChangeDetectionStrategy, Injectable, ElementRef, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { HostBinding, Input, ViewEncapsulation, Component, InjectionToken, inject, EventEmitter, Output, ChangeDetectionStrategy, ComponentRef, Injectable, ElementRef, Directive, NgModule } from '@angular/core';
|
|
4
4
|
import { ComponentPortal, CdkPortalOutlet } from '@angular/cdk/portal';
|
|
5
|
-
import {
|
|
5
|
+
import { AXOverlayService } from '@acorex/cdk/overlay';
|
|
6
|
+
import { DOCUMENT } from '@angular/common';
|
|
6
7
|
import { asyncScheduler, BehaviorSubject } from 'rxjs';
|
|
7
8
|
import { observeOn, finalize } from 'rxjs/operators';
|
|
8
9
|
|
|
@@ -46,7 +47,7 @@ class AXLoadingSpinnerComponent {
|
|
|
46
47
|
@if (text) {
|
|
47
48
|
<span> {{ text }} </span>
|
|
48
49
|
}
|
|
49
|
-
`, isInline: true, styles: ["@layer components{ax-loading-spinner .ax-loader{box-sizing:border-box;animation:var(--animate-spin,spin 1s linear infinite);border-color:var(--ax-comp-bg);border-radius:3.40282e38px;margin:auto;display:inline-block;border-bottom-color:#0000!important}ax-loading-spinner.ax-white .ax-loader{border-color:var(--color-white,#fff)}ax-loading-spinner.ax-default .ax-loader{border-color:var(--color-black,#000)}ax-loading-spinner.ax-default .ax-loader:where(.dark,.dark *){border-color:var(--color-white,#fff)}ax-loading-spinner.ax-black .ax-loader{border-color:var(--color-black,#000)}}@keyframes spin{to{transform:rotate(360deg)}}\n/*! tailwindcss v4.2.
|
|
50
|
+
`, isInline: true, styles: ["@layer components{ax-loading-spinner .ax-loader{box-sizing:border-box;animation:var(--animate-spin,spin 1s linear infinite);border-color:var(--ax-comp-bg);border-radius:3.40282e38px;margin:auto;display:inline-block;border-bottom-color:#0000!important}ax-loading-spinner.ax-white .ax-loader{border-color:var(--color-white,#fff)}ax-loading-spinner.ax-default .ax-loader{border-color:var(--color-black,#000)}ax-loading-spinner.ax-default .ax-loader:where(.dark,.dark *){border-color:var(--color-white,#fff)}ax-loading-spinner.ax-black .ax-loader{border-color:var(--color-black,#000)}}@keyframes spin{to{transform:rotate(360deg)}}\n/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
50
51
|
}
|
|
51
52
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLoadingSpinnerComponent, decorators: [{
|
|
52
53
|
type: Component,
|
|
@@ -61,7 +62,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
61
62
|
@if (text) {
|
|
62
63
|
<span> {{ text }} </span>
|
|
63
64
|
}
|
|
64
|
-
`, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXComponent, useExisting: AXLoadingSpinnerComponent }], styles: ["@layer components{ax-loading-spinner .ax-loader{box-sizing:border-box;animation:var(--animate-spin,spin 1s linear infinite);border-color:var(--ax-comp-bg);border-radius:3.40282e38px;margin:auto;display:inline-block;border-bottom-color:#0000!important}ax-loading-spinner.ax-white .ax-loader{border-color:var(--color-white,#fff)}ax-loading-spinner.ax-default .ax-loader{border-color:var(--color-black,#000)}ax-loading-spinner.ax-default .ax-loader:where(.dark,.dark *){border-color:var(--color-white,#fff)}ax-loading-spinner.ax-black .ax-loader{border-color:var(--color-black,#000)}}@keyframes spin{to{transform:rotate(360deg)}}\n/*! tailwindcss v4.2.
|
|
65
|
+
`, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXComponent, useExisting: AXLoadingSpinnerComponent }], styles: ["@layer components{ax-loading-spinner .ax-loader{box-sizing:border-box;animation:var(--animate-spin,spin 1s linear infinite);border-color:var(--ax-comp-bg);border-radius:3.40282e38px;margin:auto;display:inline-block;border-bottom-color:#0000!important}ax-loading-spinner.ax-white .ax-loader{border-color:var(--color-white,#fff)}ax-loading-spinner.ax-default .ax-loader{border-color:var(--color-black,#000)}ax-loading-spinner.ax-default .ax-loader:where(.dark,.dark *){border-color:var(--color-white,#fff)}ax-loading-spinner.ax-black .ax-loader{border-color:var(--color-black,#000)}}@keyframes spin{to{transform:rotate(360deg)}}\n/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */\n"] }]
|
|
65
66
|
}], propDecorators: { text: [{
|
|
66
67
|
type: Input
|
|
67
68
|
}], color: [{
|
|
@@ -145,11 +146,11 @@ class AXLoadingComponent extends MXBaseComponent {
|
|
|
145
146
|
}
|
|
146
147
|
}
|
|
147
148
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLoadingComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
148
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: AXLoadingComponent, isStandalone: true, selector: "ax-loading", inputs: { visible: "visible", type: "type", context: "context" }, outputs: { visibleChange: "visibleChange" }, providers: [{ provide: AXComponent, useExisting: AXLoadingComponent }], usesInheritance: true, ngImport: i0, template: ` <ng-template [cdkPortalOutlet]="_selectedPortal" (attached)="_handleAttached($event)"></ng-template> `, isInline: true, styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-content:\"\";--tw-outline-style:solid}}}@layer components{ax-loading{padding-inline:calc(var(--spacing,.25rem) * 2);position:relative}ax-loading:before,ax-loading:after{--tw-translate-x:-50%;--tw-translate-y:-50%;width:100%;height:100%;translate:var(--tw-translate-x) var(--tw-translate-y);transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);animation:var(--animate-pulse,1s ease-in-out both pulse);--tw-content:\"\";content:var(--tw-content);inset-inline-start:50%;background-color:#0000;border-radius:3.40282e38px;animation-iteration-count:infinite;position:absolute;top:50%}ax-loading ax-loading-spinner{gap:calc(var(--spacing,.25rem) * 3);display:flex}.ax-loading-overlay-backdrop{background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)));opacity:.6!important}.ax-loading-pane{inset-inline-start:calc(var(--spacing,.25rem) * 0);inset-inline-end:calc(var(--spacing,.25rem) * 0);top:calc(var(--spacing,.25rem) * 0);bottom:calc(var(--spacing,.25rem) * 0);width:100%!important;height:100%!important}.ax-loading-pane .cdk-dialog-container{justify-content:center;align-items:center;display:flex!important}.ax-loading-pane .cdk-dialog-container:focus,.ax-loading-pane .cdk-dialog-container:focus-visible,.ax-loading-pane .cdk-dialog-container:focus-within{outline-style:var(--tw-outline-style);outline-offset:2px;--tw-outline-style:solid;outline:2px solid #0000}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-content{syntax:\"*\";inherits:false;initial-value:\"\"}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.2.
|
|
149
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: AXLoadingComponent, isStandalone: true, selector: "ax-loading", inputs: { visible: "visible", type: "type", context: "context" }, outputs: { visibleChange: "visibleChange" }, providers: [{ provide: AXComponent, useExisting: AXLoadingComponent }], usesInheritance: true, ngImport: i0, template: ` <ng-template [cdkPortalOutlet]="_selectedPortal" (attached)="_handleAttached($event)"></ng-template> `, isInline: true, styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-content:\"\";--tw-outline-style:solid}}}@layer components{ax-loading{padding-inline:calc(var(--spacing,.25rem) * 2);position:relative}ax-loading:before,ax-loading:after{--tw-translate-x:-50%;--tw-translate-y:-50%;width:100%;height:100%;translate:var(--tw-translate-x) var(--tw-translate-y);transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);animation:var(--animate-pulse,1s ease-in-out both pulse);--tw-content:\"\";content:var(--tw-content);inset-inline-start:50%;background-color:#0000;border-radius:3.40282e38px;animation-iteration-count:infinite;position:absolute;top:50%}ax-loading ax-loading-spinner{gap:calc(var(--spacing,.25rem) * 3);display:flex}.ax-loading-overlay-backdrop{background-color:var(--color-surface);background-color:var(--color-surface,rgba(var(--ax-sys-color-surface-surface)));opacity:.6!important}.ax-loading-pane{inset-inline-start:calc(var(--spacing,.25rem) * 0);inset-inline-end:calc(var(--spacing,.25rem) * 0);top:calc(var(--spacing,.25rem) * 0);bottom:calc(var(--spacing,.25rem) * 0);width:100%!important;height:100%!important}.ax-loading-pane .cdk-dialog-container{justify-content:center;align-items:center;display:flex!important}.ax-loading-pane .cdk-dialog-container:focus,.ax-loading-pane .cdk-dialog-container:focus-visible,.ax-loading-pane .cdk-dialog-container:focus-within{outline-style:var(--tw-outline-style);outline-offset:2px;--tw-outline-style:solid;outline:2px solid #0000}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-content{syntax:\"*\";inherits:false;initial-value:\"\"}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
149
150
|
}
|
|
150
151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLoadingComponent, decorators: [{
|
|
151
152
|
type: Component,
|
|
152
|
-
args: [{ selector: 'ax-loading', template: ` <ng-template [cdkPortalOutlet]="_selectedPortal" (attached)="_handleAttached($event)"></ng-template> `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkPortalOutlet], providers: [{ provide: AXComponent, useExisting: AXLoadingComponent }], styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-content:\"\";--tw-outline-style:solid}}}@layer components{ax-loading{padding-inline:calc(var(--spacing,.25rem) * 2);position:relative}ax-loading:before,ax-loading:after{--tw-translate-x:-50%;--tw-translate-y:-50%;width:100%;height:100%;translate:var(--tw-translate-x) var(--tw-translate-y);transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);animation:var(--animate-pulse,1s ease-in-out both pulse);--tw-content:\"\";content:var(--tw-content);inset-inline-start:50%;background-color:#0000;border-radius:3.40282e38px;animation-iteration-count:infinite;position:absolute;top:50%}ax-loading ax-loading-spinner{gap:calc(var(--spacing,.25rem) * 3);display:flex}.ax-loading-overlay-backdrop{background-color:var(--color-surface,rgba(var(--ax-sys-color-surface)));opacity:.6!important}.ax-loading-pane{inset-inline-start:calc(var(--spacing,.25rem) * 0);inset-inline-end:calc(var(--spacing,.25rem) * 0);top:calc(var(--spacing,.25rem) * 0);bottom:calc(var(--spacing,.25rem) * 0);width:100%!important;height:100%!important}.ax-loading-pane .cdk-dialog-container{justify-content:center;align-items:center;display:flex!important}.ax-loading-pane .cdk-dialog-container:focus,.ax-loading-pane .cdk-dialog-container:focus-visible,.ax-loading-pane .cdk-dialog-container:focus-within{outline-style:var(--tw-outline-style);outline-offset:2px;--tw-outline-style:solid;outline:2px solid #0000}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-content{syntax:\"*\";inherits:false;initial-value:\"\"}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.2.
|
|
153
|
+
args: [{ selector: 'ax-loading', template: ` <ng-template [cdkPortalOutlet]="_selectedPortal" (attached)="_handleAttached($event)"></ng-template> `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkPortalOutlet], providers: [{ provide: AXComponent, useExisting: AXLoadingComponent }], styles: ["@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-content:\"\";--tw-outline-style:solid}}}@layer components{ax-loading{padding-inline:calc(var(--spacing,.25rem) * 2);position:relative}ax-loading:before,ax-loading:after{--tw-translate-x:-50%;--tw-translate-y:-50%;width:100%;height:100%;translate:var(--tw-translate-x) var(--tw-translate-y);transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);animation:var(--animate-pulse,1s ease-in-out both pulse);--tw-content:\"\";content:var(--tw-content);inset-inline-start:50%;background-color:#0000;border-radius:3.40282e38px;animation-iteration-count:infinite;position:absolute;top:50%}ax-loading ax-loading-spinner{gap:calc(var(--spacing,.25rem) * 3);display:flex}.ax-loading-overlay-backdrop{background-color:var(--color-surface);background-color:var(--color-surface,rgba(var(--ax-sys-color-surface-surface)));opacity:.6!important}.ax-loading-pane{inset-inline-start:calc(var(--spacing,.25rem) * 0);inset-inline-end:calc(var(--spacing,.25rem) * 0);top:calc(var(--spacing,.25rem) * 0);bottom:calc(var(--spacing,.25rem) * 0);width:100%!important;height:100%!important}.ax-loading-pane .cdk-dialog-container{justify-content:center;align-items:center;display:flex!important}.ax-loading-pane .cdk-dialog-container:focus,.ax-loading-pane .cdk-dialog-container:focus-visible,.ax-loading-pane .cdk-dialog-container:focus-within{outline-style:var(--tw-outline-style);outline-offset:2px;--tw-outline-style:solid;outline:2px solid #0000}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-content{syntax:\"*\";inherits:false;initial-value:\"\"}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}\n/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */\n"] }]
|
|
153
154
|
}], propDecorators: { visibleChange: [{
|
|
154
155
|
type: Output
|
|
155
156
|
}], visible: [{
|
|
@@ -169,7 +170,9 @@ class AXLoadingService {
|
|
|
169
170
|
// Both loading state maps are kept in-sync such that
|
|
170
171
|
// they can be used by both sync and async methods.
|
|
171
172
|
this.loadingStates$ = new WeakMap();
|
|
172
|
-
this.
|
|
173
|
+
this.overlayService = inject(AXOverlayService);
|
|
174
|
+
this.document = inject(DOCUMENT);
|
|
175
|
+
this.activeOverlays = new Map();
|
|
173
176
|
}
|
|
174
177
|
/**
|
|
175
178
|
* Shows a modal loading overlay.
|
|
@@ -181,34 +184,70 @@ class AXLoadingService {
|
|
|
181
184
|
* @returns number Unique loading reference id to be used with {@link hide}.
|
|
182
185
|
*/
|
|
183
186
|
show(config) {
|
|
184
|
-
const ce = (config?.location ?? document.body);
|
|
185
|
-
const dialogRef = this.dialog.open(AXLoadingComponent, {
|
|
186
|
-
hasBackdrop: true,
|
|
187
|
-
disableClose: true,
|
|
188
|
-
restoreFocus: true,
|
|
189
|
-
closeOnDestroy: true,
|
|
190
|
-
closeOnNavigation: true,
|
|
191
|
-
ariaModal: true,
|
|
192
|
-
role: 'alertdialog',
|
|
193
|
-
panelClass: ['ax-loading-pane', 'animate-fadeIn'],
|
|
194
|
-
backdropClass: ['ax-loading-overlay-backdrop', 'animate-fadeIn'],
|
|
195
|
-
});
|
|
187
|
+
const ce = (config?.location ?? this.document.body);
|
|
196
188
|
const id = new Date().getTime();
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
189
|
+
const isElementLevel = ce !== this.document.body;
|
|
190
|
+
const inputs = {};
|
|
191
|
+
if (config?.type)
|
|
192
|
+
inputs['type'] = config.type;
|
|
193
|
+
if (config?.context)
|
|
194
|
+
inputs['context'] = config.context;
|
|
195
|
+
const entry = {
|
|
196
|
+
dispose: () => {
|
|
197
|
+
/* noop until overlay is created */
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
this.activeOverlays.set(id, entry);
|
|
201
|
+
this.overlayService
|
|
202
|
+
.create(AXLoadingComponent, {
|
|
203
|
+
inputs,
|
|
204
|
+
backdrop: isElementLevel
|
|
205
|
+
? { enabled: false }
|
|
206
|
+
: {
|
|
207
|
+
enabled: true,
|
|
208
|
+
background: true,
|
|
209
|
+
closeOnClick: false,
|
|
210
|
+
backdropClass: 'ax-loading-overlay-backdrop',
|
|
211
|
+
},
|
|
212
|
+
panelClass: ['ax-loading-pane', 'ax-animate-fadeIn'],
|
|
213
|
+
})
|
|
214
|
+
.then((overlayRef) => {
|
|
215
|
+
if (overlayRef.instance instanceof ComponentRef) {
|
|
216
|
+
const instance = overlayRef.instance.instance;
|
|
217
|
+
instance.visible = true;
|
|
218
|
+
instance.id = id.toString();
|
|
219
|
+
}
|
|
220
|
+
if (isElementLevel) {
|
|
221
|
+
const backdrop = this.document.createElement('div');
|
|
222
|
+
backdrop.classList.add('ax-loading-overlay-backdrop', 'ax-animate-fadeIn');
|
|
223
|
+
backdrop.style.position = 'absolute';
|
|
224
|
+
backdrop.style.top = '0';
|
|
225
|
+
backdrop.style.left = '0';
|
|
226
|
+
backdrop.style.width = '100%';
|
|
227
|
+
backdrop.style.height = '100%';
|
|
228
|
+
ce.style.position = 'relative';
|
|
229
|
+
const ov = overlayRef.overlayElement;
|
|
230
|
+
if (ov) {
|
|
231
|
+
ov.style.position = 'absolute';
|
|
232
|
+
ce.appendChild(backdrop);
|
|
233
|
+
ce.appendChild(ov);
|
|
234
|
+
setTimeout(() => {
|
|
235
|
+
ov.style.position = 'absolute';
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
entry.dispose = () => {
|
|
239
|
+
backdrop.remove();
|
|
240
|
+
overlayRef.dispose();
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
entry.dispose = () => overlayRef.dispose();
|
|
245
|
+
}
|
|
246
|
+
if (!this.activeOverlays.has(id)) {
|
|
247
|
+
entry.dispose();
|
|
248
|
+
}
|
|
249
|
+
});
|
|
210
250
|
return id;
|
|
211
|
-
// TODO: diabled focus and click, maybe we need a service and directive for it
|
|
212
251
|
}
|
|
213
252
|
/**
|
|
214
253
|
* Hides a previously shown modal loading overlay.
|
|
@@ -216,9 +255,10 @@ class AXLoadingService {
|
|
|
216
255
|
* @param id Loading reference id returned by {@link show}.
|
|
217
256
|
*/
|
|
218
257
|
hide(id) {
|
|
219
|
-
const
|
|
220
|
-
if (
|
|
221
|
-
|
|
258
|
+
const entry = this.activeOverlays.get(id);
|
|
259
|
+
if (entry) {
|
|
260
|
+
entry.dispose();
|
|
261
|
+
this.activeOverlays.delete(id);
|
|
222
262
|
}
|
|
223
263
|
}
|
|
224
264
|
/**
|