@ng-nest/ui 21.0.3 → 21.0.5

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 (190) hide show
  1. package/fesm2022/ng-nest-ui-affix.mjs +12 -12
  2. package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
  3. package/fesm2022/ng-nest-ui-alert.mjs +22 -24
  4. package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
  5. package/fesm2022/ng-nest-ui-anchor.mjs +19 -19
  6. package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
  7. package/fesm2022/ng-nest-ui-api.mjs +7 -7
  8. package/fesm2022/ng-nest-ui-attachments.mjs +22 -22
  9. package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -1
  10. package/fesm2022/ng-nest-ui-auto-complete.mjs +26 -30
  11. package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
  12. package/fesm2022/ng-nest-ui-avatar.mjs +17 -17
  13. package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
  14. package/fesm2022/ng-nest-ui-back-top.mjs +13 -13
  15. package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
  16. package/fesm2022/ng-nest-ui-badge.mjs +16 -16
  17. package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
  18. package/fesm2022/ng-nest-ui-base-form.mjs +15 -14
  19. package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
  20. package/fesm2022/ng-nest-ui-bubble.mjs +157 -145
  21. package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
  22. package/fesm2022/ng-nest-ui-button.mjs +31 -31
  23. package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
  24. package/fesm2022/ng-nest-ui-calendar.mjs +10 -10
  25. package/fesm2022/ng-nest-ui-card.mjs +11 -11
  26. package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
  27. package/fesm2022/ng-nest-ui-carousel.mjs +24 -24
  28. package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
  29. package/fesm2022/ng-nest-ui-cascade.mjs +25 -29
  30. package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
  31. package/fesm2022/ng-nest-ui-checkbox.mjs +22 -22
  32. package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
  33. package/fesm2022/ng-nest-ui-collapse.mjs +22 -22
  34. package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
  35. package/fesm2022/ng-nest-ui-color-picker.mjs +25 -25
  36. package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
  37. package/fesm2022/ng-nest-ui-color.mjs +10 -10
  38. package/fesm2022/ng-nest-ui-comment.mjs +19 -19
  39. package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
  40. package/fesm2022/ng-nest-ui-container.mjs +34 -34
  41. package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
  42. package/fesm2022/ng-nest-ui-core.mjs +18 -18
  43. package/fesm2022/ng-nest-ui-coversations.mjs +11 -11
  44. package/fesm2022/ng-nest-ui-coversations.mjs.map +1 -1
  45. package/fesm2022/ng-nest-ui-crumb.mjs +11 -11
  46. package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
  47. package/fesm2022/ng-nest-ui-date-picker.mjs +87 -87
  48. package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
  49. package/fesm2022/ng-nest-ui-description.mjs +20 -20
  50. package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
  51. package/fesm2022/ng-nest-ui-dialog.mjs +107 -103
  52. package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
  53. package/fesm2022/ng-nest-ui-doc.mjs +7 -7
  54. package/fesm2022/ng-nest-ui-drag.mjs +10 -10
  55. package/fesm2022/ng-nest-ui-drawer.mjs +34 -34
  56. package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
  57. package/fesm2022/ng-nest-ui-dropdown.mjs +23 -23
  58. package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
  59. package/fesm2022/ng-nest-ui-empty.mjs +10 -10
  60. package/fesm2022/ng-nest-ui-examples.mjs +7 -7
  61. package/fesm2022/ng-nest-ui-find.mjs +31 -35
  62. package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
  63. package/fesm2022/ng-nest-ui-form.mjs +36 -24
  64. package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
  65. package/fesm2022/ng-nest-ui-highlight.mjs +14 -14
  66. package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
  67. package/fesm2022/ng-nest-ui-i18n.mjs +32 -31
  68. package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
  69. package/fesm2022/ng-nest-ui-icon.mjs +14 -14
  70. package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
  71. package/fesm2022/ng-nest-ui-image.mjs +55 -43
  72. package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
  73. package/fesm2022/ng-nest-ui-inner.mjs +11 -11
  74. package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
  75. package/fesm2022/ng-nest-ui-input-number.mjs +21 -21
  76. package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
  77. package/fesm2022/ng-nest-ui-input.mjs +48 -42
  78. package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
  79. package/fesm2022/ng-nest-ui-keyword.mjs +11 -11
  80. package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
  81. package/fesm2022/ng-nest-ui-layout.mjs +25 -25
  82. package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
  83. package/fesm2022/ng-nest-ui-link.mjs +13 -13
  84. package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
  85. package/fesm2022/ng-nest-ui-list.mjs +44 -41
  86. package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
  87. package/fesm2022/ng-nest-ui-loading.mjs +14 -14
  88. package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
  89. package/fesm2022/ng-nest-ui-menu.mjs +37 -25
  90. package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
  91. package/fesm2022/ng-nest-ui-message-box.mjs +10 -10
  92. package/fesm2022/ng-nest-ui-message-box.mjs.map +1 -1
  93. package/fesm2022/ng-nest-ui-message.mjs +10 -10
  94. package/fesm2022/ng-nest-ui-message.mjs.map +1 -1
  95. package/fesm2022/ng-nest-ui-notification.mjs +10 -10
  96. package/fesm2022/ng-nest-ui-notification.mjs.map +1 -1
  97. package/fesm2022/ng-nest-ui-outlet.mjs +7 -7
  98. package/fesm2022/ng-nest-ui-page-header.mjs +10 -10
  99. package/fesm2022/ng-nest-ui-pagination.mjs +27 -31
  100. package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
  101. package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
  102. package/fesm2022/ng-nest-ui-popconfirm.mjs +14 -14
  103. package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
  104. package/fesm2022/ng-nest-ui-popover.mjs +19 -19
  105. package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
  106. package/fesm2022/ng-nest-ui-portal.mjs +7 -7
  107. package/fesm2022/ng-nest-ui-progress.mjs +22 -22
  108. package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
  109. package/fesm2022/ng-nest-ui-prompts.mjs +12 -12
  110. package/fesm2022/ng-nest-ui-prompts.mjs.map +1 -1
  111. package/fesm2022/ng-nest-ui-radio.mjs +20 -20
  112. package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
  113. package/fesm2022/ng-nest-ui-rate.mjs +15 -15
  114. package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
  115. package/fesm2022/ng-nest-ui-resizable.mjs +14 -14
  116. package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
  117. package/fesm2022/ng-nest-ui-result.mjs +10 -10
  118. package/fesm2022/ng-nest-ui-ripple.mjs +12 -12
  119. package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
  120. package/fesm2022/ng-nest-ui-scrollable.mjs +32 -12
  121. package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
  122. package/fesm2022/ng-nest-ui-select.mjs +35 -39
  123. package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
  124. package/fesm2022/ng-nest-ui-sender.mjs +19 -19
  125. package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
  126. package/fesm2022/ng-nest-ui-skeleton.mjs +13 -13
  127. package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
  128. package/fesm2022/ng-nest-ui-slider-select.mjs +21 -21
  129. package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
  130. package/fesm2022/ng-nest-ui-slider.mjs +16 -18
  131. package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
  132. package/fesm2022/ng-nest-ui-statistic.mjs +16 -16
  133. package/fesm2022/ng-nest-ui-steps.mjs +14 -14
  134. package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
  135. package/fesm2022/ng-nest-ui-suggestion.mjs +17 -17
  136. package/fesm2022/ng-nest-ui-suggestion.mjs.map +1 -1
  137. package/fesm2022/ng-nest-ui-switch.mjs +15 -15
  138. package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
  139. package/fesm2022/ng-nest-ui-table-view.mjs +311 -277
  140. package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
  141. package/fesm2022/ng-nest-ui-table.mjs +107 -117
  142. package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
  143. package/fesm2022/ng-nest-ui-tabs.mjs +38 -40
  144. package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
  145. package/fesm2022/ng-nest-ui-tag.mjs +16 -16
  146. package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
  147. package/fesm2022/ng-nest-ui-text-retract.mjs +11 -11
  148. package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
  149. package/fesm2022/ng-nest-ui-textarea.mjs +19 -19
  150. package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
  151. package/fesm2022/ng-nest-ui-theme.mjs +12 -12
  152. package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
  153. package/fesm2022/ng-nest-ui-thought-chain.mjs +12 -12
  154. package/fesm2022/ng-nest-ui-thought-chain.mjs.map +1 -1
  155. package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
  156. package/fesm2022/ng-nest-ui-time-picker.mjs +28 -28
  157. package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
  158. package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
  159. package/fesm2022/ng-nest-ui-timeline.mjs +12 -12
  160. package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
  161. package/fesm2022/ng-nest-ui-tooltip.mjs +17 -17
  162. package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
  163. package/fesm2022/ng-nest-ui-transfer.mjs +14 -14
  164. package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
  165. package/fesm2022/ng-nest-ui-tree-file.mjs +17 -17
  166. package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
  167. package/fesm2022/ng-nest-ui-tree-select.mjs +36 -42
  168. package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
  169. package/fesm2022/ng-nest-ui-tree.mjs +80 -64
  170. package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
  171. package/fesm2022/ng-nest-ui-typography.mjs +10 -10
  172. package/fesm2022/ng-nest-ui-upload.mjs +24 -24
  173. package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
  174. package/fesm2022/ng-nest-ui-welcome.mjs +10 -10
  175. package/package.json +1 -1
  176. package/types/ng-nest-ui-bubble.d.ts +12 -7
  177. package/types/ng-nest-ui-dialog.d.ts +170 -102
  178. package/types/ng-nest-ui-form.d.ts +15 -3
  179. package/types/ng-nest-ui-i18n.d.ts +29 -28
  180. package/types/ng-nest-ui-image.d.ts +28 -13
  181. package/types/ng-nest-ui-input.d.ts +1 -0
  182. package/types/ng-nest-ui-list.d.ts +31 -20
  183. package/types/ng-nest-ui-menu.d.ts +15 -3
  184. package/types/ng-nest-ui-message-box.d.ts +16 -3
  185. package/types/ng-nest-ui-message.d.ts +15 -3
  186. package/types/ng-nest-ui-notification.d.ts +15 -3
  187. package/types/ng-nest-ui-scrollable.d.ts +10 -2
  188. package/types/ng-nest-ui-table-view.d.ts +99 -65
  189. package/types/ng-nest-ui-table.d.ts +60 -5
  190. package/types/ng-nest-ui-tree.d.ts +29 -3
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, Component, booleanAttribute, Directive, signal, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, ElementRef, viewChild, contentChild, contentChildren, Input, HostListener, NgModule } from '@angular/core';
3
- import { CdkTable, CdkHeaderRowDef, CdkFooterRowDef, CdkRowDef, CdkHeaderRow, CdkCellOutlet, CdkFooterRow, CdkRow, CdkNoDataRow, HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet, CDK_TABLE, STICKY_POSITIONING_LISTENER, CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDef, CdkHeaderCell, CdkFooterCell, CdkCell, CdkTextColumn, CdkTableModule } from '@angular/cdk/table';
2
+ import { Injectable, InjectionToken, Directive, Input, inject, ElementRef, HostListener, HostBinding, booleanAttribute, signal, ViewEncapsulation, ChangeDetectionStrategy, Component, viewChild, contentChild, contentChildren, NgModule } from '@angular/core';
3
+ import { CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDef, CdkHeaderCell, CdkFooterCell, CdkCell, CdkHeaderRowDef, CdkFooterRowDef, CdkRowDef, CdkHeaderRow, CdkCellOutlet, CdkFooterRow, CdkRow, CdkNoDataRow, CdkTable, HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet, CDK_TABLE, STICKY_POSITIONING_LISTENER, CdkTextColumn, CdkTableModule } from '@angular/cdk/table';
4
4
  import { _DisposeViewRepeaterStrategy, _VIEW_REPEATER_STRATEGY } from '@angular/cdk/collections';
