@ng-nest/ui 15.0.6 → 15.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/core/config/config.d.ts +1 -0
  2. package/core/functions/date.d.ts +1 -0
  3. package/date-picker/date-picker.property.d.ts +129 -3
  4. package/date-picker/date-range-portal.component.d.ts +9 -8
  5. package/date-picker/date-range.component.d.ts +12 -10
  6. package/date-picker/picker-date.component.d.ts +15 -6
  7. package/esm2020/core/config/config.mjs +1 -1
  8. package/esm2020/core/functions/date.mjs +20 -29
  9. package/esm2020/date-picker/date-picker.property.mjs +23 -2
  10. package/esm2020/date-picker/date-range-portal.component.mjs +36 -33
  11. package/esm2020/date-picker/date-range.component.mjs +75 -53
  12. package/esm2020/date-picker/picker-date.component.mjs +133 -17
  13. package/esm2020/input/input.component.mjs +2 -2
  14. package/esm2020/loading/loading.component.mjs +13 -6
  15. package/esm2020/loading/loading.property.mjs +1 -1
  16. package/esm2020/switch/switch.component.mjs +13 -6
  17. package/esm2020/switch/switch.module.mjs +6 -4
  18. package/esm2020/switch/switch.property.mjs +39 -4
  19. package/esm2020/table/drag.directive.mjs +13 -5
  20. package/esm2020/table/table-head.component.mjs +22 -6
  21. package/esm2020/table/table.property.mjs +23 -2
  22. package/fesm2015/ng-nest-ui-anchor.mjs +1 -0
  23. package/fesm2015/ng-nest-ui-api.mjs +1 -0
  24. package/fesm2015/ng-nest-ui-auto-complete.mjs +1 -0
  25. package/fesm2015/ng-nest-ui-avatar.mjs +1 -0
  26. package/fesm2015/ng-nest-ui-back-top.mjs +1 -0
  27. package/fesm2015/ng-nest-ui-badge.mjs +1 -0
  28. package/fesm2015/ng-nest-ui-base-form.mjs +1 -0
  29. package/fesm2015/ng-nest-ui-border.mjs +1 -0
  30. package/fesm2015/ng-nest-ui-button.mjs +1 -0
  31. package/fesm2015/ng-nest-ui-calendar.mjs +1 -0
  32. package/fesm2015/ng-nest-ui-card.mjs +1 -0
  33. package/fesm2015/ng-nest-ui-carousel.mjs +1 -0
  34. package/fesm2015/ng-nest-ui-cascade.mjs +1 -0
  35. package/fesm2015/ng-nest-ui-checkbox.mjs +1 -0
  36. package/fesm2015/ng-nest-ui-collapse.mjs +1 -0
  37. package/fesm2015/ng-nest-ui-color-picker.mjs +1 -0
  38. package/fesm2015/ng-nest-ui-color.mjs +1 -0
  39. package/fesm2015/ng-nest-ui-comment.mjs +1 -0
  40. package/fesm2015/ng-nest-ui-container.mjs +1 -0
  41. package/fesm2015/ng-nest-ui-core.mjs +20 -29
  42. package/fesm2015/ng-nest-ui-core.mjs.map +1 -1
  43. package/fesm2015/ng-nest-ui-date-picker.mjs +263 -99
  44. package/fesm2015/ng-nest-ui-date-picker.mjs.map +1 -1
  45. package/fesm2015/ng-nest-ui-dialog.mjs +1 -0
  46. package/fesm2015/ng-nest-ui-drawer.mjs +1 -0
  47. package/fesm2015/ng-nest-ui-dropdown.mjs +1 -0
  48. package/fesm2015/ng-nest-ui-find.mjs +1 -0
  49. package/fesm2015/ng-nest-ui-form.mjs +1 -0
  50. package/fesm2015/ng-nest-ui-highlight.mjs +1 -0
  51. package/fesm2015/ng-nest-ui-i18n.mjs +1 -0
  52. package/fesm2015/ng-nest-ui-icon.mjs +1 -0
  53. package/fesm2015/ng-nest-ui-image.mjs +1 -0
  54. package/fesm2015/ng-nest-ui-inner.mjs +1 -0
  55. package/fesm2015/ng-nest-ui-input-number.mjs +1 -0
  56. package/fesm2015/ng-nest-ui-input.mjs +2 -1
  57. package/fesm2015/ng-nest-ui-input.mjs.map +1 -1
  58. package/fesm2015/ng-nest-ui-link.mjs +1 -0
  59. package/fesm2015/ng-nest-ui-list.mjs +1 -0
  60. package/fesm2015/ng-nest-ui-loading.mjs +13 -5
  61. package/fesm2015/ng-nest-ui-loading.mjs.map +1 -1
  62. package/fesm2015/ng-nest-ui-menu.mjs +1 -0
  63. package/fesm2015/ng-nest-ui-message-box.mjs +1 -0
  64. package/fesm2015/ng-nest-ui-message.mjs +1 -0
  65. package/fesm2015/ng-nest-ui-notification.mjs +1 -0
  66. package/fesm2015/ng-nest-ui-pagination.mjs +1 -0
  67. package/fesm2015/ng-nest-ui-popconfirm.mjs +1 -0
  68. package/fesm2015/ng-nest-ui-popover.mjs +1 -0
  69. package/fesm2015/ng-nest-ui-progress.mjs +1 -0
  70. package/fesm2015/ng-nest-ui-radio.mjs +1 -0
  71. package/fesm2015/ng-nest-ui-rate.mjs +1 -0
  72. package/fesm2015/ng-nest-ui-result.mjs +1 -0
  73. package/fesm2015/ng-nest-ui-select.mjs +1 -0
  74. package/fesm2015/ng-nest-ui-skeleton.mjs +1 -0
  75. package/fesm2015/ng-nest-ui-slider-select.mjs +1 -0
  76. package/fesm2015/ng-nest-ui-slider.mjs +1 -0
  77. package/fesm2015/ng-nest-ui-steps.mjs +1 -0
  78. package/fesm2015/ng-nest-ui-switch.mjs +54 -11
  79. package/fesm2015/ng-nest-ui-switch.mjs.map +1 -1
  80. package/fesm2015/ng-nest-ui-table.mjs +55 -10
  81. package/fesm2015/ng-nest-ui-table.mjs.map +1 -1
  82. package/fesm2015/ng-nest-ui-tabs.mjs +1 -0
  83. package/fesm2015/ng-nest-ui-tag.mjs +1 -0
  84. package/fesm2015/ng-nest-ui-text-retract.mjs +1 -0
  85. package/fesm2015/ng-nest-ui-textarea.mjs +1 -0
  86. package/fesm2015/ng-nest-ui-time-picker.mjs +1 -0
  87. package/fesm2015/ng-nest-ui-timeline.mjs +1 -0
  88. package/fesm2015/ng-nest-ui-tooltip.mjs +1 -0
  89. package/fesm2015/ng-nest-ui-transfer.mjs +1 -0
  90. package/fesm2015/ng-nest-ui-tree-file.mjs +1 -0
  91. package/fesm2015/ng-nest-ui-tree-select.mjs +1 -0
  92. package/fesm2015/ng-nest-ui-tree.mjs +1 -0
  93. package/fesm2015/ng-nest-ui-upload.mjs +1 -0
  94. package/fesm2020/ng-nest-ui-anchor.mjs +1 -0
  95. package/fesm2020/ng-nest-ui-api.mjs +1 -0
  96. package/fesm2020/ng-nest-ui-auto-complete.mjs +1 -0
  97. package/fesm2020/ng-nest-ui-avatar.mjs +1 -0
  98. package/fesm2020/ng-nest-ui-back-top.mjs +1 -0
  99. package/fesm2020/ng-nest-ui-badge.mjs +1 -0
  100. package/fesm2020/ng-nest-ui-base-form.mjs +1 -0
  101. package/fesm2020/ng-nest-ui-border.mjs +1 -0
  102. package/fesm2020/ng-nest-ui-button.mjs +1 -0
  103. package/fesm2020/ng-nest-ui-calendar.mjs +1 -0
  104. package/fesm2020/ng-nest-ui-card.mjs +1 -0
  105. package/fesm2020/ng-nest-ui-carousel.mjs +1 -0
  106. package/fesm2020/ng-nest-ui-cascade.mjs +1 -0
  107. package/fesm2020/ng-nest-ui-checkbox.mjs +1 -0
  108. package/fesm2020/ng-nest-ui-collapse.mjs +1 -0
  109. package/fesm2020/ng-nest-ui-color-picker.mjs +1 -0
  110. package/fesm2020/ng-nest-ui-color.mjs +1 -0
  111. package/fesm2020/ng-nest-ui-comment.mjs +1 -0
  112. package/fesm2020/ng-nest-ui-container.mjs +1 -0
  113. package/fesm2020/ng-nest-ui-core.mjs +20 -29
  114. package/fesm2020/ng-nest-ui-core.mjs.map +1 -1
  115. package/fesm2020/ng-nest-ui-date-picker.mjs +262 -99
  116. package/fesm2020/ng-nest-ui-date-picker.mjs.map +1 -1
  117. package/fesm2020/ng-nest-ui-dialog.mjs +1 -0
  118. package/fesm2020/ng-nest-ui-drawer.mjs +1 -0
  119. package/fesm2020/ng-nest-ui-dropdown.mjs +1 -0
  120. package/fesm2020/ng-nest-ui-find.mjs +1 -0
  121. package/fesm2020/ng-nest-ui-form.mjs +1 -0
  122. package/fesm2020/ng-nest-ui-highlight.mjs +1 -0
  123. package/fesm2020/ng-nest-ui-i18n.mjs +1 -0
  124. package/fesm2020/ng-nest-ui-icon.mjs +1 -0
  125. package/fesm2020/ng-nest-ui-image.mjs +1 -0
  126. package/fesm2020/ng-nest-ui-inner.mjs +1 -0
  127. package/fesm2020/ng-nest-ui-input-number.mjs +1 -0
  128. package/fesm2020/ng-nest-ui-input.mjs +2 -1
  129. package/fesm2020/ng-nest-ui-input.mjs.map +1 -1
  130. package/fesm2020/ng-nest-ui-link.mjs +1 -0
  131. package/fesm2020/ng-nest-ui-list.mjs +1 -0
  132. package/fesm2020/ng-nest-ui-loading.mjs +13 -5
  133. package/fesm2020/ng-nest-ui-loading.mjs.map +1 -1
  134. package/fesm2020/ng-nest-ui-menu.mjs +1 -0
  135. package/fesm2020/ng-nest-ui-message-box.mjs +1 -0
  136. package/fesm2020/ng-nest-ui-message.mjs +1 -0
  137. package/fesm2020/ng-nest-ui-notification.mjs +1 -0
  138. package/fesm2020/ng-nest-ui-pagination.mjs +1 -0
  139. package/fesm2020/ng-nest-ui-popconfirm.mjs +1 -0
  140. package/fesm2020/ng-nest-ui-popover.mjs +1 -0
  141. package/fesm2020/ng-nest-ui-progress.mjs +1 -0
  142. package/fesm2020/ng-nest-ui-radio.mjs +1 -0
  143. package/fesm2020/ng-nest-ui-rate.mjs +1 -0
  144. package/fesm2020/ng-nest-ui-result.mjs +1 -0
  145. package/fesm2020/ng-nest-ui-select.mjs +1 -0
  146. package/fesm2020/ng-nest-ui-skeleton.mjs +1 -0
  147. package/fesm2020/ng-nest-ui-slider-select.mjs +1 -0
  148. package/fesm2020/ng-nest-ui-slider.mjs +1 -0
  149. package/fesm2020/ng-nest-ui-steps.mjs +1 -0
  150. package/fesm2020/ng-nest-ui-switch.mjs +54 -11
  151. package/fesm2020/ng-nest-ui-switch.mjs.map +1 -1
  152. package/fesm2020/ng-nest-ui-table.mjs +55 -10
  153. package/fesm2020/ng-nest-ui-table.mjs.map +1 -1
  154. package/fesm2020/ng-nest-ui-tabs.mjs +1 -0
  155. package/fesm2020/ng-nest-ui-tag.mjs +1 -0
  156. package/fesm2020/ng-nest-ui-text-retract.mjs +1 -0
  157. package/fesm2020/ng-nest-ui-textarea.mjs +1 -0
  158. package/fesm2020/ng-nest-ui-time-picker.mjs +1 -0
  159. package/fesm2020/ng-nest-ui-timeline.mjs +1 -0
  160. package/fesm2020/ng-nest-ui-tooltip.mjs +1 -0
  161. package/fesm2020/ng-nest-ui-transfer.mjs +1 -0
  162. package/fesm2020/ng-nest-ui-tree-file.mjs +1 -0
  163. package/fesm2020/ng-nest-ui-tree-select.mjs +1 -0
  164. package/fesm2020/ng-nest-ui-tree.mjs +1 -0
  165. package/fesm2020/ng-nest-ui-upload.mjs +1 -0
  166. package/loading/loading.component.d.ts +1 -0
  167. package/loading/loading.property.d.ts +1 -1
  168. package/package.json +1 -1
  169. package/switch/switch.component.d.ts +2 -1
  170. package/switch/switch.module.d.ts +3 -1
  171. package/switch/switch.property.d.ts +47 -1
  172. package/table/drag.directive.d.ts +12 -2
  173. package/table/table-head.component.d.ts +11 -1
  174. package/table/table.property.d.ts +55 -1
