@ng-nest/ui 16.0.15 → 16.0.17
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/base-form/base-form.property.d.ts +1 -5
- package/core/config/config.d.ts +1 -0
- package/esm2022/auto-complete/auto-complete.component.mjs +11 -3
- package/esm2022/auto-complete/auto-complete.property.mjs +1 -1
- package/esm2022/base-form/base-form.property.mjs +2 -8
- package/esm2022/cascade/cascade.property.mjs +1 -1
- package/esm2022/checkbox/checkbox.property.mjs +1 -1
- package/esm2022/color-picker/color-picker.property.mjs +1 -1
- package/esm2022/core/config/config.mjs +1 -1
- package/esm2022/core/config/config.service.mjs +10 -3
- package/esm2022/date-picker/date-picker.property.mjs +1 -1
- package/esm2022/find/find.property.mjs +1 -1
- package/esm2022/icon/icon.component.mjs +5 -6
- package/esm2022/icon/icon.property.mjs +2 -4
- package/esm2022/input/input.property.mjs +1 -1
- package/esm2022/input-number/input-number.component.mjs +3 -3
- package/esm2022/input-number/input-number.property.mjs +8 -2
- package/esm2022/list/list.property.mjs +1 -1
- package/esm2022/radio/radio.property.mjs +1 -1
- package/esm2022/select/select.component.mjs +25 -11
- package/esm2022/select/select.property.mjs +1 -1
- package/esm2022/switch/switch.property.mjs +1 -1
- package/esm2022/table/table-head.component.mjs +3 -3
- package/esm2022/table/table.property.mjs +4 -2
- package/esm2022/textarea/textarea.property.mjs +7 -2
- package/esm2022/time-picker/time-picker.property.mjs +1 -1
- package/esm2022/tree-select/tree-select.component.mjs +3 -3
- package/esm2022/tree-select/tree-select.property.mjs +1 -1
- package/fesm2022/ng-nest-ui-auto-complete.mjs +10 -2
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +1 -7
- package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +9 -2
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-icon.mjs +5 -8
- package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input-number.mjs +9 -3
- package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +24 -10
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table.mjs +5 -3
- package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-textarea.mjs +6 -1
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-select.mjs +2 -2
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/icon/icon.property.d.ts +2 -7
- package/input-number/input-number.property.d.ts +6 -1
- package/package.json +160 -160
- package/table/table.property.d.ts +6 -1
- package/textarea/textarea.property.d.ts +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-nest-ui-switch.mjs","sources":["../../../../lib/ng-nest/ui/switch/switch.property.ts","../../../../lib/ng-nest/ui/switch/switch.component.ts","../../../../lib/ng-nest/ui/switch/switch.component.html","../../../../lib/ng-nest/ui/switch/switch.module.ts","../../../../lib/ng-nest/ui/switch/ng-nest-ui-switch.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\nimport { XBoolean, XInputBoolean, XSize, XTemplate, XWithConfig } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Switch\r\n * @selector x-switch\r\n * @decorator component\r\n */\r\nexport const XSwitchPrefix = 'x-switch';\r\nconst X_CONFIG_NAME = 'switch';\r\n\r\n/**\r\n * Switch Property\r\n */\r\n@Component({ selector: `${XSwitchPrefix}-property`, template: '' })\r\nexport class XSwitchProperty extends XControlValueAccessor<boolean> implements XSwitchOption {\r\n /**\r\n * @zh_CN 显示加载中\r\n * @en_US Show loading\r\n */\r\n @Input() @XInputBoolean() loading: XBoolean = false;\r\n /**\r\n * @zh_CN 手动控制\r\n * @en_US Manual control\r\n */\r\n @Input() @XInputBoolean() manual: XBoolean = false;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') override size!: XSize;\r\n /**\r\n * @zh_CN 显示文字或者自定义模版(开启状态)\r\n * @en_US Display text or custom template (open state)\r\n */\r\n @Input() checkedText?: XTemplate;\r\n /**\r\n * @zh_CN 显示文字或者自定义模版(关闭状态)\r\n * @en_US Display text or custom template (closed)\r\n */\r\n @Input() unCheckedText?: XTemplate;\r\n}\r\n\r\n/**\r\n * Switch Option\r\n * @undocument true\r\n */\r\nexport interface XSwitchOption extends XFormOption {\r\n /**\r\n * @zh_CN 显示加载中\r\n * @en_US Show loading\r\n */\r\n loading?: XBoolean;\r\n /**\r\n * @zh_CN 手动控制\r\n * @en_US Manual control\r\n */\r\n manual?: XBoolean;\r\n /**\r\n * @zh_CN 显示文字或者自定义模版(开启状态)\r\n * @en_US Display text or custom template (open state)\r\n */\r\n checkedText?: XTemplate;\r\n /**\r\n * @zh_CN 显示文字或者自定义模版(关闭状态)\r\n * @en_US Display text or custom template (closed)\r\n */\r\n unCheckedText?: XTemplate;\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Renderer2,\r\n ElementRef,\r\n ViewChild,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport { XSwitchProperty, XSwitchPrefix } from './switch.property';\r\nimport { XClearClass, XConfigService, XIsChange } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XSwitchPrefix}`,\r\n templateUrl: './switch.component.html',\r\n styleUrls: ['./switch.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XSwitchComponent)]\r\n})\r\nexport class XSwitchComponent extends XSwitchProperty implements OnInit {\r\n @ViewChild('switch', { static: true }) switch!: ElementRef<HTMLElement>;\r\n\r\n override writeValue(value: any) {\r\n this.value = value;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n constructor(public renderer: Renderer2, public override cdr: ChangeDetectorRef, public configService: XConfigService) {\r\n super();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { size, labelAlign } = changes;\r\n XIsChange(size, labelAlign) && this.setClassMap();\r\n }\r\n\r\n ngOnInit() {\r\n this.setFlex(this.switch.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.classMap, this.labelMap);\r\n this.classMap[`${XSwitchPrefix}-${this.size}`] = this.size ? true : false;\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n switchClick() {\r\n if (this.disabled || this.loading || this.manual) return;\r\n this.value = !this.value;\r\n if (this.onChange) this.onChange(this.value);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n formControlChanges() {\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #switch\r\n class=\"x-switch\"\r\n [ngClass]=\"classMap\"\r\n [class.x-switch-loading]=\"loading\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-checked]=\"value\"\r\n [class.x-disabled]=\"disabled\"\r\n>\r\n <label *ngIf=\"label\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-switch-row\">\r\n <div class=\"x-switch-slider\" (click)=\"switchClick()\">\r\n <div class=\"x-switch-handle\">\r\n <div class=\"x-switch-spinner\" [x-loading]=\"loading\" [size]=\"size\"></div>\r\n </div>\r\n <div class=\"x-switch-text\">\r\n <ng-container *ngIf=\"value; else uncheckTemplate\">\r\n <ng-container *xOutlet=\"checkedText\">{{ checkedText }}</ng-container>\r\n </ng-container>\r\n <ng-template #uncheckTemplate>\r\n <ng-container *xOutlet=\"unCheckedText\">{{ unCheckedText }}</ng-container>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { XSwitchComponent } from './switch.component';\r\nimport { XSwitchProperty } from './switch.property';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\nimport { XLoadingModule } from '@ng-nest/ui/loading';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\n\r\n@NgModule({\r\n declarations: [XSwitchComponent, XSwitchProperty],\r\n exports: [XSwitchComponent],\r\n imports: [CommonModule, FormsModule, ReactiveFormsModule, XBaseFormModule, XLoadingModule, XOutletModule]\r\n})\r\nexport class XSwitchModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,aAAa,GAAG,WAAW;AACxC,MAAM,aAAa,GAAG,QAAQ,CAAC;AAE/B;;AAEG;AACH,MACa,eAAgB,SAAQ,qBAA8B,CAAA;AADnE,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACuB,IAAO,CAAA,OAAA,GAAa,KAAK,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EAAE,cAAc,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAE7F,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,gBAAgB,EAAE,eAAe,CAAC;oBACjD,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,CAAC;AAC1G,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-switch.mjs","sources":["../../../../lib/ng-nest/ui/switch/switch.property.ts","../../../../lib/ng-nest/ui/switch/switch.component.ts","../../../../lib/ng-nest/ui/switch/switch.component.html","../../../../lib/ng-nest/ui/switch/switch.module.ts","../../../../lib/ng-nest/ui/switch/ng-nest-ui-switch.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\nimport { XBoolean, XInputBoolean, XSize, XTemplate, XWithConfig } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Switch\r\n * @selector x-switch\r\n * @decorator component\r\n */\r\nexport const XSwitchPrefix = 'x-switch';\r\nconst X_CONFIG_NAME = 'switch';\r\n\r\n/**\r\n * Switch Property\r\n */\r\n@Component({ selector: `${XSwitchPrefix}-property`, template: '' })\r\nexport class XSwitchProperty extends XControlValueAccessor<boolean> implements XSwitchOption {\r\n /**\r\n * @zh_CN 显示加载中\r\n * @en_US Show loading\r\n */\r\n @Input() @XInputBoolean() loading: XBoolean = false;\r\n /**\r\n * @zh_CN 手动控制\r\n * @en_US Manual control\r\n */\r\n @Input() @XInputBoolean() manual: XBoolean = false;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') size!: XSize;\r\n /**\r\n * @zh_CN 显示文字或者自定义模版(开启状态)\r\n * @en_US Display text or custom template (open state)\r\n */\r\n @Input() checkedText?: XTemplate;\r\n /**\r\n * @zh_CN 显示文字或者自定义模版(关闭状态)\r\n * @en_US Display text or custom template (closed)\r\n */\r\n @Input() unCheckedText?: XTemplate;\r\n}\r\n\r\n/**\r\n * Switch Option\r\n * @undocument true\r\n */\r\nexport interface XSwitchOption extends XFormOption {\r\n /**\r\n * @zh_CN 显示加载中\r\n * @en_US Show loading\r\n */\r\n loading?: XBoolean;\r\n /**\r\n * @zh_CN 手动控制\r\n * @en_US Manual control\r\n */\r\n manual?: XBoolean;\r\n /**\r\n * @zh_CN 显示文字或者自定义模版(开启状态)\r\n * @en_US Display text or custom template (open state)\r\n */\r\n checkedText?: XTemplate;\r\n /**\r\n * @zh_CN 显示文字或者自定义模版(关闭状态)\r\n * @en_US Display text or custom template (closed)\r\n */\r\n unCheckedText?: XTemplate;\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Renderer2,\r\n ElementRef,\r\n ViewChild,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport { XSwitchProperty, XSwitchPrefix } from './switch.property';\r\nimport { XClearClass, XConfigService, XIsChange } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XSwitchPrefix}`,\r\n templateUrl: './switch.component.html',\r\n styleUrls: ['./switch.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XSwitchComponent)]\r\n})\r\nexport class XSwitchComponent extends XSwitchProperty implements OnInit {\r\n @ViewChild('switch', { static: true }) switch!: ElementRef<HTMLElement>;\r\n\r\n override writeValue(value: any) {\r\n this.value = value;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n constructor(public renderer: Renderer2, public override cdr: ChangeDetectorRef, public configService: XConfigService) {\r\n super();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { size, labelAlign } = changes;\r\n XIsChange(size, labelAlign) && this.setClassMap();\r\n }\r\n\r\n ngOnInit() {\r\n this.setFlex(this.switch.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.classMap, this.labelMap);\r\n this.classMap[`${XSwitchPrefix}-${this.size}`] = this.size ? true : false;\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n switchClick() {\r\n if (this.disabled || this.loading || this.manual) return;\r\n this.value = !this.value;\r\n if (this.onChange) this.onChange(this.value);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n formControlChanges() {\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #switch\r\n class=\"x-switch\"\r\n [ngClass]=\"classMap\"\r\n [class.x-switch-loading]=\"loading\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-checked]=\"value\"\r\n [class.x-disabled]=\"disabled\"\r\n>\r\n <label *ngIf=\"label\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-switch-row\">\r\n <div class=\"x-switch-slider\" (click)=\"switchClick()\">\r\n <div class=\"x-switch-handle\">\r\n <div class=\"x-switch-spinner\" [x-loading]=\"loading\" [size]=\"size\"></div>\r\n </div>\r\n <div class=\"x-switch-text\">\r\n <ng-container *ngIf=\"value; else uncheckTemplate\">\r\n <ng-container *xOutlet=\"checkedText\">{{ checkedText }}</ng-container>\r\n </ng-container>\r\n <ng-template #uncheckTemplate>\r\n <ng-container *xOutlet=\"unCheckedText\">{{ unCheckedText }}</ng-container>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { XSwitchComponent } from './switch.component';\r\nimport { XSwitchProperty } from './switch.property';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\nimport { XLoadingModule } from '@ng-nest/ui/loading';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\n\r\n@NgModule({\r\n declarations: [XSwitchComponent, XSwitchProperty],\r\n exports: [XSwitchComponent],\r\n imports: [CommonModule, FormsModule, ReactiveFormsModule, XBaseFormModule, XLoadingModule, XOutletModule]\r\n})\r\nexport class XSwitchModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,aAAa,GAAG,WAAW;AACxC,MAAM,aAAa,GAAG,QAAQ,CAAC;AAE/B;;AAEG;AACH,MACa,eAAgB,SAAQ,qBAA8B,CAAA;AADnE,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACuB,IAAO,CAAA,OAAA,GAAa,KAAK,CAAC;AACpD;;;AAGG;QACuB,IAAM,CAAA,MAAA,GAAa,KAAK,CAAC;AAgBpD,KAAA;kIA1BY,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,4MADkC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;AAMpC,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;AAA2B,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAK1B,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;AAA0B,CAAA,EAAA,e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sBAA5C,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;;;AEfvC,MAKa,aAAa,CAAA;kIAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAb,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBAJT,gBAAgB,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAEtC,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,aAD9F,gBAAgB,CAAA,EAAA,CAAA,CAAA,EAAA;mIAGf,aAAa,EAAA,OAAA,EAAA,CAFd,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAE7F,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,gBAAgB,EAAE,eAAe,CAAC;oBACjD,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,CAAC;AAC1G,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -155,7 +155,7 @@ class XTableProperty extends XPaginationProperty {
|
|
|
155
155
|
this.columnDragWidthEnded = new EventEmitter();
|
|
156
156
|
}
|
|
157
157
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: XTableProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
158
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: XTableProperty, selector: "x-table-property", inputs: { data: "data", columns: "columns", rowHeight: "rowHeight", loading: "loading", bordered: "bordered", showHeader: "showHeader", headerPosition: "headerPosition", activatedRow: "activatedRow", headColumnTpl: "headColumnTpl", bodyColumnTpl: "bodyColumnTpl", bodyTdTpl: "bodyTdTpl", rowClass: "rowClass", headSearchTpl: "headSearchTpl", allowSelectRow: "allowSelectRow", allowCheckRow: "allowCheckRow", virtualScroll: "virtualScroll", bodyHeight: "bodyHeight", itemSize: "itemSize", minBufferPx: "minBufferPx", maxBufferPx: "maxBufferPx", adaptionHeight: "adaptionHeight", docPercent: "docPercent", checkedRow: "checkedRow", manual: "manual", scroll: "scroll", header: "header", footer: "footer", cellConfig: "cellConfig", rowSize: "rowSize", paginationPosition: "paginationPosition", hiddenWrapBorder: "hiddenWrapBorder", hiddenPaginationBorder: "hiddenPaginationBorder", showPagination: "showPagination", treeTable: "treeTable", expandedAll: "expandedAll", expandedLevel: "expandedLevel", expanded: "expanded", expandTpl: "expandTpl", showEmpty: "showEmpty", emptyImg: "emptyImg", emptyContent: "emptyContent" }, outputs: { activatedRowChange: "activatedRowChange", sortChange: "sortChange", headCheckboxChange: "headCheckboxChange", bodyCheckboxChange: "bodyCheckboxChange", manualChange: "manualChange", columnDragStarted: "columnDragStarted", columnDragEnded: "columnDragEnded", columnDropListDropped: "columnDropListDropped", columnDragWidthStarted: "columnDragWidthStarted", columnDragWidthMoved: "columnDragWidthMoved", columnDragWidthEnded: "columnDragWidthEnded" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
158
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: XTableProperty, selector: "x-table-property", inputs: { data: "data", columns: "columns", rowHeight: "rowHeight", loading: "loading", bordered: "bordered", showHeader: "showHeader", headerPosition: "headerPosition", activatedRow: "activatedRow", headColumnTpl: "headColumnTpl", headThTpl: "headThTpl", bodyColumnTpl: "bodyColumnTpl", bodyTdTpl: "bodyTdTpl", rowClass: "rowClass", headSearchTpl: "headSearchTpl", allowSelectRow: "allowSelectRow", allowCheckRow: "allowCheckRow", virtualScroll: "virtualScroll", bodyHeight: "bodyHeight", itemSize: "itemSize", minBufferPx: "minBufferPx", maxBufferPx: "maxBufferPx", adaptionHeight: "adaptionHeight", docPercent: "docPercent", checkedRow: "checkedRow", manual: "manual", scroll: "scroll", header: "header", footer: "footer", cellConfig: "cellConfig", rowSize: "rowSize", paginationPosition: "paginationPosition", hiddenWrapBorder: "hiddenWrapBorder", hiddenPaginationBorder: "hiddenPaginationBorder", showPagination: "showPagination", treeTable: "treeTable", expandedAll: "expandedAll", expandedLevel: "expandedLevel", expanded: "expanded", expandTpl: "expandTpl", showEmpty: "showEmpty", emptyImg: "emptyImg", emptyContent: "emptyContent" }, outputs: { activatedRowChange: "activatedRowChange", sortChange: "sortChange", headCheckboxChange: "headCheckboxChange", bodyCheckboxChange: "bodyCheckboxChange", manualChange: "manualChange", columnDragStarted: "columnDragStarted", columnDragEnded: "columnDragEnded", columnDropListDropped: "columnDropListDropped", columnDragWidthStarted: "columnDragWidthStarted", columnDragWidthMoved: "columnDragWidthMoved", columnDragWidthEnded: "columnDragWidthEnded" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
159
159
|
}
|
|
160
160
|
__decorate([
|
|
161
161
|
XWithConfig(X_CONFIG_NAME, 42),
|
|
@@ -264,6 +264,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
264
264
|
type: Output
|
|
265
265
|
}], headColumnTpl: [{
|
|
266
266
|
type: Input
|
|
267
|
+
}], headThTpl: [{
|
|
268
|
+
type: Input
|
|
267
269
|
}], bodyColumnTpl: [{
|
|
268
270
|
type: Input
|
|
269
271
|
}], bodyTdTpl: [{
|
|
@@ -738,11 +740,11 @@ class XTableHeadComponent extends XTableHeadProperty {
|
|
|
738
740
|
return item.id;
|
|
739
741
|
}
|
|
740
742
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: XTableHeadComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
741
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: XTableHeadComponent, selector: "x-table-head", inputs: { table: "table" }, viewQueries: [{ propertyName: "thead", first: true, predicate: ["thead"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<thead\r\n #thead\r\n [ngStyle]=\"theadStyle\"\r\n [class.x-table-head-top]=\"position === 'top'\"\r\n [class.x-table-head-bottom]=\"position === 'bottom'\"\r\n>\r\n <ng-container *ngIf=\"cellConfig; else columnsTpl\">\r\n <tr\r\n [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n >\r\n <th\r\n *ngFor=\"let column of cellConfig.cells\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [class.x-table-width-drag]=\"column.dragWidth\"\r\n [style.grid-area]=\"column.gridArea\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [title]=\"column?.label\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n <div\r\n *ngIf=\"column.dragWidth\"\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n </th>\r\n </tr>\r\n </ng-container>\r\n <ng-container *ngIf=\"table.headSearchTpl\">\r\n <ng-container *ngTemplateOutlet=\"columnsTpl; context: { case: 'search' }\"></ng-container>\r\n </ng-container>\r\n</thead>\r\n\r\n<ng-template #columnsTpl let-case=\"case\">\r\n <tr\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListSorted)=\"dropListSorted($event)\"\r\n (cdkDropListDropped)=\"dropListDropped($event)\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.padding-right.px]=\"scrollYWidth\"\r\n [style.width.px]=\"scrollXWidth\"\r\n [class.x-table-search]=\"case === 'search'\"\r\n >\r\n <th\r\n *ngFor=\"let column of initColumns; trackBy: trackByItem\"\r\n cdkDrag\r\n [cdkDragDisabled]=\"column.draggingWidth || !column.dragColumn\"\r\n (cdkDragStarted)=\"dragStarted($event, column)\"\r\n (cdkDragEnded)=\"dragEnded(column)\"\r\n [ngClass]=\"thClassMap\"\r\n [class.x-table-th]=\"true\"\r\n [class.x-table-sticky]=\"table.getSticky(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.width.px]=\"getColumnWidth(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"getColumnRight(column.right)\"\r\n [style.flex]=\"getFlex(column)\"\r\n >\r\n <ng-container [ngSwitch]=\"case\">\r\n <ng-container *ngSwitchCase=\"'search'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"table.headSearchTpl; context: { $column: column }\"\r\n ></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container\r\n *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"\r\n ></ng-container>\r\n <div\r\n *ngIf=\"column.dragWidth\"\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n </ng-container>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #columnBaseTpl let-column=\"column\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <x-checkbox\r\n *ngIf=\"column.headChecked\"\r\n [data]=\"[{ id: true, label: column.label }]\"\r\n [(ngModel)]=\"table.checkedValues[column.id]\"\r\n (ngModelChange)=\"table.headChecked($event, column)\"\r\n single\r\n [indeterminate]=\"table.checkedValues[column.id + table.indeterminate]\"\r\n ></x-checkbox>\r\n <ng-container *ngIf=\"!column.headChecked\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"\r\n ></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'index'\">\r\n <a
|
|
743
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: XTableHeadComponent, selector: "x-table-head", inputs: { table: "table" }, viewQueries: [{ propertyName: "thead", first: true, predicate: ["thead"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<thead\r\n #thead\r\n [ngStyle]=\"theadStyle\"\r\n [class.x-table-head-top]=\"position === 'top'\"\r\n [class.x-table-head-bottom]=\"position === 'bottom'\"\r\n>\r\n <ng-container *ngIf=\"cellConfig; else columnsTpl\">\r\n <tr\r\n [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n >\r\n <th\r\n *ngFor=\"let column of cellConfig.cells\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [class.x-table-width-drag]=\"column.dragWidth\"\r\n [style.grid-area]=\"column.gridArea\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [title]=\"column?.label\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n <div\r\n *ngIf=\"column.dragWidth\"\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n </th>\r\n </tr>\r\n </ng-container>\r\n <ng-container *ngIf=\"table.headSearchTpl\">\r\n <ng-container *ngTemplateOutlet=\"columnsTpl; context: { case: 'search' }\"></ng-container>\r\n </ng-container>\r\n</thead>\r\n\r\n<ng-template #columnsTpl let-case=\"case\">\r\n <tr\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListSorted)=\"dropListSorted($event)\"\r\n (cdkDropListDropped)=\"dropListDropped($event)\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.padding-right.px]=\"scrollYWidth\"\r\n [style.width.px]=\"scrollXWidth\"\r\n [class.x-table-search]=\"case === 'search'\"\r\n >\r\n <th\r\n *ngFor=\"let column of initColumns; trackBy: trackByItem\"\r\n cdkDrag\r\n [cdkDragDisabled]=\"column.draggingWidth || !column.dragColumn\"\r\n (cdkDragStarted)=\"dragStarted($event, column)\"\r\n (cdkDragEnded)=\"dragEnded(column)\"\r\n [ngClass]=\"thClassMap\"\r\n [class.x-table-th]=\"true\"\r\n [class.x-table-sticky]=\"table.getSticky(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.width.px]=\"getColumnWidth(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"getColumnRight(column.right)\"\r\n [style.flex]=\"getFlex(column)\"\r\n >\r\n <ng-container [ngSwitch]=\"case\">\r\n <ng-container *ngSwitchCase=\"'search'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"table.headSearchTpl; context: { $column: column }\"\r\n ></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container\r\n *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"\r\n ></ng-container>\r\n <div\r\n *ngIf=\"column.dragWidth\"\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n </ng-container>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #columnBaseTpl let-column=\"column\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <x-checkbox\r\n *ngIf=\"column.headChecked\"\r\n [data]=\"[{ id: true, label: column.label }]\"\r\n [(ngModel)]=\"table.checkedValues[column.id]\"\r\n (ngModelChange)=\"table.headChecked($event, column)\"\r\n single\r\n [indeterminate]=\"table.checkedValues[column.id + table.indeterminate]\"\r\n ></x-checkbox>\r\n <ng-container *ngIf=\"!column.headChecked\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"\r\n ></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'index'\">\r\n <a>\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl; context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container>\r\n </a>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container\r\n *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"\r\n ></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #cloumnDefaultTpl let-column=\"column\">\r\n <a\r\n [class.x-table-sort]=\"column.sort\"\r\n (click)=\"onSort(column)\"\r\n [style.text-align]=\"column.textAlign\"\r\n >\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl; context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container>\r\n <x-icon\r\n *ngIf=\"column.sort\"\r\n type=\"fto-bar-chart\"\r\n class=\"x-table-sort-icon\"\r\n [class.x-table-icon-up]=\"sortStr === column.id + ' desc'\"\r\n [class.x-table-icon-down]=\"sortStr === column.id + ' asc'\"\r\n ></x-icon>\r\n </a>\r\n</ng-template>\r\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: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: i5.XCheckboxComponent, selector: "x-checkbox" }, { kind: "component", type: i6.XIconComponent, selector: "x-icon" }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.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: i8.XDragDirective, selector: "[x-drag]" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
742
744
|
}
|
|
743
745
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: XTableHeadComponent, decorators: [{
|
|
744
746
|
type: Component,
|
|
745
|
-
args: [{ selector: `${XTableHeadPrefix}`, encapsulation: ViewEncapsulation.None, template: "<thead\r\n #thead\r\n [ngStyle]=\"theadStyle\"\r\n [class.x-table-head-top]=\"position === 'top'\"\r\n [class.x-table-head-bottom]=\"position === 'bottom'\"\r\n>\r\n <ng-container *ngIf=\"cellConfig; else columnsTpl\">\r\n <tr\r\n [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n >\r\n <th\r\n *ngFor=\"let column of cellConfig.cells\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [class.x-table-width-drag]=\"column.dragWidth\"\r\n [style.grid-area]=\"column.gridArea\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [title]=\"column?.label\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n <div\r\n *ngIf=\"column.dragWidth\"\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n </th>\r\n </tr>\r\n </ng-container>\r\n <ng-container *ngIf=\"table.headSearchTpl\">\r\n <ng-container *ngTemplateOutlet=\"columnsTpl; context: { case: 'search' }\"></ng-container>\r\n </ng-container>\r\n</thead>\r\n\r\n<ng-template #columnsTpl let-case=\"case\">\r\n <tr\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListSorted)=\"dropListSorted($event)\"\r\n (cdkDropListDropped)=\"dropListDropped($event)\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.padding-right.px]=\"scrollYWidth\"\r\n [style.width.px]=\"scrollXWidth\"\r\n [class.x-table-search]=\"case === 'search'\"\r\n >\r\n <th\r\n *ngFor=\"let column of initColumns; trackBy: trackByItem\"\r\n cdkDrag\r\n [cdkDragDisabled]=\"column.draggingWidth || !column.dragColumn\"\r\n (cdkDragStarted)=\"dragStarted($event, column)\"\r\n (cdkDragEnded)=\"dragEnded(column)\"\r\n [ngClass]=\"thClassMap\"\r\n [class.x-table-th]=\"true\"\r\n [class.x-table-sticky]=\"table.getSticky(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.width.px]=\"getColumnWidth(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"getColumnRight(column.right)\"\r\n [style.flex]=\"getFlex(column)\"\r\n >\r\n <ng-container [ngSwitch]=\"case\">\r\n <ng-container *ngSwitchCase=\"'search'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"table.headSearchTpl; context: { $column: column }\"\r\n ></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container\r\n *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"\r\n ></ng-container>\r\n <div\r\n *ngIf=\"column.dragWidth\"\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n </ng-container>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #columnBaseTpl let-column=\"column\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <x-checkbox\r\n *ngIf=\"column.headChecked\"\r\n [data]=\"[{ id: true, label: column.label }]\"\r\n [(ngModel)]=\"table.checkedValues[column.id]\"\r\n (ngModelChange)=\"table.headChecked($event, column)\"\r\n single\r\n [indeterminate]=\"table.checkedValues[column.id + table.indeterminate]\"\r\n ></x-checkbox>\r\n <ng-container *ngIf=\"!column.headChecked\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"\r\n ></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'index'\">\r\n <a
|
|
747
|
+
args: [{ selector: `${XTableHeadPrefix}`, encapsulation: ViewEncapsulation.None, template: "<thead\r\n #thead\r\n [ngStyle]=\"theadStyle\"\r\n [class.x-table-head-top]=\"position === 'top'\"\r\n [class.x-table-head-bottom]=\"position === 'bottom'\"\r\n>\r\n <ng-container *ngIf=\"cellConfig; else columnsTpl\">\r\n <tr\r\n [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n >\r\n <th\r\n *ngFor=\"let column of cellConfig.cells\"\r\n [class.x-table-sticky]=\"table.getStickyLeft(column) || table.getStickyRight(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [class.x-table-width-drag]=\"column.dragWidth\"\r\n [style.grid-area]=\"column.gridArea\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"column.right\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [title]=\"column?.label\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n <div\r\n *ngIf=\"column.dragWidth\"\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n </th>\r\n </tr>\r\n </ng-container>\r\n <ng-container *ngIf=\"table.headSearchTpl\">\r\n <ng-container *ngTemplateOutlet=\"columnsTpl; context: { case: 'search' }\"></ng-container>\r\n </ng-container>\r\n</thead>\r\n\r\n<ng-template #columnsTpl let-case=\"case\">\r\n <tr\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListSorted)=\"dropListSorted($event)\"\r\n (cdkDropListDropped)=\"dropListDropped($event)\"\r\n [style.height.px]=\"getRowHeight\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.padding-right.px]=\"scrollYWidth\"\r\n [style.width.px]=\"scrollXWidth\"\r\n [class.x-table-search]=\"case === 'search'\"\r\n >\r\n <th\r\n *ngFor=\"let column of initColumns; trackBy: trackByItem\"\r\n cdkDrag\r\n [cdkDragDisabled]=\"column.draggingWidth || !column.dragColumn\"\r\n (cdkDragStarted)=\"dragStarted($event, column)\"\r\n (cdkDragEnded)=\"dragEnded(column)\"\r\n [ngClass]=\"thClassMap\"\r\n [class.x-table-th]=\"true\"\r\n [class.x-table-sticky]=\"table.getSticky(column)\"\r\n [class.x-table-sticky-left]=\"table.getStickyLeft(column)\"\r\n [class.x-table-sticky-right]=\"table.getStickyRight(column)\"\r\n [class.x-table-sticky-left-last]=\"table.getStickyLeftLast(column)\"\r\n [class.x-table-sticky-right-first]=\"table.getStickyRightFirst(column)\"\r\n [style.min-height.px]=\"getRowHeight\"\r\n [style.width.px]=\"getColumnWidth(column)\"\r\n [style.left.px]=\"column.left\"\r\n [style.right.px]=\"getColumnRight(column.right)\"\r\n [style.flex]=\"getFlex(column)\"\r\n >\r\n <ng-container [ngSwitch]=\"case\">\r\n <ng-container *ngSwitchCase=\"'search'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"table.headSearchTpl; context: { $column: column }\"\r\n ></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container\r\n *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"\r\n ></ng-container>\r\n <div\r\n *ngIf=\"column.dragWidth\"\r\n class=\"x-table-drag-width\"\r\n x-drag\r\n (dragMoved)=\"dragWidthMoved($event, column)\"\r\n (dragStarted)=\"dragWidthStarted($event, column)\"\r\n (dragEnded)=\"dragWidthEnded($event, column)\"\r\n ></div>\r\n </ng-container>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n</ng-template>\r\n\r\n<ng-template #columnBaseTpl let-column=\"column\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <x-checkbox\r\n *ngIf=\"column.headChecked\"\r\n [data]=\"[{ id: true, label: column.label }]\"\r\n [(ngModel)]=\"table.checkedValues[column.id]\"\r\n (ngModelChange)=\"table.headChecked($event, column)\"\r\n single\r\n [indeterminate]=\"table.checkedValues[column.id + table.indeterminate]\"\r\n ></x-checkbox>\r\n <ng-container *ngIf=\"!column.headChecked\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"\r\n ></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'index'\">\r\n <a>\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl; context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container>\r\n </a>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container\r\n *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"\r\n ></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #cloumnDefaultTpl let-column=\"column\">\r\n <a\r\n [class.x-table-sort]=\"column.sort\"\r\n (click)=\"onSort(column)\"\r\n [style.text-align]=\"column.textAlign\"\r\n >\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n <ng-container *xOutlet=\"table.headThTpl; context: { $column: column }\">\r\n {{ column.label }}\r\n </ng-container>\r\n </ng-container>\r\n <x-icon\r\n *ngIf=\"column.sort\"\r\n type=\"fto-bar-chart\"\r\n class=\"x-table-sort-icon\"\r\n [class.x-table-icon-up]=\"sortStr === column.id + ' desc'\"\r\n [class.x-table-icon-down]=\"sortStr === column.id + ' asc'\"\r\n ></x-icon>\r\n </a>\r\n</ng-template>\r\n" }]
|
|
746
748
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }]; }, propDecorators: { thead: [{
|
|
747
749
|
type: ViewChild,
|
|
748
750
|
args: ['thead']
|