5
5
  import { XConfigService } from '@ng-nest/ui/core';
6
6
 
@@ -12,42 +12,246 @@ class XTableViewService {
12
12
  this.activedHeaderCells = [];
13
13
  this.stickyHeaderRows = [];
14
14
  }
15
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
16
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewService }); }
15
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
16
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewService }); }
17
17
  }
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewService, decorators: [{
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewService, decorators: [{
19
19
  type: Injectable
20
20
  }] });
21
21
 
22
- /**
23
- * Table view
24
- * @selector x-table-view
25
- * @decorator component
26
- */
27
- const XTableViewPrefix = 'x-table-view';
28
- const X_TABLE_VIEW_CONFIG_NAME = 'tableView';
29
- /**
30
- * Table view Property
31
- */
32
- class XTableViewProperty extends CdkTable {
22
+ const X_TABLE_VIEW_CONTEXT = new InjectionToken('X_TABLE_VIEW_CONTEXT');
23
+
24
+ class XTableViewCellDef extends CdkCellDef {
25
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
26
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: XTableViewCellDef, isStandalone: true, selector: "[xTableCellDef]", providers: [{ provide: CdkCellDef, useExisting: XTableViewCellDef }], usesInheritance: true, ngImport: i0 }); }
27
+ }
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewCellDef, decorators: [{
29
+ type: Directive,
30
+ args: [{
31
+ selector: '[xTableCellDef]',
32
+ providers: [{ provide: CdkCellDef, useExisting: XTableViewCellDef }]
33
+ }]
34
+ }] });
35
+ class XTableHeaderCellDef extends CdkHeaderCellDef {
36
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableHeaderCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
37
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: XTableHeaderCellDef, isStandalone: true, selector: "[xTableHeaderCellDef]", providers: [{ provide: CdkHeaderCellDef, useExisting: XTableHeaderCellDef }], usesInheritance: true, ngImport: i0 }); }
38
+ }
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableHeaderCellDef, decorators: [{
40
+ type: Directive,
41
+ args: [{
42
+ selector: '[xTableHeaderCellDef]',
43
+ providers: [{ provide: CdkHeaderCellDef, useExisting: XTableHeaderCellDef }]
44
+ }]
45
+ }] });
46
+ class XTableFooterCellDef extends CdkFooterCellDef {
47
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableFooterCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
48
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: XTableFooterCellDef, isStandalone: true, selector: "[xTableFooterCellDef]", providers: [{ provide: CdkFooterCellDef, useExisting: XTableFooterCellDef }], usesInheritance: true, ngImport: i0 }); }
49
+ }
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableFooterCellDef, decorators: [{
51
+ type: Directive,
52
+ args: [{
53
+ selector: '[xTableFooterCellDef]',
54
+ providers: [{ provide: CdkFooterCellDef, useExisting: XTableFooterCellDef }]
55
+ }]
56
+ }] });
57
+ class XTableColumnDef extends CdkColumnDef {
58
+ get name() {
59
+ return this._name;
60
+ }
61
+ set name(name) {
62
+ this._setNameInput(name);
63
+ }
64
+ _updateColumnCssClassName() {
65
+ super._updateColumnCssClassName();
66
+ this._columnCssClassName.push(`x-table-column-${this.cssClassFriendlyName}`);
67
+ }
68
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableColumnDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
69
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: XTableColumnDef, isStandalone: true, selector: "[xTableColumnDef]", inputs: { name: ["xTableColumnDef", "name"] }, providers: [{ provide: CdkColumnDef, useExisting: XTableColumnDef }], usesInheritance: true, ngImport: i0 }); }
70
+ }
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableColumnDef, decorators: [{
72
+ type: Directive,
73
+ args: [{
74
+ selector: '[xTableColumnDef]',
75
+ providers: [{ provide: CdkColumnDef, useExisting: XTableColumnDef }]
76
+ }]
77
+ }], propDecorators: { name: [{
78
+ type: Input,
79
+ args: ['xTableColumnDef']
80
+ }] } });
81
+ class XTableHeaderCell extends CdkHeaderCell {
33
82
  constructor() {
34
83
  super(...arguments);
35
- this.config = inject(XConfigService).getConfigForComponent(X_TABLE_VIEW_CONFIG_NAME);
84
+ this.tableViewService = inject(XTableViewService, { optional: true });
85
+ this.tableView = inject(X_TABLE_VIEW_CONTEXT, { optional: true });
86
+ this.elementRef = inject(ElementRef);
87
+ }
88
+ get isActived() {
89
+ return this.tableViewService.activedHeaderCells.includes(this);
90
+ }
91
+ onClick() {
92
+ this.tableViewService.activedHeaderCells = [this];
93
+ const headerCells = this.tableView?.getHeaderCells() ?? [];
94
+ const index = headerCells.indexOf(this);
95
+ const cells = this.tableView?.getCells() ?? [];
96
+ const columnsCount = (this.tableView?.getHeaderRowRef()?.getColumns()).length ?? 0;
97
+ const rowsCount = this.tableView?.getRows().length ?? 0;
98
+ if (columnsCount === 0 || rowsCount === 0) {
99
+ return;
100
+ }
101
+ const columnCells = [];
102
+ for (let i = 0; i < rowsCount; i++) {
103
+ const cellIndex = index * rowsCount + i;
104
+ if (cellIndex < cells.length) {
105
+ columnCells.push(cells[cellIndex]);
106
+ }
107
+ }
108
+ this.tableViewService.selectedCells = [];
109
+ for (let cell of columnCells) {
110
+ this.tableViewService.selectedCells.push(cell);
111
+ cell.setActivedRow(cell);
112
+ }
36
113
  }
37
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
38
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0", type: XTableViewProperty, isStandalone: true, selector: "x-table-view-property", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
114
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableHeaderCell, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
115
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: XTableHeaderCell, isStandalone: true, selector: "x-table-header-cell, th[x-table-header-cell]", host: { attributes: { "role": "columnheader" }, listeners: { "click": "onClick()" }, properties: { "class.x-table-header-cell-actived": "this.isActived" }, classAttribute: "x-table-header-cell" }, usesInheritance: true, ngImport: i0 }); }
39
116
  }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewProperty, decorators: [{
41
- type: Component,
42
- args: [{ selector: `${XTableViewPrefix}-property`, template: '' }]
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableHeaderCell, decorators: [{
118
+ type: Directive,
119
+ args: [{
120
+ selector: 'x-table-header-cell, th[x-table-header-cell]',
121
+ host: {
122
+ class: 'x-table-header-cell',
123
+ role: 'columnheader'
124
+ }
125
+ }]
126
+ }], propDecorators: { isActived: [{
127
+ type: HostBinding,
128
+ args: ['class.x-table-header-cell-actived']
129
+ }], onClick: [{
130
+ type: HostListener,
131
+ args: ['click']
132
+ }] } });
133
+ class XTableFooterCell extends CdkFooterCell {
134
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableFooterCell, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
135
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: XTableFooterCell, isStandalone: true, selector: "x-table-footer-cell, td[x-table-footer-cell]", host: { classAttribute: "x-table-footer-cell" }, usesInheritance: true, ngImport: i0 }); }
136
+ }
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableFooterCell, decorators: [{
138
+ type: Directive,
139
+ args: [{
140
+ selector: 'x-table-footer-cell, td[x-table-footer-cell]',
141
+ host: {
142
+ class: 'x-table-footer-cell'
143
+ }
144
+ }]
43
145
  }] });