@@ -1,10 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
2
+ import { Component, Input, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
3
+ import { __decorate } from 'tslib';
3
4
  import { XControlValueAccessor, XValueAccessor, XBaseFormModule } from '@ng-nest/ui/base-form';
4
5
  import * as i1 from '@ng-nest/ui/core';
5
- import { XClearClass } from '@ng-nest/ui/core';
6
+ import { XInputBoolean, XWithConfig, XIsChange, XClearClass } from '@ng-nest/ui/core';
6
7
  import * as i2 from '@angular/common';
7
8
  import { CommonModule } from '@angular/common';
9
+ import * as i3 from '@ng-nest/ui/loading';
10
+ import { XLoadingModule } from '@ng-nest/ui/loading';
11
+ import * as i4 from '@ng-nest/ui/outlet';
12
+ import { XOutletModule } from '@ng-nest/ui/outlet';
8
13
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
9
14
 
10
15
  /**
@@ -13,17 +18,50 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
13
18
  * @decorator component
14
19
  */
15
20
  const XSwitchPrefix = 'x-switch';
21
+ const X_CONFIG_NAME = 'switch';
16
22
  /**
17
23
  * Switch Property
18
24
  */
19
25
  class XSwitchProperty extends XControlValueAccessor {
26
+ constructor() {
27
+ super(...arguments);
28
+ /**
29
+ * @zh_CN 显示加载中
30
+ * @en_US Show loading
31
+ */
32
+ this.loading = false;
33
+ /**
34
+ * @zh_CN 手动控制
35
+ * @en_US Manual control
36
+ */
37
+ this.manual = false;
38
+ }
20
39
  }
21
40
  /** @nocollapse */ XSwitchProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XSwitchProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
22
- /** @nocollapse */ XSwitchProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XSwitchProperty, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
41
+ /** @nocollapse */ XSwitchProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XSwitchProperty, selector: "ng-component", inputs: { loading: "loading", manual: "manual", size: "size", checkedText: "checkedText", unCheckedText: "unCheckedText" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
42
+ __decorate([
43
+ XInputBoolean()
44
+ ], XSwitchProperty.prototype, "loading", void 0);
45
+ __decorate([
46
+ XInputBoolean()
47
+ ], XSwitchProperty.prototype, "manual", void 0);
48
+ __decorate([
49
+ XWithConfig(X_CONFIG_NAME, 'medium')
50
+ ], XSwitchProperty.prototype, "size", void 0);
23
51
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XSwitchProperty, decorators: [{
24
52
  type: Component,
25
53
  args: [{ template: '' }]
26
- }] });
54
+ }], propDecorators: { loading: [{
55
+ type: Input
56
+ }], manual: [{
57
+ type: Input
58
+ }], size: [{
59
+ type: Input
60
+ }], checkedText: [{
61
+ type: Input
62
+ }], unCheckedText: [{
63
+ type: Input
64
+ }] } });
27
65
 
