@acorex/components 7.0.10 → 7.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/src/alert.component.d.ts +2 -2
- package/badge/src/badge.component.d.ts +2 -2
- package/breadcrumbs/src/breadcrumbs-item.component.d.ts +6 -6
- package/button/src/button-group.component.d.ts +6 -6
- package/button/src/button-item.component.d.ts +6 -6
- package/color-picker/src/color-picker.component.d.ts +16 -16
- package/date-picker/src/datepicker.component.d.ts +14 -14
- package/esm2020/button/src/button.component.mjs +2 -2
- package/esm2020/collapse/src/collapse.component.mjs +3 -3
- package/esm2020/data-pager/src/data-pager-numeric-selector.component.mjs +3 -3
- package/esm2020/dialog/src/dialog.component.mjs +2 -2
- package/esm2020/notification/acorex-components-notification.mjs +5 -0
- package/esm2020/notification/public-api.mjs +5 -0
- package/esm2020/notification/src/notification.class.mjs +2 -0
- package/esm2020/notification/src/notification.component.mjs +63 -0
- package/esm2020/notification/src/notification.module.mjs +21 -0
- package/esm2020/notification/src/notification.service.mjs +136 -0
- package/esm2020/number-box/src/number-box.component.mjs +3 -3
- package/esm2020/select-box/src/selectbox.component.mjs +3 -3
- package/esm2020/toast/src/toast.component.mjs +2 -2
- package/fesm2015/acorex-components-action-sheet.mjs +1 -0
- package/fesm2015/acorex-components-alert.mjs +1 -0
- package/fesm2015/acorex-components-avatar.mjs +1 -0
- package/fesm2015/acorex-components-badge.mjs +1 -0
- package/fesm2015/acorex-components-breadcrumbs.mjs +1 -0
- package/fesm2015/acorex-components-button.mjs +2 -2
- package/fesm2015/acorex-components-button.mjs.map +1 -1
- package/fesm2015/acorex-components-calendar.mjs +1 -0
- package/fesm2015/acorex-components-checkbox.mjs +1 -0
- package/fesm2015/acorex-components-chips.mjs +1 -0
- package/fesm2015/acorex-components-collapse.mjs +3 -2
- package/fesm2015/acorex-components-collapse.mjs.map +1 -1
- package/fesm2015/acorex-components-color-palette.mjs +1 -0
- package/fesm2015/acorex-components-color-picker.mjs +1 -0
- package/fesm2015/acorex-components-common.mjs +1 -0
- package/fesm2015/acorex-components-context-menu.mjs +1 -0
- package/fesm2015/acorex-components-data-pager.mjs +3 -2
- package/fesm2015/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2015/acorex-components-data-table.mjs +1 -0
- package/fesm2015/acorex-components-date-picker.mjs +1 -0
- package/fesm2015/acorex-components-decorators.mjs +1 -0
- package/fesm2015/acorex-components-dialog.mjs +2 -2
- package/fesm2015/acorex-components-drawer.mjs +1 -0
- package/fesm2015/acorex-components-dropdown.mjs +1 -0
- package/fesm2015/acorex-components-form.mjs +1 -0
- package/fesm2015/acorex-components-image.mjs +1 -0
- package/fesm2015/acorex-components-label.mjs +1 -0
- package/fesm2015/acorex-components-loading.mjs +1 -0
- package/fesm2015/acorex-components-menu.mjs +1 -0
- package/fesm2015/acorex-components-mixin.mjs +1 -0
- package/fesm2015/acorex-components-notification.mjs +221 -0
- package/fesm2015/acorex-components-notification.mjs.map +1 -0
- package/fesm2015/acorex-components-number-box.mjs +3 -2
- package/fesm2015/acorex-components-number-box.mjs.map +1 -1
- package/fesm2015/acorex-components-page.mjs +1 -0
- package/fesm2015/acorex-components-password-box.mjs +1 -0
- package/fesm2015/acorex-components-popover.mjs +1 -0
- package/fesm2015/acorex-components-popup.mjs +1 -0
- package/fesm2015/acorex-components-progress-bar.mjs +1 -0
- package/fesm2015/acorex-components-radio.mjs +1 -0
- package/fesm2015/acorex-components-range-slider.mjs +1 -0
- package/fesm2015/acorex-components-rating.mjs +1 -0
- package/fesm2015/acorex-components-result.mjs +1 -0
- package/fesm2015/acorex-components-search-box.mjs +1 -0
- package/fesm2015/acorex-components-select-box.mjs +3 -2
- package/fesm2015/acorex-components-select-box.mjs.map +1 -1
- package/fesm2015/acorex-components-selection-list.mjs +1 -0
- package/fesm2015/acorex-components-switch.mjs +1 -0
- package/fesm2015/acorex-components-tabs.mjs +1 -0
- package/fesm2015/acorex-components-tag.mjs +1 -0
- package/fesm2015/acorex-components-textarea.mjs +1 -0
- package/fesm2015/acorex-components-textbox.mjs +1 -0
- package/fesm2015/acorex-components-time-box.mjs +1 -0
- package/fesm2015/acorex-components-toast.mjs +2 -2
- package/fesm2015/acorex-components-toast.mjs.map +1 -1
- package/fesm2015/acorex-components-tooltip.mjs +1 -0
- package/fesm2015/acorex-components-tree-view.mjs +1 -0
- package/fesm2015/acorex-components-uploader.mjs +1 -0
- package/fesm2015/acorex-components.mjs +1 -0
- package/fesm2020/acorex-components-action-sheet.mjs +1 -0
- package/fesm2020/acorex-components-alert.mjs +1 -0
- package/fesm2020/acorex-components-avatar.mjs +1 -0
- package/fesm2020/acorex-components-badge.mjs +1 -0
- package/fesm2020/acorex-components-breadcrumbs.mjs +1 -0
- package/fesm2020/acorex-components-button.mjs +2 -2
- package/fesm2020/acorex-components-button.mjs.map +1 -1
- package/fesm2020/acorex-components-calendar.mjs +1 -0
- package/fesm2020/acorex-components-checkbox.mjs +1 -0
- package/fesm2020/acorex-components-chips.mjs +1 -0
- package/fesm2020/acorex-components-collapse.mjs +3 -2
- package/fesm2020/acorex-components-collapse.mjs.map +1 -1
- package/fesm2020/acorex-components-color-palette.mjs +1 -0
- package/fesm2020/acorex-components-color-picker.mjs +1 -0
- package/fesm2020/acorex-components-common.mjs +1 -0
- package/fesm2020/acorex-components-context-menu.mjs +1 -0
- package/fesm2020/acorex-components-data-pager.mjs +3 -2
- package/fesm2020/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2020/acorex-components-data-table.mjs +1 -0
- package/fesm2020/acorex-components-date-picker.mjs +1 -0
- package/fesm2020/acorex-components-decorators.mjs +1 -0
- package/fesm2020/acorex-components-dialog.mjs +2 -2
- package/fesm2020/acorex-components-drawer.mjs +1 -0
- package/fesm2020/acorex-components-dropdown.mjs +1 -0
- package/fesm2020/acorex-components-form.mjs +1 -0
- package/fesm2020/acorex-components-image.mjs +1 -0
- package/fesm2020/acorex-components-label.mjs +1 -0
- package/fesm2020/acorex-components-loading.mjs +1 -0
- package/fesm2020/acorex-components-menu.mjs +1 -0
- package/fesm2020/acorex-components-mixin.mjs +1 -0
- package/fesm2020/acorex-components-notification.mjs +221 -0
- package/fesm2020/acorex-components-notification.mjs.map +1 -0
- package/fesm2020/acorex-components-number-box.mjs +3 -2
- package/fesm2020/acorex-components-number-box.mjs.map +1 -1
- package/fesm2020/acorex-components-page.mjs +1 -0
- package/fesm2020/acorex-components-password-box.mjs +1 -0
- package/fesm2020/acorex-components-popover.mjs +1 -0
- package/fesm2020/acorex-components-popup.mjs +1 -0
- package/fesm2020/acorex-components-progress-bar.mjs +1 -0
- package/fesm2020/acorex-components-radio.mjs +1 -0
- package/fesm2020/acorex-components-range-slider.mjs +1 -0
- package/fesm2020/acorex-components-rating.mjs +1 -0
- package/fesm2020/acorex-components-result.mjs +1 -0
- package/fesm2020/acorex-components-search-box.mjs +1 -0
- package/fesm2020/acorex-components-select-box.mjs +3 -2
- package/fesm2020/acorex-components-select-box.mjs.map +1 -1
- package/fesm2020/acorex-components-selection-list.mjs +1 -0
- package/fesm2020/acorex-components-switch.mjs +1 -0
- package/fesm2020/acorex-components-tabs.mjs +1 -0
- package/fesm2020/acorex-components-tag.mjs +1 -0
- package/fesm2020/acorex-components-textarea.mjs +1 -0
- package/fesm2020/acorex-components-textbox.mjs +1 -0
- package/fesm2020/acorex-components-time-box.mjs +1 -0
- package/fesm2020/acorex-components-toast.mjs +2 -2
- package/fesm2020/acorex-components-toast.mjs.map +1 -1
- package/fesm2020/acorex-components-tooltip.mjs +1 -0
- package/fesm2020/acorex-components-tree-view.mjs +1 -0
- package/fesm2020/acorex-components-uploader.mjs +1 -0
- package/fesm2020/acorex-components.mjs +1 -0
- package/mixin/src/base-components.class.d.ts +2 -2
- package/mixin/src/base-menu-mixin.class.d.ts +5 -5
- package/mixin/src/button-mixin.class.d.ts +2 -2
- package/mixin/src/clickable-mixin.class.d.ts +2 -2
- package/mixin/src/color-look-mixing.class.d.ts +2 -2
- package/mixin/src/datalist-component.class.d.ts +10 -10
- package/mixin/src/dropdown-mixin.class.d.ts +2 -2
- package/mixin/src/interactive-mixin.class.d.ts +4 -4
- package/mixin/src/loading-mixin.class.d.ts +2 -2
- package/mixin/src/mixin.class.d.ts +61 -61
- package/mixin/src/page-component.class.d.ts +2 -2
- package/mixin/src/selection-component.class.d.ts +2 -2
- package/mixin/src/sizable-mixin.class.d.ts +2 -2
- package/mixin/src/textbox-mixin.class.d.ts +2 -2
- package/mixin/src/value-mixin.class.d.ts +8 -8
- package/notification/index.d.ts +5 -0
- package/notification/public-api.d.ts +4 -0
- package/notification/src/notification.class.d.ts +16 -0
- package/notification/src/notification.component.d.ts +25 -0
- package/notification/src/notification.module.d.ts +8 -0
- package/notification/src/notification.service.d.ts +21 -0
- package/package.json +9 -1
- package/tabs/src/tab-item.component.d.ts +2 -2
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-components-notification.mjs","sources":["../../../../projects/acorex/components/notification/src/notification.component.ts","../../../../projects/acorex/components/notification/src/notification.component.html","../../../../projects/acorex/components/notification/src/notification.module.ts","../../../../projects/acorex/components/notification/src/notification.service.ts","../../../../projects/acorex/components/notification/acorex-components-notification.ts"],"sourcesContent":["import { AXClosbaleComponent } from '@acorex/components/common';\r\nimport { AXButtonItem } from '@acorex/components/button';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n HostBinding,\r\n} from '@angular/core';\r\nimport { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { AXNotificationOptions } from './notification.class';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-notification',\r\n templateUrl: './notification.component.html',\r\n styleUrls: ['./notification.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{ provide: AXClosbaleComponent, useExisting: AXNotificationComponent }],\r\n})\r\nexport class AXNotificationComponent extends AXBaseComponentMixin {\r\n\r\n options: AXNotificationOptions;\r\n\r\n _notificationWidth: number = 100;\r\n\r\n _icon: string;\r\n\r\n close: () => void;\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onInit() {\r\n if (this.options.timeOut) {\r\n setTimeout(() => {\r\n this.close();\r\n }, this.options.timeOut);\r\n }\r\n if (!this.options.icon) {\r\n switch (this.options.color) {\r\n case 'success':\r\n this._icon = 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n case 'warning':\r\n this._icon = 'ax-icon ax-icon-warning-fill';\r\n break;\r\n case 'danger':\r\n this._icon = 'ax-icon ax-icon-error-fill';\r\n break;\r\n default:\r\n this._icon = this.options.icon || 'ax-icon ax-icon-check-circle-fill';\r\n break;\r\n }\r\n } else {\r\n this._icon = this.options.icon;\r\n }\r\n }\r\n\r\n _handleButtonClick(button: AXButtonItem) {\r\n if (button.onClick) {\r\n button.onClick(this);\r\n }\r\n }\r\n\r\n @HostBinding('class')\r\n private get __hostClass(): string {\r\n return `ax-${this.options.color}`\r\n }\r\n\r\n\r\n}\r\n","<!-- <ax-alert [color]=\"options.color\" [timeOut]=\"options.timeOut\">\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n <ax-content *ngIf=\"options.content\">\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\" class=\"ax-sm\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ax-footer>\r\n</ax-alert> -->\r\n<span [class]=\"'ax-toast-icon '+ _icon \"></span>\r\n<div class=\"ax-toast-content\">\r\n <div class=\"ax-toast-title\">{{options.title}}</div>\r\n <div [innerHTML]=\"options.content\"></div>\r\n <div class=\"ax-toast-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <button *ngFor=\"let button of options.buttons\" (click)=\"_handleButtonClick(button)\">\r\n {{button.text}}\r\n </button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" (click)=\"close()\"></span>\r\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"options.timeOut\" *ngIf=\"options.timeOut\"></div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXNotificationComponent } from './notification.component';\r\n\r\nconst COMPONENT = [AXNotificationComponent];\r\nconst MODULES = [CommonModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXNotificationModule {\r\n \r\n}\r\n","import { AXConfig } from '@acorex/core/config';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { AXNotificationOptions, AXNotificationRef } from './notification.class';\r\nimport { AXNotificationComponent } from './notification.component';\r\n\r\n\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXNotificationService {\r\n\r\n\r\n private readonly _defaults = {\r\n gap: 5,\r\n timeOut: 2500,\r\n location: 'bottom-center',\r\n }\r\n\r\n constructor(private overlayService: Overlay, private parentInjector: Injector) {\r\n\r\n }\r\n\r\n private _activeList: AXNotificationComponent[] = [];\r\n\r\n primary(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'primary',\r\n content: content\r\n });\r\n }\r\n secondary(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'secondary',\r\n content: content\r\n });\r\n }\r\n success(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'success',\r\n content: content\r\n });\r\n }\r\n\r\n warning(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'warning',\r\n content: content\r\n });\r\n }\r\n danger(content: string) {\r\n this.show({\r\n timeOut: AXConfig.get('toast.timeOut') || this._defaults.timeOut,\r\n color: 'danger',\r\n content: content\r\n });\r\n }\r\n show(options: AXNotificationOptions): AXNotificationRef {\r\n const opt = Object.assign(\r\n {\r\n closeable: true,\r\n location: AXConfig.get('toast.location') || this._defaults.location\r\n },\r\n options\r\n );\r\n const gap = AXConfig.get('toast.gap') || this._defaults.gap;\r\n\r\n let positionStrategy = this.overlayService.position().global();\r\n const pos = this.getPosition(opt.location) + gap + 'px';\r\n switch (opt.location) {\r\n case 'bottom-center':\r\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally()\r\n break;\r\n case 'bottom-end':\r\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\r\n break;\r\n case 'bottom-start':\r\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\r\n break;\r\n case 'top-center':\r\n positionStrategy = positionStrategy.top(pos).centerHorizontally()\r\n break;\r\n case 'top-end':\r\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\r\n break;\r\n case 'top-start':\r\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\r\n break;\r\n case 'center-start':\r\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\r\n break;\r\n case 'center-end':\r\n positionStrategy = positionStrategy.centerVertically().right(gap + 'px');\r\n break;\r\n default:\r\n break;\r\n }\r\n const overlayRef = this.overlayService.create(\r\n {\r\n positionStrategy,\r\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\r\n });\r\n const toastPortal = new ComponentPortal(AXNotificationComponent, null, this.parentInjector);\r\n\r\n const host = overlayRef.attach(toastPortal);\r\n (host.instance as any).visibleIndex = this._activeList.length;\r\n this._activeList.push(host.instance);\r\n if (host.instance) {\r\n Object.assign(host.instance, {\r\n options: opt,\r\n close: () => {\r\n this._activeList = this._activeList.filter(c => c != host.instance);\r\n overlayRef.dispose()\r\n }\r\n });\r\n setTimeout(() => {\r\n host.changeDetectorRef.detectChanges();\r\n }, 0);\r\n }\r\n\r\n return {\r\n close: () => {\r\n host.instance.close();\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n public hideAll() {\r\n this._activeList.forEach(c => c.close());\r\n }\r\n\r\n private getPosition(location: string) {\r\n const list = this._activeList.filter(c => c.options.location == location);\r\n if (list.length == 0) return 0;\r\n if (location.split('-')[0] == 'bottom') {\r\n return window.innerHeight - list[list.length - 1]._getHostElement().offsetTop;\r\n }\r\n else {\r\n return list[list.length - 1]._getHostElement().offsetTop + list[list.length - 1]._getHostElement().offsetHeight;\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAaA;;;;AAIG;AASG,MAAO,uBAAwB,SAAQ,oBAAoB,CAAA;AAS/D;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QATzB,IAAkB,CAAA,kBAAA,GAAW,GAAG,CAAC;KAUhC;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACxB,UAAU,CAAC,MAAK;gBACd,IAAI,CAAC,KAAK,EAAE,CAAC;AACf,aAAC,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC1B,SAAA;AACD,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;AACtB,YAAA,QAAQ,IAAI,CAAC,OAAO,CAAC,KAAK;AACxB,gBAAA,KAAK,SAAS;AACZ,oBAAA,IAAI,CAAC,KAAK,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EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cADR,MAAM,EAAA,CAAA,CAAA;2FACnB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACTlC;;AAEG;;;;"}
|
@@ -212,7 +212,7 @@ class AXNumberBoxComponent extends AXBaseTextBoxMixin {
|
|
212
212
|
}
|
213
213
|
}
|
214
214
|
AXNumberBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXNumberBoxComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
215
|
-
AXNumberBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AXNumberBoxComponent, selector: "ax-number-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", size: "size", value: "value", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", type: "type", autoComplete: "autoComplete", name: "name", checked: "checked", thousandsSeparator: "thousandsSeparator", padDecimalZeros: "padDecimalZeros", step: "step", decimals: "decimals", decimalStep: "decimalStep", showSpinButtons: "showSpinButtons", minValue: "minValue", maxValue: "maxValue" }, outputs: { valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus" }, host: { classAttribute: "ax-editor-container" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "_maskDirective", first: true, predicate: IMaskDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" type=\"text\" [attr.placeholder]=\"placeholder\" [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" [unmask]=\"'typed'\" [attr.min]=\"minValue\" [attr.max]=\"maxValue\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (keydown)=\"_handleOnKeydownEvent($event)\"\r\n (keyup)=\"_emitOnKeyupEvent($event)\" (keypress)=\"_emitOnKeypressEvent($event)\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\">\r\n\r\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(1)\">\r\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\r\n </button>\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(-1)\">\r\n <span class=\"ax-icon ax-icon-arrow-down\"></span>\r\n </button>\r\n</div>\r\n\r\n<!-- <div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-icon-arrow-fill ax-
|
215
|
+
AXNumberBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AXNumberBoxComponent, selector: "ax-number-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", size: "size", value: "value", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", type: "type", autoComplete: "autoComplete", name: "name", checked: "checked", thousandsSeparator: "thousandsSeparator", padDecimalZeros: "padDecimalZeros", step: "step", decimals: "decimals", decimalStep: "decimalStep", showSpinButtons: "showSpinButtons", minValue: "minValue", maxValue: "maxValue" }, outputs: { valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus" }, host: { classAttribute: "ax-editor-container" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "_maskDirective", first: true, predicate: IMaskDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" type=\"text\" [attr.placeholder]=\"placeholder\" [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" [unmask]=\"'typed'\" [attr.min]=\"minValue\" [attr.max]=\"maxValue\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (keydown)=\"_handleOnKeydownEvent($event)\"\r\n (keyup)=\"_emitOnKeyupEvent($event)\" (keypress)=\"_emitOnKeypressEvent($event)\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\">\r\n\r\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(1)\">\r\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\r\n </button>\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(-1)\">\r\n <span class=\"ax-icon ax-icon-arrow-down\"></span>\r\n </button>\r\n</div>\r\n\r\n<!-- <div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-icon-arrow-fill ax-rotation-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-icon-arrow-fill -ax-rotation-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n</div> -->\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>", styles: [".ax-number-box-control{display:flex;height:100%;align-items:center;justify-content:center;margin-inline-end:.25rem;flex-direction:column}.ax-number-box-control .ax-general-button{display:flex;width:1.25rem;height:1rem;border-radius:.2rem}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.IMaskDirective, selector: "[imask]", inputs: ["imask", "unmask", "imaskElement"], outputs: ["accept", "complete"], exportAs: ["imask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
216
216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXNumberBoxComponent, decorators: [{
|
217
217
|
type: Component,
|
218
218
|
args: [{ selector: 'ax-number-box', inputs: [
|
@@ -236,7 +236,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
236
236
|
'onValueChanged',
|
237
237
|
'onBlur',
|
238
238
|
'onFocus'
|
239
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-editor-container' }, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" type=\"text\" [attr.placeholder]=\"placeholder\" [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" [unmask]=\"'typed'\" [attr.min]=\"minValue\" [attr.max]=\"maxValue\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (keydown)=\"_handleOnKeydownEvent($event)\"\r\n (keyup)=\"_emitOnKeyupEvent($event)\" (keypress)=\"_emitOnKeypressEvent($event)\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\">\r\n\r\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(1)\">\r\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\r\n </button>\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(-1)\">\r\n <span class=\"ax-icon ax-icon-arrow-down\"></span>\r\n </button>\r\n</div>\r\n\r\n<!-- <div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-icon-arrow-fill ax-
|
239
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-editor-container' }, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" type=\"text\" [attr.placeholder]=\"placeholder\" [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" [unmask]=\"'typed'\" [attr.min]=\"minValue\" [attr.max]=\"maxValue\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (keydown)=\"_handleOnKeydownEvent($event)\"\r\n (keyup)=\"_emitOnKeyupEvent($event)\" (keypress)=\"_emitOnKeypressEvent($event)\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\">\r\n\r\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(1)\">\r\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\r\n </button>\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(-1)\">\r\n <span class=\"ax-icon ax-icon-arrow-down\"></span>\r\n </button>\r\n</div>\r\n\r\n<!-- <div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-icon-arrow-fill ax-rotation-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-icon-arrow-fill -ax-rotation-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n</div> -->\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>", styles: [".ax-number-box-control{display:flex;height:100%;align-items:center;justify-content:center;margin-inline-end:.25rem;flex-direction:column}.ax-number-box-control .ax-general-button{display:flex;width:1.25rem;height:1rem;border-radius:.2rem}\n"] }]
|
240
240
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { input: [{
|
241
241
|
type: ViewChild,
|
242
242
|
args: ['input']
|
@@ -294,3 +294,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
294
294
|
|
295
295
|
export { AXNumberBoxComponent, AXNumberBoxModule };
|
296
296
|
//# sourceMappingURL=acorex-components-number-box.mjs.map
|
297
|
+
//# sourceMappingURL=acorex-components-number-box.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-number-box.mjs","sources":["../../../../projects/acorex/components/number-box/src/number-box.component.ts","../../../../projects/acorex/components/number-box/src/number-box.component.html","../../../../projects/acorex/components/number-box/src/number-box.module.ts","../../../../projects/acorex/components/number-box/acorex-components-number-box.ts"],"sourcesContent":["import IMask from 'imask';\r\nimport { IMaskDirective } from 'angular-imask';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n ViewChild,\r\n} from '@angular/core';\r\n\r\n\r\nimport { toNumber } from 'lodash-es';\r\nimport {\r\n AXBaseTextBoxMixin,\r\n AXComponentOptionChanged,\r\n} from '@acorex/components/mixin';\r\n\r\n/**\r\n * The NumberBox is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-number-box',\r\n templateUrl: './number-box.component.html',\r\n styleUrls: ['./number-box.component.scss'],\r\n inputs: [\r\n 'disabled',\r\n 'readonly',\r\n 'tabIndex',\r\n 'size',\r\n 'value',\r\n 'placeholder',\r\n 'maxLength',\r\n 'allowNull',\r\n 'type',\r\n 'autoComplete',\r\n 'readonly',\r\n 'allowNull',\r\n 'value',\r\n 'name',\r\n 'checked',\r\n ],\r\n outputs: [\r\n 'valueChange',\r\n 'onValueChanged',\r\n 'onBlur',\r\n 'onFocus'\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-editor-container' },\r\n})\r\nexport class AXNumberBoxComponent extends AXBaseTextBoxMixin {\r\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\r\n\r\n private _thousandsSeparator: string;\r\n /**\r\n * A character value that specifies the separator character.\r\n */\r\n @Input()\r\n public get thousandsSeparator(): string {\r\n return this._thousandsSeparator;\r\n }\r\n public set thousandsSeparator(v: string) {\r\n this._setOption({\r\n name: 'thousandsSeparator',\r\n value: v ?? '',\r\n });\r\n }\r\n\r\n private _padDecimalZeros: boolean = false;\r\n /**\r\n * A character value that specifies the separator character.\r\n */\r\n @Input()\r\n public get padDecimalZeros(): boolean {\r\n return this._padDecimalZeros;\r\n }\r\n public set padDecimalZeros(v: boolean) {\r\n this._setOption({\r\n name: 'padDecimalZeros',\r\n value: v,\r\n });\r\n }\r\n\r\n /**\r\n * Specifies the value that is used to increment or decrement the **Integer** part of number\r\n */\r\n @Input()\r\n step: number = 1;\r\n\r\n private _decimals: number = 0;\r\n /**\r\n * Specifies the number of decimals that the user can enter\r\n */\r\n @Input()\r\n public get decimals(): number {\r\n return this._decimals;\r\n }\r\n public set decimals(v: number) {\r\n this._setOption({\r\n name: 'decimals',\r\n value: v ?? 0,\r\n });\r\n }\r\n\r\n /**\r\n * Specifies the value that is used to increment or decrement the **Deciaml** part of number\r\n */\r\n @Input()\r\n decimalStep: number | 'auto' = 'auto';\r\n\r\n /**\r\n * Specifies whether the Up and Down spin buttons will be rendered or not\r\n */\r\n @Input()\r\n showSpinButtons: boolean = true;\r\n\r\n private _minValue: number = Number.MIN_SAFE_INTEGER;\r\n /**\r\n * Specifies the smallest value that is valid\r\n */\r\n @Input()\r\n public get minValue(): number {\r\n return this._minValue;\r\n }\r\n public set minValue(v: number) {\r\n this._setOption({\r\n name: 'minValue',\r\n value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,\r\n });\r\n }\r\n\r\n private _maxValue: number = Number.MAX_SAFE_INTEGER;\r\n /**\r\n * Specifies the greatest value that is valid\r\n */\r\n @Input()\r\n public get maxValue(): number {\r\n return this._maxValue;\r\n }\r\n public set maxValue(v: number) {\r\n this._setOption({\r\n name: 'maxValue',\r\n value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,\r\n });\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n _maskObj: IMask.MaskedNumber;\r\n\r\n @ViewChild(IMaskDirective)\r\n private _maskDirective: IMaskDirective<IMask.MaskedNumber>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, private cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onViewInit(): void {\r\n super.onViewInit();\r\n this._updateMask();\r\n }\r\n\r\n _onOptionChanged(option: AXComponentOptionChanged): void {\r\n super._onOptionChanged(option);\r\n this._updateMask();\r\n }\r\n\r\n focus(): void {\r\n this.input.nativeElement.focus()\r\n }\r\n\r\n private _updateMask() {\r\n if (!this._maskObj) {\r\n this._maskObj = IMask.createMask({\r\n mask: Number,\r\n min: this.minValue,\r\n max: this.maxValue,\r\n thousandsSeparator: this.thousandsSeparator || '',\r\n scale: this.decimals,\r\n radix: '.',\r\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\r\n });\r\n } else {\r\n this._maskObj.updateOptions({\r\n min: this.minValue,\r\n max: this.maxValue,\r\n thousandsSeparator: this.thousandsSeparator || '',\r\n scale: this.decimals,\r\n radix: '.',\r\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\r\n });\r\n }\r\n this._maskDirective?.maskRef?.updateValue();\r\n this._maskDirective?.maskRef?.updateControl();\r\n }\r\n\r\n _handleOnKeydownEvent(e: KeyboardEvent) {\r\n if (this.disabled || this.readonly) return;\r\n const ignore = () => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n };\r\n this._setUserInteraction();\r\n const input = e.target as HTMLInputElement;\r\n const valStr = input.value;\r\n const decimalPointIndex = valStr.indexOf('.');\r\n const _cursorPos = input.selectionStart!;\r\n\r\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\r\n if (\r\n decimalPointIndex > 0 &&\r\n _cursorPos > decimalPointIndex &&\r\n this.decimals > 0\r\n ) {\r\n e.key === 'ArrowDown' ? this.decimalStepDown() : this.decimalStepUp();\r\n } else {\r\n e.key === 'ArrowDown' ? this.stepDown() : this.stepUp();\r\n }\r\n ignore();\r\n setTimeout(() => {\r\n input.setSelectionRange(_cursorPos, _cursorPos);\r\n }, 5);\r\n }\r\n super._emitOnKeydownEvent(e);\r\n }\r\n\r\n _handleUpDownClick(v: -1 | 1) {\r\n if (this.disabled || this.readonly) return;\r\n this._setUserInteraction();\r\n v == 1 ? this.stepUp() : this.stepDown();\r\n }\r\n\r\n _setValue(value: any) {\r\n if ((value == null || (value == 0 && !this._maskObj.value)) && this.allowNull) {\r\n return null;\r\n }\r\n const v = toNumber(value);\r\n if (v < this.minValue) return this.minValue;\r\n if (v > this.maxValue) return this.maxValue;\r\n return v;\r\n }\r\n\r\n stepUp() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value += toNumber(this.step);\r\n }\r\n\r\n stepDown() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value -= toNumber(this.step);\r\n }\r\n\r\n decimalStepUp() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value += toNumber(\r\n this.decimalStep == 'auto'\r\n ? 1 / Math.pow(10, this.decimals)\r\n : this.decimalStep\r\n );\r\n }\r\n\r\n decimalStepDown() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value -= toNumber(\r\n this.decimalStep == 'auto'\r\n ? 1 / Math.pow(10, this.decimals)\r\n : this.decimalStep\r\n );\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" type=\"text\" [attr.placeholder]=\"placeholder\" [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" [unmask]=\"'typed'\" [attr.min]=\"minValue\" [attr.max]=\"maxValue\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (keydown)=\"_handleOnKeydownEvent($event)\"\r\n (keyup)=\"_emitOnKeyupEvent($event)\" (keypress)=\"_emitOnKeypressEvent($event)\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\">\r\n\r\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(1)\">\r\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\r\n </button>\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(-1)\">\r\n <span class=\"ax-icon ax-icon-arrow-down\"></span>\r\n </button>\r\n</div>\r\n\r\n<!-- <div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-icon-arrow-fill ax-rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-icon-arrow-fill -ax-rotate-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n</div> -->\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>","import { NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport {IMaskModule} from 'angular-imask';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXNumberBoxComponent } from './number-box.component';\r\n\r\nconst COMPONENT = [AXNumberBoxComponent];\r\nconst MODULES = [\r\n CommonModule,\r\n FormsModule,\r\n AXButtonModule,\r\n AXDecoratorModule,\r\n IMaskModule\r\n];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXNumberBoxModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAmBA;;;;AAIG;AAgCG,MAAO,oBAAqB,SAAQ,kBAAkB,CAAA;AAwG1D;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAU,GAAsB,EAAA;AAChE,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QADmB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAzF1D,IAAgB,CAAA,gBAAA,GAAY,KAAK,CAAC;AAe1C;;AAEG;QAEH,IAAI,CAAA,IAAA,GAAW,CAAC,CAAC;QAET,IAAS,CAAA,SAAA,GAAW,CAAC,CAAC;AAe9B;;AAEG;QAEH,IAAW,CAAA,WAAA,GAAoB,MAAM,CAAC;AAEtC;;AAEG;QAEH,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;AAExB,QAAA,IAAA,CAAA,SAAS,GAAW,MAAM,CAAC,gBAAgB,CAAC;AAe5C,QAAA,IAAA,CAAA,SAAS,GAAW,MAAM,CAAC,gBAAgB,CAAC;KA4BnD;AAzGD;;AAEG;AACH,IAAA,IACW,kBAAkB,GAAA;QAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC;KACjC;IACD,IAAW,kBAAkB,CAAC,CAAS,EAAA;QACrC,IAAI,CAAC,UAAU,CAAC;AACd,YAAA,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,CAAC,IAAI,EAAE;AACf,SAAA,CAAC,CAAC;KACJ;AAGD;;AAEG;AACH,IAAA,IACW,eAAe,GAAA;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;KAC9B;IACD,IAAW,eAAe,CAAC,CAAU,EAAA;QACnC,IAAI,CAAC,UAAU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;sBADV,KAAK;gBAON,eAAe,EAAA,CAAA;sBADd,KAAK;gBAQK,QAAQ,EAAA,CAAA;sBADlB,KAAK;gBAgBK,QAAQ,EAAA,CAAA;sBADlB,KAAK;gBAiBE,cAAc,EAAA,CAAA;sBADrB,SAAS;uBAAC,cAAc,CAAA;;;AEpJ3B,MAAM,SAAS,GAAG,CAAC,oBAAoB,CAAC,CAAC;AACzC,MAAM,OAAO,GAAG;IACZ,YAAY;IACZ,WAAW;IACX,cAAc;IACd,iBAAiB;IACjB,WAAW;CACd,CAAC;MAQW,iBAAiB,CAAA;;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAjB,iBAAiB,EAAA,YAAA,EAAA,CAfX,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAEnC,YAAY;QACZ,WAAW;QACX,cAAc;QACd,iBAAiB;AACjB,QAAA,WAAW,aANI,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAe1B,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJb,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,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;;;ACtBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-number-box.mjs","sources":["../../../../projects/acorex/components/number-box/src/number-box.component.ts","../../../../projects/acorex/components/number-box/src/number-box.component.html","../../../../projects/acorex/components/number-box/src/number-box.module.ts","../../../../projects/acorex/components/number-box/acorex-components-number-box.ts"],"sourcesContent":["import IMask from 'imask';\r\nimport { IMaskDirective } from 'angular-imask';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n ViewChild,\r\n} from '@angular/core';\r\n\r\n\r\nimport { toNumber } from 'lodash-es';\r\nimport {\r\n AXBaseTextBoxMixin,\r\n AXComponentOptionChanged,\r\n} from '@acorex/components/mixin';\r\n\r\n/**\r\n * The NumberBox is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-number-box',\r\n templateUrl: './number-box.component.html',\r\n styleUrls: ['./number-box.component.scss'],\r\n inputs: [\r\n 'disabled',\r\n 'readonly',\r\n 'tabIndex',\r\n 'size',\r\n 'value',\r\n 'placeholder',\r\n 'maxLength',\r\n 'allowNull',\r\n 'type',\r\n 'autoComplete',\r\n 'readonly',\r\n 'allowNull',\r\n 'value',\r\n 'name',\r\n 'checked',\r\n ],\r\n outputs: [\r\n 'valueChange',\r\n 'onValueChanged',\r\n 'onBlur',\r\n 'onFocus'\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-editor-container' },\r\n})\r\nexport class AXNumberBoxComponent extends AXBaseTextBoxMixin {\r\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\r\n\r\n private _thousandsSeparator: string;\r\n /**\r\n * A character value that specifies the separator character.\r\n */\r\n @Input()\r\n public get thousandsSeparator(): string {\r\n return this._thousandsSeparator;\r\n }\r\n public set thousandsSeparator(v: string) {\r\n this._setOption({\r\n name: 'thousandsSeparator',\r\n value: v ?? '',\r\n });\r\n }\r\n\r\n private _padDecimalZeros: boolean = false;\r\n /**\r\n * A character value that specifies the separator character.\r\n */\r\n @Input()\r\n public get padDecimalZeros(): boolean {\r\n return this._padDecimalZeros;\r\n }\r\n public set padDecimalZeros(v: boolean) {\r\n this._setOption({\r\n name: 'padDecimalZeros',\r\n value: v,\r\n });\r\n }\r\n\r\n /**\r\n * Specifies the value that is used to increment or decrement the **Integer** part of number\r\n */\r\n @Input()\r\n step: number = 1;\r\n\r\n private _decimals: number = 0;\r\n /**\r\n * Specifies the number of decimals that the user can enter\r\n */\r\n @Input()\r\n public get decimals(): number {\r\n return this._decimals;\r\n }\r\n public set decimals(v: number) {\r\n this._setOption({\r\n name: 'decimals',\r\n value: v ?? 0,\r\n });\r\n }\r\n\r\n /**\r\n * Specifies the value that is used to increment or decrement the **Deciaml** part of number\r\n */\r\n @Input()\r\n decimalStep: number | 'auto' = 'auto';\r\n\r\n /**\r\n * Specifies whether the Up and Down spin buttons will be rendered or not\r\n */\r\n @Input()\r\n showSpinButtons: boolean = true;\r\n\r\n private _minValue: number = Number.MIN_SAFE_INTEGER;\r\n /**\r\n * Specifies the smallest value that is valid\r\n */\r\n @Input()\r\n public get minValue(): number {\r\n return this._minValue;\r\n }\r\n public set minValue(v: number) {\r\n this._setOption({\r\n name: 'minValue',\r\n value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,\r\n });\r\n }\r\n\r\n private _maxValue: number = Number.MAX_SAFE_INTEGER;\r\n /**\r\n * Specifies the greatest value that is valid\r\n */\r\n @Input()\r\n public get maxValue(): number {\r\n return this._maxValue;\r\n }\r\n public set maxValue(v: number) {\r\n this._setOption({\r\n name: 'maxValue',\r\n value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,\r\n });\r\n }\r\n\r\n /**\r\n * @ignore\r\n */\r\n _maskObj: IMask.MaskedNumber;\r\n\r\n @ViewChild(IMaskDirective)\r\n private _maskDirective: IMaskDirective<IMask.MaskedNumber>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, private cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n onViewInit(): void {\r\n super.onViewInit();\r\n this._updateMask();\r\n }\r\n\r\n _onOptionChanged(option: AXComponentOptionChanged): void {\r\n super._onOptionChanged(option);\r\n this._updateMask();\r\n }\r\n\r\n focus(): void {\r\n this.input.nativeElement.focus()\r\n }\r\n\r\n private _updateMask() {\r\n if (!this._maskObj) {\r\n this._maskObj = IMask.createMask({\r\n mask: Number,\r\n min: this.minValue,\r\n max: this.maxValue,\r\n thousandsSeparator: this.thousandsSeparator || '',\r\n scale: this.decimals,\r\n radix: '.',\r\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\r\n });\r\n } else {\r\n this._maskObj.updateOptions({\r\n min: this.minValue,\r\n max: this.maxValue,\r\n thousandsSeparator: this.thousandsSeparator || '',\r\n scale: this.decimals,\r\n radix: '.',\r\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\r\n });\r\n }\r\n this._maskDirective?.maskRef?.updateValue();\r\n this._maskDirective?.maskRef?.updateControl();\r\n }\r\n\r\n _handleOnKeydownEvent(e: KeyboardEvent) {\r\n if (this.disabled || this.readonly) return;\r\n const ignore = () => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n };\r\n this._setUserInteraction();\r\n const input = e.target as HTMLInputElement;\r\n const valStr = input.value;\r\n const decimalPointIndex = valStr.indexOf('.');\r\n const _cursorPos = input.selectionStart!;\r\n\r\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\r\n if (\r\n decimalPointIndex > 0 &&\r\n _cursorPos > decimalPointIndex &&\r\n this.decimals > 0\r\n ) {\r\n e.key === 'ArrowDown' ? this.decimalStepDown() : this.decimalStepUp();\r\n } else {\r\n e.key === 'ArrowDown' ? this.stepDown() : this.stepUp();\r\n }\r\n ignore();\r\n setTimeout(() => {\r\n input.setSelectionRange(_cursorPos, _cursorPos);\r\n }, 5);\r\n }\r\n super._emitOnKeydownEvent(e);\r\n }\r\n\r\n _handleUpDownClick(v: -1 | 1) {\r\n if (this.disabled || this.readonly) return;\r\n this._setUserInteraction();\r\n v == 1 ? this.stepUp() : this.stepDown();\r\n }\r\n\r\n _setValue(value: any) {\r\n if ((value == null || (value == 0 && !this._maskObj.value)) && this.allowNull) {\r\n return null;\r\n }\r\n const v = toNumber(value);\r\n if (v < this.minValue) return this.minValue;\r\n if (v > this.maxValue) return this.maxValue;\r\n return v;\r\n }\r\n\r\n stepUp() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value += toNumber(this.step);\r\n }\r\n\r\n stepDown() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value -= toNumber(this.step);\r\n }\r\n\r\n decimalStepUp() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value += toNumber(\r\n this.decimalStep == 'auto'\r\n ? 1 / Math.pow(10, this.decimals)\r\n : this.decimalStep\r\n );\r\n }\r\n\r\n decimalStepDown() {\r\n if (!this.value) {\r\n this.value = Math.max(this.minValue, 0);\r\n }\r\n this.value -= toNumber(\r\n this.decimalStep == 'auto'\r\n ? 1 / Math.pow(10, this.decimals)\r\n : this.decimalStep\r\n );\r\n }\r\n}\r\n","<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<input #input class=\"ax-input\" type=\"text\" [attr.placeholder]=\"placeholder\" [attr.autocomplete]=\"autoComplete\"\r\n [imask]=\"_maskObj\" [unmask]=\"'typed'\" [attr.min]=\"minValue\" [attr.max]=\"maxValue\"\r\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [(ngModel)]=\"value\" (keydown)=\"_handleOnKeydownEvent($event)\"\r\n (keyup)=\"_emitOnKeyupEvent($event)\" (keypress)=\"_emitOnKeypressEvent($event)\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\">\r\n\r\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(1)\">\r\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\r\n </button>\r\n <button class=\"ax-general-button ax-button-icon\" (click)=\"_handleUpDownClick(-1)\">\r\n <span class=\"ax-icon ax-icon-arrow-down\"></span>\r\n </button>\r\n</div>\r\n\r\n<!-- <div class=\"ax-number-box-arrows\" *ngIf=\"showSpinButtons && !(disabled || readonly)\">\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-icon-arrow-fill ax-rotation-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n <ax-button color=\"light\" look=\"blank\" (onClick)=\"_handleUpDownClick($event,-1)\" [tabIndex]=\"-1\">\r\n <ax-prefix>\r\n <ax-icon class=\"ax-icon-arrow-fill -ax-rotation-90\">\r\n </ax-icon>\r\n </ax-prefix>\r\n </ax-button>\r\n</div> -->\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>","import { NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport {IMaskModule} from 'angular-imask';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXNumberBoxComponent } from './number-box.component';\r\n\r\nconst COMPONENT = [AXNumberBoxComponent];\r\nconst MODULES = [\r\n CommonModule,\r\n FormsModule,\r\n AXButtonModule,\r\n AXDecoratorModule,\r\n IMaskModule\r\n];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXNumberBoxModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;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GAAG,CAAC,oBAAoB,CAAC,CAAC;AACzC,MAAM,OAAO,GAAG;IACZ,YAAY;IACZ,WAAW;IACX,cAAc;IACd,iBAAiB;IACjB,WAAW;CACd,CAAC;MAQW,iBAAiB,CAAA;;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAjB,iBAAiB,EAAA,YAAA,EAAA,CAfX,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAEnC,YAAY;QACZ,WAAW;QACX,cAAc;QACd,iBAAiB;AACjB,QAAA,WAAW,aANI,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAe1B,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJb,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,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;;;ACtBD;;AAEG;;;;"}
|
@@ -140,3 +140,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
140
140
|
|
141
141
|
export { AXRangeSliderComponent, AXRangeSliderModule };
|
142
142
|
//# sourceMappingURL=acorex-components-range-slider.mjs.map
|
143
|
+
//# sourceMappingURL=acorex-components-range-slider.mjs.map
|
@@ -328,7 +328,7 @@ AXSelectBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", ver
|
|
328
328
|
AXSelectBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AXSelectBoxComponent, selector: "ax-select-box", inputs: { isOpen: "isOpen", fitParent: "fitParent", dropdownWidth: "dropdownWidth", position: "position", disabled: "disabled", tabIndex: "tabIndex", readonly: "readonly", allowNull: "allowNull", value: "value", name: "name", checked: "checked", placeholder: "placeholder", maxLength: "maxLength", type: "type", autoComplete: "autoComplete", pageSize: "pageSize", valueField: "valueField", textField: "textField", items: "items", 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", valueChanged: "valueChanged" }, host: { listeners: { "keydown": "_handleKeydown($event)" }, classAttribute: "ax-editor-container ax-drop-down" }, providers: [
|
329
329
|
{ provide: AXClosbaleComponent, useExisting: AXSelectBoxComponent },
|
330
330
|
{ provide: AXSearchableComponent, useExisting: AXSelectBoxComponent },
|
331
|
-
], 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\">\r\n</ng-content>\r\n<div class=\"ax-dropdown-content\" [class.ax-state-disabled]=\"disabled\" (click)=\"_handleInputClickEvent($event)\">\r\n <div class=\"ax-select-box-selection\" [tabindex]=\"tabIndex\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\">\r\n <ng-container *ngIf=\"selectedItems && selectedItems.length; else showPlaceholder\">\r\n <ng-container *ngIf=\"!multiple; then singleSelectedTemplate; else multipleSelectedTemplate\"></ng-container>\r\n <ng-template #singleSelectedTemplate>\r\n <ng-container *ngFor=\"let item of selectedItems\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #multipleSelectedTemplate>\r\n <ng-container *ngFor=\"let item of selectedItems\">\r\n <div class=\"ax-select-multi-item\">\r\n {{_getItemDisplayTextTemplte(item)}}\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event,item)\">\r\n </span>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #showPlaceholder>\r\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\"> {{placeholder}}</div>\r\n </ng-template>\r\n </div>\r\n</div>\r\n<ax-button color=\"light\" look=\"blank\" (onClick)=\"clear()\" [tabIndex]=\"-1\"\r\n *ngIf=\"value && clearButton && !(disabled || readonly)\">\r\n <ax-icon icon=\"ax-icon ax-icon-close\"></ax-icon>\r\n</ax-button>\r\n<button [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-editor-control\"\r\n (click)=\"_handleArrowClickEvent($event)\">\r\n <ng-container *ngIf=\"isLoading && !this.popover.isOpen; else iconTemplate\">\r\n <ax-loading type=\"spinner\"></ax-loading>\r\n </ng-container>\r\n <ng-template #iconTemplate>\r\n <span class=\"ax-icon ax-icon-chevron-left ax-transition-all\" [ngClass]=\"{'-ax-rotate-90': !isOpen, 'ax-rotate-90':isOpen}\"></span>\r\n </ng-template>\r\n</button>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ax-popover [target]=\"_target\" [position]=\"position\" [openTrigger]=\"'manual'\" [closeTrigger]=\"'clickout'\"\r\n [adaptivityEnabled]=\"true\" (onOpened)=\"_handlePopupOnOpened($event)\" (onClosed)=\"_handlePopupOnClosed($event)\">\r\n <div class=\"ax-overlay-pane\" (keydown)=\"_handlePopoverKeydown($event)\" tabindex=\"0\" aria-modal=\"true\" cdkTrapFocus\r\n [class.ax-overlay-actionsheet]=\"_isMobile\" [class.ax-full]=\"_searchBox || isLazy\"\r\n [style.min-width.px]=\"_popoverWidth\">\r\n <div class=\"ax-list\">\r\n <ax-header *ngIf=\"_isMobile && placeholder\">\r\n <ax-title [text]=\"_popoverTitle\"></ax-title>\r\n <ax-close-button class=\"ax-icon\" [icon]=\"multiple?'ax-icon-done !ax-text-primary-500':'ax-icon-close'\"></ax-close-button>\r\n </ax-header>\r\n <div class=\"ax-search-box-container\" [class.ax-state-hidden]=\"!_searchBox\" [cdkTrapFocus]=\"_searchBox!=null\">\r\n <ng-content select=\"ax-search-box\"></ng-content>\r\n </div>\r\n <div class=\"ax-content ax-list-items-container ax-default\" (scroll)=\"_handleListScroll($event)\"\r\n #listContainer>\r\n <ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul>\r\n <ng-container *ngTemplateOutlet=\"tmpTree; context:{ list: displayItems }\">\r\n </ng-container>\r\n <ng-template #tmpTree let-list=\"list\">\r\n <ng-container *ngFor=\"let item of list;let i = index;trackBy : _trackByFunction\">\r\n <ng-container *ngIf=\"itemTemplate; else defualtTemplate\">\r\n <li class=\"ax-list-item\" (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item,direction:direction}\">\r\n </ng-container>\r\n </li>\r\n </ng-container>\r\n <ng-template #defualtTemplate>\r\n <ng-container *ngIf=\"item.children?.length > 0;else tmpItem\">\r\n <li class=\"ax-list-item-group\" [attr.data-id]=\"item[this.valueField]\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n <ul *ngIf=\"item.children?.length > 0\">\r\n <ng-container\r\n *ngTemplateOutlet=\"tmpTree; context:{ list: item.children }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n <ng-template #tmpItem>\r\n <ng-container *ngIf=\"!multiple; else multipleTemplate\">\r\n <li class=\"ax-list-item\" [class.ax-state-selected]=\"isItemSelected(item)\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\" [attr.tabindex]=\"i\"\r\n (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #multipleTemplate>\r\n <li class=\"ax-list-item\" [class.ax-state-selected]=\"isItemSelected(item)\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\r\n [class.ax-check-box]=\"checkbox\" [attr.tabindex]=\"i\"\r\n (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <input class=\"ax-checkbox\" type=\"checkbox\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\" *ngIf=\"checkbox\"\r\n [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\">\r\n <span class=\"ax-ms-2\"> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </li>\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n </ul>\r\n </ng-container>\r\n <ng-container *ngIf=\"isLoading\">\r\n <ng-container *ngIf=\"loadingTemplate; else elseLoadingTemplate\">\r\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseLoadingTemplate>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\"\r\n [innerHTML]=\"'common.no-result-for' | trans:{exp:this._searchBox? this._searchBox.searchExp :''}\">\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n\r\n </div>\r\n <!-- <div class=\"ax-list-items-container ax-vertical ax-default\" [class.ax-full]=\"_isMobile\"\r\n >\r\n \r\n </div> -->\r\n <!-- <div class=\"ax-footer\">footer</div> -->\r\n </div>\r\n </div>\r\n</ax-popover>", styles: ["ax-select-box .ax-select-multi-item{display:flex;align-items:center;padding:.25rem .5rem;background-color:rgb(var(--ax-color-ghost),.05);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;padding:0 .5rem}ax-select-box .ax-select-box-selection .ax-selectbox-input{opacity:0;width:0}\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", inputs: ["text"] }, { 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", "text"], 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 });
|
331
|
+
], 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\">\r\n</ng-content>\r\n<div class=\"ax-dropdown-content\" [class.ax-state-disabled]=\"disabled\" (click)=\"_handleInputClickEvent($event)\">\r\n <div class=\"ax-select-box-selection\" [tabindex]=\"tabIndex\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\">\r\n <ng-container *ngIf=\"selectedItems && selectedItems.length; else showPlaceholder\">\r\n <ng-container *ngIf=\"!multiple; then singleSelectedTemplate; else multipleSelectedTemplate\"></ng-container>\r\n <ng-template #singleSelectedTemplate>\r\n <ng-container *ngFor=\"let item of selectedItems\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #multipleSelectedTemplate>\r\n <ng-container *ngFor=\"let item of selectedItems\">\r\n <div class=\"ax-select-multi-item\">\r\n {{_getItemDisplayTextTemplte(item)}}\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event,item)\">\r\n </span>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #showPlaceholder>\r\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\"> {{placeholder}}</div>\r\n </ng-template>\r\n </div>\r\n</div>\r\n<ax-button color=\"light\" look=\"blank\" (onClick)=\"clear()\" [tabIndex]=\"-1\"\r\n *ngIf=\"value && clearButton && !(disabled || readonly)\">\r\n <ax-icon icon=\"ax-icon ax-icon-close\"></ax-icon>\r\n</ax-button>\r\n<button [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-editor-control\"\r\n (click)=\"_handleArrowClickEvent($event)\">\r\n <ng-container *ngIf=\"isLoading && !this.popover.isOpen; else iconTemplate\">\r\n <ax-loading type=\"spinner\"></ax-loading>\r\n </ng-container>\r\n <ng-template #iconTemplate>\r\n <span class=\"ax-icon ax-icon-chevron-left ax-transition-all\" [ngClass]=\"{'-ax-rotation-90': !isOpen, 'ax-rotation-90':isOpen}\"></span>\r\n </ng-template>\r\n</button>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ax-popover [target]=\"_target\" [position]=\"position\" [openTrigger]=\"'manual'\" [closeTrigger]=\"'clickout'\"\r\n [adaptivityEnabled]=\"true\" (onOpened)=\"_handlePopupOnOpened($event)\" (onClosed)=\"_handlePopupOnClosed($event)\">\r\n <div class=\"ax-overlay-pane\" (keydown)=\"_handlePopoverKeydown($event)\" tabindex=\"0\" aria-modal=\"true\" cdkTrapFocus\r\n [class.ax-overlay-actionsheet]=\"_isMobile\" [class.ax-full]=\"_searchBox || isLazy\"\r\n [style.min-width.px]=\"_popoverWidth\">\r\n <div class=\"ax-list\">\r\n <ax-header *ngIf=\"_isMobile && placeholder\">\r\n <ax-title [text]=\"_popoverTitle\"></ax-title>\r\n <ax-close-button class=\"ax-icon\" [icon]=\"multiple?'ax-icon-done !ax-text-primary-500':'ax-icon-close'\"></ax-close-button>\r\n </ax-header>\r\n <div class=\"ax-search-box-container\" [class.ax-state-hidden]=\"!_searchBox\" [cdkTrapFocus]=\"_searchBox!=null\">\r\n <ng-content select=\"ax-search-box\"></ng-content>\r\n </div>\r\n <div class=\"ax-content ax-list-items-container ax-default\" (scroll)=\"_handleListScroll($event)\"\r\n #listContainer>\r\n <ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul>\r\n <ng-container *ngTemplateOutlet=\"tmpTree; context:{ list: displayItems }\">\r\n </ng-container>\r\n <ng-template #tmpTree let-list=\"list\">\r\n <ng-container *ngFor=\"let item of list;let i = index;trackBy : _trackByFunction\">\r\n <ng-container *ngIf=\"itemTemplate; else defualtTemplate\">\r\n <li class=\"ax-list-item\" (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item,direction:direction}\">\r\n </ng-container>\r\n </li>\r\n </ng-container>\r\n <ng-template #defualtTemplate>\r\n <ng-container *ngIf=\"item.children?.length > 0;else tmpItem\">\r\n <li class=\"ax-list-item-group\" [attr.data-id]=\"item[this.valueField]\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n <ul *ngIf=\"item.children?.length > 0\">\r\n <ng-container\r\n *ngTemplateOutlet=\"tmpTree; context:{ list: item.children }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n <ng-template #tmpItem>\r\n <ng-container *ngIf=\"!multiple; else multipleTemplate\">\r\n <li class=\"ax-list-item\" [class.ax-state-selected]=\"isItemSelected(item)\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\" [attr.tabindex]=\"i\"\r\n (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #multipleTemplate>\r\n <li class=\"ax-list-item\" [class.ax-state-selected]=\"isItemSelected(item)\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\r\n [class.ax-check-box]=\"checkbox\" [attr.tabindex]=\"i\"\r\n (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <input class=\"ax-checkbox\" type=\"checkbox\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\" *ngIf=\"checkbox\"\r\n [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\">\r\n <span class=\"ax-ms-2\"> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </li>\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n </ul>\r\n </ng-container>\r\n <ng-container *ngIf=\"isLoading\">\r\n <ng-container *ngIf=\"loadingTemplate; else elseLoadingTemplate\">\r\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseLoadingTemplate>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\"\r\n [innerHTML]=\"'common.no-result-for' | trans:{exp:this._searchBox? this._searchBox.searchExp :''}\">\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n\r\n </div>\r\n <!-- <div class=\"ax-list-items-container ax-vertical ax-default\" [class.ax-full]=\"_isMobile\"\r\n >\r\n \r\n </div> -->\r\n <!-- <div class=\"ax-footer\">footer</div> -->\r\n </div>\r\n </div>\r\n</ax-popover>", styles: ["ax-select-box .ax-select-multi-item{display:flex;align-items:center;padding:.25rem .5rem;background-color:rgb(var(--ax-color-ghost),.05);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;padding:0 .5rem}ax-select-box .ax-select-box-selection .ax-selectbox-input{opacity:0;width:0}\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", inputs: ["text"] }, { 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", "text"], 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 });
|
332
332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXSelectBoxComponent, decorators: [{
|
333
333
|
type: Component,
|
334
334
|
args: [{ selector: 'ax-select-box', inputs: [
|
@@ -352,7 +352,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
352
352
|
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
353
353
|
{ provide: AXClosbaleComponent, useExisting: AXSelectBoxComponent },
|
354
354
|
{ provide: AXSearchableComponent, useExisting: AXSelectBoxComponent },
|
355
|
-
], host: { class: 'ax-editor-container ax-drop-down' }, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<div class=\"ax-dropdown-content\" [class.ax-state-disabled]=\"disabled\" (click)=\"_handleInputClickEvent($event)\">\r\n <div class=\"ax-select-box-selection\" [tabindex]=\"tabIndex\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\">\r\n <ng-container *ngIf=\"selectedItems && selectedItems.length; else showPlaceholder\">\r\n <ng-container *ngIf=\"!multiple; then singleSelectedTemplate; else multipleSelectedTemplate\"></ng-container>\r\n <ng-template #singleSelectedTemplate>\r\n <ng-container *ngFor=\"let item of selectedItems\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #multipleSelectedTemplate>\r\n <ng-container *ngFor=\"let item of selectedItems\">\r\n <div class=\"ax-select-multi-item\">\r\n {{_getItemDisplayTextTemplte(item)}}\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event,item)\">\r\n </span>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #showPlaceholder>\r\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\"> {{placeholder}}</div>\r\n </ng-template>\r\n </div>\r\n</div>\r\n<ax-button color=\"light\" look=\"blank\" (onClick)=\"clear()\" [tabIndex]=\"-1\"\r\n *ngIf=\"value && clearButton && !(disabled || readonly)\">\r\n <ax-icon icon=\"ax-icon ax-icon-close\"></ax-icon>\r\n</ax-button>\r\n<button [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-editor-control\"\r\n (click)=\"_handleArrowClickEvent($event)\">\r\n <ng-container *ngIf=\"isLoading && !this.popover.isOpen; else iconTemplate\">\r\n <ax-loading type=\"spinner\"></ax-loading>\r\n </ng-container>\r\n <ng-template #iconTemplate>\r\n <span class=\"ax-icon ax-icon-chevron-left ax-transition-all\" [ngClass]=\"{'-ax-rotate-90': !isOpen, 'ax-rotate-90':isOpen}\"></span>\r\n </ng-template>\r\n</button>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ax-popover [target]=\"_target\" [position]=\"position\" [openTrigger]=\"'manual'\" [closeTrigger]=\"'clickout'\"\r\n [adaptivityEnabled]=\"true\" (onOpened)=\"_handlePopupOnOpened($event)\" (onClosed)=\"_handlePopupOnClosed($event)\">\r\n <div class=\"ax-overlay-pane\" (keydown)=\"_handlePopoverKeydown($event)\" tabindex=\"0\" aria-modal=\"true\" cdkTrapFocus\r\n [class.ax-overlay-actionsheet]=\"_isMobile\" [class.ax-full]=\"_searchBox || isLazy\"\r\n [style.min-width.px]=\"_popoverWidth\">\r\n <div class=\"ax-list\">\r\n <ax-header *ngIf=\"_isMobile && placeholder\">\r\n <ax-title [text]=\"_popoverTitle\"></ax-title>\r\n <ax-close-button class=\"ax-icon\" [icon]=\"multiple?'ax-icon-done !ax-text-primary-500':'ax-icon-close'\"></ax-close-button>\r\n </ax-header>\r\n <div class=\"ax-search-box-container\" [class.ax-state-hidden]=\"!_searchBox\" [cdkTrapFocus]=\"_searchBox!=null\">\r\n <ng-content select=\"ax-search-box\"></ng-content>\r\n </div>\r\n <div class=\"ax-content ax-list-items-container ax-default\" (scroll)=\"_handleListScroll($event)\"\r\n #listContainer>\r\n <ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul>\r\n <ng-container *ngTemplateOutlet=\"tmpTree; context:{ list: displayItems }\">\r\n </ng-container>\r\n <ng-template #tmpTree let-list=\"list\">\r\n <ng-container *ngFor=\"let item of list;let i = index;trackBy : _trackByFunction\">\r\n <ng-container *ngIf=\"itemTemplate; else defualtTemplate\">\r\n <li class=\"ax-list-item\" (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item,direction:direction}\">\r\n </ng-container>\r\n </li>\r\n </ng-container>\r\n <ng-template #defualtTemplate>\r\n <ng-container *ngIf=\"item.children?.length > 0;else tmpItem\">\r\n <li class=\"ax-list-item-group\" [attr.data-id]=\"item[this.valueField]\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n <ul *ngIf=\"item.children?.length > 0\">\r\n <ng-container\r\n *ngTemplateOutlet=\"tmpTree; context:{ list: item.children }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n <ng-template #tmpItem>\r\n <ng-container *ngIf=\"!multiple; else multipleTemplate\">\r\n <li class=\"ax-list-item\" [class.ax-state-selected]=\"isItemSelected(item)\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\" [attr.tabindex]=\"i\"\r\n (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #multipleTemplate>\r\n <li class=\"ax-list-item\" [class.ax-state-selected]=\"isItemSelected(item)\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\r\n [class.ax-check-box]=\"checkbox\" [attr.tabindex]=\"i\"\r\n (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <input class=\"ax-checkbox\" type=\"checkbox\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\" *ngIf=\"checkbox\"\r\n [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\">\r\n <span class=\"ax-ms-2\"> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </li>\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n </ul>\r\n </ng-container>\r\n <ng-container *ngIf=\"isLoading\">\r\n <ng-container *ngIf=\"loadingTemplate; else elseLoadingTemplate\">\r\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseLoadingTemplate>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\"\r\n [innerHTML]=\"'common.no-result-for' | trans:{exp:this._searchBox? this._searchBox.searchExp :''}\">\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n\r\n </div>\r\n <!-- <div class=\"ax-list-items-container ax-vertical ax-default\" [class.ax-full]=\"_isMobile\"\r\n >\r\n \r\n </div> -->\r\n <!-- <div class=\"ax-footer\">footer</div> -->\r\n </div>\r\n </div>\r\n</ax-popover>", styles: ["ax-select-box .ax-select-multi-item{display:flex;align-items:center;padding:.25rem .5rem;background-color:rgb(var(--ax-color-ghost),.05);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;padding:0 .5rem}ax-select-box .ax-select-box-selection .ax-selectbox-input{opacity:0;width:0}\n"] }]
|
355
|
+
], host: { class: 'ax-editor-container ax-drop-down' }, template: "<ng-content select=\"ax-prefix\">\r\n</ng-content>\r\n<div class=\"ax-dropdown-content\" [class.ax-state-disabled]=\"disabled\" (click)=\"_handleInputClickEvent($event)\">\r\n <div class=\"ax-select-box-selection\" [tabindex]=\"tabIndex\" (focus)=\"_emitOnFocusEvent($event)\"\r\n (blur)=\"_emitOnBlurEvent($event)\">\r\n <ng-container *ngIf=\"selectedItems && selectedItems.length; else showPlaceholder\">\r\n <ng-container *ngIf=\"!multiple; then singleSelectedTemplate; else multipleSelectedTemplate\"></ng-container>\r\n <ng-template #singleSelectedTemplate>\r\n <ng-container *ngFor=\"let item of selectedItems\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #multipleSelectedTemplate>\r\n <ng-container *ngFor=\"let item of selectedItems\">\r\n <div class=\"ax-select-multi-item\">\r\n {{_getItemDisplayTextTemplte(item)}}\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event,item)\">\r\n </span>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #showPlaceholder>\r\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\"> {{placeholder}}</div>\r\n </ng-template>\r\n </div>\r\n</div>\r\n<ax-button color=\"light\" look=\"blank\" (onClick)=\"clear()\" [tabIndex]=\"-1\"\r\n *ngIf=\"value && clearButton && !(disabled || readonly)\">\r\n <ax-icon icon=\"ax-icon ax-icon-close\"></ax-icon>\r\n</ax-button>\r\n<button [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-editor-control\"\r\n (click)=\"_handleArrowClickEvent($event)\">\r\n <ng-container *ngIf=\"isLoading && !this.popover.isOpen; else iconTemplate\">\r\n <ax-loading type=\"spinner\"></ax-loading>\r\n </ng-container>\r\n <ng-template #iconTemplate>\r\n <span class=\"ax-icon ax-icon-chevron-left ax-transition-all\" [ngClass]=\"{'-ax-rotation-90': !isOpen, 'ax-rotation-90':isOpen}\"></span>\r\n </ng-template>\r\n</button>\r\n<ng-content select=\"ax-validation-rule\">\r\n</ng-content>\r\n<ng-content select=\"ax-suffix\">\r\n</ng-content>\r\n<ax-popover [target]=\"_target\" [position]=\"position\" [openTrigger]=\"'manual'\" [closeTrigger]=\"'clickout'\"\r\n [adaptivityEnabled]=\"true\" (onOpened)=\"_handlePopupOnOpened($event)\" (onClosed)=\"_handlePopupOnClosed($event)\">\r\n <div class=\"ax-overlay-pane\" (keydown)=\"_handlePopoverKeydown($event)\" tabindex=\"0\" aria-modal=\"true\" cdkTrapFocus\r\n [class.ax-overlay-actionsheet]=\"_isMobile\" [class.ax-full]=\"_searchBox || isLazy\"\r\n [style.min-width.px]=\"_popoverWidth\">\r\n <div class=\"ax-list\">\r\n <ax-header *ngIf=\"_isMobile && placeholder\">\r\n <ax-title [text]=\"_popoverTitle\"></ax-title>\r\n <ax-close-button class=\"ax-icon\" [icon]=\"multiple?'ax-icon-done !ax-text-primary-500':'ax-icon-close'\"></ax-close-button>\r\n </ax-header>\r\n <div class=\"ax-search-box-container\" [class.ax-state-hidden]=\"!_searchBox\" [cdkTrapFocus]=\"_searchBox!=null\">\r\n <ng-content select=\"ax-search-box\"></ng-content>\r\n </div>\r\n <div class=\"ax-content ax-list-items-container ax-default\" (scroll)=\"_handleListScroll($event)\"\r\n #listContainer>\r\n <ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul>\r\n <ng-container *ngTemplateOutlet=\"tmpTree; context:{ list: displayItems }\">\r\n </ng-container>\r\n <ng-template #tmpTree let-list=\"list\">\r\n <ng-container *ngFor=\"let item of list;let i = index;trackBy : _trackByFunction\">\r\n <ng-container *ngIf=\"itemTemplate; else defualtTemplate\">\r\n <li class=\"ax-list-item\" (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item,direction:direction}\">\r\n </ng-container>\r\n </li>\r\n </ng-container>\r\n <ng-template #defualtTemplate>\r\n <ng-container *ngIf=\"item.children?.length > 0;else tmpItem\">\r\n <li class=\"ax-list-item-group\" [attr.data-id]=\"item[this.valueField]\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n <ul *ngIf=\"item.children?.length > 0\">\r\n <ng-container\r\n *ngTemplateOutlet=\"tmpTree; context:{ list: item.children }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n <ng-template #tmpItem>\r\n <ng-container *ngIf=\"!multiple; else multipleTemplate\">\r\n <li class=\"ax-list-item\" [class.ax-state-selected]=\"isItemSelected(item)\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\" [attr.tabindex]=\"i\"\r\n (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <span> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </li>\r\n </ng-container>\r\n <ng-template #multipleTemplate>\r\n <li class=\"ax-list-item\" [class.ax-state-selected]=\"isItemSelected(item)\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\"\r\n [class.ax-check-box]=\"checkbox\" [attr.tabindex]=\"i\"\r\n (click)=\"_handleOnItemClick($event,item)\"\r\n [attr.data-id]=\"item[this.valueField]\">\r\n <input class=\"ax-checkbox\" type=\"checkbox\"\r\n [class.ax-state-disabled]=\"isItemDisabled(item)\" *ngIf=\"checkbox\"\r\n [checked]=\"isItemSelected(item)\" [disabled]=\"isItemDisabled(item)\">\r\n <span class=\"ax-ms-2\"> {{ _getItemDisplayTextTemplte(item) }}</span>\r\n </li>\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n </ul>\r\n </ng-container>\r\n <ng-container *ngIf=\"isLoading\">\r\n <ng-container *ngIf=\"loadingTemplate; else elseLoadingTemplate\">\r\n <ng-container *ngTemplateOutlet=\"loadingTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseLoadingTemplate>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\"\r\n [innerHTML]=\"'common.no-result-for' | trans:{exp:this._searchBox? this._searchBox.searchExp :''}\">\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ng-template>\r\n\r\n </div>\r\n <!-- <div class=\"ax-list-items-container ax-vertical ax-default\" [class.ax-full]=\"_isMobile\"\r\n >\r\n \r\n </div> -->\r\n <!-- <div class=\"ax-footer\">footer</div> -->\r\n </div>\r\n </div>\r\n</ax-popover>", styles: ["ax-select-box .ax-select-multi-item{display:flex;align-items:center;padding:.25rem .5rem;background-color:rgb(var(--ax-color-ghost),.05);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;padding:0 .5rem}ax-select-box .ax-select-box-selection .ax-selectbox-input{opacity:0;width:0}\n"] }]
|
356
356
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1.AXPlatform }]; }, propDecorators: { popover: [{
|
357
357
|
type: ViewChild,
|
358
358
|
args: [AXPopoverComponent, { static: true }]
|
@@ -429,3 +429,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
429
429
|
|
430
430
|
export { AXSelectBoxComponent, AXSelectBoxModule };
|
431
431
|
//# sourceMappingURL=acorex-components-select-box.mjs.map
|
432
|
+
//# sourceMappingURL=acorex-components-select-box.mjs.map
|