146
+ class XTableViewCell extends CdkCell {
147
+ constructor() {
148
+ super(...arguments);
149
+ this.tableViewService = inject(XTableViewService, { optional: true });
150
+ this.tableView = inject(X_TABLE_VIEW_CONTEXT, { optional: true });
151
+ this.elementRef = inject(ElementRef);
152
+ }
153
+ get isSelected() {
154
+ return this.tableViewService.selectedCells.includes(this);
155
+ }
156
+ onClick() {
157
+ this.tableViewService.selectedCells = [this];
158
+ this.tableViewService.activedRows = [];
159
+ this.setActivedRow(this);
160
+ this.setActivedColumn(this);
161
+ }
162
+ setActivedRow(cell) {
163
+ const rows = this.tableView?.getRows() ?? [];
164
+ if (rows.length > 0) {
165
+ const rowIndex = this.getRowIndex(cell);
166
+ if (rowIndex >= 0 && rowIndex < rows.length) {
167
+ const currentRow = rows[rowIndex];
168
+ this.tableViewService.activedRows.push(currentRow);
169
+ }
170
+ }
171
+ }
172
+ setActivedColumn(cell) {
173
+ const headerCells = (this.tableView?.getHeaderCells() ?? []);
174
+ const headerRowRefs = this.tableView?.getHeaderRowRefs() ?? [];
175
+ const headerCellsArray = this.convertToColumnBasedArray(headerCells, headerRowRefs.length);
176
+ const activedHeaderCells = [];
177
+ for (let cells of headerCellsArray) {
178
+ if (cells.length > 0) {
179
+ const columnIndex = this.getColumnIndex(cell);
180
+ if (columnIndex >= 0 && columnIndex < cells.length) {
181
+ activedHeaderCells.push(cells[columnIndex]);
182
+ }
183
+ }
184
+ }
185
+ this.tableViewService.activedHeaderCells = activedHeaderCells;
186
+ }
187
+ convertToColumnBasedArray(input, columnsPerRow) {
188
+ const result = [];
189
+ for (let i = 0; i < columnsPerRow; i++) {
190
+ result.push([]);
191
+ }
192
+ for (let i = 0; i < input.length; i++) {
193
+ const columnIndex = i % columnsPerRow;
194
+ result[columnIndex].push(input[i]);
195
+ }
196
+ return result;
197
+ }
198
+ getColumnIndex(cell) {
199
+ if (!this.tableView || !this.tableView.getCells())
200
+ return -1;
201
+ const cellsArray = this.tableView.getCells();
202
+ const selectedIndex = cellsArray.indexOf(cell);
203
+ if (selectedIndex === -1)
204
+ return -1;
205
+ const columnsPerRow = (this.tableView.getHeaderRowRef()?.getColumns()).length ?? 0;
206
+ const rowsCount = this.tableView.getRows().length;
207
+ if (columnsPerRow === 0 || rowsCount === 0)
208
+ return -1;
209
+ return Math.floor(selectedIndex / rowsCount);
210
+ }
211
+ getRowIndex(cell) {
212
+ if (!this.tableView || !this.tableView.getCells())
213
+ return -1;
214
+ const cellsArray = this.tableView.getCells();
215
+ const selectedIndex = cellsArray.indexOf(cell);
216
+ if (selectedIndex === -1)
217
+ return -1;
218
+ const columnsPerRow = (this.tableView.getHeaderRowRef()?.getColumns()).length ?? 0;
219
+ const rowsCount = this.tableView.getRows().length;
220
+ if (columnsPerRow === 0 || rowsCount === 0)
221
+ return -1;
222
+ return selectedIndex % rowsCount;
223
+ }
224
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewCell, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
225
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: XTableViewCell, isStandalone: true, selector: "x-table-cell, td[x-table-cell]", host: { listeners: { "click": "onClick()" }, properties: { "class.x-table-cell-selected": "this.isSelected" }, classAttribute: "x-table-cell" }, usesInheritance: true, ngImport: i0 }); }
226
+ }
227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewCell, decorators: [{
228
+ type: Directive,
229
+ args: [{
230
+ selector: 'x-table-cell, td[x-table-cell]',
231
+ host: {
232
+ class: 'x-table-cell'
233
+ }
234
+ }]
235
+ }], propDecorators: { isSelected: [{
236
+ type: HostBinding,
237
+ args: ['class.x-table-cell-selected']
238
+ }], onClick: [{
239
+ type: HostListener,
240
+ args: ['click']
241
+ }] } });
44
242
 