28
66
  class XSwitchComponent extends XSwitchProperty {
29
67
  constructor(renderer, cdr, configService) {
@@ -36,16 +74,21 @@ class XSwitchComponent extends XSwitchProperty {
36
74
  this.value = value;
37
75
  this.cdr.detectChanges();
38
76
  }
77
+ ngOnChanges(changes) {
78
+ const { size, labelAlign } = changes;
79
+ XIsChange(size, labelAlign) && this.setClassMap();
80
+ }
39
81
  ngOnInit() {
40
82
  this.setFlex(this.switch.nativeElement, this.renderer, this.justify, this.align, this.direction);
41
83
  this.setClassMap();
42
84
  }
43
85
  setClassMap() {
44
- XClearClass(this.labelMap);
86
+ XClearClass(this.classMap, this.labelMap);
87
+ this.classMap[`${XSwitchPrefix}-${this.size}`] = this.size ? true : false;
45
88
  this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;
46
89
  }
47
90
  switchClick() {
48
- if (this.disabled)
91
+ if (this.disabled || this.loading || this.manual)
49
92
  return;
50
93
  this.value = !this.value;
51
94
  if (this.onChange)
@@ -58,10 +101,10 @@ class XSwitchComponent extends XSwitchProperty {
58
101
  }
59
102
  }
60
103
  /** @nocollapse */ XSwitchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XSwitchComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
61
- /** @nocollapse */ XSwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XSwitchComponent, selector: "x-switch", providers: [XValueAccessor(XSwitchComponent)], viewQueries: [{ propertyName: "switch", first: true, predicate: ["switch"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div #switch class=\"x-switch\" [class.x-flex]=\"justify || align || direction\" [class.x-checked]=\"value\" [class.x-disabled]=\"disabled\">\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()\"></div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.x-switch{margin:0;padding:0;width:100%}.x-switch.x-flex{display:flex}.x-switch.x-justify-start{justify-content:flex-start}.x-switch.x-justify-center{justify-content:center}.x-switch.x-justify-end{justify-content:flex-end}.x-switch.x-justify-space-between{justify-content:space-between}.x-switch.x-justify-space-around{justify-content:space-around}.x-switch.x-align-start{align-items:flex-start}.x-switch.x-align-center{align-items:center}.x-switch.x-align-end{align-items:flex-end}.x-switch.x-direction-column{flex-direction:column}.x-switch.x-direction-column-reverse{flex-direction:column-reverse}.x-switch.x-direction-row{flex-direction:row}.x-switch.x-direction-row-reverse{flex-direction:row-reverse}.x-switch>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-switch>label.x-text-align-start{text-align:start}.x-switch>label.x-text-align-center{text-align:center}.x-switch>label.x-text-align-end{text-align:end}.x-switch-row{flex:1;display:flex;align-items:center;position:relative;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-switch-slider{margin:calc((calc(var(--x-font-size) + .875rem) - 1.25rem) / 2) 0;display:inline-flex;align-items:center;position:relative;width:2.5rem;height:1.25rem;border:var(--x-border-width) solid var(--x-info);border-radius:1.25rem;background-color:var(--x-info);cursor:pointer;transition:border-color .3s,background-color .3s}.x-switch-slider:after{position:absolute;box-shadow:0 calc(var(--x-border-width) * 2) calc(var(--x-border-width) * 4) 0 #00230b33;width:calc(1.25rem - calc(var(--x-border-width) * 4));height:calc(1.25rem - calc(var(--x-border-width) * 4));margin:0 calc(var(--x-border-width) * 2);background-color:var(--x-background-a100);border-radius:calc(1.25rem - calc(var(--x-border-width) * 4));cursor:pointer;left:0;transition:all .36s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-switch.x-checked .x-switch-slider{background-color:var(--x-primary);border-color:var(--x-primary)}.x-switch.x-checked .x-switch-slider:after{left:calc(1.25rem - calc(var(--x-border-width) * 2))}.x-switch.x-required>label{color:var(--x-danger)}.x-switch.x-disabled .x-switch-slider{cursor:not-allowed;background-color:var(--x-info-500);border-color:var(--x-info-500)}.x-switch.x-disabled.x-checked .x-switch-slider{background-color:var(--x-primary-500);border-color:var(--x-primary-500)}.x-switch.x-direction-row>label{padding:0 .5rem 0 0}.x-switch.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-switch.x-direction-column,.x-switch.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
104
+ /** @nocollapse */ XSwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XSwitchComponent, selector: "x-switch", providers: [XValueAccessor(XSwitchComponent)], viewQueries: [{ propertyName: "switch", first: true, predicate: ["switch"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<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", styles: ["@charset \"UTF-8\";.x-switch{margin:0;padding:0;width:100%}.x-switch.x-flex{display:flex}.x-switch.x-justify-start{justify-content:flex-start}.x-switch.x-justify-center{justify-content:center}.x-switch.x-justify-end{justify-content:flex-end}.x-switch.x-justify-space-between{justify-content:space-between}.x-switch.x-justify-space-around{justify-content:space-around}.x-switch.x-align-start{align-items:flex-start}.x-switch.x-align-center{align-items:center}.x-switch.x-align-end{align-items:flex-end}.x-switch.x-direction-column{flex-direction:column}.x-switch.x-direction-column-reverse{flex-direction:column-reverse}.x-switch.x-direction-row{flex-direction:row}.x-switch.x-direction-row-reverse{flex-direction:row-reverse}.x-switch>label{display:inline-block;white-space:nowrap;position:relative;color:var(--x-text-300);font-weight:600}.x-switch>label.x-text-align-start{text-align:start}.x-switch>label.x-text-align-center{text-align:center}.x-switch>label.x-text-align-end{text-align:end}.x-switch-row{flex:1;display:flex;align-items:center;position:relative;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-switch-slider{display:inline-flex;align-items:center;position:relative;border:var(--x-border-width) solid var(--x-info);background-color:var(--x-info);cursor:pointer;transition:var(--x-animation-duration-slow)}.x-switch-handle{position:absolute;transition:var(--x-animation-duration-slow);left:0;display:block}.x-switch-handle:before{position:absolute;inset:0;box-shadow:0 .125rem .25rem #00230b33;background-color:var(--x-background-a100);content:\"\"}.x-switch-spinner .x-loading{background-color:transparent}.x-switch-spinner .x-loading-spinner{display:flex;align-items:center}.x-switch-text{color:var(--x-white);transition:var(--x-animation-duration-slow)}.x-switch.x-checked .x-switch-slider{background-color:var(--x-primary);border-color:var(--x-primary)}.x-switch.x-required>label{color:var(--x-danger)}.x-switch.x-disabled .x-switch-slider,.x-switch-loading .x-switch-slider{cursor:not-allowed;background-color:var(--x-info-500);border-color:var(--x-info-500)}.x-switch.x-disabled.x-checked .x-switch-slider,.x-switch-loading.x-checked .x-switch-slider{background-color:var(--x-primary-500);border-color:var(--x-primary-500)}.x-switch.x-direction-row>label{padding:0 .5rem 0 0}.x-switch.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-switch.x-direction-column,.x-switch.x-direction-column-reverse{align-items:inherit}.x-switch-big>label{height:var(--x-height-big);line-height:var(--x-height-big)}.x-switch-big .x-switch-slider{height:calc(var(--x-height-big) - .25rem);min-width:calc((var(--x-height-big) - .25rem) * 2);border-radius:calc(var(--x-height-big) - .25rem);margin:.125rem 0}.x-switch-big .x-switch-handle{width:calc(var(--x-height-big) - .5rem);height:calc(var(--x-height-big) - .5rem);margin:0 .125rem}.x-switch-big .x-switch-handle:before{border-radius:calc(var(--x-height-big) - .5rem)}.x-switch-big .x-switch-text{margin-left:calc(var(--x-height-big) - .125rem);margin-right:.5rem}.x-switch-big.x-checked .x-switch-handle{left:calc(100% - (var(--x-height-big) - .5rem) - .25rem)}.x-switch-big.x-checked .x-switch-text{margin-left:.5rem;margin-right:calc(var(--x-height-big) - .25rem)}.x-switch-big .x-switch-spinner{width:calc(var(--x-height-big) - .5rem);height:calc(var(--x-height-big) - .5rem)}.x-switch-big .x-loading-big .x-loading-circular{width:calc(var(--x-height-big) - .625rem);height:calc(var(--x-height-big) - .625rem)}.x-switch-large>label{height:var(--x-height-large);line-height:var(--x-height-large)}.x-switch-large .x-switch-slider{height:calc(var(--x-height-large) - .25rem);min-width:calc((var(--x-height-large) - .25rem) * 2);border-radius:calc(var(--x-height-large) - .25rem);margin:.125rem 0}.x-switch-large .x-switch-handle{width:calc(var(--x-height-large) - .5rem);height:calc(var(--x-height-large) - .5rem);margin:0 .125rem}.x-switch-large .x-switch-handle:before{border-radius:calc(var(--x-height-large) - .5rem)}.x-switch-large .x-switch-text{margin-left:calc(var(--x-height-large) - .125rem);margin-right:.5rem}.x-switch-large.x-checked .x-switch-handle{left:calc(100% - (var(--x-height-large) - .5rem) - .25rem)}.x-switch-large.x-checked .x-switch-text{margin-left:.5rem;margin-right:calc(var(--x-height-large) - .25rem)}.x-switch-large .x-switch-spinner{width:calc(var(--x-height-large) - .5rem);height:calc(var(--x-height-large) - .5rem)}.x-switch-large .x-loading-large .x-loading-circular{width:calc(var(--x-height-large) - .625rem);height:calc(var(--x-height-large) - .625rem)}.x-switch-medium>label{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-switch-medium .x-switch-slider{height:calc(var(--x-height-medium) - .25rem);min-width:calc((var(--x-height-medium) - .25rem) * 2);border-radius:calc(var(--x-height-medium) - .25rem);margin:.125rem 0}.x-switch-medium .x-switch-handle{width:calc(var(--x-height-medium) - .5rem);height:calc(var(--x-height-medium) - .5rem);margin:0 .125rem}.x-switch-medium .x-switch-handle:before{border-radius:calc(var(--x-height-medium) - .5rem)}.x-switch-medium .x-switch-text{margin-left:calc(var(--x-height-medium) - .125rem);margin-right:.5rem}.x-switch-medium.x-checked .x-switch-handle{left:calc(100% - (var(--x-height-medium) - .5rem) - .25rem)}.x-switch-medium.x-checked .x-switch-text{margin-left:.5rem;margin-right:calc(var(--x-height-medium) - .25rem)}.x-switch-medium .x-switch-spinner{width:calc(var(--x-height-medium) - .5rem);height:calc(var(--x-height-medium) - .5rem)}.x-switch-medium .x-loading-medium .x-loading-circular{width:calc(var(--x-height-medium) - .625rem);height:calc(var(--x-height-medium) - .625rem)}.x-switch-small>label{height:var(--x-height-small);line-height:var(--x-height-small)}.x-switch-small .x-switch-slider{height:calc(var(--x-height-small) - .25rem);min-width:calc((var(--x-height-small) - .25rem) * 2);border-radius:calc(var(--x-height-small) - .25rem);margin:.125rem 0}.x-switch-small .x-switch-handle{width:calc(var(--x-height-small) - .5rem);height:calc(var(--x-height-small) - .5rem);margin:0 .125rem}.x-switch-small .x-switch-handle:before{border-radius:calc(var(--x-height-small) - .5rem)}.x-switch-small .x-switch-text{margin-left:calc(var(--x-height-small) - .125rem);margin-right:.5rem}.x-switch-small.x-checked .x-switch-handle{left:calc(100% - (var(--x-height-small) - .5rem) - .25rem)}.x-switch-small.x-checked .x-switch-text{margin-left:.5rem;margin-right:calc(var(--x-height-small) - .25rem)}.x-switch-small .x-switch-spinner{width:calc(var(--x-height-small) - .5rem);height:calc(var(--x-height-small) - .5rem)}.x-switch-small .x-loading-small .x-loading-circular{width:calc(var(--x-height-small) - .625rem);height:calc(var(--x-height-small) - .625rem)}.x-switch-mini>label{height:var(--x-height-mini);line-height:var(--x-height-mini)}.x-switch-mini .x-switch-slider{height:calc(var(--x-height-mini) - .25rem);min-width:calc((var(--x-height-mini) - .25rem) * 2);border-radius:calc(var(--x-height-mini) - .25rem);margin:.125rem 0}.x-switch-mini .x-switch-handle{width:calc(var(--x-height-mini) - .5rem);height:calc(var(--x-height-mini) - .5rem);margin:0 .125rem}.x-switch-mini .x-switch-handle:before{border-radius:calc(var(--x-height-mini) - .5rem)}.x-switch-mini .x-switch-text{margin-left:calc(var(--x-height-mini) - .125rem);margin-right:.5rem}.x-switch-mini.x-checked .x-switch-handle{left:calc(100% - (var(--x-height-mini) - .5rem) - .25rem)}.x-switch-mini.x-checked .x-switch-text{margin-left:.5rem;margin-right:calc(var(--x-height-mini) - .25rem)}.x-switch-mini .x-switch-spinner{width:calc(var(--x-height-mini) - .5rem);height:calc(var(--x-height-mini) - .5rem)}.x-switch-mini .x-loading-mini .x-loading-circular{width:calc(var(--x-height-mini) - .625rem);height:calc(var(--x-height-mini) - .625rem)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.XLoadingComponent, selector: "x-loading, [x-loading]" }, { kind: "directive", type: i4.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
62
105
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XSwitchComponent, decorators: [{
63
106
  type: Component,
64
- args: [{ selector: `${XSwitchPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XSwitchComponent)], template: "<div #switch class=\"x-switch\" [class.x-flex]=\"justify || align || direction\" [class.x-checked]=\"value\" [class.x-disabled]=\"disabled\">\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()\"></div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.x-switch{margin:0;padding:0;width:100%}.x-switch.x-flex{display:flex}.x-switch.x-justify-start{justify-content:flex-start}.x-switch.x-justify-center{justify-content:center}.x-switch.x-justify-end{justify-content:flex-end}.x-switch.x-justify-space-between{justify-content:space-between}.x-switch.x-justify-space-around{justify-content:space-around}.x-switch.x-align-start{align-items:flex-start}.x-switch.x-align-center{align-items:center}.x-switch.x-align-end{align-items:flex-end}.x-switch.x-direction-column{flex-direction:column}.x-switch.x-direction-column-reverse{flex-direction:column-reverse}.x-switch.x-direction-row{flex-direction:row}.x-switch.x-direction-row-reverse{flex-direction:row-reverse}.x-switch>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-switch>label.x-text-align-start{text-align:start}.x-switch>label.x-text-align-center{text-align:center}.x-switch>label.x-text-align-end{text-align:end}.x-switch-row{flex:1;display:flex;align-items:center;position:relative;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-switch-slider{margin:calc((calc(var(--x-font-size) + .875rem) - 1.25rem) / 2) 0;display:inline-flex;align-items:center;position:relative;width:2.5rem;height:1.25rem;border:var(--x-border-width) solid var(--x-info);border-radius:1.25rem;background-color:var(--x-info);cursor:pointer;transition:border-color .3s,background-color .3s}.x-switch-slider:after{position:absolute;box-shadow:0 calc(var(--x-border-width) * 2) calc(var(--x-border-width) * 4) 0 #00230b33;width:calc(1.25rem - calc(var(--x-border-width) * 4));height:calc(1.25rem - calc(var(--x-border-width) * 4));margin:0 calc(var(--x-border-width) * 2);background-color:var(--x-background-a100);border-radius:calc(1.25rem - calc(var(--x-border-width) * 4));cursor:pointer;left:0;transition:all .36s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-switch.x-checked .x-switch-slider{background-color:var(--x-primary);border-color:var(--x-primary)}.x-switch.x-checked .x-switch-slider:after{left:calc(1.25rem - calc(var(--x-border-width) * 2))}.x-switch.x-required>label{color:var(--x-danger)}.x-switch.x-disabled .x-switch-slider{cursor:not-allowed;background-color:var(--x-info-500);border-color:var(--x-info-500)}.x-switch.x-disabled.x-checked .x-switch-slider{background-color:var(--x-primary-500);border-color:var(--x-primary-500)}.x-switch.x-direction-row>label{padding:0 .5rem 0 0}.x-switch.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-switch.x-direction-column,.x-switch.x-direction-column-reverse{align-items:inherit}\n"] }]
107
+ args: [{ selector: `${XSwitchPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XSwitchComponent)], template: "<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", styles: ["@charset \"UTF-8\";.x-switch{margin:0;padding:0;width:100%}.x-switch.x-flex{display:flex}.x-switch.x-justify-start{justify-content:flex-start}.x-switch.x-justify-center{justify-content:center}.x-switch.x-justify-end{justify-content:flex-end}.x-switch.x-justify-space-between{justify-content:space-between}.x-switch.x-justify-space-around{justify-content:space-around}.x-switch.x-align-start{align-items:flex-start}.x-switch.x-align-center{align-items:center}.x-switch.x-align-end{align-items:flex-end}.x-switch.x-direction-column{flex-direction:column}.x-switch.x-direction-column-reverse{flex-direction:column-reverse}.x-switch.x-direction-row{flex-direction:row}.x-switch.x-direction-row-reverse{flex-direction:row-reverse}.x-switch>label{display:inline-block;white-space:nowrap;position:relative;color:var(--x-text-300);font-weight:600}.x-switch>label.x-text-align-start{text-align:start}.x-switch>label.x-text-align-center{text-align:center}.x-switch>label.x-text-align-end{text-align:end}.x-switch-row{flex:1;display:flex;align-items:center;position:relative;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-switch-slider{display:inline-flex;align-items:center;position:relative;border:var(--x-border-width) solid var(--x-info);background-color:var(--x-info);cursor:pointer;transition:var(--x-animation-duration-slow)}.x-switch-handle{position:absolute;transition:var(--x-animation-duration-slow);left:0;display:block}.x-switch-handle:before{position:absolute;inset:0;box-shadow:0 .125rem .25rem #00230b33;background-color:var(--x-background-a100);content:\"\"}.x-switch-spinner .x-loading{background-color:transparent}.x-switch-spinner .x-loading-spinner{display:flex;align-items:center}.x-switch-text{color:var(--x-white);transition:var(--x-animation-duration-slow)}.x-switch.x-checked .x-switch-slider{background-color:var(--x-primary);border-color:var(--x-primary)}.x-switch.x-required>label{color:var(--x-danger)}.x-switch.x-disabled .x-switch-slider,.x-switch-loading .x-switch-slider{cursor:not-allowed;background-color:var(--x-info-500);border-color:var(--x-info-500)}.x-switch.x-disabled.x-checked .x-switch-slider,.x-switch-loading.x-checked .x-switch-slider{background-color:var(--x-primary-500);border-color:var(--x-primary-500)}.x-switch.x-direction-row>label{padding:0 .5rem 0 0}.x-switch.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-switch.x-direction-column,.x-switch.x-direction-column-reverse{align-items:inherit}.x-switch-big>label{height:var(--x-height-big);line-height:var(--x-height-big)}.x-switch-big .x-switch-slider{height:calc(var(--x-height-big) - .25rem);min-width:calc((var(--x-height-big) - .25rem) * 2);border-radius:calc(var(--x-height-big) - .25rem);margin:.125rem 0}.x-switch-big .x-switch-handle{width:calc(var(--x-height-big) - .5rem);height:calc(var(--x-height-big) - .5rem);margin:0 .125rem}.x-switch-big .x-switch-handle:before{border-radius:calc(var(--x-height-big) - .5rem)}.x-switch-big .x-switch-text{margin-left:calc(var(--x-height-big) - .125rem);margin-right:.5rem}.x-switch-big.x-checked .x-switch-handle{left:calc(100% - (var(--x-height-big) - .5rem) - .25rem)}.x-switch-big.x-checked .x-switch-text{margin-left:.5rem;margin-right:calc(var(--x-height-big) - .25rem)}.x-switch-big .x-switch-spinner{width:calc(var(--x-height-big) - .5rem);height:calc(var(--x-height-big) - .5rem)}.x-switch-big .x-loading-big .x-loading-circular{width:calc(var(--x-height-big) - .625rem);height:calc(var(--x-height-big) - .625rem)}.x-switch-large>label{height:var(--x-height-large);line-height:var(--x-height-large)}.x-switch-large .x-switch-slider{height:calc(var(--x-height-large) - .25rem);min-width:calc((var(--x-height-large) - .25rem) * 2);border-radius:calc(var(--x-height-large) - .25rem);margin:.125rem 0}.x-switch-large .x-switch-handle{width:calc(var(--x-height-large) - .5rem);height:calc(var(--x-height-large) - .5rem);margin:0 .125rem}.x-switch-large .x-switch-handle:before{border-radius:calc(var(--x-height-large) - .5rem)}.x-switch-large .x-switch-text{margin-left:calc(var(--x-height-large) - .125rem);margin-right:.5rem}.x-switch-large.x-checked .x-switch-handle{left:calc(100% - (var(--x-height-large) - .5rem) - .25rem)}.x-switch-large.x-checked .x-switch-text{margin-left:.5rem;margin-right:calc(var(--x-height-large) - .25rem)}.x-switch-large .x-switch-spinner{width:calc(var(--x-height-large) - .5rem);height:calc(var(--x-height-large) - .5rem)}.x-switch-large .x-loading-large .x-loading-circular{width:calc(var(--x-height-large) - .625rem);height:calc(var(--x-height-large) - .625rem)}.x-switch-medium>label{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-switch-medium .x-switch-slider{height:calc(var(--x-height-medium) - .25rem);min-width:calc((var(--x-height-medium) - .25rem) * 2);border-radius:calc(var(--x-height-medium) - .25rem);margin:.125rem 0}.x-switch-medium .x-switch-handle{width:calc(var(--x-height-medium) - .5rem);height:calc(var(--x-height-medium) - .5rem);margin:0 .125rem}.x-switch-medium .x-switch-handle:before{border-radius:calc(var(--x-height-medium) - .5rem)}.x-switch-medium .x-switch-text{margin-left:calc(var(--x-height-medium) - .125rem);margin-right:.5rem}.x-switch-medium.x-checked .x-switch-handle{left:calc(100% - (var(--x-height-medium) - .5rem) - .25rem)}.x-switch-medium.x-checked .x-switch-text{margin-left:.5rem;margin-right:calc(var(--x-height-medium) - .25rem)}.x-switch-medium .x-switch-spinner{width:calc(var(--x-height-medium) - .5rem);height:calc(var(--x-height-medium) - .5rem)}.x-switch-medium .x-loading-medium .x-loading-circular{width:calc(var(--x-height-medium) - .625rem);height:calc(var(--x-height-medium) - .625rem)}.x-switch-small>label{height:var(--x-height-small);line-height:var(--x-height-small)}.x-switch-small .x-switch-slider{height:calc(var(--x-height-small) - .25rem);min-width:calc((var(--x-height-small) - .25rem) * 2);border-radius:calc(var(--x-height-small) - .25rem);margin:.125rem 0}.x-switch-small .x-switch-handle{width:calc(var(--x-height-small) - .5rem);height:calc(var(--x-height-small) - .5rem);margin:0 .125rem}.x-switch-small .x-switch-handle:before{border-radius:calc(var(--x-height-small) - .5rem)}.x-switch-small .x-switch-text{margin-left:calc(var(--x-height-small) - .125rem);margin-right:.5rem}.x-switch-small.x-checked .x-switch-handle{left:calc(100% - (var(--x-height-small) - .5rem) - .25rem)}.x-switch-small.x-checked .x-switch-text{margin-left:.5rem;margin-right:calc(var(--x-height-small) - .25rem)}.x-switch-small .x-switch-spinner{width:calc(var(--x-height-small) - .5rem);height:calc(var(--x-height-small) - .5rem)}.x-switch-small .x-loading-small .x-loading-circular{width:calc(var(--x-height-small) - .625rem);height:calc(var(--x-height-small) - .625rem)}.x-switch-mini>label{height:var(--x-height-mini);line-height:var(--x-height-mini)}.x-switch-mini .x-switch-slider{height:calc(var(--x-height-mini) - .25rem);min-width:calc((var(--x-height-mini) - .25rem) * 2);border-radius:calc(var(--x-height-mini) - .25rem);margin:.125rem 0}.x-switch-mini .x-switch-handle{width:calc(var(--x-height-mini) - .5rem);height:calc(var(--x-height-mini) - .5rem);margin:0 .125rem}.x-switch-mini .x-switch-handle:before{border-radius:calc(var(--x-height-mini) - .5rem)}.x-switch-mini .x-switch-text{margin-left:calc(var(--x-height-mini) - .125rem);margin-right:.5rem}.x-switch-mini.x-checked .x-switch-handle{left:calc(100% - (var(--x-height-mini) - .5rem) - .25rem)}.x-switch-mini.x-checked .x-switch-text{margin-left:.5rem;margin-right:calc(var(--x-height-mini) - .25rem)}.x-switch-mini .x-switch-spinner{width:calc(var(--x-height-mini) - .5rem);height:calc(var(--x-height-mini) - .5rem)}.x-switch-mini .x-loading-mini .x-loading-circular{width:calc(var(--x-height-mini) - .625rem);height:calc(var(--x-height-mini) - .625rem)}\n"] }]
65
108
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }]; }, propDecorators: { switch: [{
66
109
  type: ViewChild,
67
110
  args: ['switch', { static: true }]
@@ -70,14 +113,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
70
113
  class XSwitchModule {
71
114
  }
72
115
  /** @nocollapse */ XSwitchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
73
- /** @nocollapse */ XSwitchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0", ngImport: i0, type: XSwitchModule, declarations: [XSwitchComponent, XSwitchProperty], imports: [CommonModule, FormsModule, ReactiveFormsModule, XBaseFormModule], exports: [XSwitchComponent] });
74
- /** @nocollapse */ XSwitchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XSwitchModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, XBaseFormModule] });
116
+ /** @nocollapse */ XSwitchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0", ngImport: i0, type: XSwitchModule, declarations: [XSwitchComponent, XSwitchProperty], imports: [CommonModule, FormsModule, ReactiveFormsModule, XBaseFormModule, XLoadingModule, XOutletModule], exports: [XSwitchComponent] });
117
+ /** @nocollapse */ XSwitchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XSwitchModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, XBaseFormModule, XLoadingModule, XOutletModule] });
75
118
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XSwitchModule, decorators: [{
76
119
  type: NgModule,
77
120
  args: [{
78
121
  declarations: [XSwitchComponent, XSwitchProperty],
79
122
  exports: [XSwitchComponent],
80
- imports: [CommonModule, FormsModule, ReactiveFormsModule, XBaseFormModule]
123
+ imports: [CommonModule, FormsModule, ReactiveFormsModule, XBaseFormModule, XLoadingModule, XOutletModule]
81
124
  }]
82
125
  }] });
83
126
 
@@ -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 } from '@angular/core';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\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\n\r\n/**\r\n * Switch Property\r\n */\r\n@Component({ template: '' })\r\nexport class XSwitchProperty extends XControlValueAccessor<boolean> implements XSwitchOption {}\r\n\r\n/**\r\n * Switch Option\r\n * @undocument true\r\n */\r\nexport interface XSwitchOption extends XFormOption {}\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} from '@angular/core';\r\nimport { XSwitchProperty, XSwitchPrefix } from './switch.property';\r\nimport { XClearClass, XConfigService } 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 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.labelMap);\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) 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 #switch class=\"x-switch\" [class.x-flex]=\"justify || align || direction\" [class.x-checked]=\"value\" [class.x-disabled]=\"disabled\">\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()\"></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\n\r\n@NgModule({\r\n declarations: [XSwitchComponent, XSwitchProperty],\r\n exports: [XSwitchComponent],\r\n imports: [CommonModule, FormsModule, ReactiveFormsModule, XBaseFormModule]\r\n})\r\nexport class XSwitchModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;;AAIG;AACI,MAAM,aAAa,GAAG,WAAW;AAExC;;AAEG;AAEG,MAAO,eAAgB,SAAQ,qBAA8B,CAAA;;+HAAtD,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,mBAAA,eAAA,CAAA,IAAA,G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BAC3B,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,CAAC;iBAC3E,CAAA;;;ACXD;;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({ 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;AAEG,MAAO,eAAgB,SAAQ,qBAA8B,CAAA;AADnE,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACuB,QAAA,IAAO,CAAA,OAAA,GAAa,KAAK,CAAC;AACpD;;;AAGG;AACuB,QAAA,IAAM,CAAA,MAAA,GAAa,KAAK,CAAC;KAgBpD;;+HA1BY,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,mBAAA,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,uMADL,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAMG,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;CAA2B,EAAA,eAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAK1B,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;CAA0B,EAAA,eAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKG,UAAA,CAAA;AAA5C,IAAA,WAAW,CAAQ,aAAa,EAAE,QAAQ,CAAC;CAAuB,EAAA,eAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;2FAfjE,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,SAAS;mBAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAA;8BAMC,OAAO,EAAA,CAAA;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A,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;8HAGf,aAAa,EAAA,OAAA,EAAA,CAFd,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAE7F,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;iBAC1G,CAAA;;;ACbD;;AAEG;;;;"}
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, Input, Output, Directive, Inject, ViewEncapsulation, ViewChild, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
3
  import { __decorate } from 'tslib';
