@acorex/components 7.10.2 → 7.11.1
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/button/lib/button-item-list.component.d.ts +2 -2
- package/circular-progress/README.md +3 -0
- package/circular-progress/index.d.ts +2 -0
- package/circular-progress/lib/circular-progress.component.d.ts +33 -0
- package/circular-progress/lib/circular-progress.module.d.ts +7 -0
- package/common/lib/classes/datalist.class.d.ts +5 -0
- package/common/lib/classes/datasource.class.d.ts +10 -7
- package/common/lib/classes/events.class.d.ts +2 -1
- package/data-table/index.d.ts +6 -2
- package/data-table/lib/columns/data-column.d.ts +18 -0
- package/data-table/lib/columns/data-text-column.component.d.ts +10 -0
- package/data-table/lib/columns/row-command-column.component.d.ts +31 -0
- package/data-table/lib/columns/row-index-column.component.d.ts +12 -0
- package/data-table/lib/columns/row-select-column.component.d.ts +13 -0
- package/data-table/lib/data-table.component.d.ts +42 -27
- package/data-table/lib/data-table.module.d.ts +14 -9
- package/esm2022/alert/lib/alert.component.mjs +2 -2
- package/esm2022/button/lib/button-item-list.component.mjs +5 -4
- package/esm2022/circular-progress/acorex-components-circular-progress.mjs +5 -0
- package/esm2022/circular-progress/index.mjs +3 -0
- package/esm2022/circular-progress/lib/circular-progress.component.mjs +96 -0
- package/esm2022/circular-progress/lib/circular-progress.module.mjs +17 -0
- package/esm2022/common/lib/classes/datalist.class.mjs +6 -1
- package/esm2022/common/lib/classes/datasource.class.mjs +10 -3
- package/esm2022/common/lib/classes/events.class.mjs +2 -2
- package/esm2022/data-table/index.mjs +7 -3
- package/esm2022/data-table/lib/columns/data-column.mjs +35 -0
- package/esm2022/data-table/lib/columns/data-text-column.component.mjs +34 -0
- package/esm2022/data-table/lib/columns/row-command-column.component.mjs +110 -0
- package/esm2022/data-table/lib/columns/row-index-column.component.mjs +41 -0
- package/esm2022/data-table/lib/columns/row-select-column.component.mjs +62 -0
- package/esm2022/data-table/lib/data-table.component.mjs +135 -92
- package/esm2022/data-table/lib/data-table.module.mjs +43 -6
- package/esm2022/dropdown/lib/dropdown-panel.component.mjs +1 -2
- package/esm2022/progress-bar/lib/progress-bar.component.mjs +20 -62
- package/esm2022/skeleton/lib/skeleton.component.mjs +2 -2
- package/esm2022/switch/lib/switch-content.component.mjs +3 -3
- package/esm2022/switch/lib/switch.component.mjs +3 -3
- package/esm2022/uploader/lib/uploader-list.component.mjs +3 -3
- package/fesm2022/acorex-components-alert.mjs +2 -2
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +3 -2
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +117 -0
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -0
- package/fesm2022/acorex-components-common.mjs +15 -3
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +363 -157
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +0 -1
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +18 -60
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +2 -2
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +4 -4
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +2 -2
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/package.json +7 -1
- package/progress-bar/lib/progress-bar.component.d.ts +9 -18
- package/switch/lib/switch-content.component.d.ts +1 -1
- package/switch/lib/switch.component.d.ts +1 -1
- package/data-table/lib/data-column.directive.d.ts +0 -11
- package/data-table/lib/data-table2.component.d.ts +0 -37
- package/esm2022/data-table/lib/data-column.directive.mjs +0 -26
- package/esm2022/data-table/lib/data-table2.component.mjs +0 -118
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-alert.mjs","sources":["../../../../libs/components/alert/src/lib/alert.component.ts","../../../../libs/components/alert/src/lib/alert.component.html","../../../../libs/components/alert/src/lib/alert.module.ts","../../../../libs/components/alert/src/acorex-components-alert.ts"],"sourcesContent":["import { AXButtonComponent } from '@acorex/components/button';\nimport { AXClosbaleComponent, AXEvent, MXColorComponent } from '@acorex/components/common';\nimport { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n EventEmitter,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\n\n/**\n * Regular description\n *\n * @category Components\n */\n@Component({\n selector: 'ax-alert',\n templateUrl: './alert.component.html',\n styleUrls: ['./alert.component.scss'],\n inputs: ['color'],\n outputs: ['colorChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }],\n})\nexport class AXAlertComponent extends MXColorComponent implements OnInit, AfterViewInit, OnDestroy {\n @ContentChild('ax-icon')\n private _iconComp: AXDecoratorIconComponent;\n\n @ContentChildren(AXButtonComponent, { descendants: true })\n private _buttonComps!: QueryList<AXButtonComponent>;\n\n @ContentChild('ax-title')\n protected _titleComp!: AXDecoratorGenericComponent;\n\n @ContentChild('ax-content')\n protected _contentComp!: AXDecoratorGenericComponent;\n\n @ContentChild('ax-footer')\n protected _footerComp!: AXDecoratorGenericComponent;\n\n protected _showInline = false;\n\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n private _customIcon: string;\n private _timeOutRef: number;\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string {\n return `ax-alert ax-none ax-${this.color}-solid`;\n }\n\n private _timeOut: number;\n @Input()\n public get timeOut(): number {\n return this._timeOut;\n }\n public set timeOut(v: number) {\n this.setOption({\n name: 'timeOut',\n value: v,\n beforeCallback: (oldValue, newValue) => {\n clearTimeout(this._timeOutRef);\n return newValue;\n },\n afterCallback: (oldValue, newValue) => {\n if (newValue) {\n this._timeOutRef = window.setTimeout(() => {\n this.close();\n }, this.timeOut);\n }\n },\n });\n }\n\n private _observer: MutationObserver;\n\n protected _visible: boolean;\n /**\n * set the visibility of the Alert\n */\n @Input()\n public get visible(): boolean {\n return this._visible;\n }\n public set visible(v: boolean) {\n if (this._visible != v) {\n this._visible = v;\n const host = this.getHostElement();\n if (v) {\n host.classList.remove('ax-state-hidden');\n host.classList.add('ax-state-visible');\n } else {\n host.classList.add('ax-state-hidden');\n host.classList.toggle('ax-state-visible');\n }\n }\n }\n\n ngOnInit() {\n super.ngOnInit();\n const config = { attributes: false, childList: true, subtree: true };\n const callback = (mutationList) => {\n for (const mutation of mutationList) {\n if (mutation.type === 'childList') {\n this._setLayout();\n }\n }\n };\n\n // Create an observer instance linked to the callback function\n if (typeof MutationObserver !== 'undefined') {\n this._observer = new MutationObserver(callback);\n }\n\n // Start observing the target node for configured mutations\n this._observer.observe(this.getHostElement(), config);\n //\n this.onOptionChanged.subscribe(this._handleOnOptionChanged.bind(this));\n }\n\n ngAfterViewInit() {\n if (this.visible == undefined) {\n this.visible = true;\n }\n //\n this._customIcon = this._iconComp?.icon;\n this._setLayout();\n }\n\n private _setLayout() {\n this._setIcon();\n this._applyButtonStyle();\n this._showInline = this._contentComp == null && this._footerComp == null;\n this.cdr.markForCheck();\n }\n\n protected _handleOnOptionChanged() {\n this._setIcon();\n this._applyButtonStyle();\n }\n\n private _setIcon() {\n if (!this._iconComp || this._iconComp.getHostElement().firstElementChild) return;\n\n switch (this.color) {\n case 'success':\n this._iconComp.icon = 'ax-icon ax-icon-check-circle-fill';\n break;\n case 'danger':\n this._iconComp.icon = 'ax-icon ax-icon-error-fill';\n break;\n case 'warning':\n this._iconComp.icon = 'ax-icon ax-icon-warning-fill';\n break;\n case 'info':\n this._iconComp.icon = 'ax-icon ax-icon-info';\n break;\n default:\n this._iconComp.icon = this._customIcon || 'ax-icon ax-icon-check-circle-fill';\n break;\n }\n }\n\n private _applyButtonStyle() {\n // this._buttonComps?.forEach((c: AXButtonComponent) => {\n // c.color = this.color;\n // c.getHostElement().classList.add('ax-sm');\n // });\n }\n\n /**\n * Remove the alert from the container\n */\n close(): void {\n const host = this.getHostElement();\n this.visible = false;\n const func = () => {\n host.parentElement?.removeChild(host);\n this.onClosed.emit({\n component: this,\n });\n host.removeEventListener('transitionend', func);\n };\n host.addEventListener('transitionend', func);\n }\n\n /**\n * Hide the alert\n */\n hide(): void {\n this.visible = false;\n }\n\n /**\n * Show the alert\n */\n show() {\n this.visible = true;\n }\n\n ngOnDestroy(): void {\n this._observer?.disconnect();\n this.onOptionChanged?.unsubscribe();\n }\n}\n","<ng-container *ngIf=\"_showInline; else elseTpl\">\n <div class=\"ax-alert-inline\">\n <div class=\"ax-alert-icon\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <div class=\"ax-alert-buttons\">\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #elseTpl>\n <div class=\"ax-alert-block\">\n <div class=\"ax-alert-icon\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-content\">\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n <div><ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container></div>\n </div>\n</ng-template>\n<div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut\" *ngIf=\"timeOut\"></div>\n\n<ng-template #buttons>\n <ng-content select=\"ax-button\"> </ng-content>\n</ng-template>\n<ng-template #closeButton>\n <ng-content select=\"ax-close-button\"> </ng-content>\n</ng-template>\n<ng-template #title>\n <ng-content select=\"ax-title\"> </ng-content>\n</ng-template>\n<ng-template #icon>\n <ng-content select=\"ax-icon\"> </ng-content>\n</ng-template>\n<ng-template #content>\n <ng-content select=\"ax-content\"> </ng-content>\n</ng-template>\n<ng-template #footer>\n <ng-content select=\"ax-footer\"> </ng-content>\n</ng-template>\n","import { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXAlertComponent } from './alert.component';\n\nconst COMPONENT = [AXAlertComponent];\nconst MODULES = [CommonModule, AXDecoratorModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAoBA;;;;AAIG;AAWG,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;AAVtD,IAAA,WAAA,GAAA;;QA0BY,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AAG9B,QAAA,IAAA,CAAA,QAAQ,GAA0B,IAAI,YAAY,EAAW,CAAC;AAsK/D,KAAA;AAjKC;;AAEG;AACH,IAAA,IACI,WAAW,GAAA;AACb,QAAA,OAAO,CAAuB,oBAAA,EAAA,IAAI,CAAC,KAAK,QAAQ,CAAC;KAClD;AAGD,IAAA,IACW,OAAO,GAAA;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;IACD,IAAW,OAAO,CAAC,CAAS,EAAA;QAC1B,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,cAAc,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAI;AACrC,gBAAA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AA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-alert.mjs","sources":["../../../../libs/components/alert/src/lib/alert.component.ts","../../../../libs/components/alert/src/lib/alert.component.html","../../../../libs/components/alert/src/lib/alert.module.ts","../../../../libs/components/alert/src/acorex-components-alert.ts"],"sourcesContent":["import { AXButtonComponent } from '@acorex/components/button';\nimport { AXClosbaleComponent, AXEvent, MXColorComponent } from '@acorex/components/common';\nimport { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n EventEmitter,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\n\n/**\n * Regular description\n *\n * @category Components\n */\n@Component({\n selector: 'ax-alert',\n templateUrl: './alert.component.html',\n styleUrls: ['./alert.component.scss'],\n inputs: ['color'],\n outputs: ['colorChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }],\n})\nexport class AXAlertComponent extends MXColorComponent implements OnInit, AfterViewInit, OnDestroy {\n @ContentChild('ax-icon')\n private _iconComp: AXDecoratorIconComponent;\n\n @ContentChildren(AXButtonComponent, { descendants: true })\n private _buttonComps!: QueryList<AXButtonComponent>;\n\n @ContentChild('ax-title')\n protected _titleComp!: AXDecoratorGenericComponent;\n\n @ContentChild('ax-content')\n protected _contentComp!: AXDecoratorGenericComponent;\n\n @ContentChild('ax-footer')\n protected _footerComp!: AXDecoratorGenericComponent;\n\n protected _showInline = false;\n\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n private _customIcon: string;\n private _timeOutRef: number;\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string {\n return `ax-alert ax-none ax-${this.color}-solid`;\n }\n\n private _timeOut: number;\n @Input()\n public get timeOut(): number {\n return this._timeOut;\n }\n public set timeOut(v: number) {\n this.setOption({\n name: 'timeOut',\n value: v,\n beforeCallback: (oldValue, newValue) => {\n clearTimeout(this._timeOutRef);\n return newValue;\n },\n afterCallback: (oldValue, newValue) => {\n if (newValue) {\n this._timeOutRef = window.setTimeout(() => {\n this.close();\n }, this.timeOut);\n }\n },\n });\n }\n\n private _observer: MutationObserver;\n\n protected _visible: boolean;\n /**\n * set the visibility of the Alert\n */\n @Input()\n public get visible(): boolean {\n return this._visible;\n }\n public set visible(v: boolean) {\n if (this._visible != v) {\n this._visible = v;\n const host = this.getHostElement();\n if (v) {\n host.classList.remove('ax-state-hidden');\n host.classList.add('ax-state-visible');\n } else {\n host.classList.add('ax-state-hidden');\n host.classList.toggle('ax-state-visible');\n }\n }\n }\n\n ngOnInit() {\n super.ngOnInit();\n const config = { attributes: false, childList: true, subtree: true };\n const callback = (mutationList) => {\n for (const mutation of mutationList) {\n if (mutation.type === 'childList') {\n this._setLayout();\n }\n }\n };\n\n // Create an observer instance linked to the callback function\n if (typeof MutationObserver !== 'undefined') {\n this._observer = new MutationObserver(callback);\n }\n\n // Start observing the target node for configured mutations\n this._observer.observe(this.getHostElement(), config);\n //\n this.onOptionChanged.subscribe(this._handleOnOptionChanged.bind(this));\n }\n\n ngAfterViewInit() {\n if (this.visible == undefined) {\n this.visible = true;\n }\n //\n this._customIcon = this._iconComp?.icon;\n this._setLayout();\n }\n\n private _setLayout() {\n this._setIcon();\n this._applyButtonStyle();\n this._showInline = this._contentComp == null && this._footerComp == null;\n this.cdr.markForCheck();\n }\n\n protected _handleOnOptionChanged() {\n this._setIcon();\n this._applyButtonStyle();\n }\n\n private _setIcon() {\n if (!this._iconComp || this._iconComp.getHostElement().firstElementChild) return;\n\n switch (this.color) {\n case 'success':\n this._iconComp.icon = 'ax-icon ax-icon-check-circle-fill';\n break;\n case 'danger':\n this._iconComp.icon = 'ax-icon ax-icon-error-fill';\n break;\n case 'warning':\n this._iconComp.icon = 'ax-icon ax-icon-warning-fill';\n break;\n case 'info':\n this._iconComp.icon = 'ax-icon ax-icon-info';\n break;\n default:\n this._iconComp.icon = this._customIcon || 'ax-icon ax-icon-check-circle-fill';\n break;\n }\n }\n\n private _applyButtonStyle() {\n // this._buttonComps?.forEach((c: AXButtonComponent) => {\n // c.color = this.color;\n // c.getHostElement().classList.add('ax-sm');\n // });\n }\n\n /**\n * Remove the alert from the container\n */\n close(): void {\n const host = this.getHostElement();\n this.visible = false;\n const func = () => {\n host.parentElement?.removeChild(host);\n this.onClosed.emit({\n component: this,\n });\n host.removeEventListener('transitionend', func);\n };\n host.addEventListener('transitionend', func);\n }\n\n /**\n * Hide the alert\n */\n hide(): void {\n this.visible = false;\n }\n\n /**\n * Show the alert\n */\n show() {\n this.visible = true;\n }\n\n ngOnDestroy(): void {\n this._observer?.disconnect();\n this.onOptionChanged?.unsubscribe();\n }\n}\n","<ng-container *ngIf=\"_showInline; else elseTpl\">\n <div class=\"ax-alert-inline\">\n <div class=\"ax-alert-icon\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <div class=\"ax-alert-buttons\">\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #elseTpl>\n <div class=\"ax-alert-block\">\n <div class=\"ax-alert-icon\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-content\">\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n <div><ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container></div>\n </div>\n</ng-template>\n<div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut\" *ngIf=\"timeOut\"></div>\n\n<ng-template #buttons>\n <ng-content select=\"ax-button\"> </ng-content>\n</ng-template>\n<ng-template #closeButton>\n <ng-content select=\"ax-close-button\"> </ng-content>\n</ng-template>\n<ng-template #title>\n <ng-content select=\"ax-title\"> </ng-content>\n</ng-template>\n<ng-template #icon>\n <ng-content select=\"ax-icon\"> </ng-content>\n</ng-template>\n<ng-template #content>\n <ng-content select=\"ax-content\"> </ng-content>\n</ng-template>\n<ng-template #footer>\n <ng-content select=\"ax-footer\"> </ng-content>\n</ng-template>\n","import { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXAlertComponent } from './alert.component';\n\nconst COMPONENT = [AXAlertComponent];\nconst MODULES = [CommonModule, AXDecoratorModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAoBA;;;;AAIG;AAWG,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;AAVtD,IAAA,WAAA,GAAA;;QA0BY,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AAG9B,QAAA,IAAA,CAAA,QAAQ,GAA0B,IAAI,YAAY,EAAW,CAAC;AAsK/D,KAAA;AAjKC;;AAEG;AACH,IAAA,IACI,WAAW,GAAA;AACb,QAAA,OAAO,CAAuB,oBAAA,EAAA,IAAI,CAAC,KAAK,QAAQ,CAAC;KAClD;AAGD,IAAA,IACW,OAAO,GAAA;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;IACD,IAAW,OAAO,CAAC,CAAS,EAAA;QAC1B,IAAI,CAAC,SAAS,CAAC;AACb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AA,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,CAAA;;;ACbD;;AAEG;;;;"}
|
@@ -142,6 +142,7 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
142
142
|
_emitOnItemClickEvent(e, item) {
|
143
143
|
this.onItemClick.emit({
|
144
144
|
component: this,
|
145
|
+
item,
|
145
146
|
htmlElement: this.getHostElement(),
|
146
147
|
nativeEvent: e.nativeEvent,
|
147
148
|
name: item.name,
|
@@ -149,11 +150,11 @@ class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
149
150
|
});
|
150
151
|
}
|
151
152
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXButtonItemListComponent, deps: [{ token: AXDropdownPanelComponent }], target: i0.ɵɵFactoryTarget.Component }); }
|
152
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXButtonItemListComponent, selector: "ax-button-item-list", outputs: { onItemClick: "onItemClick" }, queries: [{ propertyName: "_contentButtons", predicate: AXButtonItemComponent }], usesInheritance: true, ngImport: i0, template: ` <ng-content select="ax-button-item, ax-title, ax-divider, ng-container"></ng-content> `, isInline: true, styles: ["ax-button-item-list{display:flex;flex-direction:column;padding:.5rem 0}ax-button-item-list ax-title{font-size:.75rem;padding:.25rem 0;padding-inline-start:1rem;padding-inline-end:2.5rem;opacity:.5;text-transform:uppercase;font-weight:500}ax-button-item-list ax-divider{width:100%;height:1px;background-color:rgba(var(--ax-color-border-default));margin:.25rem 0}ax-button-item-list ax-button-item{position:relative;display:inline-flex;align-items:center;justify-content:flex-start;padding:.5rem;padding-inline-start:1rem;padding-inline-end:4rem;font-size:.875rem;color:rgba(var(--ax-color-text-default));-webkit-user-select:none;user-select:none;cursor:pointer}ax-button-item-list ax-button-item:hover:not(ax-button-item-list ax-button-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}ax-button-item-list ax-button-item.ax-divide{border:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-button-item-list ax-button-item.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-button-item-list ax-button-item ax-prefix,ax-button-item-list ax-button-item ax-suffix{display:flex;flex-direction:row}ax-button-item-list ax-button-item ax-prefix ax-icon,ax-button-item-list ax-button-item ax-suffix ax-icon{display:block;width:1.5rem;text-align:center}ax-button-item-list ax-button-item ax-prefix{padding-inline-end:.5rem}ax-button-item-list ax-button-item ax-suffix{padding-inline-start:.5rem}ax-button-item-list ax-button-item.ax-primary-default{background-color:transparent;color:rgba(var(--ax-color-primary-500));border:transparent}ax-button-item-list ax-button-item.ax-primary-default:hover,ax-button-item-list ax-button-item.ax-primary-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-primary-600))}ax-button-item-list ax-button-item.ax-primary-default:active{color:rgba(var(--ax-color-primary-400))}ax-button-item-list ax-button-item.ax-primary-default.ax-state-selected{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-button-item-list ax-button-item.ax-secondary-default{background-color:transparent;color:rgba(var(--ax-color-secondary-500));border:transparent}ax-button-item-list ax-button-item.ax-secondary-default:hover,ax-button-item-list ax-button-item.ax-secondary-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-secondary-600))}ax-button-item-list ax-button-item.ax-secondary-default:active{color:rgba(var(--ax-color-secondary-400))}ax-button-item-list ax-button-item.ax-secondary-default.ax-state-selected{background-color:rgba(var(--ax-color-secondary-500));color:rgba(var(--ax-color-secondary-fore))}ax-button-item-list ax-button-item.ax-success-default{background-color:transparent;color:rgba(var(--ax-color-success-500));border:transparent}ax-button-item-list ax-button-item.ax-success-default:hover,ax-button-item-list ax-button-item.ax-success-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-success-600))}ax-button-item-list ax-button-item.ax-success-default:active{color:rgba(var(--ax-color-success-400))}ax-button-item-list ax-button-item.ax-success-default.ax-state-selected{background-color:rgba(var(--ax-color-success-500));color:rgba(var(--ax-color-success-fore))}ax-button-item-list ax-button-item.ax-warning-default{background-color:transparent;color:rgba(var(--ax-color-warning-500));border:transparent}ax-button-item-list ax-button-item.ax-warning-default:hover,ax-button-item-list ax-button-item.ax-warning-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-warning-600))}ax-button-item-list ax-button-item.ax-warning-default:active{color:rgba(var(--ax-color-warning-400))}ax-button-item-list ax-button-item.ax-warning-default.ax-state-selected{background-color:rgba(var(--ax-color-warning-500));color:rgba(var(--ax-color-warning-fore))}ax-button-item-list ax-button-item.ax-danger-default{background-color:transparent;color:rgba(var(--ax-color-danger-500));border:transparent}ax-button-item-list ax-button-item.ax-danger-default:hover,ax-button-item-list ax-button-item.ax-danger-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-danger-600))}ax-button-item-list ax-button-item.ax-danger-default:active{color:rgba(var(--ax-color-danger-400))}ax-button-item-list ax-button-item.ax-danger-default.ax-state-selected{background-color:rgba(var(--ax-color-danger-500));color:rgba(var(--ax-color-danger-fore))}ax-button-item-list ax-button-item.ax-info-default{background-color:transparent;color:rgba(var(--ax-color-info-500));border:transparent}ax-button-item-list ax-button-item.ax-info-default:hover,ax-button-item-list ax-button-item.ax-info-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-info-600))}ax-button-item-list ax-button-item.ax-info-default:active{color:rgba(var(--ax-color-info-400))}ax-button-item-list ax-button-item.ax-info-default.ax-state-selected{background-color:rgba(var(--ax-color-info-500));color:rgba(var(--ax-color-info-fore))}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
153
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXButtonItemListComponent, selector: "ax-button-item-list", outputs: { onItemClick: "onItemClick" }, queries: [{ propertyName: "_contentButtons", predicate: AXButtonItemComponent }], usesInheritance: true, ngImport: i0, template: ` <ng-content select="ax-button-item, ax-title, ax-divider, ng-container"></ng-content> `, isInline: true, styles: ["ax-button-item-list{display:flex;flex-direction:column;padding:.5rem 0}ax-button-item-list ax-title{font-size:.75rem;padding:.25rem 0;padding-inline-start:1rem;padding-inline-end:2.5rem;opacity:.5;text-transform:uppercase;font-weight:500}ax-button-item-list ax-divider{width:100%;height:1px;background-color:rgba(var(--ax-color-border-default));margin:.25rem 0}ax-button-item-list ax-button-item{position:relative;display:inline-flex;align-items:center;justify-content:flex-start;padding:.5rem;padding-inline-start:1rem;padding-inline-end:4rem;font-size:.875rem;color:rgba(var(--ax-color-text-default));-webkit-user-select:none;user-select:none;cursor:pointer}ax-button-item-list ax-button-item:hover:not(ax-button-item-list ax-button-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}ax-button-item-list ax-button-item.ax-divide{border:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-button-item-list ax-button-item.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-button-item-list ax-button-item ax-prefix,ax-button-item-list ax-button-item ax-suffix{display:flex;flex-direction:row}ax-button-item-list ax-button-item ax-prefix ax-icon,ax-button-item-list ax-button-item ax-suffix ax-icon{display:block;width:1.5rem;text-align:center}ax-button-item-list ax-button-item ax-prefix{padding-inline-end:.5rem}ax-button-item-list ax-button-item ax-suffix{padding-inline-start:.5rem}ax-button-item-list ax-button-item.ax-primary-default{background-color:transparent;color:rgba(var(--ax-color-primary-500));border:transparent}ax-button-item-list ax-button-item.ax-primary-default:hover,ax-button-item-list ax-button-item.ax-primary-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-primary-600))}ax-button-item-list ax-button-item.ax-primary-default:active{color:rgba(var(--ax-color-primary-400))}ax-button-item-list ax-button-item.ax-primary-default.ax-state-selected{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-button-item-list ax-button-item.ax-secondary-default{background-color:transparent;color:rgba(var(--ax-color-secondary-500));border:transparent}ax-button-item-list ax-button-item.ax-secondary-default:hover,ax-button-item-list ax-button-item.ax-secondary-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-secondary-600))}ax-button-item-list ax-button-item.ax-secondary-default:active{color:rgba(var(--ax-color-secondary-400))}ax-button-item-list ax-button-item.ax-secondary-default.ax-state-selected{background-color:rgba(var(--ax-color-secondary-500));color:rgba(var(--ax-color-secondary-fore))}ax-button-item-list ax-button-item.ax-success-default{background-color:transparent;color:rgba(var(--ax-color-success-500));border:transparent}ax-button-item-list ax-button-item.ax-success-default:hover,ax-button-item-list ax-button-item.ax-success-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-success-600))}ax-button-item-list ax-button-item.ax-success-default:active{color:rgba(var(--ax-color-success-400))}ax-button-item-list ax-button-item.ax-success-default.ax-state-selected{background-color:rgba(var(--ax-color-success-500));color:rgba(var(--ax-color-success-fore))}ax-button-item-list ax-button-item.ax-warning-default{background-color:transparent;color:rgba(var(--ax-color-warning-500));border:transparent}ax-button-item-list ax-button-item.ax-warning-default:hover,ax-button-item-list ax-button-item.ax-warning-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-warning-600))}ax-button-item-list ax-button-item.ax-warning-default:active{color:rgba(var(--ax-color-warning-400))}ax-button-item-list ax-button-item.ax-warning-default.ax-state-selected{background-color:rgba(var(--ax-color-warning-500));color:rgba(var(--ax-color-warning-fore))}ax-button-item-list ax-button-item.ax-danger-default{background-color:transparent;color:rgba(var(--ax-color-danger-500));border:transparent}ax-button-item-list ax-button-item.ax-danger-default:hover,ax-button-item-list ax-button-item.ax-danger-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-danger-600))}ax-button-item-list ax-button-item.ax-danger-default:active{color:rgba(var(--ax-color-danger-400))}ax-button-item-list ax-button-item.ax-danger-default.ax-state-selected{background-color:rgba(var(--ax-color-danger-500));color:rgba(var(--ax-color-danger-fore))}ax-button-item-list ax-button-item.ax-info-default{background-color:transparent;color:rgba(var(--ax-color-info-500));border:transparent}ax-button-item-list ax-button-item.ax-info-default:hover,ax-button-item-list ax-button-item.ax-info-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-info-600))}ax-button-item-list ax-button-item.ax-info-default:active{color:rgba(var(--ax-color-info-400))}ax-button-item-list ax-button-item.ax-info-default.ax-state-selected{background-color:rgba(var(--ax-color-info-500));color:rgba(var(--ax-color-info-fore))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
153
154
|
}
|
154
155
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXButtonItemListComponent, decorators: [{
|
155
156
|
type: Component,
|
156
|
-
args: [{ selector: 'ax-button-item-list', template: ` <ng-content select="ax-button-item, ax-title, ax-divider, ng-container"></ng-content> `, encapsulation: ViewEncapsulation.None, styles: ["ax-button-item-list{display:flex;flex-direction:column;padding:.5rem 0}ax-button-item-list ax-title{font-size:.75rem;padding:.25rem 0;padding-inline-start:1rem;padding-inline-end:2.5rem;opacity:.5;text-transform:uppercase;font-weight:500}ax-button-item-list ax-divider{width:100%;height:1px;background-color:rgba(var(--ax-color-border-default));margin:.25rem 0}ax-button-item-list ax-button-item{position:relative;display:inline-flex;align-items:center;justify-content:flex-start;padding:.5rem;padding-inline-start:1rem;padding-inline-end:4rem;font-size:.875rem;color:rgba(var(--ax-color-text-default));-webkit-user-select:none;user-select:none;cursor:pointer}ax-button-item-list ax-button-item:hover:not(ax-button-item-list ax-button-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}ax-button-item-list ax-button-item.ax-divide{border:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-button-item-list ax-button-item.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-button-item-list ax-button-item ax-prefix,ax-button-item-list ax-button-item ax-suffix{display:flex;flex-direction:row}ax-button-item-list ax-button-item ax-prefix ax-icon,ax-button-item-list ax-button-item ax-suffix ax-icon{display:block;width:1.5rem;text-align:center}ax-button-item-list ax-button-item ax-prefix{padding-inline-end:.5rem}ax-button-item-list ax-button-item ax-suffix{padding-inline-start:.5rem}ax-button-item-list ax-button-item.ax-primary-default{background-color:transparent;color:rgba(var(--ax-color-primary-500));border:transparent}ax-button-item-list ax-button-item.ax-primary-default:hover,ax-button-item-list ax-button-item.ax-primary-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-primary-600))}ax-button-item-list ax-button-item.ax-primary-default:active{color:rgba(var(--ax-color-primary-400))}ax-button-item-list ax-button-item.ax-primary-default.ax-state-selected{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-button-item-list ax-button-item.ax-secondary-default{background-color:transparent;color:rgba(var(--ax-color-secondary-500));border:transparent}ax-button-item-list ax-button-item.ax-secondary-default:hover,ax-button-item-list ax-button-item.ax-secondary-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-secondary-600))}ax-button-item-list ax-button-item.ax-secondary-default:active{color:rgba(var(--ax-color-secondary-400))}ax-button-item-list ax-button-item.ax-secondary-default.ax-state-selected{background-color:rgba(var(--ax-color-secondary-500));color:rgba(var(--ax-color-secondary-fore))}ax-button-item-list ax-button-item.ax-success-default{background-color:transparent;color:rgba(var(--ax-color-success-500));border:transparent}ax-button-item-list ax-button-item.ax-success-default:hover,ax-button-item-list ax-button-item.ax-success-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-success-600))}ax-button-item-list ax-button-item.ax-success-default:active{color:rgba(var(--ax-color-success-400))}ax-button-item-list ax-button-item.ax-success-default.ax-state-selected{background-color:rgba(var(--ax-color-success-500));color:rgba(var(--ax-color-success-fore))}ax-button-item-list ax-button-item.ax-warning-default{background-color:transparent;color:rgba(var(--ax-color-warning-500));border:transparent}ax-button-item-list ax-button-item.ax-warning-default:hover,ax-button-item-list ax-button-item.ax-warning-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-warning-600))}ax-button-item-list ax-button-item.ax-warning-default:active{color:rgba(var(--ax-color-warning-400))}ax-button-item-list ax-button-item.ax-warning-default.ax-state-selected{background-color:rgba(var(--ax-color-warning-500));color:rgba(var(--ax-color-warning-fore))}ax-button-item-list ax-button-item.ax-danger-default{background-color:transparent;color:rgba(var(--ax-color-danger-500));border:transparent}ax-button-item-list ax-button-item.ax-danger-default:hover,ax-button-item-list ax-button-item.ax-danger-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-danger-600))}ax-button-item-list ax-button-item.ax-danger-default:active{color:rgba(var(--ax-color-danger-400))}ax-button-item-list ax-button-item.ax-danger-default.ax-state-selected{background-color:rgba(var(--ax-color-danger-500));color:rgba(var(--ax-color-danger-fore))}ax-button-item-list ax-button-item.ax-info-default{background-color:transparent;color:rgba(var(--ax-color-info-500));border:transparent}ax-button-item-list ax-button-item.ax-info-default:hover,ax-button-item-list ax-button-item.ax-info-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-info-600))}ax-button-item-list ax-button-item.ax-info-default:active{color:rgba(var(--ax-color-info-400))}ax-button-item-list ax-button-item.ax-info-default.ax-state-selected{background-color:rgba(var(--ax-color-info-500));color:rgba(var(--ax-color-info-fore))}\n"] }]
|
157
|
+
args: [{ selector: 'ax-button-item-list', template: ` <ng-content select="ax-button-item, ax-title, ax-divider, ng-container"></ng-content> `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["ax-button-item-list{display:flex;flex-direction:column;padding:.5rem 0}ax-button-item-list ax-title{font-size:.75rem;padding:.25rem 0;padding-inline-start:1rem;padding-inline-end:2.5rem;opacity:.5;text-transform:uppercase;font-weight:500}ax-button-item-list ax-divider{width:100%;height:1px;background-color:rgba(var(--ax-color-border-default));margin:.25rem 0}ax-button-item-list ax-button-item{position:relative;display:inline-flex;align-items:center;justify-content:flex-start;padding:.5rem;padding-inline-start:1rem;padding-inline-end:4rem;font-size:.875rem;color:rgba(var(--ax-color-text-default));-webkit-user-select:none;user-select:none;cursor:pointer}ax-button-item-list ax-button-item:hover:not(ax-button-item-list ax-button-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}ax-button-item-list ax-button-item.ax-divide{border:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-button-item-list ax-button-item.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-button-item-list ax-button-item ax-prefix,ax-button-item-list ax-button-item ax-suffix{display:flex;flex-direction:row}ax-button-item-list ax-button-item ax-prefix ax-icon,ax-button-item-list ax-button-item ax-suffix ax-icon{display:block;width:1.5rem;text-align:center}ax-button-item-list ax-button-item ax-prefix{padding-inline-end:.5rem}ax-button-item-list ax-button-item ax-suffix{padding-inline-start:.5rem}ax-button-item-list ax-button-item.ax-primary-default{background-color:transparent;color:rgba(var(--ax-color-primary-500));border:transparent}ax-button-item-list ax-button-item.ax-primary-default:hover,ax-button-item-list ax-button-item.ax-primary-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-primary-600))}ax-button-item-list ax-button-item.ax-primary-default:active{color:rgba(var(--ax-color-primary-400))}ax-button-item-list ax-button-item.ax-primary-default.ax-state-selected{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-button-item-list ax-button-item.ax-secondary-default{background-color:transparent;color:rgba(var(--ax-color-secondary-500));border:transparent}ax-button-item-list ax-button-item.ax-secondary-default:hover,ax-button-item-list ax-button-item.ax-secondary-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-secondary-600))}ax-button-item-list ax-button-item.ax-secondary-default:active{color:rgba(var(--ax-color-secondary-400))}ax-button-item-list ax-button-item.ax-secondary-default.ax-state-selected{background-color:rgba(var(--ax-color-secondary-500));color:rgba(var(--ax-color-secondary-fore))}ax-button-item-list ax-button-item.ax-success-default{background-color:transparent;color:rgba(var(--ax-color-success-500));border:transparent}ax-button-item-list ax-button-item.ax-success-default:hover,ax-button-item-list ax-button-item.ax-success-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-success-600))}ax-button-item-list ax-button-item.ax-success-default:active{color:rgba(var(--ax-color-success-400))}ax-button-item-list ax-button-item.ax-success-default.ax-state-selected{background-color:rgba(var(--ax-color-success-500));color:rgba(var(--ax-color-success-fore))}ax-button-item-list ax-button-item.ax-warning-default{background-color:transparent;color:rgba(var(--ax-color-warning-500));border:transparent}ax-button-item-list ax-button-item.ax-warning-default:hover,ax-button-item-list ax-button-item.ax-warning-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-warning-600))}ax-button-item-list ax-button-item.ax-warning-default:active{color:rgba(var(--ax-color-warning-400))}ax-button-item-list ax-button-item.ax-warning-default.ax-state-selected{background-color:rgba(var(--ax-color-warning-500));color:rgba(var(--ax-color-warning-fore))}ax-button-item-list ax-button-item.ax-danger-default{background-color:transparent;color:rgba(var(--ax-color-danger-500));border:transparent}ax-button-item-list ax-button-item.ax-danger-default:hover,ax-button-item-list ax-button-item.ax-danger-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-danger-600))}ax-button-item-list ax-button-item.ax-danger-default:active{color:rgba(var(--ax-color-danger-400))}ax-button-item-list ax-button-item.ax-danger-default.ax-state-selected{background-color:rgba(var(--ax-color-danger-500));color:rgba(var(--ax-color-danger-fore))}ax-button-item-list ax-button-item.ax-info-default{background-color:transparent;color:rgba(var(--ax-color-info-500));border:transparent}ax-button-item-list ax-button-item.ax-info-default:hover,ax-button-item-list ax-button-item.ax-info-default:focus{background-color:rgba(var(--ax-color-on-surface));color:rgba(var(--ax-color-info-600))}ax-button-item-list ax-button-item.ax-info-default:active{color:rgba(var(--ax-color-info-400))}ax-button-item-list ax-button-item.ax-info-default.ax-state-selected{background-color:rgba(var(--ax-color-info-500));color:rgba(var(--ax-color-info-fore))}\n"] }]
|
157
158
|
}], ctorParameters: function () { return [{ type: i1$1.AXDropdownPanelComponent, decorators: [{
|
158
159
|
type: Inject,
|
159
160
|
args: [AXDropdownPanelComponent]
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-button.mjs","sources":["../../../../libs/components/button/src/lib/button-item.component.ts","../../../../libs/components/button/src/lib/button-item-list.component.ts","../../../../libs/components/button/src/lib/button.component.ts","../../../../libs/components/button/src/lib/button.component.html","../../../../libs/components/button/src/lib/button.module.ts","../../../../libs/components/button/src/acorex-components-button.ts"],"sourcesContent":["import { AXClickEvent, MXColorComponent, MXInteractiveComponent } from '@acorex/components/common';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { classes } from 'polytype';\n\n@Component({\n selector: 'ax-button-item',\n template: `\n <ng-content select=\"ax-prefix\"> </ng-content>\n <ng-content select=\"ax-loading\"> </ng-content>\n <ng-content select=\"ax-icon\"> </ng-content>\n <span class=\"ax-button-item-text\" *ngIf=\"text\">{{ text }}</span>\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\"ax-dropdown-panel\"> </ng-content>\n `,\n host: { tabindex: '0' },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['color', 'disabled'],\n outputs: ['onClick', 'onFocus', 'onBlur', 'disabledChange'],\n})\nexport class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorComponent) {\n @Input()\n text: string;\n\n private _selected: boolean;\n @Input()\n public get selected(): boolean {\n return this._selected;\n }\n public set selected(v: boolean) {\n this._selected = v;\n this.cdr.markForCheck();\n }\n\n @Input()\n divided = false;\n\n @Input()\n data: unknown;\n\n @Input()\n name: string;\n\n @Output()\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n @HostListener('click', ['$event'])\n private __hostClick(e: MouseEvent) {\n if (!this.disabled) {\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n }\n }\n\n @HostListener('focus', ['$event'])\n private __hostFocus(e: FocusEvent) {\n this.emitOnFocusEvent(e);\n }\n\n @HostListener('blur', ['$event'])\n private __hostBlur(e: FocusEvent) {\n this.emitOnBlurEvent(e);\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n const cssClasses = {\n 'ax-button-icon': !this.text,\n 'ax-state-disabled': this.disabled,\n 'ax-state-selected': this.selected,\n 'ax-divided': this.divided,\n };\n cssClasses[`ax-${this.color || 'primary'}-default`] = true;\n return Object.entries(cssClasses)\n .filter((c) => c[1])\n .map((c) => c[0])\n .join(' ');\n }\n}\n","import { AXButtonClickEvent, AXClickEvent, MXInteractiveComponent } from '@acorex/components/common';\nimport { AXDropdownPanelComponent } from '@acorex/components/dropdown';\nimport {\n AfterContentInit,\n Component,\n ContentChildren,\n EventEmitter,\n Inject,\n Output,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXButtonItemComponent } from './button-item.component';\n\n@Component({\n selector: 'ax-button-item-list',\n template: ` <ng-content select=\"ax-button-item, ax-title, ax-divider, ng-container\"></ng-content> `,\n styleUrls: ['./button-item-list.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXButtonItemListComponent extends MXInteractiveComponent implements AfterContentInit {\n @ContentChildren(AXButtonItemComponent)\n protected _contentButtons: QueryList<AXButtonItemComponent>;\n\n @Output()\n onItemClick: EventEmitter<AXButtonClickEvent> = new EventEmitter<AXButtonClickEvent>();\n\n constructor(@Inject(AXDropdownPanelComponent) private parent: AXDropdownPanelComponent) {\n super();\n }\n\n ngAfterContentInit() {\n this._initContents();\n this._contentButtons.changes.subscribe(() => {\n this._initContents();\n });\n }\n\n private _initContents() {\n this._bindEvents();\n this._bindProps();\n this.cdr.markForCheck();\n }\n\n private _bindEvents() {\n this._contentButtons?.forEach((b) => {\n if (!b.onClick.length)\n b.onClick.subscribe((c) => {\n this._handleOnItemClick(c);\n });\n });\n }\n\n private _bindProps() {\n this._contentButtons?.forEach((b) => {\n b.disabled = b.disabled ?? this.disabled;\n });\n }\n\n private _handleOnItemClick(e: AXClickEvent) {\n this.parent.close();\n this._emitOnItemClickEvent(e, e.component);\n }\n\n _emitOnItemClickEvent(e: AXClickEvent, item: AXButtonItemComponent): void {\n this.onItemClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e.nativeEvent,\n name: item.name,\n data: item.data,\n });\n }\n}\n","import {\n AXClickEvent,\n AXComponent,\n AXFocusableComponent,\n MXButtonBaseComponent,\n} from '@acorex/components/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXButtonType } from './button-item.class';\nimport { AXButtonItemComponent } from './button-item.component';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-button',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n inputs: ['disabled', 'size', 'tabIndex', 'color', 'look', 'text', 'toggleable', 'selected'],\n outputs: [\n 'onBlur',\n 'onFocus',\n 'onClick',\n 'selectedChange',\n 'toggleableChange',\n 'lookChange',\n 'colorChange',\n 'disabledChange',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXButtonComponent },\n { provide: AXButtonItemComponent, useExisting: AXButtonComponent },\n { provide: AXFocusableComponent, useExisting: AXButtonComponent },\n ],\n})\nexport class AXButtonComponent extends MXButtonBaseComponent implements AfterViewInit {\n /**\n * Fires each time the user clicks the button.\n * @event\n */\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n @Input()\n type: AXButtonType = 'button';\n\n ngAfterViewInit(): void {\n this.getHostElement().removeAttribute('tabindex');\n }\n\n private getButton(): HTMLButtonElement {\n return this.getHostElement().firstElementChild as HTMLButtonElement;\n }\n\n _handleClick(e: MouseEvent) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n if (this.toggleable) {\n this.selected = !this.selected;\n }\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n\n // TODO: check keyboard event\n setTimeout(() => {\n this.blur();\n });\n }\n\n click() {\n this.getButton()?.click();\n }\n\n @HostBinding('class')\n private get __hostClass(): string[] {\n return Object.entries(this.cssClasses)\n .filter((c) => c[1])\n .map((c) => c[0]);\n }\n\n override focus() {\n this.getButton()?.focus();\n this.getButton().classList.add('ax-state-focus');\n }\n override blur() {\n this.getButton().classList.remove('ax-state-focus');\n }\n}\n","<button\n axRipple\n [disabled]=\"disabled\"\n [attr.tabindex]=\"tabIndex\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n (click)=\"_handleClick($event)\"\n [attr.type]=\"type\"\n>\n <ng-content select=\"ax-prefix, ax-loading, ax-icon\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n <span class=\"ax-button-text\" *ngIf=\"text\">{{ text }}</span>\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\",ax-dropdown-panel\"> </ng-content>\n <ng-content select=\".tab-content\"> </ng-content>\n</button>\n","import { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXButtonItemListComponent } from './button-item-list.component';\nimport { AXButtonItemComponent } from './button-item.component';\nimport { AXButtonComponent } from './button.component';\n\nconst COMPONENT = [AXButtonComponent, AXButtonItemComponent, AXButtonItemListComponent];\nconst MODULES = [CommonModule, AXCommonModule, AXDecoratorModule, AXLoadingModule];\n\n@NgModule({\n imports: [MODULES],\n exports: [...COMPONENT],\n declarations: [...COMPONENT],\n providers: [],\n})\nexport class AXButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA8BM,MAAO,qBAAsB,SAAQ,OAAO,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,CAAA;AAhB5F,IAAA,WAAA,GAAA;;QA+BE,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;AAShB,QAAA,IAAA,CAAA,OAAO,GAA+B,IAAI,YAAY,EAAgB,CAAC;AAqCxE,KAAA;AAxDC,IAAA,IACW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAW,QAAQ,CAAC,CAAU,EAAA;AAC5B,QAAA,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;AACnB,QAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;KACzB;AAeO,IAAA,WAAW,CAAC,CAAa,EAAA;AAC/B,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAClB,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;AAChB,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE;AAClC,gBAAA,WAAW,EAAE,CAAC;AACf,aAAA,CAAC,CAAC;AACJ,SAAA;KACF;AAGO,IAAA,WAAW,CAAC,CAAa,EAAA;AAC/B,QAAA,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;KAC1B;AAGO,IAAA,UAAU,CAAC,CAAa,EAAA;AAC9B,QAAA,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;KACzB;AAED,IAAA,IACY,WAAW,GAAA;AACrB,QAAA,MAAM,UAAU,GAAG;AACjB,YAAA,gBAAgB,EAAE,CAAC,I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,EAAE,qBAAqB,EAAE,yBAAyB,CAAA,EAAA,CAAA,CAAA,EAAA;AASzE,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,YALf,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKN,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,OAAO,CAAC;AAClB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-button.mjs","sources":["../../../../libs/components/button/src/lib/button-item.component.ts","../../../../libs/components/button/src/lib/button-item-list.component.ts","../../../../libs/components/button/src/lib/button.component.ts","../../../../libs/components/button/src/lib/button.component.html","../../../../libs/components/button/src/lib/button.module.ts","../../../../libs/components/button/src/acorex-components-button.ts"],"sourcesContent":["import { AXClickEvent, MXColorComponent, MXInteractiveComponent } from '@acorex/components/common';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { classes } from 'polytype';\n\n@Component({\n selector: 'ax-button-item',\n template: `\n <ng-content select=\"ax-prefix\"> </ng-content>\n <ng-content select=\"ax-loading\"> </ng-content>\n <ng-content select=\"ax-icon\"> </ng-content>\n <span class=\"ax-button-item-text\" *ngIf=\"text\">{{ text }}</span>\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\"ax-dropdown-panel\"> </ng-content>\n `,\n host: { tabindex: '0' },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['color', 'disabled'],\n outputs: ['onClick', 'onFocus', 'onBlur', 'disabledChange'],\n})\nexport class AXButtonItemComponent extends classes(MXInteractiveComponent, MXColorComponent) {\n @Input()\n text: string;\n\n private _selected: boolean;\n @Input()\n public get selected(): boolean {\n return this._selected;\n }\n public set selected(v: boolean) {\n this._selected = v;\n this.cdr.markForCheck();\n }\n\n @Input()\n divided = false;\n\n @Input()\n data: unknown;\n\n @Input()\n name: string;\n\n @Output()\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n @HostListener('click', ['$event'])\n private __hostClick(e: MouseEvent) {\n if (!this.disabled) {\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n }\n }\n\n @HostListener('focus', ['$event'])\n private __hostFocus(e: FocusEvent) {\n this.emitOnFocusEvent(e);\n }\n\n @HostListener('blur', ['$event'])\n private __hostBlur(e: FocusEvent) {\n this.emitOnBlurEvent(e);\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n const cssClasses = {\n 'ax-button-icon': !this.text,\n 'ax-state-disabled': this.disabled,\n 'ax-state-selected': this.selected,\n 'ax-divided': this.divided,\n };\n cssClasses[`ax-${this.color || 'primary'}-default`] = true;\n return Object.entries(cssClasses)\n .filter((c) => c[1])\n .map((c) => c[0])\n .join(' ');\n }\n}\n","import { AXClickEvent, AXItemClickEvent, MXInteractiveComponent } from '@acorex/components/common';\nimport { AXDropdownPanelComponent } from '@acorex/components/dropdown';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n EventEmitter,\n Inject,\n Output,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXButtonItemComponent } from './button-item.component';\n\n@Component({\n selector: 'ax-button-item-list',\n template: ` <ng-content select=\"ax-button-item, ax-title, ax-divider, ng-container\"></ng-content> `,\n styleUrls: ['./button-item-list.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXButtonItemListComponent extends MXInteractiveComponent implements AfterContentInit {\n @ContentChildren(AXButtonItemComponent)\n protected _contentButtons: QueryList<AXButtonItemComponent>;\n\n @Output()\n onItemClick: EventEmitter<AXItemClickEvent<AXButtonItemComponent>> = new EventEmitter<AXItemClickEvent<AXButtonItemComponent>>();\n\n constructor(@Inject(AXDropdownPanelComponent) private parent: AXDropdownPanelComponent) {\n super();\n }\n\n ngAfterContentInit() {\n this._initContents();\n this._contentButtons.changes.subscribe(() => {\n this._initContents();\n });\n }\n\n private _initContents() {\n this._bindEvents();\n this._bindProps();\n this.cdr.markForCheck();\n }\n\n private _bindEvents() {\n this._contentButtons?.forEach((b) => {\n if (!b.onClick.length)\n b.onClick.subscribe((c) => {\n this._handleOnItemClick(c);\n });\n });\n }\n\n private _bindProps() {\n this._contentButtons?.forEach((b) => {\n b.disabled = b.disabled ?? this.disabled;\n });\n }\n\n private _handleOnItemClick(e: AXClickEvent) {\n this.parent.close();\n this._emitOnItemClickEvent(e, e.component);\n }\n\n _emitOnItemClickEvent(e: AXClickEvent, item: AXButtonItemComponent): void {\n this.onItemClick.emit({\n component: this,\n item,\n htmlElement: this.getHostElement(),\n nativeEvent: e.nativeEvent,\n name: item.name,\n data: item.data,\n });\n }\n}\n","import {\n AXClickEvent,\n AXComponent,\n AXFocusableComponent,\n MXButtonBaseComponent,\n} from '@acorex/components/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXButtonType } from './button-item.class';\nimport { AXButtonItemComponent } from './button-item.component';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-button',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n inputs: ['disabled', 'size', 'tabIndex', 'color', 'look', 'text', 'toggleable', 'selected'],\n outputs: [\n 'onBlur',\n 'onFocus',\n 'onClick',\n 'selectedChange',\n 'toggleableChange',\n 'lookChange',\n 'colorChange',\n 'disabledChange',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXButtonComponent },\n { provide: AXButtonItemComponent, useExisting: AXButtonComponent },\n { provide: AXFocusableComponent, useExisting: AXButtonComponent },\n ],\n})\nexport class AXButtonComponent extends MXButtonBaseComponent implements AfterViewInit {\n /**\n * Fires each time the user clicks the button.\n * @event\n */\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n @Input()\n type: AXButtonType = 'button';\n\n ngAfterViewInit(): void {\n this.getHostElement().removeAttribute('tabindex');\n }\n\n private getButton(): HTMLButtonElement {\n return this.getHostElement().firstElementChild as HTMLButtonElement;\n }\n\n _handleClick(e: MouseEvent) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n if (this.toggleable) {\n this.selected = !this.selected;\n }\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n\n // TODO: check keyboard event\n setTimeout(() => {\n this.blur();\n });\n }\n\n click() {\n this.getButton()?.click();\n }\n\n @HostBinding('class')\n private get __hostClass(): string[] {\n return Object.entries(this.cssClasses)\n .filter((c) => c[1])\n .map((c) => c[0]);\n }\n\n override focus() {\n this.getButton()?.focus();\n this.getButton().classList.add('ax-state-focus');\n }\n override blur() {\n this.getButton().classList.remove('ax-state-focus');\n }\n}\n","<button\n axRipple\n [disabled]=\"disabled\"\n [attr.tabindex]=\"tabIndex\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n (click)=\"_handleClick($event)\"\n [attr.type]=\"type\"\n>\n <ng-content select=\"ax-prefix, ax-loading, ax-icon\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n <span class=\"ax-button-text\" *ngIf=\"text\">{{ text }}</span>\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\",ax-dropdown-panel\"> </ng-content>\n <ng-content select=\".tab-content\"> </ng-content>\n</button>\n","import { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXButtonItemListComponent } from './button-item-list.component';\nimport { AXButtonItemComponent } from './button-item.component';\nimport { AXButtonComponent } from './button.component';\n\nconst COMPONENT = [AXButtonComponent, AXButtonItemComponent, AXButtonItemListComponent];\nconst MODULES = [CommonModule, AXCommonModule, AXDecoratorModule, AXLoadingModule];\n\n@NgModule({\n imports: [MODULES],\n exports: [...COMPONENT],\n declarations: [...COMPONENT],\n providers: [],\n})\nexport class AXButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA8BM,MAAO,qBAAsB,SAAQ,OAAO,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,CAAA;AAhB5F,IAAA,WAAA,GAAA;;QA+BE,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;AAShB,QAAA,IAAA,CAAA,OAAO,GAA+B,IAAI,YAAY,EAAgB,CAAC;AAqCxE,KAAA;AAxDC,IAAA,IACW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAW,QAAQ,CAAC,CAAU,EAAA;AAC5B,QAAA,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;AACnB,QAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;KACzB;AAeO,IAAA,WAAW,CAAC,CAAa,EAAA;AAC/B,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAClB,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;AAChB,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,WAAW,EAAE,IAAI,CAAC,cAA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cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAd,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,iBATR,iBAAiB,EAAE,qBAAqB,EAAE,yBAAyB,aACrE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAD9D,iBAAiB,EAAE,qBAAqB,EAAE,yBAAyB,CAAA,EAAA,CAAA,CAAA,EAAA;AASzE,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,YALf,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKN,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,OAAO,CAAC;AAClB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
import { MXColorComponent } from '@acorex/components/common';
|
2
|
+
import * as i0 from '@angular/core';
|
3
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Output, Input, HostBinding, NgModule } from '@angular/core';
|
4
|
+
|
5
|
+
class AXCircularProgressComponent extends MXColorComponent {
|
6
|
+
constructor() {
|
7
|
+
super(...arguments);
|
8
|
+
this.strokeDashoffset = 0;
|
9
|
+
this.circumference = 0;
|
10
|
+
this.normalizedRadius = 0;
|
11
|
+
this.ValueChange = new EventEmitter();
|
12
|
+
this._progress = 0;
|
13
|
+
this.strokeChange = new EventEmitter();
|
14
|
+
this._stroke = 4;
|
15
|
+
this.sizeChange = new EventEmitter();
|
16
|
+
this._size = 48;
|
17
|
+
}
|
18
|
+
ngAfterViewInit() {
|
19
|
+
this.setCircularSize();
|
20
|
+
this.updateProgress();
|
21
|
+
}
|
22
|
+
get progress() {
|
23
|
+
return this._progress;
|
24
|
+
}
|
25
|
+
set progress(v) {
|
26
|
+
this.setOption({
|
27
|
+
name: 'progress',
|
28
|
+
value: v,
|
29
|
+
afterCallback: () => {
|
30
|
+
this.updateProgress();
|
31
|
+
},
|
32
|
+
});
|
33
|
+
}
|
34
|
+
get stroke() {
|
35
|
+
return this._stroke;
|
36
|
+
}
|
37
|
+
set stroke(v) {
|
38
|
+
this.setOption({
|
39
|
+
name: 'stroke',
|
40
|
+
value: v,
|
41
|
+
afterCallback: () => {
|
42
|
+
this.setCircularSize();
|
43
|
+
},
|
44
|
+
});
|
45
|
+
}
|
46
|
+
get size() {
|
47
|
+
return this._size;
|
48
|
+
}
|
49
|
+
set size(v) {
|
50
|
+
this.setOption({
|
51
|
+
name: 'size',
|
52
|
+
value: v,
|
53
|
+
afterCallback: () => {
|
54
|
+
this.setCircularSize();
|
55
|
+
},
|
56
|
+
});
|
57
|
+
}
|
58
|
+
get __hostClass() {
|
59
|
+
return `ax-${this['color']}-circular`;
|
60
|
+
}
|
61
|
+
setCircularSize() {
|
62
|
+
if (this.circle) {
|
63
|
+
this.circle.nativeElement.style.setProperty('--ax-stroke-size', `${this.size - this.stroke}px`);
|
64
|
+
this.circle.nativeElement.style.setProperty('--ax-circle-size', `${this.size}px`);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
updateProgress() {
|
68
|
+
if (this.circle) {
|
69
|
+
this.circle.nativeElement.style.background = `conic-gradient(var(--ax-progress-color) ${this.progress * 3.6}deg, var(--ax-progress-line-color) 0deg)`;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXCircularProgressComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
73
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: AXCircularProgressComponent, selector: "ax-circular-progress", inputs: { color: "color", progress: "progress", stroke: "stroke", size: "size" }, outputs: { ValueChange: "ValueChange", strokeChange: "strokeChange", sizeChange: "sizeChange" }, host: { properties: { "class": "this.__hostClass" } }, viewQueries: [{ propertyName: "circle", first: true, predicate: ["circle"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-progress-circular\" #circle>\n <span class=\"ax-progress-content\">\n <ng-content></ng-content>\n </span>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n", styles: ["ax-circular-progress .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface));--ax-circle-size: 48px;--ax-stroke-size: 44px;position:relative;height:var(--ax-circle-size);width:var(--ax-circle-size);border-radius:50%;background:conic-gradient(var(--ax-progress-color) 0deg,var(--ax-progress-line-color) 0deg);display:flex;align-items:center;justify-content:center}ax-circular-progress .ax-progress-circular:before{content:\"\";position:absolute;height:var(--ax-stroke-size);width:var(--ax-stroke-size);border-radius:50%;background-color:rgba(var(--ax-color-surface))}ax-circular-progress .ax-progress-circular .ax-progress-content{position:relative;display:flex;align-items:center;justify-content:center}ax-circular-progress.ax-ghost-circular .ax-circular-progress-svg{--ax-progress-color: rgba(var(--ax-color-ghost-fore));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-primary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-secondary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-secondary-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-success-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-success-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-warning-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-warning-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-danger-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-danger-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-info-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-info-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-primary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-secondary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-secondary-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-success-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-success-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-warning-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-warning-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-danger-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-danger-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-info-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-info-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
74
|
+
}
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXCircularProgressComponent, decorators: [{
|
76
|
+
type: Component,
|
77
|
+
args: [{ selector: 'ax-circular-progress', inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-progress-circular\" #circle>\n <span class=\"ax-progress-content\">\n <ng-content></ng-content>\n </span>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n", styles: ["ax-circular-progress .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface));--ax-circle-size: 48px;--ax-stroke-size: 44px;position:relative;height:var(--ax-circle-size);width:var(--ax-circle-size);border-radius:50%;background:conic-gradient(var(--ax-progress-color) 0deg,var(--ax-progress-line-color) 0deg);display:flex;align-items:center;justify-content:center}ax-circular-progress .ax-progress-circular:before{content:\"\";position:absolute;height:var(--ax-stroke-size);width:var(--ax-stroke-size);border-radius:50%;background-color:rgba(var(--ax-color-surface))}ax-circular-progress .ax-progress-circular .ax-progress-content{position:relative;display:flex;align-items:center;justify-content:center}ax-circular-progress.ax-ghost-circular .ax-circular-progress-svg{--ax-progress-color: rgba(var(--ax-color-ghost-fore));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-primary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-secondary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-secondary-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-success-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-success-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-warning-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-warning-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-danger-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-danger-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}ax-circular-progress.ax-info-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-info-500));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-primary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-primary-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-secondary-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-secondary-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-success-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-success-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-warning-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-warning-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-danger-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-danger-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}.ax-dark ax-progress-bar.ax-info-circular .ax-progress-circular{--ax-progress-color: rgba(var(--ax-color-info-200));--ax-progress-line-color: rgba(var(--ax-color-on-surface))}\n"] }]
|
78
|
+
}], propDecorators: { circle: [{
|
79
|
+
type: ViewChild,
|
80
|
+
args: ['circle']
|
81
|
+
}], ValueChange: [{
|
82
|
+
type: Output
|
83
|
+
}], progress: [{
|
84
|
+
type: Input
|
85
|
+
}], strokeChange: [{
|
86
|
+
type: Output
|
87
|
+
}], stroke: [{
|
88
|
+
type: Input
|
89
|
+
}], sizeChange: [{
|
90
|
+
type: Output
|
91
|
+
}], size: [{
|
92
|
+
type: Input
|
93
|
+
}], __hostClass: [{
|
94
|
+
type: HostBinding,
|
95
|
+
args: ['class']
|
96
|
+
}] } });
|
97
|
+
|
98
|
+
class AXCircularProgressModule {
|
99
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXCircularProgressModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
100
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.6", ngImport: i0, type: AXCircularProgressModule, declarations: [AXCircularProgressComponent], exports: [AXCircularProgressComponent] }); }
|
101
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXCircularProgressModule }); }
|
102
|
+
}
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: AXCircularProgressModule, decorators: [{
|
104
|
+
type: NgModule,
|
105
|
+
args: [{
|
106
|
+
declarations: [AXCircularProgressComponent],
|
107
|
+
imports: [],
|
108
|
+
exports: [AXCircularProgressComponent],
|
109
|
+
}]
|
110
|
+
}] });
|
111
|
+
|
112
|
+
/**
|
113
|
+
* Generated bundle index. Do not edit.
|
114
|
+
*/
|
115
|
+
|
116
|
+
export { AXCircularProgressComponent, AXCircularProgressModule };
|
117
|
+
//# sourceMappingURL=acorex-components-circular-progress.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-components-circular-progress.mjs","sources":["../../../../libs/components/circular-progress/src/lib/circular-progress.component.ts","../../../../libs/components/circular-progress/src/lib/circular-progress.component.html","../../../../libs/components/circular-progress/src/lib/circular-progress.module.ts","../../../../libs/components/circular-progress/src/acorex-components-circular-progress.ts"],"sourcesContent":["import { MXColorComponent } from '@acorex/components/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n\nexport type AXProgressLook = 'linear' | 'circular';\n\n@Component({\n selector: 'ax-circular-progress',\n templateUrl: './circular-progress.component.html',\n styleUrls: ['./circular-progress.component.scss'],\n inputs: ['color'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXCircularProgressComponent extends MXColorComponent implements AfterViewInit {\n @ViewChild('circle') circle: ElementRef;\n\n strokeDashoffset = 0;\n circumference = 0;\n normalizedRadius = 0;\n\n ngAfterViewInit(): void {\n this.setCircularSize();\n this.updateProgress();\n }\n\n @Output()\n ValueChange: EventEmitter<number> = new EventEmitter();\n\n private _progress = 0;\n\n @Input()\n public get progress(): number {\n return this._progress;\n }\n public set progress(v: number) {\n this.setOption({\n name: 'progress',\n value: v,\n afterCallback: () => {\n this.updateProgress();\n },\n });\n }\n\n @Output()\n strokeChange: EventEmitter<number> = new EventEmitter();\n\n private _stroke = 4;\n\n @Input()\n public get stroke(): number {\n return this._stroke;\n }\n public set stroke(v: number) {\n this.setOption({\n name: 'stroke',\n value: v,\n afterCallback: () => {\n this.setCircularSize();\n },\n });\n }\n\n @Output()\n sizeChange: EventEmitter<number> = new EventEmitter();\n\n private _size = 48;\n\n @Input()\n public get size(): number {\n return this._size;\n }\n\n public set size(v: number) {\n this.setOption({\n name: 'size',\n value: v,\n afterCallback: () => {\n this.setCircularSize();\n },\n });\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this['color']}-circular`;\n }\n\n setCircularSize() {\n if (this.circle) {\n this.circle.nativeElement.style.setProperty('--ax-stroke-size', `${this.size - this.stroke}px`);\n this.circle.nativeElement.style.setProperty('--ax-circle-size', `${this.size}px`);\n }\n }\n\n updateProgress() {\n if (this.circle) {\n this.circle.nativeElement.style.background = `conic-gradient(var(--ax-progress-color) ${\n this.progress * 3.6\n }deg, var(--ax-progress-line-color) 0deg)`;\n }\n }\n}\n","<ng-content select=\"ax-prefix\"></ng-content>\n<div class=\"ax-progress-circular\" #circle>\n <span class=\"ax-progress-content\">\n <ng-content></ng-content>\n </span>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n","import { NgModule } from '@angular/core';\nimport { AXCircularProgressComponent } from './circular-progress.component';\n\n@NgModule({\n declarations: [AXCircularProgressComponent],\n imports: [],\n exports: [AXCircularProgressComponent],\n})\nexport class AXCircularProgressModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AA8BM,MAAO,2BAA4B,SAAQ,gBAAgB,CAAA;AARjE,IAAA,WAAA,GAAA;;QAWE,IAAgB,CAAA,gBAAA,GAAG,CAAC,CAAC;QACrB,IAAa,CAAA,aAAA,GAAG,CAAC,CAAC;QAClB,IAAgB,CAAA,gBAAA,GAAG,CAAC,CAAC;AAQrB,QAAA,IAAA,CAAA,WAAW,GAAyB,IAAI,YAAY,EAAE,CAAC;QAE/C,IAAS,CAAA,SAAA,GAAG,CAAC,CAAC;AAiBtB,QAAA,IAAA,CAAA,YAAY,GAAyB,IAAI,YAAY,EAAE,CAAC;QAEhD,IAAO,CAAA,OAAA,GAAG,CAAC,CAAC;AAiBpB,QAAA,IAAA,CAAA,UAAU,GAAyB,IAAI,YAAY,EAAE,CAAC;QAE9C,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;AAoCpB,KAAA;IAlFC,eAAe,GAAA;QACb,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,cAAc,EAAE,CAAC;KACvB;AAOD,IAAA,IACW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAW,QAAQ,CAAC,CAAS,EAAA;QAC3B,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,KAAK,EAAE,CAAC;YACR,aAAa,EAAE,MAAK;gBAClB,IAAI,CAAC,cAAc,EAAE,CAAC;aACvB;AACF,SAAA,CAAC,CAAC;KACJ;AAOD,IAAA,IACW,MAAM,G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,CAAA,EAAA,OAAA,EAAA,CAEhC,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;+GAE1B,wBAAwB,EAAA,CAAA,CAAA,EAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,2BAA2B,CAAC;AAC3C,oBAAA,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,CAAC,2BAA2B,CAAC;AACvC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
@@ -227,7 +227,7 @@ class AXButtonClickEvent extends AXClickEvent {
|
|
227
227
|
* Fires each time the user click the element.
|
228
228
|
* @category Events
|
229
229
|
*/
|
230
|
-
class AXItemClickEvent extends
|
230
|
+
class AXItemClickEvent extends AXClickEvent {
|
231
231
|
}
|
232
232
|
/**
|
233
233
|
* Fires each time the component gets focused.
|
@@ -329,6 +329,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
329
329
|
}] });
|
330
330
|
|
331
331
|
class AXListDataSource extends DataSource {
|
332
|
+
get range() {
|
333
|
+
return this._range;
|
334
|
+
}
|
332
335
|
/**
|
333
336
|
* @ignore
|
334
337
|
*/
|
@@ -337,6 +340,7 @@ class AXListDataSource extends DataSource {
|
|
337
340
|
this.config = config;
|
338
341
|
this.debounceTime = 0;
|
339
342
|
this.subscription = new Subscription();
|
343
|
+
this._range = { start: 0, end: 0 };
|
340
344
|
this.source = config.source;
|
341
345
|
if (config.debounceTime)
|
342
346
|
this.debounceTime = config.debounceTime;
|
@@ -351,6 +355,7 @@ class AXListDataSource extends DataSource {
|
|
351
355
|
.pipe(debounceTime(this.debounceTime))
|
352
356
|
.pipe(distinctUntilChanged())
|
353
357
|
.subscribe((range) => {
|
358
|
+
this._range = range;
|
354
359
|
const startPage = this.getPageForIndex(range.start);
|
355
360
|
const endPage = this.getPageForIndex(range.end - 1);
|
356
361
|
for (let i = startPage; i <= endPage; i++) {
|
@@ -377,12 +382,18 @@ class AXDataSource {
|
|
377
382
|
get totalPages() {
|
378
383
|
return Math.floor(this.totalCount / this.config.pageSize);
|
379
384
|
}
|
385
|
+
get pageSize() {
|
386
|
+
return this.config.pageSize;
|
387
|
+
}
|
380
388
|
get cachedItems() {
|
381
389
|
return this._cachedItems;
|
382
390
|
}
|
383
391
|
get items() {
|
384
392
|
return this._items;
|
385
393
|
}
|
394
|
+
get query() {
|
395
|
+
return this._query;
|
396
|
+
}
|
386
397
|
get isLoading() {
|
387
398
|
return this._isLoading;
|
388
399
|
}
|
@@ -391,13 +402,14 @@ class AXDataSource {
|
|
391
402
|
this._items = [];
|
392
403
|
this.fetchedPages = new Set();
|
393
404
|
this._page = 0;
|
405
|
+
this._query = { skip: 0, take: 0, sort: [] };
|
394
406
|
this.onChanged = new Subject();
|
395
407
|
this.onLoadingChanged = new Subject();
|
396
408
|
this._isLoading = false;
|
397
409
|
this.config = config;
|
398
410
|
this._cachedItems = new Array(this.config.pageSize);
|
399
411
|
this._items = new Array(0);
|
400
|
-
this._query =
|
412
|
+
this._query.take = this.config.pageSize;
|
401
413
|
}
|
402
414
|
load() {
|
403
415
|
const page = this._page;
|
@@ -450,7 +462,7 @@ class AXDataSource {
|
|
450
462
|
}
|
451
463
|
reset() {
|
452
464
|
this._query.filter = null;
|
453
|
-
this._query.sort =
|
465
|
+
this._query.sort = [];
|
454
466
|
this._query.skip = 0;
|
455
467
|
this._cachedItems = new Array(this.config.pageSize);
|
456
468
|
this.fetchedPages.clear();
|