@acorex/components 19.9.0 → 19.10.0-next.0
Sign up to get free protection for your applications and to get access to all the features.
- package/action-sheet/lib/action-sheet.class.d.ts +1 -2
- package/avatar/lib/avatar.component.d.ts +3 -2
- package/badge/lib/badge.component.d.ts +2 -2
- package/button/lib/button.component.d.ts +1 -6
- package/button-group/lib/button-group-item.component.d.ts +3 -1
- package/button-group/lib/button-group.component.d.ts +1 -0
- package/button-group/lib/button-group.module.d.ts +2 -1
- package/chips/lib/chips.component.d.ts +11 -7
- package/color-box/lib/color-box.component.d.ts +5 -1
- package/color-palette/lib/color-palette-picker.component.d.ts +19 -14
- package/color-palette/lib/color-palette.module.d.ts +2 -1
- package/common/lib/classes/styles.class.d.ts +6 -4
- package/common/lib/components/button-base-component.class.d.ts +0 -1
- package/datetime-picker/lib/datetime-picker.component.d.ts +0 -10
- package/datetime-picker/lib/datetime-picker.module.d.ts +2 -1
- package/decorators/index.d.ts +6 -4
- package/decorators/lib/components/color-indicator/color-indicator.component.d.ts +6 -0
- package/decorators/lib/components/generic-content.component.d.ts +1 -1
- package/decorators/lib/components/heading/heading.component.d.ts +11 -0
- package/decorators/lib/decorators.module.d.ts +8 -6
- package/dialog/lib/dialog.component.d.ts +2 -0
- package/dropdown-button/lib/dropdown-button.component.d.ts +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +3 -3
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +3 -3
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +4 -4
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +5 -4
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +5 -5
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +2 -2
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +2 -2
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +169 -156
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +19 -22
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +4 -4
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +2 -2
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +11 -9
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +6 -6
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +2 -2
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +11 -4
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +344 -326
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +10 -10
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +21 -6
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +14 -14
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +2 -2
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +26 -28
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +4 -4
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +2 -3
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +2 -2
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +17 -23
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +50 -21
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +10 -3
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +5 -5
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +6 -12
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +3 -3
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-file-explorer.mjs +4 -4
- package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +10 -3
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +2 -2
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +42 -57
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +2 -2
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +2 -2
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-kbd.mjs +56 -0
- package/fesm2022/acorex-components-kbd.mjs.map +1 -0
- package/fesm2022/acorex-components-label.mjs +2 -2
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +2 -2
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +2 -2
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +4 -4
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +5 -5
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +6 -6
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-navbar.mjs +3 -3
- package/fesm2022/acorex-components-navbar.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +4 -4
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +2 -6
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +2 -2
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +10 -10
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +4 -4
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +2 -2
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +128 -233
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +2 -2
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +22 -22
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-rail-navigation.mjs +3 -3
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +3 -3
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +6 -6
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +2 -2
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +2 -2
- package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +11 -11
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +19 -10
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +3 -2
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +2 -2
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +8 -17
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +2 -2
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
- package/fesm2022/acorex-components-slider.mjs +2 -2
- package/fesm2022/acorex-components-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-sliding-item.mjs +153 -0
- package/fesm2022/acorex-components-sliding-item.mjs.map +1 -0
- package/fesm2022/acorex-components-step-wizard.mjs +2 -2
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +8 -3
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +5 -5
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +3 -3
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +6 -3
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +2 -2
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +7 -7
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +4 -4
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-toolbar.mjs +3 -12
- package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +2 -2
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +2 -2
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +6 -6
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +25 -25
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/form/lib/form.component.d.ts +3 -2
- package/image-editor/index.d.ts +0 -1
- package/image-editor/lib/image-editor-container/image-editor-container.component.d.ts +22 -3
- package/image-editor/lib/image-editor.module.d.ts +16 -17
- package/kbd/README.md +3 -0
- package/kbd/index.d.ts +3 -0
- package/kbd/lib/kbd-item/kbd-item.component.d.ts +7 -0
- package/kbd/lib/kbd.component.d.ts +7 -0
- package/kbd/lib/kbd.module.d.ts +9 -0
- package/loading/lib/loading-spinner.component.d.ts +1 -1
- package/menu/lib/menu-item.component.d.ts +2 -1
- package/notification/lib/notification.service.d.ts +1 -1
- package/package.json +9 -1
- package/paint/lib/paint/paint-view/paint-view.component.d.ts +1 -1
- package/picker/index.d.ts +3 -2
- package/picker/lib/picker-container/picker-container.component.d.ts +7 -0
- package/picker/lib/picker-items/picker-items.component.d.ts +20 -0
- package/picker/lib/picker-title/picker-title.component.d.ts +5 -0
- package/picker/lib/picker.module.d.ts +6 -4
- package/progress-bar/lib/progress-bar.component.d.ts +19 -19
- package/range-slider/lib/range-slider.component.d.ts +1 -1
- package/scheduler/lib/scheduler-month-view.component.d.ts +6 -6
- package/search-box/lib/search-box.component.d.ts +5 -1
- package/side-menu/lib/side-menu-item/side-menu-item.component.d.ts +3 -6
- package/side-menu/lib/side-menu.component.d.ts +1 -2
- package/sliding-item/README.md +3 -0
- package/sliding-item/index.d.ts +4 -0
- package/sliding-item/lib/sliding-item/sliding-item.component.d.ts +13 -0
- package/sliding-item/lib/sliding-item-prefix/sliding-item-prefix.component.d.ts +11 -0
- package/sliding-item/lib/sliding-item-suffix/sliding-item-suffix.component.d.ts +11 -0
- package/sliding-item/lib/sliding-item.module.d.ts +11 -0
- package/tabs/lib/tabs.class.d.ts +1 -1
- package/text-area/lib/text-area.component.d.ts +5 -1
- package/time-line/lib/time-line.component.d.ts +1 -1
- package/toast/lib/toast.service.d.ts +1 -1
- package/toolbar/lib/toolbar.component.d.ts +1 -3
- package/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.d.ts +2 -2
- package/image-editor/lib/image-editor-toolbar/image-editor-toolbar.component.d.ts +0 -27
- package/picker/lib/picker-column.directive.d.ts +0 -16
- package/picker/lib/picker.component.d.ts +0 -61
- /package/decorators/lib/components/{clear-button.component.d.ts → clear-button/clear-button.component.d.ts} +0 -0
- /package/decorators/lib/components/{close-button.component.d.ts → close-button/close-button.component.d.ts} +0 -0
- /package/decorators/lib/components/{full-screen-button.component.d.ts → full-screen/full-screen-button.component.d.ts} +0 -0
- /package/decorators/lib/components/{icon.component.d.ts → icon/icon.component.d.ts} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../libs/components/action-sheet/src/lib/action-sheet.service.ts","../../../../libs/components/action-sheet/src/lib/action-sheet.component.ts","../../../../libs/components/action-sheet/src/lib/action-sheet.component.html","../../../../libs/components/action-sheet/src/lib/action-sheet.module.ts","../../../../libs/components/action-sheet/src/acorex-components-action-sheet.ts"],"sourcesContent":["import { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy } from '@angular/cdk/overlay';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { AXActionSheetConfig, AXActionSheetEvent } from './action-sheet.class';\nimport { AXActionSheetComponent } from './action-sheet.component';\n\nexport interface AXActionSheetDialogRef {\n close: (e?) => void;\n closed: Subject<any>;\n}\n\n@Injectable()\nexport class AXActionSheetService {\n private dialog: Dialog = inject(Dialog);\n private readonly actionSheetEvent = new Subject<AXActionSheetEvent>();\n actionSheetEvent$ = this.actionSheetEvent.asObservable();\n\n open(config: AXActionSheetConfig, isUserInteraction = true): Promise<AXActionSheetDialogRef> {\n const defaultConfig: AXActionSheetConfig = {\n title: 'action-sheet.title',\n closeButton: true,\n closeOnBackdropClick: true,\n header: true,\n };\n config = Object.assign(defaultConfig, config);\n\n const dialogRef = this.dialog.open(AXActionSheetComponent, {\n data: config,\n autoFocus: 'first-tabbable',\n restoreFocus: true,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: true,\n panelClass: ['ax-actionsheet-panel'],\n disableClose: true,\n positionStrategy: new GlobalPositionStrategy().centerHorizontally().bottom(),\n });\n\n this.actionSheetEvent.next({\n dialogRef,\n data: { state: 'open' },\n isUserInteraction,\n });\n\n if (config.closeOnBackdropClick) {\n dialogRef.backdropClick.subscribe(() => {\n const componentInstance = dialogRef.componentInstance;\n if (componentInstance) {\n componentInstance.close();\n }\n });\n }\n const promise = new Promise<AXActionSheetDialogRef>((resolve) => {\n const closed = new BehaviorSubject<any>(null);\n const axDialogRef: AXActionSheetDialogRef = {\n close: (e) => {\n dialogRef.close(e);\n },\n closed,\n };\n dialogRef.closed.subscribe((c: any) => {\n if (c?.data) {\n closed.next({ data: c.data });\n } else {\n closed.next({});\n }\n });\n if (resolve) {\n resolve(axDialogRef);\n }\n });\n return promise;\n }\n\n setActionSheetEventState(event: AXActionSheetEvent) {\n this.actionSheetEvent.next(event);\n }\n}\n","import {\n AXClosbaleComponent,\n AXComponentCloseEvent,\n AXFocusableComponent,\n MXBaseComponent,\n} from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { CdkPortalOutletAttachedRef, ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n HostListener,\n inject,\n Inject,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n signal,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXActionSheetConfig, AXActionSheetItem } from './action-sheet.class';\nimport { AXActionSheetService } from './action-sheet.service';\n\n/**\n * A component for displaying an action sheet, which is a menu that slides up from the bottom of the screen.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-action-sheet',\n templateUrl: './action-sheet.component.html',\n styleUrls: ['./action-sheet.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXClosbaleComponent,\n useExisting: AXActionSheetComponent,\n },\n {\n provide: AXFocusableComponent,\n useExisting: AXActionSheetComponent,\n },\n ],\n standalone: false,\n})\nexport class AXActionSheetComponent extends MXBaseComponent implements OnInit, OnDestroy {\n private document = inject(DOCUMENT);\n private platformID = inject(PLATFORM_ID);\n private renderer = inject(Renderer2);\n private actionSheetService = inject(AXActionSheetService);\n\n private onMouseMoveListenerFn = () => undefined;\n private onMouseUpListenerFn = () => undefined;\n private onTouchMoveListenerFn = () => undefined;\n private onTouchUpListenerFn = () => undefined;\n\n private isDragging = signal(false);\n private curserOffset = signal(0);\n private actionSheetHeight = signal(0);\n private isActionSheetHeightSet = signal(false);\n private transitionDuration = signal(300);\n\n /**\n * @ignore\n */\n protected _selectedPortal: Portal<any>;\n\n /**\n * @ignore\n */\n private _componentRef: unknown;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n protected data: AXActionSheetConfig,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n /**\n * @ignore\n */\n override ngOnInit(): void {\n super.ngOnInit();\n if (this.data.content) {\n if (this.data.content instanceof TemplateRef) {\n this._selectedPortal = new TemplatePortal(this.data.content, this.getViewContainer(), {\n $implicit: this.data,\n ref: this,\n });\n this.cdr.markForCheck();\n } else if (typeof this.data.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.data.content);\n this.cdr.markForCheck();\n }\n }\n if (isPlatformBrowser(this.platformID) && this.data.draggable) {\n this.onMouseMoveListenerFn = this.renderer.listen(this.document, 'mousemove', (e) => {\n if (this.isDragging()) {\n e.preventDefault();\n this.getHostElement().style.height = `${this.heightCalculator(e.clientY) + this.curserOffset()}px`;\n }\n });\n this.onTouchMoveListenerFn = this.renderer.listen(this.document, 'touchmove', (e) => {\n if (this.isDragging()) {\n e.preventDefault();\n this.getHostElement().style.height = `${this.heightCalculator(e.touches[0].clientY) + this.curserOffset()}px`;\n }\n });\n this.onMouseUpListenerFn = this.renderer.listen(this.document, 'mouseup', (e) => {\n if (this.isDragging()) {\n this.isDragging.set(false);\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragEnd' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n this.handleUp();\n }\n });\n this.onTouchUpListenerFn = this.renderer.listen(this.document, 'touchend', (e) => {\n if (this.isDragging()) {\n this.isDragging.set(false);\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragEnd' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n this.handleUp();\n }\n });\n }\n }\n\n ngOnDestroy(): void {\n this.onMouseMoveListenerFn();\n this.onMouseUpListenerFn();\n this.onTouchMoveListenerFn();\n this.onTouchUpListenerFn();\n }\n\n protected handleMouseDown(e: MouseEvent) {\n if (!this.data.draggable || e.button !== 0) return;\n e.preventDefault();\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragStart' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n this.handleDown(e.clientY);\n }\n\n protected handleTouchDown(e: TouchEvent) {\n if (!this.data.draggable || (e.target as HTMLElement).className.includes('close')) return;\n e.preventDefault();\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragStart' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n this.handleDown(e.touches[0].clientY);\n }\n\n private handleDown(clientY: number) {\n this.isDragging.set(true);\n this.getHostElement().style.transitionDuration = '0ms';\n\n if (isPlatformBrowser(this.platformID)) {\n this.curserOffset.set(\n clientY - (this.document.documentElement.clientHeight - this.getHostElement().clientHeight),\n );\n }\n\n if (!this.isActionSheetHeightSet()) {\n this.actionSheetHeight.set(this.getHostElement().clientHeight);\n this.isActionSheetHeightSet.set(true);\n }\n }\n\n private handleUp() {\n this.getHostElement().style.transitionDuration = `${this.transitionDuration()}ms`;\n this.document.body.parentElement.style.overscrollBehaviorY = 'auto';\n\n if (this.getHostElement().clientHeight < this.actionSheetHeight() / 2) {\n this.close(null);\n return;\n }\n if (\n this.getHostElement().clientHeight >\n (this.document.documentElement.clientHeight + this.actionSheetHeight()) / 2 &&\n this.data.dragUp\n ) {\n this.getHostElement().style.height = '100vh';\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'fullScreen' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n this.document.body.parentElement.style.overscrollBehaviorY = 'contain';\n return;\n }\n this.getHostElement().style.height = this.actionSheetHeight() + 'px';\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'normalSize' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n return;\n }\n\n private heightCalculator(clientY: number): number {\n if (this.data.dragUp) {\n return this.document.documentElement.clientHeight - clientY;\n }\n if (clientY >= this.document.documentElement.clientHeight - this.actionSheetHeight()) {\n return this.document.documentElement.clientHeight - clientY;\n }\n return (\n this.actionSheetHeight() +\n (this.document.documentElement.clientHeight - clientY - this.actionSheetHeight()) / 10\n );\n }\n\n protected handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<any>;\n if (ref.instance) {\n this._componentRef = ref.instance;\n Object.assign(this._componentRef, this.data);\n Object.assign(this._componentRef, { _isPopup: true });\n if (ref.instance.onClosed) {\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\n this.close(e);\n });\n }\n }\n }\n\n onItemClick(item: AXActionSheetItem) {\n this.close(item);\n if (item?.onClick) item.onClick();\n }\n\n close(e = null, isUserInteraction = true) {\n this.getHostElement().style.height = `${this.getHostElement().clientHeight}px`;\n setTimeout(() => {\n this.getHostElement().style.height = '0vh';\n });\n setTimeout(() => {\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'close' },\n isUserInteraction,\n dialogRef: this.dialogRef,\n });\n this.dialogRef.close({\n component: this._componentRef,\n htmlElement: this.getHostElement(),\n data: e,\n });\n }, this.transitionDuration());\n }\n\n /**\n * @ignore\n */\n @HostListener('keydown.escape')\n protected onKeydownHandler() {\n const focusedOrHasFocused = this.getHostElement().matches(':focus-within');\n if (this.data.closeButton && focusedOrHasFocused) {\n this.close(null);\n }\n }\n}\n","@if (data.draggable) {\n <div\n (mousedown)=\"handleMouseDown($event)\"\n (touchstart)=\"handleTouchDown($event)\"\n class=\"ax-drag-handle-container\"\n >\n <div class=\"ax-drag-handle\"></div>\n </div>\n}\n@if (data.header) {\n <ax-header\n [class.draggable-header]=\"data.draggable\"\n (mousedown)=\"data.draggable ? handleMouseDown($event) : null\"\n (touchstart)=\"data.draggable ? handleTouchDown($event) : null\"\n >\n <ax-prefix>\n <ax-title>{{ data.title | translate | async }}</ax-title>\n\n @if (data.subTitle) {\n <ax-sub-title>\n {{ data.subTitle }}\n </ax-sub-title>\n }\n </ax-prefix>\n @if (data.closeButton) {\n <ax-suffix>\n <ax-close-button></ax-close-button>\n </ax-suffix>\n }\n </ax-header>\n}\n@if (this.data.content) {\n <div class=\"ax-custom-template-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"handleAttched($event)\"></ng-template>\n </div>\n}\n\n<div class=\"ax-action-list ax-action-list-vertical\">\n @for (item of data.items; let i = $index; track i) {\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <div\n class=\"ax-action-item ax-el-interactive ax-el-{{ item.color }}-blank\"\n [class.ax-state-disabled]=\"item.disabled\"\n [tabindex]=\"i\"\n (click)=\"onItemClick(item)\"\n >\n <div class=\"ax-action-item-prefix\">\n @if (item.icon) {\n <span class=\"ax-item-icon\" [class]=\"item.icon\"></span>\n }\n <ax-text>{{ item.text | translate | async }}</ax-text>\n </div>\n <div class=\"ax-action-item-suffix\"></div>\n </div>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n }\n</div>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { NgModule } from '@angular/core';\n\nimport { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { AsyncPipe } from '@angular/common';\nimport { AXActionSheetComponent } from './action-sheet.component';\nimport { AXActionSheetService } from './action-sheet.service';\n\nconst MODULES = [\n AXCommonModule,\n DragDropModule,\n A11yModule,\n AXButtonModule,\n PortalModule,\n AXDecoratorModule,\n AXTranslationModule,\n DialogModule,\n AsyncPipe,\n];\n\n@NgModule({\n declarations: [AXActionSheetComponent],\n imports: [...MODULES],\n exports: [AXActionSheetComponent],\n providers: [AXActionSheetService],\n})\nexport class AXActionSheetModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAaa,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,MAAM,GAAW,MAAM,CAAC,MAAM,CAAC;AACtB,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAAsB;AACrE,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;AAgEzD;AA9DC,IAAA,IAAI,CAAC,MAA2B,EAAE,iBAAiB,GAAG,IAAI,EAAA;AACxD,QAAA,MAAM,aAAa,GAAwB;AACzC,YAAA,KAAK,EAAE,oBAAoB;AAC3B,YAAA,WAAW,EAAE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A,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,EAFnB,SAAA,EAAA,CAAC,oBAAoB,CAAC,YAfjC,cAAc;YACd,cAAc;YACd,UAAU;YACV,cAAc;YACd,YAAY;YACZ,iBAAiB;YACjB,mBAAmB;YACnB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAUD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;AACtC,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;oBACrB,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,SAAS,EAAE,CAAC,oBAAoB,CAAC;AAClC,iBAAA;;;AC/BD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../libs/components/action-sheet/src/lib/action-sheet.service.ts","../../../../libs/components/action-sheet/src/lib/action-sheet.component.ts","../../../../libs/components/action-sheet/src/lib/action-sheet.component.html","../../../../libs/components/action-sheet/src/lib/action-sheet.module.ts","../../../../libs/components/action-sheet/src/acorex-components-action-sheet.ts"],"sourcesContent":["import { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy } from '@angular/cdk/overlay';\nimport { Injectable, inject } from '@angular/core';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { AXActionSheetConfig, AXActionSheetEvent } from './action-sheet.class';\nimport { AXActionSheetComponent } from './action-sheet.component';\n\nexport interface AXActionSheetDialogRef {\n close: (e?) => void;\n closed: Subject<any>;\n}\n\n@Injectable()\nexport class AXActionSheetService {\n private dialog: Dialog = inject(Dialog);\n private readonly actionSheetEvent = new Subject<AXActionSheetEvent>();\n actionSheetEvent$ = this.actionSheetEvent.asObservable();\n\n open(config: AXActionSheetConfig, isUserInteraction = true): Promise<AXActionSheetDialogRef> {\n const defaultConfig: AXActionSheetConfig = {\n title: 'action-sheet.title',\n closeButton: true,\n closeOnBackdropClick: true,\n header: true,\n };\n config = Object.assign(defaultConfig, config);\n\n const dialogRef = this.dialog.open(AXActionSheetComponent, {\n data: config,\n autoFocus: 'first-tabbable',\n restoreFocus: true,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: true,\n panelClass: ['ax-action-sheet-panel'],\n disableClose: true,\n positionStrategy: new GlobalPositionStrategy().centerHorizontally().bottom(),\n });\n\n this.actionSheetEvent.next({\n dialogRef,\n data: { state: 'open' },\n isUserInteraction,\n });\n\n if (config.closeOnBackdropClick) {\n dialogRef.backdropClick.subscribe(() => {\n const componentInstance = dialogRef.componentInstance;\n if (componentInstance) {\n componentInstance.close();\n }\n });\n }\n const promise = new Promise<AXActionSheetDialogRef>((resolve) => {\n const closed = new BehaviorSubject<any>(null);\n const axDialogRef: AXActionSheetDialogRef = {\n close: (e) => {\n dialogRef.close(e);\n },\n closed,\n };\n dialogRef.closed.subscribe((c: any) => {\n if (c?.data) {\n closed.next({ data: c.data });\n } else {\n closed.next({});\n }\n });\n if (resolve) {\n resolve(axDialogRef);\n }\n });\n return promise;\n }\n\n setActionSheetEventState(event: AXActionSheetEvent) {\n this.actionSheetEvent.next(event);\n }\n}\n","import {\n AXClosbaleComponent,\n AXComponentCloseEvent,\n AXFocusableComponent,\n MXBaseComponent,\n} from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { CdkPortalOutletAttachedRef, ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n HostListener,\n inject,\n Inject,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n signal,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXActionSheetConfig, AXActionSheetItem } from './action-sheet.class';\nimport { AXActionSheetService } from './action-sheet.service';\n\n/**\n * A component for displaying an action sheet, which is a menu that slides up from the bottom of the screen.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-action-sheet',\n templateUrl: './action-sheet.component.html',\n styleUrls: ['./action-sheet.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXClosbaleComponent,\n useExisting: AXActionSheetComponent,\n },\n {\n provide: AXFocusableComponent,\n useExisting: AXActionSheetComponent,\n },\n ],\n standalone: false,\n})\nexport class AXActionSheetComponent extends MXBaseComponent implements OnInit, OnDestroy {\n private document = inject(DOCUMENT);\n private platformID = inject(PLATFORM_ID);\n private renderer = inject(Renderer2);\n private actionSheetService = inject(AXActionSheetService);\n\n private onMouseMoveListenerFn = () => undefined;\n private onMouseUpListenerFn = () => undefined;\n private onTouchMoveListenerFn = () => undefined;\n private onTouchUpListenerFn = () => undefined;\n\n private isDragging = signal(false);\n private curserOffset = signal(0);\n private actionSheetHeight = signal(0);\n private isActionSheetHeightSet = signal(false);\n private transitionDuration = signal(300);\n\n /**\n * @ignore\n */\n protected _selectedPortal: Portal<any>;\n\n /**\n * @ignore\n */\n private _componentRef: unknown;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n protected data: AXActionSheetConfig,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n /**\n * @ignore\n */\n override ngOnInit(): void {\n super.ngOnInit();\n if (this.data.content) {\n if (this.data.content instanceof TemplateRef) {\n this._selectedPortal = new TemplatePortal(this.data.content, this.getViewContainer(), {\n $implicit: this.data,\n ref: this,\n });\n this.cdr.markForCheck();\n } else if (typeof this.data.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.data.content);\n this.cdr.markForCheck();\n }\n }\n if (isPlatformBrowser(this.platformID) && this.data.draggable) {\n this.onMouseMoveListenerFn = this.renderer.listen(this.document, 'mousemove', (e) => {\n if (this.isDragging()) {\n e.preventDefault();\n this.getHostElement().style.height = `${this.heightCalculator(e.clientY) + this.curserOffset()}px`;\n }\n });\n this.onTouchMoveListenerFn = this.renderer.listen(this.document, 'touchmove', (e) => {\n if (this.isDragging()) {\n e.preventDefault();\n this.getHostElement().style.height = `${this.heightCalculator(e.touches[0].clientY) + this.curserOffset()}px`;\n }\n });\n this.onMouseUpListenerFn = this.renderer.listen(this.document, 'mouseup', (e) => {\n if (this.isDragging()) {\n this.isDragging.set(false);\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragEnd' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n this.handleUp();\n }\n });\n this.onTouchUpListenerFn = this.renderer.listen(this.document, 'touchend', (e) => {\n if (this.isDragging()) {\n this.isDragging.set(false);\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragEnd' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n this.handleUp();\n }\n });\n }\n }\n\n ngOnDestroy(): void {\n this.onMouseMoveListenerFn();\n this.onMouseUpListenerFn();\n this.onTouchMoveListenerFn();\n this.onTouchUpListenerFn();\n }\n\n protected handleMouseDown(e: MouseEvent) {\n if (!this.data.draggable || e.button !== 0) return;\n e.preventDefault();\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragStart' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n this.handleDown(e.clientY);\n }\n\n protected handleTouchDown(e: TouchEvent) {\n if (!this.data.draggable || (e.target as HTMLElement).className.includes('close')) return;\n e.preventDefault();\n this.actionSheetService.setActionSheetEventState({\n nativeEvent: e,\n data: { state: 'dragStart' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n this.handleDown(e.touches[0].clientY);\n }\n\n private handleDown(clientY: number) {\n this.isDragging.set(true);\n this.getHostElement().style.transitionDuration = '0ms';\n\n if (isPlatformBrowser(this.platformID)) {\n this.curserOffset.set(\n clientY - (this.document.documentElement.clientHeight - this.getHostElement().clientHeight),\n );\n }\n\n if (!this.isActionSheetHeightSet()) {\n this.actionSheetHeight.set(this.getHostElement().clientHeight);\n this.isActionSheetHeightSet.set(true);\n }\n }\n\n private handleUp() {\n this.getHostElement().style.transitionDuration = `${this.transitionDuration()}ms`;\n this.document.body.parentElement.style.overscrollBehaviorY = 'auto';\n\n if (this.getHostElement().clientHeight < this.actionSheetHeight() / 2) {\n this.close(null);\n return;\n }\n if (\n this.getHostElement().clientHeight >\n (this.document.documentElement.clientHeight + this.actionSheetHeight()) / 2 &&\n this.data.dragUp\n ) {\n this.getHostElement().style.height = '100vh';\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'fullScreen' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n this.document.body.parentElement.style.overscrollBehaviorY = 'contain';\n return;\n }\n this.getHostElement().style.height = this.actionSheetHeight() + 'px';\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'normalSize' },\n isUserInteraction: true,\n dialogRef: this.dialogRef,\n });\n return;\n }\n\n private heightCalculator(clientY: number): number {\n if (this.data.dragUp) {\n return this.document.documentElement.clientHeight - clientY;\n }\n if (clientY >= this.document.documentElement.clientHeight - this.actionSheetHeight()) {\n return this.document.documentElement.clientHeight - clientY;\n }\n return (\n this.actionSheetHeight() +\n (this.document.documentElement.clientHeight - clientY - this.actionSheetHeight()) / 10\n );\n }\n\n protected handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<any>;\n if (ref.instance) {\n this._componentRef = ref.instance;\n Object.assign(this._componentRef, this.data);\n Object.assign(this._componentRef, { _isPopup: true });\n if (ref.instance.onClosed) {\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\n this.close(e);\n });\n }\n }\n }\n\n onItemClick(item: AXActionSheetItem) {\n this.close(item);\n if (item?.onClick) item.onClick();\n }\n\n close(e = null, isUserInteraction = true) {\n this.getHostElement().style.height = `${this.getHostElement().clientHeight}px`;\n setTimeout(() => {\n this.getHostElement().style.height = '0vh';\n });\n setTimeout(() => {\n this.actionSheetService.setActionSheetEventState({\n data: { state: 'close' },\n isUserInteraction,\n dialogRef: this.dialogRef,\n });\n this.dialogRef.close({\n component: this._componentRef,\n htmlElement: this.getHostElement(),\n data: e,\n });\n }, this.transitionDuration());\n }\n\n /**\n * @ignore\n */\n @HostListener('keydown.escape')\n protected onKeydownHandler() {\n const focusedOrHasFocused = this.getHostElement().matches(':focus-within');\n if (this.data.closeButton && focusedOrHasFocused) {\n this.close(null);\n }\n }\n}\n","@if (data.draggable) {\n <div\n (mousedown)=\"handleMouseDown($event)\"\n (touchstart)=\"handleTouchDown($event)\"\n class=\"ax-drag-handle-container\"\n >\n <div class=\"ax-drag-handle\"></div>\n </div>\n}\n@if (data.header) {\n <ax-header\n [class.draggable-header]=\"data.draggable\"\n (mousedown)=\"data.draggable ? handleMouseDown($event) : null\"\n (touchstart)=\"data.draggable ? handleTouchDown($event) : null\"\n >\n <ax-prefix>\n <ax-title>{{ data.title | translate | async }}</ax-title>\n\n @if (data.subTitle) {\n <ax-subtitle>\n {{ data.subTitle }}\n </ax-subtitle>\n }\n </ax-prefix>\n @if (data.closeButton) {\n <ax-suffix>\n <ax-close-button></ax-close-button>\n </ax-suffix>\n }\n </ax-header>\n}\n@if (this.data.content) {\n <div class=\"ax-custom-template-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"handleAttched($event)\"></ng-template>\n </div>\n}\n\n<div class=\"ax-action-list ax-action-list-vertical\">\n @for (item of data.items; let i = $index; track i) {\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <div\n class=\"ax-action-item ax-{{ item.color || 'ghost' }}\"\n [class.ax-state-disabled]=\"item.disabled\"\n [tabindex]=\"i\"\n (click)=\"onItemClick(item)\"\n >\n <div class=\"ax-action-item-prefix\">\n @if (item.icon) {\n <span class=\"ax-item-icon\" [class]=\"item.icon\"></span>\n }\n <ax-text>{{ item.text | translate | async }}</ax-text>\n </div>\n <div class=\"ax-action-item-suffix\"></div>\n </div>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n }\n</div>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { NgModule } from '@angular/core';\n\nimport { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { AsyncPipe } from '@angular/common';\nimport { AXActionSheetComponent } from './action-sheet.component';\nimport { AXActionSheetService } from './action-sheet.service';\n\nconst MODULES = [\n AXCommonModule,\n DragDropModule,\n A11yModule,\n AXButtonModule,\n PortalModule,\n AXDecoratorModule,\n AXTranslationModule,\n DialogModule,\n AsyncPipe,\n];\n\n@NgModule({\n declarations: [AXActionSheetComponent],\n imports: [...MODULES],\n exports: [AXActionSheetComponent],\n providers: [AXActionSheetService],\n})\nexport class AXActionSheetModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAaa,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,MAAM,GAAW,MAAM,CAAC,MAAM,CAAC;AACtB,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAAsB;AACrE,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;AAgEzD;AA9DC,IAAA,IAAI,CAAC,MAA2B,EAAE,iBAAiB,GAAG,IAAI,EAAA;AACxD,QAAA,MAAM,aAAa,GAAwB;AACzC,YAAA,KAAK,EAAE,oBAAoB;AAC3B,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,oBAAoB,EAAE,IAAI;AAC1B,YAAA,MAAM,EAAE,IAAI;SACb;QACD,MAAM,GAAG,MAAM,CAAC,MAAM,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ACd,cAAc;YACd,UAAU;YACV,cAAc;YACd,YAAY;YACZ,iBAAiB;YACjB,mBAAmB;YACnB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAUD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;AACtC,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;oBACrB,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,SAAS,EAAE,CAAC,oBAAoB,CAAC;AAClC,iBAAA;;;AC/BD;;AAEG;;;;"}
|
@@ -127,14 +127,14 @@ class AXAlertComponent extends MXColorComponent {
|
|
127
127
|
* @ignore
|
128
128
|
*/
|
129
129
|
get __hostClass() {
|
130
|
-
return `ax-alert ax-none ax-${this.color}
|
130
|
+
return `ax-alert ax-none ax-${this.color}`;
|
131
131
|
}
|
132
132
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
133
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXAlertComponent, isStandalone: false, selector: "ax-alert", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: false, isRequired: false, transformFunction: null }, timeOut: { classPropertyName: "timeOut", publicName: "timeOut", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { colorChange: "colorChange", onClosed: "onClosed", timeOut: "timeOutChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }], queries: [{ propertyName: "axIcon", first: true, predicate: ["ax-icon"], descendants: true, isSignal: true }, { propertyName: "axTitle", first: true, predicate: ["ax-title"], descendants: true, isSignal: true }, { propertyName: "axContent", first: true, predicate: ["ax-content"], descendants: true, isSignal: true }, { propertyName: "axFooter", first: true, predicate: ["ax-footer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (showInline()) {\n <div class=\"ax-alert-inline\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <div class=\"ax-alert-buttons\">\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container>\n </div>\n} @else {\n <div class=\"ax-alert-block\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-content\">\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n <div><ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container></div>\n </div>\n}\n\n@if (timeOut()) {\n <div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut()\"></div>\n}\n\n<ng-template #buttons>\n <ng-content select=\"ax-button\"> </ng-content>\n</ng-template>\n<ng-template #closeButton>\n <ng-content select=\"ax-close-button\"> </ng-content>\n</ng-template>\n<ng-template #title>\n <ng-content select=\"ax-title\"> </ng-content>\n</ng-template>\n<ng-template #icon>\n <ng-content select=\"ax-icon\"> </ng-content>\n</ng-template>\n<ng-template #content>\n <ng-content select=\"ax-content\"> </ng-content>\n</ng-template>\n<ng-template #footer>\n <ng-content select=\"ax-footer\"> </ng-content>\n</ng-template>\n", styles: ["
|
133
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXAlertComponent, isStandalone: false, selector: "ax-alert", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: false, isRequired: false, transformFunction: null }, timeOut: { classPropertyName: "timeOut", publicName: "timeOut", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { colorChange: "colorChange", onClosed: "onClosed", timeOut: "timeOutChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }], queries: [{ propertyName: "axIcon", first: true, predicate: ["ax-icon"], descendants: true, isSignal: true }, { propertyName: "axTitle", first: true, predicate: ["ax-title"], descendants: true, isSignal: true }, { propertyName: "axContent", first: true, predicate: ["ax-content"], descendants: true, isSignal: true }, { propertyName: "axFooter", first: true, predicate: ["ax-footer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (showInline()) {\n <div class=\"ax-alert-inline\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <div class=\"ax-alert-buttons\">\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container>\n </div>\n} @else {\n <div class=\"ax-alert-block\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-content\">\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n <div><ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container></div>\n </div>\n}\n\n@if (timeOut()) {\n <div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut()\"></div>\n}\n\n<ng-template #buttons>\n <ng-content select=\"ax-button\"> </ng-content>\n</ng-template>\n<ng-template #closeButton>\n <ng-content select=\"ax-close-button\"> </ng-content>\n</ng-template>\n<ng-template #title>\n <ng-content select=\"ax-title\"> </ng-content>\n</ng-template>\n<ng-template #icon>\n <ng-content select=\"ax-icon\"> </ng-content>\n</ng-template>\n<ng-template #content>\n <ng-content select=\"ax-content\"> </ng-content>\n</ng-template>\n<ng-template #footer>\n <ng-content select=\"ax-footer\"> </ng-content>\n</ng-template>\n", styles: ["ax-alert{--ax-comp-alert-bg-color-opacity: .15;--ax-comp-alert-icon-border-radius: 100%;--ax-comp-alert-border-radius: var(--ax-sys-border-radius)}ax-alert{--ax-comp-alert-title-content-text-color: var(--ax-sys-body-text-color)}ax-alert.ax-danger{--ax-comp-alert-bg-color: var(--ax-sys-color-danger-500);--ax-comp-alert-border-color: var(--ax-sys-color-danger-500);--ax-comp-alert-icon-color: var(--ax-sys-color-danger-500);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-danger)}ax-alert.ax-ghost{--ax-comp-alert-bg-color: var(--ax-sys-color-ghost-50);--ax-comp-alert-border-color: var(--ax-sys-color-ghost-200);--ax-comp-alert-icon-color: var(--ax-sys-color-on-contrast-ghost);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-contrast-ghost);--ax-comp-alert-bg-color-opacity: 1}ax-alert.ax-secondary{--ax-comp-alert-bg-color: var(--ax-sys-color-secondary-500);--ax-comp-alert-border-color: var(--ax-sys-color-secondary-500);--ax-comp-alert-icon-color: var(--ax-sys-color-secondary-500);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-secondary)}ax-alert.ax-primary{--ax-comp-alert-bg-color: var(--ax-sys-color-primary-500);--ax-comp-alert-border-color: var(--ax-sys-color-primary-500);--ax-comp-alert-icon-color: var(--ax-sys-color-primary-500);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-primary)}ax-alert.ax-success{--ax-comp-alert-bg-color: var(--ax-sys-color-success-500);--ax-comp-alert-border-color: var(--ax-sys-color-success-500);--ax-comp-alert-icon-color: var(--ax-sys-color-success-500);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-success)}ax-alert.ax-warning{--ax-comp-alert-bg-color: var(--ax-sys-color-warning-500);--ax-comp-alert-border-color: var(--ax-sys-color-warning-500);--ax-comp-alert-icon-color: var(--ax-sys-color-warning-500);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-warning)}ax-alert{gap:1rem;padding:1rem;display:flex;overflow:hidden;border-width:1px;position:relative;font-size:var(--ax-comp-alert-font-size, .875rem);line-height:var(--ax-comp-alert-line-height, 1.25rem);border-radius:var(--ax-comp-alert-border-radius);border-color:rgba(var(--ax-comp-alert-border-color));background-color:rgba(var(--ax-comp-alert-bg-color),var(--ax-comp-alert-bg-color-opacity))}ax-alert ax-title,ax-alert ax-content{color:rgba(var(--ax-comp-alert-title-content-text-color))}ax-alert .ax-alert-progress{background-color:rgba(var(--ax-comp-alert-progress-bg-color))}ax-alert .ax-alert-inline{display:flex;flex:1 1 0%;align-items:center;justify-content:center}ax-alert .ax-alert-block{display:flex}ax-alert .ax-alert-block .ax-alert-content{display:flex;flex-direction:column;line-height:1.5}ax-alert .ax-alert-block .ax-alert-content .ax-alert-title:empty{display:none}ax-alert .ax-alert-block .ax-alert-content .ax-alert-title:not(:empty)+ax-content:not(:empty){margin-top:.5rem}ax-alert .ax-alert-block .ax-alert-content ax-footer{margin-top:1rem}ax-alert .ax-alert-icon{display:grid;color:rgba(var(--ax-comp-alert-icon-color));border-radius:var(--ax-comp-alert-icon-border-radius);padding-inline-end:.5rem;font-size:1.125rem;line-height:1.75rem;align-items:start}ax-alert .ax-alert-icon ax-icon{line-height:var(--ax-comp-alert-icon-line-height, normal)}ax-alert .ax-alert-buttons{padding-inline-start:1rem}ax-alert .ax-alert-title{display:flex;flex:1 1 0%;flex-direction:column}ax-alert .ax-alert-title ax-title{font-size:.875rem;line-height:1.25rem;font-weight:500}ax-alert .ax-alert-progress{position:absolute;bottom:0;inset-inline-start:0px;height:.25rem}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
134
134
|
}
|
135
135
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXAlertComponent, decorators: [{
|
136
136
|
type: Component,
|
137
|
-
args: [{ selector: 'ax-alert', inputs: ['color'], outputs: ['colorChange'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }], standalone: false, template: "@if (showInline()) {\n <div class=\"ax-alert-inline\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <div class=\"ax-alert-buttons\">\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container>\n </div>\n} @else {\n <div class=\"ax-alert-block\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-content\">\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n <div><ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container></div>\n </div>\n}\n\n@if (timeOut()) {\n <div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut()\"></div>\n}\n\n<ng-template #buttons>\n <ng-content select=\"ax-button\"> </ng-content>\n</ng-template>\n<ng-template #closeButton>\n <ng-content select=\"ax-close-button\"> </ng-content>\n</ng-template>\n<ng-template #title>\n <ng-content select=\"ax-title\"> </ng-content>\n</ng-template>\n<ng-template #icon>\n <ng-content select=\"ax-icon\"> </ng-content>\n</ng-template>\n<ng-template #content>\n <ng-content select=\"ax-content\"> </ng-content>\n</ng-template>\n<ng-template #footer>\n <ng-content select=\"ax-footer\"> </ng-content>\n</ng-template>\n", styles: ["
|
137
|
+
args: [{ selector: 'ax-alert', inputs: ['color'], outputs: ['colorChange'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }], standalone: false, template: "@if (showInline()) {\n <div class=\"ax-alert-inline\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <div class=\"ax-alert-buttons\">\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container>\n </div>\n} @else {\n <div class=\"ax-alert-block\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-content\">\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n <div><ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container></div>\n </div>\n}\n\n@if (timeOut()) {\n <div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut()\"></div>\n}\n\n<ng-template #buttons>\n <ng-content select=\"ax-button\"> </ng-content>\n</ng-template>\n<ng-template #closeButton>\n <ng-content select=\"ax-close-button\"> </ng-content>\n</ng-template>\n<ng-template #title>\n <ng-content select=\"ax-title\"> </ng-content>\n</ng-template>\n<ng-template #icon>\n <ng-content select=\"ax-icon\"> </ng-content>\n</ng-template>\n<ng-template #content>\n <ng-content select=\"ax-content\"> </ng-content>\n</ng-template>\n<ng-template #footer>\n <ng-content select=\"ax-footer\"> </ng-content>\n</ng-template>\n", styles: ["ax-alert{--ax-comp-alert-bg-color-opacity: .15;--ax-comp-alert-icon-border-radius: 100%;--ax-comp-alert-border-radius: var(--ax-sys-border-radius)}ax-alert{--ax-comp-alert-title-content-text-color: var(--ax-sys-body-text-color)}ax-alert.ax-danger{--ax-comp-alert-bg-color: var(--ax-sys-color-danger-500);--ax-comp-alert-border-color: var(--ax-sys-color-danger-500);--ax-comp-alert-icon-color: var(--ax-sys-color-danger-500);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-danger)}ax-alert.ax-ghost{--ax-comp-alert-bg-color: var(--ax-sys-color-ghost-50);--ax-comp-alert-border-color: var(--ax-sys-color-ghost-200);--ax-comp-alert-icon-color: var(--ax-sys-color-on-contrast-ghost);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-contrast-ghost);--ax-comp-alert-bg-color-opacity: 1}ax-alert.ax-secondary{--ax-comp-alert-bg-color: var(--ax-sys-color-secondary-500);--ax-comp-alert-border-color: var(--ax-sys-color-secondary-500);--ax-comp-alert-icon-color: var(--ax-sys-color-secondary-500);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-secondary)}ax-alert.ax-primary{--ax-comp-alert-bg-color: var(--ax-sys-color-primary-500);--ax-comp-alert-border-color: var(--ax-sys-color-primary-500);--ax-comp-alert-icon-color: var(--ax-sys-color-primary-500);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-primary)}ax-alert.ax-success{--ax-comp-alert-bg-color: var(--ax-sys-color-success-500);--ax-comp-alert-border-color: var(--ax-sys-color-success-500);--ax-comp-alert-icon-color: var(--ax-sys-color-success-500);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-success)}ax-alert.ax-warning{--ax-comp-alert-bg-color: var(--ax-sys-color-warning-500);--ax-comp-alert-border-color: var(--ax-sys-color-warning-500);--ax-comp-alert-icon-color: var(--ax-sys-color-warning-500);--ax-comp-alert-progress-bg-color: var(--ax-sys-color-on-warning)}ax-alert{gap:1rem;padding:1rem;display:flex;overflow:hidden;border-width:1px;position:relative;font-size:var(--ax-comp-alert-font-size, .875rem);line-height:var(--ax-comp-alert-line-height, 1.25rem);border-radius:var(--ax-comp-alert-border-radius);border-color:rgba(var(--ax-comp-alert-border-color));background-color:rgba(var(--ax-comp-alert-bg-color),var(--ax-comp-alert-bg-color-opacity))}ax-alert ax-title,ax-alert ax-content{color:rgba(var(--ax-comp-alert-title-content-text-color))}ax-alert .ax-alert-progress{background-color:rgba(var(--ax-comp-alert-progress-bg-color))}ax-alert .ax-alert-inline{display:flex;flex:1 1 0%;align-items:center;justify-content:center}ax-alert .ax-alert-block{display:flex}ax-alert .ax-alert-block .ax-alert-content{display:flex;flex-direction:column;line-height:1.5}ax-alert .ax-alert-block .ax-alert-content .ax-alert-title:empty{display:none}ax-alert .ax-alert-block .ax-alert-content .ax-alert-title:not(:empty)+ax-content:not(:empty){margin-top:.5rem}ax-alert .ax-alert-block .ax-alert-content ax-footer{margin-top:1rem}ax-alert .ax-alert-icon{display:grid;color:rgba(var(--ax-comp-alert-icon-color));border-radius:var(--ax-comp-alert-icon-border-radius);padding-inline-end:.5rem;font-size:1.125rem;line-height:1.75rem;align-items:start}ax-alert .ax-alert-icon ax-icon{line-height:var(--ax-comp-alert-icon-line-height, normal)}ax-alert .ax-alert-buttons{padding-inline-start:1rem}ax-alert .ax-alert-title{display:flex;flex:1 1 0%;flex-direction:column}ax-alert .ax-alert-title ax-title{font-size:.875rem;line-height:1.25rem;font-weight:500}ax-alert .ax-alert-progress{position:absolute;bottom:0;inset-inline-start:0px;height:.25rem}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"] }]
|
138
138
|
}], ctorParameters: () => [], propDecorators: { __hostClass: [{
|
139
139
|
type: HostBinding,
|
140
140
|
args: ['class']
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-alert.mjs","sources":["../../../../libs/components/alert/src/lib/alert.component.ts","../../../../libs/components/alert/src/lib/alert.component.html","../../../../libs/components/alert/src/lib/alert.module.ts","../../../../libs/components/alert/src/acorex-components-alert.ts"],"sourcesContent":["import { AXClosbaleComponent, AXEvent, MXColorComponent } from '@acorex/components/common';\nimport { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\nimport { isBrowser } from '@acorex/core/platform';\n\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n contentChild,\n effect,\n HostBinding,\n model,\n output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\n/**\n * The Alert component is used to display notifications or alerts to users.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-alert',\n templateUrl: './alert.component.html',\n styleUrls: ['./alert.component.scss'],\n inputs: ['color'],\n outputs: ['colorChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }],\n standalone: false,\n})\nexport class AXAlertComponent extends MXColorComponent {\n /**\n * @ignore\n */\n axIcon = contentChild<AXDecoratorIconComponent>('ax-icon');\n /**\n * @ignore\n */\n axTitle = contentChild<AXDecoratorGenericComponent>('ax-title');\n /**\n * @ignore\n */\n axContent = contentChild<AXDecoratorGenericComponent>('ax-content');\n /**\n * @ignore\n */\n axFooter = contentChild<AXDecoratorGenericComponent>('ax-footer');\n\n /**\n * @ignore\n */\n protected showInline = signal(false);\n\n /**\n * Emits an event when the alert component is closed.\n *\n * @event\n */\n onClosed = output<AXEvent>();\n\n /**\n * @ignore\n */\n private customIcon = signal('');\n\n /**\n * @ignore\n */\n private _timeOutRef: number;\n\n /**\n * Sets the duration (in milliseconds) after which the alert will automatically close.\n *\n * @defaultValue 0\n */\n timeOut = model<number>(0);\n\n /**\n * @ignore\n */\n //TODO: Check Console for effect() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`\n timeOutEffect = () => {\n effect(() => {\n if (this.timeOut()) {\n clearTimeout(this._timeOutRef);\n this._timeOutRef = window.setTimeout(() => {\n this.close();\n }, this.timeOut());\n }\n });\n };\n\n /**\n * @ignore\n */\n constructor() {\n super();\n afterNextRender(() => {\n this.onOptionChanged.subscribe(this._handleOnOptionChanged.bind(this));\n this._setLayout();\n this.customIcon.set(this.axIcon()?.icon);\n });\n this.timeOutEffect();\n }\n\n /**\n * @ignore\n */\n private _setLayout() {\n this._setIcon();\n this.showInline.set(this.axContent() == null && this.axFooter() == null);\n this.cdr.markForCheck();\n }\n\n /**\n * @ignore\n */\n protected _handleOnOptionChanged() {\n this._setIcon();\n }\n\n /**\n * @ignore\n */\n private _setIcon() {\n if (!this.axIcon() || this.axIcon().getHostElement().firstElementChild) return;\n\n switch (this.color) {\n case 'success':\n this.axIcon().icon = 'ax-icon ax-icon-check-circle';\n break;\n case 'danger':\n this.axIcon().icon = 'ax-icon ax-icon-error';\n break;\n case 'warning':\n this.axIcon().icon = 'ax-icon ax-icon-warning';\n break;\n default:\n this.axIcon().icon = this.customIcon() || 'ax-icon ax-icon-info';\n break;\n }\n }\n\n /**\n * Removes the alert from the container after a transition effect.\n *\n * @ignore\n */\n close(): void {\n if (isBrowser()) {\n const host = this.getHostElement();\n host.parentElement?.removeChild(host);\n this.onClosed.emit({\n component: this,\n });\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string {\n return `ax-alert ax-none ax-${this.color}-solid`;\n }\n}\n","@if (showInline()) {\n <div class=\"ax-alert-inline\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <div class=\"ax-alert-buttons\">\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container>\n </div>\n} @else {\n <div class=\"ax-alert-block\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-content\">\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n <div><ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container></div>\n </div>\n}\n\n@if (timeOut()) {\n <div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut()\"></div>\n}\n\n<ng-template #buttons>\n <ng-content select=\"ax-button\"> </ng-content>\n</ng-template>\n<ng-template #closeButton>\n <ng-content select=\"ax-close-button\"> </ng-content>\n</ng-template>\n<ng-template #title>\n <ng-content select=\"ax-title\"> </ng-content>\n</ng-template>\n<ng-template #icon>\n <ng-content select=\"ax-icon\"> </ng-content>\n</ng-template>\n<ng-template #content>\n <ng-content select=\"ax-content\"> </ng-content>\n</ng-template>\n<ng-template #footer>\n <ng-content select=\"ax-footer\"> </ng-content>\n</ng-template>\n","import { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXAlertComponent } from './alert.component';\n\nconst COMPONENT = [AXAlertComponent];\nconst MODULES = [CommonModule, AXDecoratorModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAiBA;;;;AAIG;AAYG,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;AA8DpD;;AAEG;AACH,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAjET;;AAEG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,YAAY,CAA2B,SAAS,CAAC;AAC1D;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A;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACbD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-alert.mjs","sources":["../../../../libs/components/alert/src/lib/alert.component.ts","../../../../libs/components/alert/src/lib/alert.component.html","../../../../libs/components/alert/src/lib/alert.module.ts","../../../../libs/components/alert/src/acorex-components-alert.ts"],"sourcesContent":["import { AXClosbaleComponent, AXEvent, MXColorComponent } from '@acorex/components/common';\nimport { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\nimport { isBrowser } from '@acorex/core/platform';\n\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n contentChild,\n effect,\n HostBinding,\n model,\n output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\n/**\n * The Alert component is used to display notifications or alerts to users.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-alert',\n templateUrl: './alert.component.html',\n styleUrls: ['./alert.component.scss'],\n inputs: ['color'],\n outputs: ['colorChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXAlertComponent }],\n standalone: false,\n})\nexport class AXAlertComponent extends MXColorComponent {\n /**\n * @ignore\n */\n axIcon = contentChild<AXDecoratorIconComponent>('ax-icon');\n /**\n * @ignore\n */\n axTitle = contentChild<AXDecoratorGenericComponent>('ax-title');\n /**\n * @ignore\n */\n axContent = contentChild<AXDecoratorGenericComponent>('ax-content');\n /**\n * @ignore\n */\n axFooter = contentChild<AXDecoratorGenericComponent>('ax-footer');\n\n /**\n * @ignore\n */\n protected showInline = signal(false);\n\n /**\n * Emits an event when the alert component is closed.\n *\n * @event\n */\n onClosed = output<AXEvent>();\n\n /**\n * @ignore\n */\n private customIcon = signal('');\n\n /**\n * @ignore\n */\n private _timeOutRef: number;\n\n /**\n * Sets the duration (in milliseconds) after which the alert will automatically close.\n *\n * @defaultValue 0\n */\n timeOut = model<number>(0);\n\n /**\n * @ignore\n */\n //TODO: Check Console for effect() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`\n timeOutEffect = () => {\n effect(() => {\n if (this.timeOut()) {\n clearTimeout(this._timeOutRef);\n this._timeOutRef = window.setTimeout(() => {\n this.close();\n }, this.timeOut());\n }\n });\n };\n\n /**\n * @ignore\n */\n constructor() {\n super();\n afterNextRender(() => {\n this.onOptionChanged.subscribe(this._handleOnOptionChanged.bind(this));\n this._setLayout();\n this.customIcon.set(this.axIcon()?.icon);\n });\n this.timeOutEffect();\n }\n\n /**\n * @ignore\n */\n private _setLayout() {\n this._setIcon();\n this.showInline.set(this.axContent() == null && this.axFooter() == null);\n this.cdr.markForCheck();\n }\n\n /**\n * @ignore\n */\n protected _handleOnOptionChanged() {\n this._setIcon();\n }\n\n /**\n * @ignore\n */\n private _setIcon() {\n if (!this.axIcon() || this.axIcon().getHostElement().firstElementChild) return;\n\n switch (this.color) {\n case 'success':\n this.axIcon().icon = 'ax-icon ax-icon-check-circle';\n break;\n case 'danger':\n this.axIcon().icon = 'ax-icon ax-icon-error';\n break;\n case 'warning':\n this.axIcon().icon = 'ax-icon ax-icon-warning';\n break;\n default:\n this.axIcon().icon = this.customIcon() || 'ax-icon ax-icon-info';\n break;\n }\n }\n\n /**\n * Removes the alert from the container after a transition effect.\n *\n * @ignore\n */\n close(): void {\n if (isBrowser()) {\n const host = this.getHostElement();\n host.parentElement?.removeChild(host);\n this.onClosed.emit({\n component: this,\n });\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string {\n return `ax-alert ax-none ax-${this.color}`;\n }\n}\n","@if (showInline()) {\n <div class=\"ax-alert-inline\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <div class=\"ax-alert-buttons\">\n <ng-container [ngTemplateOutlet]=\"buttons\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container>\n </div>\n} @else {\n <div class=\"ax-alert-block\">\n <div class=\"ax-alert-icon ax-icon-solid\">\n <ng-container [ngTemplateOutlet]=\"icon\"></ng-container>\n </div>\n <div class=\"ax-alert-content\">\n <div class=\"ax-alert-title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\n </div>\n <div><ng-container [ngTemplateOutlet]=\"closeButton\"></ng-container></div>\n </div>\n}\n\n@if (timeOut()) {\n <div class=\"ax-alert-progress\" [style.animation-duration.ms]=\"timeOut()\"></div>\n}\n\n<ng-template #buttons>\n <ng-content select=\"ax-button\"> </ng-content>\n</ng-template>\n<ng-template #closeButton>\n <ng-content select=\"ax-close-button\"> </ng-content>\n</ng-template>\n<ng-template #title>\n <ng-content select=\"ax-title\"> </ng-content>\n</ng-template>\n<ng-template #icon>\n <ng-content select=\"ax-icon\"> </ng-content>\n</ng-template>\n<ng-template #content>\n <ng-content select=\"ax-content\"> </ng-content>\n</ng-template>\n<ng-template #footer>\n <ng-content select=\"ax-footer\"> </ng-content>\n</ng-template>\n","import { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXAlertComponent } from './alert.component';\n\nconst COMPONENT = [AXAlertComponent];\nconst MODULES = [CommonModule, AXDecoratorModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport *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AAA,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;;;ACbD;;AAEG;;;;"}
|
@@ -38,8 +38,8 @@ class AXAudioWaveComponent {
|
|
38
38
|
this.platformID = inject(PLATFORM_ID);
|
39
39
|
afterNextRender(() => {
|
40
40
|
if (isPlatformBrowser(this.platformID)) {
|
41
|
-
const primary200 = getComputedStyle(document.body).getPropertyValue('--ax-color-primary-200');
|
42
|
-
const primary700 = getComputedStyle(document.body).getPropertyValue('--ax-color-primary-700');
|
41
|
+
const primary200 = getComputedStyle(document.body).getPropertyValue('--ax-sys-color-primary-200');
|
42
|
+
const primary700 = getComputedStyle(document.body).getPropertyValue('--ax-sys-color-primary-700');
|
43
43
|
this.audio = WaveSurfer.create({
|
44
44
|
container: this.div.nativeElement,
|
45
45
|
waveColor: this.config()?.waveColor || `rgba(${primary200})`,
|
@@ -340,11 +340,11 @@ class AXAudioWaveComponent {
|
|
340
340
|
this.audio.destroy();
|
341
341
|
}
|
342
342
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXAudioWaveComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
343
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXAudioWaveComponent, isStandalone: false, selector: "ax-audio-wave", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onStatusChanged: "onStatusChanged" }, viewQueries: [{ propertyName: "div", first: true, predicate: ["d"], descendants: true }], ngImport: i0, template: "<div class=\"ax-audio-wave\" #d [ngStyle]=\"{'display': audioState() === 'ready' ? 'block' : 'none' }\"></div>\n\n@switch (audioState()) {\n@case ('loading') {\n<div class=\"ax-audio-skeleton\"></div>\n}\n@case ('error') {\n<div class=\"ax-wave-message\">\n {{'error.message' | translate:{ params:{ message: errorMessage() } } | async }}\n</div>\n}\n}", styles: ["ax-audio-wave{display:block;width:100%;flex:1;--ax-audio-skeleton-bg: rgba(var(--ax-color-primary-200))}ax-audio-wave .ax-audio-skeleton{position:relative;display:block;overflow:hidden;background-color:var(--ax-audio-skeleton-bg);height:1.125rem;border-radius:999rem}ax-audio-wave .ax-audio-skeleton:before{position:absolute;inset-inline-start:-13rem;top:0;display:block;height:100%;width:14rem;content:\"\";background:linear-gradient(to right,transparent 0%,rgba(var(--ax-color-
|
343
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXAudioWaveComponent, isStandalone: false, selector: "ax-audio-wave", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onStatusChanged: "onStatusChanged" }, viewQueries: [{ propertyName: "div", first: true, predicate: ["d"], descendants: true }], ngImport: i0, template: "<div class=\"ax-audio-wave\" #d [ngStyle]=\"{'display': audioState() === 'ready' ? 'block' : 'none' }\"></div>\n\n@switch (audioState()) {\n@case ('loading') {\n<div class=\"ax-audio-skeleton\"></div>\n}\n@case ('error') {\n<div class=\"ax-wave-message\">\n {{'error.message' | translate:{ params:{ message: errorMessage() } } | async }}\n</div>\n}\n}", styles: ["ax-audio-wave{display:block;width:100%;flex:1;--ax-audio-skeleton-bg: rgba(var(--ax-sys-color-primary-200))}ax-audio-wave .ax-audio-skeleton{position:relative;display:block;overflow:hidden;background-color:var(--ax-audio-skeleton-bg);height:1.125rem;border-radius:999rem}ax-audio-wave .ax-audio-skeleton:before{position:absolute;inset-inline-start:-13rem;top:0;display:block;height:100%;width:14rem;content:\"\";background:linear-gradient(to right,transparent 0%,rgba(var(--ax-sys-color-surface-dark),20%) 50%,transparent 100%);animation:load 1s cubic-bezier(.4,0,.2,1) infinite}@keyframes load{0%{inset-inline-start:-13rem}to{inset-inline-start:100%}}ax-audio-wave .ax-wave-message{padding-inline-start:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
344
344
|
}
|
345
345
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXAudioWaveComponent, decorators: [{
|
346
346
|
type: Component,
|
347
|
-
args: [{ selector: 'ax-audio-wave', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"ax-audio-wave\" #d [ngStyle]=\"{'display': audioState() === 'ready' ? 'block' : 'none' }\"></div>\n\n@switch (audioState()) {\n@case ('loading') {\n<div class=\"ax-audio-skeleton\"></div>\n}\n@case ('error') {\n<div class=\"ax-wave-message\">\n {{'error.message' | translate:{ params:{ message: errorMessage() } } | async }}\n</div>\n}\n}", styles: ["ax-audio-wave{display:block;width:100%;flex:1;--ax-audio-skeleton-bg: rgba(var(--ax-color-primary-200))}ax-audio-wave .ax-audio-skeleton{position:relative;display:block;overflow:hidden;background-color:var(--ax-audio-skeleton-bg);height:1.125rem;border-radius:999rem}ax-audio-wave .ax-audio-skeleton:before{position:absolute;inset-inline-start:-13rem;top:0;display:block;height:100%;width:14rem;content:\"\";background:linear-gradient(to right,transparent 0%,rgba(var(--ax-color-
|
347
|
+
args: [{ selector: 'ax-audio-wave', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"ax-audio-wave\" #d [ngStyle]=\"{'display': audioState() === 'ready' ? 'block' : 'none' }\"></div>\n\n@switch (audioState()) {\n@case ('loading') {\n<div class=\"ax-audio-skeleton\"></div>\n}\n@case ('error') {\n<div class=\"ax-wave-message\">\n {{'error.message' | translate:{ params:{ message: errorMessage() } } | async }}\n</div>\n}\n}", styles: ["ax-audio-wave{display:block;width:100%;flex:1;--ax-audio-skeleton-bg: rgba(var(--ax-sys-color-primary-200))}ax-audio-wave .ax-audio-skeleton{position:relative;display:block;overflow:hidden;background-color:var(--ax-audio-skeleton-bg);height:1.125rem;border-radius:999rem}ax-audio-wave .ax-audio-skeleton:before{position:absolute;inset-inline-start:-13rem;top:0;display:block;height:100%;width:14rem;content:\"\";background:linear-gradient(to right,transparent 0%,rgba(var(--ax-sys-color-surface-dark),20%) 50%,transparent 100%);animation:load 1s cubic-bezier(.4,0,.2,1) infinite}@keyframes load{0%{inset-inline-start:-13rem}to{inset-inline-start:100%}}ax-audio-wave .ax-wave-message{padding-inline-start:.5rem}\n"] }]
|
348
348
|
}], ctorParameters: () => [], propDecorators: { div: [{
|
349
349
|
type: ViewChild,
|
350
350
|
args: ['d', { static: false }]
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-audio-wave.mjs","sources":["../../../../libs/components/audio-wave/src/lib/audio-wave.component.ts","../../../../libs/components/audio-wave/src/lib/audio-wave.component.html","../../../../libs/components/audio-wave/src/lib/audio-wave.module.ts","../../../../libs/components/audio-wave/src/acorex-components-audio-wave.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n ElementRef,\n InputSignal,\n NgZone,\n OnDestroy,\n PLATFORM_ID,\n ViewChild,\n ViewEncapsulation,\n afterNextRender,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport WaveSurfer from 'wavesurfer.js';\nimport { AXAudioWaveChangeEvent, AXWaveConfig } from './interfaces/audio-wave.interface';\n\n/**\n * Displays and interacts with audio waveform visualization.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-audio-wave',\n templateUrl: './audio-wave.component.html',\n styleUrls: ['./audio-wave.component.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: false\n})\nexport class AXAudioWaveComponent implements OnDestroy {\n /**\n * @ignore\n */\n @ViewChild('d', { static: false }) protected div: ElementRef<HTMLDivElement>;\n\n /**\n * Configuration settings for the audio wave.\n */\n config: InputSignal<AXWaveConfig> = input<AXWaveConfig>();\n\n /**\n * Emits an event when the status of the audio wave changes.\n *\n * @event\n */\n onStatusChanged = output<AXAudioWaveChangeEvent>();\n\n audioState = signal<'playing' | 'paused' | 'loading' | 'ready' | 'error'>('paused');\n\n errorMessage = signal('');\n\n /**\n * @ignore\n */\n protected audio: WaveSurfer;\n\n /**\n * @ignore\n */\n private ngZone = inject(NgZone);\n\n private platformID = inject(PLATFORM_ID);\n /**\n * @ignore\n */\n constructor() {\n afterNextRender(() => {\n if (isPlatformBrowser(this.platformID)) {\n const primary200 = getComputedStyle(document.body).getPropertyValue('--ax-color-primary-200');\n const primary700 = getComputedStyle(document.body).getPropertyValue('--ax-color-primary-700');\n\n this.audio = WaveSurfer.create({\n container: this.div.nativeElement,\n waveColor: this.config()?.waveColor || `rgba(${primary200})`,\n progressColor: this.config()?.progressColor || `rgba(${primary700})`,\n url: this.config()?.url || '',\n barWidth: this.config()?.barWidth || 2,\n barRadius: this.config()?.barRadius || 2,\n barGap: this.config()?.barGap || 2,\n height: this.config()?.height || 36,\n });\n }\n this.load();\n this.audio?.on('loading', () => {\n this.audioState.set('loading');\n });\n this.audio?.on('ready', () => {\n this.audioState.set('ready');\n });\n this.audio?.on('error', (e) => {\n this.errorMessage.set(e?.message);\n this.audioState.set('error');\n });\n this.bindEvents();\n });\n }\n\n /**\n * Loads the audio from the specified URL.\n *\n * @param url - The URL of the audio to load. Defaults to the URL from the config.\n */\n load(url = this.config().url) {\n this.audio.load(url);\n }\n\n /**\n * Plays the audio.\n *\n */\n play(): Promise<any> {\n return this.audio?.play();\n }\n\n /**\n * Pauses the audio.\n */\n pause(): void {\n this.audio?.pause();\n }\n\n /**\n * Retrieves the duration of the audio.\n *\n */\n getDuration() {\n return this.audio?.getDuration() ?? 0;\n }\n\n /**\n * Retrieves the media element of the audio.\n *\n */\n getMediaElement() {\n return this.audio?.getMediaElement();\n }\n\n /**\n * Sets the playback rate of the audio.\n *\n * @param rate - The playback rate to set.\n */\n setRate(rate: number) {\n this.audio.setPlaybackRate(rate);\n }\n\n /**\n * @ignore\n */\n protected bindEvents() {\n this.handleLoad();\n this.handleLoading();\n this.handleDecode();\n this.handleReady();\n this.handleRedRawComplete();\n this.handlePlay();\n this.handlePause();\n this.handleFinish();\n this.handleTimeUpdate();\n this.handleSeeking();\n this.handleInteraction();\n this.handleClick();\n this.handleDrag();\n this.handleScroll();\n this.handleZoom();\n this.handleDestroy();\n this.handleError();\n }\n /** When audio starts loading */\n protected handleLoad() {\n this.audio?.on('load', (url) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { url: url },\n status: 'load',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** During audio loading */\n protected handleLoading() {\n this.audio?.on('loading', (percent) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { percent: percent },\n status: 'loading',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the audio has been decoded */\n protected handleDecode() {\n this.audio?.on('decode', (duration) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { duration: duration },\n status: 'decode',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the audio is both decoded and can play */\n protected handleReady() {\n this.audio?.on('ready', (duration) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { duration: duration },\n status: 'ready',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When all audio channel chunks of the waveform have drawn */\n protected handleRedRawComplete() {\n this.audio?.on('redrawcomplete', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: null,\n status: 'redrawcomplete',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the audio starts playing */\n protected handlePlay() {\n this.audio?.on('play', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: null, status: 'play', isUserInteraction: false });\n });\n });\n }\n\n /** When the audio pauses */\n protected handlePause() {\n this.audio?.on('pause', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: null, status: 'pause', isUserInteraction: false });\n });\n });\n }\n\n /** When the audio finishes playing */\n protected handleFinish() {\n this.audio?.on('finish', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: null,\n status: 'finish',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** On audio position change, fires continuously during playback */\n protected handleTimeUpdate() {\n this.audio?.on('timeupdate', (currentTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { currentTime: currentTime },\n status: 'timeupdate',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the user seeks to a new position */\n protected handleSeeking() {\n this.audio?.on('seeking', (currentTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { currentTime: currentTime },\n status: 'seeking',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the user interacts with the waveform (i.g. clicks or drags on it) */\n protected handleInteraction() {\n this.audio?.on('interaction', (newTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { newTime: newTime },\n status: 'interaction',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the user clicks on the waveform */\n protected handleClick() {\n this.audio?.on('click', (relativeX) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { relativeX: relativeX },\n status: 'click',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the user drags the cursor */\n protected handleDrag() {\n this.audio?.on('drag', (relativeX) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { relativeX: relativeX },\n status: 'drag',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the waveform is scrolled (panned) */\n protected handleScroll() {\n this.audio?.on('scroll', (visibleStartTime, visibleEndTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { visibleStartTime, visibleEndTime },\n status: 'scroll',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the zoom level changes */\n protected handleZoom() {\n this.audio?.on('zoom', (minPxPerSec) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { minPxPerSec: minPxPerSec },\n status: 'zoom',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** Just before the waveform is destroyed so you can clean up your events */\n protected handleDestroy() {\n this.audio?.on('destroy', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: null,\n status: 'destroy',\n isUserInteraction: false,\n });\n });\n });\n }\n /** Just before the waveform is destroyed so you can clean up your events */\n protected handleError() {\n this.audio?.on('error', (e) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: e, status: 'error', isUserInteraction: false });\n });\n });\n }\n\n ngOnDestroy(): void {\n this.audio.destroy();\n }\n}\n","<div class=\"ax-audio-wave\" #d [ngStyle]=\"{'display': audioState() === 'ready' ? 'block' : 'none' }\"></div>\n\n@switch (audioState()) {\n@case ('loading') {\n<div class=\"ax-audio-skeleton\"></div>\n}\n@case ('error') {\n<div class=\"ax-wave-message\">\n {{'error.message' | translate:{ params:{ message: errorMessage() } } | async }}\n</div>\n}\n}","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXSkeletonModule } from '@acorex/components/skeleton';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXAudioWaveComponent } from './audio-wave.component';\n\n@NgModule({\n declarations: [AXAudioWaveComponent],\n exports: [AXAudioWaveComponent],\n imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXSkeletonModule, AXTranslationModule],\n})\nexport class AXAudioWaveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAmBA;;;;AAIG;MAQU,oBAAoB,CAAA;AAiC/B;;AAEG;AACH,IAAA,WAAA,GAAA;AA9BA;;AAEG;QACH,IAAM,CAAA,MAAA,GAA8B,KAAK,EAAgB;AAEzD;;;;AAIG;QACH,IAAe,CAAA,eAAA,GAAG,MAAM,EAA0B;AAElD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAuD,QAAQ,CAAC;AAEnF,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC;AAOzB;;AAEG;AACK,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAEvB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;QAKtC,eAAe,CAAC,MAAK;AACnB,YAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;AACtC,gBAAA,MAAM,UAAU,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,wBAAwB,CAAC;AAC7F,gBAAA,MAAM,UAAU,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,wBAAwB,CAAC;AAE7F,gBAAA,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC;AAC7B,oBAAA,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,aAAa;oBACjC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,IAAI,CAAQ,KAAA,EAAA,UAAU,CAAG,CAAA,CAAA;oBAC5D,aAAa,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,aAAa,IAAI,CAAQ,KAAA,EAAA,UAAU,CAAG,CAAA,CAA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AAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAJb,YAAA,EAAA,CAAA,oBAAoB,CAEzB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,aADtF,oBAAoB,CAAA,EAAA,CAAA,CAAA;+GAGnB,iBAAiB,EAAA,OAAA,EAAA,CAFlB,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAErF,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;AAClG,iBAAA;;;ACZD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-audio-wave.mjs","sources":["../../../../libs/components/audio-wave/src/lib/audio-wave.component.ts","../../../../libs/components/audio-wave/src/lib/audio-wave.component.html","../../../../libs/components/audio-wave/src/lib/audio-wave.module.ts","../../../../libs/components/audio-wave/src/acorex-components-audio-wave.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n ElementRef,\n InputSignal,\n NgZone,\n OnDestroy,\n PLATFORM_ID,\n ViewChild,\n ViewEncapsulation,\n afterNextRender,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport WaveSurfer from 'wavesurfer.js';\nimport { AXAudioWaveChangeEvent, AXWaveConfig } from './interfaces/audio-wave.interface';\n\n/**\n * Displays and interacts with audio waveform visualization.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-audio-wave',\n templateUrl: './audio-wave.component.html',\n styleUrls: ['./audio-wave.component.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class AXAudioWaveComponent implements OnDestroy {\n /**\n * @ignore\n */\n @ViewChild('d', { static: false }) protected div: ElementRef<HTMLDivElement>;\n\n /**\n * Configuration settings for the audio wave.\n */\n config: InputSignal<AXWaveConfig> = input<AXWaveConfig>();\n\n /**\n * Emits an event when the status of the audio wave changes.\n *\n * @event\n */\n onStatusChanged = output<AXAudioWaveChangeEvent>();\n\n audioState = signal<'playing' | 'paused' | 'loading' | 'ready' | 'error'>('paused');\n\n errorMessage = signal('');\n\n /**\n * @ignore\n */\n protected audio: WaveSurfer;\n\n /**\n * @ignore\n */\n private ngZone = inject(NgZone);\n\n private platformID = inject(PLATFORM_ID);\n /**\n * @ignore\n */\n constructor() {\n afterNextRender(() => {\n if (isPlatformBrowser(this.platformID)) {\n const primary200 = getComputedStyle(document.body).getPropertyValue('--ax-sys-color-primary-200');\n const primary700 = getComputedStyle(document.body).getPropertyValue('--ax-sys-color-primary-700');\n\n this.audio = WaveSurfer.create({\n container: this.div.nativeElement,\n waveColor: this.config()?.waveColor || `rgba(${primary200})`,\n progressColor: this.config()?.progressColor || `rgba(${primary700})`,\n url: this.config()?.url || '',\n barWidth: this.config()?.barWidth || 2,\n barRadius: this.config()?.barRadius || 2,\n barGap: this.config()?.barGap || 2,\n height: this.config()?.height || 36,\n });\n }\n this.load();\n this.audio?.on('loading', () => {\n this.audioState.set('loading');\n });\n this.audio?.on('ready', () => {\n this.audioState.set('ready');\n });\n this.audio?.on('error', (e) => {\n this.errorMessage.set(e?.message);\n this.audioState.set('error');\n });\n this.bindEvents();\n });\n }\n\n /**\n * Loads the audio from the specified URL.\n *\n * @param url - The URL of the audio to load. Defaults to the URL from the config.\n */\n load(url = this.config().url) {\n this.audio.load(url);\n }\n\n /**\n * Plays the audio.\n *\n */\n play(): Promise<any> {\n return this.audio?.play();\n }\n\n /**\n * Pauses the audio.\n */\n pause(): void {\n this.audio?.pause();\n }\n\n /**\n * Retrieves the duration of the audio.\n *\n */\n getDuration() {\n return this.audio?.getDuration() ?? 0;\n }\n\n /**\n * Retrieves the media element of the audio.\n *\n */\n getMediaElement() {\n return this.audio?.getMediaElement();\n }\n\n /**\n * Sets the playback rate of the audio.\n *\n * @param rate - The playback rate to set.\n */\n setRate(rate: number) {\n this.audio.setPlaybackRate(rate);\n }\n\n /**\n * @ignore\n */\n protected bindEvents() {\n this.handleLoad();\n this.handleLoading();\n this.handleDecode();\n this.handleReady();\n this.handleRedRawComplete();\n this.handlePlay();\n this.handlePause();\n this.handleFinish();\n this.handleTimeUpdate();\n this.handleSeeking();\n this.handleInteraction();\n this.handleClick();\n this.handleDrag();\n this.handleScroll();\n this.handleZoom();\n this.handleDestroy();\n this.handleError();\n }\n /** When audio starts loading */\n protected handleLoad() {\n this.audio?.on('load', (url) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { url: url },\n status: 'load',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** During audio loading */\n protected handleLoading() {\n this.audio?.on('loading', (percent) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { percent: percent },\n status: 'loading',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the audio has been decoded */\n protected handleDecode() {\n this.audio?.on('decode', (duration) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { duration: duration },\n status: 'decode',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the audio is both decoded and can play */\n protected handleReady() {\n this.audio?.on('ready', (duration) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { duration: duration },\n status: 'ready',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When all audio channel chunks of the waveform have drawn */\n protected handleRedRawComplete() {\n this.audio?.on('redrawcomplete', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: null,\n status: 'redrawcomplete',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the audio starts playing */\n protected handlePlay() {\n this.audio?.on('play', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: null, status: 'play', isUserInteraction: false });\n });\n });\n }\n\n /** When the audio pauses */\n protected handlePause() {\n this.audio?.on('pause', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: null, status: 'pause', isUserInteraction: false });\n });\n });\n }\n\n /** When the audio finishes playing */\n protected handleFinish() {\n this.audio?.on('finish', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: null,\n status: 'finish',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** On audio position change, fires continuously during playback */\n protected handleTimeUpdate() {\n this.audio?.on('timeupdate', (currentTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { currentTime: currentTime },\n status: 'timeupdate',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the user seeks to a new position */\n protected handleSeeking() {\n this.audio?.on('seeking', (currentTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { currentTime: currentTime },\n status: 'seeking',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the user interacts with the waveform (i.g. clicks or drags on it) */\n protected handleInteraction() {\n this.audio?.on('interaction', (newTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { newTime: newTime },\n status: 'interaction',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the user clicks on the waveform */\n protected handleClick() {\n this.audio?.on('click', (relativeX) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { relativeX: relativeX },\n status: 'click',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the user drags the cursor */\n protected handleDrag() {\n this.audio?.on('drag', (relativeX) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { relativeX: relativeX },\n status: 'drag',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the waveform is scrolled (panned) */\n protected handleScroll() {\n this.audio?.on('scroll', (visibleStartTime, visibleEndTime) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { visibleStartTime, visibleEndTime },\n status: 'scroll',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** When the zoom level changes */\n protected handleZoom() {\n this.audio?.on('zoom', (minPxPerSec) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: { minPxPerSec: minPxPerSec },\n status: 'zoom',\n isUserInteraction: false,\n });\n });\n });\n }\n\n /** Just before the waveform is destroyed so you can clean up your events */\n protected handleDestroy() {\n this.audio?.on('destroy', () => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({\n component: this,\n data: null,\n status: 'destroy',\n isUserInteraction: false,\n });\n });\n });\n }\n /** Just before the waveform is destroyed so you can clean up your events */\n protected handleError() {\n this.audio?.on('error', (e) => {\n this.ngZone.run(() => {\n this.onStatusChanged.emit({ component: this, data: e, status: 'error', isUserInteraction: false });\n });\n });\n }\n\n ngOnDestroy(): void {\n this.audio.destroy();\n }\n}\n","<div class=\"ax-audio-wave\" #d [ngStyle]=\"{'display': audioState() === 'ready' ? 'block' : 'none' }\"></div>\n\n@switch (audioState()) {\n@case ('loading') {\n<div class=\"ax-audio-skeleton\"></div>\n}\n@case ('error') {\n<div class=\"ax-wave-message\">\n {{'error.message' | translate:{ params:{ message: errorMessage() } } | async }}\n</div>\n}\n}","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXSkeletonModule } from '@acorex/components/skeleton';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXAudioWaveComponent } from './audio-wave.component';\n\n@NgModule({\n declarations: [AXAudioWaveComponent],\n exports: [AXAudioWaveComponent],\n imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXSkeletonModule, AXTranslationModule],\n})\nexport class AXAudioWaveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAmBA;;;;AAIG;MAQU,oBAAoB,CAAA;AAiC/B;;AAEG;AACH,IAAA,WAAA,GAAA;AA9BA;;AAEG;QACH,IAAM,CAAA,MAAA,GAA8B,KAAK,EAAgB;AAEzD;;;;AAIG;QACH,IAAe,CAAA,eAAA,GAAG,MAAM,EAA0B;AAElD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAuD,QAAQ,CAAC;AAEnF,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC;AAOzB;;AAEG;AACK,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAEvB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;QAKtC,eAAe,CAAC,MAAK;AACnB,YAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;AACtC,gBAAA,MAAM,UAAU,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,4BAA4B,CAAC;AACjG,gBAAA,MAAM,UAAU,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,4BAA4B,CAAC;AAEjG,gBAAA,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC;AAC7B,oBAAA,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,aAAa;oBACjC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,IAAI,CAAQ,KAAA,EAAA,UAAU,CAAG,CAAA,CAAA;oBAC5D,aAAa,EAAE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AAE,MAAM,EAAE,KAAK,EAAE;;;MEtBtB,iBAAiB,CAAA;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAJb,YAAA,EAAA,CAAA,oBAAoB,CAEzB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,aADtF,oBAAoB,CAAA,EAAA,CAAA,CAAA;+GAGnB,iBAAiB,EAAA,OAAA,EAAA,CAFlB,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAErF,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;AAClG,iBAAA;;;ACZD;;AAEG;;;;"}
|
@@ -39,13 +39,14 @@ class AXAvatarComponent extends MXColorComponent {
|
|
39
39
|
*
|
40
40
|
* @defaultValue 'rounded'
|
41
41
|
*/
|
42
|
-
this.
|
42
|
+
this.shape = input('rounded');
|
43
|
+
this.look = input('twotone');
|
43
44
|
}
|
44
45
|
/**
|
45
46
|
* @ignore
|
46
47
|
*/
|
47
48
|
get __hostClass() {
|
48
|
-
return `ax-${this.color}
|
49
|
+
return `ax-${this.color} ax-${this.look()} ax-${this.shape()} `;
|
49
50
|
}
|
50
51
|
/**
|
51
52
|
* @ignore
|
@@ -54,11 +55,11 @@ class AXAvatarComponent extends MXColorComponent {
|
|
54
55
|
return `width: ${this.size()}px; height: ${this.size()}px`;
|
55
56
|
}
|
56
57
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXAvatarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
57
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXAvatarComponent, isStandalone: false, selector: "ax-avatar", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { size: "sizeChange" }, host: { properties: { "class": "this.__hostClass", "style": "this.__hostStyle" } }, queries: [{ propertyName: "children", predicate: ["ax-image, ax-icon, ax-text"], isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-text, ax-image, ax-icon\"></ng-content>\n\n@if (!children()?.length) {\n <svg xmlns=\"http://www.w3.org/2000/svg\"
|
58
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXAvatarComponent, isStandalone: false, selector: "ax-avatar", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { size: "sizeChange" }, host: { properties: { "class": "this.__hostClass", "style": "this.__hostStyle" } }, queries: [{ propertyName: "children", predicate: ["ax-image, ax-icon, ax-text"], isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-text, ax-image, ax-icon\"></ng-content>\n\n@if (!children()?.length) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 512 512\">\n <g style=\"isolation: isolate\">\n <g id=\"Layer_2\" data-name=\"Layer 2\">\n <g id=\"Layer_1-2\" data-name=\"Layer 1\">\n <rect width=\"512\" height=\"512\" />\n <path\n d=\"M419.16,511.94s-2.85-154-142.28-176.19a139.93,139.93,0,0,0-22-1.67h0a55.8,55.8,0,0,0-5.93.29C99.25,350.35,96.26,511.94,96.26,511.94\"\n style=\"fill: rgba(var(--ax-sys-color-surface-light)); opacity: 0.7\"\n />\n <path\n d=\"M256,355.18c-17.29,0-32.22-4.63-46.38-12.41-3.86,1.31-8.15,2.93-11.75,4.46A96.48,96.48,0,0,0,256,366.62a100.29,100.29,0,0,0,60.07-20c-3.6-1.49-6.41-2.55-10.27-3.83C291.48,350.79,273.58,355.18,256,355.18Z\"\n style=\"opacity: 0.05\"\n />\n <circle cx=\"257.71\" cy=\"255.94\" r=\"99.24\" style=\"fill: rgba(var(--ax-sys-color-surface-light))\" />\n </g>\n </g>\n </g>\n </svg>\n}\n<ng-content select=\"ax-badge\"></ng-content>\n", styles: ["ax-avatar.ax-solid.ax-danger{--ax-comp-avatar-bg-color: var(--ax-sys-color-danger-500);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-danger);--ax-comp-avatar-text-color: var(--ax-sys-color-on-danger)}ax-avatar.ax-solid.ax-ghost{--ax-comp-avatar-bg-color: var(--ax-sys-color-ghost-50);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-ghost);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-ghost);--ax-comp-avatar-border-width: 1px;--ax-comp-avatar-border-color: var(--ax-sys-color-ghost-200)}ax-avatar.ax-solid.ax-primary{--ax-comp-avatar-bg-color: var(--ax-sys-color-primary-500);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-primary);--ax-comp-avatar-text-color: var(--ax-sys-color-on-primary)}ax-avatar.ax-solid.ax-secondary{--ax-comp-avatar-bg-color: var(--ax-sys-color-secondary-500);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-secondary);--ax-comp-avatar-text-color: var(--ax-sys-color-on-secondary)}ax-avatar.ax-solid.ax-success{--ax-comp-avatar-bg-color: var(--ax-sys-color-success-500);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-success);--ax-comp-avatar-text-color: var(--ax-sys-color-on-success)}ax-avatar.ax-solid.ax-warning{--ax-comp-avatar-bg-color: var(--ax-sys-color-warning-500);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-warning);--ax-comp-avatar-text-color: var(--ax-sys-color-on-warning)}ax-avatar.ax-twotone.ax-primary{--ax-comp-avatar-bg-color: var(--ax-sys-color-primary-200);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-primary);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-primary)}ax-avatar.ax-twotone.ax-success{--ax-comp-avatar-bg-color: var(--ax-sys-color-success-200);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-success);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-success)}ax-avatar.ax-twotone.ax-danger{--ax-comp-avatar-bg-color: var(--ax-sys-color-danger-200);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-danger);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-danger)}ax-avatar.ax-twotone.ax-warning{--ax-comp-avatar-bg-color: var(--ax-sys-color-warning-200);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-warning);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-warning)}ax-avatar.ax-twotone.ax-secondary{--ax-comp-avatar-bg-color: var(--ax-sys-color-secondary-200);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-secondary);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-secondary)}ax-avatar.ax-twotone.ax-ghost{--ax-comp-avatar-bg-color: var(--ax-sys-color-ghost-100);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-ghost);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-ghost)}ax-avatar-group{display:flex}ax-avatar-group ax-avatar{margin:-.25rem;overflow:hidden;border-width:2px;border-color:rgba(var(--ax-sys-color-border-surface))}ax-avatar{position:relative;display:flex;justify-content:center}ax-avatar.ax-sharp{border-radius:0}ax-avatar.ax-soft{border-radius:var(--ax-sys-border-radius)}ax-avatar.ax-rounded{border-radius:9999px}ax-avatar *{border-radius:inherit}ax-avatar ax-text{font-size:1.5rem;line-height:2rem}ax-avatar ax-icon,ax-avatar ax-text{display:flex;min-height:100%;min-width:100%;align-items:center;justify-content:center;background-color:rgba(var(--ax-comp-avatar-bg-color));color:rgba(var(--ax-comp-avatar-text-color));fill:rgba(var(--ax-comp-avatar-fill-color));border-width:var(--ax-comp-avatar-border-width, 0px);border-color:rgb(var(--ax-comp-avatar-border-color))}ax-avatar ax-badge{position:absolute}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
58
59
|
}
|
59
60
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXAvatarComponent, decorators: [{
|
60
61
|
type: Component,
|
61
|
-
args: [{ selector: 'ax-avatar', inputs: ['color'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-content select=\"ax-text, ax-image, ax-icon\"></ng-content>\n\n@if (!children()?.length) {\n <svg xmlns=\"http://www.w3.org/2000/svg\"
|
62
|
+
args: [{ selector: 'ax-avatar', inputs: ['color'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-content select=\"ax-text, ax-image, ax-icon\"></ng-content>\n\n@if (!children()?.length) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 512 512\">\n <g style=\"isolation: isolate\">\n <g id=\"Layer_2\" data-name=\"Layer 2\">\n <g id=\"Layer_1-2\" data-name=\"Layer 1\">\n <rect width=\"512\" height=\"512\" />\n <path\n d=\"M419.16,511.94s-2.85-154-142.28-176.19a139.93,139.93,0,0,0-22-1.67h0a55.8,55.8,0,0,0-5.93.29C99.25,350.35,96.26,511.94,96.26,511.94\"\n style=\"fill: rgba(var(--ax-sys-color-surface-light)); opacity: 0.7\"\n />\n <path\n d=\"M256,355.18c-17.29,0-32.22-4.63-46.38-12.41-3.86,1.31-8.15,2.93-11.75,4.46A96.48,96.48,0,0,0,256,366.62a100.29,100.29,0,0,0,60.07-20c-3.6-1.49-6.41-2.55-10.27-3.83C291.48,350.79,273.58,355.18,256,355.18Z\"\n style=\"opacity: 0.05\"\n />\n <circle cx=\"257.71\" cy=\"255.94\" r=\"99.24\" style=\"fill: rgba(var(--ax-sys-color-surface-light))\" />\n </g>\n </g>\n </g>\n </svg>\n}\n<ng-content select=\"ax-badge\"></ng-content>\n", styles: ["ax-avatar.ax-solid.ax-danger{--ax-comp-avatar-bg-color: var(--ax-sys-color-danger-500);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-danger);--ax-comp-avatar-text-color: var(--ax-sys-color-on-danger)}ax-avatar.ax-solid.ax-ghost{--ax-comp-avatar-bg-color: var(--ax-sys-color-ghost-50);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-ghost);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-ghost);--ax-comp-avatar-border-width: 1px;--ax-comp-avatar-border-color: var(--ax-sys-color-ghost-200)}ax-avatar.ax-solid.ax-primary{--ax-comp-avatar-bg-color: var(--ax-sys-color-primary-500);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-primary);--ax-comp-avatar-text-color: var(--ax-sys-color-on-primary)}ax-avatar.ax-solid.ax-secondary{--ax-comp-avatar-bg-color: var(--ax-sys-color-secondary-500);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-secondary);--ax-comp-avatar-text-color: var(--ax-sys-color-on-secondary)}ax-avatar.ax-solid.ax-success{--ax-comp-avatar-bg-color: var(--ax-sys-color-success-500);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-success);--ax-comp-avatar-text-color: var(--ax-sys-color-on-success)}ax-avatar.ax-solid.ax-warning{--ax-comp-avatar-bg-color: var(--ax-sys-color-warning-500);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-warning);--ax-comp-avatar-text-color: var(--ax-sys-color-on-warning)}ax-avatar.ax-twotone.ax-primary{--ax-comp-avatar-bg-color: var(--ax-sys-color-primary-200);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-primary);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-primary)}ax-avatar.ax-twotone.ax-success{--ax-comp-avatar-bg-color: var(--ax-sys-color-success-200);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-success);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-success)}ax-avatar.ax-twotone.ax-danger{--ax-comp-avatar-bg-color: var(--ax-sys-color-danger-200);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-danger);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-danger)}ax-avatar.ax-twotone.ax-warning{--ax-comp-avatar-bg-color: var(--ax-sys-color-warning-200);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-warning);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-warning)}ax-avatar.ax-twotone.ax-secondary{--ax-comp-avatar-bg-color: var(--ax-sys-color-secondary-200);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-secondary);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-secondary)}ax-avatar.ax-twotone.ax-ghost{--ax-comp-avatar-bg-color: var(--ax-sys-color-ghost-100);--ax-comp-avatar-text-color: var(--ax-sys-color-on-contrast-ghost);--ax-comp-avatar-fill-color: var(--ax-sys-color-on-contrast-ghost)}ax-avatar-group{display:flex}ax-avatar-group ax-avatar{margin:-.25rem;overflow:hidden;border-width:2px;border-color:rgba(var(--ax-sys-color-border-surface))}ax-avatar{position:relative;display:flex;justify-content:center}ax-avatar.ax-sharp{border-radius:0}ax-avatar.ax-soft{border-radius:var(--ax-sys-border-radius)}ax-avatar.ax-rounded{border-radius:9999px}ax-avatar *{border-radius:inherit}ax-avatar ax-text{font-size:1.5rem;line-height:2rem}ax-avatar ax-icon,ax-avatar ax-text{display:flex;min-height:100%;min-width:100%;align-items:center;justify-content:center;background-color:rgba(var(--ax-comp-avatar-bg-color));color:rgba(var(--ax-comp-avatar-text-color));fill:rgba(var(--ax-comp-avatar-fill-color));border-width:var(--ax-comp-avatar-border-width, 0px);border-color:rgb(var(--ax-comp-avatar-border-color))}ax-avatar ax-badge{position:absolute}\n"] }]
|
62
63
|
}], propDecorators: { __hostClass: [{
|
63
64
|
type: HostBinding,
|
64
65
|
args: ['class']
|