4
4
  import * as i1 from '@ng-nest/ui/core';
5
- import { XWithConfig, XInputNumber, XInputBoolean, XProperty, XIsChange, removeNgTag, XIsEmpty, XResize, stripTags, XIsUndefined } from '@ng-nest/ui/core';
5
+ import { XWithConfig, XInputNumber, XInputBoolean, XProperty, XIsChange, removeNgTag, XIsEmpty, XIsFunction, XResize, stripTags, XIsUndefined } from '@ng-nest/ui/core';
6
6
  import * as i3$1 from '@ng-nest/ui/pagination';
7
7
  import { XPaginationProperty, XPaginationModule } from '@ng-nest/ui/pagination';
8
8
  import { takeUntil } from 'rxjs/operators';
@@ -131,10 +131,25 @@ class XTableProperty extends XPaginationProperty {
131
131
  * @en_US The column header is dragging, and the event is triggered when the order is changed
132
132
  */
133
133
  this.columnDropListDropped = new EventEmitter();
134
+ /**
135
+ * @zh_CN 开始拖动列宽的事件
136
+ * @en_US Event to started drag column width
137
+ */
138
+ this.columnDragWidthStarted = new EventEmitter();
139
+ /**
140
+ * @zh_CN 正在拖动列宽时的事件
141
+ * @en_US Event to moved drag column width
142
+ */
143
+ this.columnDragWidthMoved = new EventEmitter();
144
+ /**
145
+ * @zh_CN 结束拖动列宽的事件
146
+ * @en_US Event to ended drag column width
147
+ */
148
+ this.columnDragWidthEnded = new EventEmitter();
134
149
  }