45
243
  const ROW_TEMPLATE = `<ng-container cdkCellOutlet></ng-container>`;
46
244
  class XTableHeaderRowDef extends CdkHeaderRowDef {
47
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableHeaderRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
48
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.0.0", type: XTableHeaderRowDef, isStandalone: true, selector: "[xTableHeaderRowDef]", inputs: { columns: ["xTableHeaderRowDef", "columns"], sticky: ["xTableHeaderRowDefSticky", "sticky", booleanAttribute] }, providers: [{ provide: CdkHeaderRowDef, useExisting: XTableHeaderRowDef }], usesInheritance: true, ngImport: i0 }); }
245
+ getSticky() {
246
+ return this.sticky;
247
+ }
248
+ getColumns() {
249
+ return this.columns;
250
+ }
251
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableHeaderRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
252
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.0.6", type: XTableHeaderRowDef, isStandalone: true, selector: "[xTableHeaderRowDef]", inputs: { columns: ["xTableHeaderRowDef", "columns"], sticky: ["xTableHeaderRowDefSticky", "sticky", booleanAttribute] }, providers: [{ provide: CdkHeaderRowDef, useExisting: XTableHeaderRowDef }], usesInheritance: true, ngImport: i0 }); }
49
253
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableHeaderRowDef, decorators: [{
254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableHeaderRowDef, decorators: [{
51
255
  type: Directive,
52
256
  args: [{
53
257
  selector: '[xTableHeaderRowDef]',
@@ -59,10 +263,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
59
263
  }]
60
264
  }] });
61
265
  class XTableFooterRowDef extends CdkFooterRowDef {
62
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableFooterRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
63
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.0.0", type: XTableFooterRowDef, isStandalone: true, selector: "[xTableFooterRowDef]", inputs: { columns: ["xTableFooterRowDef", "columns"], sticky: ["xTableFooterRowDefSticky", "sticky", booleanAttribute] }, providers: [{ provide: CdkFooterRowDef, useExisting: XTableFooterRowDef }], usesInheritance: true, ngImport: i0 }); }
266
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableFooterRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
267
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.0.6", type: XTableFooterRowDef, isStandalone: true, selector: "[xTableFooterRowDef]", inputs: { columns: ["xTableFooterRowDef", "columns"], sticky: ["xTableFooterRowDefSticky", "sticky", booleanAttribute] }, providers: [{ provide: CdkFooterRowDef, useExisting: XTableFooterRowDef }], usesInheritance: true, ngImport: i0 }); }
64
268
  }
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableFooterRowDef, decorators: [{
269
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableFooterRowDef, decorators: [{
66
270
  type: Directive,
67
271
  args: [{
68
272
  selector: '[xTableFooterRowDef]',
@@ -74,10 +278,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
74
278
  }]
75
279
  }] });
76
280
  class XTableViewRowDef extends CdkRowDef {
77
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
78
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.0", type: XTableViewRowDef, isStandalone: true, selector: "[xTableRowDef]", inputs: { columns: ["xTableRowDefColumns", "columns"], when: ["xTableRowDefWhen", "when"] }, providers: [{ provide: CdkRowDef, useExisting: XTableViewRowDef }], usesInheritance: true, ngImport: i0 }); }
281
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
282
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: XTableViewRowDef, isStandalone: true, selector: "[xTableRowDef]", inputs: { columns: ["xTableRowDefColumns", "columns"], when: ["xTableRowDefWhen", "when"] }, providers: [{ provide: CdkRowDef, useExisting: XTableViewRowDef }], usesInheritance: true, ngImport: i0 }); }
79
283
  }
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewRowDef, decorators: [{
284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewRowDef, decorators: [{
81
285
  type: Directive,
82
286
  args: [{
83
287
  selector: '[xTableRowDef]',
@@ -91,7 +295,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
91
295
  class XTableHeaderRow extends CdkHeaderRow {
92
296
  constructor() {
93
297
  super(...arguments);
94
- this.tableView = inject(XTableView, { optional: true });
298
+ this.tableView = inject(X_TABLE_VIEW_CONTEXT, { optional: true });
95
299
  this.tableViewService = inject(XTableViewService, { optional: true });
96
300
  this.sticking = signal(false, ...(ngDevMode ? [{ debugName: "sticking" }] : []));
97
301
  }
@@ -102,16 +306,16 @@ class XTableHeaderRow extends CdkHeaderRow {
102
306
  this.listenerSticky();
103
307
  }
104
308
  listenerSticky() {
105
- const index = this.tableView?.headerRows().findIndex((x) => x === this);
309
+ const index = this.tableView?.getHeaderRows().findIndex((x) => x === this);
106
310
  if (index === undefined || index < 0)
107
311
  return;
108
- const rowLen = this.tableView?.headerRowRefs()?.length ?? 0;
312
+ const rowLen = this.tableView?.getHeaderRowRefs()?.length ?? 0;
109
313
  if (rowLen === 0 || rowLen < index)
110
314
  return;
111
- const sticky = this.tableView?.headerRowRefs()[index].sticky;
315
+ const sticky = this.tableView?.getHeaderRowRefs()[index].getSticky();
112
316
  if (!sticky)
113
317
  return;
114
- const sentinel = this.tableView?.sentinelTop().nativeElement;
318
+ const sentinel = this.tableView?.getSentinelTop()?.nativeElement;
115
319
  const observer = new IntersectionObserver(([entry]) => {
116
320
  const sticking = !entry.isIntersecting;
117
321
  if (sticking) {
@@ -128,10 +332,10 @@ class XTableHeaderRow extends CdkHeaderRow {
128
332
  }, { threshold: 0 });
129
333
  observer.observe(sentinel);
130
334
  }
131
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableHeaderRow, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
132
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0", type: XTableHeaderRow, isStandalone: true, selector: "x-table-header-row, tr[x-table-header-row]", host: { attributes: { "role": "row" }, properties: { "class.x-table-sticky-top": "this.isSticking" }, classAttribute: "x-table-header-row" }, providers: [{ provide: CdkHeaderRow, useExisting: XTableHeaderRow }], exportAs: ["xTableHeaderRow"], usesInheritance: true, ngImport: i0, template: "<ng-container cdkCellOutlet></ng-container>", isInline: true, dependencies: [{ kind: "directive", type: CdkCellOutlet, selector: "[cdkCellOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
335
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableHeaderRow, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
336
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: XTableHeaderRow, isStandalone: true, selector: "x-table-header-row, tr[x-table-header-row]", host: { attributes: { "role": "row" }, properties: { "class.x-table-sticky-top": "this.isSticking" }, classAttribute: "x-table-header-row" }, providers: [{ provide: CdkHeaderRow, useExisting: XTableHeaderRow }], exportAs: ["xTableHeaderRow"], usesInheritance: true, ngImport: i0, template: "<ng-container cdkCellOutlet></ng-container>", isInline: true, dependencies: [{ kind: "directive", type: CdkCellOutlet, selector: "[cdkCellOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
133
337
  }
134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableHeaderRow, decorators: [{
338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableHeaderRow, decorators: [{
135
339
  type: Component,
136
340
  args: [{
137
341
  selector: 'x-table-header-row, tr[x-table-header-row]',
@@ -151,10 +355,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
151
355
  args: ['class.x-table-sticky-top']
152
356
  }] } });
153
357
  class XTableFooterRow extends CdkFooterRow {
154
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableFooterRow, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
155
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0", type: XTableFooterRow, isStandalone: true, selector: "x-table-footer-row, tr[x-table-footer-row]", host: { attributes: { "role": "row" }, classAttribute: "x-table-footer-row" }, providers: [{ provide: CdkFooterRow, useExisting: XTableFooterRow }], exportAs: ["xTableFooterRow"], usesInheritance: true, ngImport: i0, template: "<ng-container cdkCellOutlet></ng-container>", isInline: true, dependencies: [{ kind: "directive", type: CdkCellOutlet, selector: "[cdkCellOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
358
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableFooterRow, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
359
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: XTableFooterRow, isStandalone: true, selector: "x-table-footer-row, tr[x-table-footer-row]", host: { attributes: { "role": "row" }, classAttribute: "x-table-footer-row" }, providers: [{ provide: CdkFooterRow, useExisting: XTableFooterRow }], exportAs: ["xTableFooterRow"], usesInheritance: true, ngImport: i0, template: "<ng-container cdkCellOutlet></ng-container>", isInline: true, dependencies: [{ kind: "directive", type: CdkCellOutlet, selector: "[cdkCellOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
156
360
  }
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableFooterRow, decorators: [{
361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableFooterRow, decorators: [{
158
362
  type: Component,
159
363
  args: [{
160
364
  selector: 'x-table-footer-row, tr[x-table-footer-row]',
@@ -178,10 +382,10 @@ class XTableViewRow extends CdkRow {
178
382
  get isActived() {
179
383
  return this.tableViewService.activedRows.includes(this);
180
384
  }
181
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewRow, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
182
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0", type: XTableViewRow, isStandalone: true, selector: "x-table-row, tr[x-table-row]", host: { attributes: { "role": "row" }, properties: { "class.x-table-row-actived": "this.isActived" }, classAttribute: "x-table-row" }, providers: [{ provide: CdkRow, useExisting: XTableViewRow }], exportAs: ["xTableRow"], usesInheritance: true, ngImport: i0, template: "<ng-container cdkCellOutlet></ng-container>", isInline: true, dependencies: [{ kind: "directive", type: CdkCellOutlet, selector: "[cdkCellOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
385
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewRow, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
386
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: XTableViewRow, isStandalone: true, selector: "x-table-row, tr[x-table-row]", host: { attributes: { "role": "row" }, properties: { "class.x-table-row-actived": "this.isActived" }, classAttribute: "x-table-row" }, providers: [{ provide: CdkRow, useExisting: XTableViewRow }], exportAs: ["xTableRow"], usesInheritance: true, ngImport: i0, template: "<ng-container cdkCellOutlet></ng-container>", isInline: true, dependencies: [{ kind: "directive", type: CdkCellOutlet, selector: "[cdkCellOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
183
387
  }
184
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewRow, decorators: [{
388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewRow, decorators: [{
185
389
  type: Component,
186
390
  args: [{
187
391
  selector: 'x-table-row, tr[x-table-row]',
@@ -205,10 +409,10 @@ class XTableNoDataRow extends CdkNoDataRow {
205
409
  super(...arguments);
206
410
  this._contentClassNames = ['x-table-no-data-row'];
207
411
  }
208
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableNoDataRow, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
209
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.0", type: XTableNoDataRow, isStandalone: true, selector: "ng-template[xTableNoDataRow]", providers: [{ provide: CdkNoDataRow, useExisting: XTableNoDataRow }], usesInheritance: true, ngImport: i0 }); }
412
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableNoDataRow, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
413
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: XTableNoDataRow, isStandalone: true, selector: "ng-template[xTableNoDataRow]", providers: [{ provide: CdkNoDataRow, useExisting: XTableNoDataRow }], usesInheritance: true, ngImport: i0 }); }
210
414
  }
211
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableNoDataRow, decorators: [{
415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableNoDataRow, decorators: [{
212
416
  type: Directive,
213
417
  args: [{
214
418
  selector: 'ng-template[xTableNoDataRow]',
@@ -216,6 +420,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
216
420
  }]
217
421
  }] });
218
422
 
423
+ /**
424
+ * Table view
425
+ * @selector x-table-view
426
+ * @decorator component
427
+ */
428
+ const XTableViewPrefix = 'x-table-view';
429
+ const X_TABLE_VIEW_CONFIG_NAME = 'tableView';
430
+ /**
431
+ * Table view Property
432
+ */
433
+ class XTableViewProperty extends CdkTable {
434
+ constructor() {
435
+ super(...arguments);
436
+ this.config = inject(XConfigService).getConfigForComponent(X_TABLE_VIEW_CONFIG_NAME);
437
+ }
438
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
439
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: XTableViewProperty, isStandalone: true, selector: "x-table-view-property", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
440
+ }
441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewProperty, decorators: [{
442
+ type: Component,
443
+ args: [{ selector: `${XTableViewPrefix}-property`, template: '' }]
444
+ }] });
445
+
219
446
  class XTableView extends XTableViewProperty {
220
447
  constructor() {
221
448
  super(...arguments);
@@ -233,17 +460,39 @@ class XTableView extends XTableViewProperty {
233
460
  /** Overrides the need to add position: sticky on every sticky cell element in `CdkTable`. */
234
461
  this.needsPositionStickyOnElement = false;
235
462
  }
236
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableView, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
237
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0", type: XTableView, isStandalone: true, selector: "x-table-view, table[x-table-view]", host: { properties: { "class.x-table-fixed-layout": "fixedLayout" }, classAttribute: "x-table-view" }, providers: [
463
+ getHeaderRows() {
464
+ return this.headerRows();
465
+ }
466
+ getHeaderRowRefs() {
467
+ return this.headerRowRefs();
468
+ }
469
+ getSentinelTop() {
470
+ return this.sentinelTop();
471
+ }
472
+ getHeaderCells() {
473
+ return this.headerCells();
474
+ }
475
+ getCells() {
476
+ return this.cells();
477
+ }
478
+ getRows() {
479
+ return this.rows();
480
+ }
481
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableView, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
482
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: XTableView, isStandalone: true, selector: "x-table-view, table[x-table-view]", host: { properties: { "class.x-table-fixed-layout": "fixedLayout" }, classAttribute: "x-table-view" }, providers: [
238
483
  { provide: CdkTable, useExisting: XTableView },
239
484
  { provide: CDK_TABLE, useExisting: XTableView },
240
485
  // Prevent nested tables from seeing this table's StickyPositioningListener.
241
486
  { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },
242
487
  { provide: STICKY_POSITIONING_LISTENER, useValue: null },
488
+ {
489
+ provide: X_TABLE_VIEW_CONTEXT,
490
+ useExisting: XTableView
491
+ },
243
492
  XTableViewService
244
493
  ], queries: [{ propertyName: "headerRowRef", first: true, predicate: XTableHeaderRowDef, descendants: true, isSignal: true }, { propertyName: "headerRowRefs", predicate: XTableHeaderRowDef, isSignal: true }, { propertyName: "headerRows", predicate: XTableHeaderRow, isSignal: true }, { propertyName: "columnDefs", predicate: XTableColumnDef, isSignal: true }, { propertyName: "headerCells", predicate: XTableHeaderCell, isSignal: true }, { propertyName: "cells", predicate: XTableViewCell, isSignal: true }, { propertyName: "rows", predicate: XTableViewRow, isSignal: true }], viewQueries: [{ propertyName: "sentinelTop", first: true, predicate: ["sentinelTop"], descendants: true, isSignal: true }], exportAs: ["xTableView"], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"caption\" />\r\n<ng-content select=\"colgroup, col\" />\r\n\r\n<!--\r\n Unprojected content throws a hydration error so we need this to capture it.\r\n It gets removed on the client so it doesn't affect the layout.\r\n -->\r\n@if (_isServer) {\r\n <ng-content />\r\n}\r\n<div class=\"x-table-sentinel-top\" #sentinelTop></div>\r\n@if (_isNativeHtmlTable) {\r\n <thead>\r\n <ng-container headerRowOutlet />\r\n </thead>\r\n <tbody>\r\n <ng-container rowOutlet />\r\n <ng-container noDataRowOutlet />\r\n </tbody>\r\n <tfoot>\r\n <ng-container footerRowOutlet />\r\n </tfoot>\r\n} @else {\r\n <ng-container headerRowOutlet />\r\n <ng-container rowOutlet />\r\n <ng-container noDataRowOutlet />\r\n <ng-container footerRowOutlet />\r\n}\r\n", styles: [".x-table-view{margin:0;padding:0}.x-table-view{position:relative;border-collapse:separate;border-spacing:0}.x-table-view .x-table-header-cell,.x-table-view .x-table-footer-cell{padding:0 .5rem;text-align:left;font-weight:500;color:var(--x-text);border-top:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border);cursor:default;background-color:var(--x-background);white-space:nowrap}.x-table-view .x-table-header-cell:first-child,.x-table-view .x-table-footer-cell:first-child{border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-view .x-table-header-cell.x-table-header-cell-actived,.x-table-view .x-table-footer-cell.x-table-header-cell-actived{background-color:var(--x-background-a100)}.x-table-view .x-table-sticky{position:sticky;background-color:var(--x-background-a200)}.x-table-view .x-table-sentinel-top{visibility:hidden;position:absolute;top:0}.x-table-view .x-table-row-actived .x-table-cell:not(.x-table-cell-selected){background-color:var(--x-background-a100)}.x-table-view .x-table-cell{padding:0 .5rem;text-align:left;font-weight:500;color:var(--x-text);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border);cursor:default;white-space:nowrap;background-color:var(--x-background)}.x-table-view .x-table-cell:first-child{border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-view .x-table-cell.x-table-cell-selected{border-color:var(--x-border-a200);background-color:var(--x-primary-900)}.x-table-view .x-table-cell.x-table-sticky:not(.x-table-cell-selected){background-color:var(--x-background-a200)}.x-table-view .x-table-sticky-border-elem-top{border-bottom-style:solid;border-bottom-width:calc(2 * var(--x-border-width));border-bottom-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-bottom{border-top-style:solid;border-top-width:calc(2 * var(--x-border-width));border-top-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-left{border-right-style:solid;border-right-width:calc(2 * var(--x-border-width));border-right-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-right{border-left-style:solid;border-left-width:calc(2 * var(--x-border-width));border-left-color:var(--x-border-a900)}\n"], dependencies: [{ kind: "directive", type: HeaderRowOutlet, selector: "[headerRowOutlet]" }, { kind: "directive", type: DataRowOutlet, selector: "[rowOutlet]" }, { kind: "directive", type: NoDataRowOutlet, selector: "[noDataRowOutlet]" }, { kind: "directive", type: FooterRowOutlet, selector: "[footerRowOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
245
494
  }
246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableView, decorators: [{
495
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableView, decorators: [{
247
496
  type: Component,
248
497
  args: [{ selector: 'x-table-view, table[x-table-view]', exportAs: 'xTableView', host: {
249
498
  class: 'x-table-view',
@@ -254,232 +503,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
254
503
  // Prevent nested tables from seeing this table's StickyPositioningListener.
255
504
  { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },
256
505
  { provide: STICKY_POSITIONING_LISTENER, useValue: null },
506
+ {
507
+ provide: X_TABLE_VIEW_CONTEXT,
508
+ useExisting: XTableView
509
+ },
257
510
  XTableViewService
258
511
  ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, imports: [HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet], template: "<ng-content select=\"caption\" />\r\n<ng-content select=\"colgroup, col\" />\r\n\r\n<!--\r\n Unprojected content throws a hydration error so we need this to capture it.\r\n It gets removed on the client so it doesn't affect the layout.\r\n -->\r\n@if (_isServer) {\r\n <ng-content />\r\n}\r\n<div class=\"x-table-sentinel-top\" #sentinelTop></div>\r\n@if (_isNativeHtmlTable) {\r\n <thead>\r\n <ng-container headerRowOutlet />\r\n </thead>\r\n <tbody>\r\n <ng-container rowOutlet />\r\n <ng-container noDataRowOutlet />\r\n </tbody>\r\n <tfoot>\r\n <ng-container footerRowOutlet />\r\n </tfoot>\r\n} @else {\r\n <ng-container headerRowOutlet />\r\n <ng-container rowOutlet />\r\n <ng-container noDataRowOutlet />\r\n <ng-container footerRowOutlet />\r\n}\r\n", styles: [".x-table-view{margin:0;padding:0}.x-table-view{position:relative;border-collapse:separate;border-spacing:0}.x-table-view .x-table-header-cell,.x-table-view .x-table-footer-cell{padding:0 .5rem;text-align:left;font-weight:500;color:var(--x-text);border-top:var(--x-border-width) var(--x-border-style) var(--x-border);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border);cursor:default;background-color:var(--x-background);white-space:nowrap}.x-table-view .x-table-header-cell:first-child,.x-table-view .x-table-footer-cell:first-child{border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-view .x-table-header-cell.x-table-header-cell-actived,.x-table-view .x-table-footer-cell.x-table-header-cell-actived{background-color:var(--x-background-a100)}.x-table-view .x-table-sticky{position:sticky;background-color:var(--x-background-a200)}.x-table-view .x-table-sentinel-top{visibility:hidden;position:absolute;top:0}.x-table-view .x-table-row-actived .x-table-cell:not(.x-table-cell-selected){background-color:var(--x-background-a100)}.x-table-view .x-table-cell{padding:0 .5rem;text-align:left;font-weight:500;color:var(--x-text);border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border);border-right:var(--x-border-width) var(--x-border-style) var(--x-border);cursor:default;white-space:nowrap;background-color:var(--x-background)}.x-table-view .x-table-cell:first-child{border-left:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-table-view .x-table-cell.x-table-cell-selected{border-color:var(--x-border-a200);background-color:var(--x-primary-900)}.x-table-view .x-table-cell.x-table-sticky:not(.x-table-cell-selected){background-color:var(--x-background-a200)}.x-table-view .x-table-sticky-border-elem-top{border-bottom-style:solid;border-bottom-width:calc(2 * var(--x-border-width));border-bottom-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-bottom{border-top-style:solid;border-top-width:calc(2 * var(--x-border-width));border-top-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-left{border-right-style:solid;border-right-width:calc(2 * var(--x-border-width));border-right-color:var(--x-border-a900)}.x-table-view .x-table-sticky-border-elem-right{border-left-style:solid;border-left-width:calc(2 * var(--x-border-width));border-left-color:var(--x-border-a900)}\n"] }]
259
512
  }], propDecorators: { sentinelTop: [{ type: i0.ViewChild, args: ['sentinelTop', { isSignal: true }] }], headerRowRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => XTableHeaderRowDef), { isSignal: true }] }], headerRowRefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => XTableHeaderRowDef), { isSignal: true }] }], headerRows: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => XTableHeaderRow), { isSignal: true }] }], columnDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => XTableColumnDef), { isSignal: true }] }], headerCells: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => XTableHeaderCell), { isSignal: true }] }], cells: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => XTableViewCell), { isSignal: true }] }], rows: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => XTableViewRow), { isSignal: true }] }] } });
