@acorex/components 7.0.17 → 7.0.18
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/alert/src/alert.component.d.ts +5 -0
- package/esm2020/alert/src/alert.component.mjs +8 -7
- package/esm2020/menu/src/menu.component.mjs +3 -3
- package/fesm2015/acorex-components-alert.mjs +6 -6
- package/fesm2015/acorex-components-alert.mjs.map +1 -1
- package/fesm2015/acorex-components-button.mjs +1 -0
- package/fesm2015/acorex-components-calendar.mjs +1 -0
- package/fesm2015/acorex-components-date-picker.mjs +1 -0
- package/fesm2015/acorex-components-decorators.mjs +1 -0
- package/fesm2015/acorex-components-form.mjs +1 -0
- package/fesm2015/acorex-components-menu.mjs +2 -2
- package/fesm2015/acorex-components-menu.mjs.map +1 -1
- package/fesm2015/acorex-components-popup.mjs +1 -0
- package/fesm2015/acorex-components-select-box.mjs +1 -0
- package/fesm2020/acorex-components-alert.mjs +6 -6
- package/fesm2020/acorex-components-alert.mjs.map +1 -1
- package/fesm2020/acorex-components-button.mjs +1 -0
- package/fesm2020/acorex-components-calendar.mjs +1 -0
- package/fesm2020/acorex-components-date-picker.mjs +1 -0
- package/fesm2020/acorex-components-decorators.mjs +1 -0
- package/fesm2020/acorex-components-form.mjs +1 -0
- package/fesm2020/acorex-components-menu.mjs +2 -2
- package/fesm2020/acorex-components-menu.mjs.map +1 -1
- package/fesm2020/acorex-components-popup.mjs +1 -0
- package/fesm2020/acorex-components-select-box.mjs +1 -0
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-alert.mjs","sources":["../../../../projects/acorex/components/alert/src/alert.component.ts","../../../../projects/acorex/components/alert/src/alert.component.html","../../../../projects/acorex/components/alert/src/alert.module.ts","../../../../projects/acorex/components/alert/acorex-components-alert.ts"],"sourcesContent":["import { AXButtonComponent } from '@acorex/components/button';\r\nimport { AXDecoratorContentComponent, AXDecoratorFooterComponent, AXDecoratorIconComponent, AXDecoratorTitleComponent } from '@acorex/components/decorators';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n HostBinding,\r\n ContentChild,\r\n EventEmitter,\r\n Output,\r\n QueryList,\r\n ContentChildren,\r\n} from '@angular/core';\r\nimport { startWith } from 'rxjs/operators';\r\nimport { AXClosbaleComponent, AXEvent } from '@acorex/components/common';\r\nimport {\r\n AXBaseComponent,\r\n AXComponentOptionChanged,\r\n _ColorLookComponentMixin,\r\n} from '@acorex/components/mixin';\r\n\r\nexport const AXBaseAlertMixin = _ColorLookComponentMixin(AXBaseComponent);\r\n\r\n/**\r\n * Regular description\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-alert',\r\n templateUrl: './alert.component.html',\r\n styleUrls: ['./alert.component.scss'],\r\n inputs: ['color'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }]\r\n})\r\nexport class AXAlertComponent extends AXBaseAlertMixin {\r\n\r\n @ContentChild(AXDecoratorIconComponent)\r\n private _icon!: AXDecoratorIconComponent;\r\n\r\n @ContentChildren(AXButtonComponent, { descendants: true })\r\n private _buttons!: QueryList<AXButtonComponent>;\r\n\r\n\r\n @ContentChild(AXDecoratorTitleComponent)\r\n protected _title!: AXButtonComponent;\r\n @ContentChild(AXDecoratorContentComponent)\r\n protected _content!: AXButtonComponent;\r\n\r\n @ContentChild(AXDecoratorFooterComponent)\r\n protected _footer!: AXButtonComponent;\r\n\r\n protected _showInline: boolean = false;\r\n\r\n\r\n @Output()\r\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\r\n\r\n\r\n private _customIcon: string;\r\n private _timeOutRef: number;\r\n\r\n /**\r\n * @ignore\r\n */\r\n @HostBinding('class')\r\n get __hostClass(): string {\r\n const _class = this.look\r\n ? `ax-${this.color}-${this.look}`\r\n : `ax-${this.color}-default`;\r\n return `ax-alert ax-none ${_class}`;\r\n }\r\n\r\n\r\n private _timeOut: number;\r\n @Input()\r\n public get timeOut(): number {\r\n return this._timeOut;\r\n }\r\n public set timeOut(v: number) {\r\n if (v != this._timeOut) {\r\n clearTimeout(this._timeOutRef);\r\n this._timeOut = v;\r\n if (v) {\r\n this._timeOutRef = window.setTimeout(() => {\r\n this.close();\r\n }, this.timeOut);\r\n }\r\n }\r\n }\r\n\r\n private _observer: MutationObserver;\r\n\r\n protected _visible: boolean;\r\n /**\r\n * set the visibility of the Alert\r\n */\r\n @Input()\r\n public get visible(): boolean {\r\n return this._visible;\r\n }\r\n public set visible(v: boolean) {\r\n if (this._visible != v) {\r\n this._visible = v;\r\n const host = this._getHostElement();\r\n if (v) {\r\n host.classList.remove('ax-state-hidden');\r\n host.classList.add('ax-state-visible');\r\n } else {\r\n host.classList.add('ax-state-hidden');\r\n host.classList.toggle('ax-state-visible');\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n elementRef: ElementRef,\r\n cdr: ChangeDetectorRef\r\n ) {\r\n super(elementRef, cdr);\r\n //\r\n const config = { attributes: false, childList: true, subtree: true };\r\n\r\n const callback = (mutationList, observer) => {\r\n for (const mutation of mutationList) {\r\n if (mutation.type === 'childList') {\r\n this._setIcon();\r\n this._applyButtonStyle();\r\n this._showInline = (this._content != null ) || (this._footer != null);\r\n this._cdr.markForCheck();\r\n }\r\n }\r\n };\r\n\r\n // Create an observer instance linked to the callback function\r\n this._observer = new MutationObserver(callback);\r\n\r\n // Start observing the target node for configured mutations\r\n this._observer.observe(this._getHostElement(), config);\r\n }\r\n\r\n\r\n onViewInit() {\r\n if (this.visible == undefined) {\r\n this.visible = true;\r\n }\r\n //\r\n this._customIcon = this._icon?.icon;\r\n this._showInline = this._content != null || this._footer != null;\r\n }\r\n\r\n override _onOptionChanged(option: AXComponentOptionChanged) {\r\n this._setIcon();\r\n this._applyButtonStyle();\r\n }\r\n\r\n private _setIcon() {\r\n if (!this._icon) return;\r\n switch (this.color) {\r\n case 'success':\r\n this._icon.icon = 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n case 'danger':\r\n this._icon.icon = 'ax-icon ax-icon-error-fill';\r\n break;\r\n case 'warning':\r\n this._icon.icon = 'ax-icon ax-icon-warning-fill';\r\n break;\r\n default:\r\n this._icon.icon = this._customIcon || 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n }\r\n }\r\n\r\n\r\n private _applyButtonStyle() {\r\n this._buttons?.forEach((c: any) => {\r\n c.color = this.color;\r\n c._getHostElement().classList.add('ax-sm');\r\n c.look = !c.look || c.look == 'default' ? 'default' : 'blank';\r\n });\r\n }\r\n\r\n /**\r\n * Remove the alert from the container\r\n */\r\n close(): void {\r\n const host = this._getHostElement();\r\n this.visible = false;\r\n const func = () => {\r\n host.parentElement?.removeChild(host);\r\n this.onClosed.emit({\r\n component: this,\r\n });\r\n host.removeEventListener('transitionend', func);\r\n };\r\n host.addEventListener('transitionend', func);\r\n }\r\n\r\n /**\r\n * Hide the alert\r\n */\r\n hide(): void {\r\n this.visible = false;\r\n }\r\n\r\n /**\r\n * Show the alert\r\n */\r\n show() {\r\n this.visible = true;\r\n }\r\n\r\n\r\n onDestroy(): void {\r\n this._observer?.disconnect();\r\n }\r\n\r\n\r\n\r\n}\r\n","<div class=\"ax-alert-inline-start\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-icon\"></ng-content>\r\n</div>\r\n<div class=\"ax-alert-inline-middle\">\r\n <div class=\"ax-alert-middle-block-start\">\r\n <div class=\"ax-alert-title\" >\r\n <ng-content select=\"ax-title\"></ng-content>\r\n </div>\r\n </div>\r\n <div class=\"ax-alert-middle-block-end\" [class.ax-hidden]=\"!_showInline\" [class.ax-title-gap]=\"_title\" >\r\n <ng-content select=\"ax-content\">\r\n </ng-content>\r\n <ng-content select=\"ax-footer\">\r\n </ng-content>\r\n </div>\r\n</div>\r\n<div class=\"ax-alert-inline-end\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-button\"></ng-content>\r\n <ng-content select=\"ax-close-button\"></ng-content>\r\n</div>\r\n<div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut\" *ngIf=\"timeOut\">\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXAlertComponent } from './alert.component';\r\n\r\nconst COMPONENT = [AXAlertComponent];\r\nconst MODULES = [CommonModule, AXDecoratorModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXAlertModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAwBa,gBAAgB,GAAG,wBAAwB,CAAC,eAAe,EAAE;AAE1E;;;;AAIG;AAUG,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;AAgFpD;;AAEG;IACH,WACE,CAAA,UAAsB,EACtB,GAAsB,EAAA;AAEtB,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAtEf,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK,CAAC;AAIvC,QAAA,IAAA,CAAA,QAAQ,GAA0B,IAAI,YAAY,EAAW,CAAC;;AAoE5D,QAAA,MAAM,MAAM,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAErE,QAAA,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,QAAQ,KAAI;AAC1C,YAAA,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE;AACnC,gBAAA,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW,EAAE;oBACjC,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAChB,IAAI,CAAC,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AAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;iBACd,CAAA;;;ACbD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-alert.mjs","sources":["../../../../projects/acorex/components/alert/src/alert.component.ts","../../../../projects/acorex/components/alert/src/alert.component.html","../../../../projects/acorex/components/alert/src/alert.module.ts","../../../../projects/acorex/components/alert/acorex-components-alert.ts"],"sourcesContent":["import { AXButtonComponent } from '@acorex/components/button';\r\nimport {\r\n AXDecoratorContentComponent,\r\n AXDecoratorFooterComponent,\r\n AXDecoratorIconComponent,\r\n AXDecoratorTitleComponent,\r\n} from '@acorex/components/decorators';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n HostBinding,\r\n ContentChild,\r\n EventEmitter,\r\n Output,\r\n QueryList,\r\n ContentChildren,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport { startWith } from 'rxjs/operators';\r\nimport { AXClosbaleComponent, AXEvent } from '@acorex/components/common';\r\nimport {\r\n AXBaseComponent,\r\n AXComponentOptionChanged,\r\n _ColorLookComponentMixin,\r\n} from '@acorex/components/mixin';\r\n\r\nexport const AXBaseAlertMixin = _ColorLookComponentMixin(AXBaseComponent);\r\n\r\n/**\r\n * Regular description\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-alert',\r\n templateUrl: './alert.component.html',\r\n styleUrls: ['./alert.component.scss'],\r\n inputs: ['color'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }],\r\n})\r\nexport class AXAlertComponent extends AXBaseAlertMixin {\r\n @ContentChild(AXDecoratorIconComponent)\r\n private _icon!: AXDecoratorIconComponent;\r\n\r\n @ContentChildren(AXButtonComponent, { descendants: true })\r\n private _buttons!: QueryList<AXButtonComponent>;\r\n\r\n @ContentChild(AXDecoratorTitleComponent)\r\n protected _title!: AXButtonComponent;\r\n @ContentChild(AXDecoratorContentComponent)\r\n protected _content!: AXButtonComponent;\r\n\r\n @ContentChild(AXDecoratorFooterComponent)\r\n protected _footer!: AXButtonComponent;\r\n\r\n protected _showInline: boolean = false;\r\n\r\n @Output()\r\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\r\n\r\n private _customIcon: string;\r\n private _timeOutRef: number;\r\n\r\n /**\r\n * @ignore\r\n */\r\n @HostBinding('class')\r\n get __hostClass(): string {\r\n const _class = this.look\r\n ? `ax-${this.color}-${this.look}`\r\n : `ax-${this.color}-default`;\r\n return `ax-alert ax-none ${_class}`;\r\n }\r\n\r\n private _timeOut: number;\r\n @Input()\r\n public get timeOut(): number {\r\n return this._timeOut;\r\n }\r\n public set timeOut(v: number) {\r\n if (v != this._timeOut) {\r\n clearTimeout(this._timeOutRef);\r\n this._timeOut = v;\r\n if (v) {\r\n this._timeOutRef = window.setTimeout(() => {\r\n this.close();\r\n }, this.timeOut);\r\n }\r\n }\r\n }\r\n\r\n private _observer: MutationObserver;\r\n\r\n protected _visible: boolean;\r\n /**\r\n * set the visibility of the Alert\r\n */\r\n @Input()\r\n public get visible(): boolean {\r\n return this._visible;\r\n }\r\n public set visible(v: boolean) {\r\n if (this._visible != v) {\r\n this._visible = v;\r\n const host = this._getHostElement();\r\n if (v) {\r\n host.classList.remove('ax-state-hidden');\r\n host.classList.add('ax-state-visible');\r\n } else {\r\n host.classList.add('ax-state-hidden');\r\n host.classList.toggle('ax-state-visible');\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n //\r\n const config = { attributes: false, childList: true, subtree: true };\r\n\r\n const callback = (mutationList, observer) => {\r\n for (const mutation of mutationList) {\r\n if (mutation.type === 'childList') {\r\n this._setIcon();\r\n this._applyButtonStyle();\r\n this._showInline = this._content != null || this._footer != null;\r\n this._cdr.markForCheck();\r\n }\r\n }\r\n };\r\n\r\n // Create an observer instance linked to the callback function\r\n this._observer = new MutationObserver(callback);\r\n\r\n // Start observing the target node for configured mutations\r\n this._observer.observe(this._getHostElement(), config);\r\n }\r\n\r\n onViewInit() {\r\n if (this.visible == undefined) {\r\n this.visible = true;\r\n }\r\n //\r\n this._customIcon = this._icon?.icon;\r\n this._showInline = this._content != null || this._footer != null;\r\n }\r\n\r\n override _onOptionChanged(option: AXComponentOptionChanged) {\r\n this._setIcon();\r\n this._applyButtonStyle();\r\n }\r\n\r\n private _setIcon() {\r\n if (!this._icon || this._icon._getInnerElement()) return;\r\n\r\n switch (this.color) {\r\n case 'success':\r\n this._icon.icon = 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n case 'danger':\r\n this._icon.icon = 'ax-icon ax-icon-error-fill';\r\n break;\r\n case 'warning':\r\n this._icon.icon = 'ax-icon ax-icon-warning-fill';\r\n break;\r\n default:\r\n this._icon.icon =\r\n this._customIcon || 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n }\r\n }\r\n\r\n private _applyButtonStyle() {\r\n this._buttons?.forEach((c: any) => {\r\n c.color = this.color;\r\n c._getHostElement().classList.add('ax-sm');\r\n c.look = !c.look || c.look == 'default' ? 'default' : 'blank';\r\n });\r\n }\r\n\r\n /**\r\n * Remove the alert from the container\r\n */\r\n close(): void {\r\n const host = this._getHostElement();\r\n this.visible = false;\r\n const func = () => {\r\n host.parentElement?.removeChild(host);\r\n this.onClosed.emit({\r\n component: this,\r\n });\r\n host.removeEventListener('transitionend', func);\r\n };\r\n host.addEventListener('transitionend', func);\r\n }\r\n\r\n /**\r\n * Hide the alert\r\n */\r\n hide(): void {\r\n this.visible = false;\r\n }\r\n\r\n /**\r\n * Show the alert\r\n */\r\n show() {\r\n this.visible = true;\r\n }\r\n\r\n onDestroy(): void {\r\n this._observer?.disconnect();\r\n }\r\n}\r\n","<div class=\"ax-alert-inline-start\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-icon\"></ng-content>\r\n</div>\r\n<div class=\"ax-alert-inline-middle\">\r\n <div class=\"ax-alert-middle-block-start\">\r\n <div class=\"ax-alert-title\">\r\n <ng-content select=\"ax-title\"></ng-content>\r\n </div>\r\n </div>\r\n <div\r\n class=\"ax-alert-middle-block-end\"\r\n [class.ax-hidden]=\"!_showInline\"\r\n [class.ax-title-gap]=\"_title\">\r\n <ng-content select=\"ax-content\"> </ng-content>\r\n <ng-content select=\"ax-footer\"> </ng-content>\r\n </div>\r\n</div>\r\n<div class=\"ax-alert-inline-end\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-button\"></ng-content>\r\n <ng-content select=\"ax-close-button\"></ng-content>\r\n</div>\r\n<div\r\n class=\"ax-alert-progress\"\r\n [style.animation-duration.ms]=\"timeOut\"\r\n *ngIf=\"timeOut\"></div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXAlertComponent } from './alert.component';\r\n\r\nconst COMPONENT = [AXAlertComponent];\r\nconst MODULES = [CommonModule, AXDecoratorModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXAlertModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MA8Ba,gBAAgB,GAAG,wBAAwB,CAAC,eAAe,EAAE;AAE1E;;;;AAIG;AAUG,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;AA2EpD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAhEf,QAAA,IAAW,CAAA,WAAA,GAAY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,EAAA,aAAa,iBATP,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAClB,YAAY,EAAE,iBAAiB,aAD7B,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAStB,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAJX,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIT,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,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;iBACd,CAAA;;;ACbD;;AAEG;;;;"}
|
@@ -268,3 +268,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
268
268
|
|
269
269
|
export { AXBaseButtonGroupMixin, AXBaseItemButtonMixin, AXButtonComponent, AXButtonGroupComponent, AXButtonItemComponent, AXButtonModule };
|
270
270
|
//# sourceMappingURL=acorex-components-button.mjs.map
|
271
|
+
//# sourceMappingURL=acorex-components-button.mjs.map
|
@@ -528,3 +528,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
528
528
|
|
529
529
|
export { AXCalendarBaseComponent, AXCalendarComponent, AXCalendarComponentMixin, AXCalendarModule, AXCalendarNavigateEvent, CALENDAR_INPUTS, CALENDAR_OUTPUTS };
|
530
530
|
//# sourceMappingURL=acorex-components-calendar.mjs.map
|
531
|
+
//# sourceMappingURL=acorex-components-calendar.mjs.map
|
@@ -294,3 +294,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
294
294
|
|
295
295
|
export { AXBaseDatePickerMixin, AXDatePickerComponent, AXDatepickerModule };
|
296
296
|
//# sourceMappingURL=acorex-components-date-picker.mjs.map
|
297
|
+
//# sourceMappingURL=acorex-components-date-picker.mjs.map
|
@@ -354,3 +354,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
354
354
|
|
355
355
|
export { AXDecoratorCloseButtonComponent, AXDecoratorContentComponent, AXDecoratorFooterComponent, AXDecoratorFormHintComponent, AXDecoratorHeaderComponent, AXDecoratorIconComponent, AXDecoratorModule, AXDecoratorOverlayComponent, AXDecoratorPlaceholderComponent, AXDecoratorPrefixComponent, AXDecoratorSubTitleComponent, AXDecoratorSuffixComponent, AXDecoratorTextComponent, AXDecoratorTitleComponent };
|
356
356
|
//# sourceMappingURL=acorex-components-decorators.mjs.map
|
357
|
+
//# sourceMappingURL=acorex-components-decorators.mjs.map
|
@@ -445,3 +445,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
445
445
|
|
446
446
|
export { AXFormComponent, AXFormFieldComponent, AXFormModule, AXFormValidationEvent, AXValidationRuleComponent, AXValidationSummaryComponent };
|
447
447
|
//# sourceMappingURL=acorex-components-form.mjs.map
|
448
|
+
//# sourceMappingURL=acorex-components-form.mjs.map
|
@@ -322,7 +322,7 @@ class AXMenuComponent extends AXBaseMenuMixin {
|
|
322
322
|
}
|
323
323
|
}
|
324
324
|
AXMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Overlay }, { token: i2.AXPlatform }], target: i0.ɵɵFactoryTarget.Component });
|
325
|
-
AXMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXMenuComponent, selector: "ax-menu", inputs: { disabled: "disabled", tabIndex: "tabIndex", textField: "textField", valueField: "valueField", items: "items", parentId: "parentId", iconField: "iconField", tooltip: "tooltip", isOpen: "isOpen", isActive: "isActive", visibleField: "visibleField", disableField: "disableField", hasChildField: "hasChildField", dividerField: "dividerField", openMode: "openMode", displayMode: "displayMode", showModal: "showModal" }, outputs: { onBlur: "onBlur", onFocus: "onFocus", onMenuItemClick: "onMenuItemClick" }, queries: [{ propertyName: "_contentEmptyTemplate", first: true, predicate: ["emptyTemplate"], descendants: true }, { propertyName: "_contentItemTemplate", first: true, predicate: ["itemTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n
|
325
|
+
AXMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXMenuComponent, selector: "ax-menu", inputs: { disabled: "disabled", tabIndex: "tabIndex", textField: "textField", valueField: "valueField", items: "items", parentId: "parentId", iconField: "iconField", tooltip: "tooltip", isOpen: "isOpen", isActive: "isActive", visibleField: "visibleField", disableField: "disableField", hasChildField: "hasChildField", dividerField: "dividerField", openMode: "openMode", displayMode: "displayMode", showModal: "showModal" }, outputs: { onBlur: "onBlur", onFocus: "onFocus", onMenuItemClick: "onMenuItemClick" }, queries: [{ propertyName: "_contentEmptyTemplate", first: true, predicate: ["emptyTemplate"], descendants: true }, { propertyName: "_contentItemTemplate", first: true, predicate: ["itemTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul [ngClass]=\"_getDirection()\" [class.ax-rtl]=\"rtl\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n recursiveListTmpl;\r\n context: { list: displayItems, isRoot: true }\r\n \"></ng-container>\r\n </ul>\r\n <ng-template #recursiveListTmpl let-list=\"list\" let-isRoot=\"isRoot\">\r\n <ng-container *ngFor=\"let item of list\">\r\n <li\r\n *ngIf=\"item[visibleField] != false\"\r\n [class.ax-state-disabled]=\"item[disableField]\"\r\n (click)=\"_onMenuClick($event, item)\"\r\n (mouseenter)=\"_onMenuMouseEnter($event, item)\"\r\n [ngClass]=\"{ 'ax-state-active ': item.isActive }\">\r\n <div\r\n class=\"ax-menu-item\"\r\n [ngClass]=\"{\r\n 'ax-is-parent': item?.children?.length,\r\n 'ax-is-child': !isRoot\r\n }\"\r\n *ngIf=\"itemTemplate == null; else tmpItem\">\r\n <div class=\"ax-menu-item-prefix\">\r\n <span\r\n class=\"ax-menu-item-icon\"\r\n *ngIf=\"item[iconField]\"\r\n [class]=\"item[iconField]\"></span>\r\n <span>{{ _getItemDisplayTextTemplte(item) }}</span>\r\n </div>\r\n <div class=\"ax-menu-item-suffix\">\r\n <span\r\n class=\"ax-menu-item-icon ax-icon ax-menu-item-icon-chevron\"\r\n [ngClass]=\"{\r\n 'ax-icon-chevron-down': item?.children?.length > 0,\r\n 'ax-menu-active-icon': item.isOpen\r\n }\"\r\n *ngIf=\"!item.isLoading\"></span>\r\n <ax-loading *ngIf=\"item.isLoading\"> </ax-loading>\r\n </div>\r\n </div>\r\n <!--------------- check for custom item template --------------->\r\n <ng-template #tmpItem>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ul\r\n *ngIf=\"item?.children?.length > 0 && item.isOpen && !_overlayRef\"\r\n [class.ax-state-disabled]=\"item[disableField]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n recursiveListTmpl;\r\n context: { list: item.children }\r\n \">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n <li class=\"ax-menu-item-divider\" *ngIf=\"item[this.dividerField]\"></li>\r\n </ng-container>\r\n </ng-template>\r\n</ng-container>\r\n<ng-container *ngIf=\"isLoading\">\r\n <ng-template>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n\r\n<ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <!--------------- check for custom template --------------->\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"> </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n {{ 'common.no-result-found' | trans }}\r\n </ng-template>\r\n </ng-container>\r\n</ng-template>\r\n", styles: ["ax-menu{font-size:.875rem;display:block}ax-menu ul{width:-moz-fit-content;width:fit-content;display:flex;flex-direction:column}ax-menu ul li .ax-menu-item{display:flex}ax-menu ul li .ax-menu-item .ax-menu-item-prefix,ax-menu ul li .ax-menu-item .ax-menu-item-suffix{display:flex;align-items:center;justify-content:center}ax-menu ul li .ax-menu-item .ax-menu-item-prefix .ax-menu-item-icon-chevron,ax-menu ul li .ax-menu-item .ax-menu-item-suffix .ax-menu-item-icon-chevron{transform:rotate(-90deg)}ax-menu ul li .ax-menu-item .ax-menu-item-prefix .ax-menu-item-icon:not(:empty),ax-menu ul li .ax-menu-item .ax-menu-item-suffix .ax-menu-item-icon:not(:empty){min-width:1.25rem;min-height:1.25rem}ax-menu ul li .ax-menu-item .ax-menu-item-prefix .ax-menu-item-icon{padding-inline-end:.5rem}ax-menu ul li .ax-menu-item .ax-menu-item-icon{font-size:1.25rem}ax-menu ul li.ax-state-disabled{cursor:not-allowed!important;opacity:.5}ax-menu ul li.ax-state-active .ax-menu-item-icon-chevron{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-menu .ax-horizontal>li,ax-menu .ax-vertical>li{font-weight:500}ax-menu .ax-horizontal{flex-direction:row;align-items:center}ax-menu .ax-horizontal .ax-menu-item-divider{width:1px;height:1rem;background-color:rgb(var(--ax-color-ghost),.15)}ax-menu .ax-horizontal li.ax-state-active .ax-menu-item-icon-chevron{transform:rotate(0)!important}ax-menu .ax-horizontal li:not(.ax-menu-item-divider){padding:.5rem;cursor:pointer}ax-menu .ax-vertical{flex-direction:column;width:100%}ax-menu .ax-vertical>li{font-weight:500}ax-menu .ax-vertical .ax-menu-item-divider{width:100%;height:1px;background-color:rgb(var(--ax-color-ghost),.15);margin:.375rem 0}ax-menu .ax-vertical li.ax-state-active .ax-menu-item-icon-chevron{transform:rotate(0)!important}ax-menu .ax-vertical li:not(.ax-menu-item-divider){padding:.5rem 0;cursor:pointer}ax-menu .ax-vertical.ax-submenu-ul{background-color:rgb(var(--ax-color-surface));border:1px solid;border-color:rgb(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);padding:.5rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}ax-menu .ax-vertical.ax-submenu-ul li{border-radius:var(--ax-rounded-border-default);cursor:pointer}ax-menu .ax-vertical.ax-submenu-ul li:not(.ax-menu-item-divider){padding:.5rem}ax-menu .ax-vertical.ax-submenu-ul li:not(.ax-state-disabled,.ax-menu-item-divider):hover{background-color:rgb(var(--ax-color-ghost),.05);color:rgb(var(--ax-color-ghost))}ax-menu .ax-side-menu{width:100%;flex-direction:column;gap:.5rem}ax-menu .ax-side-menu ul{display:flex;flex-direction:column;margin-top:.5rem;width:100%;padding:0 .5rem}ax-menu .ax-side-menu li .ax-menu-item-icon-chevron.ax-menu-active-icon{transform:rotate(180deg)!important}ax-menu .ax-side-menu li .ax-menu-item{justify-content:space-between}ax-menu .ax-side-menu li .ax-menu-item.ax-is-parent{font-weight:500}ax-menu .ax-side-menu li:not(.ax-menu-item-divider){padding:.5rem 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "text"], outputs: ["visibleChange"] }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "trans" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
326
326
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXMenuComponent, decorators: [{
|
327
327
|
type: Component,
|
328
328
|
args: [{ selector: 'ax-menu', inputs: [
|
@@ -343,7 +343,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
343
343
|
'openMode',
|
344
344
|
'displayMode',
|
345
345
|
'showModal',
|
346
|
-
], outputs: ['onBlur', 'onFocus', 'onMenuItemClick'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n
|
346
|
+
], outputs: ['onBlur', 'onFocus', 'onMenuItemClick'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul [ngClass]=\"_getDirection()\" [class.ax-rtl]=\"rtl\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n recursiveListTmpl;\r\n context: { list: displayItems, isRoot: true }\r\n \"></ng-container>\r\n </ul>\r\n <ng-template #recursiveListTmpl let-list=\"list\" let-isRoot=\"isRoot\">\r\n <ng-container *ngFor=\"let item of list\">\r\n <li\r\n *ngIf=\"item[visibleField] != false\"\r\n [class.ax-state-disabled]=\"item[disableField]\"\r\n (click)=\"_onMenuClick($event, item)\"\r\n (mouseenter)=\"_onMenuMouseEnter($event, item)\"\r\n [ngClass]=\"{ 'ax-state-active ': item.isActive }\">\r\n <div\r\n class=\"ax-menu-item\"\r\n [ngClass]=\"{\r\n 'ax-is-parent': item?.children?.length,\r\n 'ax-is-child': !isRoot\r\n }\"\r\n *ngIf=\"itemTemplate == null; else tmpItem\">\r\n <div class=\"ax-menu-item-prefix\">\r\n <span\r\n class=\"ax-menu-item-icon\"\r\n *ngIf=\"item[iconField]\"\r\n [class]=\"item[iconField]\"></span>\r\n <span>{{ _getItemDisplayTextTemplte(item) }}</span>\r\n </div>\r\n <div class=\"ax-menu-item-suffix\">\r\n <span\r\n class=\"ax-menu-item-icon ax-icon ax-menu-item-icon-chevron\"\r\n [ngClass]=\"{\r\n 'ax-icon-chevron-down': item?.children?.length > 0,\r\n 'ax-menu-active-icon': item.isOpen\r\n }\"\r\n *ngIf=\"!item.isLoading\"></span>\r\n <ax-loading *ngIf=\"item.isLoading\"> </ax-loading>\r\n </div>\r\n </div>\r\n <!--------------- check for custom item template --------------->\r\n <ng-template #tmpItem>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ul\r\n *ngIf=\"item?.children?.length > 0 && item.isOpen && !_overlayRef\"\r\n [class.ax-state-disabled]=\"item[disableField]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n recursiveListTmpl;\r\n context: { list: item.children }\r\n \">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n <li class=\"ax-menu-item-divider\" *ngIf=\"item[this.dividerField]\"></li>\r\n </ng-container>\r\n </ng-template>\r\n</ng-container>\r\n<ng-container *ngIf=\"isLoading\">\r\n <ng-template>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n\r\n<ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <!--------------- check for custom template --------------->\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"> </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n {{ 'common.no-result-found' | trans }}\r\n </ng-template>\r\n </ng-container>\r\n</ng-template>\r\n", styles: ["ax-menu{font-size:.875rem;display:block}ax-menu ul{width:-moz-fit-content;width:fit-content;display:flex;flex-direction:column}ax-menu ul li .ax-menu-item{display:flex}ax-menu ul li .ax-menu-item .ax-menu-item-prefix,ax-menu ul li .ax-menu-item .ax-menu-item-suffix{display:flex;align-items:center;justify-content:center}ax-menu ul li .ax-menu-item .ax-menu-item-prefix .ax-menu-item-icon-chevron,ax-menu ul li .ax-menu-item .ax-menu-item-suffix .ax-menu-item-icon-chevron{transform:rotate(-90deg)}ax-menu ul li .ax-menu-item .ax-menu-item-prefix .ax-menu-item-icon:not(:empty),ax-menu ul li .ax-menu-item .ax-menu-item-suffix .ax-menu-item-icon:not(:empty){min-width:1.25rem;min-height:1.25rem}ax-menu ul li .ax-menu-item .ax-menu-item-prefix .ax-menu-item-icon{padding-inline-end:.5rem}ax-menu ul li .ax-menu-item .ax-menu-item-icon{font-size:1.25rem}ax-menu ul li.ax-state-disabled{cursor:not-allowed!important;opacity:.5}ax-menu ul li.ax-state-active .ax-menu-item-icon-chevron{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-menu .ax-horizontal>li,ax-menu .ax-vertical>li{font-weight:500}ax-menu .ax-horizontal{flex-direction:row;align-items:center}ax-menu .ax-horizontal .ax-menu-item-divider{width:1px;height:1rem;background-color:rgb(var(--ax-color-ghost),.15)}ax-menu .ax-horizontal li.ax-state-active .ax-menu-item-icon-chevron{transform:rotate(0)!important}ax-menu .ax-horizontal li:not(.ax-menu-item-divider){padding:.5rem;cursor:pointer}ax-menu .ax-vertical{flex-direction:column;width:100%}ax-menu .ax-vertical>li{font-weight:500}ax-menu .ax-vertical .ax-menu-item-divider{width:100%;height:1px;background-color:rgb(var(--ax-color-ghost),.15);margin:.375rem 0}ax-menu .ax-vertical li.ax-state-active .ax-menu-item-icon-chevron{transform:rotate(0)!important}ax-menu .ax-vertical li:not(.ax-menu-item-divider){padding:.5rem 0;cursor:pointer}ax-menu .ax-vertical.ax-submenu-ul{background-color:rgb(var(--ax-color-surface));border:1px solid;border-color:rgb(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);padding:.5rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}ax-menu .ax-vertical.ax-submenu-ul li{border-radius:var(--ax-rounded-border-default);cursor:pointer}ax-menu .ax-vertical.ax-submenu-ul li:not(.ax-menu-item-divider){padding:.5rem}ax-menu .ax-vertical.ax-submenu-ul li:not(.ax-state-disabled,.ax-menu-item-divider):hover{background-color:rgb(var(--ax-color-ghost),.05);color:rgb(var(--ax-color-ghost))}ax-menu .ax-side-menu{width:100%;flex-direction:column;gap:.5rem}ax-menu .ax-side-menu ul{display:flex;flex-direction:column;margin-top:.5rem;width:100%;padding:0 .5rem}ax-menu .ax-side-menu li .ax-menu-item-icon-chevron.ax-menu-active-icon{transform:rotate(180deg)!important}ax-menu .ax-side-menu li .ax-menu-item{justify-content:space-between}ax-menu .ax-side-menu li .ax-menu-item.ax-is-parent{font-weight:500}ax-menu .ax-side-menu li:not(.ax-menu-item-divider){padding:.5rem 0;cursor:pointer}\n"] }]
|
347
347
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.Overlay }, { type: i2.AXPlatform }]; }, propDecorators: { _contentEmptyTemplate: [{
|
348
348
|
type: ContentChild,
|
349
349
|
args: ['emptyTemplate']
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-menu.mjs","sources":["../../../../projects/acorex/components/menu/src/menu.component.ts","../../../../projects/acorex/components/menu/src/menu.component.html","../../../../projects/acorex/components/menu/src/menu.module.ts","../../../../projects/acorex/components/menu/acorex-components-menu.ts"],"sourcesContent":["import { OverlayRef, Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\n\r\nimport {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n OnInit,\r\n ContentChild,\r\n TemplateRef,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n} from '@angular/core';\r\nimport { AXBaseMenuMixin } from '@acorex/components/mixin';\r\nimport { AXPlatform } from '@acorex/core/platform';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-menu',\r\n templateUrl: './menu.component.html',\r\n styleUrls: ['./menu.component.scss'],\r\n inputs: [\r\n 'disabled',\r\n 'tabIndex',\r\n 'textField',\r\n 'valueField',\r\n 'items',\r\n 'parentId',\r\n 'iconField',\r\n 'tooltip',\r\n 'isOpen',\r\n 'isActive',\r\n 'visibleField',\r\n 'disableField',\r\n 'hasChildField',\r\n 'dividerField',\r\n 'openMode',\r\n 'displayMode',\r\n 'showModal',\r\n ],\r\n outputs: ['onBlur', 'onFocus', 'onMenuItemClick'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXMenuComponent extends AXBaseMenuMixin implements OnInit {\r\n @ContentChild('emptyTemplate')\r\n private _contentEmptyTemplate: TemplateRef<any>;\r\n\r\n @ContentChild('itemTemplate')\r\n private _contentItemTemplate: TemplateRef<any>;\r\n\r\n public _overlayRef: OverlayRef;\r\n\r\n get emptyTemplate(): TemplateRef<any> {\r\n return this._contentEmptyTemplate;\r\n }\r\n\r\n get itemTemplate(): TemplateRef<any> {\r\n return this._contentItemTemplate;\r\n }\r\n\r\n rtl: boolean = new AXPlatform().isRtl();\r\n\r\n private _levelCount: number = 0;\r\n\r\n private _oldItem: any;\r\n\r\n constructor(\r\n private _elementRef: ElementRef,\r\n private cdr: ChangeDetectorRef,\r\n private _overlay: Overlay,\r\n private _platform: AXPlatform\r\n ) {\r\n super(_elementRef, cdr);\r\n }\r\n\r\n onInit(): void {\r\n super.onInit();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n super.onViewInit();\r\n }\r\n\r\n _onMenuMouseEnter(e: MouseEvent, item: any): void {\r\n const targetElement = e.target as HTMLDivElement;\r\n\r\n if (this.isLoading || targetElement.tagName === 'UL') {\r\n return;\r\n }\r\n\r\n if (this.openMode === 'hover') {\r\n this._handelMenuLogic(e, item);\r\n }\r\n\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n _onMenuClick(e: MouseEvent, item: any): void {\r\n const targetElement = e.target as HTMLDivElement;\r\n\r\n if (this.isLoading || targetElement.tagName === 'UL') {\r\n return;\r\n }\r\n\r\n if (this.openMode === 'click') {\r\n this._handelMenuLogic(e, item);\r\n }\r\n\r\n this.onMenuItemClick.emit({\r\n component: this,\r\n item: item,\r\n nativeEvent: e,\r\n });\r\n\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n _getDirection(): string {\r\n if (this.displayMode === 'horizontal' && this._levelCount === 0) {\r\n return 'ax-horizontal';\r\n } else if (this._levelCount > 0) {\r\n return 'ax-vertical ax-submenu-ul';\r\n } else if (this.displayMode === 'sidemenu') {\r\n return 'ax-side-menu';\r\n } else {\r\n return 'ax-vertical';\r\n }\r\n }\r\n\r\n private _removeActive(items: any): void {\r\n items.forEach((element) => {\r\n element.isActive = false;\r\n if (element?.children?.length > 0) {\r\n this._removeActive(element.children);\r\n }\r\n });\r\n }\r\n\r\n private _closeOpenChild(items: any): void {\r\n items.forEach((element) => {\r\n element.isOpen = false;\r\n if (element?.children?.length > 0) {\r\n this._closeOpenChild(element.children);\r\n }\r\n });\r\n }\r\n\r\n private _initParent(items: any, parentId: any): void {\r\n items.forEach((element) => {\r\n element.parentId = parentId;\r\n });\r\n }\r\n\r\n private _handelMenuLogic(e: MouseEvent, item: any): void {\r\n if (!item[this.disableField] || item[this.dividerField] === false) {\r\n const targetElement = e.target as HTMLDivElement;\r\n if (\r\n (targetElement.closest('li') && this.openMode === 'click') ||\r\n (targetElement.closest('li') && this.openMode === 'hover')\r\n ) {\r\n if (this._overlayRef && this._oldItem !== item) {\r\n this._overlayRef.detach();\r\n }\r\n if (this.displayMode === 'horizontal') {\r\n this.displayItems.forEach((element) => {\r\n if (\r\n !item.parentId &&\r\n item[this.valueField] !== element[this.valueField]\r\n ) {\r\n element.isOpen = false;\r\n }\r\n });\r\n }\r\n if (item?.children?.length > 0) {\r\n if (this.displayMode === 'horizontal') {\r\n this._initParent(item.children, item[this.valueField]);\r\n }\r\n if (\r\n this.displayMode === 'horizontal' ||\r\n this.displayMode === 'vertical'\r\n ) {\r\n if (this._oldItem !== item) {\r\n this._openAsOverlay(targetElement.closest('li'), item.children);\r\n }\r\n }\r\n this._closeOpenChild(item.children);\r\n\r\n if (\r\n this.displayMode === 'horizontal' ||\r\n this.displayMode === 'vertical'\r\n ) {\r\n item.isOpen = true;\r\n } else {\r\n item.isOpen = !item.isOpen;\r\n }\r\n }\r\n\r\n this._removeActive(this.displayItems);\r\n\r\n item.isActive = !item.isActive;\r\n\r\n if (\r\n this.displayMode === 'horizontal' ||\r\n this.displayMode === 'vertical'\r\n ) {\r\n if (\r\n this._oldItem &&\r\n this._oldItem?.isOpen &&\r\n item[this.valueField] !== this._oldItem[this.valueField]\r\n ) {\r\n this._oldItem.isOpen = false;\r\n }\r\n this._oldItem = item;\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _openAsOverlay(targetRef, overlayItems: any[]): void {\r\n let positions = [];\r\n if (this.displayMode === 'vertical') {\r\n if (this._levelCount >= 1) {\r\n positions = [\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'center',\r\n overlayX: 'center',\r\n overlayY: 'center',\r\n },\r\n ];\r\n } else {\r\n positions = [\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'center',\r\n overlayX: 'center',\r\n overlayY: 'center',\r\n },\r\n ];\r\n }\r\n } else {\r\n if (this._levelCount >= 1) {\r\n positions = [\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n ];\r\n } else {\r\n positions = [\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n ];\r\n }\r\n }\r\n\r\n this._overlayRef = this._overlay.create({\r\n scrollStrategy: this._overlay.scrollStrategies.close(),\r\n positionStrategy: this._overlay\r\n .position()\r\n .flexibleConnectedTo(targetRef)\r\n .withPositions([...positions])\r\n .withPush(false).withDefaultOffsetX(12),\r\n\r\n direction: this._platform.isRtl() ? 'rtl' : 'ltr',\r\n disposeOnNavigation: true,\r\n panelClass: ['ax-animate-fadeIn', 'ax-animate-faster', 'ax-overlay-menu'],\r\n maxHeight: 'unset',\r\n hasBackdrop: false,\r\n backdropClass: ['cdk-overlay-transparent-backdrop'],\r\n });\r\n\r\n const ref = this._overlayRef.attach(new ComponentPortal(AXMenuComponent));\r\n\r\n ref.instance.items = overlayItems;\r\n\r\n ref.instance.displayMode = this.displayMode;\r\n\r\n ref.instance.openMode = 'hover';\r\n\r\n ref.instance._levelCount = this._levelCount + 1;\r\n\r\n ref.instance.disableField = this.disableField;\r\n\r\n ref.instance.visibleField = this.visibleField;\r\n\r\n ref.instance.valueField = this.valueField;\r\n\r\n ref.instance.textField = this.textField;\r\n\r\n ref.instance.iconField = this.iconField;\r\n\r\n ref.instance.dividerField = this.dividerField;\r\n\r\n ref.onDestroy(() => {\r\n ref.instance?._overlayRef?.dispose();\r\n });\r\n\r\n this._overlayRef.outsidePointerEvents().subscribe((e) => {\r\n if (this._overlayRef && this.openMode === 'click') {\r\n this._close();\r\n e.stopPropagation();\r\n }\r\n });\r\n\r\n this._platform.scroll.subscribe(() => {\r\n if (this._overlayRef) {\r\n this._close();\r\n }\r\n });\r\n\r\n this._platform.resize.subscribe(() => {\r\n if (this._overlayRef) {\r\n this._close();\r\n }\r\n });\r\n }\r\n\r\n private _close() {\r\n this._overlayRef.detach();\r\n this._oldItem = null;\r\n this.displayItems.forEach((element) => {\r\n element.isOpen = false;\r\n element.isActive = false;\r\n });\r\n this.cdr.detectChanges();\r\n }\r\n\r\n onDestroy(): void {\r\n this._overlayRef?.detach();\r\n }\r\n}\r\n","<ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul [ngClass]=\"_getDirection()\" [class.ax-rtl]=\"rtl\">\r\n <ng-container *ngTemplateOutlet=\"recursiveListTmpl; context:{ list: displayItems }\"></ng-container>\r\n </ul>\r\n <ng-template #recursiveListTmpl let-list=\"list\">\r\n <ng-container *ngFor=\"let item of list\">\r\n <li *ngIf=\"item[visibleField] !=false\" [class.ax-state-disabled]=\"item[disableField]\"\r\n (click)=\"_onMenuClick($event,item)\" (mouseenter)=\"_onMenuMouseEnter($event,item)\"\r\n [ngClass]=\"{'ax-state-active ': item.isActive}\">\r\n <div class=\"ax-menu-item\" *ngIf=\"itemTemplate == null else tmpItem\">\r\n <div class=\"ax-menu-item-prefix\">\r\n <span class=\"ax-menu-item-icon\" *ngIf=\"item[iconField]\" [class]=\" item[iconField]\"></span>\r\n </div>\r\n <span>{{_getItemDisplayTextTemplte(item)}}</span>\r\n <div class=\"ax-menu-item-suffix\">\r\n <span class=\"ax-menu-item-icon ax-icon ax-menu-item-icon-chevron\"\r\n [ngClass]=\"{'ax-icon-chevron-down':item?.children?.length > 0,'ax-menu-active-icon': item.isOpen}\"\r\n *ngIf=\"!item.isLoading\"></span>\r\n <ax-loading *ngIf=\"item.isLoading\">\r\n </ax-loading>\r\n </div>\r\n </div>\r\n <!--------------- check for custom item template --------------->\r\n <ng-template #tmpItem>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: { $implicit: item }\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ul *ngIf=\"item?.children?.length > 0 && item.isOpen &&!_overlayRef\"\r\n [class.ax-state-disabled]=\"item[disableField]\">\r\n <ng-container *ngTemplateOutlet=\"recursiveListTmpl; context:{ list: item.children }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n <li class=\"ax-menu-item-divider\" *ngIf=\"item[this.dividerField]\"></li>\r\n </ng-container>\r\n </ng-template>\r\n</ng-container>\r\n<ng-container *ngIf=\"isLoading\">\r\n <ng-template>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n\r\n<ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <!--------------- check for custom template --------------->\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n {{ 'common.no-result-found' | trans }}\r\n </ng-template>\r\n </ng-container>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXMenuComponent } from './menu.component';\r\nimport { AXLoadingModule } from '@acorex/components/loading';\r\nimport { AXTranslationModule } from '@acorex/core/translation';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\n\r\nconst COMPONENT = [AXMenuComponent];\r\nconst MODULES = [\r\n AXDecoratorModule,\r\n AXLoadingModule,\r\n AXTranslationModule,\r\n OverlayModule,\r\n];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [CommonModule, ...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXMenuModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgBA;;;;AAIG;AA4BG,MAAO,eAAgB,SAAQ,eAAe,CAAA;AAuBlD,IAAA,WAAA,CACU,WAAuB,EACvB,GAAsB,EACtB,QAAiB,EACjB,SAAqB,EAAA;AAE7B,QAAA,KAAK,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;AALhB,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;AACvB,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;AACtB,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAS;AACjB,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAY;QAV/B,IAAA,CAAA,GAAG,GAAY,IAAI,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC;AAEhC,QAAA,IAAW,CAAA,WAAA,GAAW,CAAC,CAAC;KAW/B;AArBD,IAAA,IAAI,aAAa,GAAA;QACf,OAAO,IAAI,CAAC,qBA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ACjB,eAAe;QACf,mBAAmB;QACnB,aAAa,aALI,eAAe,CAAA,EAAA,CAAA,CAAA;0GAcrB,YAAY,EAAA,OAAA,EAAA,CAJb,YAAY,EAAK,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIvB,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,YAAY,EAAE,GAAG,OAAO,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;iBACd,CAAA;;;ACrBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-menu.mjs","sources":["../../../../projects/acorex/components/menu/src/menu.component.ts","../../../../projects/acorex/components/menu/src/menu.component.html","../../../../projects/acorex/components/menu/src/menu.module.ts","../../../../projects/acorex/components/menu/acorex-components-menu.ts"],"sourcesContent":["import { OverlayRef, Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\n\r\nimport {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n OnInit,\r\n ContentChild,\r\n TemplateRef,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n} from '@angular/core';\r\nimport { AXBaseMenuMixin } from '@acorex/components/mixin';\r\nimport { AXPlatform } from '@acorex/core/platform';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-menu',\r\n templateUrl: './menu.component.html',\r\n styleUrls: ['./menu.component.scss'],\r\n inputs: [\r\n 'disabled',\r\n 'tabIndex',\r\n 'textField',\r\n 'valueField',\r\n 'items',\r\n 'parentId',\r\n 'iconField',\r\n 'tooltip',\r\n 'isOpen',\r\n 'isActive',\r\n 'visibleField',\r\n 'disableField',\r\n 'hasChildField',\r\n 'dividerField',\r\n 'openMode',\r\n 'displayMode',\r\n 'showModal',\r\n ],\r\n outputs: ['onBlur', 'onFocus', 'onMenuItemClick'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class AXMenuComponent extends AXBaseMenuMixin implements OnInit {\r\n @ContentChild('emptyTemplate')\r\n private _contentEmptyTemplate: TemplateRef<any>;\r\n\r\n @ContentChild('itemTemplate')\r\n private _contentItemTemplate: TemplateRef<any>;\r\n\r\n public _overlayRef: OverlayRef;\r\n\r\n get emptyTemplate(): TemplateRef<any> {\r\n return this._contentEmptyTemplate;\r\n }\r\n\r\n get itemTemplate(): TemplateRef<any> {\r\n return this._contentItemTemplate;\r\n }\r\n\r\n rtl: boolean = new AXPlatform().isRtl();\r\n\r\n private _levelCount: number = 0;\r\n\r\n private _oldItem: any;\r\n\r\n constructor(\r\n private _elementRef: ElementRef,\r\n private cdr: ChangeDetectorRef,\r\n private _overlay: Overlay,\r\n private _platform: AXPlatform\r\n ) {\r\n super(_elementRef, cdr);\r\n }\r\n\r\n onInit(): void {\r\n super.onInit();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n super.onViewInit();\r\n }\r\n\r\n _onMenuMouseEnter(e: MouseEvent, item: any): void {\r\n const targetElement = e.target as HTMLDivElement;\r\n\r\n if (this.isLoading || targetElement.tagName === 'UL') {\r\n return;\r\n }\r\n\r\n if (this.openMode === 'hover') {\r\n this._handelMenuLogic(e, item);\r\n }\r\n\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n _onMenuClick(e: MouseEvent, item: any): void {\r\n const targetElement = e.target as HTMLDivElement;\r\n\r\n if (this.isLoading || targetElement.tagName === 'UL') {\r\n return;\r\n }\r\n\r\n if (this.openMode === 'click') {\r\n this._handelMenuLogic(e, item);\r\n }\r\n\r\n this.onMenuItemClick.emit({\r\n component: this,\r\n item: item,\r\n nativeEvent: e,\r\n });\r\n\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n _getDirection(): string {\r\n if (this.displayMode === 'horizontal' && this._levelCount === 0) {\r\n return 'ax-horizontal';\r\n } else if (this._levelCount > 0) {\r\n return 'ax-vertical ax-submenu-ul';\r\n } else if (this.displayMode === 'sidemenu') {\r\n return 'ax-side-menu';\r\n } else {\r\n return 'ax-vertical';\r\n }\r\n }\r\n\r\n private _removeActive(items: any): void {\r\n items.forEach((element) => {\r\n element.isActive = false;\r\n if (element?.children?.length > 0) {\r\n this._removeActive(element.children);\r\n }\r\n });\r\n }\r\n\r\n private _closeOpenChild(items: any): void {\r\n items.forEach((element) => {\r\n element.isOpen = false;\r\n if (element?.children?.length > 0) {\r\n this._closeOpenChild(element.children);\r\n }\r\n });\r\n }\r\n\r\n private _initParent(items: any, parentId: any): void {\r\n items.forEach((element) => {\r\n element.parentId = parentId;\r\n });\r\n }\r\n\r\n private _handelMenuLogic(e: MouseEvent, item: any): void {\r\n if (!item[this.disableField] || item[this.dividerField] === false) {\r\n const targetElement = e.target as HTMLDivElement;\r\n if (\r\n (targetElement.closest('li') && this.openMode === 'click') ||\r\n (targetElement.closest('li') && this.openMode === 'hover')\r\n ) {\r\n if (this._overlayRef && this._oldItem !== item) {\r\n this._overlayRef.detach();\r\n }\r\n if (this.displayMode === 'horizontal') {\r\n this.displayItems.forEach((element) => {\r\n if (\r\n !item.parentId &&\r\n item[this.valueField] !== element[this.valueField]\r\n ) {\r\n element.isOpen = false;\r\n }\r\n });\r\n }\r\n if (item?.children?.length > 0) {\r\n if (this.displayMode === 'horizontal') {\r\n this._initParent(item.children, item[this.valueField]);\r\n }\r\n if (\r\n this.displayMode === 'horizontal' ||\r\n this.displayMode === 'vertical'\r\n ) {\r\n if (this._oldItem !== item) {\r\n this._openAsOverlay(targetElement.closest('li'), item.children);\r\n }\r\n }\r\n this._closeOpenChild(item.children);\r\n\r\n if (\r\n this.displayMode === 'horizontal' ||\r\n this.displayMode === 'vertical'\r\n ) {\r\n item.isOpen = true;\r\n } else {\r\n item.isOpen = !item.isOpen;\r\n }\r\n }\r\n\r\n this._removeActive(this.displayItems);\r\n\r\n item.isActive = !item.isActive;\r\n\r\n if (\r\n this.displayMode === 'horizontal' ||\r\n this.displayMode === 'vertical'\r\n ) {\r\n if (\r\n this._oldItem &&\r\n this._oldItem?.isOpen &&\r\n item[this.valueField] !== this._oldItem[this.valueField]\r\n ) {\r\n this._oldItem.isOpen = false;\r\n }\r\n this._oldItem = item;\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _openAsOverlay(targetRef, overlayItems: any[]): void {\r\n let positions = [];\r\n if (this.displayMode === 'vertical') {\r\n if (this._levelCount >= 1) {\r\n positions = [\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'center',\r\n overlayX: 'center',\r\n overlayY: 'center',\r\n },\r\n ];\r\n } else {\r\n positions = [\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'center',\r\n overlayX: 'center',\r\n overlayY: 'center',\r\n },\r\n ];\r\n }\r\n } else {\r\n if (this._levelCount >= 1) {\r\n positions = [\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n ];\r\n } else {\r\n positions = [\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n ];\r\n }\r\n }\r\n\r\n this._overlayRef = this._overlay.create({\r\n scrollStrategy: this._overlay.scrollStrategies.close(),\r\n positionStrategy: this._overlay\r\n .position()\r\n .flexibleConnectedTo(targetRef)\r\n .withPositions([...positions])\r\n .withPush(false).withDefaultOffsetX(12),\r\n\r\n direction: this._platform.isRtl() ? 'rtl' : 'ltr',\r\n disposeOnNavigation: true,\r\n panelClass: ['ax-animate-fadeIn', 'ax-animate-faster', 'ax-overlay-menu'],\r\n maxHeight: 'unset',\r\n hasBackdrop: false,\r\n backdropClass: ['cdk-overlay-transparent-backdrop'],\r\n });\r\n\r\n const ref = this._overlayRef.attach(new ComponentPortal(AXMenuComponent));\r\n\r\n ref.instance.items = overlayItems;\r\n\r\n ref.instance.displayMode = this.displayMode;\r\n\r\n ref.instance.openMode = 'hover';\r\n\r\n ref.instance._levelCount = this._levelCount + 1;\r\n\r\n ref.instance.disableField = this.disableField;\r\n\r\n ref.instance.visibleField = this.visibleField;\r\n\r\n ref.instance.valueField = this.valueField;\r\n\r\n ref.instance.textField = this.textField;\r\n\r\n ref.instance.iconField = this.iconField;\r\n\r\n ref.instance.dividerField = this.dividerField;\r\n\r\n ref.onDestroy(() => {\r\n ref.instance?._overlayRef?.dispose();\r\n });\r\n\r\n this._overlayRef.outsidePointerEvents().subscribe((e) => {\r\n if (this._overlayRef && this.openMode === 'click') {\r\n this._close();\r\n e.stopPropagation();\r\n }\r\n });\r\n\r\n this._platform.scroll.subscribe(() => {\r\n if (this._overlayRef) {\r\n this._close();\r\n }\r\n });\r\n\r\n this._platform.resize.subscribe(() => {\r\n if (this._overlayRef) {\r\n this._close();\r\n }\r\n });\r\n }\r\n\r\n private _close() {\r\n this._overlayRef.detach();\r\n this._oldItem = null;\r\n this.displayItems.forEach((element) => {\r\n element.isOpen = false;\r\n element.isActive = false;\r\n });\r\n this.cdr.detectChanges();\r\n }\r\n\r\n onDestroy(): void {\r\n this._overlayRef?.detach();\r\n }\r\n}\r\n","<ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul [ngClass]=\"_getDirection()\" [class.ax-rtl]=\"rtl\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n recursiveListTmpl;\r\n context: { list: displayItems, isRoot: true }\r\n \"></ng-container>\r\n </ul>\r\n <ng-template #recursiveListTmpl let-list=\"list\" let-isRoot=\"isRoot\">\r\n <ng-container *ngFor=\"let item of list\">\r\n <li\r\n *ngIf=\"item[visibleField] != false\"\r\n [class.ax-state-disabled]=\"item[disableField]\"\r\n (click)=\"_onMenuClick($event, item)\"\r\n (mouseenter)=\"_onMenuMouseEnter($event, item)\"\r\n [ngClass]=\"{ 'ax-state-active ': item.isActive }\">\r\n <div\r\n class=\"ax-menu-item\"\r\n [ngClass]=\"{\r\n 'ax-is-parent': item?.children?.length,\r\n 'ax-is-child': !isRoot\r\n }\"\r\n *ngIf=\"itemTemplate == null; else tmpItem\">\r\n <div class=\"ax-menu-item-prefix\">\r\n <span\r\n class=\"ax-menu-item-icon\"\r\n *ngIf=\"item[iconField]\"\r\n [class]=\"item[iconField]\"></span>\r\n <span>{{ _getItemDisplayTextTemplte(item) }}</span>\r\n </div>\r\n <div class=\"ax-menu-item-suffix\">\r\n <span\r\n class=\"ax-menu-item-icon ax-icon ax-menu-item-icon-chevron\"\r\n [ngClass]=\"{\r\n 'ax-icon-chevron-down': item?.children?.length > 0,\r\n 'ax-menu-active-icon': item.isOpen\r\n }\"\r\n *ngIf=\"!item.isLoading\"></span>\r\n <ax-loading *ngIf=\"item.isLoading\"> </ax-loading>\r\n </div>\r\n </div>\r\n <!--------------- check for custom item template --------------->\r\n <ng-template #tmpItem>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ul\r\n *ngIf=\"item?.children?.length > 0 && item.isOpen && !_overlayRef\"\r\n [class.ax-state-disabled]=\"item[disableField]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n recursiveListTmpl;\r\n context: { list: item.children }\r\n \">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n <li class=\"ax-menu-item-divider\" *ngIf=\"item[this.dividerField]\"></li>\r\n </ng-container>\r\n </ng-template>\r\n</ng-container>\r\n<ng-container *ngIf=\"isLoading\">\r\n <ng-template>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n\r\n<ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <!--------------- check for custom template --------------->\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"> </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n {{ 'common.no-result-found' | trans }}\r\n </ng-template>\r\n </ng-container>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXMenuComponent } from './menu.component';\r\nimport { AXLoadingModule } from '@acorex/components/loading';\r\nimport { AXTranslationModule } from '@acorex/core/translation';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\n\r\nconst COMPONENT = [AXMenuComponent];\r\nconst MODULES = [\r\n AXDecoratorModule,\r\n AXLoadingModule,\r\n AXTranslationModule,\r\n OverlayModule,\r\n];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [CommonModule, ...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXMenuModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgBA;;;;AAIG;AA4BG,MAAO,eAAgB,SAAQ,eAAe,CAAA;AAuBlD,IAAA,WAAA,CACU,WAAuB,EACvB,GAAsB,EACtB,QAAiB,EACjB,SAAqB,EAAA;AAE7B,QAAA,KAAK,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;AALhB,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;AACvB,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;AACtB,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAS;AACjB,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAY;QAV/B,IAAA,CAAA,GAAG,GAAY,IAAI,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC;AAEhC,QAAA,IAAW,CAAA,WAAA,GAAW,CAAC,CAAC;KAW/B;AArBD,IAAA,IAAI,aAAa,GAAA;QACf,OAAO,IAAI,CAAC,qBAAqB,CAAC;KACnC;AAED,IAAA,IAAI,YAAY,GAAA;QACd,OAAO,IAAI,CAAC,oBAAoB,CAAC;KAClC;IAiBD,MAAM,GAAA;QACJ,KAAK,CAAC,MAAM,EAAE,CAAC;KAChB;IAED,eAAe,GAAA;QACb,KAAK,CAAC,UAAU,EAAE,CAAC;KACpB;IAED,iBAAiB,CAAC,CAAa,EAAE,IAAS,EAAA;AACxC,QAAA,MAAM,aAAa,GAAG,CAAC,CAAC,MAAwB,CAAC;QAEjD,IAAI,IAAI,CAAC,SAAS,IAAI,aAAa,CAAC,OAAO,KAAK,IAAI,EAAE;YACpD,OAAO;AACR,SAAA;AAED,QAAA,IAAI,IAAI,CAAC,QAAQ,KAAK,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rBD;;AAEG;;;;"}
|
@@ -28,7 +28,7 @@ class AXAlertComponent extends AXBaseAlertMixin {
|
|
28
28
|
if (mutation.type === 'childList') {
|
29
29
|
this._setIcon();
|
30
30
|
this._applyButtonStyle();
|
31
|
-
this._showInline =
|
31
|
+
this._showInline = this._content != null || this._footer != null;
|
32
32
|
this._cdr.markForCheck();
|
33
33
|
}
|
34
34
|
}
|
@@ -94,7 +94,7 @@ class AXAlertComponent extends AXBaseAlertMixin {
|
|
94
94
|
this._applyButtonStyle();
|
95
95
|
}
|
96
96
|
_setIcon() {
|
97
|
-
if (!this._icon)
|
97
|
+
if (!this._icon || this._icon._getInnerElement())
|
98
98
|
return;
|
99
99
|
switch (this.color) {
|
100
100
|
case 'success':
|
@@ -107,7 +107,8 @@ class AXAlertComponent extends AXBaseAlertMixin {
|
|
107
107
|
this._icon.icon = 'ax-icon ax-icon-warning-fill';
|
108
108
|
break;
|
109
109
|
default:
|
110
|
-
this._icon.icon =
|
110
|
+
this._icon.icon =
|
111
|
+
this._customIcon || 'ax-icon ax-icon-check-circle-fill';
|
111
112
|
break;
|
112
113
|
}
|
113
114
|
}
|
@@ -150,10 +151,10 @@ class AXAlertComponent extends AXBaseAlertMixin {
|
|
150
151
|
}
|
151
152
|
}
|
152
153
|
AXAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXAlertComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
153
|
-
AXAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXAlertComponent, selector: "ax-alert", inputs: { color: "color", timeOut: "timeOut", visible: "visible" }, outputs: { onClosed: "onClosed" }, host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }], queries: [{ propertyName: "_icon", first: true, predicate: AXDecoratorIconComponent, descendants: true }, { propertyName: "_title", first: true, predicate: AXDecoratorTitleComponent, descendants: true }, { propertyName: "_content", first: true, predicate: AXDecoratorContentComponent, descendants: true }, { propertyName: "_footer", first: true, predicate: AXDecoratorFooterComponent, descendants: true }, { propertyName: "_buttons", predicate: AXButtonComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-alert-inline-start\" [class.!ax-items-start]=\"_showInline\">\r\n
|
154
|
+
AXAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXAlertComponent, selector: "ax-alert", inputs: { color: "color", timeOut: "timeOut", visible: "visible" }, outputs: { onClosed: "onClosed" }, host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }], queries: [{ propertyName: "_icon", first: true, predicate: AXDecoratorIconComponent, descendants: true }, { propertyName: "_title", first: true, predicate: AXDecoratorTitleComponent, descendants: true }, { propertyName: "_content", first: true, predicate: AXDecoratorContentComponent, descendants: true }, { propertyName: "_footer", first: true, predicate: AXDecoratorFooterComponent, descendants: true }, { propertyName: "_buttons", predicate: AXButtonComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-alert-inline-start\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-icon\"></ng-content>\r\n</div>\r\n<div class=\"ax-alert-inline-middle\">\r\n <div class=\"ax-alert-middle-block-start\">\r\n <div class=\"ax-alert-title\">\r\n <ng-content select=\"ax-title\"></ng-content>\r\n </div>\r\n </div>\r\n <div\r\n class=\"ax-alert-middle-block-end\"\r\n [class.ax-hidden]=\"!_showInline\"\r\n [class.ax-title-gap]=\"_title\">\r\n <ng-content select=\"ax-content\"> </ng-content>\r\n <ng-content select=\"ax-footer\"> </ng-content>\r\n </div>\r\n</div>\r\n<div class=\"ax-alert-inline-end\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-button\"></ng-content>\r\n <ng-content select=\"ax-close-button\"></ng-content>\r\n</div>\r\n<div\r\n class=\"ax-alert-progress\"\r\n [style.animation-duration.ms]=\"timeOut\"\r\n *ngIf=\"timeOut\"></div>\r\n", styles: ["html.ax-dark ax-alert.ax-primary-default{background-color:rgb(var(--ax-color-primary-900));border-color:rgb(var(--ax-color-primary-500))}html.ax-dark ax-alert.ax-primary-default ax-title{color:rgb(var(--ax-color-primary-100))}html.ax-dark ax-alert.ax-primary-default ax-content{color:rgb(var(--ax-color-primary-100))}html.ax-dark ax-alert.ax-primary-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-primary-200))}html.ax-dark ax-alert.ax-primary-default .ax-alert-progress{background-color:rgb(var(--ax-color-primary-200))}html.ax-dark ax-alert.ax-secondary-default{background-color:rgb(var(--ax-color-secondary-900));border-color:rgb(var(--ax-color-secondary-500))}html.ax-dark ax-alert.ax-secondary-default ax-title{color:rgb(var(--ax-color-secondary-100))}html.ax-dark ax-alert.ax-secondary-default ax-content{color:rgb(var(--ax-color-secondary-100))}html.ax-dark ax-alert.ax-secondary-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-secondary-200))}html.ax-dark ax-alert.ax-secondary-default .ax-alert-progress{background-color:rgb(var(--ax-color-secondary-200))}html.ax-dark ax-alert.ax-success-default{background-color:rgb(var(--ax-color-success-900));border-color:rgb(var(--ax-color-success-500))}html.ax-dark ax-alert.ax-success-default ax-title{color:rgb(var(--ax-color-success-100))}html.ax-dark ax-alert.ax-success-default ax-content{color:rgb(var(--ax-color-success-100))}html.ax-dark ax-alert.ax-success-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-success-200))}html.ax-dark ax-alert.ax-success-default .ax-alert-progress{background-color:rgb(var(--ax-color-success-200))}html.ax-dark ax-alert.ax-warning-default{background-color:rgb(var(--ax-color-warning-900));border-color:rgb(var(--ax-color-warning-500))}html.ax-dark ax-alert.ax-warning-default ax-title{color:rgb(var(--ax-color-warning-100))}html.ax-dark ax-alert.ax-warning-default ax-content{color:rgb(var(--ax-color-warning-100))}html.ax-dark ax-alert.ax-warning-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-warning-200))}html.ax-dark ax-alert.ax-warning-default .ax-alert-progress{background-color:rgb(var(--ax-color-warning-200))}html.ax-dark ax-alert.ax-danger-default{background-color:rgb(var(--ax-color-danger-900));border-color:rgb(var(--ax-color-danger-500))}html.ax-dark ax-alert.ax-danger-default ax-title{color:rgb(var(--ax-color-danger-100))}html.ax-dark ax-alert.ax-danger-default ax-content{color:rgb(var(--ax-color-danger-100))}html.ax-dark ax-alert.ax-danger-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-danger-200))}html.ax-dark ax-alert.ax-danger-default .ax-alert-progress{background-color:rgb(var(--ax-color-danger-200))}ax-alert{position:relative;padding:1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;display:flex;gap:1rem;overflow:hidden}ax-alert.ax-state-hidden{visibility:hidden;opacity:0}ax-alert.ax-state-visible{visibility:visible;opacity:1}ax-alert .ax-alert-inline-middle{display:flex;flex-direction:column;justify-content:center;flex:1 1 0%}ax-alert .ax-alert-inline-start,ax-alert .ax-alert-inline-end{display:flex}ax-alert .ax-alert-inline-start.ax-items-start,ax-alert .ax-alert-inline-end.ax-items-start{align-items:flex-start!important}ax-alert .ax-alert-inline-start{align-items:center}ax-alert .ax-alert-inline-start>ax-icon{border-radius:999rem;display:grid;place-items:center;font-size:1.25rem;line-height:1.25rem}ax-alert .ax-alert-inline-end{align-items:center}ax-alert .ax-alert-middle-block-start{display:flex;align-items:center;justify-content:center}ax-alert .ax-alert-middle-block-start .ax-alert-title{display:flex;flex-direction:column;flex:1}ax-alert .ax-alert-middle-block-start .ax-alert-title .ax-title{font-size:.875rem;line-height:1.25rem;font-weight:500}ax-alert .ax-alert-middle-block-end{display:flex;flex-direction:column;gap:1rem}ax-alert .ax-alert-middle-block-end.ax-title-gap{margin-top:.5rem}ax-alert .ax-alert-middle-block-end.ax-hidden{display:none!important}ax-alert .ax-alert-middle-block-end ax-content{display:block}ax-alert .ax-alert-middle-block-end ax-footer{background-color:transparent}ax-alert .ax-alert-progress{width:0px;height:.25rem;position:absolute;inset-inline-start:0px;bottom:0;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar}@keyframes progressBar{0%{width:100%}to{width:0%}}ax-alert.ax-primary-default{background-color:rgb(var(--ax-color-primary-50));border-color:rgb(var(--ax-color-primary-500))}ax-alert.ax-primary-default ax-title{color:rgb(var(--ax-color-primary-900))}ax-alert.ax-primary-default ax-content{color:rgb(var(--ax-color-primary-800))}ax-alert.ax-primary-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-primary-800))}ax-alert.ax-primary-default .ax-alert-progress{background-color:rgb(var(--ax-color-primary-800))}ax-alert.ax-secondary-default{background-color:rgb(var(--ax-color-secondary-50));border-color:rgb(var(--ax-color-secondary-500))}ax-alert.ax-secondary-default ax-title{color:rgb(var(--ax-color-secondary-900))}ax-alert.ax-secondary-default ax-content{color:rgb(var(--ax-color-secondary-800))}ax-alert.ax-secondary-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-secondary-800))}ax-alert.ax-secondary-default .ax-alert-progress{background-color:rgb(var(--ax-color-secondary-800))}ax-alert.ax-success-default{background-color:rgb(var(--ax-color-success-50));border-color:rgb(var(--ax-color-success-500))}ax-alert.ax-success-default ax-title{color:rgb(var(--ax-color-success-900))}ax-alert.ax-success-default ax-content{color:rgb(var(--ax-color-success-800))}ax-alert.ax-success-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-success-800))}ax-alert.ax-success-default .ax-alert-progress{background-color:rgb(var(--ax-color-success-800))}ax-alert.ax-warning-default{background-color:rgb(var(--ax-color-warning-50));border-color:rgb(var(--ax-color-warning-500))}ax-alert.ax-warning-default ax-title{color:rgb(var(--ax-color-warning-900))}ax-alert.ax-warning-default ax-content{color:rgb(var(--ax-color-warning-800))}ax-alert.ax-warning-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-warning-800))}ax-alert.ax-warning-default .ax-alert-progress{background-color:rgb(var(--ax-color-warning-800))}ax-alert.ax-danger-default{background-color:rgb(var(--ax-color-danger-50));border-color:rgb(var(--ax-color-danger-500))}ax-alert.ax-danger-default ax-title{color:rgb(var(--ax-color-danger-900))}ax-alert.ax-danger-default ax-content{color:rgb(var(--ax-color-danger-800))}ax-alert.ax-danger-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-danger-800))}ax-alert.ax-danger-default .ax-alert-progress{background-color:rgb(var(--ax-color-danger-800))}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
154
155
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXAlertComponent, decorators: [{
|
155
156
|
type: Component,
|
156
|
-
args: [{ selector: 'ax-alert', inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }], template: "<div class=\"ax-alert-inline-start\" [class.!ax-items-start]=\"_showInline\">\r\n
|
157
|
+
args: [{ selector: 'ax-alert', inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }], template: "<div class=\"ax-alert-inline-start\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-icon\"></ng-content>\r\n</div>\r\n<div class=\"ax-alert-inline-middle\">\r\n <div class=\"ax-alert-middle-block-start\">\r\n <div class=\"ax-alert-title\">\r\n <ng-content select=\"ax-title\"></ng-content>\r\n </div>\r\n </div>\r\n <div\r\n class=\"ax-alert-middle-block-end\"\r\n [class.ax-hidden]=\"!_showInline\"\r\n [class.ax-title-gap]=\"_title\">\r\n <ng-content select=\"ax-content\"> </ng-content>\r\n <ng-content select=\"ax-footer\"> </ng-content>\r\n </div>\r\n</div>\r\n<div class=\"ax-alert-inline-end\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-button\"></ng-content>\r\n <ng-content select=\"ax-close-button\"></ng-content>\r\n</div>\r\n<div\r\n class=\"ax-alert-progress\"\r\n [style.animation-duration.ms]=\"timeOut\"\r\n *ngIf=\"timeOut\"></div>\r\n", styles: ["html.ax-dark ax-alert.ax-primary-default{background-color:rgb(var(--ax-color-primary-900));border-color:rgb(var(--ax-color-primary-500))}html.ax-dark ax-alert.ax-primary-default ax-title{color:rgb(var(--ax-color-primary-100))}html.ax-dark ax-alert.ax-primary-default ax-content{color:rgb(var(--ax-color-primary-100))}html.ax-dark ax-alert.ax-primary-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-primary-200))}html.ax-dark ax-alert.ax-primary-default .ax-alert-progress{background-color:rgb(var(--ax-color-primary-200))}html.ax-dark ax-alert.ax-secondary-default{background-color:rgb(var(--ax-color-secondary-900));border-color:rgb(var(--ax-color-secondary-500))}html.ax-dark ax-alert.ax-secondary-default ax-title{color:rgb(var(--ax-color-secondary-100))}html.ax-dark ax-alert.ax-secondary-default ax-content{color:rgb(var(--ax-color-secondary-100))}html.ax-dark ax-alert.ax-secondary-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-secondary-200))}html.ax-dark ax-alert.ax-secondary-default .ax-alert-progress{background-color:rgb(var(--ax-color-secondary-200))}html.ax-dark ax-alert.ax-success-default{background-color:rgb(var(--ax-color-success-900));border-color:rgb(var(--ax-color-success-500))}html.ax-dark ax-alert.ax-success-default ax-title{color:rgb(var(--ax-color-success-100))}html.ax-dark ax-alert.ax-success-default ax-content{color:rgb(var(--ax-color-success-100))}html.ax-dark ax-alert.ax-success-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-success-200))}html.ax-dark ax-alert.ax-success-default .ax-alert-progress{background-color:rgb(var(--ax-color-success-200))}html.ax-dark ax-alert.ax-warning-default{background-color:rgb(var(--ax-color-warning-900));border-color:rgb(var(--ax-color-warning-500))}html.ax-dark ax-alert.ax-warning-default ax-title{color:rgb(var(--ax-color-warning-100))}html.ax-dark ax-alert.ax-warning-default ax-content{color:rgb(var(--ax-color-warning-100))}html.ax-dark ax-alert.ax-warning-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-warning-200))}html.ax-dark ax-alert.ax-warning-default .ax-alert-progress{background-color:rgb(var(--ax-color-warning-200))}html.ax-dark ax-alert.ax-danger-default{background-color:rgb(var(--ax-color-danger-900));border-color:rgb(var(--ax-color-danger-500))}html.ax-dark ax-alert.ax-danger-default ax-title{color:rgb(var(--ax-color-danger-100))}html.ax-dark ax-alert.ax-danger-default ax-content{color:rgb(var(--ax-color-danger-100))}html.ax-dark ax-alert.ax-danger-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-danger-200))}html.ax-dark ax-alert.ax-danger-default .ax-alert-progress{background-color:rgb(var(--ax-color-danger-200))}ax-alert{position:relative;padding:1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;display:flex;gap:1rem;overflow:hidden}ax-alert.ax-state-hidden{visibility:hidden;opacity:0}ax-alert.ax-state-visible{visibility:visible;opacity:1}ax-alert .ax-alert-inline-middle{display:flex;flex-direction:column;justify-content:center;flex:1 1 0%}ax-alert .ax-alert-inline-start,ax-alert .ax-alert-inline-end{display:flex}ax-alert .ax-alert-inline-start.ax-items-start,ax-alert .ax-alert-inline-end.ax-items-start{align-items:flex-start!important}ax-alert .ax-alert-inline-start{align-items:center}ax-alert .ax-alert-inline-start>ax-icon{border-radius:999rem;display:grid;place-items:center;font-size:1.25rem;line-height:1.25rem}ax-alert .ax-alert-inline-end{align-items:center}ax-alert .ax-alert-middle-block-start{display:flex;align-items:center;justify-content:center}ax-alert .ax-alert-middle-block-start .ax-alert-title{display:flex;flex-direction:column;flex:1}ax-alert .ax-alert-middle-block-start .ax-alert-title .ax-title{font-size:.875rem;line-height:1.25rem;font-weight:500}ax-alert .ax-alert-middle-block-end{display:flex;flex-direction:column;gap:1rem}ax-alert .ax-alert-middle-block-end.ax-title-gap{margin-top:.5rem}ax-alert .ax-alert-middle-block-end.ax-hidden{display:none!important}ax-alert .ax-alert-middle-block-end ax-content{display:block}ax-alert .ax-alert-middle-block-end ax-footer{background-color:transparent}ax-alert .ax-alert-progress{width:0px;height:.25rem;position:absolute;inset-inline-start:0px;bottom:0;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar}@keyframes progressBar{0%{width:100%}to{width:0%}}ax-alert.ax-primary-default{background-color:rgb(var(--ax-color-primary-50));border-color:rgb(var(--ax-color-primary-500))}ax-alert.ax-primary-default ax-title{color:rgb(var(--ax-color-primary-900))}ax-alert.ax-primary-default ax-content{color:rgb(var(--ax-color-primary-800))}ax-alert.ax-primary-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-primary-800))}ax-alert.ax-primary-default .ax-alert-progress{background-color:rgb(var(--ax-color-primary-800))}ax-alert.ax-secondary-default{background-color:rgb(var(--ax-color-secondary-50));border-color:rgb(var(--ax-color-secondary-500))}ax-alert.ax-secondary-default ax-title{color:rgb(var(--ax-color-secondary-900))}ax-alert.ax-secondary-default ax-content{color:rgb(var(--ax-color-secondary-800))}ax-alert.ax-secondary-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-secondary-800))}ax-alert.ax-secondary-default .ax-alert-progress{background-color:rgb(var(--ax-color-secondary-800))}ax-alert.ax-success-default{background-color:rgb(var(--ax-color-success-50));border-color:rgb(var(--ax-color-success-500))}ax-alert.ax-success-default ax-title{color:rgb(var(--ax-color-success-900))}ax-alert.ax-success-default ax-content{color:rgb(var(--ax-color-success-800))}ax-alert.ax-success-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-success-800))}ax-alert.ax-success-default .ax-alert-progress{background-color:rgb(var(--ax-color-success-800))}ax-alert.ax-warning-default{background-color:rgb(var(--ax-color-warning-50));border-color:rgb(var(--ax-color-warning-500))}ax-alert.ax-warning-default ax-title{color:rgb(var(--ax-color-warning-900))}ax-alert.ax-warning-default ax-content{color:rgb(var(--ax-color-warning-800))}ax-alert.ax-warning-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-warning-800))}ax-alert.ax-warning-default .ax-alert-progress{background-color:rgb(var(--ax-color-warning-800))}ax-alert.ax-danger-default{background-color:rgb(var(--ax-color-danger-50));border-color:rgb(var(--ax-color-danger-500))}ax-alert.ax-danger-default ax-title{color:rgb(var(--ax-color-danger-900))}ax-alert.ax-danger-default ax-content{color:rgb(var(--ax-color-danger-800))}ax-alert.ax-danger-default .ax-alert-inline-start>ax-icon{color:rgb(var(--ax-color-danger-800))}ax-alert.ax-danger-default .ax-alert-progress{background-color:rgb(var(--ax-color-danger-800))}\n"] }]
|
157
158
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { _icon: [{
|
158
159
|
type: ContentChild,
|
159
160
|
args: [AXDecoratorIconComponent]
|
@@ -203,4 +204,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
203
204
|
|
204
205
|
export { AXAlertComponent, AXAlertModule, AXBaseAlertMixin };
|
205
206
|
//# sourceMappingURL=acorex-components-alert.mjs.map
|
206
|
-
//# sourceMappingURL=acorex-components-alert.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-alert.mjs","sources":["../../../../projects/acorex/components/alert/src/alert.component.ts","../../../../projects/acorex/components/alert/src/alert.component.html","../../../../projects/acorex/components/alert/src/alert.module.ts","../../../../projects/acorex/components/alert/acorex-components-alert.ts"],"sourcesContent":["import { AXButtonComponent } from '@acorex/components/button';\r\nimport { AXDecoratorContentComponent, AXDecoratorFooterComponent, AXDecoratorIconComponent, AXDecoratorTitleComponent } from '@acorex/components/decorators';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n HostBinding,\r\n ContentChild,\r\n EventEmitter,\r\n Output,\r\n QueryList,\r\n ContentChildren,\r\n} from '@angular/core';\r\nimport { startWith } from 'rxjs/operators';\r\nimport { AXClosbaleComponent, AXEvent } from '@acorex/components/common';\r\nimport {\r\n AXBaseComponent,\r\n AXComponentOptionChanged,\r\n _ColorLookComponentMixin,\r\n} from '@acorex/components/mixin';\r\n\r\nexport const AXBaseAlertMixin = _ColorLookComponentMixin(AXBaseComponent);\r\n\r\n/**\r\n * Regular description\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-alert',\r\n templateUrl: './alert.component.html',\r\n styleUrls: ['./alert.component.scss'],\r\n inputs: ['color'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }]\r\n})\r\nexport class AXAlertComponent extends AXBaseAlertMixin {\r\n\r\n @ContentChild(AXDecoratorIconComponent)\r\n private _icon!: AXDecoratorIconComponent;\r\n\r\n @ContentChildren(AXButtonComponent, { descendants: true })\r\n private _buttons!: QueryList<AXButtonComponent>;\r\n\r\n\r\n @ContentChild(AXDecoratorTitleComponent)\r\n protected _title!: AXButtonComponent;\r\n @ContentChild(AXDecoratorContentComponent)\r\n protected _content!: AXButtonComponent;\r\n\r\n @ContentChild(AXDecoratorFooterComponent)\r\n protected _footer!: AXButtonComponent;\r\n\r\n protected _showInline: boolean = false;\r\n\r\n\r\n @Output()\r\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\r\n\r\n\r\n private _customIcon: string;\r\n private _timeOutRef: number;\r\n\r\n /**\r\n * @ignore\r\n */\r\n @HostBinding('class')\r\n get __hostClass(): string {\r\n const _class = this.look\r\n ? `ax-${this.color}-${this.look}`\r\n : `ax-${this.color}-default`;\r\n return `ax-alert ax-none ${_class}`;\r\n }\r\n\r\n\r\n private _timeOut: number;\r\n @Input()\r\n public get timeOut(): number {\r\n return this._timeOut;\r\n }\r\n public set timeOut(v: number) {\r\n if (v != this._timeOut) {\r\n clearTimeout(this._timeOutRef);\r\n this._timeOut = v;\r\n if (v) {\r\n this._timeOutRef = window.setTimeout(() => {\r\n this.close();\r\n }, this.timeOut);\r\n }\r\n }\r\n }\r\n\r\n private _observer: MutationObserver;\r\n\r\n protected _visible: boolean;\r\n /**\r\n * set the visibility of the Alert\r\n */\r\n @Input()\r\n public get visible(): boolean {\r\n return this._visible;\r\n }\r\n public set visible(v: boolean) {\r\n if (this._visible != v) {\r\n this._visible = v;\r\n const host = this._getHostElement();\r\n if (v) {\r\n host.classList.remove('ax-state-hidden');\r\n host.classList.add('ax-state-visible');\r\n } else {\r\n host.classList.add('ax-state-hidden');\r\n host.classList.toggle('ax-state-visible');\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n elementRef: ElementRef,\r\n cdr: ChangeDetectorRef\r\n ) {\r\n super(elementRef, cdr);\r\n //\r\n const config = { attributes: false, childList: true, subtree: true };\r\n\r\n const callback = (mutationList, observer) => {\r\n for (const mutation of mutationList) {\r\n if (mutation.type === 'childList') {\r\n this._setIcon();\r\n this._applyButtonStyle();\r\n this._showInline = (this._content != null ) || (this._footer != null);\r\n this._cdr.markForCheck();\r\n }\r\n }\r\n };\r\n\r\n // Create an observer instance linked to the callback function\r\n this._observer = new MutationObserver(callback);\r\n\r\n // Start observing the target node for configured mutations\r\n this._observer.observe(this._getHostElement(), config);\r\n }\r\n\r\n\r\n onViewInit() {\r\n if (this.visible == undefined) {\r\n this.visible = true;\r\n }\r\n //\r\n this._customIcon = this._icon?.icon;\r\n this._showInline = this._content != null || this._footer != null;\r\n }\r\n\r\n override _onOptionChanged(option: AXComponentOptionChanged) {\r\n this._setIcon();\r\n this._applyButtonStyle();\r\n }\r\n\r\n private _setIcon() {\r\n if (!this._icon) return;\r\n switch (this.color) {\r\n case 'success':\r\n this._icon.icon = 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n case 'danger':\r\n this._icon.icon = 'ax-icon ax-icon-error-fill';\r\n break;\r\n case 'warning':\r\n this._icon.icon = 'ax-icon ax-icon-warning-fill';\r\n break;\r\n default:\r\n this._icon.icon = this._customIcon || 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n }\r\n }\r\n\r\n\r\n private _applyButtonStyle() {\r\n this._buttons?.forEach((c: any) => {\r\n c.color = this.color;\r\n c._getHostElement().classList.add('ax-sm');\r\n c.look = !c.look || c.look == 'default' ? 'default' : 'blank';\r\n });\r\n }\r\n\r\n /**\r\n * Remove the alert from the container\r\n */\r\n close(): void {\r\n const host = this._getHostElement();\r\n this.visible = false;\r\n const func = () => {\r\n host.parentElement?.removeChild(host);\r\n this.onClosed.emit({\r\n component: this,\r\n });\r\n host.removeEventListener('transitionend', func);\r\n };\r\n host.addEventListener('transitionend', func);\r\n }\r\n\r\n /**\r\n * Hide the alert\r\n */\r\n hide(): void {\r\n this.visible = false;\r\n }\r\n\r\n /**\r\n * Show the alert\r\n */\r\n show() {\r\n this.visible = true;\r\n }\r\n\r\n\r\n onDestroy(): void {\r\n this._observer?.disconnect();\r\n }\r\n\r\n\r\n\r\n}\r\n","<div class=\"ax-alert-inline-start\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-icon\"></ng-content>\r\n</div>\r\n<div class=\"ax-alert-inline-middle\">\r\n <div class=\"ax-alert-middle-block-start\">\r\n <div class=\"ax-alert-title\" >\r\n <ng-content select=\"ax-title\"></ng-content>\r\n </div>\r\n </div>\r\n <div class=\"ax-alert-middle-block-end\" [class.ax-hidden]=\"!_showInline\" [class.ax-title-gap]=\"_title\" >\r\n <ng-content select=\"ax-content\">\r\n </ng-content>\r\n <ng-content select=\"ax-footer\">\r\n </ng-content>\r\n </div>\r\n</div>\r\n<div class=\"ax-alert-inline-end\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-button\"></ng-content>\r\n <ng-content select=\"ax-close-button\"></ng-content>\r\n</div>\r\n<div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut\" *ngIf=\"timeOut\">\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXAlertComponent } from './alert.component';\r\n\r\nconst COMPONENT = [AXAlertComponent];\r\nconst MODULES = [CommonModule, AXDecoratorModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXAlertModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAwBa,gBAAgB,GAAG,wBAAwB,CAAC,eAAe,EAAE;AAE1E;;;;AAIG;AAUG,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;AAgFpD;;AAEG;IACH,WACE,CAAA,UAAsB,EACtB,GAAsB,EAAA;AAEtB,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAtEf,IAAW,CAAA,WAAA,GAAY,KAAK,CAAC;AAIvC,QAAA,IAAA,CAAA,QAAQ,GAA0B,IAAI,YAAY,EAAW,CAAC;;AAoE5D,QAAA,MAAM,MAAM,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAErE,QAAA,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,QAAQ,KAAI;AAC1C,YAAA,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE;AACnC,gBAAA,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW,EAAE;oBACjC,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAChB,IAAI,CAAC,iBAAiB,EAAE,CAAC;AACzB,oBAAA,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,MAAO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C,MAAM,OAAO,GAAG,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;MAQrC,aAAa,CAAA;;0GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBATP,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAClB,YAAY,EAAE,iBAAiB,aAD7B,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAStB,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAJX,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIT,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,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,CAAA;;;ACbD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-alert.mjs","sources":["../../../../projects/acorex/components/alert/src/alert.component.ts","../../../../projects/acorex/components/alert/src/alert.component.html","../../../../projects/acorex/components/alert/src/alert.module.ts","../../../../projects/acorex/components/alert/acorex-components-alert.ts"],"sourcesContent":["import { AXButtonComponent } from '@acorex/components/button';\r\nimport {\r\n AXDecoratorContentComponent,\r\n AXDecoratorFooterComponent,\r\n AXDecoratorIconComponent,\r\n AXDecoratorTitleComponent,\r\n} from '@acorex/components/decorators';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n HostBinding,\r\n ContentChild,\r\n EventEmitter,\r\n Output,\r\n QueryList,\r\n ContentChildren,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport { startWith } from 'rxjs/operators';\r\nimport { AXClosbaleComponent, AXEvent } from '@acorex/components/common';\r\nimport {\r\n AXBaseComponent,\r\n AXComponentOptionChanged,\r\n _ColorLookComponentMixin,\r\n} from '@acorex/components/mixin';\r\n\r\nexport const AXBaseAlertMixin = _ColorLookComponentMixin(AXBaseComponent);\r\n\r\n/**\r\n * Regular description\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-alert',\r\n templateUrl: './alert.component.html',\r\n styleUrls: ['./alert.component.scss'],\r\n inputs: ['color'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }],\r\n})\r\nexport class AXAlertComponent extends AXBaseAlertMixin {\r\n @ContentChild(AXDecoratorIconComponent)\r\n private _icon!: AXDecoratorIconComponent;\r\n\r\n @ContentChildren(AXButtonComponent, { descendants: true })\r\n private _buttons!: QueryList<AXButtonComponent>;\r\n\r\n @ContentChild(AXDecoratorTitleComponent)\r\n protected _title!: AXButtonComponent;\r\n @ContentChild(AXDecoratorContentComponent)\r\n protected _content!: AXButtonComponent;\r\n\r\n @ContentChild(AXDecoratorFooterComponent)\r\n protected _footer!: AXButtonComponent;\r\n\r\n protected _showInline: boolean = false;\r\n\r\n @Output()\r\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\r\n\r\n private _customIcon: string;\r\n private _timeOutRef: number;\r\n\r\n /**\r\n * @ignore\r\n */\r\n @HostBinding('class')\r\n get __hostClass(): string {\r\n const _class = this.look\r\n ? `ax-${this.color}-${this.look}`\r\n : `ax-${this.color}-default`;\r\n return `ax-alert ax-none ${_class}`;\r\n }\r\n\r\n private _timeOut: number;\r\n @Input()\r\n public get timeOut(): number {\r\n return this._timeOut;\r\n }\r\n public set timeOut(v: number) {\r\n if (v != this._timeOut) {\r\n clearTimeout(this._timeOutRef);\r\n this._timeOut = v;\r\n if (v) {\r\n this._timeOutRef = window.setTimeout(() => {\r\n this.close();\r\n }, this.timeOut);\r\n }\r\n }\r\n }\r\n\r\n private _observer: MutationObserver;\r\n\r\n protected _visible: boolean;\r\n /**\r\n * set the visibility of the Alert\r\n */\r\n @Input()\r\n public get visible(): boolean {\r\n return this._visible;\r\n }\r\n public set visible(v: boolean) {\r\n if (this._visible != v) {\r\n this._visible = v;\r\n const host = this._getHostElement();\r\n if (v) {\r\n host.classList.remove('ax-state-hidden');\r\n host.classList.add('ax-state-visible');\r\n } else {\r\n host.classList.add('ax-state-hidden');\r\n host.classList.toggle('ax-state-visible');\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n //\r\n const config = { attributes: false, childList: true, subtree: true };\r\n\r\n const callback = (mutationList, observer) => {\r\n for (const mutation of mutationList) {\r\n if (mutation.type === 'childList') {\r\n this._setIcon();\r\n this._applyButtonStyle();\r\n this._showInline = this._content != null || this._footer != null;\r\n this._cdr.markForCheck();\r\n }\r\n }\r\n };\r\n\r\n // Create an observer instance linked to the callback function\r\n this._observer = new MutationObserver(callback);\r\n\r\n // Start observing the target node for configured mutations\r\n this._observer.observe(this._getHostElement(), config);\r\n }\r\n\r\n onViewInit() {\r\n if (this.visible == undefined) {\r\n this.visible = true;\r\n }\r\n //\r\n this._customIcon = this._icon?.icon;\r\n this._showInline = this._content != null || this._footer != null;\r\n }\r\n\r\n override _onOptionChanged(option: AXComponentOptionChanged) {\r\n this._setIcon();\r\n this._applyButtonStyle();\r\n }\r\n\r\n private _setIcon() {\r\n if (!this._icon || this._icon._getInnerElement()) return;\r\n\r\n switch (this.color) {\r\n case 'success':\r\n this._icon.icon = 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n case 'danger':\r\n this._icon.icon = 'ax-icon ax-icon-error-fill';\r\n break;\r\n case 'warning':\r\n this._icon.icon = 'ax-icon ax-icon-warning-fill';\r\n break;\r\n default:\r\n this._icon.icon =\r\n this._customIcon || 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n }\r\n }\r\n\r\n private _applyButtonStyle() {\r\n this._buttons?.forEach((c: any) => {\r\n c.color = this.color;\r\n c._getHostElement().classList.add('ax-sm');\r\n c.look = !c.look || c.look == 'default' ? 'default' : 'blank';\r\n });\r\n }\r\n\r\n /**\r\n * Remove the alert from the container\r\n */\r\n close(): void {\r\n const host = this._getHostElement();\r\n this.visible = false;\r\n const func = () => {\r\n host.parentElement?.removeChild(host);\r\n this.onClosed.emit({\r\n component: this,\r\n });\r\n host.removeEventListener('transitionend', func);\r\n };\r\n host.addEventListener('transitionend', func);\r\n }\r\n\r\n /**\r\n * Hide the alert\r\n */\r\n hide(): void {\r\n this.visible = false;\r\n }\r\n\r\n /**\r\n * Show the alert\r\n */\r\n show() {\r\n this.visible = true;\r\n }\r\n\r\n onDestroy(): void {\r\n this._observer?.disconnect();\r\n }\r\n}\r\n","<div class=\"ax-alert-inline-start\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-icon\"></ng-content>\r\n</div>\r\n<div class=\"ax-alert-inline-middle\">\r\n <div class=\"ax-alert-middle-block-start\">\r\n <div class=\"ax-alert-title\">\r\n <ng-content select=\"ax-title\"></ng-content>\r\n </div>\r\n </div>\r\n <div\r\n class=\"ax-alert-middle-block-end\"\r\n [class.ax-hidden]=\"!_showInline\"\r\n [class.ax-title-gap]=\"_title\">\r\n <ng-content select=\"ax-content\"> </ng-content>\r\n <ng-content select=\"ax-footer\"> </ng-content>\r\n </div>\r\n</div>\r\n<div class=\"ax-alert-inline-end\" [class.!ax-items-start]=\"_showInline\">\r\n <ng-content select=\"ax-button\"></ng-content>\r\n <ng-content select=\"ax-close-button\"></ng-content>\r\n</div>\r\n<div\r\n class=\"ax-alert-progress\"\r\n [style.animation-duration.ms]=\"timeOut\"\r\n *ngIf=\"timeOut\"></div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXAlertComponent } from './alert.component';\r\n\r\nconst COMPONENT = [AXAlertComponent];\r\nconst MODULES = [CommonModule, AXDecoratorModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXAlertModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MA8Ba,gBAAgB,GAAG,wBAAwB,CAAC,eAAe,EAAE;AAE1E;;;;AAIG;AAUG,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;AA2EpD;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAhEf,IAAW,CAAA,WAAA,GAAY,KAAK,CAAC;AAGvC,QAAA,IAAA,CAAA,QAAQ,GAA0B,IAAI,YAAY,EAAW,CAAC;;AA+D5D,QAAA,MAAM,MAAM,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAErE,QAAA,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,QAAQ,KAAI;AAC1C,YAAA,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE;AACnC,gBAAA,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW,EAAE;oBACjC,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAChB,IAAI,CAAC,iBAAiB,EAAE,CAAC;AACzB,oBAA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,KAAK;gBAuBK,OAAO,EAAA,CAAA;sBADjB,KAAK;;;AElGR,MAAM,SAAS,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACrC,MAAM,OAAO,GAAG,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;MAQrC,aAAa,CAAA;;0GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBATP,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAClB,YAAY,EAAE,iBAAiB,aAD7B,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAStB,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAJX,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIT,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,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,CAAA;;;ACbD;;AAEG;;;;"}
|
@@ -265,3 +265,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
265
265
|
|
266
266
|
export { AXBaseButtonGroupMixin, AXBaseItemButtonMixin, AXButtonComponent, AXButtonGroupComponent, AXButtonItemComponent, AXButtonModule };
|
267
267
|
//# sourceMappingURL=acorex-components-button.mjs.map
|
268
|
+
//# sourceMappingURL=acorex-components-button.mjs.map
|
@@ -527,3 +527,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
527
527
|
|
528
528
|
export { AXCalendarBaseComponent, AXCalendarComponent, AXCalendarComponentMixin, AXCalendarModule, AXCalendarNavigateEvent, CALENDAR_INPUTS, CALENDAR_OUTPUTS };
|
529
529
|
//# sourceMappingURL=acorex-components-calendar.mjs.map
|
530
|
+
//# sourceMappingURL=acorex-components-calendar.mjs.map
|
@@ -292,3 +292,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
292
292
|
|
293
293
|
export { AXBaseDatePickerMixin, AXDatePickerComponent, AXDatepickerModule };
|
294
294
|
//# sourceMappingURL=acorex-components-date-picker.mjs.map
|
295
|
+
//# sourceMappingURL=acorex-components-date-picker.mjs.map
|