@acorex/components 7.1.51 → 7.1.52

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 (27) hide show
  1. package/esm2022/calendar/src/calendar.component.mjs +3 -3
  2. package/esm2022/collapse/src/collapse.component.mjs +2 -2
  3. package/esm2022/color-palette/src/color-palette-input.component.mjs +3 -3
  4. package/esm2022/color-picker/src/color-picker.component.mjs +3 -3
  5. package/esm2022/date-picker/src/datepicker.component.mjs +3 -3
  6. package/esm2022/popup/src/popup.component.mjs +4 -3
  7. package/esm2022/select-box/src/selectbox.component.mjs +6 -7
  8. package/esm2022/select-box/src/selectbox.module.mjs +4 -7
  9. package/esm2022/tabs/src/tabs.component.mjs +2 -2
  10. package/fesm2022/acorex-components-calendar.mjs +2 -2
  11. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  12. package/fesm2022/acorex-components-collapse.mjs +2 -2
  13. package/fesm2022/acorex-components-collapse.mjs.map +1 -1
  14. package/fesm2022/acorex-components-color-palette.mjs +2 -2
  15. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  16. package/fesm2022/acorex-components-color-picker.mjs +2 -2
  17. package/fesm2022/acorex-components-color-picker.mjs.map +1 -1
  18. package/fesm2022/acorex-components-date-picker.mjs +2 -2
  19. package/fesm2022/acorex-components-date-picker.mjs.map +1 -1
  20. package/fesm2022/acorex-components-popup.mjs +4 -3
  21. package/fesm2022/acorex-components-popup.mjs.map +1 -1
  22. package/fesm2022/acorex-components-select-box.mjs +8 -12
  23. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  24. package/fesm2022/acorex-components-tabs.mjs +2 -2
  25. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  26. package/package.json +29 -29
  27. package/select-box/src/selectbox.module.d.ts +4 -5
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-date-picker.mjs","sources":["../../../../projects/acorex/components/date-picker/src/datepicker.component.ts","../../../../projects/acorex/components/date-picker/src/datepicker.component.html","../../../../projects/acorex/components/date-picker/src/datepicker.module.ts","../../../../projects/acorex/components/date-picker/acorex-components-date-picker.ts"],"sourcesContent":["import { AXPlatform } from '@acorex/core/platform';\nimport { AXTranslator } from '@acorex/core/translation';\nimport { AXDateTime } from '@acorex/core/dateTime';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Input, EventEmitter, Output, inject } from '@angular/core';\nimport { AXClosbaleComponent, AXOptionChangedEvent, MXInteractiveComponent, MXValueComponent } from '@acorex/components/common';\nimport { AXPopoverComponent, MXDropDownComponent } from '@acorex/components/popover';\nimport { classes } from 'polytype';\nimport { AXCalendarComponent, AXCalendarNavigateEvent, MXCalendarBaseComponent } from '@acorex/components/calendar';\n\n@Component({\n selector: 'ax-date-picker',\n templateUrl: './datepicker.component.html',\n inputs: ['rtl', 'readonly', 'value', 'name', 'disabled', 'depth', 'activeView', 'min', 'max', 'disabledDates', 'holidayDates', 'type', 'cellTemplate', 'cellClass'],\n outputs: ['onOptionChanged', 'valueChange', 'onValueChanged', 'onBlur', 'onFocus', 'depthChange', 'typeChange', 'activeViewChange', 'disabledDatesChange', 'holidayDatesChange', 'onNavigate', 'onSlotClick'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXDatePickerComponent }],\n host: { class: 'ax-editor-container ax-drop-down' },\n})\nexport class AXDatePickerComponent extends classes(MXValueComponent<Date>, MXInteractiveComponent, MXCalendarBaseComponent, MXDropDownComponent) {\n @ViewChild(AXPopoverComponent, { static: true })\n protected popover: AXPopoverComponent = null;\n\n @ViewChild(AXCalendarComponent, { static: true })\n private _calendar: AXCalendarComponent;\n\n protected _target: HTMLDivElement;\n displayText: string;\n protected _calendarValue: Date;\n protected _cursorPos: number = 0;\n protected _isMobile: boolean = false;\n protected _popoverTitle: string;\n protected _popoverWidth: number;\n\n @Output()\n formatChange = new EventEmitter<string>();\n\n private _format: string = 'YYYY-MM-dd';\n @Input()\n public get format(): string {\n return this._format;\n }\n public set format(v: string) {\n this.setOption({\n name: 'format',\n value: v,\n });\n }\n\n @Input()\n placeholder: string;\n\n @Input()\n interface: 'calendar' | 'picker' = 'calendar';\n\n private _platform = inject(AXPlatform);\n\n ngOnInit(): void {\n super.ngOnInit();\n super.initPopOverPositions();\n this._target = this.getHostElement();\n this._isMobile = this._platform.is('Mobile') || this._platform.is('SM');\n this._platform.resize.subscribe(() => {\n this._isMobile = this._platform.is('Mobile') || this._platform.is('SM');\n this.popover.dispose();\n });\n this._popoverTitle = this.placeholder || AXTranslator.get('datepicker.popover.title');\n this.onOptionChanged.subscribe(this._handleOnOptionChanged.bind(this));\n this.onValueChanged.subscribe(this._handleOnValueChanged.bind(this));\n }\n\n private _updateDisplayText() {\n this.displayText = this.value ? AXDateTime.convert(this.value, this.type).format(this._format) : '';\n }\n\n protected _handlePopoverOpened(e) {\n this._calendar?.navTo(this.value || new AXDateTime(new Date(), this.type));\n }\n\n protected _handleArrowClickEvent() {\n this.toggle();\n }\n\n _handleOnValueChanged(oldValue?: any, newValue?: any) {\n this._updateDisplayText();\n this.close();\n }\n\n _handleOnOptionChanged(e: AXOptionChangedEvent): void {\n if (e.name == 'type') {\n this._updateDisplayText();\n }\n }\n\n protected _handleOnInputClickEvent(e: MouseEvent): void {\n const input = e.target as HTMLInputElement;\n e.preventDefault();\n e.stopPropagation();\n }\n\n protected _handleOnNavigate(e: AXCalendarNavigateEvent) {\n this.onNavigate.emit(e);\n }\n}\n","<ng-content select=\"ax-prefix\"> </ng-content>\n<div class=\"ax-dropdown-content ax-cursor-pointer\" (click)=\"toggle()\">\n <input\n class=\"ax-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"true\"\n [attr.tabindex]=\"_isMobile ? -1 : tabIndex\"\n [ngModel]=\"displayText\"\n (focus)=\"emitOnFocusEvent($event)\"\n (mouseup)=\"_handleOnInputClickEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\" />\n</div>\n<button [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-editor-control\" (click)=\"_handleArrowClickEvent()\">\n <span class=\"ax-icon ax-icon-calendar\"></span>\n</button>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ax-popover [target]=\"_target\" [position]=\"popOverPositions\" [openTrigger]=\"'manual'\" [closeTrigger]=\"'clickout'\" [adaptivityEnabled]=\"true\" (onOpened)=\"_handlePopoverOpened($event)\">\n <div class=\"ax-overlay-pane\" [class.ax-w-full]=\"_isMobile\">\n <ax-header *ngIf=\"_isMobile\">\n <ax-title>\n {{ placeholder || 'Choose a date' }}\n </ax-title>\n <ax-close-button></ax-close-button>\n </ax-header>\n <ng-container *ngIf=\"interface === 'calendar'; then calendarTemplate; else pickerTemplate\"></ng-container>\n <ng-template #calendarTemplate>\n <ax-calendar\n #calendar\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [(value)]=\"value\"\n [min]=\"min\"\n [max]=\"max\"\n [rtl]=\"rtl\"\n [disabledDates]=\"disabledDates\"\n [holidayDates]=\"holidayDates\"\n [depth]=\"depth\"\n (onNavigate)=\"_handleOnNavigate($event)\"\n [type]=\"type\">\n </ax-calendar>\n </ng-template>\n <ng-template #pickerTemplate> </ng-template>\n </div>\n</ax-popover>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXDateTimeModule } from '@acorex/core/dateTime';\n\nimport { AXDatePickerComponent } from './datepicker.component';\nimport { AXCalendarModule } from '@acorex/components/calendar';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTextBoxModule } from '@acorex/components/textbox';\nimport { FormsModule } from '@angular/forms';\n\nconst COMPONENT = [AXDatePickerComponent];\nconst MODULES = [\n CommonModule,\n AXCalendarModule,\n AXTextBoxModule,\n AXButtonModule,\n AXPopoverModule,\n AXDecoratorModule,\n AXDateTimeModule,\n FormsModule\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDatepickerModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,MAUa,qBAAsB,SAAQ,OAAO,EAAC,gBAAsB,GAAE,sBAAsB,EAAE,uBAAuB,EAAE,mBAAmB,CAAC,CAAA;IAEpI,OAAO,GAAuB,IAAI,CAAC;AAGrC,IAAA,SAAS,CAAsB;AAE7B,IAAA,OAAO,CAAiB;AAClC,IAAA,WAAW,CAAS;AACV,IAAA,cAAc,CAAO;IACrB,UAAU,GAAW,CAAC,CAAC;IACvB,SAAS,GAAY,KAAK,CAAC;AAC3B,IAAA,aAAa,CAAS;AACtB,IAAA,aAAa,CAAS;AAGhC,IAAA,YAAY,GAAG,IAAI,YAAY,EAAU,CAAC;IAElC,OAAO,GAAW,YAAY,CAAC;AACvC,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;AACd,YAAA,KAAK,EAAE,CAAC;AACT,SAAA,CAAC,CAAC;KACJ;AAGD,IAAA,WAAW,CAAS;IAGpB,SAAS,GAA0B,UAAU,CAAC;AAEtC,IAAA,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAEvC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,KAAK,CAAC,oBAAoB,EAAE,CAAC;AAC7B,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACrC,IAAI,CA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oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AAChB,iBAAA,CAAA;;;AC7BD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-date-picker.mjs","sources":["../../../../projects/acorex/components/date-picker/src/datepicker.component.ts","../../../../projects/acorex/components/date-picker/src/datepicker.component.html","../../../../projects/acorex/components/date-picker/src/datepicker.module.ts","../../../../projects/acorex/components/date-picker/acorex-components-date-picker.ts"],"sourcesContent":["import { AXPlatform } from '@acorex/core/platform';\nimport { AXTranslator } from '@acorex/core/translation';\nimport { AXDateTime } from '@acorex/core/dateTime';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Input, EventEmitter, Output, inject } from '@angular/core';\nimport { AXClosbaleComponent, AXOptionChangedEvent, MXInteractiveComponent, MXValueComponent } from '@acorex/components/common';\nimport { AXPopoverComponent, MXDropDownComponent } from '@acorex/components/popover';\nimport { classes } from 'polytype';\nimport { AXCalendarComponent, AXCalendarNavigateEvent, MXCalendarBaseComponent } from '@acorex/components/calendar';\n\n@Component({\n selector: 'ax-date-picker',\n templateUrl: './datepicker.component.html',\n inputs: ['rtl', 'readonly', 'value', 'name', 'disabled', 'depth', 'activeView', 'min', 'max', 'disabledDates', 'holidayDates', 'type', 'cellTemplate', 'cellClass'],\n outputs: ['onOptionChanged', 'valueChange', 'onValueChanged', 'onBlur', 'onFocus', 'depthChange', 'typeChange', 'activeViewChange', 'disabledDatesChange', 'holidayDatesChange', 'onNavigate', 'onSlotClick'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXDatePickerComponent }],\n host: { class: 'ax-editor-container ax-drop-down' },\n})\nexport class AXDatePickerComponent extends classes(MXValueComponent<Date>, MXInteractiveComponent, MXCalendarBaseComponent, MXDropDownComponent) {\n @ViewChild(AXPopoverComponent, { static: true })\n protected popover: AXPopoverComponent = null;\n\n @ViewChild(AXCalendarComponent, { static: true })\n private _calendar: AXCalendarComponent;\n\n protected _target: HTMLDivElement;\n displayText: string;\n protected _calendarValue: Date;\n protected _cursorPos: number = 0;\n protected _isMobile: boolean = false;\n protected _popoverTitle: string;\n protected _popoverWidth: number;\n\n @Output()\n formatChange = new EventEmitter<string>();\n\n private _format: string = 'YYYY-MM-dd';\n @Input()\n public get format(): string {\n return this._format;\n }\n public set format(v: string) {\n this.setOption({\n name: 'format',\n value: v,\n });\n }\n\n @Input()\n placeholder: string;\n\n @Input()\n interface: 'calendar' | 'picker' = 'calendar';\n\n private _platform = inject(AXPlatform);\n\n ngOnInit(): void {\n super.ngOnInit();\n super.initPopOverPositions();\n this._target = this.getHostElement();\n this._isMobile = this._platform.is('Mobile') || this._platform.is('SM');\n this._platform.resize.subscribe(() => {\n this._isMobile = this._platform.is('Mobile') || this._platform.is('SM');\n this.popover.dispose();\n });\n this._popoverTitle = this.placeholder || AXTranslator.get('datepicker.popover.title');\n this.onOptionChanged.subscribe(this._handleOnOptionChanged.bind(this));\n this.onValueChanged.subscribe(this._handleOnValueChanged.bind(this));\n }\n\n private _updateDisplayText() {\n this.displayText = this.value ? AXDateTime.convert(this.value, this.type).format(this._format) : '';\n }\n\n protected _handlePopoverOpened(e) {\n this._calendar?.navTo(this.value || new AXDateTime(new Date(), this.type));\n }\n\n protected _handleArrowClickEvent() {\n this.toggle();\n }\n\n _handleOnValueChanged(oldValue?: any, newValue?: any) {\n this._updateDisplayText();\n this.close();\n }\n\n _handleOnOptionChanged(e: AXOptionChangedEvent): void {\n if (e.name == 'type') {\n this._updateDisplayText();\n }\n }\n\n protected _handleOnInputClickEvent(e: MouseEvent): void {\n const input = e.target as HTMLInputElement;\n e.preventDefault();\n e.stopPropagation();\n }\n\n protected _handleOnNavigate(e: AXCalendarNavigateEvent) {\n this.onNavigate.emit(e);\n }\n}\n","<ng-content select=\"ax-prefix\"> </ng-content>\n<div class=\"ax-dropdown-content ax-cursor-pointer\" (click)=\"toggle()\">\n <input\n class=\"ax-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"true\"\n [attr.tabindex]=\"_isMobile ? -1 : tabIndex\"\n [ngModel]=\"displayText\"\n (focus)=\"emitOnFocusEvent($event)\"\n (mouseup)=\"_handleOnInputClickEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\" />\n</div>\n<button\n [disabled]=\"disabled\"\n [tabIndex]=\"-1\"\n class=\"ax-general-button ax-button-icon\"\n (click)=\"_handleArrowClickEvent()\">\n <span class=\"ax-icon ax-icon-calendar\"></span>\n</button>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ax-popover\n [target]=\"_target\"\n [position]=\"popOverPositions\"\n [openTrigger]=\"'manual'\"\n [closeTrigger]=\"'clickout'\"\n [adaptivityEnabled]=\"true\"\n (onOpened)=\"_handlePopoverOpened($event)\">\n <div class=\"ax-overlay-pane\" [class.ax-w-full]=\"_isMobile\">\n <ax-header *ngIf=\"_isMobile\">\n <ax-title>\n {{ placeholder || 'Choose a date' }}\n </ax-title>\n <ax-close-button></ax-close-button>\n </ax-header>\n <ng-container *ngIf=\"interface === 'calendar'; then calendarTemplate; else pickerTemplate\"></ng-container>\n <ng-template #calendarTemplate>\n <ax-calendar\n #calendar\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [(value)]=\"value\"\n [min]=\"min\"\n [max]=\"max\"\n [rtl]=\"rtl\"\n [disabledDates]=\"disabledDates\"\n [holidayDates]=\"holidayDates\"\n [depth]=\"depth\"\n (onNavigate)=\"_handleOnNavigate($event)\"\n [type]=\"type\">\n </ax-calendar>\n </ng-template>\n <ng-template #pickerTemplate> </ng-template>\n </div>\n</ax-popover>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXDateTimeModule } from '@acorex/core/dateTime';\n\nimport { AXDatePickerComponent } from './datepicker.component';\nimport { AXCalendarModule } from '@acorex/components/calendar';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTextBoxModule } from '@acorex/components/textbox';\nimport { FormsModule } from '@angular/forms';\n\nconst COMPONENT = [AXDatePickerComponent];\nconst MODULES = [\n CommonModule,\n AXCalendarModule,\n AXTextBoxModule,\n AXButtonModule,\n AXPopoverModule,\n AXDecoratorModule,\n AXDateTimeModule,\n FormsModule\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDatepickerModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,MAUa,qBAAsB,SAAQ,OAAO,EAAC,gBAAsB,GAAE,sBAAsB,EAAE,uBAAuB,EAAE,mBAAmB,CAAC,CAAA;IAEpI,OAAO,GAAuB,IAAI,CAAC;AAGrC,IAAA,SAAS,CAAsB;AAE7B,IAAA,OAAO,CAAiB;AAClC,IAAA,WAAW,CAAS;AACV,IAAA,cAAc,CAAO;IACrB,UAAU,GAAW,CAAC,CAAC;IACvB,SAAS,GAAY,KAAK,CAAC;AAC3B,IAAA,aAAa,CAAS;AACtB,IAAA,aAAa,CAAS;AAGhC,IAAA,YAAY,GAAG,IAAI,YAAY,EAAU,CAAC;IAElC,OAAO,GAAW,YAAY,CAAC;AACvC,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;AACd,YAAA,KAAK,EAAE,CAAC;AACT,SAAA,CAAC,CA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AA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAJd,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIX,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,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;AAChB,iBAAA,CAAA;;;AC7BD;;AAEG;;;;"}
@@ -13,8 +13,9 @@ import * as i4 from '@angular/cdk/drag-drop';
13
13
  import { DragDropModule } from '@angular/cdk/drag-drop';