135
150
  }
136
151
  /** @nocollapse */ XTableProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTableProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
137
- /** @nocollapse */ XTableProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XTableProperty, selector: "ng-component", 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" }, outputs: { activatedRowChange: "activatedRowChange", sortChange: "sortChange", headCheckboxChange: "headCheckboxChange", manualChange: "manualChange", columnDragStarted: "columnDragStarted", columnDragEnded: "columnDragEnded", columnDropListDropped: "columnDropListDropped" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
152
+ /** @nocollapse */ XTableProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", type: XTableProperty, selector: "ng-component", 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" }, outputs: { activatedRowChange: "activatedRowChange", sortChange: "sortChange", headCheckboxChange: "headCheckboxChange", manualChange: "manualChange", columnDragStarted: "columnDragStarted", columnDragEnded: "columnDragEnded", columnDropListDropped: "columnDropListDropped", columnDragWidthStarted: "columnDragWidthStarted", columnDragWidthMoved: "columnDragWidthMoved", columnDragWidthEnded: "columnDragWidthEnded" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
138
153
  __decorate([
139
154
  XWithConfig(X_CONFIG_NAME, 42),
140
155
  XInputNumber()
@@ -302,6 +317,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
302
317
  type: Output
303
318
  }], columnDropListDropped: [{
304
319
  type: Output
320
+ }], columnDragWidthStarted: [{
321
+ type: Output
322
+ }], columnDragWidthMoved: [{
323
+ type: Output
324
+ }], columnDragWidthEnded: [{
325
+ type: Output
305
326
  }] } });
