@acorex/components 7.8.1 → 7.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/common/lib/classes/datasource.class.d.ts +2 -2
  2. package/esm2022/button/lib/button.component.mjs +2 -2
  3. package/esm2022/common/lib/classes/datasource.class.mjs +13 -12
  4. package/esm2022/common/lib/components/selection-base.component.class.mjs +3 -2
  5. package/esm2022/common/lib/components/value-component.class.mjs +2 -3
  6. package/esm2022/dropdown/lib/dropdown-box.component.mjs +2 -1
  7. package/esm2022/list/lib/list.component.mjs +14 -11
  8. package/esm2022/list/lib/list.module.mjs +4 -3
  9. package/esm2022/otp/lib/otp.component.mjs +2 -2
  10. package/esm2022/popover/lib/popover.component.mjs +6 -3
  11. package/esm2022/progress-bar/lib/progress-bar.component.mjs +2 -2
  12. package/esm2022/range-slider/lib/range-slider.component.mjs +4 -4
  13. package/esm2022/select-box/lib/select-box.component.mjs +11 -8
  14. package/esm2022/tabs/lib/tabs.component.mjs +2 -2
  15. package/fesm2022/acorex-components-button.mjs +2 -2
  16. package/fesm2022/acorex-components-button.mjs.map +1 -1
  17. package/fesm2022/acorex-components-common.mjs +15 -15
  18. package/fesm2022/acorex-components-common.mjs.map +1 -1
  19. package/fesm2022/acorex-components-dropdown.mjs +1 -0
  20. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  21. package/fesm2022/acorex-components-list.mjs +16 -12
  22. package/fesm2022/acorex-components-list.mjs.map +1 -1
  23. package/fesm2022/acorex-components-otp.mjs +2 -2
  24. package/fesm2022/acorex-components-otp.mjs.map +1 -1
  25. package/fesm2022/acorex-components-popover.mjs +5 -2
  26. package/fesm2022/acorex-components-popover.mjs.map +1 -1
  27. package/fesm2022/acorex-components-progress-bar.mjs +2 -2
  28. package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
  29. package/fesm2022/acorex-components-range-slider.mjs +3 -3
  30. package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
  31. package/fesm2022/acorex-components-select-box.mjs +10 -8
  32. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  33. package/fesm2022/acorex-components-tabs.mjs +2 -2
  34. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  35. package/list/lib/list.component.d.ts +1 -2
  36. package/list/lib/list.module.d.ts +2 -1
  37. package/package.json +1 -7
  38. package/select-box/lib/select-box.component.d.ts +1 -1
  39. package/esm2022/mixin/acorex-components-mixin.mjs +0 -5
  40. package/esm2022/mixin/index.mjs +0 -17
  41. package/esm2022/mixin/lib/base-components.class.mjs +0 -110
  42. package/esm2022/mixin/lib/base-menu-mixin.class.mjs +0 -137
  43. package/esm2022/mixin/lib/button-mixin.class.mjs +0 -66
  44. package/esm2022/mixin/lib/clickable-mixin.class.mjs +0 -24
  45. package/esm2022/mixin/lib/color-look-mixing.class.mjs +0 -43
  46. package/esm2022/mixin/lib/constratctor.mjs +0 -2
  47. package/esm2022/mixin/lib/datalist-component.class.mjs +0 -155
  48. package/esm2022/mixin/lib/datalist.class.mjs +0 -46
  49. package/esm2022/mixin/lib/dropdown-mixin.class.mjs +0 -95
  50. package/esm2022/mixin/lib/interactive-mixin.class.mjs +0 -84
  51. package/esm2022/mixin/lib/mixin.class.mjs +0 -26
  52. package/esm2022/mixin/lib/page-component.class.mjs +0 -11
  53. package/esm2022/mixin/lib/selection-component.class.mjs +0 -180
  54. package/esm2022/mixin/lib/sizable-mixin.class.mjs +0 -16
  55. package/esm2022/mixin/lib/textbox-mixin.class.mjs +0 -67
  56. package/esm2022/mixin/lib/value-mixin.class.mjs +0 -227
  57. package/fesm2022/acorex-components-mixin.mjs +0 -1268
  58. package/fesm2022/acorex-components-mixin.mjs.map +0 -1
  59. package/mixin/README.md +0 -3
  60. package/mixin/index.d.ts +0 -16
  61. package/mixin/lib/base-components.class.d.ts +0 -84
  62. package/mixin/lib/base-menu-mixin.class.d.ts +0 -53
  63. package/mixin/lib/button-mixin.class.d.ts +0 -53
  64. package/mixin/lib/clickable-mixin.class.d.ts +0 -36
  65. package/mixin/lib/color-look-mixing.class.d.ts +0 -42
  66. package/mixin/lib/constratctor.d.ts +0 -4
  67. package/mixin/lib/datalist-component.class.d.ts +0 -59
  68. package/mixin/lib/datalist.class.d.ts +0 -49
  69. package/mixin/lib/dropdown-mixin.class.d.ts +0 -47
  70. package/mixin/lib/interactive-mixin.class.d.ts +0 -63
  71. package/mixin/lib/mixin.class.d.ts +0 -680
  72. package/mixin/lib/page-component.class.d.ts +0 -28
  73. package/mixin/lib/selection-component.class.d.ts +0 -61
  74. package/mixin/lib/sizable-mixin.class.d.ts +0 -34
  75. package/mixin/lib/textbox-mixin.class.d.ts +0 -66
  76. package/mixin/lib/value-mixin.class.d.ts +0 -64
