@acorex/components 18.14.1-next.4 → 18.15.0
Sign up to get free protection for your applications and to get access to all the features.
- package/comment/lib/comment-container/comment-container.component.d.ts +1 -0
- package/common/lib/components/value-component.class.d.ts +1 -0
- package/common/lib/directives/auto-focus.directive.d.ts +1 -0
- package/common/lib/directives/ripple.directive.d.ts +1 -0
- package/data-table/lib/columns/data-table-column-resizable.directive.d.ts +1 -0
- package/data-table/lib/data-table/data-table.component.d.ts +61 -60
- package/data-table/lib/infinite-scroll-data-table/infinite-scroll-data-table.component.d.ts +7 -6
- package/drawer/lib/drawer/drawer-item/drawer.component.d.ts +4 -6
- package/esm2022/audio-wave/lib/audio-wave.component.mjs +79 -14
- package/esm2022/avatar/lib/avatar.component.mjs +2 -2
- package/esm2022/button/lib/button.component.mjs +2 -2
- package/esm2022/calendar/lib/calendar-range.component.mjs +2 -2
- package/esm2022/calendar/lib/calendar.component.mjs +3 -3
- package/esm2022/comment/lib/comment-container/comment-container.component.mjs +7 -3
- package/esm2022/common/lib/components/value-component.class.mjs +4 -2
- package/esm2022/common/lib/directives/auto-focus.directive.mjs +5 -3
- package/esm2022/common/lib/directives/inverted-color.directive.mjs +1 -1
- package/esm2022/common/lib/directives/ripple.directive.mjs +5 -3
- package/esm2022/conversation/lib/conversation-message/conversation-message.component.mjs +2 -2
- package/esm2022/conversation/lib/conversation-messages/conversation-message-voice/conversation-message-voice.component.mjs +2 -2
- package/esm2022/cron-job/lib/cron-job-container/cron-job-container.component.mjs +3 -3
- package/esm2022/cron-job/lib/day/day.component.mjs +7 -6
- package/esm2022/cron-job/lib/hours/hours.component.mjs +7 -6
- package/esm2022/cron-job/lib/minutes/minutes.component.mjs +7 -6
- package/esm2022/cron-job/lib/month/month.component.mjs +7 -6
- package/esm2022/cron-job/lib/seconds/seconds.component.mjs +7 -6
- package/esm2022/cron-job/lib/year/year.component.mjs +7 -6
- package/esm2022/data-table/lib/columns/data-table-column-resizable.directive.mjs +9 -7
- package/esm2022/data-table/lib/data-table/data-table.component.mjs +71 -67
- package/esm2022/data-table/lib/infinite-scroll-data-table/infinite-scroll-data-table.component.mjs +16 -11
- package/esm2022/drawer/lib/drawer/drawer-item/drawer.component.mjs +10 -10
- package/esm2022/list/lib/list.component.mjs +17 -5
- package/esm2022/loading/lib/loading-spinner.component.mjs +2 -2
- package/esm2022/loading-dialog/lib/loading-dialog.component.mjs +2 -2
- package/esm2022/menu/lib/context-menu.component.mjs +28 -21
- package/esm2022/password-box/index.mjs +2 -1
- package/esm2022/password-box/lib/password-box.component.mjs +17 -9
- package/esm2022/password-box/lib/password-box.module.mjs +22 -4
- package/esm2022/password-box/lib/password-strength-validation/password-strength-validation.component.mjs +63 -0
- package/esm2022/phone-box/lib/phone-box.component.mjs +17 -5
- package/esm2022/popover/lib/popover.component.mjs +5 -3
- package/esm2022/popup/lib/popup.component.mjs +2 -2
- package/esm2022/select-box/lib/select-box.component.mjs +7 -24
- package/esm2022/selection-list/lib/selection-list.component.mjs +2 -2
- package/esm2022/side-menu/index.mjs +2 -2
- package/esm2022/side-menu/lib/side-menu-item/side-menu-item.component.mjs +81 -0
- package/esm2022/side-menu/lib/side-menu.module.mjs +2 -2
- package/esm2022/step-wizard/lib/step-wizard-item/step-wizard-item.component.mjs +5 -4
- package/esm2022/step-wizard/lib/step-wizard.class.mjs +1 -1
- package/esm2022/step-wizard/lib/step-wizard.component.mjs +21 -32
- package/esm2022/uploader/lib/uploader-zone.directive.mjs +7 -5
- package/fesm2022/acorex-components-audio-wave.mjs +78 -13
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +2 -2
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +2 -2
- package/fesm2022/acorex-components-calendar.mjs +4 -4
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +7 -4
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +6 -3
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +2 -2
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +19 -18
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +89 -81
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +10 -11
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +16 -4
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +2 -2
- package/fesm2022/acorex-components-loading.mjs +2 -2
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +24 -18
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +97 -12
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +16 -4
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +4 -3
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +2 -2
- package/fesm2022/acorex-components-select-box.mjs +6 -23
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +2 -2
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +24 -34
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +7 -6
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/menu/lib/context-menu.component.d.ts +2 -1
- package/package.json +1 -1
- package/password-box/index.d.ts +1 -0
- package/password-box/lib/password-box.component.d.ts +15 -7
- package/password-box/lib/password-box.module.d.ts +9 -5
- package/password-box/lib/password-strength-validation/password-strength-validation.component.d.ts +34 -0
- package/phone-box/lib/phone-box.component.d.ts +4 -2
- package/popover/lib/popover.component.d.ts +1 -0
- package/select-box/lib/select-box.component.d.ts +0 -8
- package/side-menu/index.d.ts +1 -1
- package/side-menu/lib/side-menu.module.d.ts +1 -1
- package/step-wizard/lib/step-wizard-item/step-wizard-item.component.d.ts +10 -9
- package/step-wizard/lib/step-wizard.class.d.ts +1 -1
- package/step-wizard/lib/step-wizard.component.d.ts +7 -13
- package/uploader/lib/uploader-zone.directive.d.ts +1 -0
- package/esm2022/side-menu/lib/side-menu-item/side-menu-item.compoent.mjs +0 -81
- /package/side-menu/lib/side-menu-item/{side-menu-item.compoent.d.ts → side-menu-item.component.d.ts} +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
1
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { signal, Injectable, inject, afterNextRender, Component, ChangeDetectionStrategy, ViewEncapsulation, model, input, HostBinding, NgModule } from '@angular/core';
|
3
|
+
import { signal, Injectable, inject, afterNextRender, Component, ChangeDetectionStrategy, ViewEncapsulation, model, input, NgZone, HostBinding, NgModule } from '@angular/core';
|
4
4
|
import { MXBaseComponent, AXComponent, AXClosbaleComponent } from '@acorex/components/common';
|
5
5
|
import { isBrowser } from '@acorex/core/platform';
|
6
6
|
|
@@ -49,12 +49,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
49
49
|
* @category Components
|
50
50
|
*/
|
51
51
|
class AXDrawerComponent extends MXBaseComponent {
|
52
|
-
|
53
|
-
|
54
|
-
*/
|
55
|
-
constructor(_zone) {
|
56
|
-
super();
|
57
|
-
this._zone = _zone;
|
52
|
+
constructor() {
|
53
|
+
super(...arguments);
|
58
54
|
this.location = model('start');
|
59
55
|
this.showBackdrop = input(true);
|
60
56
|
this.mode = model('overlay');
|
@@ -63,8 +59,11 @@ class AXDrawerComponent extends MXBaseComponent {
|
|
63
59
|
this.backdropElement = signal(null);
|
64
60
|
this.loaded = signal(false);
|
65
61
|
this.service = inject(AXDrawerService);
|
62
|
+
this._zone = inject(NgZone);
|
63
|
+
this.document = inject(DOCUMENT);
|
66
64
|
}
|
67
65
|
/**
|
66
|
+
*
|
68
67
|
* @ignore
|
69
68
|
*/
|
70
69
|
ngAfterContentInit() {
|
@@ -133,7 +132,7 @@ class AXDrawerComponent extends MXBaseComponent {
|
|
133
132
|
_addBackdrop() {
|
134
133
|
if (isBrowser()) {
|
135
134
|
this._zone.runOutsideAngular(() => {
|
136
|
-
const backDropElem = document.createElement('div');
|
135
|
+
const backDropElem = this.document.createElement('div');
|
137
136
|
backDropElem.classList.add('ax-backdrop');
|
138
137
|
backDropElem.onclick = () => {
|
139
138
|
this._zone.run(() => {
|
@@ -164,7 +163,7 @@ class AXDrawerComponent extends MXBaseComponent {
|
|
164
163
|
get __hostClass() {
|
165
164
|
return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${this.collapsed() ? 'ax-collapsed' : 'ax-expanded'} ${this.loaded() && 'ax-state-loaded'}`;
|
166
165
|
}
|
167
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXDrawerComponent, deps:
|
166
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXDrawerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
168
167
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXDrawerComponent, selector: "ax-drawer", inputs: { location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, closeOthers: { classPropertyName: "closeOthers", publicName: "closeOthers", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { location: "locationChange", mode: "modeChange", collapsed: "collapsedChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
|
169
168
|
{ provide: AXComponent, useExisting: AXDrawerComponent },
|
170
169
|
{ provide: AXClosbaleComponent, useExisting: AXDrawerComponent },
|
@@ -182,7 +181,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
182
181
|
{ provide: AXComponent, useExisting: AXDrawerComponent },
|
183
182
|
{ provide: AXClosbaleComponent, useExisting: AXDrawerComponent },
|
184
183
|
], styles: ["ax-drawer{display:flex;height:100%;max-width:95%;flex-direction:column;background-color:rgba(var(--ax-color-surface))}ax-drawer.ax-state-loaded{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer ax-header,ax-drawer ax-footer{padding:.75rem}ax-drawer ax-footer{border-top-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer ax-header{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer>ax-content{flex:1 1 0%;overflow:auto}ax-drawer.ax-drawer-overlay{position:absolute;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer.ax-drawer-overlay.ax-expanded{z-index:20}ax-drawer.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-push{flex:0 1 auto}ax-drawer.ax-drawer-push.ax-expanded{z-index:20}ax-drawer.ax-drawer-push.ax-collapsed{z-index:0}ax-drawer.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0px}ax-drawer.ax-drawer-push.ax-drawer-start.ax-collapsed{margin-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-push.ax-drawer-end{order:9999}ax-drawer.ax-drawer-push.ax-drawer-end.ax-expanded{margin-inline-end:0px}ax-drawer.ax-drawer-push.ax-drawer-end.ax-collapsed{margin-inline-end:calc(-1 * var(--ax-el-width))}\n"] }]
|
185
|
-
}],
|
184
|
+
}], propDecorators: { __hostClass: [{
|
186
185
|
type: HostBinding,
|
187
186
|
args: ['class']
|
188
187
|
}] } });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-drawer.mjs","sources":["../../../../libs/components/drawer/src/lib/drawer.service.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-container/drawer-container.component.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-item/drawer.component.ts","../../../../libs/components/drawer/src/lib/drawer.module.ts","../../../../libs/components/drawer/src/acorex-components-drawer.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\n@Injectable()\nexport class AXDrawerService {\n drawerElements = signal<AXDrawerComponent[]>(null);\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\nimport { AXDrawerComponent } from '../drawer-item/drawer.component';\n\n/**\n * A container component that organizes and positions drawer components.\n * @category component\n */\n@Component({\n selector: 'ax-drawer-container',\n template: `\n <ng-content select=\"ax-drawer\"> </ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [AXDrawerService],\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n private service = inject(AXDrawerService);\n\n constructor() {\n super();\n afterNextRender(() => {\n const host = this.getHostElement();\n const drawerClasses = Array.from(host.querySelectorAll(`ax-drawer`)).map(\n (c) => c['__axContext__'] as AXDrawerComponent,\n );\n this.service.drawerElements.set(drawerClasses);\n });\n }\n}\n","import { AXClosbaleComponent, AXComponent, MXBaseComponent } from '@acorex/components/common';\nimport { isBrowser } from '@acorex/core/platform';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n HostBinding,\n inject,\n input,\n model,\n NgZone,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\n\nexport type AXDrawerMode = 'push' | 'overlay';\nexport type AXDrawerLocation = 'start' | 'end';\n\n/**\n * A component that represents a drawer with header and content sections.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-drawer',\n template: `\n <ng-content select=\"ax-header\"></ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDrawerComponent },\n { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },\n ],\n})\nexport class AXDrawerComponent extends MXBaseComponent implements AfterContentInit, DoCheck {\n location = model<AXDrawerLocation>('start');\n\n showBackdrop = input(true);\n\n mode = model<AXDrawerMode>('overlay');\n\n closeOthers = input(false);\n\n collapsed = model(true);\n\n private backdropElement = signal<HTMLElement>(null);\n\n protected loaded = signal(false);\n\n private service = inject(AXDrawerService);\n\n /**\n * @ignore\n */\n constructor(private _zone: NgZone) {\n super();\n }\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n this._detectBoundingSize();\n setTimeout(() => {\n this.loaded.set(true);\n }, 5000);\n }\n\n /**\n * @ignore\n */\n ngDoCheck() {\n this._detectBoundingSize();\n }\n\n /**\n * @ignore\n */\n private _detectBoundingSize() {\n this._zone.runOutsideAngular(() => {\n const host = this.getHostElement();\n if (host.clientWidth) {\n host.style.setProperty('--ax-el-width', `${host.clientWidth}px`);\n }\n });\n }\n\n /**\n * Toggles the collapsed state of the drawer.\n */\n toggle() {\n if (this.collapsed()) {\n this.open();\n } else {\n this.close();\n }\n }\n\n /**\n * Collapses the drawer.\n * @ignore\n */\n close() {\n this.collapsed.set(true);\n this._removeBackdrop();\n }\n\n /**\n * Expands the drawer.\n */\n open() {\n if (!this.collapsed()) return;\n\n this.collapsed.set(false);\n\n if (!this.closeOthers()) {\n this.service.drawerElements().forEach((element) => {\n if (element.location() === this.location() && element.id !== this.id) {\n element.close();\n }\n });\n }\n\n if (this.showBackdrop() && this.mode() === 'overlay') {\n this._addBackdrop();\n }\n }\n\n /**\n * @ignore\n */\n private _addBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n const backDropElem = document.createElement('div');\n backDropElem.classList.add('ax-backdrop');\n backDropElem.onclick = () => {\n this._zone.run(() => {\n this.close();\n });\n };\n this.getHostElement()?.parentElement?.appendChild(backDropElem);\n this.backdropElement.set(backDropElem);\n });\n }\n }\n\n /**\n * @ignore\n */\n private _removeBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n if (this.backdropElement()) {\n this.getHostElement()?.parentElement?.removeChild(this.backdropElement());\n this.backdropElement.set(null);\n }\n });\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${\n this.collapsed() ? 'ax-collapsed' : 'ax-expanded'\n } ${this.loaded() && 'ax-state-loaded'}`;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDrawerContainerComponent } from './drawer/drawer-container/drawer-container.component';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\nconst COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAIa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAsB,IAAI,CAAC;AACnD;8GAFY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAf,eAAe,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;ACQD;;;AAGG;AAYG,MAAO,0BAA2B,SAAQ,eAAe,CAAA;AAG7D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAHD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;QAIvC,eAAe,CAAC,MAAK;AACnB,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE;YAClC,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA,SAAA,CAAW,CAAC,CAAC,CAAC,GAAG,CACtE,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAAsB,CAC/C;YACD,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC;AAChD,SAAC,CAAC;;8GAXO,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,E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E,0BAA0B,CAAC;AACjE,MAAM,OAAO,GAAG,CAAC,YAAY,CAAC;MAQjB,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAd,cAAc,EAAA,YAAA,EAAA,CATR,iBAAiB,EAAE,0BAA0B,aAC/C,YAAY,CAAA,EAAA,OAAA,EAAA,CADV,iBAAiB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;AASnD,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,cAAc,YAJZ,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACbD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-drawer.mjs","sources":["../../../../libs/components/drawer/src/lib/drawer.service.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-container/drawer-container.component.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-item/drawer.component.ts","../../../../libs/components/drawer/src/lib/drawer.module.ts","../../../../libs/components/drawer/src/acorex-components-drawer.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\n@Injectable()\nexport class AXDrawerService {\n drawerElements = signal<AXDrawerComponent[]>(null);\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\nimport { AXDrawerComponent } from '../drawer-item/drawer.component';\n\n/**\n * A container component that organizes and positions drawer components.\n * @category component\n */\n@Component({\n selector: 'ax-drawer-container',\n template: `\n <ng-content select=\"ax-drawer\"> </ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [AXDrawerService],\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n private service = inject(AXDrawerService);\n\n constructor() {\n super();\n afterNextRender(() => {\n const host = this.getHostElement();\n const drawerClasses = Array.from(host.querySelectorAll(`ax-drawer`)).map(\n (c) => c['__axContext__'] as AXDrawerComponent,\n );\n this.service.drawerElements.set(drawerClasses);\n });\n }\n}\n","import { AXClosbaleComponent, AXComponent, MXBaseComponent } from '@acorex/components/common';\nimport { isBrowser } from '@acorex/core/platform';\nimport { DOCUMENT } from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n HostBinding,\n inject,\n input,\n model,\n NgZone,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\n\nexport type AXDrawerMode = 'push' | 'overlay';\nexport type AXDrawerLocation = 'start' | 'end';\n\n/**\n * A component that represents a drawer with header and content sections.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-drawer',\n template: `\n <ng-content select=\"ax-header\"></ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDrawerComponent },\n { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },\n ],\n})\nexport class AXDrawerComponent extends MXBaseComponent implements AfterContentInit, DoCheck {\n location = model<AXDrawerLocation>('start');\n\n showBackdrop = input(true);\n\n mode = model<AXDrawerMode>('overlay');\n\n closeOthers = input(false);\n\n collapsed = model(true);\n\n private backdropElement = signal<HTMLElement>(null);\n\n protected loaded = signal(false);\n\n private service = inject(AXDrawerService);\n\n private _zone = inject(NgZone);\n\n private document = inject(DOCUMENT);\n /**\n *\n * @ignore\n */\n ngAfterContentInit(): void {\n this._detectBoundingSize();\n setTimeout(() => {\n this.loaded.set(true);\n }, 5000);\n }\n\n /**\n * @ignore\n */\n ngDoCheck() {\n this._detectBoundingSize();\n }\n\n /**\n * @ignore\n */\n private _detectBoundingSize() {\n this._zone.runOutsideAngular(() => {\n const host = this.getHostElement();\n if (host.clientWidth) {\n host.style.setProperty('--ax-el-width', `${host.clientWidth}px`);\n }\n });\n }\n\n /**\n * Toggles the collapsed state of the drawer.\n */\n toggle() {\n if (this.collapsed()) {\n this.open();\n } else {\n this.close();\n }\n }\n\n /**\n * Collapses the drawer.\n * @ignore\n */\n close() {\n this.collapsed.set(true);\n this._removeBackdrop();\n }\n\n /**\n * Expands the drawer.\n */\n open() {\n if (!this.collapsed()) return;\n\n this.collapsed.set(false);\n\n if (!this.closeOthers()) {\n this.service.drawerElements().forEach((element) => {\n if (element.location() === this.location() && element.id !== this.id) {\n element.close();\n }\n });\n }\n\n if (this.showBackdrop() && this.mode() === 'overlay') {\n this._addBackdrop();\n }\n }\n\n /**\n * @ignore\n */\n private _addBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n const backDropElem = this.document.createElement('div');\n backDropElem.classList.add('ax-backdrop');\n backDropElem.onclick = () => {\n this._zone.run(() => {\n this.close();\n });\n };\n this.getHostElement()?.parentElement?.appendChild(backDropElem);\n this.backdropElement.set(backDropElem);\n });\n }\n }\n\n /**\n * @ignore\n */\n private _removeBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n if (this.backdropElement()) {\n this.getHostElement()?.parentElement?.removeChild(this.backdropElement());\n this.backdropElement.set(null);\n }\n });\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${\n this.collapsed() ? 'ax-collapsed' : 'ax-expanded'\n } ${this.loaded() && 'ax-state-loaded'}`;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDrawerContainerComponent } from './drawer/drawer-container/drawer-container.component';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\nconst COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAIa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAsB,IAAI,CAAC;AACnD;8GAFY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAf,eAAe,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;ACQD;;;AAGG;AAYG,MAAO,0BAA2B,SAAQ,eAAe,CAAA;AAG7D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAHD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;QAIvC,eAAe,CAAC,MAAK;AACnB,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE;YAClC,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA,SAAA,CAAW,CAAC,CAAC,CAAC,GAAG,CACtE,CAAC,CA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|
}
|
132
|
-
const id = document.activeElement?.closest('li')?.dataset['id'];
|
132
|
+
const id = this.document.activeElement?.closest('li')?.dataset['id'];
|
133
133
|
this.toggleSelect(id);
|
134
134
|
e.preventDefault();
|
135
135
|
e.stopPropagation();
|
@@ -141,7 +141,7 @@ class AXListComponent extends MXSelectionValueComponent {
|
|
141
141
|
focusItemByNav(sign) {
|
142
142
|
const list = this.getHostElement().querySelector('ul');
|
143
143
|
const fn = (s) => list.querySelector(s);
|
144
|
-
const itemDiv = document.activeElement?.closest('li') || fn(`li.ax-state-selected`) || fn(`li`);
|
144
|
+
const itemDiv = this.document.activeElement?.closest('li') || fn(`li.ax-state-selected`) || fn(`li`);
|
145
145
|
const next = (sign == 1 ? itemDiv.nextElementSibling : itemDiv.previousElementSibling);
|
146
146
|
if (next) {
|
147
147
|
next.focus();
|
@@ -199,7 +199,8 @@ class AXListComponent extends MXSelectionValueComponent {
|
|
199
199
|
*/
|
200
200
|
focus() {
|
201
201
|
const list = this.getHostElement().querySelector('ul');
|
202
|
-
const focusable = list.querySelector('li.ax-state-selected') ??
|
202
|
+
const focusable = list.querySelector('li.ax-state-selected') ??
|
203
|
+
list.querySelector('li.list-item');
|
203
204
|
if (focusable) {
|
204
205
|
focusable.focus();
|
205
206
|
}
|
@@ -235,7 +236,18 @@ class AXListComponent extends MXSelectionValueComponent {
|
|
235
236
|
}
|
236
237
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXListComponent, decorators: [{
|
237
238
|
type: Component,
|
238
|
-
args: [{ selector: 'ax-list', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, inputs: [
|
239
|
+
args: [{ selector: 'ax-list', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, inputs: [
|
240
|
+
'id',
|
241
|
+
'name',
|
242
|
+
'disabled',
|
243
|
+
'readonly',
|
244
|
+
'valueField',
|
245
|
+
'textField',
|
246
|
+
'textTemplate',
|
247
|
+
'disabledField',
|
248
|
+
'multiple',
|
249
|
+
'selectionMode',
|
250
|
+
], outputs: ['onValueChanged', 'disabledChange', 'readOnlyChange', 'onBlur', 'onFocus'], providers: [
|
239
251
|
{ provide: AXComponent, useExisting: AXListComponent },
|
240
252
|
{ provide: AXFocusableComponent, useExisting: AXListComponent },
|
241
253
|
{ provide: AXValuableComponent, useExisting: AXListComponent },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-list.mjs","sources":["../../../../libs/components/list/src/lib/list.component.ts","../../../../libs/components/list/src/lib/list.component.html","../../../../libs/components/list/src/lib/list.module.ts","../../../../libs/components/list/src/acorex-components-list.ts"],"sourcesContent":["import {\n AXComponent,\n AXDataSource,\n AXEvent,\n AXFocusableComponent,\n AXItemClickEvent,\n AXListDataSource,\n AXValuableComponent,\n AX_SELECTION_DATA_TOKEN,\n MXSelectionBridgeService,\n MXSelectionValueComponent,\n convertArrayToDataSource,\n} from '@acorex/components/common';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n OnInit,\n Optional,\n Output,\n SkipSelf,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n WritableSignal,\n forwardRef,\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.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n inputs: ['id', 'name', 'disabled', 'readonly', 'valueField', 'textField', 'textTemplate', 'disabledField', 'multiple', 'selectionMode'],\n outputs: ['onValueChanged', 'disabledChange', 'readOnlyChange', 'onBlur', 'onFocus'],\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})\nexport class AXListComponent extends MXSelectionValueComponent implements OnInit {\n /**\n * Emitted when an item in the list is clicked.\n *\n * @event\n */\n @Output()\n onItemClick: EventEmitter<AXItemClickEvent<any>> = new EventEmitter<AXItemClickEvent<any>>();\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 const id = document.activeElement?.closest('li')?.dataset['id'];\n this.toggleSelect(id);\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n /**\n * @ignore\n */\n private focusItemByNav(sign: -1 | 1): void {\n const list = this.getHostElement().querySelector('ul');\n const fn = (s) => list.querySelector<HTMLDivElement>(s);\n const itemDiv: HTMLElement = 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 * @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() {\n this.clearSelectionCache();\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 = 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 = () => this.emptyTemplate && this.hasItems === false && this.isLoading() === false;\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string {\n const _class = `ax-default ${this.showEmptyTemplate() ? 'ax-state-empty' : ''}`;\n return this.itemTemplate ? '' : _class;\n }\n}\n","<div class=\"list-container\" cdkVirtualScrollingElement>\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 >\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource; let i = index; trackBy: trackByIdx\">\n <ng-container *ngIf=\"item !== null && item !== undefined; else loadingTpl\">\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 <ng-container *ngIf=\"itemTemplate; else defaultItemTpl\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: { data: item } }\">\n </ng-container>\n </ng-container>\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n <ng-container *ngIf=\"item !== null && item !== undefined; else loadingTpl\">\n <div class=\"ax-label-container\">\n <input\n class=\"ax-checkbox\"\n *ngIf=\"multiple && checkbox\"\n type=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\"\n />\n <span [class.ax-checkbox-label]=\"multiple && checkbox\">{{ getDisplayText(item) }}</span>\n </div>\n <!-- <i class=\"ax-icon ax-icon-check ax-selected-icon\" *ngIf=\"isItemSelected(item) \"></i> -->\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate; else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"> </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>{{ '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 { AXTranslationModule } from '@acorex/core/translation';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXListComponent } from './list.component';\n\nconst COMPONENT = [AXListComponent];\nconst MODULES = [CommonModule, ScrollingModule, AXTranslationModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAsCA;;;;AAIG;AA2BG,MAAO,eAAgB,SAAQ,yBAAyB,CAAA;AA1B9D,IAAA,WAAA,GAAA;;AA2BE;;;;AAIG;AAEH,QAAA,IAAA,CAAA,WAAW,GAAwC,IAAI,YAAY,EAAyB;AAE5F;;;;AAIG;AAEH,QAAA,IAAA,CAAA,UAAU,GAA0B,wBAAwB,CAAC,EAAE,CAAC;AAEhE;;AAEG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAoC,MAAM,CAAC,EAAE,CAAC;AA4B9D;;;;AAIG;AAEH,QAAA,IAAA,CAAA,sBAAsB,GAA2C,IAAI,YAAY,EAA4B;AAE7G;;;;AAIG;QAEH,IAAQ,CAAA,QAAA,GAAG,IAAI;AAOf;;AAEG;AACO,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC;AAElC;;AAEG;QACO,IAAQ,CAAA,QAAA,GAAG,KAAK;AAE1B;;AAEG;QACK,IAAS,CAAA,SAAA,GAAG,CAAC;AAErB;;AAEG;QACK,IAAa,CAAA,aAAA,GAAG,KAAK;AAuJ7B;;;AAGG;QACH,IAAiB,CAAA,iBAAA,GAAG,MAAM,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,IAAI,IAAI,CAAC,SAAS,EAAE,KAAK,KAAK;AAUtG;AAtOC;;AAEG;IACH,IACW,UAAU,CAAC,CAAkB,EAAA;AACtC,QAAA,IAAI,CAAC,gBAAgB,CAAC,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AAe,EAAE,mBAAmB,CAAC;MAQvD,YAAY,CAAA;8GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAZ,YAAY,EAAA,YAAA,EAAA,CATN,eAAe,CACjB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,eAAe,EAAE,mBAAmB,CAAA,EAAA,OAAA,EAAA,CADhD,eAAe,CAAA,EAAA,CAAA,CAAA;AASrB,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,YAJV,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACdD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-list.mjs","sources":["../../../../libs/components/list/src/lib/list.component.ts","../../../../libs/components/list/src/lib/list.component.html","../../../../libs/components/list/src/lib/list.module.ts","../../../../libs/components/list/src/acorex-components-list.ts"],"sourcesContent":["import {\n AXComponent,\n AXDataSource,\n AXEvent,\n AXFocusableComponent,\n AXItemClickEvent,\n AXListDataSource,\n AXValuableComponent,\n AX_SELECTION_DATA_TOKEN,\n MXSelectionBridgeService,\n MXSelectionValueComponent,\n convertArrayToDataSource,\n} from '@acorex/components/common';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n OnInit,\n Optional,\n Output,\n SkipSelf,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n WritableSignal,\n forwardRef,\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.scss'],\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'],\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})\nexport class AXListComponent extends MXSelectionValueComponent implements OnInit {\n /**\n * Emitted when an item in the list is clicked.\n *\n * @event\n */\n @Output()\n onItemClick: EventEmitter<AXItemClickEvent<any>> = new EventEmitter<AXItemClickEvent<any>>();\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> =\n 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 const id = this.document.activeElement?.closest('li')?.dataset['id'];\n this.toggleSelect(id);\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n /**\n * @ignore\n */\n private focusItemByNav(sign: -1 | 1): void {\n const list = this.getHostElement().querySelector('ul');\n const fn = (s) => list.querySelector<HTMLDivElement>(s);\n const itemDiv: HTMLElement =\n 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 * @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() {\n this.clearSelectionCache();\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') ??\n 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 = () => this.emptyTemplate && this.hasItems === false && this.isLoading() === false;\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string {\n const _class = `ax-default ${this.showEmptyTemplate() ? 'ax-state-empty' : ''}`;\n return this.itemTemplate ? '' : _class;\n }\n}\n","<div class=\"list-container\" cdkVirtualScrollingElement>\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 >\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource; let i = index; trackBy: trackByIdx\">\n <ng-container *ngIf=\"item !== null && item !== undefined; else loadingTpl\">\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 <ng-container *ngIf=\"itemTemplate; else defaultItemTpl\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: { data: item } }\">\n </ng-container>\n </ng-container>\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n <ng-container *ngIf=\"item !== null && item !== undefined; else loadingTpl\">\n <div class=\"ax-label-container\">\n <input\n class=\"ax-checkbox\"\n *ngIf=\"multiple && checkbox\"\n type=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\"\n />\n <span [class.ax-checkbox-label]=\"multiple && checkbox\">{{ getDisplayText(item) }}</span>\n </div>\n <!-- <i class=\"ax-icon ax-icon-check ax-selected-icon\" *ngIf=\"isItemSelected(item) \"></i> -->\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate; else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"> </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>{{ '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 { AXTranslationModule } from '@acorex/core/translation';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXListComponent } from './list.component';\n\nconst COMPONENT = [AXListComponent];\nconst MODULES = [CommonModule, ScrollingModule, AXTranslationModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAsCA;;;;AAIG;AAsCG,MAAO,eAAgB,SAAQ,yBAAyB,CAAA;AArC9D,IAAA,WAAA,GAAA;;AAsCE;;;;AAIG;AAEH,QAAA,IAAA,CAAA,WAAW,GAAwC,IAAI,YAAY,EAAyB;AAE5F;;;;AAIG;AAEH,QAAA,IAAA,CAAA,UAAU,GAA0B,wBAAwB,CAAC,EAAE,CAAC;AAEhE;;AAEG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAoC,MAAM,CAAC,EAAE,CAAC;AA4B9D;;;;AAIG;AAEH,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,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACdD;;AAEG;;;;"}
|
@@ -93,11 +93,11 @@ class AXLoadingDialogComponent extends MXBaseComponent {
|
|
93
93
|
return result;
|
94
94
|
}
|
95
95
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXLoadingDialogComponent, deps: [{ token: DIALOG_DATA }, { token: i1.DialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
96
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXLoadingDialogComponent, selector: "ax-loading-dialog", usesInheritance: true, ngImport: i0, template: "<ax-title>{{ dialogTitle() }}</ax-title>\n\n<ax-progress-bar\n [mode]=\"data.mode\"\n [progress]=\"this.progressValue()\"\n [color]=\"progressColor()\"\n></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: ["ax-loading-dialog{display:flex;flex-direction:column;gap:.5rem;width:33vw;background-color:rgba(var(--ax-color-surface));padding:1rem;border-radius:var(--ax-rounded-border-default)}ax-loading-dialog ax-title{font-weight:500;font-size:1rem;margin-bottom:.5rem}@media (min-width: 320px) and (max-width:
|
96
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXLoadingDialogComponent, selector: "ax-loading-dialog", usesInheritance: true, ngImport: i0, template: "<ax-title>{{ dialogTitle() }}</ax-title>\n\n<ax-progress-bar\n [mode]=\"data.mode\"\n [progress]=\"this.progressValue()\"\n [color]=\"progressColor()\"\n></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: ["ax-loading-dialog{display:flex;flex-direction:column;gap:.5rem;width:33vw;background-color:rgba(var(--ax-color-surface));padding:1rem;border-radius:var(--ax-rounded-border-default)}ax-loading-dialog ax-title{font-weight:500;font-size:1rem;margin-bottom:.5rem}@media (min-width: 320px) and (max-width: 640px){ax-loading-dialog{width:93vw!important}}@media (min-width: 768px){ax-loading-dialog{width:55vw!important}}@media (min-width: 1280px){ax-loading-dialog{width:30vw!important}}@media (min-width: 1536px){ax-loading-dialog{width:25vw!important}}ax-loading-dialog .progress-decorators{display:flex;justify-content:space-between;font-size:.875rem}ax-loading-dialog ax-footer{justify-content:flex-end;padding-top:.75rem}\n"], dependencies: [{ kind: "directive", type: i2.AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "directive", type: i2.AXHotkeyDirective, selector: "[axHotkey]", inputs: ["axHotkey"] }, { kind: "component", type: i3.AXProgressBarComponent, selector: "ax-progress-bar", inputs: ["color", "mode", "progress", "height"], outputs: ["ValueChange", "sizeChange"] }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "component", type: i5.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i6.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
97
97
|
}
|
98
98
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXLoadingDialogComponent, decorators: [{
|
99
99
|
type: Component,
|
100
|
-
args: [{ selector: 'ax-loading-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ax-title>{{ dialogTitle() }}</ax-title>\n\n<ax-progress-bar\n [mode]=\"data.mode\"\n [progress]=\"this.progressValue()\"\n [color]=\"progressColor()\"\n></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: ["ax-loading-dialog{display:flex;flex-direction:column;gap:.5rem;width:33vw;background-color:rgba(var(--ax-color-surface));padding:1rem;border-radius:var(--ax-rounded-border-default)}ax-loading-dialog ax-title{font-weight:500;font-size:1rem;margin-bottom:.5rem}@media (min-width: 320px) and (max-width:
|
100
|
+
args: [{ selector: 'ax-loading-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ax-title>{{ dialogTitle() }}</ax-title>\n\n<ax-progress-bar\n [mode]=\"data.mode\"\n [progress]=\"this.progressValue()\"\n [color]=\"progressColor()\"\n></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: ["ax-loading-dialog{display:flex;flex-direction:column;gap:.5rem;width:33vw;background-color:rgba(var(--ax-color-surface));padding:1rem;border-radius:var(--ax-rounded-border-default)}ax-loading-dialog ax-title{font-weight:500;font-size:1rem;margin-bottom:.5rem}@media (min-width: 320px) and (max-width: 640px){ax-loading-dialog{width:93vw!important}}@media (min-width: 768px){ax-loading-dialog{width:55vw!important}}@media (min-width: 1280px){ax-loading-dialog{width:30vw!important}}@media (min-width: 1536px){ax-loading-dialog{width:25vw!important}}ax-loading-dialog .progress-decorators{display:flex;justify-content:space-between;font-size:.875rem}ax-loading-dialog ax-footer{justify-content:flex-end;padding-top:.75rem}\n"] }]
|
101
101
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
102
102
|
type: Inject,
|
103
103
|
args: [DIALOG_DATA]
|
@@ -43,7 +43,7 @@ class AXLoadingSpinnerComponent {
|
|
43
43
|
@if (text) {
|
44
44
|
<span> {{ text }} </span>
|
45
45
|
}
|
46
|
-
`, isInline: true, styles: ["ax-loading-spinner .ax-loader{animation:rotation .5s linear infinite;
|
46
|
+
`, isInline: true, styles: ["ax-loading-spinner .ax-loader{animation:rotation .5s linear infinite;box-sizing:border-box;display:inline-block;height:3rem;width:3rem;border-radius:9999px;border-width:6px;border-style:solid;border-color:rgba(var(--ax-color-ghost-fore));border-bottom-color:transparent!important;margin:auto}ax-loading-spinner .ax-loader.ax-primary{border-color:rgba(var(--ax-color-primary-500))}ax-loading-spinner .ax-loader.ax-secondary{border-color:rgba(var(--ax-color-secondary-500))}ax-loading-spinner .ax-loader.ax-success{border-color:rgba(var(--ax-color-success-500))}ax-loading-spinner .ax-loader.ax-warning{border-color:rgba(var(--ax-color-warning-500))}ax-loading-spinner .ax-loader.ax-danger{border-color:rgba(var(--ax-color-danger-500))}ax-loading-spinner .ax-loader.ax-info{border-color:rgba(var(--ax-color-info-500))}ax-loading-spinner .ax-loader.ax-white{border-color:rgba(var(--ax-color-white))}ax-loading-spinner .ax-loader.ax-black{border-color:rgba(var(--ax-color-black))}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ax-dark .ax-loader.ax-primary{border-color:rgba(var(--ax-color-primary-200))}.ax-dark .ax-loader.ax-secondary{border-color:rgba(var(--ax-color-secondary-200))}.ax-dark .ax-loader.ax-success{border-color:rgba(var(--ax-color-success-200))}.ax-dark .ax-loader.ax-warning{border-color:rgba(var(--ax-color-warning-200))}.ax-dark .ax-loader.ax-danger{border-color:rgba(var(--ax-color-danger-200))}.ax-dark .ax-loader.ax-info{border-color:rgba(var(--ax-color-info-200))}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
47
47
|
}
|
48
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXLoadingSpinnerComponent, decorators: [{
|
49
49
|
type: Component,
|
@@ -58,7 +58,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
58
58
|
@if (text) {
|
59
59
|
<span> {{ text }} </span>
|
60
60
|
}
|
61
|
-
`, encapsulation: ViewEncapsulation.None, styles: ["ax-loading-spinner .ax-loader{animation:rotation .5s linear infinite;
|
61
|
+
`, encapsulation: ViewEncapsulation.None, styles: ["ax-loading-spinner .ax-loader{animation:rotation .5s linear infinite;box-sizing:border-box;display:inline-block;height:3rem;width:3rem;border-radius:9999px;border-width:6px;border-style:solid;border-color:rgba(var(--ax-color-ghost-fore));border-bottom-color:transparent!important;margin:auto}ax-loading-spinner .ax-loader.ax-primary{border-color:rgba(var(--ax-color-primary-500))}ax-loading-spinner .ax-loader.ax-secondary{border-color:rgba(var(--ax-color-secondary-500))}ax-loading-spinner .ax-loader.ax-success{border-color:rgba(var(--ax-color-success-500))}ax-loading-spinner .ax-loader.ax-warning{border-color:rgba(var(--ax-color-warning-500))}ax-loading-spinner .ax-loader.ax-danger{border-color:rgba(var(--ax-color-danger-500))}ax-loading-spinner .ax-loader.ax-info{border-color:rgba(var(--ax-color-info-500))}ax-loading-spinner .ax-loader.ax-white{border-color:rgba(var(--ax-color-white))}ax-loading-spinner .ax-loader.ax-black{border-color:rgba(var(--ax-color-black))}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ax-dark .ax-loader.ax-primary{border-color:rgba(var(--ax-color-primary-200))}.ax-dark .ax-loader.ax-secondary{border-color:rgba(var(--ax-color-secondary-200))}.ax-dark .ax-loader.ax-success{border-color:rgba(var(--ax-color-success-200))}.ax-dark .ax-loader.ax-warning{border-color:rgba(var(--ax-color-warning-200))}.ax-dark .ax-loader.ax-danger{border-color:rgba(var(--ax-color-danger-200))}.ax-dark .ax-loader.ax-info{border-color:rgba(var(--ax-color-info-200))}\n"] }]
|
62
62
|
}], propDecorators: { text: [{
|
63
63
|
type: Input
|
64
64
|
}], color: [{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-loading.mjs","sources":["../../../../libs/components/loading/src/lib/loading-spinner.component.ts","../../../../libs/components/loading/src/lib/loading.config.ts","../../../../libs/components/loading/src/lib/loading.component.ts","../../../../libs/components/loading/src/lib/loading.service.ts","../../../../libs/components/loading/src/lib/loading.directive.ts","../../../../libs/components/loading/src/lib/loading.module.ts","../../../../libs/components/loading/src/acorex-components-loading.ts"],"sourcesContent":["import { AXStyleColorType } from '@acorex/components/common';\nimport { Component, Input, ViewEncapsulation } from '@angular/core';\n\n/**\n * A loading spinner component that displays a rotating spinner icon.\n * @category Components\n */\n@Component({\n selector: 'ax-loading-spinner',\n template: `\n <span\n class=\"ax-loader ax-{{ color }}\"\n [style.width.px]=\"size\"\n [style.height.px]=\"size\"\n [style.border-width.px]=\"stroke\"\n [style.border-color]=\"color\"\n ></span>\n @if (text) {\n <span> {{ text }} </span>\n }\n `,\n styleUrls: ['./loading-spinner.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXLoadingSpinnerComponent {\n /**\n * The text to display alongside the spinner.\n * @ignore\n */\n @Input()\n text: string;\n\n /**\n * Color of the spinner. Can be a predefined style color or a custom color.\n * @defaultValue 'ghost'\n */\n @Input()\n color: AXStyleColorType | string = 'ghost';\n\n /**\n * Size of the spinner, in pixels. This determines both the width and height of the spinner.\n * @defaultValue 16\n */\n @Input() size = 16;\n\n /**\n * Thickness of the spinner's border, in pixels. This affects the visual weight of the spinner's outline.\n * @defaultValue 3\n */\n @Input() stroke = 3;\n}\n","import { InjectionToken } from '@angular/core';\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\n\nexport interface AXLoadingConfig {\n spinner: unknown;\n}\n\nexport const AX_LOADING_CONFIG = new InjectionToken<AXLoadingConfig>('AX_LOADING_CONFIG', {\n providedIn: 'root',\n factory: () => AXLoadingDefaultConfig,\n});\n\nexport const AXLoadingDefaultConfig: AXLoadingConfig = {\n spinner: AXLoadingSpinnerComponent,\n};\n\nexport type PartialLoadingConfig = Partial<AXLoadingConfig>;\n\nexport function loadingConfig(config: PartialLoadingConfig = {}): AXLoadingConfig {\n const result = {\n ...AXLoadingDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { CdkPortalOutletAttachedRef, ComponentPortal, ComponentType, Portal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { AXLoadingConfig, AX_LOADING_CONFIG } from './loading.config';\n\n/**\n * A component that displays a loading indicator.\n * @category Components\n */\n@Component({\n selector: 'ax-loading',\n template: `\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n `,\n styleUrls: ['./loading.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXLoadingComponent extends MXBaseComponent implements OnInit {\n private config: AXLoadingConfig = inject(AX_LOADING_CONFIG);\n\n /**\n * @ignore\n */\n protected _selectedPortal: Portal<unknown>;\n\n /**\n * Emits an event when the visibility state of the component changes.\n * @event\n */\n @Output()\n visibleChange: EventEmitter<boolean> = new EventEmitter();\n\n /**\n * @ignore\n */\n private _visible: boolean;\n\n /**\n * Determines whether the component is visible or not.\n */\n @Input()\n public get visible(): boolean {\n return this._visible;\n }\n\n /**\n * Sets the visibility of the component and emits a visibility change event.\n *\n * @param v - A boolean value indicating whether the component should be visible.\n */\n public set visible(v: boolean) {\n if (v != this._visible) {\n this._visible = v;\n v ? this.getHostElement().classList.remove('ax-hide') : this.getHostElement().classList.add('ax-hide');\n this.visibleChange.emit(v);\n }\n }\n\n /**\n * Specifies the type of loading indicator to display.\n * @defaultValue 'spinner'\n */\n @Input()\n type = 'spinner';\n\n /**\n * Provides additional context or data that may be used by the component.\n */\n @Input()\n context?: unknown;\n\n /**\n * @ignore\n */\n override ngOnInit() {\n super.ngOnInit();\n this._selectedPortal = new ComponentPortal(this.config.spinner as ComponentType<unknown>);\n this.cdr.markForCheck();\n }\n\n /**\n * @ignore\n */\n protected _handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<unknown>;\n if (ref.instance && this.context) {\n Object.assign(ref.instance, this.context);\n }\n }\n}\n","import { Dialog } from '@angular/cdk/dialog';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject, Observable, asyncScheduler } from 'rxjs';\nimport { finalize, observeOn } from 'rxjs/operators';\nimport { AXLoadingComponent } from './loading.component';\n\ntype LoadingContext = object;\ntype LoaderId = string | number; // expected enum values\nconst DEFAULT_LOADER_ID: LoaderId = '_DEFAULT';\n\n@Injectable()\nexport class AXLoadingService {\n // WeakMap will remove components from itself upon\n // their garbage collection by JS runtime.\n protected loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\n // Both loading state maps are kept in-sync such that\n // they can be used by both sync and async methods.\n protected loadingStates$ = new WeakMap<LoadingContext, Map<LoaderId, BehaviorSubject<boolean>>>();\n\n private dialog = inject(Dialog);\n\n show(config?: { location?: Element; type?: string; context?: unknown }): number {\n const ce = (config?.location ?? document.body) as HTMLDivElement;\n const dialogRef = this.dialog.open(AXLoadingComponent, {\n hasBackdrop: true,\n disableClose: true,\n restoreFocus: true,\n closeOnDestroy: true,\n closeOnNavigation: true,\n ariaModal: true,\n role: 'alertdialog',\n panelClass: ['ax-loading-pane', 'ax-animate-fadeIn'],\n backdropClass: ['ax-loading-overlay-backdrop', 'ax-animate-fadeIn'],\n });\n const id = new Date().getTime();\n dialogRef.componentInstance.visible = true;\n dialogRef.componentInstance.id = id.toString();\n if (ce != document.body) {\n const bg = dialogRef.overlayRef.backdropElement;\n const ov = dialogRef.overlayRef.overlayElement;\n ce.style.position = 'relative';\n ov.style.position = 'absolute';\n\n ce.appendChild(bg);\n ce.appendChild(ov);\n setTimeout(() => {\n ov.style.position = 'absolute';\n });\n }\n return id;\n // TODO: diabled focus and click, maybe we need a service and directive for it\n }\n\n hide(id: number): void {\n const f = this.dialog.openDialogs.find((c) => c.componentInstance.id === id.toString());\n if (f) {\n f.close();\n }\n }\n\n doLoading<V>(source$: Observable<V>, context: LoadingContext, loaderId?: LoaderId): Observable<V> {\n this.startLoading(context, loaderId);\n return source$.pipe(\n observeOn(asyncScheduler),\n finalize(() => this.endLoading(context, loaderId)),\n );\n }\n\n isLoading(context: LoadingContext, loaderId?: LoaderId): boolean {\n const loaderStates = this.loadingStates.get(context);\n\n if (!loaderStates) {\n return false;\n } else {\n if (loaderId !== undefined) {\n return loaderStates.get(this.getLoaderId(loaderId)) ?? false;\n } else {\n return [...loaderStates.values()].filter((state) => state).length > 0;\n }\n }\n }\n\n isLoading$(context: LoadingContext, loaderId?: LoaderId | any): Observable<boolean> {\n const coalescedLoaderId = this.getLoaderId(loaderId);\n\n if (!this.hasLoadingStates(context, coalescedLoaderId)) {\n this.setLoadingState(context, false, loaderId);\n }\n\n return this.loadingStates$.get(context).get(coalescedLoaderId);\n }\n\n startLoading(context: LoadingContext, loaderId?: LoaderId): void {\n this.setLoadingState(context, true, this.getLoaderId(loaderId));\n }\n\n endLoading(context: LoadingContext, loaderId?: LoaderId): void {\n this.setLoadingState(context, false, this.getLoaderId(loaderId));\n }\n\n clearLoadings(): void {\n this.loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\n this.loadingStates$ = new WeakMap<LoadingContext, Map<LoaderId, BehaviorSubject<boolean>>>();\n }\n\n protected setLoadingState(context: LoadingContext, state: boolean, loaderId: LoaderId): void {\n if (!this.hasLoadingStates(context, loaderId)) {\n if (this.hasContextLoadingState(context)) {\n this.loadingStates.get(context).set(loaderId, state);\n this.loadingStates$.get(context).set(loaderId, new BehaviorSubject<boolean>(state));\n } else {\n this.loadingStates.set(context, new Map<LoaderId, boolean>([[loaderId, state]]));\n this.loadingStates$.set(\n context,\n new Map<LoaderId, BehaviorSubject<boolean>>([[loaderId, new BehaviorSubject<boolean>(state)]]),\n );\n }\n } else {\n this.loadingStates.get(context).set(loaderId, state);\n this.loadingStates$.get(context).get(loaderId).next(state);\n }\n }\n\n protected hasLoadingStates(context: LoadingContext, loaderId: LoaderId) {\n return this.hasContextLoadingState(context) && this.hasLoaderLoadingState(context, loaderId);\n }\n\n protected hasContextLoadingState(context: LoadingContext) {\n return this.loadingStates.has(context) && this.loadingStates$.has(context);\n }\n\n protected hasLoaderLoadingState(context: LoadingContext, loaderId: LoaderId) {\n return this.loadingStates.get(context).has(loaderId) && this.loadingStates$.get(context).has(loaderId);\n }\n\n protected getLoaderId(loaderId?: LoaderId): LoaderId {\n return loaderId ?? DEFAULT_LOADER_ID;\n }\n}\n","import { Directive, ElementRef, Input } from '@angular/core';\nimport { AXLoadingService } from './loading.service';\n\n// This directive places an overlay with a loading spinner over its host element\n// if isLoading equals to true and hides the overlay when isLoading becomes false.\n@Directive({\n selector: '[axIsLoading]',\n})\nexport class AXLoadingDirective {\n private _hostElement!: HTMLDivElement;\n private _loadingRef!: number;\n\n private _isLoading: boolean;\n\n @Input('axIsLoading')\n public get isLoading(): boolean {\n return this._isLoading;\n }\n public set isLoading(v: boolean) {\n this._isLoading = v;\n if (v) {\n this._loadingRef = this.loadingService.show({\n location: this._hostElement,\n });\n } else {\n this.loadingService.hide(this._loadingRef);\n }\n }\n\n constructor(\n protected readonly elementRef: ElementRef,\n protected readonly loadingService: AXLoadingService,\n ) {\n this._hostElement = this.elementRef.nativeElement;\n }\n}\n","import { DialogModule } from '@angular/cdk/dialog';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\nimport { AXLoadingComponent } from './loading.component';\nimport { AXLoadingDirective } from './loading.directive';\nimport { AXLoadingService } from './loading.service';\n\nconst COMPONENT = [AXLoadingComponent, AXLoadingDirective, AXLoadingSpinnerComponent];\nconst MODULES = [CommonModule, OverlayModule, DialogModule, PortalModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXLoadingService],\n})\nexport class AXLoadingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AXLoadingService"],"mappings":";;;;;;;;;;;AAGA;;;AAGG;MAkBU,yBAAyB,CAAA;AAjBtC,IAAA,WAAA,GAAA;AAyBE;;;AAGG;QAEH,IAAK,CAAA,KAAA,GAA8B,OAAO;AAE1C;;;AAGG;QACM,IAAI,CAAA,IAAA,GAAG,EAAE;AAElB;;;AAGG;QACM,IAAM,CAAA,MAAA,GAAG,CAAC;AACpB;8GA1BY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,EAf1B,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA,OAAA,EAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;;;;;;;AAWT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,w/CAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAIU,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAjBrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EACpB,QAAA,EAAA;;;;;;;;;;;GAWT,EAEc,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,C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AAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAFf,SAAA,EAAA,CAAC,gBAAgB,CAAC,YAFhB,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,gBAAgB,CAAC;AAC9B,iBAAA;;;AClBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-loading.mjs","sources":["../../../../libs/components/loading/src/lib/loading-spinner.component.ts","../../../../libs/components/loading/src/lib/loading.config.ts","../../../../libs/components/loading/src/lib/loading.component.ts","../../../../libs/components/loading/src/lib/loading.service.ts","../../../../libs/components/loading/src/lib/loading.directive.ts","../../../../libs/components/loading/src/lib/loading.module.ts","../../../../libs/components/loading/src/acorex-components-loading.ts"],"sourcesContent":["import { AXStyleColorType } from '@acorex/components/common';\nimport { Component, Input, ViewEncapsulation } from '@angular/core';\n\n/**\n * A loading spinner component that displays a rotating spinner icon.\n * @category Components\n */\n@Component({\n selector: 'ax-loading-spinner',\n template: `\n <span\n class=\"ax-loader ax-{{ color }}\"\n [style.width.px]=\"size\"\n [style.height.px]=\"size\"\n [style.border-width.px]=\"stroke\"\n [style.border-color]=\"color\"\n ></span>\n @if (text) {\n <span> {{ text }} </span>\n }\n `,\n styleUrls: ['./loading-spinner.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXLoadingSpinnerComponent {\n /**\n * The text to display alongside the spinner.\n * @ignore\n */\n @Input()\n text: string;\n\n /**\n * Color of the spinner. Can be a predefined style color or a custom color.\n * @defaultValue 'ghost'\n */\n @Input()\n color: AXStyleColorType | string = 'ghost';\n\n /**\n * Size of the spinner, in pixels. This determines both the width and height of the spinner.\n * @defaultValue 16\n */\n @Input() size = 16;\n\n /**\n * Thickness of the spinner's border, in pixels. This affects the visual weight of the spinner's outline.\n * @defaultValue 3\n */\n @Input() stroke = 3;\n}\n","import { InjectionToken } from '@angular/core';\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\n\nexport interface AXLoadingConfig {\n spinner: unknown;\n}\n\nexport const AX_LOADING_CONFIG = new InjectionToken<AXLoadingConfig>('AX_LOADING_CONFIG', {\n providedIn: 'root',\n factory: () => AXLoadingDefaultConfig,\n});\n\nexport const AXLoadingDefaultConfig: AXLoadingConfig = {\n spinner: AXLoadingSpinnerComponent,\n};\n\nexport type PartialLoadingConfig = Partial<AXLoadingConfig>;\n\nexport function loadingConfig(config: PartialLoadingConfig = {}): AXLoadingConfig {\n const result = {\n ...AXLoadingDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { CdkPortalOutletAttachedRef, ComponentPortal, ComponentType, Portal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { AXLoadingConfig, AX_LOADING_CONFIG } from './loading.config';\n\n/**\n * A component that displays a loading indicator.\n * @category Components\n */\n@Component({\n selector: 'ax-loading',\n template: `\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n `,\n styleUrls: ['./loading.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXLoadingComponent extends MXBaseComponent implements OnInit {\n private config: AXLoadingConfig = inject(AX_LOADING_CONFIG);\n\n /**\n * @ignore\n */\n protected _selectedPortal: Portal<unknown>;\n\n /**\n * Emits an event when the visibility state of the component changes.\n * @event\n */\n @Output()\n visibleChange: EventEmitter<boolean> = new EventEmitter();\n\n /**\n * @ignore\n */\n private _visible: boolean;\n\n /**\n * Determines whether the component is visible or not.\n */\n @Input()\n public get visible(): boolean {\n return this._visible;\n }\n\n /**\n * Sets the visibility of the component and emits a visibility change event.\n *\n * @param v - A boolean value indicating whether the component should be visible.\n */\n public set visible(v: boolean) {\n if (v != this._visible) {\n this._visible = v;\n v ? this.getHostElement().classList.remove('ax-hide') : this.getHostElement().classList.add('ax-hide');\n this.visibleChange.emit(v);\n }\n }\n\n /**\n * Specifies the type of loading indicator to display.\n * @defaultValue 'spinner'\n */\n @Input()\n type = 'spinner';\n\n /**\n * Provides additional context or data that may be used by the component.\n */\n @Input()\n context?: unknown;\n\n /**\n * @ignore\n */\n override ngOnInit() {\n super.ngOnInit();\n this._selectedPortal = new ComponentPortal(this.config.spinner as ComponentType<unknown>);\n this.cdr.markForCheck();\n }\n\n /**\n * @ignore\n */\n protected _handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<unknown>;\n if (ref.instance && this.context) {\n Object.assign(ref.instance, this.context);\n }\n }\n}\n","import { Dialog } from '@angular/cdk/dialog';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject, Observable, asyncScheduler } from 'rxjs';\nimport { finalize, observeOn } from 'rxjs/operators';\nimport { AXLoadingComponent } from './loading.component';\n\ntype LoadingContext = object;\ntype LoaderId = string | number; // expected enum values\nconst DEFAULT_LOADER_ID: LoaderId = '_DEFAULT';\n\n@Injectable()\nexport class AXLoadingService {\n // WeakMap will remove components from itself upon\n // their garbage collection by JS runtime.\n protected loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\n // Both loading state maps are kept in-sync such that\n // they can be used by both sync and async methods.\n protected loadingStates$ = new WeakMap<LoadingContext, Map<LoaderId, BehaviorSubject<boolean>>>();\n\n private dialog = inject(Dialog);\n\n show(config?: { location?: Element; type?: string; context?: unknown }): number {\n const ce = (config?.location ?? document.body) as HTMLDivElement;\n const dialogRef = this.dialog.open(AXLoadingComponent, {\n hasBackdrop: true,\n disableClose: true,\n restoreFocus: true,\n closeOnDestroy: true,\n closeOnNavigation: true,\n ariaModal: true,\n role: 'alertdialog',\n panelClass: ['ax-loading-pane', 'ax-animate-fadeIn'],\n backdropClass: ['ax-loading-overlay-backdrop', 'ax-animate-fadeIn'],\n });\n const id = new Date().getTime();\n dialogRef.componentInstance.visible = true;\n dialogRef.componentInstance.id = id.toString();\n if (ce != document.body) {\n const bg = dialogRef.overlayRef.backdropElement;\n const ov = dialogRef.overlayRef.overlayElement;\n ce.style.position = 'relative';\n ov.style.position = 'absolute';\n\n ce.appendChild(bg);\n ce.appendChild(ov);\n setTimeout(() => {\n ov.style.position = 'absolute';\n });\n }\n return id;\n // TODO: diabled focus and click, maybe we need a service and directive for it\n }\n\n hide(id: number): void {\n const f = this.dialog.openDialogs.find((c) => c.componentInstance.id === id.toString());\n if (f) {\n f.close();\n }\n }\n\n doLoading<V>(source$: Observable<V>, context: LoadingContext, loaderId?: LoaderId): Observable<V> {\n this.startLoading(context, loaderId);\n return source$.pipe(\n observeOn(asyncScheduler),\n finalize(() => this.endLoading(context, loaderId)),\n );\n }\n\n isLoading(context: LoadingContext, loaderId?: LoaderId): boolean {\n const loaderStates = this.loadingStates.get(context);\n\n if (!loaderStates) {\n return false;\n } else {\n if (loaderId !== undefined) {\n return loaderStates.get(this.getLoaderId(loaderId)) ?? false;\n } else {\n return [...loaderStates.values()].filter((state) => state).length > 0;\n }\n }\n }\n\n isLoading$(context: LoadingContext, loaderId?: LoaderId | any): Observable<boolean> {\n const coalescedLoaderId = this.getLoaderId(loaderId);\n\n if (!this.hasLoadingStates(context, coalescedLoaderId)) {\n this.setLoadingState(context, false, loaderId);\n }\n\n return this.loadingStates$.get(context).get(coalescedLoaderId);\n }\n\n startLoading(context: LoadingContext, loaderId?: LoaderId): void {\n this.setLoadingState(context, true, this.getLoaderId(loaderId));\n }\n\n endLoading(context: LoadingContext, loaderId?: LoaderId): void {\n this.setLoadingState(context, false, this.getLoaderId(loaderId));\n }\n\n clearLoadings(): void {\n this.loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\n this.loadingStates$ = new WeakMap<LoadingContext, Map<LoaderId, BehaviorSubject<boolean>>>();\n }\n\n protected setLoadingState(context: LoadingContext, state: boolean, loaderId: LoaderId): void {\n if (!this.hasLoadingStates(context, loaderId)) {\n if (this.hasContextLoadingState(context)) {\n this.loadingStates.get(context).set(loaderId, state);\n this.loadingStates$.get(context).set(loaderId, new BehaviorSubject<boolean>(state));\n } else {\n this.loadingStates.set(context, new Map<LoaderId, boolean>([[loaderId, state]]));\n this.loadingStates$.set(\n context,\n new Map<LoaderId, BehaviorSubject<boolean>>([[loaderId, new BehaviorSubject<boolean>(state)]]),\n );\n }\n } else {\n this.loadingStates.get(context).set(loaderId, state);\n this.loadingStates$.get(context).get(loaderId).next(state);\n }\n }\n\n protected hasLoadingStates(context: LoadingContext, loaderId: LoaderId) {\n return this.hasContextLoadingState(context) && this.hasLoaderLoadingState(context, loaderId);\n }\n\n protected hasContextLoadingState(context: LoadingContext) {\n return this.loadingStates.has(context) && this.loadingStates$.has(context);\n }\n\n protected hasLoaderLoadingState(context: LoadingContext, loaderId: LoaderId) {\n return this.loadingStates.get(context).has(loaderId) && this.loadingStates$.get(context).has(loaderId);\n }\n\n protected getLoaderId(loaderId?: LoaderId): LoaderId {\n return loaderId ?? DEFAULT_LOADER_ID;\n }\n}\n","import { Directive, ElementRef, Input } from '@angular/core';\nimport { AXLoadingService } from './loading.service';\n\n// This directive places an overlay with a loading spinner over its host element\n// if isLoading equals to true and hides the overlay when isLoading becomes false.\n@Directive({\n selector: '[axIsLoading]',\n})\nexport class AXLoadingDirective {\n private _hostElement!: HTMLDivElement;\n private _loadingRef!: number;\n\n private _isLoading: boolean;\n\n @Input('axIsLoading')\n public get isLoading(): boolean {\n return this._isLoading;\n }\n public set isLoading(v: boolean) {\n this._isLoading = v;\n if (v) {\n this._loadingRef = this.loadingService.show({\n location: this._hostElement,\n });\n } else {\n this.loadingService.hide(this._loadingRef);\n }\n }\n\n constructor(\n protected readonly elementRef: ElementRef,\n protected readonly loadingService: AXLoadingService,\n ) {\n this._hostElement = this.elementRef.nativeElement;\n }\n}\n","import { DialogModule } from '@angular/cdk/dialog';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\nimport { AXLoadingComponent } from './loading.component';\nimport { AXLoadingDirective } from './loading.directive';\nimport { AXLoadingService } from './loading.service';\n\nconst COMPONENT = [AXLoadingComponent, AXLoadingDirective, AXLoadingSpinnerComponent];\nconst MODULES = [CommonModule, OverlayModule, DialogModule, PortalModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXLoadingService],\n})\nexport class AXLoadingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AXLoadingService"],"mappings":";;;;;;;;;;;AAGA;;;AAGG;MAkBU,yBAAyB,CAAA;AAjBtC,IAAA,WAAA,GAAA;AAyBE;;;AAGG;QAEH,IAAK,CAAA,KAAA,GAA8B,OAAO;AAE1C;;;AAGG;QACM,IAAI,CAAA,IAAA,GAAG,EAAE;AAElB;;;AAGG;QACM,IAAM,CAAA,MAAA,GAAG,CAAC;AACpB;8GA1BY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,EAf1B,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,I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