@acorex/components 18.12.20 → 18.12.22
Sign up to get free protection for your applications and to get access to all the features.
- package/conversation/lib/conversation-messages/conversation-message-audio/conversation-message-audio.component.d.ts +11 -32
- package/data-table/lib/columns/row-command-column.component.d.ts +3 -3
- package/drawer/lib/drawer/drawer-container/drawer-container.component.d.ts +2 -3
- package/drawer/lib/drawer/drawer-item/drawer.component.d.ts +7 -8
- package/esm2022/comment/lib/comment-item/comment-item.component.mjs +3 -3
- package/esm2022/conversation/lib/conversation-messages/conversation-message-audio/conversation-message-audio.component.mjs +30 -58
- package/esm2022/conversation/lib/services/conversation.service.mjs +1 -1
- package/esm2022/data-table/lib/columns/row-command-column.component.mjs +20 -10
- package/esm2022/datetime-box/lib/datetime-box.component.mjs +3 -3
- package/esm2022/drawer/lib/drawer/drawer-container/drawer-container.component.mjs +5 -7
- package/esm2022/drawer/lib/drawer/drawer-item/drawer.component.mjs +22 -26
- package/esm2022/image-editor/lib/image-editor-tools/image-editor-color-picker/image-editor-color-picker.component.mjs +6 -16
- package/esm2022/image-editor/lib/image-editor-tools/image-editor-crop/image-editor-crop.component.mjs +4 -3
- package/esm2022/image-editor/lib/image-editor-tools/image-editor-pen-mode-changer/image-editor-pen-mode-changer.component.mjs +4 -3
- package/esm2022/image-editor/lib/image-editor.module.mjs +8 -5
- package/esm2022/json-viewer/acorex-components-json-viewer.mjs +5 -0
- package/esm2022/json-viewer/index.mjs +3 -0
- package/esm2022/json-viewer/lib/json-viewer/json-viewer.component.mjs +36 -0
- package/esm2022/json-viewer/lib/json-viewer.module.mjs +23 -0
- package/esm2022/media-viewer/lib/media-viewer-thumbnail/media-viewer-thumbnail.component.mjs +5 -4
- package/esm2022/menu/lib/menu.module.mjs +2 -2
- package/esm2022/paint/lib/paint/paint-tools/paint-color-picker/paint-color-picker.component.mjs +5 -15
- package/esm2022/paint/lib/paint/paint-tools/paint-pen-mode-changer/paint-pen-mode-changer.component.mjs +4 -3
- package/esm2022/paint/lib/paint.module.mjs +8 -5
- package/esm2022/phone-box/lib/phone-box.component.mjs +26 -22
- package/esm2022/range-slider/lib/range-slider.component.mjs +7 -7
- package/esm2022/slider/lib/slider.component.mjs +2 -2
- package/esm2022/step-wizard/lib/step-wizard-item/step-wizard-item.component.mjs +2 -2
- package/esm2022/text-box/lib/text-box.component.mjs +5 -4
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +2 -2
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +29 -57
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +19 -9
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +2 -2
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +25 -31
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +19 -23
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +63 -0
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -0
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +4 -3
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-nav.mjs.map +1 -1
- package/fesm2022/acorex-components-navbar.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +14 -18
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +26 -22
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +6 -6
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-scss.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- 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-step-wizard.mjs +2 -2
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +4 -3
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/image-editor/lib/image-editor-tools/image-editor-color-picker/image-editor-color-picker.component.d.ts +0 -10
- package/image-editor/lib/image-editor.module.d.ts +3 -2
- package/json-viewer/README.md +3 -0
- package/json-viewer/index.d.ts +2 -0
- package/json-viewer/lib/json-viewer/json-viewer.component.d.ts +11 -0
- package/json-viewer/lib/json-viewer.module.d.ts +10 -0
- package/media-viewer/lib/media-viewer-thumbnail/media-viewer-thumbnail.component.d.ts +1 -1
- package/package.json +57 -51
- package/paint/lib/paint/paint-tools/paint-color-picker/paint-color-picker.component.d.ts +0 -10
- package/paint/lib/paint.module.d.ts +3 -2
- package/phone-box/lib/phone-box.component.d.ts +24 -22
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-dialog.mjs","sources":["../../../../libs/components/dialog/src/lib/dialog.component.ts","../../../../libs/components/dialog/src/lib/dialog.component.html","../../../../libs/components/dialog/src/lib/dialog.service.ts","../../../../libs/components/dialog/src/lib/dialog.module.ts","../../../../libs/components/dialog/src/acorex-components-dialog.ts"],"sourcesContent":["import { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { ChangeDetectionStrategy, Component, HostBinding, Inject, ViewEncapsulation } from '@angular/core';\nimport { AXDialogButtonItem, AXDialogData } from './dialog.class';\n\n/**\n * A dialog component that provides a modal interface for user interactions. \n * @category Components\n */\n@Component({\n selector: 'ax-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXClosbaleComponent,\n useExisting: AXDialogComponent,\n },\n ],\n})\nexport class AXDialogComponent extends MXBaseComponent {\n /**\n * @ignore\n */\n protected _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n protected data: AXDialogData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n /**\n * @ignore\n */\n protected _handleButtonClick(button: AXDialogButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n /**\n * @ignore\n */\n protected _hasAutoFocus(button: AXDialogButtonItem) {\n const result = button.autofocus || this.data.buttons.length == 1 || !this.data.buttons.some((c) => c.autofocus);\n return result;\n }\n\n /**\n * Closes the dialog.\n * @ignore\n */\n close() {\n this.dialogRef.close();\n }\n\n /**\n * @ignore\n */\n @HostBinding('attr.tabIndex') get tabIndex() {\n return '-1';\n }\n}\n","<div class=\"ax-dialog ax-{{ data.type }}-default ax-orientation-{{ data.orientation }}\" tabindex=\"-1\" cdkDrag\n cdkDragHandle [cdkDragDisabled]=\"!data.draggable\">\n <div class=\"ax-dialog-content-wrapper\">\n @if(data.icon !== 'none'){\n <div class=\"ax-dialog-icon-side\">\n <i class=\"ax-dialog-icon {{ data.icon }}\"></i>\n </div>\n }\n <div class=\"ax-dialog-content-side\">\n <div class=\"ax-dialog-title\">{{ data.title }}</div>\n <div class=\"ax-dialog-content\">{{ data.content }}</div>\n </div>\n <div class=\"ax-dialog-dismiss-icon\">\n @if(data.closeButton){\n <i class=\"ax-icon ax-icon-close\"></i>\n }\n </div>\n </div>\n <ax-footer>\n @for(button of data.buttons; let i = $index; track i){\n <ax-button [text]=\"button.text | translate | async \" [tabindex]=\"i\" [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\" (onClick)=\"_handleButtonClick(button)\" [look]=\"button.look\"\n [disabled]=\"button.disabled\" [color]=\"button.color\">\n @if(button.loading){\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n\n </ax-footer>\n</div>","import { AXStyleColorType } from '@acorex/components/common';\nimport { Dialog } from '@angular/cdk/dialog';\nimport { Injectable, inject } from '@angular/core';\nimport { AXDialogConfig, AXDialogRef } from './dialog.class';\nimport { AXDialogComponent } from './dialog.component';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Injectable()\nexport class AXDialogService {\n private dialog: Dialog = inject(Dialog);\n\n private detectIcon(type) {\n let icon: string;\n switch (type) {\n case 'success':\n icon = 'ax-icon ax-icon-check';\n break;\n case 'danger':\n icon = 'ax-icon ax-icon-error';\n break;\n case 'warning':\n icon = 'ax-icon ax-icon-warning';\n break;\n default:\n icon = 'ax-icon ax-icon-info';\n break;\n }\n return icon;\n }\n /**\n * Show an alert box with 'Okay' button.\n */\n alert(\n title: string,\n content: string,\n type: AXStyleColorType = 'primary',\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n draggable?: boolean,\n ): Promise<void> {\n return new Promise((resolve) => {\n const popup = this.open({\n title,\n type: type,\n content,\n icon: this.detectIcon(type),\n orientation,\n draggable,\n buttons: [\n {\n name: 'confirm',\n text: 'okay',\n color: type,\n autofocus: true,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve();\n }\n },\n },\n ],\n });\n });\n }\n\n /**\n * Show a confirm box with 'Okay' & 'Cancel' buttons.\n */\n\n confirm(\n title: string,\n content: string,\n type: AXStyleColorType = 'primary',\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n draggable?: boolean,\n ): Promise<{ result: boolean }> {\n return new Promise<{ result: boolean }>((resolve) => {\n const popup = this.open({\n title,\n content,\n type,\n icon: this.detectIcon(type),\n orientation,\n draggable,\n buttons: [\n {\n name: 'confirm',\n text: 'okay',\n color: type,\n autofocus: true,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve({ result: true });\n }\n },\n },\n {\n name: 'cancel',\n text: 'cancel',\n color: `ghost`,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve({ result: false });\n }\n },\n hotkey: {\n Escape: () => {\n popup.close();\n if (resolve) {\n resolve({ result: false });\n }\n },\n },\n },\n ],\n });\n });\n }\n\n /**\n * Show a custom dialog box.\n */\n show(options: AXDialogConfig): Promise<{ name: string }> {\n return new Promise((resolve) => {\n const popup = this.open(options);\n options.orientation = options.orientation || 'horizontal';\n (options.icon = options.icon ?? this.detectIcon(options.type)),\n options.buttons?.forEach((b) => {\n const orginalClick = b.onClick;\n b.onClick = () => {\n const e = { source: b, handled: false };\n if (orginalClick) {\n orginalClick(e);\n if (e.handled) {\n resolve({ name: b.name ?? b.text });\n } else {\n popup.close();\n resolve({ name: b.name ?? b.text });\n }\n } else if (resolve) {\n popup.close();\n resolve({ name: b.name ?? b.text });\n } else {\n popup.close();\n }\n };\n });\n });\n }\n\n open(config: AXDialogConfig): AXDialogRef {\n const dialogRef = this.dialog.open(AXDialogComponent, {\n data: config,\n role: 'alertdialog',\n ariaModal: true,\n restoreFocus: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: true,\n disableClose: true,\n panelClass: ['ax-animate-bounceIn', 'ax-animate-faster'],\n });\n return {\n close: () => {\n dialogRef.componentInstance?.close();\n },\n };\n }\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXCommonModule, AXHotkeysService } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDialogComponent } from './dialog.component';\nimport { AXDialogService } from './dialog.service';\n\nconst COMPONENT = [AXDialogComponent];\nconst MODULES = [\n CommonModule,\n AXCommonModule,\n DragDropModule,\n A11yModule,\n AXButtonModule,\n AXDecoratorModule,\n AXLoadingModule,\n DialogModule,\n AXTranslationModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXDialogService, AXHotkeysService],\n})\nexport class AXDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAKA;;;AAGG;AAcG,MAAO,iBAAkB,SAAQ,eAAe,CAAA;AAMpD;;AAEG;IACH,WAEY,CAAA,IAAkB,EACpB,SAA2C,EAAA;AAEnD,QAAA,KAAK,EAAE,CAAC;QAHE,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAc;QACpB,IAAS,CA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c,EAAA,YAAA,EAAA,CAnBR,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAElC,YAAY;YACZ,cAAc;YACd,cAAc;YACd,UAAU;YACV,cAAc;YACd,iBAAiB;YACjB,eAAe;YACf,YAAY;AACZ,YAAA,mBAAmB,aAVF,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;AAmBvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,aAFd,CAAC,eAAe,EAAE,gBAAgB,CAAC,YAFjC,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,CAAC,eAAe,EAAE,gBAAgB,CAAC;AAC/C,iBAAA,CAAA;;;AC/BD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-dialog.mjs","sources":["../../../../libs/components/dialog/src/lib/dialog.component.ts","../../../../libs/components/dialog/src/lib/dialog.component.html","../../../../libs/components/dialog/src/lib/dialog.service.ts","../../../../libs/components/dialog/src/lib/dialog.module.ts","../../../../libs/components/dialog/src/acorex-components-dialog.ts"],"sourcesContent":["import { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { ChangeDetectionStrategy, Component, HostBinding, Inject, ViewEncapsulation } from '@angular/core';\nimport { AXDialogButtonItem, AXDialogData } from './dialog.class';\n\n/**\n * A dialog component that provides a modal interface for user interactions. \n * @category Components\n */\n@Component({\n selector: 'ax-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXClosbaleComponent,\n useExisting: AXDialogComponent,\n },\n ],\n})\nexport class AXDialogComponent extends MXBaseComponent {\n /**\n * @ignore\n */\n protected _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n protected data: AXDialogData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n /**\n * @ignore\n */\n protected _handleButtonClick(button: AXDialogButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n /**\n * @ignore\n */\n protected _hasAutoFocus(button: AXDialogButtonItem) {\n const result = button.autofocus || this.data.buttons.length == 1 || !this.data.buttons.some((c) => c.autofocus);\n return result;\n }\n\n /**\n * Closes the dialog.\n * @ignore\n */\n close() {\n this.dialogRef.close();\n }\n\n /**\n * @ignore\n */\n @HostBinding('attr.tabIndex') get tabIndex() {\n return '-1';\n }\n}\n","<div class=\"ax-dialog ax-{{ data.type }}-default ax-orientation-{{ data.orientation }}\" tabindex=\"-1\" cdkDrag\n cdkDragHandle [cdkDragDisabled]=\"!data.draggable\">\n <div class=\"ax-dialog-content-wrapper\">\n @if(data.icon !== 'none'){\n <div class=\"ax-dialog-icon-side\">\n <i class=\"ax-dialog-icon {{ data.icon }}\"></i>\n </div>\n }\n <div class=\"ax-dialog-content-side\">\n <div class=\"ax-dialog-title\">{{ data.title }}</div>\n <div class=\"ax-dialog-content\">{{ data.content }}</div>\n </div>\n <div class=\"ax-dialog-dismiss-icon\">\n @if(data.closeButton){\n <i class=\"ax-icon ax-icon-close\"></i>\n }\n </div>\n </div>\n <ax-footer>\n @for(button of data.buttons; let i = $index; track i){\n <ax-button [text]=\"button.text | translate | async \" [tabindex]=\"i\" [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\" (onClick)=\"_handleButtonClick(button)\" [look]=\"button.look\"\n [disabled]=\"button.disabled\" [color]=\"button.color\">\n @if(button.loading){\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n\n </ax-footer>\n</div>","import { AXStyleColorType } from '@acorex/components/common';\nimport { Dialog } from '@angular/cdk/dialog';\nimport { Injectable, inject } from '@angular/core';\nimport { AXDialogConfig, AXDialogRef } from './dialog.class';\nimport { AXDialogComponent } from './dialog.component';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Injectable()\nexport class AXDialogService {\n private dialog: Dialog = inject(Dialog);\n\n private detectIcon(type) {\n let icon: string;\n switch (type) {\n case 'success':\n icon = 'ax-icon ax-icon-check';\n break;\n case 'danger':\n icon = 'ax-icon ax-icon-error';\n break;\n case 'warning':\n icon = 'ax-icon ax-icon-warning';\n break;\n default:\n icon = 'ax-icon ax-icon-info';\n break;\n }\n return icon;\n }\n /**\n * Show an alert box with 'Okay' button.\n */\n alert(\n title: string,\n content: string,\n type: AXStyleColorType = 'primary',\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n draggable?: boolean,\n ): Promise<void> {\n return new Promise((resolve) => {\n const popup = this.open({\n title,\n type: type,\n content,\n icon: this.detectIcon(type),\n orientation,\n draggable,\n buttons: [\n {\n name: 'confirm',\n text: 'okay',\n color: type,\n autofocus: true,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve();\n }\n },\n },\n ],\n });\n });\n }\n\n /**\n * Show a confirm box with 'Okay' & 'Cancel' buttons.\n */\n\n confirm(\n title: string,\n content: string,\n type: AXStyleColorType = 'primary',\n orientation: 'horizontal' | 'vertical' = 'horizontal',\n draggable?: boolean,\n ): Promise<{ result: boolean }> {\n return new Promise<{ result: boolean }>((resolve) => {\n const popup = this.open({\n title,\n content,\n type,\n icon: this.detectIcon(type),\n orientation,\n draggable,\n buttons: [\n {\n name: 'confirm',\n text: 'okay',\n color: type,\n autofocus: true,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve({ result: true });\n }\n },\n },\n {\n name: 'cancel',\n text: 'cancel',\n color: `ghost`,\n onClick: () => {\n popup.close();\n if (resolve) {\n resolve({ result: false });\n }\n },\n hotkey: {\n Escape: () => {\n popup.close();\n if (resolve) {\n resolve({ result: false });\n }\n },\n },\n },\n ],\n });\n });\n }\n\n /**\n * Show a custom dialog box.\n */\n show(options: AXDialogConfig): Promise<{ name: string }> {\n return new Promise((resolve) => {\n const popup = this.open(options);\n options.orientation = options.orientation || 'horizontal';\n (options.icon = options.icon ?? this.detectIcon(options.type)),\n options.buttons?.forEach((b) => {\n const orginalClick = b.onClick;\n b.onClick = () => {\n const e = { source: b, handled: false };\n if (orginalClick) {\n orginalClick(e);\n if (e.handled) {\n resolve({ name: b.name ?? b.text });\n } else {\n popup.close();\n resolve({ name: b.name ?? b.text });\n }\n } else if (resolve) {\n popup.close();\n resolve({ name: b.name ?? b.text });\n } else {\n popup.close();\n }\n };\n });\n });\n }\n\n open(config: AXDialogConfig): AXDialogRef {\n const dialogRef = this.dialog.open(AXDialogComponent, {\n data: config,\n role: 'alertdialog',\n ariaModal: true,\n restoreFocus: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: true,\n disableClose: true,\n panelClass: ['ax-animate-bounceIn', 'ax-animate-faster'],\n });\n return {\n close: () => {\n dialogRef.componentInstance?.close();\n },\n };\n }\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXCommonModule, AXHotkeysService } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDialogComponent } from './dialog.component';\nimport { AXDialogService } from './dialog.service';\n\nconst COMPONENT = [AXDialogComponent];\nconst MODULES = [\n CommonModule,\n AXCommonModule,\n DragDropModule,\n A11yModule,\n AXButtonModule,\n AXDecoratorModule,\n AXLoadingModule,\n DialogModule,\n AXTranslationModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXDialogService, AXHotkeysService],\n})\nexport class AXDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAKA;;;AAGG;AAcG,MAAO,iBAAkB,SAAQ,eAAe,CAAA;AAMpD;;AAEG;IACH,WAEY,CAAA,IAAkB,EACpB,SAA2C,EAAA;AAEnD,QAAA,KAAK,EAAE;QAHG,IAAI,CAAA,IAAA,GAAJ,IAAI;QACN,IAAS,CAAA,SAAA,GAAT,SAAS;;AAKjB;;AAEC;AACO,IAAA,kBAAkB,CAAC,MAA0B,EAAA;AACrD,QAAA,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;;;AAIpC;;AAEC;AACO,IAAA,aAAa,CAAC,MAA0B,EAAA;AAChD,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC;AAC/G,QAAA,OAAO,MAAM;;AAGf;;;AAGC;IACD,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;;AAGtB;;AAEC;AACH,IAAA,IAAkC,QAAQ,GAAA;AACxC,QAAA,OAAO,IAAI;;AA9CF,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAA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c,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAd,cAAc,EAAA,YAAA,EAAA,CAnBR,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAElC,YAAY;YACZ,cAAc;YACd,cAAc;YACd,UAAU;YACV,cAAc;YACd,iBAAiB;YACjB,eAAe;YACf,YAAY;AACZ,YAAA,mBAAmB,aAVF,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAmBvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,aAFd,CAAC,eAAe,EAAE,gBAAgB,CAAC,YAFjC,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,CAAC,eAAe,EAAE,gBAAgB,CAAC;AAC/C,iBAAA;;;AC/BD;;AAEG;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { signal, Injectable, inject, afterNextRender, Component, ChangeDetectionStrategy, ViewEncapsulation, model, input,
|
3
|
+
import { signal, Injectable, inject, afterNextRender, Component, ChangeDetectionStrategy, ViewEncapsulation, model, input, HostBinding, NgModule } from '@angular/core';
|
4
4
|
import { MXBaseComponent, AXComponent, AXClosbaleComponent } from '@acorex/components/common';
|
5
5
|
import { isBrowser } from '@acorex/core/platform';
|
6
6
|
|
@@ -31,17 +31,15 @@ class AXDrawerContainerComponent extends MXBaseComponent {
|
|
31
31
|
}
|
32
32
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXDrawerContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
33
33
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXDrawerContainerComponent, selector: "ax-drawer-container", providers: [AXDrawerService], usesInheritance: true, ngImport: i0, template: `
|
34
|
-
<ng-content select="ax-drawer
|
35
|
-
<ng-content select="ax-content"
|
36
|
-
<ng-content select="ax-drawer[location='end']"> </ng-content>
|
34
|
+
<ng-content select="ax-drawer"> </ng-content>
|
35
|
+
<ng-content select="ax-content"></ng-content>
|
37
36
|
`, isInline: true, styles: ["ax-drawer-container{position:relative;display:flex;height:100%;width:100%;overflow:hidden}ax-drawer-container.ax-fixed{bottom:0;inset-inline-end:0px;inset-inline-start:0px;top:0;z-index:50;display:none}ax-drawer-container.ax-fixed.ax-visible{display:flex}ax-drawer-container .ax-backdrop{position:absolute;bottom:0;top:0;z-index:10;height:100%;width:100%;background-color:#0003;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer-container>ax-content{height:100%;flex:1 1 0%;overflow:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
38
37
|
}
|
39
38
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXDrawerContainerComponent, decorators: [{
|
40
39
|
type: Component,
|
41
40
|
args: [{ selector: 'ax-drawer-container', template: `
|
42
|
-
<ng-content select="ax-drawer
|
43
|
-
<ng-content select="ax-content"
|
44
|
-
<ng-content select="ax-drawer[location='end']"> </ng-content>
|
41
|
+
<ng-content select="ax-drawer"> </ng-content>
|
42
|
+
<ng-content select="ax-content"></ng-content>
|
45
43
|
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [AXDrawerService], styles: ["ax-drawer-container{position:relative;display:flex;height:100%;width:100%;overflow:hidden}ax-drawer-container.ax-fixed{bottom:0;inset-inline-end:0px;inset-inline-start:0px;top:0;z-index:50;display:none}ax-drawer-container.ax-fixed.ax-visible{display:flex}ax-drawer-container .ax-backdrop{position:absolute;bottom:0;top:0;z-index:10;height:100%;width:100%;background-color:#0003;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer-container>ax-content{height:100%;flex:1 1 0%;overflow:auto}\n"] }]
|
46
44
|
}], ctorParameters: () => [] });
|
47
45
|
|
@@ -60,16 +58,11 @@ class AXDrawerComponent extends MXBaseComponent {
|
|
60
58
|
this.location = model('start');
|
61
59
|
this.showBackdrop = input(true);
|
62
60
|
this.mode = model('overlay');
|
63
|
-
this.collapsed = model(true);
|
64
61
|
this.closeOthers = input(false);
|
62
|
+
this.collapsed = model(true);
|
65
63
|
this.backdropElement = signal(null);
|
66
64
|
this.loaded = signal(false);
|
67
65
|
this.service = inject(AXDrawerService);
|
68
|
-
effect(() => {
|
69
|
-
if (this.mode() === 'overlay' && !this.collapsed() && this.showBackdrop()) {
|
70
|
-
this._addBackdrop();
|
71
|
-
}
|
72
|
-
}, { allowSignalWrites: true });
|
73
66
|
}
|
74
67
|
/**
|
75
68
|
* @ignore
|
@@ -101,27 +94,26 @@ class AXDrawerComponent extends MXBaseComponent {
|
|
101
94
|
* Toggles the collapsed state of the drawer.
|
102
95
|
*/
|
103
96
|
toggle() {
|
104
|
-
if (
|
105
|
-
this.
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
});
|
97
|
+
if (this.collapsed()) {
|
98
|
+
this.open();
|
99
|
+
}
|
100
|
+
else {
|
101
|
+
this.close();
|
110
102
|
}
|
111
|
-
this.collapsed.update((prev) => !prev);
|
112
103
|
}
|
113
104
|
/**
|
114
105
|
* Collapses the drawer.
|
115
106
|
* @ignore
|
116
107
|
*/
|
117
108
|
close() {
|
118
|
-
this._removeBackdrop();
|
119
109
|
this.collapsed.set(true);
|
110
|
+
this._removeBackdrop();
|
120
111
|
}
|
121
112
|
/**
|
122
113
|
* Expands the drawer.
|
123
114
|
*/
|
124
115
|
open() {
|
116
|
+
this.collapsed.set(false);
|
125
117
|
if (!this.closeOthers()) {
|
126
118
|
this.service.drawerElements().forEach((element) => {
|
127
119
|
if (element.location() === this.location() && element.id !== this.id) {
|
@@ -129,13 +121,9 @@ class AXDrawerComponent extends MXBaseComponent {
|
|
129
121
|
}
|
130
122
|
});
|
131
123
|
}
|
132
|
-
this.
|
133
|
-
|
134
|
-
|
135
|
-
* @ignore
|
136
|
-
*/
|
137
|
-
get __hostClass() {
|
138
|
-
return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${this.collapsed() ? 'ax-collapsed' : 'ax-expanded'} ${this.loaded() ? 'ax-state-loaded' : ''}`;
|
124
|
+
if (this.showBackdrop() && this.mode() === 'overlay') {
|
125
|
+
this._addBackdrop();
|
126
|
+
}
|
139
127
|
}
|
140
128
|
/**
|
141
129
|
* @ignore
|
@@ -168,14 +156,20 @@ class AXDrawerComponent extends MXBaseComponent {
|
|
168
156
|
});
|
169
157
|
}
|
170
158
|
}
|
159
|
+
/**
|
160
|
+
* @ignore
|
161
|
+
*/
|
162
|
+
get __hostClass() {
|
163
|
+
return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${this.collapsed() ? 'ax-collapsed' : 'ax-expanded'} ${this.loaded() && 'ax-state-loaded'}`;
|
164
|
+
}
|
171
165
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXDrawerComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
172
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXDrawerComponent, selector: "ax-drawer", inputs: { location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null },
|
166
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXDrawerComponent, selector: "ax-drawer", inputs: { location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, closeOthers: { classPropertyName: "closeOthers", publicName: "closeOthers", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { location: "locationChange", mode: "modeChange", collapsed: "collapsedChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
|
173
167
|
{ provide: AXComponent, useExisting: AXDrawerComponent },
|
174
168
|
{ provide: AXClosbaleComponent, useExisting: AXDrawerComponent },
|
175
169
|
], usesInheritance: true, ngImport: i0, template: `
|
176
170
|
<ng-content select="ax-header"></ng-content>
|
177
171
|
<ng-content select="ax-content"></ng-content>
|
178
|
-
`, isInline: true, styles: ["ax-drawer{display:flex;height:100%;max-width:95%;flex-direction:column;background-color:rgba(var(--ax-color-surface))}ax-drawer.ax-state-loaded{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer ax-header,ax-drawer ax-footer{padding:.75rem}ax-drawer ax-footer{border-top-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer ax-header{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer>ax-content{flex:1 1 0%;overflow:auto}ax-drawer.ax-drawer-overlay{position:absolute}ax-drawer.ax-drawer-overlay.ax-expanded{z-index:20}ax-drawer.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-push{flex:0 1 auto}ax-drawer.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0px
|
172
|
+
`, isInline: true, styles: ["ax-drawer{display:flex;height:100%;max-width:95%;flex-direction:column;background-color:rgba(var(--ax-color-surface))}ax-drawer.ax-state-loaded{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer ax-header,ax-drawer ax-footer{padding:.75rem}ax-drawer ax-footer{border-top-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer ax-header{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer>ax-content{flex:1 1 0%;overflow:auto}ax-drawer.ax-drawer-overlay{position:absolute}ax-drawer.ax-drawer-overlay.ax-expanded{z-index:20}ax-drawer.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-push{flex:0 1 auto}ax-drawer.ax-drawer-push.ax-expanded{z-index:20}ax-drawer.ax-drawer-push.ax-collapsed{z-index:0}ax-drawer.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0px}ax-drawer.ax-drawer-push.ax-drawer-start.ax-collapsed{margin-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-push.ax-drawer-end{order:9999}ax-drawer.ax-drawer-push.ax-drawer-end.ax-expanded{margin-inline-end:0px}ax-drawer.ax-drawer-push.ax-drawer-end.ax-collapsed{margin-inline-end:calc(-1 * var(--ax-el-width))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
179
173
|
}
|
180
174
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXDrawerComponent, decorators: [{
|
181
175
|
type: Component,
|
@@ -185,7 +179,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
185
179
|
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
186
180
|
{ provide: AXComponent, useExisting: AXDrawerComponent },
|
187
181
|
{ provide: AXClosbaleComponent, useExisting: AXDrawerComponent },
|
188
|
-
], styles: ["ax-drawer{display:flex;height:100%;max-width:95%;flex-direction:column;background-color:rgba(var(--ax-color-surface))}ax-drawer.ax-state-loaded{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer ax-header,ax-drawer ax-footer{padding:.75rem}ax-drawer ax-footer{border-top-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer ax-header{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer>ax-content{flex:1 1 0%;overflow:auto}ax-drawer.ax-drawer-overlay{position:absolute}ax-drawer.ax-drawer-overlay.ax-expanded{z-index:20}ax-drawer.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-push{flex:0 1 auto}ax-drawer.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0px
|
182
|
+
], styles: ["ax-drawer{display:flex;height:100%;max-width:95%;flex-direction:column;background-color:rgba(var(--ax-color-surface))}ax-drawer.ax-state-loaded{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer ax-header,ax-drawer ax-footer{padding:.75rem}ax-drawer ax-footer{border-top-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer ax-header{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer>ax-content{flex:1 1 0%;overflow:auto}ax-drawer.ax-drawer-overlay{position:absolute}ax-drawer.ax-drawer-overlay.ax-expanded{z-index:20}ax-drawer.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-push{flex:0 1 auto}ax-drawer.ax-drawer-push.ax-expanded{z-index:20}ax-drawer.ax-drawer-push.ax-collapsed{z-index:0}ax-drawer.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0px}ax-drawer.ax-drawer-push.ax-drawer-start.ax-collapsed{margin-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-push.ax-drawer-end{order:9999}ax-drawer.ax-drawer-push.ax-drawer-end.ax-expanded{margin-inline-end:0px}ax-drawer.ax-drawer-push.ax-drawer-end.ax-collapsed{margin-inline-end:calc(-1 * var(--ax-el-width))}\n"] }]
|
189
183
|
}], ctorParameters: () => [{ type: i0.NgZone }], propDecorators: { __hostClass: [{
|
190
184
|
type: HostBinding,
|
191
185
|
args: ['class']
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-drawer.mjs","sources":["../../../../libs/components/drawer/src/lib/drawer.service.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-container/drawer-container.component.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-item/drawer.component.ts","../../../../libs/components/drawer/src/lib/drawer.module.ts","../../../../libs/components/drawer/src/acorex-components-drawer.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\n@Injectable()\nexport class AXDrawerService {\n drawerElements = signal<AXDrawerComponent[]>(null);\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\nimport { AXDrawerComponent } from '../drawer-item/drawer.component';\n\n/**\n * A container component that organizes and positions drawer components.\n * @category component\n */\n@Component({\n selector: 'ax-drawer-container',\n template: `\n <ng-content select=\"ax-drawer[location='start']\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n <ng-content select=\"ax-drawer[location='end']\"> </ng-content>\n `,\n styleUrls: ['./drawer-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [AXDrawerService],\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n service = inject(AXDrawerService);\n\n constructor() {\n super();\n afterNextRender(() => {\n const host = this.getHostElement();\n const drawerClasses = Array.from(host.querySelectorAll(`ax-drawer`)).map(\n (c) => c['__axContext__'] as AXDrawerComponent,\n );\n this.service.drawerElements.set(drawerClasses);\n });\n }\n}\n","import { AXClosbaleComponent, AXComponent, MXBaseComponent } from '@acorex/components/common';\nimport { isBrowser } from '@acorex/core/platform';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n effect,\n HostBinding,\n inject,\n input,\n model,\n NgZone,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\n\nexport type AXDrawerMode = 'push' | 'overlay';\nexport type AXDrawerLocation = 'start' | 'end';\n\n/**\n * A component that represents a drawer with header and content sections.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-drawer',\n template: `\n <ng-content select=\"ax-header\"></ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDrawerComponent },\n { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },\n ],\n})\nexport class AXDrawerComponent extends MXBaseComponent implements AfterContentInit, DoCheck {\n location = model<AXDrawerLocation>('start');\n\n showBackdrop = input(true);\n\n mode = model<AXDrawerMode>('overlay');\n\n collapsed = model(true);\n\n closeOthers = input(false);\n\n private backdropElement = signal<HTMLElement>(null);\n\n private loaded = signal(false);\n\n service = inject(AXDrawerService);\n\n /**\n * @ignore\n */\n constructor(private _zone: NgZone) {\n super();\n effect(\n () => {\n if (this.mode() === 'overlay' && !this.collapsed() && this.showBackdrop()) {\n this._addBackdrop();\n }\n },\n { allowSignalWrites: true },\n );\n }\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n this._detectBoundingSize();\n setTimeout(() => {\n this.loaded.set(true);\n }, 5000);\n }\n\n /**\n * @ignore\n */\n ngDoCheck() {\n this._detectBoundingSize();\n }\n\n /**\n * @ignore\n */\n private _detectBoundingSize() {\n this._zone.runOutsideAngular(() => {\n const host = this.getHostElement();\n if (host.clientWidth) {\n host.style.setProperty('--ax-el-width', `${host.clientWidth}px`);\n }\n });\n }\n\n /**\n * Toggles the collapsed state of the drawer.\n */\n toggle() {\n if (!this.closeOthers()) {\n this.service.drawerElements().forEach((element) => {\n if (element.location() === this.location() && element.id !== this.id) {\n element.close();\n }\n });\n }\n this.collapsed.update((prev) => !prev);\n }\n\n /**\n * Collapses the drawer.\n * @ignore\n */\n close() {\n this._removeBackdrop();\n this.collapsed.set(true);\n }\n\n /**\n * Expands the drawer.\n */\n open() {\n if (!this.closeOthers()) {\n this.service.drawerElements().forEach((element) => {\n if (element.location() === this.location() && element.id !== this.id) {\n element.close();\n }\n });\n }\n this.collapsed.set(false);\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${\n this.collapsed() ? 'ax-collapsed' : 'ax-expanded'\n } ${this.loaded() ? 'ax-state-loaded' : ''}`;\n }\n\n /**\n * @ignore\n */\n private _addBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n const backDropElem = document.createElement('div');\n backDropElem.classList.add('ax-backdrop');\n backDropElem.onclick = () => {\n this._zone.run(() => {\n this.close();\n });\n };\n this.getHostElement()?.parentElement?.appendChild(backDropElem);\n this.backdropElement.set(backDropElem);\n });\n }\n }\n\n /**\n * @ignore\n */\n private _removeBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n if (this.backdropElement()) {\n this.getHostElement()?.parentElement?.removeChild(this.backdropElement());\n this.backdropElement.set(null);\n }\n });\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDrawerContainerComponent } from './drawer/drawer-container/drawer-container.component';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\nconst COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAIa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAC;AACpD,KAAA;8GAFY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;kHAAf,eAAe,EAAA,CAAA,CAAA,EAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;;;ACQX;;;AAGG;AAaG,MAAO,0BAA2B,SAAQ,eAAe,CAAA;AAG7D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;AAHV,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAIhC,eAAe,CAAC,MAAK;AACnB,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;YACnC,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA,SAAA,CAAW,CAAC,CAAC,CAAC,GAAG,CACtE,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAAsB,CAC/C,CAAC;YACF,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AACjD,SAAC,CAAC,CAAC;KACJ;8GAZU,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,C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O,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-drawer.mjs","sources":["../../../../libs/components/drawer/src/lib/drawer.service.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-container/drawer-container.component.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-item/drawer.component.ts","../../../../libs/components/drawer/src/lib/drawer.module.ts","../../../../libs/components/drawer/src/acorex-components-drawer.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\n@Injectable()\nexport class AXDrawerService {\n drawerElements = signal<AXDrawerComponent[]>(null);\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\nimport { AXDrawerComponent } from '../drawer-item/drawer.component';\n\n/**\n * A container component that organizes and positions drawer components.\n * @category component\n */\n@Component({\n selector: 'ax-drawer-container',\n template: `\n <ng-content select=\"ax-drawer\"> </ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [AXDrawerService],\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n private service = inject(AXDrawerService);\n\n constructor() {\n super();\n afterNextRender(() => {\n const host = this.getHostElement();\n const drawerClasses = Array.from(host.querySelectorAll(`ax-drawer`)).map(\n (c) => c['__axContext__'] as AXDrawerComponent,\n );\n this.service.drawerElements.set(drawerClasses);\n });\n }\n}\n","import { AXClosbaleComponent, AXComponent, MXBaseComponent } from '@acorex/components/common';\nimport { isBrowser } from '@acorex/core/platform';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n HostBinding,\n inject,\n input,\n model,\n NgZone,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\n\nexport type AXDrawerMode = 'push' | 'overlay';\nexport type AXDrawerLocation = 'start' | 'end';\n\n/**\n * A component that represents a drawer with header and content sections.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-drawer',\n template: `\n <ng-content select=\"ax-header\"></ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDrawerComponent },\n { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },\n ],\n})\nexport class AXDrawerComponent extends MXBaseComponent implements AfterContentInit, DoCheck {\n location = model<AXDrawerLocation>('start');\n\n showBackdrop = input(true);\n\n mode = model<AXDrawerMode>('overlay');\n\n closeOthers = input(false);\n\n collapsed = model(true);\n\n private backdropElement = signal<HTMLElement>(null);\n\n protected loaded = signal(false);\n\n private service = inject(AXDrawerService);\n\n /**\n * @ignore\n */\n constructor(private _zone: NgZone) {\n super();\n }\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n this._detectBoundingSize();\n setTimeout(() => {\n this.loaded.set(true);\n }, 5000);\n }\n\n /**\n * @ignore\n */\n ngDoCheck() {\n this._detectBoundingSize();\n }\n\n /**\n * @ignore\n */\n private _detectBoundingSize() {\n this._zone.runOutsideAngular(() => {\n const host = this.getHostElement();\n if (host.clientWidth) {\n host.style.setProperty('--ax-el-width', `${host.clientWidth}px`);\n }\n });\n }\n\n /**\n * Toggles the collapsed state of the drawer.\n */\n toggle() {\n if (this.collapsed()) {\n this.open();\n } else {\n this.close();\n }\n }\n\n /**\n * Collapses the drawer.\n * @ignore\n */\n close() {\n this.collapsed.set(true);\n this._removeBackdrop();\n }\n\n /**\n * Expands the drawer.\n */\n open() {\n this.collapsed.set(false);\n\n if (!this.closeOthers()) {\n this.service.drawerElements().forEach((element) => {\n if (element.location() === this.location() && element.id !== this.id) {\n element.close();\n }\n });\n }\n\n if (this.showBackdrop() && this.mode() === 'overlay') {\n this._addBackdrop();\n }\n }\n\n /**\n * @ignore\n */\n private _addBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n const backDropElem = document.createElement('div');\n backDropElem.classList.add('ax-backdrop');\n backDropElem.onclick = () => {\n this._zone.run(() => {\n this.close();\n });\n };\n this.getHostElement()?.parentElement?.appendChild(backDropElem);\n this.backdropElement.set(backDropElem);\n });\n }\n }\n\n /**\n * @ignore\n */\n private _removeBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n if (this.backdropElement()) {\n this.getHostElement()?.parentElement?.removeChild(this.backdropElement());\n this.backdropElement.set(null);\n }\n });\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${\n this.collapsed() ? 'ax-collapsed' : 'ax-expanded'\n } ${this.loaded() && 'ax-state-loaded'}`;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDrawerContainerComponent } from './drawer/drawer-container/drawer-container.component';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\nconst COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport *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EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;AASnD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAJZ,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACbD;;AAEG;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-dropdown-button.mjs","sources":["../../../../libs/components/dropdown-button/src/lib/dropdown-button.component.ts","../../../../libs/components/dropdown-button/src/lib/dropdown-button.component.html","../../../../libs/components/dropdown-button/src/lib/dropdown-button.module.ts","../../../../libs/components/dropdown-button/src/acorex-components-dropdown-button.ts"],"sourcesContent":["import { AXButtonType } from '@acorex/components/button';\nimport { AXClickEvent, AXClosbaleComponent, MXButtonBaseComponent } from '@acorex/components/common';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, EventEmitter, Input, ViewChild, ViewEncapsulation } from '@angular/core';\n// import { AXButtonType } from './button-item.class';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-dropdown-button',\n templateUrl: './dropdown-button.component.html',\n styleUrls: ['./dropdown-button.component.scss'],\n inputs: ['disabled', 'size', 'tabIndex', 'color', 'look', 'text'],\n outputs: ['onBlur', 'onFocus', 'onClick', 'selectedChange', 'lookChange', 'colorChange', 'disabledChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n // providers: [\n // { provide: AXComponent, useExisting: AXDropdownButtonComponent },\n // { provide: AXButtonItemComponent, useExisting: AXDropdownButtonComponent },\n // { provide: AXFocusableComponent, useExisting: AXDropdownButtonComponent },\n // ],\n\n providers: [\n {\n provide: AXClosbaleComponent,\n useExisting: AXDropdownButtonComponent,\n },\n ],\n})\nexport class AXDropdownButtonComponent extends MXButtonBaseComponent implements AfterViewInit {\n /**\n * Fires each time the user clicks the button.\n * @event\n */\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n /**\n * @ignore\n */\n @ViewChild('panel') dropdownPanel: AXClosbaleComponent;\n\n /**\n * Defines the type of the button element.\n *\n * @defaultValue 'button'\n */\n @Input()\n type: AXButtonType = 'button';\n\n /**\n * Specifies the mode of the button.\n * Can be either 'split' or 'dropdown'.\n *\n * @defaultValue 'split'\n */\n @Input() mode: 'split' | 'dropdown' = 'split';\n\n /**\n * @ignore\n */\n ngAfterViewInit(): void {\n this.getHostElement().removeAttribute('tabindex');\n }\n\n /**\n * @ignore\n */\n private getButton(): HTMLButtonElement {\n return this.getHostElement().firstElementChild as HTMLButtonElement;\n }\n\n /**\n * @ignore\n */\n _handleClick(e: MouseEvent) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n\n // TODO: check keyboard event\n setTimeout(() => {\n this.blur();\n });\n }\n\n /**\n * Simulates a click event on the button element.\n *\n * @ignore\n */\n click() {\n this.getButton()?.click();\n }\n\n // @HostBinding('class')\n // private get __hostClass(): string[] {\n // return Object.entries(this.cssClasses)\n // .filter((c) => c[1])\n // .map((c) => c[0]);\n // }\n\n /**\n * Sets focus to the button and adds a focus state class.\n */\n override focus() {\n this.getButton()?.focus();\n this.getButton().classList.add('ax-state-focus');\n }\n\n /**\n * Removes the focus state class from the button.\n */\n override blur() {\n this.getButton().classList.remove('ax-state-focus');\n }\n\n /**\n * Closes the dropdown panel.\n * @ignore\n */\n close() {\n this.dropdownPanel.close();\n }\n}\n","<ng-template #dropdown>\n <ax-dropdown-panel #panel>\n <ng-content></ng-content>\n </ax-dropdown-panel>\n</ng-template>\n<ng-template #decorator>\n <ng-content select=\"ax-prefix, ax-loading, ax-loading-spinner\"> </ng-content>\n</ng-template>\n\n@if (mode === 'dropdown') {\n <button\n class=\"ax-dropdown-button ax-el-interactive ax-el-{{ color }}-{{ look }}\"\n [axRipple]\n [disabled]=\"disabled\"\n [attr.tabindex]=\"tabIndex\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n (click)=\"_handleClick($event)\"\n [attr.type]=\"type\"\n >\n <ng-container [ngTemplateOutlet]=\"decorator\"></ng-container>\n\n @if (text) {\n <span class=\"ax-button-text\">{{ text }}</span>\n }\n <ax-icon class=\"far fa-chevron-down ax-ms-3\"> </ax-icon>\n <ng-container [ngTemplateOutlet]=\"dropdown\"></ng-container>\n </button>\n} @else {\n <button\n class=\"ax-dropdown-split-button ax-el-interactive ax-el-{{ color }}-{{ look }}\"\n [ngClass]=\"{ 'ax-state-disabled': disabled }\"\n [disabled]=\"disabled\"\n [axRipple]\n [attr.tabindex]=\"tabIndex\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n (click)=\"_handleClick($event)\"\n [attr.type]=\"type\"\n >\n <ng-container [ngTemplateOutlet]=\"decorator\"></ng-container>\n\n @if (text) {\n <span class=\"ax-button-text\">{{ text }}</span>\n }\n </button>\n <button\n [axRipple]\n class=\"ax-dropdown-button-marker ax-el-interactive ax-el-{{ color }}-{{ look }}\"\n [ngClass]=\"{ 'ax-state-disabled': disabled }\"\n >\n <ax-icon class=\"far fa-chevron-down\"> </ax-icon>\n <ng-container [ngTemplateOutlet]=\"dropdown\"></ng-container>\n </button>\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXCommonModule, AXRippleDirective } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDropdownButtonComponent } from './dropdown-button.component';\n\nconst COMPONENT = [AXDropdownButtonComponent];\nconst MODULES = [CommonModule, AXCommonModule, AXDecoratorModule, AXLoadingModule, AXRippleDirective, AXDropdownModule, AXButtonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDropdownButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAGA;AAEA;;;;AAIG;AAsBG,MAAO,yBAA0B,SAAQ,qBAAqB,CAAA;AArBpE,IAAA,WAAA,GAAA;;AAsBE;;;AAGG;AACH,QAAA,IAAA,CAAA,OAAO,GAA+B,IAAI,YAAY,EAAgB,CAAC;AAOvE;;;;AAIG;QAEH,IAAI,CAAA,IAAA,GAAiB,QAAQ,CAAC;AAE9B;;;;;AAKG;QACM,IAAI,CAAA,IAAA,GAAyB,OAAO,CAAC;AA0E/C,KAAA;AAxEC;;AAEG;IACH,eAAe,GAAA;QACb,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;KACnD;AAED;;AAEG;IACK,SAAS,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC,iBAAsC,CAAC;KACrE;AAED;;AAEG;AACH,IAAA,YAAY,CAAC,CAAa,EAAA;AACxB,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,OAAO;SACR;AACD,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;AAChB,YAAA,SAAS,EAAE,IAAI;AACf,YAAA,WAAW,EAAE,IAAI,CAAC,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AAA,EAAA,CAAA,CAAA,EAAA;AAAtB,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,sBAAsB,iBAThB,yBAAyB,CAAA,EAAA,OAAA,EAAA,CAC3B,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,aADnH,yBAAyB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAS/B,sBAAsB,EAAA,OAAA,EAAA,CARlB,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAqB,gBAAgB,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAQzH,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-dropdown-button.mjs","sources":["../../../../libs/components/dropdown-button/src/lib/dropdown-button.component.ts","../../../../libs/components/dropdown-button/src/lib/dropdown-button.component.html","../../../../libs/components/dropdown-button/src/lib/dropdown-button.module.ts","../../../../libs/components/dropdown-button/src/acorex-components-dropdown-button.ts"],"sourcesContent":["import { AXButtonType } from '@acorex/components/button';\nimport { AXClickEvent, AXClosbaleComponent, MXButtonBaseComponent } from '@acorex/components/common';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, EventEmitter, Input, ViewChild, ViewEncapsulation } from '@angular/core';\n// import { AXButtonType } from './button-item.class';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-dropdown-button',\n templateUrl: './dropdown-button.component.html',\n styleUrls: ['./dropdown-button.component.scss'],\n inputs: ['disabled', 'size', 'tabIndex', 'color', 'look', 'text'],\n outputs: ['onBlur', 'onFocus', 'onClick', 'selectedChange', 'lookChange', 'colorChange', 'disabledChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n // providers: [\n // { provide: AXComponent, useExisting: AXDropdownButtonComponent },\n // { provide: AXButtonItemComponent, useExisting: AXDropdownButtonComponent },\n // { provide: AXFocusableComponent, useExisting: AXDropdownButtonComponent },\n // ],\n\n providers: [\n {\n provide: AXClosbaleComponent,\n useExisting: AXDropdownButtonComponent,\n },\n ],\n})\nexport class AXDropdownButtonComponent extends MXButtonBaseComponent implements AfterViewInit {\n /**\n * Fires each time the user clicks the button.\n * @event\n */\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n /**\n * @ignore\n */\n @ViewChild('panel') dropdownPanel: AXClosbaleComponent;\n\n /**\n * Defines the type of the button element.\n *\n * @defaultValue 'button'\n */\n @Input()\n type: AXButtonType = 'button';\n\n /**\n * Specifies the mode of the button.\n * Can be either 'split' or 'dropdown'.\n *\n * @defaultValue 'split'\n */\n @Input() mode: 'split' | 'dropdown' = 'split';\n\n /**\n * @ignore\n */\n ngAfterViewInit(): void {\n this.getHostElement().removeAttribute('tabindex');\n }\n\n /**\n * @ignore\n */\n private getButton(): HTMLButtonElement {\n return this.getHostElement().firstElementChild as HTMLButtonElement;\n }\n\n /**\n * @ignore\n */\n _handleClick(e: MouseEvent) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n\n // TODO: check keyboard event\n setTimeout(() => {\n this.blur();\n });\n }\n\n /**\n * Simulates a click event on the button element.\n *\n * @ignore\n */\n click() {\n this.getButton()?.click();\n }\n\n // @HostBinding('class')\n // private get __hostClass(): string[] {\n // return Object.entries(this.cssClasses)\n // .filter((c) => c[1])\n // .map((c) => c[0]);\n // }\n\n /**\n * Sets focus to the button and adds a focus state class.\n */\n override focus() {\n this.getButton()?.focus();\n this.getButton().classList.add('ax-state-focus');\n }\n\n /**\n * Removes the focus state class from the button.\n */\n override blur() {\n this.getButton().classList.remove('ax-state-focus');\n }\n\n /**\n * Closes the dropdown panel.\n * @ignore\n */\n close() {\n this.dropdownPanel.close();\n }\n}\n","<ng-template #dropdown>\n <ax-dropdown-panel #panel>\n <ng-content></ng-content>\n </ax-dropdown-panel>\n</ng-template>\n<ng-template #decorator>\n <ng-content select=\"ax-prefix, ax-loading, ax-loading-spinner\"> </ng-content>\n</ng-template>\n\n@if (mode === 'dropdown') {\n <button\n class=\"ax-dropdown-button ax-el-interactive ax-el-{{ color }}-{{ look }}\"\n [axRipple]\n [disabled]=\"disabled\"\n [attr.tabindex]=\"tabIndex\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n (click)=\"_handleClick($event)\"\n [attr.type]=\"type\"\n >\n <ng-container [ngTemplateOutlet]=\"decorator\"></ng-container>\n\n @if (text) {\n <span class=\"ax-button-text\">{{ text }}</span>\n }\n <ax-icon class=\"far fa-chevron-down ax-ms-3\"> </ax-icon>\n <ng-container [ngTemplateOutlet]=\"dropdown\"></ng-container>\n </button>\n} @else {\n <button\n class=\"ax-dropdown-split-button ax-el-interactive ax-el-{{ color }}-{{ look }}\"\n [ngClass]=\"{ 'ax-state-disabled': disabled }\"\n [disabled]=\"disabled\"\n [axRipple]\n [attr.tabindex]=\"tabIndex\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n (click)=\"_handleClick($event)\"\n [attr.type]=\"type\"\n >\n <ng-container [ngTemplateOutlet]=\"decorator\"></ng-container>\n\n @if (text) {\n <span class=\"ax-button-text\">{{ text }}</span>\n }\n </button>\n <button\n [axRipple]\n class=\"ax-dropdown-button-marker ax-el-interactive ax-el-{{ color }}-{{ look }}\"\n [ngClass]=\"{ 'ax-state-disabled': disabled }\"\n >\n <ax-icon class=\"far fa-chevron-down\"> </ax-icon>\n <ng-container [ngTemplateOutlet]=\"dropdown\"></ng-container>\n </button>\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXCommonModule, AXRippleDirective } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDropdownButtonComponent } from './dropdown-button.component';\n\nconst COMPONENT = [AXDropdownButtonComponent];\nconst MODULES = [CommonModule, AXCommonModule, AXDecoratorModule, AXLoadingModule, AXRippleDirective, AXDropdownModule, AXButtonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDropdownButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAGA;AAEA;;;;AAIG;AAsBG,MAAO,yBAA0B,SAAQ,qBAAqB,CAAA;AArBpE,IAAA,WAAA,GAAA;;AAsBE;;;AAGG;AACH,QAAA,IAAA,CAAA,OAAO,GAA+B,IAAI,YAAY,EAAgB;AAOtE;;;;AAIG;QAEH,IAAI,CAAA,IAAA,GAAiB,QAAQ;AAE7B;;;;;AAKG;QACM,IAAI,CAAA,IAAA,GAAyB,OAAO;AA0E9C;AAxEC;;AAEG;IACH,eAAe,GAAA;QACb,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,CAAC,UAAU,CAAC;;AAGnD;;AAEG;IACK,SAAS,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC,iBAAsC;;AAGrE;;AAEG;AACH,IAAA,YAAY,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,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAtB,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,sBAAsB,iBAThB,yBAAyB,CAAA,EAAA,OAAA,EAAA,CAC3B,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,aADnH,yBAAyB,CAAA,EAAA,CAAA,CAAA;+GAS/B,sBAAsB,EAAA,OAAA,EAAA,CARlB,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAqB,gBAAgB,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;;2FAQzH,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,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;;;ACjBD;;AAEG;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-dropdown.mjs","sources":["../../../../libs/components/dropdown/src/lib/dropdown-box.class.ts","../../../../libs/components/dropdown/src/lib/dropdown-box.component.ts","../../../../libs/components/dropdown/src/lib/dropdown-box.component.html","../../../../libs/components/dropdown/src/lib/dropdown-panel.component.ts","../../../../libs/components/dropdown/src/lib/dropdown-panel.component.html","../../../../libs/components/dropdown/src/lib/dropdown.module.ts","../../../../libs/components/dropdown/src/acorex-components-dropdown.ts"],"sourcesContent":["import { AXEvent, MXInteractiveComponent } from '@acorex/components/common';\nimport { EventEmitter, Injectable } from '@angular/core';\nimport { AXDropdownBoxComponent } from './dropdown-box.component';\n\n@Injectable()\nexport abstract class MXDropdownBoxBaseComponent extends MXInteractiveComponent {\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n protected emitOnOpenedEvent(): void {\n this.onOpened.emit({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n protected emitOnClosedEvent(): void {\n this.onClosed.emit({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n\n protected abstract dropdown: AXDropdownBoxComponent;\n\n toggle() {\n if (this.disabled !== true) {\n this.dropdown.toggle();\n }\n }\n\n close() {\n if (!this.isOpen || this.disabled) {\n return;\n }\n this.dropdown.close();\n this.focus();\n }\n\n open() {\n if (this.isOpen || this.disabled) {\n return;\n }\n this.dropdown.open();\n this.dropdown.focus();\n }\n\n get isOpen(): boolean {\n return this.dropdown?.isOpen;\n }\n}\n","import { AXEvent, MXInteractiveComponent, MXLookComponent, convertToPlacement } from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXPlatform } from '@acorex/core/platform';\nimport { Component, EventEmitter, HostBinding, HostListener, OnInit, Output, ViewChild, inject } from '@angular/core';\nimport { classes } from 'polytype';\nimport { startWith } from 'rxjs';\n\n@Component({\n selector: 'ax-dropdown-box',\n templateUrl: 'dropdown-box.component.html',\n inputs: ['disabled', 'look'],\n outputs: ['disabledChange', 'onBlur', 'onFocus', 'onClick'],\n host: { ngSkipHydration: 'true' },\n})\nexport class AXDropdownBoxComponent extends classes(MXInteractiveComponent, MXLookComponent) implements OnInit {\n private _platform: AXPlatform = inject(AXPlatform);\n /**\n * @ignore\n */\n protected _isMobile = false;\n\n /**\n * @ignore\n */\n protected _target: HTMLDivElement;\n\n /**\n * @ignore\n */\n protected _popoverTitle: string;\n\n /**\n * @ignore\n */\n protected _popoverWidth = '180px';\n\n /**\n * @ignore\n */\n protected _placement = convertToPlacement('bottom-start');\n\n /**\n * @ignore\n */\n @ViewChild(AXPopoverComponent, { static: true })\n protected _popover: AXPopoverComponent;\n\n /**\n * Emitted when the drawer is opened.\n *\n * @event\n */\n @Output()\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /**\n * Emitted when the drawer is closed.\n *\n * @event\n */\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /**\n * @ignore\n */\n override ngOnInit() {\n super.ngOnInit();\n this._target = this.getHostElement();\n this._platform.resize.pipe(startWith()).subscribe(() => {\n this._isMobile = this._platform.is('SM');\n if (!this.isActionsheetStyle) this.close();\n });\n }\n\n /**\n * @ignore\n */\n protected _handlePopupOnOpened(e: AXEvent) {\n this._popover?.focus();\n this.onOpened.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n /**\n * @ignore\n */\n protected _handlePopupOnClosed(e: AXEvent) {\n this.focus();\n this.onClosed.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n /**\n * @ignore\n */\n @HostListener('keydown', ['$event'])\n protected _handleKeydown(e: KeyboardEvent) {\n if (e.ctrlKey && e.code === 'ArrowDown') {\n this.open();\n e.preventDefault();\n }\n if (e.code === 'Escape') {\n this.close();\n e.preventDefault();\n }\n }\n\n /**\n * Updates the position of the popover.\n * @ignore\n */\n updatePosition() {\n this._popover?.updatePosition();\n }\n\n /**\n * Toggles the popover open or closed, if not disabled.\n * @ignore\n */\n toggle() {\n if (this.disabled !== true) {\n this._popover.toggle();\n }\n }\n\n /**\n * Closes the popover if it's open and not disabled, then focuses the element.\n * @ignore\n */\n close() {\n if (!this.isOpen || this.disabled) {\n return;\n }\n this._popover.close();\n this.focus();\n }\n\n /**\n * Opens the popover if it's not already open and not disabled, then focuses the popover.\n * @ignore\n */\n open() {\n if (this.isOpen || this.disabled) {\n return;\n }\n this._popover.open();\n this._popover.focus();\n }\n\n /**\n * Indicates if the popover is currently open.\n * @ignore\n */\n get isOpen(): boolean {\n return this._popover?.isOpen;\n }\n\n /**\n * Indicates if the popover is styled as an actionsheet.\n */\n get isActionsheetStyle(): boolean {\n return this._popover?.isActionsheetStyle;\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-editor-container ax-look-${this.look} ${this.disabled ? 'ax-state-disabled' : ''}`;\n }\n}\n","<ng-content select=\"[input]\"> </ng-content>\n<ax-popover [target]=\"_target\" [placement]=\"_placement\" [openOn]=\"'manual'\" [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"true\" (onOpened)=\"_handlePopupOnOpened($event)\" (onClosed)=\"_handlePopupOnClosed($event)\"\n #popover>\n <div class=\"ax-overlay-pane\" [class.ax-w-full]=\"_isMobile\" aria-modal=\"true\" (keydown)=\"_handleKeydown($event)\"\n [class.ax-overlay-actionsheet]=\"popover.isActionsheetStyle\">\n <ng-content select=\"[panel]\"> </ng-content>\n </div>\n</ax-popover>","/* eslint-disable @angular-eslint/no-host-metadata-property */\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\n\nimport { AXClosbaleComponent, AXEvent, MXInteractiveComponent, convertToPlacement } from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXPlatform, isBrowser } from '@acorex/core/platform';\nimport { Subscription, startWith } from 'rxjs';\n\n/**\n * A panel for displaying dropdown content with configurable width and positioning.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-dropdown-panel',\n templateUrl: './dropdown-panel.component.html',\n styleUrls: ['./dropdown-panel.component.scss'],\n inputs: ['isOpen', 'fitParent', 'dropdownWidth', 'position'],\n outputs: ['onOpened', 'onClosed'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXClosbaleComponent,\n useExisting: AXDropdownPanelComponent,\n },\n ],\n host: { ngSkipHydration: 'true' },\n})\nexport class AXDropdownPanelComponent extends MXInteractiveComponent implements OnDestroy {\n private _platform: AXPlatform = inject(AXPlatform);\n\n /**\n * @ignore\n */\n protected _isMobile = false;\n\n /**\n * @ignore\n */\n protected _popoverTitle: string;\n\n /**\n * @ignore\n */\n protected _placement = convertToPlacement('bottom-start');\n\n /**\n * @ignore\n */\n _subs: Subscription[] = [];\n\n /**\n * @ignore\n */\n private __target: HTMLDivElement;\n\n /**\n * Gets the target HTML element for the dropdown panel.\n */\n @Input()\n public get _target(): HTMLDivElement {\n return this.__target;\n }\n\n /**\n * Sets the target HTML element for the dropdown panel.\n */\n public set _target(v: HTMLDivElement) {\n this.__target = v;\n }\n\n /**\n * @ignore\n */\n @ViewChild(AXPopoverComponent)\n protected _popover: AXPopoverComponent;\n\n /**\n * Emitted when the dropdown panel is opened.\n *\n * @event\n */\n @Output()\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /**\n * Emitted when the dropdown panel is closed.\n *\n * @event\n */\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /**\n * Determines if adaptivity is enabled for the component.\n *\n * @defaultValue false\n */\n @Input()\n adaptivityEnabled = false;\n\n // what the hell ???\n // constructor() {\n // super();\n // afterNextRender(() => {\n // this._target = this.getHostElement()?.parentElement as HTMLDivElement;\n // this._platform.resize.pipe(startWith(null)).subscribe(() => {\n // this._isMobile = this._platform.is('SM');\n // this._popover?.close();\n // });\n // [this._target, this.getHostElement()].forEach((el) => {\n // el.addEventListener('keydown', (e) => {\n // if (e.code == 'Escape' && this.isOpen) {\n // e.stopPropagation();\n // this.close();\n // }\n // });\n // });\n // });\n // }\n\n /**\n * @ignore\n */\n constructor() {\n super();\n }\n\n /**\n * @ignore\n */\n override ngOnInit() {\n if (isBrowser()) {\n super.ngOnInit();\n if (!this._target) {\n this._target = this.getHostElement()?.parentElement as HTMLDivElement;\n }\n this._platform.resize.pipe(startWith(null)).subscribe(() => {\n this._isMobile = this._platform.is('SM');\n this._popover?.close();\n });\n }\n }\n\n /**\n * @ignore\n */\n ngAfterViewInit(): void {\n [this._target, this.getHostElement()].forEach((el) => {\n el?.addEventListener('keydown', (e) => {\n if (e.code == 'Escape' && this.isOpen) {\n e.stopPropagation();\n this.close();\n }\n });\n });\n }\n\n /**\n * @ignore\n */\n ngOnDestroy(): void {\n this._subs.forEach((s) => {\n s?.unsubscribe();\n });\n }\n\n /**\n * @ignore\n */\n protected _handlePopupOnOpened(e: AXEvent) {\n this._popover?.focus();\n this.onOpened.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n /**\n * @ignore\n */\n protected _handlePopupOnClosed(e: AXEvent) {\n this._target.focus();\n this.onClosed.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n /**\n * Toggles the popover open or closed, if not disabled.\n * @ignore\n */\n toggle() {\n if (this.disabled !== true) {\n this._popover.toggle();\n }\n }\n\n /**\n * Closes the popover if it is open and not disabled.\n * @ignore\n */\n close() {\n if (!this.isOpen || this.disabled) {\n return;\n }\n this._popover.close();\n this.focus();\n }\n\n /**\n * Opens the popover if it is not already open and not disabled.\n * @ignore\n */\n open() {\n if (this.isOpen || this.disabled) {\n return;\n }\n this._popover.open();\n this._popover.focus();\n }\n\n /**\n * Gets whether the popover is currently open.\n * @ignore\n */\n get isOpen(): boolean {\n return this._popover?.isOpen;\n }\n\n /**\n * Gets whether the popover is styled as an actionsheet.\n * @ignore\n */\n get isActionsheetStyle(): boolean {\n return this._popover?.isActionsheetStyle;\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string[] {\n return ['ax-dropdown-panel'];\n }\n}\n","<ax-popover\n [target]=\"_target\"\n [placement]=\"_placement\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"adaptivityEnabled\"\n (onOpened)=\"_handlePopupOnOpened($event)\"\n (onClosed)=\"_handlePopupOnClosed($event)\"\n>\n <div class=\"ax-overlay-pane\">\n <ng-content> </ng-content>\n </div>\n</ax-popover>\n","import { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDropdownBoxComponent } from './dropdown-box.component';\nimport { AXDropdownPanelComponent } from './dropdown-panel.component';\n\n@NgModule({\n imports: [CommonModule, AXCommonModule, A11yModule, OverlayModule, AXDecoratorModule, AXPopoverModule],\n exports: [AXDropdownPanelComponent, AXDropdownBoxComponent],\n declarations: [AXDropdownPanelComponent, AXDropdownBoxComponent],\n providers: [],\n})\nexport class AXDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAKM,MAAgB,0BAA2B,SAAQ,sBAAsB,CAAA;AAD/E,IAAA,WAAA,GAAA;;AAEE,QAAA,IAAA,CAAA,QAAQ,GAA0B,IAAI,YAAY,EAAW,CAAC;AAS9D,QAAA,IAAA,CAAA,QAAQ,GAA0B,IAAI,YAAY,EAAW,CAAC;AAoC/D,KAAA;IA3CW,iBAAiB,GAAA;AACzB,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;AACjB,YAAA,SAAS,EAAE,IAAI;AACf,YAAA,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE;AACnC,SAAA,CAAC,CAAC;KACJ;IAIS,iBAAiB,GAAA;AACzB,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;AACjB,YAAA,SAAS,EAAE,IAAI;AACf,YAAA,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE;AACnC,SAAA,CAAC,CAAC;KACJ;IAID,MAAM,GAAA;A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CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,iBAHZ,wBAAwB,EAAE,sBAAsB,CAFrD,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,CAC3F,EAAA,OAAA,EAAA,CAAA,wBAAwB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAI/C,gBAAgB,EAAA,OAAA,EAAA,CALjB,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAK1F,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,CAAC;AACtG,oBAAA,OAAO,EAAE,CAAC,wBAAwB,EAAE,sBAAsB,CAAC;AAC3D,oBAAA,YAAY,EAAE,CAAC,wBAAwB,EAAE,sBAAsB,CAAC;AAChE,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-dropdown.mjs","sources":["../../../../libs/components/dropdown/src/lib/dropdown-box.class.ts","../../../../libs/components/dropdown/src/lib/dropdown-box.component.ts","../../../../libs/components/dropdown/src/lib/dropdown-box.component.html","../../../../libs/components/dropdown/src/lib/dropdown-panel.component.ts","../../../../libs/components/dropdown/src/lib/dropdown-panel.component.html","../../../../libs/components/dropdown/src/lib/dropdown.module.ts","../../../../libs/components/dropdown/src/acorex-components-dropdown.ts"],"sourcesContent":["import { AXEvent, MXInteractiveComponent } from '@acorex/components/common';\nimport { EventEmitter, Injectable } from '@angular/core';\nimport { AXDropdownBoxComponent } from './dropdown-box.component';\n\n@Injectable()\nexport abstract class MXDropdownBoxBaseComponent extends MXInteractiveComponent {\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n protected emitOnOpenedEvent(): void {\n this.onOpened.emit({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n protected emitOnClosedEvent(): void {\n this.onClosed.emit({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n\n protected abstract dropdown: AXDropdownBoxComponent;\n\n toggle() {\n if (this.disabled !== true) {\n this.dropdown.toggle();\n }\n }\n\n close() {\n if (!this.isOpen || this.disabled) {\n return;\n }\n this.dropdown.close();\n this.focus();\n }\n\n open() {\n if (this.isOpen || this.disabled) {\n return;\n }\n this.dropdown.open();\n this.dropdown.focus();\n }\n\n get isOpen(): boolean {\n return this.dropdown?.isOpen;\n }\n}\n","import { AXEvent, MXInteractiveComponent, MXLookComponent, convertToPlacement } from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXPlatform } from '@acorex/core/platform';\nimport { Component, EventEmitter, HostBinding, HostListener, OnInit, Output, ViewChild, inject } from '@angular/core';\nimport { classes } from 'polytype';\nimport { startWith } from 'rxjs';\n\n@Component({\n selector: 'ax-dropdown-box',\n templateUrl: 'dropdown-box.component.html',\n inputs: ['disabled', 'look'],\n outputs: ['disabledChange', 'onBlur', 'onFocus', 'onClick'],\n host: { ngSkipHydration: 'true' },\n})\nexport class AXDropdownBoxComponent extends classes(MXInteractiveComponent, MXLookComponent) implements OnInit {\n private _platform: AXPlatform = inject(AXPlatform);\n /**\n * @ignore\n */\n protected _isMobile = false;\n\n /**\n * @ignore\n */\n protected _target: HTMLDivElement;\n\n /**\n * @ignore\n */\n protected _popoverTitle: string;\n\n /**\n * @ignore\n */\n protected _popoverWidth = '180px';\n\n /**\n * @ignore\n */\n protected _placement = convertToPlacement('bottom-start');\n\n /**\n * @ignore\n */\n @ViewChild(AXPopoverComponent, { static: true })\n protected _popover: AXPopoverComponent;\n\n /**\n * Emitted when the drawer is opened.\n *\n * @event\n */\n @Output()\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /**\n * Emitted when the drawer is closed.\n *\n * @event\n */\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /**\n * @ignore\n */\n override ngOnInit() {\n super.ngOnInit();\n this._target = this.getHostElement();\n this._platform.resize.pipe(startWith()).subscribe(() => {\n this._isMobile = this._platform.is('SM');\n if (!this.isActionsheetStyle) this.close();\n });\n }\n\n /**\n * @ignore\n */\n protected _handlePopupOnOpened(e: AXEvent) {\n this._popover?.focus();\n this.onOpened.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n /**\n * @ignore\n */\n protected _handlePopupOnClosed(e: AXEvent) {\n this.focus();\n this.onClosed.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n /**\n * @ignore\n */\n @HostListener('keydown', ['$event'])\n protected _handleKeydown(e: KeyboardEvent) {\n if (e.ctrlKey && e.code === 'ArrowDown') {\n this.open();\n e.preventDefault();\n }\n if (e.code === 'Escape') {\n this.close();\n e.preventDefault();\n }\n }\n\n /**\n * Updates the position of the popover.\n * @ignore\n */\n updatePosition() {\n this._popover?.updatePosition();\n }\n\n /**\n * Toggles the popover open or closed, if not disabled.\n * @ignore\n */\n toggle() {\n if (this.disabled !== true) {\n this._popover.toggle();\n }\n }\n\n /**\n * Closes the popover if it's open and not disabled, then focuses the element.\n * @ignore\n */\n close() {\n if (!this.isOpen || this.disabled) {\n return;\n }\n this._popover.close();\n this.focus();\n }\n\n /**\n * Opens the popover if it's not already open and not disabled, then focuses the popover.\n * @ignore\n */\n open() {\n if (this.isOpen || this.disabled) {\n return;\n }\n this._popover.open();\n this._popover.focus();\n }\n\n /**\n * Indicates if the popover is currently open.\n * @ignore\n */\n get isOpen(): boolean {\n return this._popover?.isOpen;\n }\n\n /**\n * Indicates if the popover is styled as an actionsheet.\n */\n get isActionsheetStyle(): boolean {\n return this._popover?.isActionsheetStyle;\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-editor-container ax-look-${this.look} ${this.disabled ? 'ax-state-disabled' : ''}`;\n }\n}\n","<ng-content select=\"[input]\"> </ng-content>\n<ax-popover [target]=\"_target\" [placement]=\"_placement\" [openOn]=\"'manual'\" [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"true\" (onOpened)=\"_handlePopupOnOpened($event)\" (onClosed)=\"_handlePopupOnClosed($event)\"\n #popover>\n <div class=\"ax-overlay-pane\" [class.ax-w-full]=\"_isMobile\" aria-modal=\"true\" (keydown)=\"_handleKeydown($event)\"\n [class.ax-overlay-actionsheet]=\"popover.isActionsheetStyle\">\n <ng-content select=\"[panel]\"> </ng-content>\n </div>\n</ax-popover>","/* eslint-disable @angular-eslint/no-host-metadata-property */\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\n\nimport { AXClosbaleComponent, AXEvent, MXInteractiveComponent, convertToPlacement } from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXPlatform, isBrowser } from '@acorex/core/platform';\nimport { Subscription, startWith } from 'rxjs';\n\n/**\n * A panel for displaying dropdown content with configurable width and positioning.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-dropdown-panel',\n templateUrl: './dropdown-panel.component.html',\n styleUrls: ['./dropdown-panel.component.scss'],\n inputs: ['isOpen', 'fitParent', 'dropdownWidth', 'position'],\n outputs: ['onOpened', 'onClosed'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXClosbaleComponent,\n useExisting: AXDropdownPanelComponent,\n },\n ],\n host: { ngSkipHydration: 'true' },\n})\nexport class AXDropdownPanelComponent extends MXInteractiveComponent implements OnDestroy {\n private _platform: AXPlatform = inject(AXPlatform);\n\n /**\n * @ignore\n */\n protected _isMobile = false;\n\n /**\n * @ignore\n */\n protected _popoverTitle: string;\n\n /**\n * @ignore\n */\n protected _placement = convertToPlacement('bottom-start');\n\n /**\n * @ignore\n */\n _subs: Subscription[] = [];\n\n /**\n * @ignore\n */\n private __target: HTMLDivElement;\n\n /**\n * Gets the target HTML element for the dropdown panel.\n */\n @Input()\n public get _target(): HTMLDivElement {\n return this.__target;\n }\n\n /**\n * Sets the target HTML element for the dropdown panel.\n */\n public set _target(v: HTMLDivElement) {\n this.__target = v;\n }\n\n /**\n * @ignore\n */\n @ViewChild(AXPopoverComponent)\n protected _popover: AXPopoverComponent;\n\n /**\n * Emitted when the dropdown panel is opened.\n *\n * @event\n */\n @Output()\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /**\n * Emitted when the dropdown panel is closed.\n *\n * @event\n */\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n /**\n * Determines if adaptivity is enabled for the component.\n *\n * @defaultValue false\n */\n @Input()\n adaptivityEnabled = false;\n\n // what the hell ???\n // constructor() {\n // super();\n // afterNextRender(() => {\n // this._target = this.getHostElement()?.parentElement as HTMLDivElement;\n // this._platform.resize.pipe(startWith(null)).subscribe(() => {\n // this._isMobile = this._platform.is('SM');\n // this._popover?.close();\n // });\n // [this._target, this.getHostElement()].forEach((el) => {\n // el.addEventListener('keydown', (e) => {\n // if (e.code == 'Escape' && this.isOpen) {\n // e.stopPropagation();\n // this.close();\n // }\n // });\n // });\n // });\n // }\n\n /**\n * @ignore\n */\n constructor() {\n super();\n }\n\n /**\n * @ignore\n */\n override ngOnInit() {\n if (isBrowser()) {\n super.ngOnInit();\n if (!this._target) {\n this._target = this.getHostElement()?.parentElement as HTMLDivElement;\n }\n this._platform.resize.pipe(startWith(null)).subscribe(() => {\n this._isMobile = this._platform.is('SM');\n this._popover?.close();\n });\n }\n }\n\n /**\n * @ignore\n */\n ngAfterViewInit(): void {\n [this._target, this.getHostElement()].forEach((el) => {\n el?.addEventListener('keydown', (e) => {\n if (e.code == 'Escape' && this.isOpen) {\n e.stopPropagation();\n this.close();\n }\n });\n });\n }\n\n /**\n * @ignore\n */\n ngOnDestroy(): void {\n this._subs.forEach((s) => {\n s?.unsubscribe();\n });\n }\n\n /**\n * @ignore\n */\n protected _handlePopupOnOpened(e: AXEvent) {\n this._popover?.focus();\n this.onOpened.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n /**\n * @ignore\n */\n protected _handlePopupOnClosed(e: AXEvent) {\n this._target.focus();\n this.onClosed.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n /**\n * Toggles the popover open or closed, if not disabled.\n * @ignore\n */\n toggle() {\n if (this.disabled !== true) {\n this._popover.toggle();\n }\n }\n\n /**\n * Closes the popover if it is open and not disabled.\n * @ignore\n */\n close() {\n if (!this.isOpen || this.disabled) {\n return;\n }\n this._popover.close();\n this.focus();\n }\n\n /**\n * Opens the popover if it is not already open and not disabled.\n * @ignore\n */\n open() {\n if (this.isOpen || this.disabled) {\n return;\n }\n this._popover.open();\n this._popover.focus();\n }\n\n /**\n * Gets whether the popover is currently open.\n * @ignore\n */\n get isOpen(): boolean {\n return this._popover?.isOpen;\n }\n\n /**\n * Gets whether the popover is styled as an actionsheet.\n * @ignore\n */\n get isActionsheetStyle(): boolean {\n return this._popover?.isActionsheetStyle;\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string[] {\n return ['ax-dropdown-panel'];\n }\n}\n","<ax-popover\n [target]=\"_target\"\n [placement]=\"_placement\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"adaptivityEnabled\"\n (onOpened)=\"_handlePopupOnOpened($event)\"\n (onClosed)=\"_handlePopupOnClosed($event)\"\n>\n <div class=\"ax-overlay-pane\">\n <ng-content> </ng-content>\n </div>\n</ax-popover>\n","import { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDropdownBoxComponent } from './dropdown-box.component';\nimport { AXDropdownPanelComponent } from './dropdown-panel.component';\n\n@NgModule({\n imports: [CommonModule, AXCommonModule, A11yModule, OverlayModule, AXDecoratorModule, AXPopoverModule],\n exports: [AXDropdownPanelComponent, AXDropdownBoxComponent],\n declarations: [AXDropdownPanelComponent, AXDropdownBoxComponent],\n providers: [],\n})\nexport class AXDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAKM,MAAgB,0BAA2B,SAAQ,sBAAsB,CAAA;AAD/E,IAAA,WAAA,GAAA;;AAEE,QAAA,IAAA,CAAA,QAAQ,GAA0B,IAAI,YAAY,EAAW;AAS7D,QAAA,IAAA,CAAA,QAAQ,GAA0B,IAAI,YAAY,EAAW;AAoC9D;IA3CW,iBAAiB,GAAA;AACzB,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;AACjB,YAAA,SAAS,EAAE,IAAI;AACf,YAAA,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE;AACnC,SAAA,CAAC;;IAKM,iBAAiB,GAAA;AACzB,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;AACjB,YAAA,SAAS,EAAE,IAAI;AACf,YAAA,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE;AACnC,SAAA,CAAC;;IAKJ,MAAM,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE;AAC1B,YAAA,IAAI,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