260
513
 
261
- class XTableViewCellDef extends CdkCellDef {
262
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
263
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.0", type: XTableViewCellDef, isStandalone: true, selector: "[xTableCellDef]", providers: [{ provide: CdkCellDef, useExisting: XTableViewCellDef }], usesInheritance: true, ngImport: i0 }); }
264
- }
265
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewCellDef, decorators: [{
266
- type: Directive,
267
- args: [{
268
- selector: '[xTableCellDef]',
269
- providers: [{ provide: CdkCellDef, useExisting: XTableViewCellDef }]
270
- }]
271
- }] });
272
- class XTableHeaderCellDef extends CdkHeaderCellDef {
273
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableHeaderCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
274
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.0", type: XTableHeaderCellDef, isStandalone: true, selector: "[xTableHeaderCellDef]", providers: [{ provide: CdkHeaderCellDef, useExisting: XTableHeaderCellDef }], usesInheritance: true, ngImport: i0 }); }
275
- }
276
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableHeaderCellDef, decorators: [{
277
- type: Directive,
278
- args: [{
279
- selector: '[xTableHeaderCellDef]',
280
- providers: [{ provide: CdkHeaderCellDef, useExisting: XTableHeaderCellDef }]
281
- }]
282
- }] });
283
- class XTableFooterCellDef extends CdkFooterCellDef {
284
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableFooterCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
285
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.0", type: XTableFooterCellDef, isStandalone: true, selector: "[xTableFooterCellDef]", providers: [{ provide: CdkFooterCellDef, useExisting: XTableFooterCellDef }], usesInheritance: true, ngImport: i0 }); }
286
- }
287
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableFooterCellDef, decorators: [{
288
- type: Directive,
289
- args: [{
290
- selector: '[xTableFooterCellDef]',
291
- providers: [{ provide: CdkFooterCellDef, useExisting: XTableFooterCellDef }]
292
- }]
293
- }] });
294
- class XTableColumnDef extends CdkColumnDef {
295
- get name() {
296
- return this._name;
297
- }
298
- set name(name) {
299
- this._setNameInput(name);
300
- }
301
- _updateColumnCssClassName() {
302
- super._updateColumnCssClassName();
303
- this._columnCssClassName.push(`x-table-column-${this.cssClassFriendlyName}`);
304
- }
305
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableColumnDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
306
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.0", type: XTableColumnDef, isStandalone: true, selector: "[xTableColumnDef]", inputs: { name: ["xTableColumnDef", "name"] }, providers: [{ provide: CdkColumnDef, useExisting: XTableColumnDef }], usesInheritance: true, ngImport: i0 }); }
307
- }
308
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableColumnDef, decorators: [{
309
- type: Directive,
310
- args: [{
311
- selector: '[xTableColumnDef]',
312
- providers: [{ provide: CdkColumnDef, useExisting: XTableColumnDef }]
313
- }]
314
- }], propDecorators: { name: [{
315
- type: Input,
316
- args: ['xTableColumnDef']
317
- }] } });
318
- class XTableHeaderCell extends CdkHeaderCell {
319
- constructor() {
320
- super(...arguments);
321
- this.tableViewService = inject(XTableViewService, { optional: true });
322
- this.tableView = inject(XTableView, { optional: true });
323
- this.elementRef = inject(ElementRef);
324
- }
325
- get isActived() {
326
- return this.tableViewService.activedHeaderCells.includes(this);
327
- }
328
- onClick() {
329
- this.tableViewService.activedHeaderCells = [this];
330
- const headerCells = this.tableView?.headerCells() ?? [];
331
- const index = headerCells.indexOf(this);
332
- const cells = this.tableView?.cells() ?? [];
333
- const columnsCount = (this.tableView?.headerRowRef()?.columns).length ?? 0;
334
- const rowsCount = this.tableView?.rows().length ?? 0;
335
- if (columnsCount === 0 || rowsCount === 0) {
336
- return;
337
- }
338
- const columnCells = [];
339
- for (let i = 0; i < rowsCount; i++) {
340
- const cellIndex = index * rowsCount + i;
341
- if (cellIndex < cells.length) {
342
- columnCells.push(cells[cellIndex]);
343
- }
344
- }
345
- this.tableViewService.selectedCells = [];
346
- for (let cell of columnCells) {
347
- this.tableViewService.selectedCells.push(cell);
348
- cell.setActivedRow(cell);
349
- }
350
- }
351
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableHeaderCell, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
352
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.0", type: XTableHeaderCell, isStandalone: true, selector: "x-table-header-cell, th[x-table-header-cell]", host: { attributes: { "role": "columnheader" }, listeners: { "click": "onClick()" }, properties: { "class.x-table-header-cell-actived": "this.isActived" }, classAttribute: "x-table-header-cell" }, usesInheritance: true, ngImport: i0 }); }
353
- }
354
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableHeaderCell, decorators: [{
355
- type: Directive,
356
- args: [{
357
- selector: 'x-table-header-cell, th[x-table-header-cell]',
358
- host: {
359
- class: 'x-table-header-cell',
360
- role: 'columnheader'
361
- }
362
- }]
363
- }], propDecorators: { isActived: [{
364
- type: HostBinding,
365
- args: ['class.x-table-header-cell-actived']
366
- }], onClick: [{
367
- type: HostListener,
368
- args: ['click']
369
- }] } });
370
- class XTableFooterCell extends CdkFooterCell {
371
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableFooterCell, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
372
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.0", type: XTableFooterCell, isStandalone: true, selector: "x-table-footer-cell, td[x-table-footer-cell]", host: { classAttribute: "x-table-footer-cell" }, usesInheritance: true, ngImport: i0 }); }
373
- }
374
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableFooterCell, decorators: [{
375
- type: Directive,
376
- args: [{
377
- selector: 'x-table-footer-cell, td[x-table-footer-cell]',
378
- host: {
379
- class: 'x-table-footer-cell'
380
- }
381
- }]
382
- }] });
383
- class XTableViewCell extends CdkCell {
384
- constructor() {
385
- super(...arguments);
386
- this.tableViewService = inject(XTableViewService, { optional: true });
387
- this.tableView = inject(XTableView, { optional: true });
388
- this.elementRef = inject(ElementRef);
389
- }
390
- get isSelected() {
391
- return this.tableViewService.selectedCells.includes(this);
392
- }
393
- onClick() {
394
- this.tableViewService.selectedCells = [this];
395
- this.tableViewService.activedRows = [];
396
- this.setActivedRow(this);
397
- this.setActivedColumn(this);
398
- }
399
- setActivedRow(cell) {
400
- const rows = this.tableView?.rows() ?? [];
401
- if (rows.length > 0) {
402
- const rowIndex = this.getRowIndex(cell);
403
- if (rowIndex >= 0 && rowIndex < rows.length) {
404
- const currentRow = rows[rowIndex];
405
- this.tableViewService.activedRows.push(currentRow);
406
- }
407
- }
408
- }
409
- setActivedColumn(cell) {
410
- const headerCells = (this.tableView?.headerCells() ?? []);
411
- const headerRowRefs = this.tableView?.headerRowRefs() ?? [];
412
- const headerCellsArray = this.convertToColumnBasedArray(headerCells, headerRowRefs.length);
413
- const activedHeaderCells = [];
414
- for (let cells of headerCellsArray) {
415
- if (cells.length > 0) {
416
- const columnIndex = this.getColumnIndex(cell);
417
- if (columnIndex >= 0 && columnIndex < cells.length) {
418
- activedHeaderCells.push(cells[columnIndex]);
419
- }
420
- }
421
- }
422
- this.tableViewService.activedHeaderCells = activedHeaderCells;
423
- }
424
- convertToColumnBasedArray(input, columnsPerRow) {
425
- const result = [];
426
- for (let i = 0; i < columnsPerRow; i++) {
427
- result.push([]);
428
- }
429
- for (let i = 0; i < input.length; i++) {
430
- const columnIndex = i % columnsPerRow;
431
- result[columnIndex].push(input[i]);
432
- }
433
- return result;
434
- }
435
- getColumnIndex(cell) {
436
- if (!this.tableView || !this.tableView.cells())
437
- return -1;
438
- const cellsArray = this.tableView.cells();
439
- const selectedIndex = cellsArray.indexOf(cell);
440
- if (selectedIndex === -1)
441
- return -1;
442
- const columnsPerRow = (this.tableView.headerRowRef()?.columns).length ?? 0;
443
- const rowsCount = this.tableView.rows().length;
444
- if (columnsPerRow === 0 || rowsCount === 0)
445
- return -1;
446
- return Math.floor(selectedIndex / rowsCount);
447
- }
448
- getRowIndex(cell) {
449
- if (!this.tableView || !this.tableView.cells())
450
- return -1;
451
- const cellsArray = this.tableView.cells();
452
- const selectedIndex = cellsArray.indexOf(cell);
453
- if (selectedIndex === -1)
454
- return -1;
455
- const columnsPerRow = (this.tableView.headerRowRef()?.columns).length ?? 0;
456
- const rowsCount = this.tableView.rows().length;
457
- if (columnsPerRow === 0 || rowsCount === 0)
458
- return -1;
459
- return selectedIndex % rowsCount;
460
- }
461
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewCell, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
462
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.0", type: XTableViewCell, isStandalone: true, selector: "x-table-cell, td[x-table-cell]", host: { listeners: { "click": "onClick()" }, properties: { "class.x-table-cell-selected": "this.isSelected" }, classAttribute: "x-table-cell" }, usesInheritance: true, ngImport: i0 }); }
463
- }
464
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewCell, decorators: [{
465
- type: Directive,
466
- args: [{
467
- selector: 'x-table-cell, td[x-table-cell]',
468
- host: {
469
- class: 'x-table-cell'
470
- }
471
- }]
472
- }], propDecorators: { isSelected: [{
473
- type: HostBinding,
474
- args: ['class.x-table-cell-selected']
475
- }], onClick: [{
476
- type: HostListener,
477
- args: ['click']
478
- }] } });
479
-
480
514
  class XTableTextColumn extends CdkTextColumn {
481
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableTextColumn, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
482
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.0", type: XTableTextColumn, isStandalone: true, selector: "x-table-text-column", usesInheritance: true, ngImport: i0, template: `
515
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableTextColumn, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
516
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: XTableTextColumn, isStandalone: true, selector: "x-table-text-column", usesInheritance: true, ngImport: i0, template: `
483
517
  <ng-container xTableColumnDef>
484
518
  <th x-table-header-cell *xTableHeaderCellDef [style.text-align]="justify">
485
519
  {{ headerText }}
@@ -490,7 +524,7 @@ class XTableTextColumn extends CdkTextColumn {
490
524
  </ng-container>
491
525
  `, isInline: true, dependencies: [{ kind: "directive", type: XTableColumnDef, selector: "[xTableColumnDef]", inputs: ["xTableColumnDef"] }, { kind: "directive", type: XTableHeaderCellDef, selector: "[xTableHeaderCellDef]" }, { kind: "directive", type: XTableHeaderCell, selector: "x-table-header-cell, th[x-table-header-cell]" }, { kind: "directive", type: XTableViewCellDef, selector: "[xTableCellDef]" }, { kind: "directive", type: XTableViewCell, selector: "x-table-cell, td[x-table-cell]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
492
526
  }
493
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableTextColumn, decorators: [{
527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableTextColumn, decorators: [{
494
528
  type: Component,
495
529
  args: [{
496
530
  selector: 'x-table-text-column',
@@ -533,8 +567,8 @@ const EXPORTED_DECLARATIONS = [
533
567
  XTableTextColumn
534
568
  ];
535
569
  class XTableViewModule {
536
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
537
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.0", ngImport: i0, type: XTableViewModule, imports: [CdkTableModule,
570
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
571
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: XTableViewModule, imports: [CdkTableModule,
538
572
  // Table
539
573
  XTableView,
540
574
  // Template defs
@@ -575,9 +609,9 @@ class XTableViewModule {
575
609
  XTableFooterRow,
576
610
  XTableNoDataRow,
577
611
  XTableTextColumn] }); }
578
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewModule, imports: [CdkTableModule] }); }
612
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewModule, imports: [CdkTableModule] }); }
579
613
  }
580
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: XTableViewModule, decorators: [{
614
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: XTableViewModule, decorators: [{
581
615
  type: NgModule,
582
616
  args: [{
583
617
  exports: [...EXPORTED_DECLARATIONS],