@@ -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 onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\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 {\n AXEvent,\n MXInteractiveComponent,\n MXLookComponent,\n convertToPlacement,\n} from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXPlatform } from '@acorex/core/platform';\nimport {\n Component,\n EventEmitter,\n HostBinding,\n HostListener,\n OnInit,\n Output,\n ViewChild,\n inject,\n} 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})\nexport class AXDropdownBoxComponent\n extends classes(MXInteractiveComponent, MXLookComponent)\n implements OnInit\n{\n private _platform: AXPlatform = inject(AXPlatform);\n protected _isMobile = false;\n protected _target: HTMLDivElement;\n protected _popoverTitle: string;\n protected _popoverWidth = '180px';\n protected _placement = convertToPlacement('bottom-start');\n\n @ViewChild(AXPopoverComponent)\n protected _popover: AXPopoverComponent;\n\n @Output()\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n ngOnInit() {\n super.ngOnInit();\n this._target = this.getHostElement();\n this._platform.resize.pipe(startWith()).subscribe(() => {\n this._isMobile = this._platform.is('SM');\n this._popover.close();\n });\n }\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 protected _handlePopupOnClosed(e: AXEvent) {\n this.focus();\n this.onClosed.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\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 updatePosition() {\n this._popover?.updatePosition();\n }\n\n toggle() {\n if (this.disabled !== true) {\n this._popover.toggle();\n }\n }\n\n close() {\n if (!this.isOpen || this.disabled) {\n return;\n }\n this._popover.close();\n this.focus();\n }\n\n open() {\n if (this.isOpen || this.disabled) {\n return;\n }\n this._popover.open();\n this._popover.focus();\n }\n\n get isOpen(): boolean {\n return this._popover?.isOpen;\n }\n\n get isActionsheetStyle(): boolean {\n return this._popover?.isActionsheetStyle;\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-editor-container ax-look-${this.look}`;\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>","import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n EventEmitter,\n HostBinding,\n Input,\n OnInit,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\n\nimport { AXButtonItemComponent } from '@acorex/components/button';\nimport {\n AXButtonClickEvent,\n AXClickEvent,\n AXEvent,\n MXComponentOptionChanged,\n MXInteractiveComponent,\n convertToPlacement,\n} from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXPlatform } from '@acorex/core/platform';\nimport { Subscription, startWith } from 'rxjs';\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})\nexport class AXDropdownPanelComponent\n extends MXInteractiveComponent\n implements OnInit, AfterViewInit, AfterContentInit\n{\n private _platform: AXPlatform = inject(AXPlatform);\n protected _isMobile = false;\n protected _target: HTMLDivElement;\n protected _popoverTitle: string;\n protected _placement = convertToPlacement('bottom-start');\n\n private _parent?: AXButtonItemComponent = inject(AXButtonItemComponent);\n protected _needBorder = false;\n _subs: Subscription[] = [];\n\n @ContentChildren(AXButtonItemComponent)\n protected _contentButtons: QueryList<AXButtonItemComponent>;\n\n @ViewChild(AXPopoverComponent)\n protected _popover: AXPopoverComponent;\n\n @Output()\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n @Input()\n adaptivityEnabled = false;\n\n @Output()\n onItemClick: EventEmitter<AXButtonClickEvent> = new EventEmitter<AXButtonClickEvent>();\n\n ngOnInit() {\n super.ngOnInit();\n this._target = this._parent.getHostElement();\n this._platform.resize.pipe(startWith(null)).subscribe(() => {\n this._isMobile = this._platform.is('SM');\n this._popover?.close();\n });\n }\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 ngAfterContentInit() {\n this._initContents();\n this._contentButtons.changes.subscribe(() => {\n this._initContents();\n });\n }\n\n private _initContents() {\n this._needBorder = this._contentButtons.length > 0;\n this._bindEvents();\n this._bindProps();\n this.cdr.markForCheck();\n }\n\n private _bindEvents() {\n this._contentButtons?.forEach((b) => {\n if (!b.onClick.length)\n b.onClick.subscribe((c) => {\n this._handleOnItemClick(c);\n });\n });\n }\n\n private _bindProps() {\n this._contentButtons?.forEach((b) => {\n //b.look = this.look ?? this.look;\n b.disabled = b.disabled ?? this.disabled;\n //b.toggleable = false;\n });\n }\n\n protected override internalOptionChanged(option: MXComponentOptionChanged<any>): void {\n this._bindProps();\n }\n\n ngOnDestroy(): void {\n this._subs.forEach((s) => {\n s?.unsubscribe();\n });\n }\n\n _emitOnItemClickEvent(e: AXClickEvent, item: AXButtonItemComponent): void {\n this.onItemClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e.nativeEvent,\n name: item.name,\n data: item.data,\n });\n }\n\n private _handleOnItemClick(e: AXClickEvent) {\n this.close();\n this._emitOnItemClickEvent(e, e.component);\n }\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 protected _handlePopupOnClosed(e: AXEvent) {\n this._target.focus();\n this.onClosed.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n toggle() {\n if (this.disabled !== true) {\n this._popover.toggle();\n }\n }\n\n close() {\n if (!this.isOpen || this.disabled) {\n return;\n }\n this._popover.close();\n this.focus();\n }\n\n open() {\n if (this.isOpen || this.disabled) {\n return;\n }\n this._popover.open();\n this._popover.focus();\n }\n\n get isOpen(): boolean {\n return this._popover?.isOpen;\n }\n\n get isActionsheetStyle(): boolean {\n return this._popover?.isActionsheetStyle;\n }\n\n @HostBinding('class')\n private get __hostClass(): string[] {\n return ['ax-dropdown-panel'];\n }\n\n // constructor(\n // elementRef: ElementRef,\n // cdr: ChangeDetectorRef,\n // @Optional()\n // public _parent?: AXButtonItemComponent,\n // ) {\n // super(elementRef, cdr);\n // this._target = this._parent?.getHostElement();\n // }\n\n // @ContentChildren(AXButtonItemComponent)\n // _contentButtons: QueryList<AXButtonItemComponent>;\n\n // @ViewChild(AXPopoverComponent, { static: true })\n // override popover: AXPopoverComponent = null;\n\n // @Input()\n // adaptivityEnabled = false;\n\n // _needBorder: boolean = false;\n // _subs: Subscription[] = [];\n\n // private _target: HTMLElement;\n // @Input()\n // public get target(): HTMLElement {\n // return this._target;\n // }\n // public set target(v: HTMLElement) {\n // this._target = v;\n // }\n\n // override onViewInit(): void {\n // super.onViewInit();\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 // ngAfterContentInit() {\n // this._initContents();\n // this._contentButtons.changes.subscribe(() => {\n // this._initContents();\n // });\n // }\n\n // private _initContents() {\n // this._needBorder = this._contentButtons.length > 0;\n // this._bindEvents();\n // this._bindProps();\n // this._cdr.markForCheck();\n // }\n\n // private _bindEvents() {\n // this._contentButtons?.forEach((b) => {\n // if (!b.onClick.length)\n // b.onClick.subscribe((c) => {\n // this._handleOnItemClick(c);\n // });\n // });\n // }\n\n // private _bindProps() {\n // this._contentButtons?.forEach((b) => {\n // //b.look = this.look ?? this.look;\n // b.disabled = b.disabled ?? this.disabled;\n // //b.toggleable = false;\n // });\n // }\n\n // onOptionChanged(options) {\n // this._bindProps();\n // }\n\n // override onDestroy(): void {\n // this._subs.forEach((s) => {\n // s?.unsubscribe();\n // });\n // }\n\n // _emitOnItemClickEvent(e: AXClickEvent, item: AXButtonItemComponent): void {\n // this.onItemClick.emit({\n // component: this,\n // htmlElement: this._getHostElement(),\n // nativeEvent: e.nativeEvent,\n // name: item.name,\n // data: item.data,\n // });\n // }\n\n // private _handleOnItemClick(e: AXClickEvent) {\n // this.close();\n // this._emitOnItemClickEvent(e, e.component);\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\" [class.ax-dropdown-list]=\"_needBorder\">\n <ng-content select=\"[panel],ax-button-item\"> </ng-content>\n </div>\n</ax-popover>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { 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: [\n CommonModule,\n AXCommonModule,\n A11yModule,\n AXButtonModule,\n OverlayModule,\n AXDecoratorModule,\n AXPopoverModule,\n ],\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;AAC9D,QAAA,IAAA,CAAA,QAAQ,GAA0B,IAAI,YAAY,EAAW,CAAC;AA6B/D,KAAA;IAzBC,MAAM,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE;AAC1B,YAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;AACxB,SAAA;KACF;IAED,KAAK,GAAA;QACH,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjC,OAAO;AACR,SAAA;AACD,QAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,KAAK,EAAE,CAAC;KACd;IAED,IAAI,GAAA;AACF,QAAA,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,C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../../../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 onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\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 {\n AXEvent,\n MXInteractiveComponent,\n MXLookComponent,\n convertToPlacement,\n} from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXPlatform } from '@acorex/core/platform';\nimport {\n Component,\n EventEmitter,\n HostBinding,\n HostListener,\n OnInit,\n Output,\n ViewChild,\n inject,\n} 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})\nexport class AXDropdownBoxComponent\n extends classes(MXInteractiveComponent, MXLookComponent)\n implements OnInit {\n private _platform: AXPlatform = inject(AXPlatform);\n protected _isMobile = false;\n protected _target: HTMLDivElement;\n protected _popoverTitle: string;\n protected _popoverWidth = '180px';\n protected _placement = convertToPlacement('bottom-start');\n\n @ViewChild(AXPopoverComponent)\n protected _popover: AXPopoverComponent;\n\n @Output()\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n ngOnInit() {\n super.ngOnInit();\n this._target = this.getHostElement();\n this._platform.resize.pipe(startWith()).subscribe(() => {\n this._isMobile = this._platform.is('SM');\n this._popover.close();\n });\n }\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 protected _handlePopupOnClosed(e: AXEvent) {\n console.log(\"dropdown closed\");\n this.focus();\n this.onClosed.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\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 updatePosition() {\n this._popover?.updatePosition();\n }\n\n toggle() {\n if (this.disabled !== true) {\n this._popover.toggle();\n }\n }\n\n close() {\n if (!this.isOpen || this.disabled) {\n return;\n }\n this._popover.close();\n this.focus();\n }\n\n open() {\n if (this.isOpen || this.disabled) {\n return;\n }\n this._popover.open();\n this._popover.focus();\n }\n\n get isOpen(): boolean {\n return this._popover?.isOpen;\n }\n\n get isActionsheetStyle(): boolean {\n return this._popover?.isActionsheetStyle;\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-editor-container ax-look-${this.look}`;\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>","import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n EventEmitter,\n HostBinding,\n Input,\n OnInit,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\n\nimport { AXButtonItemComponent } from '@acorex/components/button';\nimport {\n AXButtonClickEvent,\n AXClickEvent,\n AXEvent,\n MXComponentOptionChanged,\n MXInteractiveComponent,\n convertToPlacement,\n} from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXPlatform } from '@acorex/core/platform';\nimport { Subscription, startWith } from 'rxjs';\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})\nexport class AXDropdownPanelComponent\n extends MXInteractiveComponent\n implements OnInit, AfterViewInit, AfterContentInit\n{\n private _platform: AXPlatform = inject(AXPlatform);\n protected _isMobile = false;\n protected _target: HTMLDivElement;\n protected _popoverTitle: string;\n protected _placement = convertToPlacement('bottom-start');\n\n private _parent?: AXButtonItemComponent = inject(AXButtonItemComponent);\n protected _needBorder = false;\n _subs: Subscription[] = [];\n\n @ContentChildren(AXButtonItemComponent)\n protected _contentButtons: QueryList<AXButtonItemComponent>;\n\n @ViewChild(AXPopoverComponent)\n protected _popover: AXPopoverComponent;\n\n @Output()\n onOpened: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n @Output()\n onClosed: EventEmitter<AXEvent> = new EventEmitter<AXEvent>();\n\n @Input()\n adaptivityEnabled = false;\n\n @Output()\n onItemClick: EventEmitter<AXButtonClickEvent> = new EventEmitter<AXButtonClickEvent>();\n\n ngOnInit() {\n super.ngOnInit();\n this._target = this._parent.getHostElement();\n this._platform.resize.pipe(startWith(null)).subscribe(() => {\n this._isMobile = this._platform.is('SM');\n this._popover?.close();\n });\n }\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 ngAfterContentInit() {\n this._initContents();\n this._contentButtons.changes.subscribe(() => {\n this._initContents();\n });\n }\n\n private _initContents() {\n this._needBorder = this._contentButtons.length > 0;\n this._bindEvents();\n this._bindProps();\n this.cdr.markForCheck();\n }\n\n private _bindEvents() {\n this._contentButtons?.forEach((b) => {\n if (!b.onClick.length)\n b.onClick.subscribe((c) => {\n this._handleOnItemClick(c);\n });\n });\n }\n\n private _bindProps() {\n this._contentButtons?.forEach((b) => {\n //b.look = this.look ?? this.look;\n b.disabled = b.disabled ?? this.disabled;\n //b.toggleable = false;\n });\n }\n\n protected override internalOptionChanged(option: MXComponentOptionChanged<any>): void {\n this._bindProps();\n }\n\n ngOnDestroy(): void {\n this._subs.forEach((s) => {\n s?.unsubscribe();\n });\n }\n\n _emitOnItemClickEvent(e: AXClickEvent, item: AXButtonItemComponent): void {\n this.onItemClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e.nativeEvent,\n name: item.name,\n data: item.data,\n });\n }\n\n private _handleOnItemClick(e: AXClickEvent) {\n this.close();\n this._emitOnItemClickEvent(e, e.component);\n }\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 protected _handlePopupOnClosed(e: AXEvent) {\n this._target.focus();\n this.onClosed.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n toggle() {\n if (this.disabled !== true) {\n this._popover.toggle();\n }\n }\n\n close() {\n if (!this.isOpen || this.disabled) {\n return;\n }\n this._popover.close();\n this.focus();\n }\n\n open() {\n if (this.isOpen || this.disabled) {\n return;\n }\n this._popover.open();\n this._popover.focus();\n }\n\n get isOpen(): boolean {\n return this._popover?.isOpen;\n }\n\n get isActionsheetStyle(): boolean {\n return this._popover?.isActionsheetStyle;\n }\n\n @HostBinding('class')\n private get __hostClass(): string[] {\n return ['ax-dropdown-panel'];\n }\n\n // constructor(\n // elementRef: ElementRef,\n // cdr: ChangeDetectorRef,\n // @Optional()\n // public _parent?: AXButtonItemComponent,\n // ) {\n // super(elementRef, cdr);\n // this._target = this._parent?.getHostElement();\n // }\n\n // @ContentChildren(AXButtonItemComponent)\n // _contentButtons: QueryList<AXButtonItemComponent>;\n\n // @ViewChild(AXPopoverComponent, { static: true })\n // override popover: AXPopoverComponent = null;\n\n // @Input()\n // adaptivityEnabled = false;\n\n // _needBorder: boolean = false;\n // _subs: Subscription[] = [];\n\n // private _target: HTMLElement;\n // @Input()\n // public get target(): HTMLElement {\n // return this._target;\n // }\n // public set target(v: HTMLElement) {\n // this._target = v;\n // }\n\n // override onViewInit(): void {\n // super.onViewInit();\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 // ngAfterContentInit() {\n // this._initContents();\n // this._contentButtons.changes.subscribe(() => {\n // this._initContents();\n // });\n // }\n\n // private _initContents() {\n // this._needBorder = this._contentButtons.length > 0;\n // this._bindEvents();\n // this._bindProps();\n // this._cdr.markForCheck();\n // }\n\n // private _bindEvents() {\n // this._contentButtons?.forEach((b) => {\n // if (!b.onClick.length)\n // b.onClick.subscribe((c) => {\n // this._handleOnItemClick(c);\n // });\n // });\n // }\n\n // private _bindProps() {\n // this._contentButtons?.forEach((b) => {\n // //b.look = this.look ?? this.look;\n // b.disabled = b.disabled ?? this.disabled;\n // //b.toggleable = false;\n // });\n // }\n\n // onOptionChanged(options) {\n // this._bindProps();\n // }\n\n // override onDestroy(): void {\n // this._subs.forEach((s) => {\n // s?.unsubscribe();\n // });\n // }\n\n // _emitOnItemClickEvent(e: AXClickEvent, item: AXButtonItemComponent): void {\n // this.onItemClick.emit({\n // component: this,\n // htmlElement: this._getHostElement(),\n // nativeEvent: e.nativeEvent,\n // name: item.name,\n // data: item.data,\n // });\n // }\n\n // private _handleOnItemClick(e: AXClickEvent) {\n // this.close();\n // this._emitOnItemClickEvent(e, e.component);\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\" [class.ax-dropdown-list]=\"_needBorder\">\n <ng-content select=\"[panel],ax-button-item\"> </ng-content>\n </div>\n</ax-popover>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { 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: [\n CommonModule,\n AXCommonModule,\n A11yModule,\n AXButtonModule,\n OverlayModule,\n AXDecoratorModule,\n AXPopoverModule,\n ],\n exports: [AXDropdownPanelComponent, AXDropdownBoxComponent],\n declarations: [AXDropdownPanelComponent, AXDropdownBoxComponent],\n providers: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wBAAwB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA,EAAA;AAI/C,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,gBAAgB,YAZzB,YAAY;YACZ,cAAc;YACd,UAAU;YACV,cAAc;YACd,aAAa;YACb,iBAAiB;YACjB,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAMN,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAd5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,UAAU;wBACV,cAAc;wBACd,aAAa;wBACb,iBAAiB;wBACjB,eAAe;AAChB,qBAAA;AACD,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;;;ACxBD;;AAEG;;;;"}
@@ -8,6 +8,8 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
8
  import { Subscription, BehaviorSubject, debounceTime, distinctUntilChanged } from 'rxjs';
9
9
  import * as i1 from '@angular/common';
10
10
  import { CommonModule } from '@angular/common';
11
+ import * as i3 from '@acorex/core/translation';
12
+ import { AXTranslationModule } from '@acorex/core/translation';
11
13
 
12
14
  class AXListDataSource extends DataSource {
13
15
  /**
@@ -16,7 +18,7 @@ class AXListDataSource extends DataSource {
16
18
  constructor(config) {
17
19
  super();
18
20
  this.config = config;
19
- this.debounceTime = 300;
21
+ this.debounceTime = 0;
20
22
  this.subscription = new Subscription();
21
23
  this.source = config.source;
22
24
  if (config.debounceTime)
@@ -53,7 +55,8 @@ class AXListComponent extends MXSelectionValueComponent {
53
55
  super(...arguments);
54
56
  this.dataSource = convertArrayToDataSource([]);
55
57
  this.itemHeight = 40;
56
- this.onDataLoad = new EventEmitter();
58
+ // @Output()
59
+ // onDataLoad: EventEmitter<unknown[]> = new EventEmitter<unknown[]>();
57
60
  this.onScrolledIndexChanged = new EventEmitter();
58
61
  this.checkbox = true;
59
62
  this.isLoading = true;
@@ -69,12 +72,15 @@ class AXListComponent extends MXSelectionValueComponent {
69
72
  this.listDataSource = new AXListDataSource({
70
73
  source: this.dataSource,
71
74
  });
72
- this.listDataSource.source.onLoadingChanged.subscribe((data) => {
75
+ this.listDataSource.source
76
+ .onLoadingChanged
77
+ .subscribe((data) => {
73
78
  this.isLoading = data;
74
79
  });
75
- this.listDataSource.source.onChanged.subscribe((data) => {
80
+ this.listDataSource.source
81
+ .onChanged
82
+ .subscribe((data) => {
76
83
  this.hasItems = data.totalCount > 0;
77
- this.onDataLoad.emit(data.items);
78
84
  setTimeout(() => {
79
85
  this.render();
80
86
  }, 100);
@@ -158,7 +164,7 @@ class AXListComponent extends MXSelectionValueComponent {
158
164
  }
159
165
  }
160
166
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
161
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXListComponent, selector: "ax-list", inputs: { id: "id", name: "name", disabled: "disabled", readonly: "readonly", valueField: "valueField", textField: "textField", disabledField: "disabledField", multiple: "multiple", selectionMode: "selectionMode", dataSource: "dataSource", itemHeight: "itemHeight", itemTemplate: "itemTemplate", emptyTemplate: "emptyTemplate", loadingTemplate: "loadingTemplate", checkbox: "checkbox" }, outputs: { onValueChanged: "onValueChanged", disabledChange: "disabledChange", readOnlyChange: "readOnlyChange", onBlur: "onBlur", onFocus: "onFocus", onDataLoad: "onDataLoad", onScrolledIndexChanged: "onScrolledIndexChanged" }, host: { listeners: { "keydown": "_handleKeydown($event)" }, properties: { "class": "this.__hostClass" } }, providers: [
167
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXListComponent, selector: "ax-list", inputs: { id: "id", name: "name", disabled: "disabled", readonly: "readonly", valueField: "valueField", textField: "textField", disabledField: "disabledField", multiple: "multiple", selectionMode: "selectionMode", dataSource: "dataSource", itemHeight: "itemHeight", itemTemplate: "itemTemplate", emptyTemplate: "emptyTemplate", loadingTemplate: "loadingTemplate", checkbox: "checkbox" }, outputs: { onValueChanged: "onValueChanged", disabledChange: "disabledChange", readOnlyChange: "readOnlyChange", onBlur: "onBlur", onFocus: "onFocus", onScrolledIndexChanged: "onScrolledIndexChanged" }, host: { listeners: { "keydown": "_handleKeydown($event)" }, properties: { "class": "this.__hostClass" } }, providers: [
162
168
  { provide: AXComponent, useExisting: AXListComponent },
163
169
  { provide: AXFocusableComponent, useExisting: AXListComponent },
164
170
  { provide: AXValuableComponent, useExisting: AXListComponent },
@@ -167,7 +173,7 @@ class AXListComponent extends MXSelectionValueComponent {
167
173
  useExisting: forwardRef(() => AXListComponent),
168
174
  multi: true,
169
175
  },
170
- ], viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"list-container\" cdkVirtualScrollingElement>\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n class=\"ax-list-items-container\" (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n <li [class.ax-state-selected]=\"isItemSelected(item)\" class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\" [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\" [attr.data-id]=\"getValue(item)\">\n <!-- Custom Item Template -->\n <ng-container *ngIf=\"itemTemplate;else defaultItemTpl\">\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: { $implicit: { data:item } }\">\n </ng-container>\n </ng-container>\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n <ng-container *ngIf=\"item;else loadingTpl\">\n <div class=\"ax-label-container\">\n <input class=\"ax-checkbox\" *ngIf=\"multiple && checkbox\" type=\"checkbox\"\n [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\" />\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\">{{getDisplayText(item)}}</span>\n </div>\n <i class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item) \"></i>\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>Loading...</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-container *ngIf=\"emptyTemplate && hasItems===false && isLoading===false\">\n <div class=\"empty-container\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </div>\n</ng-container>", styles: [".ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus,.ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus-within,.ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus-visible{background-color:rgba(var(--ax-color-primary-200));color:rgba(var(--ax-color-primary-fore-lighten))}ax-list{width:100%;height:100%;display:block;font-style:.875rem}ax-list .list-container{display:flex;flex-direction:column;height:100%}ax-list .empty-container{width:100%;min-height:var(--ax-size-default);display:flex;align-items:center;padding-inline:.75rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li{font-size:.875rem;padding-inline-start:.75rem;padding-inline-end:1rem;position:relative;height:var(--ax-size-default);display:flex;justify-content:space-between;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:var(--ax-rounded-border-default)}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-within,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-visible{outline:2px solid;outline-color:rgba(var(--ax-color-primary-500));outline-offset:-4px}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-label-container{display:flex;align-items:center}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-checkbox-label{margin-inline-start:.5rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-selected-icon{color:rgba(var(--ax-color-primary-500));font-size:1.5rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li.ax-state-selected:not(ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-within,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-visible){background-color:rgba(var(--ax-color-primary-100))!important;color:rgba(var(--ax-color-primary-fore-lighten))!important}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li.ax-state-disabled{cursor:not-allowed;opacity:.5}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i2.CdkVirtualScrollableElement, selector: "[cdkVirtualScrollingElement]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
176
+ ], viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"list-container\" cdkVirtualScrollingElement>\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n class=\"ax-list-items-container\" (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n <li [class.ax-state-selected]=\"isItemSelected(item)\" class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\" [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\" [attr.data-id]=\"getValue(item)\">\n <!-- Custom Item Template -->\n <ng-container *ngIf=\"itemTemplate;else defaultItemTpl\">\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: { $implicit: { data:item } }\">\n </ng-container>\n </ng-container>\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n <ng-container *ngIf=\"item;else loadingTpl\">\n <div class=\"ax-label-container\">\n <input class=\"ax-checkbox\" *ngIf=\"multiple && checkbox\" type=\"checkbox\"\n [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\" />\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\">{{getDisplayText(item)}}</span>\n </div>\n <i class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item) \"></i>\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>{{'layout.loading.text' | trans}}</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-container *ngIf=\"emptyTemplate && hasItems===false && isLoading===false\">\n <div class=\"empty-container\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </div>\n</ng-container>", styles: [".ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus,.ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus-within,.ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus-visible{background-color:rgba(var(--ax-color-primary-200));color:rgba(var(--ax-color-primary-fore-lighten))}ax-list{width:100%;height:100%;display:block;font-style:.875rem}ax-list .list-container{display:flex;flex-direction:column;height:100%}ax-list .empty-container{width:100%;min-height:var(--ax-size-default);display:flex;align-items:center;padding-inline:.75rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li{font-size:.875rem;padding-inline-start:.75rem;padding-inline-end:1rem;position:relative;height:var(--ax-size-default);display:flex;justify-content:space-between;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-within,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-visible{outline:2px solid;outline-color:rgba(var(--ax-color-primary-500));outline-offset:-4px}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-label-container{display:flex;align-items:center}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-checkbox-label{margin-inline-start:.5rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-selected-icon{color:rgba(var(--ax-color-primary-500));font-size:1.5rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li.ax-state-selected:not(ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-within,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-visible){background-color:rgba(var(--ax-color-primary-100))!important;color:rgba(var(--ax-color-primary-fore-lighten))!important}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li.ax-state-disabled{cursor:not-allowed;opacity:.5}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i2.CdkVirtualScrollableElement, selector: "[cdkVirtualScrollingElement]" }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "trans" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
171
177
  }
172
178
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXListComponent, decorators: [{
173
179
  type: Component,
@@ -190,7 +196,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
190
196
  useExisting: forwardRef(() => AXListComponent),
191
197
  multi: true,
192
198
  },
193
- ], template: "<div class=\"list-container\" cdkVirtualScrollingElement>\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n class=\"ax-list-items-container\" (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n <li [class.ax-state-selected]=\"isItemSelected(item)\" class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\" [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\" [attr.data-id]=\"getValue(item)\">\n <!-- Custom Item Template -->\n <ng-container *ngIf=\"itemTemplate;else defaultItemTpl\">\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: { $implicit: { data:item } }\">\n </ng-container>\n </ng-container>\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n <ng-container *ngIf=\"item;else loadingTpl\">\n <div class=\"ax-label-container\">\n <input class=\"ax-checkbox\" *ngIf=\"multiple && checkbox\" type=\"checkbox\"\n [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\" />\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\">{{getDisplayText(item)}}</span>\n </div>\n <i class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item) \"></i>\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>Loading...</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-container *ngIf=\"emptyTemplate && hasItems===false && isLoading===false\">\n <div class=\"empty-container\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </div>\n</ng-container>", styles: [".ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus,.ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus-within,.ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus-visible{background-color:rgba(var(--ax-color-primary-200));color:rgba(var(--ax-color-primary-fore-lighten))}ax-list{width:100%;height:100%;display:block;font-style:.875rem}ax-list .list-container{display:flex;flex-direction:column;height:100%}ax-list .empty-container{width:100%;min-height:var(--ax-size-default);display:flex;align-items:center;padding-inline:.75rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li{font-size:.875rem;padding-inline-start:.75rem;padding-inline-end:1rem;position:relative;height:var(--ax-size-default);display:flex;justify-content:space-between;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:var(--ax-rounded-border-default)}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-within,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-visible{outline:2px solid;outline-color:rgba(var(--ax-color-primary-500));outline-offset:-4px}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-label-container{display:flex;align-items:center}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-checkbox-label{margin-inline-start:.5rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-selected-icon{color:rgba(var(--ax-color-primary-500));font-size:1.5rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li.ax-state-selected:not(ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-within,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-visible){background-color:rgba(var(--ax-color-primary-100))!important;color:rgba(var(--ax-color-primary-fore-lighten))!important}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li.ax-state-disabled{cursor:not-allowed;opacity:.5}\n"] }]
199
+ ], template: "<div class=\"list-container\" cdkVirtualScrollingElement>\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n class=\"ax-list-items-container\" (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n <li [class.ax-state-selected]=\"isItemSelected(item)\" class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\" [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\" [attr.data-id]=\"getValue(item)\">\n <!-- Custom Item Template -->\n <ng-container *ngIf=\"itemTemplate;else defaultItemTpl\">\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: { $implicit: { data:item } }\">\n </ng-container>\n </ng-container>\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n <ng-container *ngIf=\"item;else loadingTpl\">\n <div class=\"ax-label-container\">\n <input class=\"ax-checkbox\" *ngIf=\"multiple && checkbox\" type=\"checkbox\"\n [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\" />\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\">{{getDisplayText(item)}}</span>\n </div>\n <i class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item) \"></i>\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>{{'layout.loading.text' | trans}}</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-container *ngIf=\"emptyTemplate && hasItems===false && isLoading===false\">\n <div class=\"empty-container\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </div>\n</ng-container>", styles: [".ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus,.ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus-within,.ax-dark ax-list.ax-solid .cdk-virtual-scroll-viewport li:focus-visible{background-color:rgba(var(--ax-color-primary-200));color:rgba(var(--ax-color-primary-fore-lighten))}ax-list{width:100%;height:100%;display:block;font-style:.875rem}ax-list .list-container{display:flex;flex-direction:column;height:100%}ax-list .empty-container{width:100%;min-height:var(--ax-size-default);display:flex;align-items:center;padding-inline:.75rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li{font-size:.875rem;padding-inline-start:.75rem;padding-inline-end:1rem;position:relative;height:var(--ax-size-default);display:flex;justify-content:space-between;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-within,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-visible{outline:2px solid;outline-color:rgba(var(--ax-color-primary-500));outline-offset:-4px}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-label-container{display:flex;align-items:center}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-checkbox-label{margin-inline-start:.5rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li .ax-selected-icon{color:rgba(var(--ax-color-primary-500));font-size:1.5rem}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li.ax-state-selected:not(ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-within,ax-list.ax-solid .cdk-virtual-scroll-viewport ul li:focus-visible){background-color:rgba(var(--ax-color-primary-100))!important;color:rgba(var(--ax-color-primary-fore-lighten))!important}ax-list.ax-solid .cdk-virtual-scroll-viewport ul li.ax-state-disabled{cursor:not-allowed;opacity:.5}\n"] }]
194
200
  }], propDecorators: { dataSource: [{
195
201
  type: Input
196
202
  }], itemHeight: [{
@@ -201,8 +207,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
201
207
  type: Input
202
208
  }], loadingTemplate: [{
203
209
  type: Input
204
- }], onDataLoad: [{
205
- type: Output
206
210
  }], onScrolledIndexChanged: [{
207
211
  type: Output
208
212
  }], checkbox: [{
@@ -219,10 +223,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
219
223
  }] } });
220
224
 
221
225
  const COMPONENT = [AXListComponent];
222
- const MODULES = [CommonModule, ScrollingModule];
226
+ const MODULES = [CommonModule, ScrollingModule, AXTranslationModule];
223
227
  class AXListModule {
224
228
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
225
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.9", ngImport: i0, type: AXListModule, declarations: [AXListComponent], imports: [CommonModule, ScrollingModule], exports: [AXListComponent] }); }
229
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.9", ngImport: i0, type: AXListModule, declarations: [AXListComponent], imports: [CommonModule, ScrollingModule, AXTranslationModule], exports: [AXListComponent] }); }
226
230
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXListModule, imports: [MODULES] }); }
227
231
  }
228
232
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXListModule, decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-list.mjs","sources":["../../../../libs/components/list/src/lib/list.component.ts","../../../../libs/components/list/src/lib/list.component.html","../../../../libs/components/list/src/lib/list.module.ts","../../../../libs/components/list/src/acorex-components-list.ts"],"sourcesContent":["import {\n AXComponent,\n AXDateSource,\n AXEvent,\n AXFocusableComponent,\n AXValuableComponent,\n MXSelectionValueComponent,\n convertArrayToDataSource,\n} from '@acorex/components/common';\nimport { CollectionViewer, DataSource } from '@angular/cdk/collections';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BehaviorSubject, Observable, Subscription, debounceTime, distinctUntilChanged } from 'rxjs';\n\nexport class AXListDataSource<T = unknown> extends DataSource<T> {\n private debounceTime = 300;\n private subscription = new Subscription();\n public source: AXDateSource<T>;\n private dataStream: BehaviorSubject<T[]>;\n\n /**\n * @ignore\n */\n constructor(private config: { source: AXDateSource<T>; debounceTime?: number }) {\n super();\n this.source = config.source;\n if (config.debounceTime) this.debounceTime = config.debounceTime;\n //\n console.log(this.config.source.cachedItems);\n this.dataStream = new BehaviorSubject<T[]>(this.config.source.cachedItems);\n this.source.onChanged.subscribe((data) => {\n this.dataStream.next(data.cachedItems);\n });\n }\n\n connect(collectionViewer: CollectionViewer): Observable<T[]> {\n this.subscription.add(\n collectionViewer.viewChange\n .pipe(debounceTime(this.debounceTime))\n .pipe(distinctUntilChanged())\n .subscribe((range) => {\n const startPage = this.getPageForIndex(range.start);\n const endPage = this.getPageForIndex(range.end - 1);\n for (let i = startPage; i <= endPage; i++) {\n this.source.setPage(i);\n }\n }),\n );\n return this.dataStream;\n }\n\n disconnect(): void {\n this.subscription.unsubscribe();\n }\n\n private getPageForIndex(index: number): number {\n return Math.floor(index / this.source.config.pageSize);\n }\n}\n\nexport interface AXListScrollIndexChanged extends AXEvent {\n index: number;\n}\n\n@Component({\n selector: 'ax-list',\n templateUrl: './list.component.html',\n styleUrls: ['./list.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n inputs: [\n 'id',\n 'name',\n 'disabled',\n 'readonly',\n 'valueField',\n 'textField',\n 'disabledField',\n 'multiple',\n 'selectionMode',\n ],\n outputs: ['onValueChanged', 'disabledChange', 'readOnlyChange', 'onBlur', 'onFocus'],\n providers: [\n { provide: AXComponent, useExisting: AXListComponent },\n { provide: AXFocusableComponent, useExisting: AXListComponent },\n { provide: AXValuableComponent, useExisting: AXListComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXListComponent),\n multi: true,\n },\n ],\n})\nexport class AXListComponent extends MXSelectionValueComponent implements OnInit {\n @Input()\n dataSource: AXDateSource<unknown> = convertArrayToDataSource([]);\n\n @Input()\n itemHeight: number | 'auto' = 40;\n\n @Input()\n itemTemplate: TemplateRef<unknown>;\n\n @Input()\n emptyTemplate: TemplateRef<unknown>;\n\n @Input()\n loadingTemplate: TemplateRef<unknown>;\n\n @Output()\n onDataLoad: EventEmitter<unknown[]> = new EventEmitter<unknown[]>();\n\n @Output()\n onScrolledIndexChanged: EventEmitter<AXListScrollIndexChanged> =\n new EventEmitter<AXListScrollIndexChanged>();\n\n @Input()\n checkbox = true;\n\n protected listDataSource: AXListDataSource<unknown>;\n protected isLoading = true;\n protected hasItems = false;\n private lastIndex = 0;\n private postponeFocus = false;\n\n @ViewChild(CdkVirtualScrollViewport)\n viewport: CdkVirtualScrollViewport;\n\n trackByIdx(i) {\n return i;\n }\n\n ngOnInit() {\n super.ngOnInit();\n this.listDataSource = new AXListDataSource<unknown>({\n source: this.dataSource,\n });\n this.listDataSource.source.onLoadingChanged.subscribe((data) => {\n this.isLoading = data;\n });\n this.listDataSource.source.onChanged.subscribe((data) => {\n this.hasItems = data.totalCount > 0;\n this.onDataLoad.emit(data.items);\n setTimeout(() => {\n this.render();\n }, 100);\n });\n }\n\n _handleOnItemClick(e: MouseEvent, item: any) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n if (this.isItemDisabled(item)) {\n return;\n }\n this.toggleSelect(item);\n }\n\n @HostListener('keydown', ['$event'])\n _handleKeydown(e: KeyboardEvent) {\n if ((e.code === 'ArrowDown' || e.code === 'ArrowUp') && this.hasItems) {\n this.focusItemByNav(e.key === 'ArrowDown' ? 1 : -1);\n e.preventDefault();\n }\n if ((e.code === 'Space' || e.code === 'Enter') && this.hasItems) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n const id = document.activeElement?.closest('li')?.dataset?.id;\n this.toggleSelect(id);\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n private focusItemByNav(sign: -1 | 1): void {\n const list = this.getHostElement().querySelector('ul');\n const fn = (s) => list.querySelector<HTMLDivElement>(s);\n const itemDiv: HTMLElement =\n document.activeElement?.closest('li') || fn(`li.ax-state-selected`) || fn(`li`);\n const next = (sign == 1 ? itemDiv.nextElementSibling : itemDiv.previousElementSibling) as HTMLElement;\n if (next) {\n next.focus();\n }\n }\n\n protected _handleOnscrolledIndexChange(e: number) {\n this.lastIndex = e;\n this.onScrolledIndexChanged.emit({\n component: this,\n index: this.lastIndex,\n isUserInteraction: true,\n });\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string {\n const _class = `ax-solid`;\n return this.itemTemplate ? '' : _class;\n }\n\n getItemByKey(key: unknown): Promise<unknown> | unknown {\n return this.dataSource.find(key);\n }\n\n public render() {\n this.viewport.checkViewportSize();\n this.viewport.scrollToIndex(this.lastIndex);\n if (this.postponeFocus) {\n this.postponeFocus = false;\n this.focus();\n }\n }\n\n public scrollToIndex(index: number) {\n this.viewport.scrollToIndex(index);\n }\n\n override focus(): void {\n const list = this.getHostElement().querySelector('ul');\n const focusable =\n list.querySelector<HTMLElement>('li.ax-state-selected') ??\n list.querySelector<HTMLElement>('li.list-item');\n if (focusable) {\n focusable.focus();\n } else {\n this.postponeFocus = true;\n }\n }\n}\n","<div class=\"list-container\" cdkVirtualScrollingElement>\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n class=\"ax-list-items-container\" (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n <li [class.ax-state-selected]=\"isItemSelected(item)\" class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\" [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\" [attr.data-id]=\"getValue(item)\">\n <!-- Custom Item Template -->\n <ng-container *ngIf=\"itemTemplate;else defaultItemTpl\">\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: { $implicit: { data:item } }\">\n </ng-container>\n </ng-container>\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n <ng-container *ngIf=\"item;else loadingTpl\">\n <div class=\"ax-label-container\">\n <input class=\"ax-checkbox\" *ngIf=\"multiple && checkbox\" type=\"checkbox\"\n [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\" />\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\">{{getDisplayText(item)}}</span>\n </div>\n <i class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item) \"></i>\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>Loading...</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-container *ngIf=\"emptyTemplate && hasItems===false && isLoading===false\">\n <div class=\"empty-container\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </div>\n</ng-container>","import { ScrollingModule } from '@angular/cdk/scrolling';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXListComponent } from './list.component';\n\nconst COMPONENT = [AXListComponent];\nconst MODULES = [CommonModule, ScrollingModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AA4BM,MAAO,gBAA8B,SAAQ,UAAa,CAAA;AAM9D;;AAEG;AACH,IAAA,WAAA,CAAoB,MAA0D,EAAA;AAC5E,QAAA,KAAK,EAAE,CAAC;QADU,IAAM,CAAA,MAAA,GAAN,MAAM,CAAoD;QARtE,IAAY,CAAA,YAAA,GAAG,GAAG,CAAC;AACnB,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AASxC,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,MAAM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AAZ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,iBATN,eAAe,CAAA,EAAA,OAAA,EAAA,CACjB,YAAY,EAAE,eAAe,aAD3B,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;AASrB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAJV,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-list.mjs","sources":["../../../../libs/components/list/src/lib/list.component.ts","../../../../libs/components/list/src/lib/list.component.html","../../../../libs/components/list/src/lib/list.module.ts","../../../../libs/components/list/src/acorex-components-list.ts"],"sourcesContent":["import {\n AXComponent,\n AXDateSource,\n AXEvent,\n AXFocusableComponent,\n AXValuableComponent,\n MXSelectionValueComponent,\n convertArrayToDataSource,\n} from '@acorex/components/common';\nimport { CollectionViewer, DataSource } from '@angular/cdk/collections';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n OnInit,\n Output,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BehaviorSubject, Observable, Subscription, debounceTime, distinctUntilChanged } from 'rxjs';\n\nexport class AXListDataSource<T = unknown> extends DataSource<T> {\n private debounceTime = 0;\n private subscription = new Subscription();\n public source: AXDateSource<T>;\n private dataStream: BehaviorSubject<T[]>;\n\n /**\n * @ignore\n */\n constructor(private config: { source: AXDateSource<T>; debounceTime?: number }) {\n super();\n this.source = config.source;\n if (config.debounceTime) this.debounceTime = config.debounceTime;\n //\n console.log(this.config.source.cachedItems);\n this.dataStream = new BehaviorSubject<T[]>(this.config.source.cachedItems);\n this.source.onChanged.subscribe((data) => {\n this.dataStream.next(data.cachedItems);\n });\n }\n\n connect(collectionViewer: CollectionViewer): Observable<T[]> {\n this.subscription.add(\n collectionViewer.viewChange\n .pipe(debounceTime(this.debounceTime))\n .pipe(distinctUntilChanged())\n .subscribe((range) => {\n const startPage = this.getPageForIndex(range.start);\n const endPage = this.getPageForIndex(range.end - 1);\n for (let i = startPage; i <= endPage; i++) {\n this.source.setPage(i);\n }\n }),\n );\n return this.dataStream;\n }\n\n disconnect(): void {\n this.subscription.unsubscribe();\n }\n\n private getPageForIndex(index: number): number {\n return Math.floor(index / this.source.config.pageSize);\n }\n}\n\nexport interface AXListScrollIndexChanged extends AXEvent {\n index: number;\n}\n\n@Component({\n selector: 'ax-list',\n templateUrl: './list.component.html',\n styleUrls: ['./list.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n inputs: [\n 'id',\n 'name',\n 'disabled',\n 'readonly',\n 'valueField',\n 'textField',\n 'disabledField',\n 'multiple',\n 'selectionMode',\n ],\n outputs: ['onValueChanged', 'disabledChange', 'readOnlyChange', 'onBlur', 'onFocus'],\n providers: [\n { provide: AXComponent, useExisting: AXListComponent },\n { provide: AXFocusableComponent, useExisting: AXListComponent },\n { provide: AXValuableComponent, useExisting: AXListComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXListComponent),\n multi: true,\n },\n ],\n})\nexport class AXListComponent extends MXSelectionValueComponent implements OnInit {\n @Input()\n dataSource: AXDateSource<unknown> = convertArrayToDataSource([]);\n\n @Input()\n itemHeight: number | 'auto' = 40;\n\n @Input()\n itemTemplate: TemplateRef<unknown>;\n\n @Input()\n emptyTemplate: TemplateRef<unknown>;\n\n @Input()\n loadingTemplate: TemplateRef<unknown>;\n\n // @Output()\n // onDataLoad: EventEmitter<unknown[]> = new EventEmitter<unknown[]>();\n\n @Output()\n onScrolledIndexChanged: EventEmitter<AXListScrollIndexChanged> =\n new EventEmitter<AXListScrollIndexChanged>();\n\n @Input()\n checkbox = true;\n\n protected listDataSource: AXListDataSource<unknown>;\n protected isLoading = true;\n protected hasItems = false;\n private lastIndex = 0;\n private postponeFocus = false;\n\n @ViewChild(CdkVirtualScrollViewport)\n viewport: CdkVirtualScrollViewport;\n\n trackByIdx(i) {\n return i;\n }\n\n ngOnInit() {\n super.ngOnInit();\n this.listDataSource = new AXListDataSource<unknown>({\n source: this.dataSource,\n });\n this.listDataSource.source\n .onLoadingChanged\n .subscribe((data) => {\n this.isLoading = data;\n });\n this.listDataSource.source\n .onChanged\n .subscribe((data) => {\n this.hasItems = data.totalCount > 0;\n setTimeout(() => {\n this.render();\n }, 100);\n });\n }\n\n _handleOnItemClick(e: MouseEvent, item: any) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n if (this.isItemDisabled(item)) {\n return;\n }\n this.toggleSelect(item);\n }\n\n @HostListener('keydown', ['$event'])\n _handleKeydown(e: KeyboardEvent) {\n if ((e.code === 'ArrowDown' || e.code === 'ArrowUp') && this.hasItems) {\n this.focusItemByNav(e.key === 'ArrowDown' ? 1 : -1);\n e.preventDefault();\n }\n if ((e.code === 'Space' || e.code === 'Enter') && this.hasItems) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n const id = document.activeElement?.closest('li')?.dataset?.id;\n this.toggleSelect(id);\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n private focusItemByNav(sign: -1 | 1): void {\n const list = this.getHostElement().querySelector('ul');\n const fn = (s) => list.querySelector<HTMLDivElement>(s);\n const itemDiv: HTMLElement =\n document.activeElement?.closest('li') || fn(`li.ax-state-selected`) || fn(`li`);\n const next = (sign == 1 ? itemDiv.nextElementSibling : itemDiv.previousElementSibling) as HTMLElement;\n if (next) {\n next.focus();\n }\n }\n\n protected _handleOnscrolledIndexChange(e: number) {\n this.lastIndex = e;\n this.onScrolledIndexChanged.emit({\n component: this,\n index: this.lastIndex,\n isUserInteraction: true,\n });\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string {\n const _class = `ax-solid`;\n return this.itemTemplate ? '' : _class;\n }\n\n getItemByKey(key: unknown): Promise<unknown> | unknown {\n return this.dataSource.find(key);\n }\n\n public render() {\n this.viewport.checkViewportSize();\n this.viewport.scrollToIndex(this.lastIndex);\n if (this.postponeFocus) {\n this.postponeFocus = false;\n this.focus();\n }\n }\n\n public scrollToIndex(index: number) {\n this.viewport.scrollToIndex(index);\n }\n\n override focus(): void {\n const list = this.getHostElement().querySelector('ul');\n const focusable =\n list.querySelector<HTMLElement>('li.ax-state-selected') ??\n list.querySelector<HTMLElement>('li.list-item');\n if (focusable) {\n focusable.focus();\n } else {\n this.postponeFocus = true;\n }\n }\n}\n","<div class=\"list-container\" cdkVirtualScrollingElement>\n <ng-content select=\"ax-header\"></ng-content>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemHeight\" [style.--item-height]=\"itemHeight+'px'\"\n class=\"ax-list-items-container\" (scrolledIndexChange)=\"_handleOnscrolledIndexChange($event)\">\n <ul>\n <!-- Item Template -->\n <ng-container *cdkVirtualFor=\"let item of listDataSource;let i = index; trackBy: trackByIdx\">\n <ng-container *ngIf=\"item;else loadingTpl\">\n <li [class.ax-state-selected]=\"isItemSelected(item)\" class=\"list-item\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\" [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\" [attr.data-id]=\"getValue(item)\">\n <!-- Custom Item Template -->\n <ng-container *ngIf=\"itemTemplate;else defaultItemTpl\">\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: { $implicit: { data:item } }\">\n </ng-container>\n </ng-container>\n <!-- Default Item Template -->\n <ng-template #defaultItemTpl>\n <ng-container *ngIf=\"item;else loadingTpl\">\n <div class=\"ax-label-container\">\n <input class=\"ax-checkbox\" *ngIf=\"multiple && checkbox\" type=\"checkbox\"\n [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\"\n tabindex=\"0\" />\n <span\n [class.ax-checkbox-label]=\"multiple && checkbox\">{{getDisplayText(item)}}</span>\n </div>\n <i class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item) \"></i>\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </cdk-virtual-scroll-viewport>\n <ng-content select=\"ax-footer\"></ng-content>\n</div>\n<!-- Loading Template -->\n<ng-template #loadingTpl>\n <!-- Custom Loading Template -->\n <ng-container *ngIf=\"loadingTemplate;else defaultLoadingTpl\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\n </ng-container>\n </ng-container>\n <!-- Default Loading Template -->\n <ng-template #defaultLoadingTpl>\n <li>{{'layout.loading.text' | trans}}</li>\n </ng-template>\n</ng-template>\n<!-- Empty Template -->\n<ng-container *ngIf=\"emptyTemplate && hasItems===false && isLoading===false\">\n <div class=\"empty-container\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </div>\n</ng-container>","import { ScrollingModule } from '@angular/cdk/scrolling';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXListComponent } from './list.component';\nimport { AXTranslationModule } from '@acorex/core/translation';\n\nconst COMPONENT = [AXListComponent];\nconst MODULES = [CommonModule, ScrollingModule, AXTranslationModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXListModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA4BM,MAAO,gBAA8B,SAAQ,UAAa,CAAA;AAM9D;;AAEG;AACH,IAAA,WAAA,CAAoB,MAA0D,EAAA;AAC5E,QAAA,KAAK,EAAE,CAAC;QADU,IAAM,CAAA,MAAA,GAAN,MAAM,CAAoD;QARtE,IAAY,CAAA,YAAA,GAAG,CAAC,CAAC;AACjB,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AASxC,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,MAAM,CAAC,YAAY;AAAE,YAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;;QAEjE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAC5C,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,eAAe,CAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAC3E,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,IAAI,KAAI;YACvC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACzC,SAAC,CAAC,CAAC;KACJ;AAED,IAAA,OAAO,CAAC,gBAAkC,EAAA;AACxC,QAAA,IAAI,CAAC,YAAY,CAAC,GAAG,CACnB,gBAAgB,CAAC,UAAU;AACxB,aAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;aACrC,IAAI,CAAC,oBAAoB,EAAE,CAAC;AAC5B,aAAA,SAAS,CAAC,CAAC,KAAK,KAAI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ɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXOtpComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
120
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXOtpComponent, selector: "ax-otp", inputs: { state: "state", disabled: "disabled", readonly: "readonly", look: "look", length: "length" }, outputs: { stateChange: "stateChange", disabledChange: "disabledChange", lenghtChange: "lenghtChange", onCompleted: "onCompleted" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-otp-input-container ax-editor-container ax-look-{{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\">\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input class=\"ax-input\" type=\"number\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\" [class.ax-state-error]=\"state === 'error'\" maxlength=\"1\"\n [ngModel]=\"_numbers[i]\" [disabled]=\"disabled\" [readonly]=\"readonly\" (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\" (keydown)=\"_handleOnKeyDown($event, i)\" disabled=\"disabled\" />\n </ng-container>\n</div>\n<ng-template #name></ng-template>", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem}ax-otp .ax-otp-input-container.ax-editor-container{border:none;height:auto;outline-color:transparent;overflow:initial;background-color:transparent}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:rgba(var(--ax-color-input-surface));border:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500));box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:0}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input{background-color:rgba(var(--ax-color-on-surface));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success{background-color:rgba(var(--ax-color-success-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{text-align:center;font-size:200%;overflow:hidden;aspect-ratio:1}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{opacity:.8;cursor:text}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{opacity:.5;cursor:not-allowed}@media (max-width: 599px){ax-otp .ax-otp-input-container.ax-editor-container .ax-input{font-size:100%}}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
120
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXOtpComponent, selector: "ax-otp", inputs: { state: "state", disabled: "disabled", readonly: "readonly", look: "look", length: "length" }, outputs: { stateChange: "stateChange", disabledChange: "disabledChange", lenghtChange: "lenghtChange", onCompleted: "onCompleted" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-otp-input-container ax-editor-container ax-look-{{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\">\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input class=\"ax-input\" type=\"number\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\" [class.ax-state-error]=\"state === 'error'\" maxlength=\"1\"\n [ngModel]=\"_numbers[i]\" [disabled]=\"disabled\" [readonly]=\"readonly\" (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\" (keydown)=\"_handleOnKeyDown($event, i)\" disabled=\"disabled\" />\n </ng-container>\n</div>\n<ng-template #name></ng-template>", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem}ax-otp .ax-otp-input-container.ax-editor-container{border:none;height:auto;outline-color:transparent;overflow:initial;background-color:transparent}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:rgba(var(--ax-color-input-surface));border:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500));box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:0}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input{background-color:rgba(var(--ax-color-on-surface));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success{background-color:rgba(var(--ax-color-success-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{text-align:center;font-size:200%;overflow:hidden;aspect-ratio:1}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{opacity:.8;cursor:text}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{opacity:.5;cursor:not-allowed}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
121
121
  }
122
122
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXOtpComponent, decorators: [{
123
123
  type: Component,
124
- args: [{ selector: 'ax-otp', inputs: ['state', 'disabled', 'readonly', 'look'], outputs: ['stateChange', 'disabledChange'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-otp-input-container ax-editor-container ax-look-{{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\">\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input class=\"ax-input\" type=\"number\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\" [class.ax-state-error]=\"state === 'error'\" maxlength=\"1\"\n [ngModel]=\"_numbers[i]\" [disabled]=\"disabled\" [readonly]=\"readonly\" (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\" (keydown)=\"_handleOnKeyDown($event, i)\" disabled=\"disabled\" />\n </ng-container>\n</div>\n<ng-template #name></ng-template>", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem}ax-otp .ax-otp-input-container.ax-editor-container{border:none;height:auto;outline-color:transparent;overflow:initial;background-color:transparent}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:rgba(var(--ax-color-input-surface));border:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500));box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:0}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input{background-color:rgba(var(--ax-color-on-surface));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success{background-color:rgba(var(--ax-color-success-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{text-align:center;font-size:200%;overflow:hidden;aspect-ratio:1}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{opacity:.8;cursor:text}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{opacity:.5;cursor:not-allowed}@media (max-width: 599px){ax-otp .ax-otp-input-container.ax-editor-container .ax-input{font-size:100%}}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"] }]
124
+ args: [{ selector: 'ax-otp', inputs: ['state', 'disabled', 'readonly', 'look'], outputs: ['stateChange', 'disabledChange'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-otp-input-container ax-editor-container ax-look-{{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\">\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input class=\"ax-input\" type=\"number\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\" [class.ax-state-error]=\"state === 'error'\" maxlength=\"1\"\n [ngModel]=\"_numbers[i]\" [disabled]=\"disabled\" [readonly]=\"readonly\" (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\" (keydown)=\"_handleOnKeyDown($event, i)\" disabled=\"disabled\" />\n </ng-container>\n</div>\n<ng-template #name></ng-template>", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem}ax-otp .ax-otp-input-container.ax-editor-container{border:none;height:auto;outline-color:transparent;overflow:initial;background-color:transparent}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:rgba(var(--ax-color-input-surface));border:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500));box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:0}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input{background-color:rgba(var(--ax-color-on-surface));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success{background-color:rgba(var(--ax-color-success-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{text-align:center;font-size:200%;overflow:hidden;aspect-ratio:1}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{opacity:.8;cursor:text}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{opacity:.5;cursor:not-allowed}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"] }]
125
125
  }], propDecorators: { lenghtChange: [{
126
126
  type: Output
127
127
  }], length: [{
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-otp.mjs","sources":["../../../../libs/components/otp/src/lib/otp.class.ts","../../../../libs/components/otp/src/lib/otp.component.ts","../../../../libs/components/otp/src/lib/otp.component.html","../../../../libs/components/otp/src/lib/otp.module.ts","../../../../libs/components/otp/src/acorex-components-otp.ts"],"sourcesContent":["import { AXEvent } from '@acorex/components/common';\n\nexport class AXOtpCompletedEvent extends AXEvent {\n value: string;\n}\n","import { MXLookComponent, MXValueComponent } from '@acorex/components/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { classes } from 'polytype';\nimport { AXOtpCompletedEvent } from './otp.class';\n\n@Component({\n selector: 'ax-otp',\n templateUrl: './otp.component.html',\n styleUrls: ['./otp.component.scss'],\n inputs: ['state', 'disabled', 'readonly', 'look'],\n outputs: ['stateChange', 'disabledChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXOtpComponent\n extends classes(MXValueComponent<string>, MXLookComponent)\n implements OnInit, AfterViewInit\n{\n @Output()\n lenghtChange: EventEmitter<number> = new EventEmitter();\n\n private _length: number;\n\n @Input()\n public get length(): number {\n return this._length;\n }\n public set length(v: number) {\n this.setOption({\n name: 'length',\n afterCallback: () => {\n this._render();\n },\n value: v,\n });\n }\n\n inputs: number[] = [];\n\n @Output() onCompleted: EventEmitter<AXOtpCompletedEvent> = new EventEmitter<AXOtpCompletedEvent>();\n\n protected _numbers: number[] = [];\n\n override ngOnInit(): void {\n super.ngOnInit();\n this._render();\n }\n\n private _render() {\n this.inputs = Array(this.length)\n .fill(1)\n .map((x, i) => i);\n }\n\n clear() {\n this._numbers = [];\n this.setState('clear');\n }\n\n override ngAfterViewInit(): void {\n this.getHostElement().querySelector<HTMLInputElement>('.ax-input').focus();\n }\n\n protected _handleOnInput(event: any, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n const numberRegex = /^\\d+$/;\n if (!numberRegex.test(event.target.value)) {\n event.target.value = '';\n return;\n }\n if (event.target.value.length > 1) {\n const currentValue = event.target.value;\n event.target.value = '';\n event.target.value = currentValue.slice(-1);\n }\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n this._numbers[i] = event.target.value;\n if (this._numbers.filter((c) => c).length === this.length) {\n this.setState('success');\n this.onCompleted.emit({\n component: AXOtpComponent,\n value: this._numbers.join(''),\n });\n }\n }\n\n protected _handleOnKeyDown(event: KeyboardEvent, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n switch (event.key) {\n case 'Backspace':\n inputs[i].value = '';\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n event.preventDefault();\n }\n this._numbers[i] = NaN;\n break;\n case 'ArrowRight':\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n break;\n\n case 'ArrowLeft':\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n }\n break;\n case 'Home':\n inputs[0].focus();\n break;\n case 'End':\n inputs[this.length - 1].select();\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n break;\n }\n }\n protected _handleOnPaste(event: any) {\n const data = event.clipboardData.getData('text');\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[inputs.length - 1].focus();\n this._numbers = [];\n for (let i = 0; i < data.length; i++) {\n this._numbers[i] = data[i];\n }\n }\n\n protected _handleOnClick(event: any, i) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[i].select();\n }\n}\n","<div class=\"ax-otp-input-container ax-editor-container ax-look-{{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\">\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input class=\"ax-input\" type=\"number\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\" [class.ax-state-error]=\"state === 'error'\" maxlength=\"1\"\n [ngModel]=\"_numbers[i]\" [disabled]=\"disabled\" [readonly]=\"readonly\" (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\" (keydown)=\"_handleOnKeyDown($event, i)\" disabled=\"disabled\" />\n </ng-container>\n</div>\n<ng-template #name></ng-template>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXOtpComponent } from './otp.component';\nimport { FormsModule } from '@angular/forms';\n\nconst COMPONENT = [AXOtpComponent];\nconst MODULES = [CommonModule, FormsModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXOtpModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEM,MAAO,mBAAoB,SAAQ,OAAO,CAAA;AAE/C;;ACmBK,MAAO,cACX,SAAQ,OAAO,EAAC,gBAAwB,GAAE,eAAe,CAAC,CAAA;AAV5D,IAAA,WAAA,GAAA;;AAcE,QAAA,IAAA,CAAA,YAAY,GAAyB,IAAI,YAAY,EAAE,CAAC;QAkBxD,IAAM,CAAA,MAAA,GAAa,EAAE,CAAC;AAEZ,QAAA,IAAA,CAAA,WAAW,GAAsC,IAAI,YAAY,EAAuB,CAAC;QAEzF,IAAQ,CAAA,QAAA,GAAa,EAAE,CAAC;AA+FnC,KAAA;AAjHC,IAAA,IACW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IACD,IAAW,MAAM,CAAC,CAAS,EAAA;QACzB,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,QAAQ;YACd,aAAa,EAAE,MAAK;gBAClB,IAAI,CAAC,OAAO,EAAE,CAAC;aAChB;AACD,YAAA,KAAK,EAAE,CAAC;AACT,SAAA,CAAC,CAAC;KACJ;IAQQ,QAAQ,GAAA;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,OAAO,EAAE,CAAC;KAChB;IAEO,OAAO,GAAA;QACb,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;aAC7B,IAAI,CAAC,CAAC,CAAC;aACP,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;KACrB;IAED,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;AACnB,QAAA,IAAI,CAAC,QAAQ,CA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ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-otp.mjs","sources":["../../../../libs/components/otp/src/lib/otp.class.ts","../../../../libs/components/otp/src/lib/otp.component.ts","../../../../libs/components/otp/src/lib/otp.component.html","../../../../libs/components/otp/src/lib/otp.module.ts","../../../../libs/components/otp/src/acorex-components-otp.ts"],"sourcesContent":["import { AXEvent } from '@acorex/components/common';\n\nexport class AXOtpCompletedEvent extends AXEvent {\n value: string;\n}\n","import { MXLookComponent, MXValueComponent } from '@acorex/components/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { classes } from 'polytype';\nimport { AXOtpCompletedEvent } from './otp.class';\n\n@Component({\n selector: 'ax-otp',\n templateUrl: './otp.component.html',\n styleUrls: ['./otp.component.scss'],\n inputs: ['state', 'disabled', 'readonly', 'look'],\n outputs: ['stateChange', 'disabledChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXOtpComponent\n extends classes(MXValueComponent<string>, MXLookComponent)\n implements OnInit, AfterViewInit\n{\n @Output()\n lenghtChange: EventEmitter<number> = new EventEmitter();\n\n private _length: number;\n\n @Input()\n public get length(): number {\n return this._length;\n }\n public set length(v: number) {\n this.setOption({\n name: 'length',\n afterCallback: () => {\n this._render();\n },\n value: v,\n });\n }\n\n inputs: number[] = [];\n\n @Output() onCompleted: EventEmitter<AXOtpCompletedEvent> = new EventEmitter<AXOtpCompletedEvent>();\n\n protected _numbers: number[] = [];\n\n override ngOnInit(): void {\n super.ngOnInit();\n this._render();\n }\n\n private _render() {\n this.inputs = Array(this.length)\n .fill(1)\n .map((x, i) => i);\n }\n\n clear() {\n this._numbers = [];\n this.setState('clear');\n }\n\n override ngAfterViewInit(): void {\n this.getHostElement().querySelector<HTMLInputElement>('.ax-input').focus();\n }\n\n protected _handleOnInput(event: any, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n const numberRegex = /^\\d+$/;\n if (!numberRegex.test(event.target.value)) {\n event.target.value = '';\n return;\n }\n if (event.target.value.length > 1) {\n const currentValue = event.target.value;\n event.target.value = '';\n event.target.value = currentValue.slice(-1);\n }\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n this._numbers[i] = event.target.value;\n if (this._numbers.filter((c) => c).length === this.length) {\n this.setState('success');\n this.onCompleted.emit({\n component: AXOtpComponent,\n value: this._numbers.join(''),\n });\n }\n }\n\n protected _handleOnKeyDown(event: KeyboardEvent, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n switch (event.key) {\n case 'Backspace':\n inputs[i].value = '';\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n event.preventDefault();\n }\n this._numbers[i] = NaN;\n break;\n case 'ArrowRight':\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n break;\n\n case 'ArrowLeft':\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n }\n break;\n case 'Home':\n inputs[0].focus();\n break;\n case 'End':\n inputs[this.length - 1].select();\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n break;\n }\n }\n protected _handleOnPaste(event: any) {\n const data = event.clipboardData.getData('text');\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[inputs.length - 1].focus();\n this._numbers = [];\n for (let i = 0; i < data.length; i++) {\n this._numbers[i] = data[i];\n }\n }\n\n protected _handleOnClick(event: any, i) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[i].select();\n }\n}\n","<div class=\"ax-otp-input-container ax-editor-container ax-look-{{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\">\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input class=\"ax-input\" type=\"number\" [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\" [class.ax-state-error]=\"state === 'error'\" maxlength=\"1\"\n [ngModel]=\"_numbers[i]\" [disabled]=\"disabled\" [readonly]=\"readonly\" (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\" (keydown)=\"_handleOnKeyDown($event, i)\" disabled=\"disabled\" />\n </ng-container>\n</div>\n<ng-template #name></ng-template>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXOtpComponent } from './otp.component';\nimport { FormsModule } from '@angular/forms';\n\nconst COMPONENT = [AXOtpComponent];\nconst MODULES = [CommonModule, FormsModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXOtpModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEM,MAAO,mBAAoB,SAAQ,OAAO,CAAA;AAE/C;;ACmBK,MAAO,cACX,SAAQ,OAAO,EAAC,gBAAwB,GAAE,eAAe,CAAC,CAAA;AAV5D,IAAA,WAAA,GAAA;;AAcE,QAAA,IAAA,CAAA,YAAY,GAAyB,IAAI,YAAY,EAAE,CAAC;QAkBxD,IAAM,CAAA,MAAA,GAAa,EAAE,CAAC;AAEZ,QAAA,IAAA,CAAA,WAAW,GAAsC,IAAI,YAAY,EAAuB,CAAC;QAEzF,IAAQ,CAAA,QAAA,GAAa,EAAE,CAAC;AA+FnC,KAAA;AAjHC,IAAA,IACW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IACD,IAAW,MAAM,CAAC,CAAS,EAAA;QACzB,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,QAAQ;YACd,aAAa,EAAE,MAAK;gBAClB,IAAI,CAAC,OAAO,EAAE,CAAC;aAChB;AACD,YAAA,KAAK,EAAE,CAAC;AACT,SAAA,CAAC,CAAC;KACJ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A,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAJT,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,WAAW,EAAA,UAAA,EAAA,CAAA;kBANvB,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;;;;"}
@@ -193,8 +193,11 @@ class AXPopoverComponent extends MXBaseComponent {
193
193
  //
194
194
  this._overlayEvents.scroll = this._platform.scroll.subscribe((c) => {
195
195
  const el = c.nativeEvent.target;
196
- if (this.isOpen &&
197
- el?.closest &&
196
+ if (el == document) {
197
+ this.close();
198
+ return;
199
+ }
200
+ if (el?.closest &&
198
201
  !el.closest('.ax-overlay-pane') &&
199
202
  !this._target.contains(el) &&
200
203
  !this._overlayRef?.overlayElement?.contains(el)) {