306
327
  /**
307
328
  * Table Head
@@ -525,7 +546,9 @@ class XDragDirective {
525
546
  constructor(elementRef, document, renderer) {
526
547
  this.elementRef = elementRef;
527
548
  this.renderer = renderer;
528
- this.draging = new EventEmitter();
549
+ this.dragStarted = new EventEmitter();
550
+ this.dragMoved = new EventEmitter();
551
+ this.dragEnded = new EventEmitter();
529
552
  this._unSubject = new Subject();
530
553
  this.doc = document;
531
554
  }
@@ -539,6 +562,7 @@ class XDragDirective {
539
562
  const _unSub = new Subject();
540
563
  this.renderer.setStyle(this.doc.documentElement, 'cursor', 'ew-resize');
541
564
  this.renderer.setStyle(this.doc.documentElement, 'user-select', 'none');
565
+ this.dragStarted.emit({ x, y });
542
566
  fromEvent(this.doc.documentElement, 'mousemove')
543
567
  .pipe(takeUntil(_unSub))
544
568
  .subscribe((moveMe) => {
@@ -546,13 +570,14 @@ class XDragDirective {
546
570
  offsetY = moveMe.pageY - y;
547
571
  x = moveMe.pageX;
548
572
  y = moveMe.pageY;
549
- this.draging.emit({ x: offsetX, y: offsetY });
573
+ this.dragMoved.emit({ x, y, offsetX, offsetY });
550
574
  });
551
575
  fromEvent(this.doc.documentElement, 'mouseup')
552
576
  .pipe(takeUntil(_unSub))
553
577
  .subscribe(() => {
554
578
  this.renderer.removeStyle(this.doc.documentElement, 'cursor');
555
579
  this.renderer.removeStyle(this.doc.documentElement, 'user-select');
580
+ this.dragEnded.emit({ x, y });
556
581
  _unSub.next();
557
582
  _unSub.complete();
558
583
  });
@@ -577,7 +602,7 @@ class XDragDirective {
577
602
  }
578
603
  }
579
604
  /** @nocollapse */ XDragDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XDragDirective, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