14
14
  import * as i5 from '@angular/cdk/a11y';
15
15
  import { A11yModule } from '@angular/cdk/a11y';
16
- import { AXButtonModule } from '@acorex/components/button';
16
+ import * as i7 from '@acorex/components/decorators';
17
17
  import { AXDecoratorModule } from '@acorex/components/decorators';
18
+ import { AXButtonModule } from '@acorex/components/button';
18
19
 
19
20
  /**
20
21
  * The Button is a component which detects user interaction and triggers a corresponding event
@@ -140,11 +141,11 @@ class AXPopupComponent extends AXBaseComponentMixin {
140
141
  }
141
142
  onFullScreen() { }
142
143
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AXPopupComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: i1.AXLoadingService }, { token: i2.AXPlatform }], target: i0.ɵɵFactoryTarget.Component });
143
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: AXPopupComponent, selector: "ax-popup", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{size}}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\n <span class=\"ax-popup-title\">{{title}}</span>\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\n </div>\n </div>\n <div class=\"ax-popup-main-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n</div>", styles: [".ax-popup{display:flex;flex-direction:column;background-color:rgba(var(--ax-color-surface));box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border-radius:var(--ax-rounded-border-default);outline:unset;padding:0;width:50%;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));min-height:-moz-fit-content;min-height:fit-content;margin:0 auto;width:auto;overflow:hidden}.ax-popup .ax-popup-header{padding:1rem;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}.ax-popup .ax-popup-header .ax-popup-title{font-size:1.125rem;font-weight:500}@media (max-width: 599px){.ax-popup .ax-popup-header .ax-popup-title{font-size:1rem}}.ax-popup .ax-popup-header .ax-icon-close{font-size:1.25rem;cursor:pointer}.ax-popup .ax-popup-header .ax-icon-close:hover{opacity:.5}.ax-popup ax-footer{padding:.75rem;display:flex;align-items:center;justify-content:space-between;background-color:rgba(var(--ax-color-on-surface))}.ax-popup:focus{outline-color:transparent}.ax-popup:focus-visible{border-color:rgba(var(--ax-color-primary-500))}.ax-popup .ax-popup-main-container{overflow:auto;flex:1 1 0%}.ax-popup.ax-popup-full{width:100vw;max-height:calc(100 * var(--ax-vh));height:calc(100 * var(--ax-vh));border-radius:0!important}.ax-popup.ax-fit{width:-moz-fit-content;width:fit-content}@media (max-width: 599px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{width:93vw!important;height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important}.ax-popup.ax-popup-sm .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-md .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-lg .ax-popup-main-container>ng-component>div{width:100%}}@media (min-width: 600px){.ax-popup.ax-popup-sm{min-width:60vw!important;max-width:85vw!important}.ax-popup.ax-popup-md{min-width:70vw!important;max-width:85vw!important}.ax-popup.ax-popup-lg{min-width:85vw!important;max-width:90vw!important}}@media (min-width: 1200px){.ax-popup.ax-popup-sm{min-width:25vw!important;max-width:35vw!important}.ax-popup.ax-popup-md{min-width:45vw!important;max-width:55vw!important}.ax-popup.ax-popup-lg{min-width:75vw!important;max-width:95vw!important}}@media (min-width: 1800px){.ax-popup.ax-popup-sm{min-width:15vw!important;max-width:25vw!important}.ax-popup.ax-popup-md{min-width:30vw!important;max-width:50vw!important}.ax-popup.ax-popup-lg{min-width:45vw!important;max-width:85vw!important}}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i5.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i6.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
144
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: AXPopupComponent, selector: "ax-popup", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{ size }}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\n <span class=\"ax-popup-title\">{{ title }}</span>\n <!-- <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span> -->\n <ax-close-button (click)=\"_handleCloseClick()\" tabindex=\"1\"></ax-close-button>\n </div>\n </div>\n <div class=\"ax-popup-main-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n</div>\n", styles: [".ax-popup{display:flex;flex-direction:column;background-color:rgba(var(--ax-color-surface));box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border-radius:var(--ax-rounded-border-default);outline:unset;padding:0;width:50%;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));min-height:-moz-fit-content;min-height:fit-content;margin:0 auto;width:auto;overflow:hidden}.ax-popup .ax-popup-header{padding:1rem;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}.ax-popup .ax-popup-header .ax-popup-title{font-size:1.125rem;font-weight:500}@media (max-width: 599px){.ax-popup .ax-popup-header .ax-popup-title{font-size:1rem}}.ax-popup .ax-popup-header .ax-icon-close{font-size:1.25rem;cursor:pointer}.ax-popup .ax-popup-header .ax-icon-close:hover{opacity:.5}.ax-popup ax-footer{padding:.75rem;display:flex;align-items:center;justify-content:space-between;background-color:rgba(var(--ax-color-on-surface))}.ax-popup:focus{outline-color:transparent}.ax-popup:focus-visible{border-color:rgba(var(--ax-color-primary-500))}.ax-popup .ax-popup-main-container{overflow:auto;flex:1 1 0%}.ax-popup.ax-popup-full{width:100vw;max-height:calc(100 * var(--ax-vh));height:calc(100 * var(--ax-vh));border-radius:0!important}.ax-popup.ax-fit{width:-moz-fit-content;width:fit-content}@media (max-width: 599px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{width:93vw!important;height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important}.ax-popup.ax-popup-sm .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-md .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-lg .ax-popup-main-container>ng-component>div{width:100%}}@media (min-width: 600px){.ax-popup.ax-popup-sm{min-width:60vw!important;max-width:85vw!important}.ax-popup.ax-popup-md{min-width:70vw!important;max-width:85vw!important}.ax-popup.ax-popup-lg{min-width:85vw!important;max-width:90vw!important}}@media (min-width: 1200px){.ax-popup.ax-popup-sm{min-width:25vw!important;max-width:35vw!important}.ax-popup.ax-popup-md{min-width:45vw!important;max-width:55vw!important}.ax-popup.ax-popup-lg{min-width:75vw!important;max-width:95vw!important}}@media (min-width: 1800px){.ax-popup.ax-popup-sm{min-width:15vw!important;max-width:25vw!important}.ax-popup.ax-popup-md{min-width:30vw!important;max-width:50vw!important}.ax-popup.ax-popup-lg{min-width:45vw!important;max-width:85vw!important}}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i5.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i6.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i7.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
144
145
  }
145
146
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AXPopupComponent, decorators: [{
146
147
  type: Component,
147
- args: [{ selector: 'ax-popup', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{size}}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\n <span class=\"ax-popup-title\">{{title}}</span>\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\n </div>\n </div>\n <div class=\"ax-popup-main-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n</div>", styles: [".ax-popup{display:flex;flex-direction:column;background-color:rgba(var(--ax-color-surface));box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border-radius:var(--ax-rounded-border-default);outline:unset;padding:0;width:50%;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));min-height:-moz-fit-content;min-height:fit-content;margin:0 auto;width:auto;overflow:hidden}.ax-popup .ax-popup-header{padding:1rem;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}.ax-popup .ax-popup-header .ax-popup-title{font-size:1.125rem;font-weight:500}@media (max-width: 599px){.ax-popup .ax-popup-header .ax-popup-title{font-size:1rem}}.ax-popup .ax-popup-header .ax-icon-close{font-size:1.25rem;cursor:pointer}.ax-popup .ax-popup-header .ax-icon-close:hover{opacity:.5}.ax-popup ax-footer{padding:.75rem;display:flex;align-items:center;justify-content:space-between;background-color:rgba(var(--ax-color-on-surface))}.ax-popup:focus{outline-color:transparent}.ax-popup:focus-visible{border-color:rgba(var(--ax-color-primary-500))}.ax-popup .ax-popup-main-container{overflow:auto;flex:1 1 0%}.ax-popup.ax-popup-full{width:100vw;max-height:calc(100 * var(--ax-vh));height:calc(100 * var(--ax-vh));border-radius:0!important}.ax-popup.ax-fit{width:-moz-fit-content;width:fit-content}@media (max-width: 599px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{width:93vw!important;height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important}.ax-popup.ax-popup-sm .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-md .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-lg .ax-popup-main-container>ng-component>div{width:100%}}@media (min-width: 600px){.ax-popup.ax-popup-sm{min-width:60vw!important;max-width:85vw!important}.ax-popup.ax-popup-md{min-width:70vw!important;max-width:85vw!important}.ax-popup.ax-popup-lg{min-width:85vw!important;max-width:90vw!important}}@media (min-width: 1200px){.ax-popup.ax-popup-sm{min-width:25vw!important;max-width:35vw!important}.ax-popup.ax-popup-md{min-width:45vw!important;max-width:55vw!important}.ax-popup.ax-popup-lg{min-width:75vw!important;max-width:95vw!important}}@media (min-width: 1800px){.ax-popup.ax-popup-sm{min-width:15vw!important;max-width:25vw!important}.ax-popup.ax-popup-md{min-width:30vw!important;max-width:50vw!important}.ax-popup.ax-popup-lg{min-width:45vw!important;max-width:85vw!important}}\n"] }]
148
+ args: [{ selector: 'ax-popup', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }], template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{ size }}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\n <span class=\"ax-popup-title\">{{ title }}</span>\n <!-- <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span> -->\n <ax-close-button (click)=\"_handleCloseClick()\" tabindex=\"1\"></ax-close-button>\n </div>\n </div>\n <div class=\"ax-popup-main-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n</div>\n", styles: [".ax-popup{display:flex;flex-direction:column;background-color:rgba(var(--ax-color-surface));box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border-radius:var(--ax-rounded-border-default);outline:unset;padding:0;width:50%;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));min-height:-moz-fit-content;min-height:fit-content;margin:0 auto;width:auto;overflow:hidden}.ax-popup .ax-popup-header{padding:1rem;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}.ax-popup .ax-popup-header .ax-popup-title{font-size:1.125rem;font-weight:500}@media (max-width: 599px){.ax-popup .ax-popup-header .ax-popup-title{font-size:1rem}}.ax-popup .ax-popup-header .ax-icon-close{font-size:1.25rem;cursor:pointer}.ax-popup .ax-popup-header .ax-icon-close:hover{opacity:.5}.ax-popup ax-footer{padding:.75rem;display:flex;align-items:center;justify-content:space-between;background-color:rgba(var(--ax-color-on-surface))}.ax-popup:focus{outline-color:transparent}.ax-popup:focus-visible{border-color:rgba(var(--ax-color-primary-500))}.ax-popup .ax-popup-main-container{overflow:auto;flex:1 1 0%}.ax-popup.ax-popup-full{width:100vw;max-height:calc(100 * var(--ax-vh));height:calc(100 * var(--ax-vh));border-radius:0!important}.ax-popup.ax-fit{width:-moz-fit-content;width:fit-content}@media (max-width: 599px){.ax-popup.ax-popup-sm,.ax-popup.ax-popup-md,.ax-popup.ax-popup-lg{width:93vw!important;height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important}.ax-popup.ax-popup-sm .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-md .ax-popup-main-container>ng-component>div,.ax-popup.ax-popup-lg .ax-popup-main-container>ng-component>div{width:100%}}@media (min-width: 600px){.ax-popup.ax-popup-sm{min-width:60vw!important;max-width:85vw!important}.ax-popup.ax-popup-md{min-width:70vw!important;max-width:85vw!important}.ax-popup.ax-popup-lg{min-width:85vw!important;max-width:90vw!important}}@media (min-width: 1200px){.ax-popup.ax-popup-sm{min-width:25vw!important;max-width:35vw!important}.ax-popup.ax-popup-md{min-width:45vw!important;max-width:55vw!important}.ax-popup.ax-popup-lg{min-width:75vw!important;max-width:95vw!important}}@media (min-width: 1800px){.ax-popup.ax-popup-sm{min-width:15vw!important;max-width:25vw!important}.ax-popup.ax-popup-md{min-width:30vw!important;max-width:50vw!important}.ax-popup.ax-popup-lg{min-width:45vw!important;max-width:85vw!important}}\n"] }]
148
149
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.ViewContainerRef }, { type: i1.AXLoadingService }, { type: i2.AXPlatform }]; }, propDecorators: { onKeydownHandler: [{
149
150
  type: HostListener,
150
151
  args: ['keydown.escape', ['$event']]
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-popup.mjs","sources":["../../../../projects/acorex/components/popup/src/popup.component.ts","../../../../projects/acorex/components/popup/src/popup.component.html","../../../../projects/acorex/components/popup/src/popup.service.ts","../../../../projects/acorex/components/popup/src/popup.module.ts","../../../../projects/acorex/components/popup/acorex-components-popup.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ChangeDetectorRef,\n ViewContainerRef,\n HostListener,\n ComponentRef,\n EventEmitter,\n TemplateRef,\n NgZone,\n} from '@angular/core';\nimport {\n CdkPortalOutletAttachedRef,\n ComponentPortal,\n Portal,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { AXPlatform } from '@acorex/core/platform';\n\nimport {\n AXClosbaleComponent,\n AXComponentCloseEvent,\n TAB_META_KEY,\n} from '@acorex/components/common';\nimport { AXLoadingService } from '@acorex/components/loading';\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-popup',\n templateUrl: './popup.component.html',\n styleUrls: ['./popup.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }],\n})\nexport class AXPopupComponent extends AXBaseComponentMixin {\n isLoading: boolean = true;\n private _loadingId: number;\n\n title: string;\n\n onClosed: EventEmitter<AXComponentCloseEvent> =\n new EventEmitter<AXComponentCloseEvent>();\n\n size: 'sm' | 'md' | 'lg' | 'full' = 'sm';\n draggable: boolean = true;\n\n data: any = {};\n\n showCloseButton: boolean = true;\n showHeader: boolean = true;\n\n content: any;\n\n _selectedPortal: Portal<any>;\n _footerPortal: Portal<any>;\n _headerPortal: Portal<any>;\n\n /**\n * @ignore\n */\n constructor(\n elementRef: ElementRef,\n cdr: ChangeDetectorRef,\n private _zone: NgZone,\n private _viewContainerRef: ViewContainerRef,\n private loadingService: AXLoadingService,\n private _platform: AXPlatform\n ) {\n super(elementRef, cdr);\n }\n\n onInit() {\n super.onInit();\n if (this._platform.is('Mobile')) {\n this.draggable = false;\n }\n\n this._loadingId = this.loadingService.show(\n //TODO: check ts error\n //@ts-ignore\n this._getHostElement().querySelector('.ax-popup-body-container')\n );\n //\n if (typeof this.content === 'string') {\n // this.rendererService.findLoadedComponentByRoute(this.content, 20).then(route => {\n // setTimeout(() => {\n // this.loadComponent(route.component);\n // }, 300);\n // });\n } else if (this.content instanceof TemplateRef) {\n this._selectedPortal = new TemplatePortal(\n this.content,\n this._viewContainerRef,\n { $implicit: this.data, ref: this }\n );\n this._cdr.markForCheck();\n } else if (typeof this.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.content);\n this._cdr.markForCheck();\n }\n //\n // this._platform.keydown.subscribe((e) => {\n // this.close();\n // e.nativeEvent.stopPropagation();\n // });\n }\n\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<any>;\n if (ref.instance) {\n this[TAB_META_KEY].component = ref.instance;\n Object.assign(this[TAB_META_KEY].component, this.data);\n Object.assign(this[TAB_META_KEY].component, { _isPopup: true });\n if (ref.instance.onClosed) {\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\n this.onClosed.emit(e);\n });\n }\n }\n this._zone.runOutsideAngular(() => {\n setTimeout(() => {\n const main = this._getHostElement().querySelector<HTMLDivElement>(\n '.ax-popup-main-container'\n );\n const popHeader = this._getHostElement().querySelector<HTMLDivElement>(\n '.ax-popup-header-container'\n );\n const popFooter = this._getHostElement().querySelector<HTMLDivElement>(\n '.ax-popup-footer-container'\n );\n const footer = main!.querySelector<HTMLDivElement>('ax-footer');\n const header = main!.querySelector<HTMLDivElement>('ax-header');\n if (footer) {\n popFooter!.append(footer);\n }\n if (header) {\n //TODO: check ts error\n //@ts-ignore\n popHeader.innerHTML = '';\n popHeader!.append(header);\n }\n this.focus();\n });\n });\n this.loadingService.hide(this._loadingId);\n this._cdr.markForCheck();\n }\n\n @HostListener('keydown.escape', ['$event'])\n onKeydownHandler(event: KeyboardEvent) {\n let focusedOrHasFocused = this._getHostElement().matches(':focus-within');\n if (this.showCloseButton && focusedOrHasFocused) {\n this.close();\n }\n }\n\n _handleCloseClick() {\n this.close();\n }\n\n ngOnDestroy() {\n this.loadingService.hide(this._loadingId);\n }\n\n focus() {\n setTimeout(() =>\n this._getHostElement().querySelector<HTMLDivElement>('.ax-popup')?.focus()\n );\n }\n\n close() {\n this.onClosed.emit({\n //TODO: check ts error\n //@ts-ignore\n component: this[TAB_META_KEY].component,\n htmlElement: this._getHostElement(),\n });\n this._cdr.detectChanges();\n }\n\n onFullScreen() {}\n}\n","<div class=\"ax-popup-wrapper\" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{size}}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\n <span class=\"ax-popup-title\">{{title}}</span>\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\n </div>\n </div>\n <div class=\"ax-popup-main-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n</div>","import { Injectable, TemplateRef } from '@angular/core';\nimport {\n AXOverlayService,\n AXOverlayViewRef,\n AXComponentClosedPromise,\n AXComponentCloseEvent,\n TAB_META_KEY,\n} from '@acorex/components/common';\nimport { AXPopupComponent } from './popup.component';\n\nexport type AXPopupContentType = string | TemplateRef<any> | Function;\nexport type AXPopupSizeType = 'sm' | 'md' | 'lg' | 'full' | 'fit';\nexport interface AXPopupOption {\n title?: string;\n showCloseButton?: boolean;\n showHeader?: boolean;\n maximizable?: boolean;\n size?: AXPopupSizeType;\n data?: any;\n draggable?: boolean;\n transparentBackdrop?: boolean;\n closeOnClickOutside?: boolean;\n}\n/**\n * This is a service which you can create popup with it\n *\n * @category Components\n */\n\n@Injectable({ providedIn: 'root' })\nexport class AXPopupService {\n private stack: Array<AXPopupComponent> = [];\n protected options: AXPopupOption;\n /**\n * @ignore\n */\n constructor(private overlayService: AXOverlayService) {}\n\n /**\n * Open popup 1\n */\n open(content: AXPopupContentType, title: string): AXComponentClosedPromise;\n /**\n * Open popup 2\n * @ignore\n */\n open(\n content: AXPopupContentType,\n options?: AXPopupOption\n ): AXComponentClosedPromise;\n\n /**\n * @ignore\n */\n open(arg1, arg2): AXComponentClosedPromise {\n const options: AXPopupOption = {\n showCloseButton: true,\n showHeader: true,\n size: 'md',\n maximizable: false,\n draggable: true,\n transparentBackdrop: false,\n closeOnClickOutside: false,\n };\n if (typeof arg2 === 'string') {\n options.title = arg2;\n } else {\n Object.assign(options, arg2);\n }\n const lastActiveElement = document.activeElement as HTMLElement;\n const com = this.overlayService.show(AXPopupComponent, options, {\n transparentBackdrop: options.transparentBackdrop,\n\n scroll: 'block',\n onBackdropClick: () => {\n if (options.closeOnClickOutside) {\n popup.close();\n }\n },\n // onBackdropClick: () => {\n // console.log('back');\n // },\n });\n const popup = com.instance as AXPopupComponent;\n popup.content = arg1;\n popup[TAB_META_KEY] = {};\n if (options.size) {\n (popup.size as AXPopupSizeType) = options.size;\n }\n this.stack.push(popup);\n popup.onClosed.subscribe(c => {\n this.closePopup(popup, com, c, lastActiveElement);\n });\n const promise = new AXComponentClosedPromise(resolve => {\n popup[TAB_META_KEY].close = e => {\n if (resolve) {\n resolve(e);\n }\n };\n });\n promise['closeMethod'] = () => {\n popup.close();\n };\n return promise;\n }\n\n private closePopup(\n popup: AXPopupComponent,\n com: AXOverlayViewRef,\n result: AXComponentCloseEvent,\n lastActiveElement?: HTMLElement\n ) {\n const closeFunc = e => {\n com.dispose();\n this.stack.pop();\n delete e.cancel;\n popup[TAB_META_KEY].close(e);\n if (lastActiveElement?.focus) {\n lastActiveElement.focus();\n } else if (this.stack.length) {\n this.stack.reverse()[0].focus();\n }\n };\n const e = { cancel: false };\n const closingFunc = popup[TAB_META_KEY].component.onClosing;\n if (closingFunc) {\n const res = closingFunc(e);\n if (res instanceof Promise) {\n res.then(() => {\n if (e == null || e.cancel !== true) {\n closeFunc(result);\n }\n });\n } else {\n if (e == null || e.cancel !== true) {\n closeFunc(result);\n }\n }\n } else {\n closeFunc(result);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { AXPopupComponent } from './popup.component';\nimport { AXButtonModule } from '@acorex/components/button';\n\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXCommonModule } from '@acorex/components/common';\n\nconst COMPONENT = [AXPopupComponent];\nconst MODULES = [CommonModule,AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXPopupModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA;;;;AAIG;AACH,MAQa,gBAAiB,SAAQ,oBAAoB,CAAA;AA6B9C,IAAA,KAAA,CAAA;AACA,IAAA,iBAAA,CAAA;A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BANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,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;AAChB,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-popup.mjs","sources":["../../../../projects/acorex/components/popup/src/popup.component.ts","../../../../projects/acorex/components/popup/src/popup.component.html","../../../../projects/acorex/components/popup/src/popup.service.ts","../../../../projects/acorex/components/popup/src/popup.module.ts","../../../../projects/acorex/components/popup/acorex-components-popup.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ChangeDetectorRef,\n ViewContainerRef,\n HostListener,\n ComponentRef,\n EventEmitter,\n TemplateRef,\n NgZone,\n} from '@angular/core';\nimport {\n CdkPortalOutletAttachedRef,\n ComponentPortal,\n Portal,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { AXPlatform } from '@acorex/core/platform';\n\nimport {\n AXClosbaleComponent,\n AXComponentCloseEvent,\n TAB_META_KEY,\n} from '@acorex/components/common';\nimport { AXLoadingService } from '@acorex/components/loading';\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-popup',\n templateUrl: './popup.component.html',\n styleUrls: ['./popup.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXPopupComponent }],\n})\nexport class AXPopupComponent extends AXBaseComponentMixin {\n isLoading: boolean = true;\n private _loadingId: number;\n\n title: string;\n\n onClosed: EventEmitter<AXComponentCloseEvent> =\n new EventEmitter<AXComponentCloseEvent>();\n\n size: 'sm' | 'md' | 'lg' | 'full' = 'sm';\n draggable: boolean = true;\n\n data: any = {};\n\n showCloseButton: boolean = true;\n showHeader: boolean = true;\n\n content: any;\n\n _selectedPortal: Portal<any>;\n _footerPortal: Portal<any>;\n _headerPortal: Portal<any>;\n\n /**\n * @ignore\n */\n constructor(\n elementRef: ElementRef,\n cdr: ChangeDetectorRef,\n private _zone: NgZone,\n private _viewContainerRef: ViewContainerRef,\n private loadingService: AXLoadingService,\n private _platform: AXPlatform\n ) {\n super(elementRef, cdr);\n }\n\n onInit() {\n super.onInit();\n if (this._platform.is('Mobile')) {\n this.draggable = false;\n }\n\n this._loadingId = this.loadingService.show(\n //TODO: check ts error\n //@ts-ignore\n this._getHostElement().querySelector('.ax-popup-body-container')\n );\n //\n if (typeof this.content === 'string') {\n // this.rendererService.findLoadedComponentByRoute(this.content, 20).then(route => {\n // setTimeout(() => {\n // this.loadComponent(route.component);\n // }, 300);\n // });\n } else if (this.content instanceof TemplateRef) {\n this._selectedPortal = new TemplatePortal(\n this.content,\n this._viewContainerRef,\n { $implicit: this.data, ref: this }\n );\n this._cdr.markForCheck();\n } else if (typeof this.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.content);\n this._cdr.markForCheck();\n }\n //\n // this._platform.keydown.subscribe((e) => {\n // this.close();\n // e.nativeEvent.stopPropagation();\n // });\n }\n\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<any>;\n if (ref.instance) {\n this[TAB_META_KEY].component = ref.instance;\n Object.assign(this[TAB_META_KEY].component, this.data);\n Object.assign(this[TAB_META_KEY].component, { _isPopup: true });\n if (ref.instance.onClosed) {\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\n this.onClosed.emit(e);\n });\n }\n }\n this._zone.runOutsideAngular(() => {\n setTimeout(() => {\n const main = this._getHostElement().querySelector<HTMLDivElement>(\n '.ax-popup-main-container'\n );\n const popHeader = this._getHostElement().querySelector<HTMLDivElement>(\n '.ax-popup-header-container'\n );\n const popFooter = this._getHostElement().querySelector<HTMLDivElement>(\n '.ax-popup-footer-container'\n );\n const footer = main!.querySelector<HTMLDivElement>('ax-footer');\n const header = main!.querySelector<HTMLDivElement>('ax-header');\n if (footer) {\n popFooter!.append(footer);\n }\n if (header) {\n //TODO: check ts error\n //@ts-ignore\n popHeader.innerHTML = '';\n popHeader!.append(header);\n }\n this.focus();\n });\n });\n this.loadingService.hide(this._loadingId);\n this._cdr.markForCheck();\n }\n\n @HostListener('keydown.escape', ['$event'])\n onKeydownHandler(event: KeyboardEvent) {\n let focusedOrHasFocused = this._getHostElement().matches(':focus-within');\n if (this.showCloseButton && focusedOrHasFocused) {\n this.close();\n }\n }\n\n _handleCloseClick() {\n this.close();\n }\n\n ngOnDestroy() {\n this.loadingService.hide(this._loadingId);\n }\n\n focus() {\n setTimeout(() =>\n this._getHostElement().querySelector<HTMLDivElement>('.ax-popup')?.focus()\n );\n }\n\n close() {\n this.onClosed.emit({\n //TODO: check ts error\n //@ts-ignore\n component: this[TAB_META_KEY].component,\n htmlElement: this._getHostElement(),\n });\n this._cdr.detectChanges();\n }\n\n onFullScreen() {}\n}\n","<div class=\"ax-popup-wrapper\" aria-modal=\"true\" [cdkTrapFocus]=\"true\">\n <div class=\"ax-popup ax-popup-{{ size }}\" tabindex=\"0\" cdkDrag [cdkDragDisabled]=\"!draggable\">\n <div cdkDragHandle class=\"ax-popup-header-container\">\n <div class=\"ax-popup-header\" *ngIf=\"showHeader\">\n <span class=\"ax-popup-title\">{{ title }}</span>\n <!-- <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span> -->\n <ax-close-button (click)=\"_handleCloseClick()\" tabindex=\"1\"></ax-close-button>\n </div>\n </div>\n <div class=\"ax-popup-main-container\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\n </div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n</div>\n","import { Injectable, TemplateRef } from '@angular/core';\nimport {\n AXOverlayService,\n AXOverlayViewRef,\n AXComponentClosedPromise,\n AXComponentCloseEvent,\n TAB_META_KEY,\n} from '@acorex/components/common';\nimport { AXPopupComponent } from './popup.component';\n\nexport type AXPopupContentType = string | TemplateRef<any> | Function;\nexport type AXPopupSizeType = 'sm' | 'md' | 'lg' | 'full' | 'fit';\nexport interface AXPopupOption {\n title?: string;\n showCloseButton?: boolean;\n showHeader?: boolean;\n maximizable?: boolean;\n size?: AXPopupSizeType;\n data?: any;\n draggable?: boolean;\n transparentBackdrop?: boolean;\n closeOnClickOutside?: boolean;\n}\n/**\n * This is a service which you can create popup with it\n *\n * @category Components\n */\n\n@Injectable({ providedIn: 'root' })\nexport class AXPopupService {\n private stack: Array<AXPopupComponent> = [];\n protected options: AXPopupOption;\n /**\n * @ignore\n */\n constructor(private overlayService: AXOverlayService) {}\n\n /**\n * Open popup 1\n */\n open(content: AXPopupContentType, title: string): AXComponentClosedPromise;\n /**\n * Open popup 2\n * @ignore\n */\n open(\n content: AXPopupContentType,\n options?: AXPopupOption\n ): AXComponentClosedPromise;\n\n /**\n * @ignore\n */\n open(arg1, arg2): AXComponentClosedPromise {\n const options: AXPopupOption = {\n showCloseButton: true,\n showHeader: true,\n size: 'md',\n maximizable: false,\n draggable: true,\n transparentBackdrop: false,\n closeOnClickOutside: false,\n };\n if (typeof arg2 === 'string') {\n options.title = arg2;\n } else {\n Object.assign(options, arg2);\n }\n const lastActiveElement = document.activeElement as HTMLElement;\n const com = this.overlayService.show(AXPopupComponent, options, {\n transparentBackdrop: options.transparentBackdrop,\n\n scroll: 'block',\n onBackdropClick: () => {\n if (options.closeOnClickOutside) {\n popup.close();\n }\n },\n // onBackdropClick: () => {\n // console.log('back');\n // },\n });\n const popup = com.instance as AXPopupComponent;\n popup.content = arg1;\n popup[TAB_META_KEY] = {};\n if (options.size) {\n (popup.size as AXPopupSizeType) = options.size;\n }\n this.stack.push(popup);\n popup.onClosed.subscribe(c => {\n this.closePopup(popup, com, c, lastActiveElement);\n });\n const promise = new AXComponentClosedPromise(resolve => {\n popup[TAB_META_KEY].close = e => {\n if (resolve) {\n resolve(e);\n }\n };\n });\n promise['closeMethod'] = () => {\n popup.close();\n };\n return promise;\n }\n\n private closePopup(\n popup: AXPopupComponent,\n com: AXOverlayViewRef,\n result: AXComponentCloseEvent,\n lastActiveElement?: HTMLElement\n ) {\n const closeFunc = e => {\n com.dispose();\n this.stack.pop();\n delete e.cancel;\n popup[TAB_META_KEY].close(e);\n if (lastActiveElement?.focus) {\n lastActiveElement.focus();\n } else if (this.stack.length) {\n this.stack.reverse()[0].focus();\n }\n };\n const e = { cancel: false };\n const closingFunc = popup[TAB_META_KEY].component.onClosing;\n if (closingFunc) {\n const res = closingFunc(e);\n if (res instanceof Promise) {\n res.then(() => {\n if (e == null || e.cancel !== true) {\n closeFunc(result);\n }\n });\n } else {\n if (e == null || e.cancel !== true) {\n closeFunc(result);\n }\n }\n } else {\n closeFunc(result);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { AXPopupComponent } from './popup.component';\nimport { AXButtonModule } from '@acorex/components/button';\n\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXCommonModule } from '@acorex/components/common';\n\nconst COMPONENT = [AXPopupComponent];\nconst MODULES = [CommonModule,AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXPopupModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;AA6BA;;;;AAIG;AACH,MAQa,gBAAiB,SAAQ,oBAAoB,CAAA;AA6B9C,IAAA,KAAA,CAAA;AAC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AAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAJT,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIX,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,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;AAChB,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
@@ -1,4 +1,4 @@
1
- import * as i8 from '@acorex/core/translation';
1
+ import * as i7 from '@acorex/core/translation';
2
2
  import { AXTranslator, AXTranslationModule } from '@acorex/core/translation';
3
3
  import * as i0 from '@angular/core';
4
4
  import { Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, ContentChild, Input, HostListener, NgModule } from '@angular/core';
@@ -13,11 +13,9 @@ import * as i2 from '@angular/common';
13
13
  import { CommonModule } from '@angular/common';
14
14
  import * as i3 from '@acorex/components/decorators';
15
15
  import { AXDecoratorModule } from '@acorex/components/decorators';
16
- import * as i5 from '@acorex/components/button';
17
- import { AXButtonModule } from '@acorex/components/button';
18
- import * as i6 from '@acorex/components/loading';
16
+ import * as i5 from '@acorex/components/loading';
19
17
  import { AXLoadingModule } from '@acorex/components/loading';
20
- import * as i7 from '@angular/cdk/a11y';
18
+ import * as i6 from '@angular/cdk/a11y';
21
19
  import { A11yModule } from '@angular/cdk/a11y';
22
20
  import { FormsModule } from '@angular/forms';
23
21
  import { AXBadgeModule } from '@acorex/components/badge';
@@ -322,7 +320,7 @@ class AXSelectBoxComponent extends AXBaseSelectionDropdownMixin {
322
320
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: AXSelectBoxComponent, selector: "ax-select-box", inputs: { isOpen: "isOpen", fitParent: "fitParent", dropdownWidth: "dropdownWidth", position: "position", disabled: "disabled", tabIndex: "tabIndex", allowNull: "allowNull", value: "value", name: "name", checked: "checked", placeholder: "placeholder", maxLength: "maxLength", type: "type", autoComplete: "autoComplete", readonly: "readonly", pageSize: "pageSize", items: "items", valueField: "valueField", textField: "textField", disabledField: "disabledField", disabledCallback: "disabledCallback", multiple: "multiple", selectionMode: "selectionMode", clearButton: "clearButton", checkbox: "checkbox" }, outputs: { onOpened: "onOpened", onClosed: "onClosed", onBlur: "onBlur", onFocus: "onFocus", valueChange: "valueChange", onValueChanged: "onValueChanged" }, host: { listeners: { "keydown": "_handleKeydown($event)" }, classAttribute: "ax-editor-container ax-drop-down" }, providers: [
323
321
  { provide: AXClosbaleComponent, useExisting: AXSelectBoxComponent },
324
322
  { provide: AXSearchableComponent, useExisting: AXSelectBoxComponent },
325
- ], queries: [{ propertyName: "_searchBox", first: true, predicate: AXSearchBoxComponent, descendants: true, static: true }, { propertyName: "_contentEmptyTemplate", first: true, predicate: ["emptyTemplate"], descendants: true }], viewQueries: [{ propertyName: "popover", first: true, predicate: AXPopoverComponent, descendants: true, static: true }, { propertyName: "listContainer", first: true, predicate: ["listContainer"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"> </ng-content>\n<div class=\"ax-dropdown-content\" [class.ax-state-disabled]=\"disabled\" (click)=\"_handleInputClickEvent($event)\">\n <div class=\"ax-select-box-selection\" [tabindex]=\"tabIndex\" (focus)=\"_emitOnFocusEvent($event)\" (blur)=\"_emitOnBlurEvent($event)\">\n <ng-container *ngIf=\"selectedItems && selectedItems.length; else showPlaceholder\">\n <ng-container *ngIf=\"!multiple; then singleSelectedTemplate; else multipleSelectedTemplate\"></ng-container>\n <ng-template #singleSelectedTemplate>\n <ng-container *ngFor=\"let item of selectedItems\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n </ng-container>\n </ng-template>\n <ng-template #multipleSelectedTemplate>\n <div class=\"ax-select-box-multi-selection\">\n <ng-container *ngFor=\"let item of selectedItems\">\n <div class=\"ax-select-multi-item\">\n {{ _getItemDisplayTextTemplte(item) }}\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\n </div>\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #showPlaceholder>\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\n {{ placeholder }}\n </div>\n </ng-template>\n </div>\n</div>\n<ax-button color=\"light\" look=\"blank\" (onClick)=\"clear()\" [tabIndex]=\"-1\" *ngIf=\"value && clearButton && !(disabled || readonly)\">\n <ax-icon icon=\"ax-icon ax-icon-close\"></ax-icon>\n</ax-button>\n<button [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-editor-control\" (click)=\"_handleArrowClickEvent($event)\">\n <ng-container *ngIf=\"isLoading && !this.popover.isOpen; else iconTemplate\">\n <ax-loading type=\"spinner\"></ax-loading>\n </ng-container>\n <ng-template #iconTemplate>\n <span\n class=\"ax-icon ax-icon-chevron-left ax-transition-all\"\n [ngClass]=\"{\n '-ax-rotation-90': !isOpen,\n 'ax-rotation-90': isOpen\n }\"></span>\n </ng-template>\n</button>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ax-popover [target]=\"_target\" [position]=\"position\" [openTrigger]=\"'manual'\" [closeTrigger]=\"'clickout'\" [adaptivityEnabled]=\"true\" (onOpened)=\"_handlePopupOnOpened($event)\" (onClosed)=\"_handlePopupOnClosed($event)\">\n <div\n class=\"ax-overlay-pane\"\n (keydown)=\"_handlePopoverKeydown($event)\"\n tabindex=\"0\"\n aria-modal=\"true\"\n cdkTrapFocus\n [class.ax-overlay-actionsheet]=\"_isActionSheet\"\n [class.ax-full]=\"_searchBox || isLazy\"\n [style.min-width.px]=\"_popoverWidth\">\n <div class=\"ax-list\">\n <ax-header *ngIf=\"_isActionSheet\">\n <ax-title>{{ _popoverTitle }}</ax-title>\n <ax-close-button class=\"ax-icon\" [icon]=\"multiple ? 'ax-icon-done !ax-text-primary-500' : 'ax-icon-close'\"></ax-close-button>\n </ax-header>\n <div class=\"ax-search-box-container\" [class.ax-state-hidden]=\"!_searchBox\" [cdkTrapFocus]=\"_searchBox != null\">\n <ng-content select=\"ax-search-box\"></ng-content>\n </div>\n <div class=\"ax-content ax-list-items-container ax-default\" (scroll)=\"_handleListScroll($event)\" #listContainer>\n <ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\n <ul>\n <ng-container *ngTemplateOutlet=\"tmpTree; context: { list: displayItems }\"> </ng-container>\n <ng-template #tmpTree let-list=\"list\">\n <ng-container *ngFor=\"let item of list; let i = index; trackBy: _trackByFunction\">\n <ng-container *ngIf=\"itemTemplate; else defualtTemplate\">\n <li class=\"ax-list-item\" (click)=\"_handleOnItemClick($event, item)\" [attr.data-id]=\"item[this.valueField]\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item, direction: direction }\"> </ng-container>\n </li>\n </ng-container>\n <ng-template #defualtTemplate>\n <ng-container *ngIf=\"item.children?.length > 0; else tmpItem\">\n <li class=\"ax-list-item-group\" [attr.data-id]=\"item[this.valueField]\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n <ul *ngIf=\"item.children?.length > 0\">\n <ng-container *ngTemplateOutlet=\"tmpTree; context: { list: item.children }\"> </ng-container>\n </ul>\n </li>\n </ng-container>\n <ng-template #tmpItem>\n <ng-container *ngIf=\"!multiple; else multipleTemplate\">\n <li\n class=\"ax-list-item\"\n [class.ax-state-selected]=\"isItemSelected(item)\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"item[this.valueField]\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n <span class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item)\"></span>\n </li>\n </ng-container>\n <ng-template #multipleTemplate>\n <li\n class=\"ax-list-item\"\n [class.ax-state-selected]=\"isItemSelected(item)\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [class.ax-state-checkbox]=\"checkbox\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"item[this.valueField]\">\n <span>\n <input class=\"ax-checkbox\" type=\"checkbox\" [class.ax-state-disabled]=\"isItemDisabled(item)\" *ngIf=\"checkbox\" [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\" />\n <span class=\"ax-checkbox-label\">{{ _getItemDisplayTextTemplte(item) }}</span>\n </span>\n <span class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item) && !checkbox\"></span>\n </li>\n </ng-template>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-template>\n </ul>\n </ng-container>\n <ng-container *ngIf=\"isLoading\">\n <ng-container *ngIf=\"loadingTemplate; else elseLoadingTemplate\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"> </ng-container>\n </ng-container>\n <ng-template #elseLoadingTemplate>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\n <ax-loading [options]=\"_loadingOptions\"></ax-loading>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #tmpEmpty>\n <ng-container *ngIf=\"!isLoading\">\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"> </ng-container>\n </ng-container>\n <ng-template #elseEmptyTemplate>\n <div\n class=\"ax-flex ax-items-center ax-justify-center ax-p-4\"\n [innerHTML]=\"\n 'common.no-result-for'\n | trans\n : {\n exp: this._searchBox ? this._searchBox.searchExp : ''\n }\n \"></div>\n </ng-template>\n </ng-container>\n </ng-template>\n </div>\n <!-- <div class=\"ax-list-items-container ax-vertical ax-default\" [class.ax-full]=\"_isMobile\"\n >\n \n </div> -->\n <!-- <div class=\"ax-footer\">footer</div> -->\n </div>\n </div>\n</ax-popover>\n", styles: ["ax-select-box .ax-select-multi-item{display:flex;align-items:center;padding:.25rem .5rem;background-color:rgba(var(--ax-color-default));color:rgba(var(--ax-color-default-fore));border-radius:var(--ax-rounded-border-default);margin-inline-end:.5rem}ax-select-box .ax-select-multi-item .ax-icon-close{cursor:pointer;margin-inline-start:.5rem}ax-select-box .ax-select-box-selection{display:flex;justify-content:center;align-items:center;outline-color:transparent;outline:transparent;-webkit-user-select:none;user-select:none}ax-select-box .ax-select-box-selection>span{padding-inline-start:1rem;padding-inline-end:.75rem;white-space:nowrap}ax-select-box .ax-select-box-selection .ax-selectbox-input{opacity:0;width:0}ax-select-box .ax-select-box-multi-selection{padding:0 .5rem;display:flex;justify-content:center;align-items:center}ax-select-box .ax-placeholder{padding-inline-start:1rem;padding-inline-end:.75rem}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.AXDecoratorHeaderComponent, selector: "ax-header" }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorTitleComponent, selector: "ax-title" }, { kind: "component", type: i3.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }, { kind: "component", type: i4.AXPopoverComponent, selector: "ax-popover", inputs: ["target", "position", "openTrigger", "closeTrigger", "hasBackdrop", "backdropClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i5.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }, { kind: "component", type: i6.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "options"], outputs: ["visibleChange"] }, { kind: "directive", type: i7.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "trans" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
323
+ ], queries: [{ propertyName: "_searchBox", first: true, predicate: AXSearchBoxComponent, descendants: true, static: true }, { propertyName: "_contentEmptyTemplate", first: true, predicate: ["emptyTemplate"], descendants: true }], viewQueries: [{ propertyName: "popover", first: true, predicate: AXPopoverComponent, descendants: true, static: true }, { propertyName: "listContainer", first: true, predicate: ["listContainer"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"> </ng-content>\n<div class=\"ax-dropdown-content\" [class.ax-state-disabled]=\"disabled\" (click)=\"_handleInputClickEvent($event)\">\n <div\n class=\"ax-select-box-selection\"\n [tabindex]=\"tabIndex\"\n (focus)=\"_emitOnFocusEvent($event)\"\n (blur)=\"_emitOnBlurEvent($event)\">\n <ng-container *ngIf=\"selectedItems && selectedItems.length; else showPlaceholder\">\n <ng-container *ngIf=\"!multiple; then singleSelectedTemplate; else multipleSelectedTemplate\"></ng-container>\n <ng-template #singleSelectedTemplate>\n <ng-container *ngFor=\"let item of selectedItems\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n </ng-container>\n </ng-template>\n <ng-template #multipleSelectedTemplate>\n <div class=\"ax-select-box-multi-selection\">\n <ng-container *ngFor=\"let item of selectedItems\">\n <div class=\"ax-select-multi-item\">\n {{ _getItemDisplayTextTemplte(item) }}\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\n </div>\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #showPlaceholder>\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\n {{ placeholder }}\n </div>\n </ng-template>\n </div>\n</div>\n<button\n class=\"ax-general-button ax-button-icon\"\n (click)=\"clear()\"\n [tabIndex]=\"-1\"\n *ngIf=\"value && clearButton && !(disabled || readonly)\">\n <span class=\"ax-icon ax-icon-close\"></span>\n</button>\n<button\n [disabled]=\"disabled\"\n [tabIndex]=\"-1\"\n class=\"ax-general-button ax-button-icon\"\n (click)=\"_handleArrowClickEvent($event)\">\n <ng-container *ngIf=\"isLoading && !this.popover.isOpen; else iconTemplate\">\n <ax-loading type=\"spinner\"></ax-loading>\n </ng-container>\n <ng-template #iconTemplate>\n <span\n class=\"ax-icon ax-icon-chevron-left ax-transition-all\"\n [ngClass]=\"{\n '-ax-rotation-90': !isOpen,\n 'ax-rotation-90': isOpen\n }\"></span>\n </ng-template>\n</button>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ax-popover\n [target]=\"_target\"\n [position]=\"position\"\n [openTrigger]=\"'manual'\"\n [closeTrigger]=\"'clickout'\"\n [adaptivityEnabled]=\"true\"\n (onOpened)=\"_handlePopupOnOpened($event)\"\n (onClosed)=\"_handlePopupOnClosed($event)\">\n <div\n class=\"ax-overlay-pane\"\n (keydown)=\"_handlePopoverKeydown($event)\"\n tabindex=\"0\"\n aria-modal=\"true\"\n cdkTrapFocus\n [class.ax-overlay-actionsheet]=\"_isActionSheet\"\n [class.ax-full]=\"_searchBox || isLazy\"\n [style.min-width.px]=\"_popoverWidth\">\n <div class=\"ax-list\">\n <ax-header *ngIf=\"_isActionSheet\">\n <ax-title>{{ _popoverTitle }}</ax-title>\n <ax-close-button\n class=\"ax-icon\"\n [icon]=\"multiple ? 'ax-icon-done !ax-text-primary-500' : 'ax-icon-close'\"></ax-close-button>\n </ax-header>\n <div class=\"ax-search-box-container\" [class.ax-state-hidden]=\"!_searchBox\" [cdkTrapFocus]=\"_searchBox != null\">\n <ng-content select=\"ax-search-box\"></ng-content>\n </div>\n <div class=\"ax-content ax-list-items-container ax-default\" (scroll)=\"_handleListScroll($event)\" #listContainer>\n <ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\n <ul>\n <ng-container *ngTemplateOutlet=\"tmpTree; context: { list: displayItems }\"> </ng-container>\n <ng-template #tmpTree let-list=\"list\">\n <ng-container *ngFor=\"let item of list; let i = index; trackBy: _trackByFunction\">\n <ng-container *ngIf=\"itemTemplate; else defualtTemplate\">\n <li\n class=\"ax-list-item\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"item[this.valueField]\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item, direction: direction }\">\n </ng-container>\n </li>\n </ng-container>\n <ng-template #defualtTemplate>\n <ng-container *ngIf=\"item.children?.length > 0; else tmpItem\">\n <li class=\"ax-list-item-group\" [attr.data-id]=\"item[this.valueField]\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n <ul *ngIf=\"item.children?.length > 0\">\n <ng-container *ngTemplateOutlet=\"tmpTree; context: { list: item.children }\"> </ng-container>\n </ul>\n </li>\n </ng-container>\n <ng-template #tmpItem>\n <ng-container *ngIf=\"!multiple; else multipleTemplate\">\n <li\n class=\"ax-list-item\"\n [class.ax-state-selected]=\"isItemSelected(item)\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"item[this.valueField]\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n <span class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item)\"></span>\n </li>\n </ng-container>\n <ng-template #multipleTemplate>\n <li\n class=\"ax-list-item\"\n [class.ax-state-selected]=\"isItemSelected(item)\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [class.ax-state-checkbox]=\"checkbox\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"item[this.valueField]\">\n <span>\n <input\n class=\"ax-checkbox\"\n type=\"checkbox\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n *ngIf=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"isItemDisabled(item)\" />\n <span class=\"ax-checkbox-label\">{{ _getItemDisplayTextTemplte(item) }}</span>\n </span>\n <span\n class=\"ax-icon ax-icon-done ax-selected-icon\"\n *ngIf=\"isItemSelected(item) && !checkbox\"></span>\n </li>\n </ng-template>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-template>\n </ul>\n </ng-container>\n <ng-container *ngIf=\"isLoading\">\n <ng-container *ngIf=\"loadingTemplate; else elseLoadingTemplate\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"> </ng-container>\n </ng-container>\n <ng-template #elseLoadingTemplate>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\n <ax-loading [options]=\"_loadingOptions\"></ax-loading>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #tmpEmpty>\n <ng-container *ngIf=\"!isLoading\">\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"> </ng-container>\n </ng-container>\n <ng-template #elseEmptyTemplate>\n <div\n class=\"ax-flex ax-items-center ax-justify-center ax-p-4\"\n [innerHTML]=\"\n 'common.no-result-for'\n | trans\n : {\n exp: this._searchBox ? this._searchBox.searchExp : ''\n }\n \"></div>\n </ng-template>\n </ng-container>\n </ng-template>\n </div>\n <!-- <div class=\"ax-list-items-container ax-vertical ax-default\" [class.ax-full]=\"_isMobile\"\n >\n \n </div> -->\n <!-- <div class=\"ax-footer\">footer</div> -->\n </div>\n </div>\n</ax-popover>\n", styles: ["ax-select-box .ax-select-multi-item{display:flex;align-items:center;padding:.25rem .5rem;background-color:rgba(var(--ax-color-default));color:rgba(var(--ax-color-default-fore));border-radius:var(--ax-rounded-border-default);margin-inline-end:.5rem}ax-select-box .ax-select-multi-item .ax-icon-close{cursor:pointer;margin-inline-start:.5rem}ax-select-box .ax-select-box-selection{display:flex;justify-content:center;align-items:center;outline-color:transparent;outline:transparent;-webkit-user-select:none;user-select:none}ax-select-box .ax-select-box-selection>span{padding-inline-start:1rem;padding-inline-end:.75rem;white-space:nowrap}ax-select-box .ax-select-box-selection .ax-selectbox-input{opacity:0;width:0}ax-select-box .ax-select-box-multi-selection{padding:0 .5rem;display:flex;justify-content:center;align-items:center}ax-select-box .ax-placeholder{padding-inline-start:1rem;padding-inline-end:.75rem}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.AXDecoratorHeaderComponent, selector: "ax-header" }, { kind: "component", type: i3.AXDecoratorTitleComponent, selector: "ax-title" }, { kind: "component", type: i3.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }, { kind: "component", type: i4.AXPopoverComponent, selector: "ax-popover", inputs: ["target", "position", "openTrigger", "closeTrigger", "hasBackdrop", "backdropClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i5.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "options"], outputs: ["visibleChange"] }, { kind: "directive", type: i6.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "trans" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
326
324
  }
327
325
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AXSelectBoxComponent, decorators: [{
328
326
  type: Component,
@@ -353,7 +351,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImpor
353
351
  ], outputs: ['onOpened', 'onClosed', 'onBlur', 'onFocus', 'valueChange', 'onValueChanged'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
354
352
  { provide: AXClosbaleComponent, useExisting: AXSelectBoxComponent },
355
353
  { provide: AXSearchableComponent, useExisting: AXSelectBoxComponent },
356
- ], host: { class: 'ax-editor-container ax-drop-down' }, template: "<ng-content select=\"ax-prefix\"> </ng-content>\n<div class=\"ax-dropdown-content\" [class.ax-state-disabled]=\"disabled\" (click)=\"_handleInputClickEvent($event)\">\n <div class=\"ax-select-box-selection\" [tabindex]=\"tabIndex\" (focus)=\"_emitOnFocusEvent($event)\" (blur)=\"_emitOnBlurEvent($event)\">\n <ng-container *ngIf=\"selectedItems && selectedItems.length; else showPlaceholder\">\n <ng-container *ngIf=\"!multiple; then singleSelectedTemplate; else multipleSelectedTemplate\"></ng-container>\n <ng-template #singleSelectedTemplate>\n <ng-container *ngFor=\"let item of selectedItems\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n </ng-container>\n </ng-template>\n <ng-template #multipleSelectedTemplate>\n <div class=\"ax-select-box-multi-selection\">\n <ng-container *ngFor=\"let item of selectedItems\">\n <div class=\"ax-select-multi-item\">\n {{ _getItemDisplayTextTemplte(item) }}\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\n </div>\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #showPlaceholder>\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\n {{ placeholder }}\n </div>\n </ng-template>\n </div>\n</div>\n<ax-button color=\"light\" look=\"blank\" (onClick)=\"clear()\" [tabIndex]=\"-1\" *ngIf=\"value && clearButton && !(disabled || readonly)\">\n <ax-icon icon=\"ax-icon ax-icon-close\"></ax-icon>\n</ax-button>\n<button [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-editor-control\" (click)=\"_handleArrowClickEvent($event)\">\n <ng-container *ngIf=\"isLoading && !this.popover.isOpen; else iconTemplate\">\n <ax-loading type=\"spinner\"></ax-loading>\n </ng-container>\n <ng-template #iconTemplate>\n <span\n class=\"ax-icon ax-icon-chevron-left ax-transition-all\"\n [ngClass]=\"{\n '-ax-rotation-90': !isOpen,\n 'ax-rotation-90': isOpen\n }\"></span>\n </ng-template>\n</button>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ax-popover [target]=\"_target\" [position]=\"position\" [openTrigger]=\"'manual'\" [closeTrigger]=\"'clickout'\" [adaptivityEnabled]=\"true\" (onOpened)=\"_handlePopupOnOpened($event)\" (onClosed)=\"_handlePopupOnClosed($event)\">\n <div\n class=\"ax-overlay-pane\"\n (keydown)=\"_handlePopoverKeydown($event)\"\n tabindex=\"0\"\n aria-modal=\"true\"\n cdkTrapFocus\n [class.ax-overlay-actionsheet]=\"_isActionSheet\"\n [class.ax-full]=\"_searchBox || isLazy\"\n [style.min-width.px]=\"_popoverWidth\">\n <div class=\"ax-list\">\n <ax-header *ngIf=\"_isActionSheet\">\n <ax-title>{{ _popoverTitle }}</ax-title>\n <ax-close-button class=\"ax-icon\" [icon]=\"multiple ? 'ax-icon-done !ax-text-primary-500' : 'ax-icon-close'\"></ax-close-button>\n </ax-header>\n <div class=\"ax-search-box-container\" [class.ax-state-hidden]=\"!_searchBox\" [cdkTrapFocus]=\"_searchBox != null\">\n <ng-content select=\"ax-search-box\"></ng-content>\n </div>\n <div class=\"ax-content ax-list-items-container ax-default\" (scroll)=\"_handleListScroll($event)\" #listContainer>\n <ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\n <ul>\n <ng-container *ngTemplateOutlet=\"tmpTree; context: { list: displayItems }\"> </ng-container>\n <ng-template #tmpTree let-list=\"list\">\n <ng-container *ngFor=\"let item of list; let i = index; trackBy: _trackByFunction\">\n <ng-container *ngIf=\"itemTemplate; else defualtTemplate\">\n <li class=\"ax-list-item\" (click)=\"_handleOnItemClick($event, item)\" [attr.data-id]=\"item[this.valueField]\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item, direction: direction }\"> </ng-container>\n </li>\n </ng-container>\n <ng-template #defualtTemplate>\n <ng-container *ngIf=\"item.children?.length > 0; else tmpItem\">\n <li class=\"ax-list-item-group\" [attr.data-id]=\"item[this.valueField]\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n <ul *ngIf=\"item.children?.length > 0\">\n <ng-container *ngTemplateOutlet=\"tmpTree; context: { list: item.children }\"> </ng-container>\n </ul>\n </li>\n </ng-container>\n <ng-template #tmpItem>\n <ng-container *ngIf=\"!multiple; else multipleTemplate\">\n <li\n class=\"ax-list-item\"\n [class.ax-state-selected]=\"isItemSelected(item)\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"item[this.valueField]\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n <span class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item)\"></span>\n </li>\n </ng-container>\n <ng-template #multipleTemplate>\n <li\n class=\"ax-list-item\"\n [class.ax-state-selected]=\"isItemSelected(item)\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [class.ax-state-checkbox]=\"checkbox\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"item[this.valueField]\">\n <span>\n <input class=\"ax-checkbox\" type=\"checkbox\" [class.ax-state-disabled]=\"isItemDisabled(item)\" *ngIf=\"checkbox\" [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\" />\n <span class=\"ax-checkbox-label\">{{ _getItemDisplayTextTemplte(item) }}</span>\n </span>\n <span class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item) && !checkbox\"></span>\n </li>\n </ng-template>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-template>\n </ul>\n </ng-container>\n <ng-container *ngIf=\"isLoading\">\n <ng-container *ngIf=\"loadingTemplate; else elseLoadingTemplate\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"> </ng-container>\n </ng-container>\n <ng-template #elseLoadingTemplate>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\n <ax-loading [options]=\"_loadingOptions\"></ax-loading>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #tmpEmpty>\n <ng-container *ngIf=\"!isLoading\">\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"> </ng-container>\n </ng-container>\n <ng-template #elseEmptyTemplate>\n <div\n class=\"ax-flex ax-items-center ax-justify-center ax-p-4\"\n [innerHTML]=\"\n 'common.no-result-for'\n | trans\n : {\n exp: this._searchBox ? this._searchBox.searchExp : ''\n }\n \"></div>\n </ng-template>\n </ng-container>\n </ng-template>\n </div>\n <!-- <div class=\"ax-list-items-container ax-vertical ax-default\" [class.ax-full]=\"_isMobile\"\n >\n \n </div> -->\n <!-- <div class=\"ax-footer\">footer</div> -->\n </div>\n </div>\n</ax-popover>\n", styles: ["ax-select-box .ax-select-multi-item{display:flex;align-items:center;padding:.25rem .5rem;background-color:rgba(var(--ax-color-default));color:rgba(var(--ax-color-default-fore));border-radius:var(--ax-rounded-border-default);margin-inline-end:.5rem}ax-select-box .ax-select-multi-item .ax-icon-close{cursor:pointer;margin-inline-start:.5rem}ax-select-box .ax-select-box-selection{display:flex;justify-content:center;align-items:center;outline-color:transparent;outline:transparent;-webkit-user-select:none;user-select:none}ax-select-box .ax-select-box-selection>span{padding-inline-start:1rem;padding-inline-end:.75rem;white-space:nowrap}ax-select-box .ax-select-box-selection .ax-selectbox-input{opacity:0;width:0}ax-select-box .ax-select-box-multi-selection{padding:0 .5rem;display:flex;justify-content:center;align-items:center}ax-select-box .ax-placeholder{padding-inline-start:1rem;padding-inline-end:.75rem}\n"] }]
354
+ ], host: { class: 'ax-editor-container ax-drop-down' }, template: "<ng-content select=\"ax-prefix\"> </ng-content>\n<div class=\"ax-dropdown-content\" [class.ax-state-disabled]=\"disabled\" (click)=\"_handleInputClickEvent($event)\">\n <div\n class=\"ax-select-box-selection\"\n [tabindex]=\"tabIndex\"\n (focus)=\"_emitOnFocusEvent($event)\"\n (blur)=\"_emitOnBlurEvent($event)\">\n <ng-container *ngIf=\"selectedItems && selectedItems.length; else showPlaceholder\">\n <ng-container *ngIf=\"!multiple; then singleSelectedTemplate; else multipleSelectedTemplate\"></ng-container>\n <ng-template #singleSelectedTemplate>\n <ng-container *ngFor=\"let item of selectedItems\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n </ng-container>\n </ng-template>\n <ng-template #multipleSelectedTemplate>\n <div class=\"ax-select-box-multi-selection\">\n <ng-container *ngFor=\"let item of selectedItems\">\n <div class=\"ax-select-multi-item\">\n {{ _getItemDisplayTextTemplte(item) }}\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\n </div>\n </ng-container>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #showPlaceholder>\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\n {{ placeholder }}\n </div>\n </ng-template>\n </div>\n</div>\n<button\n class=\"ax-general-button ax-button-icon\"\n (click)=\"clear()\"\n [tabIndex]=\"-1\"\n *ngIf=\"value && clearButton && !(disabled || readonly)\">\n <span class=\"ax-icon ax-icon-close\"></span>\n</button>\n<button\n [disabled]=\"disabled\"\n [tabIndex]=\"-1\"\n class=\"ax-general-button ax-button-icon\"\n (click)=\"_handleArrowClickEvent($event)\">\n <ng-container *ngIf=\"isLoading && !this.popover.isOpen; else iconTemplate\">\n <ax-loading type=\"spinner\"></ax-loading>\n </ng-container>\n <ng-template #iconTemplate>\n <span\n class=\"ax-icon ax-icon-chevron-left ax-transition-all\"\n [ngClass]=\"{\n '-ax-rotation-90': !isOpen,\n 'ax-rotation-90': isOpen\n }\"></span>\n </ng-template>\n</button>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ax-popover\n [target]=\"_target\"\n [position]=\"position\"\n [openTrigger]=\"'manual'\"\n [closeTrigger]=\"'clickout'\"\n [adaptivityEnabled]=\"true\"\n (onOpened)=\"_handlePopupOnOpened($event)\"\n (onClosed)=\"_handlePopupOnClosed($event)\">\n <div\n class=\"ax-overlay-pane\"\n (keydown)=\"_handlePopoverKeydown($event)\"\n tabindex=\"0\"\n aria-modal=\"true\"\n cdkTrapFocus\n [class.ax-overlay-actionsheet]=\"_isActionSheet\"\n [class.ax-full]=\"_searchBox || isLazy\"\n [style.min-width.px]=\"_popoverWidth\">\n <div class=\"ax-list\">\n <ax-header *ngIf=\"_isActionSheet\">\n <ax-title>{{ _popoverTitle }}</ax-title>\n <ax-close-button\n class=\"ax-icon\"\n [icon]=\"multiple ? 'ax-icon-done !ax-text-primary-500' : 'ax-icon-close'\"></ax-close-button>\n </ax-header>\n <div class=\"ax-search-box-container\" [class.ax-state-hidden]=\"!_searchBox\" [cdkTrapFocus]=\"_searchBox != null\">\n <ng-content select=\"ax-search-box\"></ng-content>\n </div>\n <div class=\"ax-content ax-list-items-container ax-default\" (scroll)=\"_handleListScroll($event)\" #listContainer>\n <ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\n <ul>\n <ng-container *ngTemplateOutlet=\"tmpTree; context: { list: displayItems }\"> </ng-container>\n <ng-template #tmpTree let-list=\"list\">\n <ng-container *ngFor=\"let item of list; let i = index; trackBy: _trackByFunction\">\n <ng-container *ngIf=\"itemTemplate; else defualtTemplate\">\n <li\n class=\"ax-list-item\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"item[this.valueField]\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item, direction: direction }\">\n </ng-container>\n </li>\n </ng-container>\n <ng-template #defualtTemplate>\n <ng-container *ngIf=\"item.children?.length > 0; else tmpItem\">\n <li class=\"ax-list-item-group\" [attr.data-id]=\"item[this.valueField]\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n <ul *ngIf=\"item.children?.length > 0\">\n <ng-container *ngTemplateOutlet=\"tmpTree; context: { list: item.children }\"> </ng-container>\n </ul>\n </li>\n </ng-container>\n <ng-template #tmpItem>\n <ng-container *ngIf=\"!multiple; else multipleTemplate\">\n <li\n class=\"ax-list-item\"\n [class.ax-state-selected]=\"isItemSelected(item)\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"item[this.valueField]\">\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\n <span class=\"ax-icon ax-icon-done ax-selected-icon\" *ngIf=\"isItemSelected(item)\"></span>\n </li>\n </ng-container>\n <ng-template #multipleTemplate>\n <li\n class=\"ax-list-item\"\n [class.ax-state-selected]=\"isItemSelected(item)\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n [class.ax-state-checkbox]=\"checkbox\"\n [attr.tabindex]=\"i\"\n (click)=\"_handleOnItemClick($event, item)\"\n [attr.data-id]=\"item[this.valueField]\">\n <span>\n <input\n class=\"ax-checkbox\"\n type=\"checkbox\"\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\n *ngIf=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"isItemDisabled(item)\" />\n <span class=\"ax-checkbox-label\">{{ _getItemDisplayTextTemplte(item) }}</span>\n </span>\n <span\n class=\"ax-icon ax-icon-done ax-selected-icon\"\n *ngIf=\"isItemSelected(item) && !checkbox\"></span>\n </li>\n </ng-template>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-template>\n </ul>\n </ng-container>\n <ng-container *ngIf=\"isLoading\">\n <ng-container *ngIf=\"loadingTemplate; else elseLoadingTemplate\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"> </ng-container>\n </ng-container>\n <ng-template #elseLoadingTemplate>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\n <ax-loading [options]=\"_loadingOptions\"></ax-loading>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #tmpEmpty>\n <ng-container *ngIf=\"!isLoading\">\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"> </ng-container>\n </ng-container>\n <ng-template #elseEmptyTemplate>\n <div\n class=\"ax-flex ax-items-center ax-justify-center ax-p-4\"\n [innerHTML]=\"\n 'common.no-result-for'\n | trans\n : {\n exp: this._searchBox ? this._searchBox.searchExp : ''\n }\n \"></div>\n </ng-template>\n </ng-container>\n </ng-template>\n </div>\n <!-- <div class=\"ax-list-items-container ax-vertical ax-default\" [class.ax-full]=\"_isMobile\"\n >\n \n </div> -->\n <!-- <div class=\"ax-footer\">footer</div> -->\n </div>\n </div>\n</ax-popover>\n", styles: ["ax-select-box .ax-select-multi-item{display:flex;align-items:center;padding:.25rem .5rem;background-color:rgba(var(--ax-color-default));color:rgba(var(--ax-color-default-fore));border-radius:var(--ax-rounded-border-default);margin-inline-end:.5rem}ax-select-box .ax-select-multi-item .ax-icon-close{cursor:pointer;margin-inline-start:.5rem}ax-select-box .ax-select-box-selection{display:flex;justify-content:center;align-items:center;outline-color:transparent;outline:transparent;-webkit-user-select:none;user-select:none}ax-select-box .ax-select-box-selection>span{padding-inline-start:1rem;padding-inline-end:.75rem;white-space:nowrap}ax-select-box .ax-select-box-selection .ax-selectbox-input{opacity:0;width:0}ax-select-box .ax-select-box-multi-selection{padding:0 .5rem;display:flex;justify-content:center;align-items:center}ax-select-box .ax-placeholder{padding-inline-start:1rem;padding-inline-end:.75rem}\n"] }]
357
355
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1.AXPlatform }]; }, propDecorators: { popover: [{
358
356
  type: ViewChild,
359
357
  args: [AXPopoverComponent, { static: true }]
@@ -385,7 +383,6 @@ class AXSelectBoxModule {
385
383
  AXDecoratorModule,
386
384
  AXTranslationModule,
387
385
  AXPopoverModule,
388
- AXButtonModule,
389
386
  AXLoadingModule,
390
387
  A11yModule,
391
388
  AXTextBoxModule], exports: [AXSelectBoxComponent] });
@@ -397,7 +394,6 @@ class AXSelectBoxModule {
397
394
  AXDecoratorModule,
398
395
  AXTranslationModule,
399
396
  AXPopoverModule,
400
- AXButtonModule,
401
397
  AXLoadingModule,
402
398
  A11yModule,
403
399
  AXTextBoxModule] });
@@ -405,7 +401,8 @@ class AXSelectBoxModule {
405
401
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: AXSelectBoxModule, decorators: [{
406
402
  type: NgModule,
407
403
  args: [{
408
- imports: [CommonModule,
404
+ imports: [
405
+ CommonModule,
409
406
  AXCommonModule,
410
407
  FormsModule,
411
408
  AXCheckBoxModule,
@@ -413,10 +410,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImpor
413
410
  AXDecoratorModule,
414
411
  AXTranslationModule,
415
412
  AXPopoverModule,
416
- AXButtonModule,
417
413
  AXLoadingModule,
418
414
  A11yModule,
419
- AXTextBoxModule
415
+ AXTextBoxModule,
420
416
  ],
421
417
  exports: [AXSelectBoxComponent],
422
418
  declarations: [AXSelectBoxComponent],