580
- /** @nocollapse */ XDragDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: XDragDirective, selector: "[xDrag]", outputs: { draging: "draging" }, ngImport: i0 });
605
+ /** @nocollapse */ XDragDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0", type: XDragDirective, selector: "[xDrag]", outputs: { dragStarted: "dragStarted", dragMoved: "dragMoved", dragEnded: "dragEnded" }, ngImport: i0 });
581
606
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XDragDirective, decorators: [{
582
607
  type: Directive,
583
608
  args: [{ selector: '[xDrag]' }]
@@ -586,7 +611,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
586
611
  type: Inject,
587
612
  args: [DOCUMENT]
588
613
  }] }, { type: i0.Renderer2 }];
589
- }, propDecorators: { draging: [{
614
+ }, propDecorators: { dragStarted: [{
615
+ type: Output
616
+ }], dragMoved: [{
617
+ type: Output
618
+ }], dragEnded: [{
590
619
  type: Output
591
620
  }] } });
592
621
 
@@ -693,15 +722,31 @@ class XTableHeadComponent extends XTableHeadProperty {
693
722
  this.table.resetScroll(false, true);
694
723
  this.cdr.detectChanges();
695
724
  }
696
- dragWidth(dis, column) {
725
+ dragWidthMoved(position, column) {
697
726
  if (column.width) {
698
- column.width += dis.x;
727
+ column.width += position.offsetX;
699
728
  if (column.width < 60)
700
729
  column.width = 60;
730
+ XIsFunction(column.dragWidthMoved) && column.dragWidthMoved({ position, column });
731
+ this.table.columnDragWidthMoved.emit({ position, column });
701
732
  this.cdr.detectChanges();
702
733
  this.table.bodyChange();
703
734
  }
704
735
  }
736
+ dragWidthStarted(position, column) {
737
+ column.draggingWidth = true;
738
+ if (column.width && XIsFunction(column.dragWidthStarted)) {
739
+ column.dragWidthStarted({ position, column });
740
+ this.table.columnDragWidthStarted.emit({ position, column });
741
+ }
742
+ }
743
+ dragWidthEnded(position, column) {
744
+ column.draggingWidth = false;
745
+ if (column.width && XIsFunction(column.dragWidthEnded)) {
746
+ column.dragWidthEnded({ position, column });
747
+ this.table.columnDragWidthEnded.emit({ position, column });
748
+ }
749
+ }
705
750
  dropListDropped(_event) {
706
751
  this.dragChange();
707
752
  this.table.columnDropListDropped.emit(this.columns);
@@ -737,10 +782,10 @@ class XTableHeadComponent extends XTableHeadProperty {
737
782
  }
738
783
  }
739
784
  /** @nocollapse */ XTableHeadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTableHeadComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
740
- /** @nocollapse */ XTableHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", 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 #thead [ngStyle]=\"theadStyle\" [class.x-table-head-top]=\"position === 'top'\" [class.x-table-head-bottom]=\"position === 'bottom'\">\r\n <ng-container *ngIf=\"cellConfig; else columnsTpl\">\r\n <tr [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\" [style.min-height.px]=\"getRowHeight\">\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 *ngIf=\"column.dragWidth\" class=\"x-table-drag-width\" xDrag (draging)=\"dragWidth($event, column)\"></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 columns; trackBy: trackByItem\"\r\n cdkDrag\r\n [cdkDragDisabled]=\"!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 *ngTemplateOutlet=\"table.headSearchTpl; context: { $column: column }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n <div *ngIf=\"column.dragWidth\" class=\"x-table-drag-width\" xDrag (draging)=\"dragWidth($event, column)\"></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 [indeterminate]=\"table.checkedValues[column.id + table.indeterminate]\"\r\n ></x-checkbox>\r\n <ng-container *ngIf=\"!column.headChecked\">\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'index'\">\r\n <a>{{ column.label }}</a>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></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 [class.x-table-sort]=\"column.sort\" (click)=\"onSort(column)\" [style.text-align]=\"column.textAlign\">\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n {{ column.label }}\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: XDragDirective, selector: "[xDrag]", outputs: ["draging"] }], encapsulation: i0.ViewEncapsulation.None });
785
+ /** @nocollapse */ XTableHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.0", 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 #thead [ngStyle]=\"theadStyle\" [class.x-table-head-top]=\"position === 'top'\" [class.x-table-head-bottom]=\"position === 'bottom'\">\r\n <ng-container *ngIf=\"cellConfig; else columnsTpl\">\r\n <tr [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\" [style.min-height.px]=\"getRowHeight\">\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 xDrag\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 columns; 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 *ngTemplateOutlet=\"table.headSearchTpl; context: { $column: column }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\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 xDrag\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 [indeterminate]=\"table.checkedValues[column.id + table.indeterminate]\"\r\n ></x-checkbox>\r\n <ng-container *ngIf=\"!column.headChecked\">\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'index'\">\r\n <a>{{ column.label }}</a>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></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 [class.x-table-sort]=\"column.sort\" (click)=\"onSort(column)\" [style.text-align]=\"column.textAlign\">\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n {{ column.label }}\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: XDragDirective, selector: "[xDrag]", outputs: ["dragStarted", "dragMoved", "dragEnded"] }], encapsulation: i0.ViewEncapsulation.None });
741
786
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: XTableHeadComponent, decorators: [{
742
787
  type: Component,
743
- args: [{ selector: `${XTableHeadPrefix}`, encapsulation: ViewEncapsulation.None, template: "<thead #thead [ngStyle]=\"theadStyle\" [class.x-table-head-top]=\"position === 'top'\" [class.x-table-head-bottom]=\"position === 'bottom'\">\r\n <ng-container *ngIf=\"cellConfig; else columnsTpl\">\r\n <tr [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\" [style.min-height.px]=\"getRowHeight\">\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 *ngIf=\"column.dragWidth\" class=\"x-table-drag-width\" xDrag (draging)=\"dragWidth($event, column)\"></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 columns; trackBy: trackByItem\"\r\n cdkDrag\r\n [cdkDragDisabled]=\"!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 *ngTemplateOutlet=\"table.headSearchTpl; context: { $column: column }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"columnBaseTpl; context: { column: column }\"></ng-container>\r\n <div *ngIf=\"column.dragWidth\" class=\"x-table-drag-width\" xDrag (draging)=\"dragWidth($event, column)\"></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 [indeterminate]=\"table.checkedValues[column.id + table.indeterminate]\"\r\n ></x-checkbox>\r\n <ng-container *ngIf=\"!column.headChecked\">\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'index'\">\r\n <a>{{ column.label }}</a>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></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 [class.x-table-sort]=\"column.sort\" (click)=\"onSort(column)\" [style.text-align]=\"column.textAlign\">\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n {{ column.label }}\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" }]
788
+ args: [{ selector: `${XTableHeadPrefix}`, encapsulation: ViewEncapsulation.None, template: "<thead #thead [ngStyle]=\"theadStyle\" [class.x-table-head-top]=\"position === 'top'\" [class.x-table-head-bottom]=\"position === 'bottom'\">\r\n <ng-container *ngIf=\"cellConfig; else columnsTpl\">\r\n <tr [style.gridTemplateColumns]=\"cellConfig.gridTemplateColumns\" [style.min-height.px]=\"getRowHeight\">\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 xDrag\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 columns; 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 *ngTemplateOutlet=\"table.headSearchTpl; context: { $column: column }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\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 xDrag\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 [indeterminate]=\"table.checkedValues[column.id + table.indeterminate]\"\r\n ></x-checkbox>\r\n <ng-container *ngIf=\"!column.headChecked\">\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'index'\">\r\n <a>{{ column.label }}</a>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"cloumnDefaultTpl; context: { column: column }\"></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 [class.x-table-sort]=\"column.sort\" (click)=\"onSort(column)\" [style.text-align]=\"column.textAlign\">\r\n <ng-container *xOutlet=\"columnTpl[column.id]; context: { $column: column }\">\r\n {{ column.label }}\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" }]
744
789
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }]; }, propDecorators: { thead: [{
745
790
  type: ViewChild,
746
791
  args: ['thead']