@rxap/material-table-system 12.5.7 → 13.0.0-next.2

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 (204) hide show
  1. package/_theming.scss +1 -1
  2. package/esm2020/index.mjs +91 -0
  3. package/esm2020/lib/cells/boolean-cell/boolean-cell.component.mjs +19 -0
  4. package/esm2020/lib/cells/boolean-cell/boolean-cell.component.module.mjs +26 -0
  5. package/esm2020/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.mjs +16 -0
  6. package/esm2020/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.module.mjs +26 -0
  7. package/esm2020/lib/cells/date-cell/date-cell.component.mjs +21 -0
  8. package/esm2020/lib/cells/date-cell/date-cell.component.module.mjs +22 -0
  9. package/esm2020/lib/cells/icon-cell/icon-cell.component.mjs +17 -0
  10. package/esm2020/lib/cells/icon-cell/icon-cell.component.module.mjs +30 -0
  11. package/esm2020/lib/cells/image-cell/image-cell.component.mjs +31 -0
  12. package/esm2020/lib/cells/image-cell/image-cell.component.module.mjs +19 -0
  13. package/esm2020/lib/cells/link-cell/link-cell.component.mjs +26 -0
  14. package/esm2020/lib/cells/link-cell/link-cell.component.module.mjs +34 -0
  15. package/esm2020/lib/cells/options-cell/options-cell.component.mjs +68 -0
  16. package/esm2020/lib/cells/options-cell/options-cell.component.module.mjs +17 -0
  17. package/esm2020/lib/expand-row/expand-controls-cell/expand-controls-cell.component.mjs +30 -0
  18. package/esm2020/lib/expand-row/expand-controls-cell/expand-controls-cell.component.module.mjs +30 -0
  19. package/esm2020/lib/expand-row/expand-row-container/expand-row-container.component.mjs +65 -0
  20. package/esm2020/lib/expand-row/expand-row-container/expand-row-container.component.module.mjs +35 -0
  21. package/esm2020/lib/expand-row/expand-row-container/expand-row-content.directive.mjs +22 -0
  22. package/esm2020/lib/expand-row/expand-row.directive.mjs +41 -0
  23. package/esm2020/lib/expand-row/expand-row.module.mjs +31 -0
  24. package/esm2020/lib/expand-row/expand-row.service.mjs +29 -0
  25. package/esm2020/lib/persistent-paginator.directive.mjs +62 -0
  26. package/esm2020/lib/row-animation.mjs +25 -0
  27. package/esm2020/lib/select-row/checkbox-cell/checkbox-cell.component.mjs +28 -0
  28. package/esm2020/lib/select-row/checkbox-cell/checkbox-cell.component.module.mjs +26 -0
  29. package/esm2020/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.mjs +45 -0
  30. package/esm2020/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.module.mjs +26 -0
  31. package/esm2020/lib/select-row/select-row.module.mjs +25 -0
  32. package/esm2020/lib/select-row/select-row.options.mjs +2 -0
  33. package/esm2020/lib/select-row/select-row.service.mjs +29 -0
  34. package/esm2020/lib/select-row/selected-rows.directive.mjs +46 -0
  35. package/esm2020/lib/select-row/tokens.mjs +3 -0
  36. package/esm2020/lib/table-column-menu/table-column-menu.component.mjs +58 -0
  37. package/esm2020/lib/table-column-menu/table-column-menu.component.module.mjs +47 -0
  38. package/esm2020/lib/table-column-menu/table-column-option/table-column-option.component.mjs +81 -0
  39. package/esm2020/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.mjs +30 -0
  40. package/esm2020/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.module.mjs +26 -0
  41. package/esm2020/lib/table-create-button/table-create-button.directive.mjs +69 -0
  42. package/esm2020/lib/table-create-button/tokens.mjs +3 -0
  43. package/esm2020/lib/table-data-source.directive.mjs +169 -0
  44. package/esm2020/lib/table-filter/filter-header-row.directive.mjs +55 -0
  45. package/esm2020/lib/table-filter/table-filter.module.mjs +25 -0
  46. package/esm2020/lib/table-filter/table-filter.service.mjs +36 -0
  47. package/esm2020/lib/table-filter/to-filter-column-names.pipe.mjs +16 -0
  48. package/esm2020/lib/table-filter/tokens.mjs +3 -0
  49. package/esm2020/lib/table-row-actions/decorators.mjs +8 -0
  50. package/esm2020/lib/table-row-actions/table-row-action-executing.directive.mjs +23 -0
  51. package/esm2020/lib/table-row-actions/table-row-action-status.mjs +8 -0
  52. package/esm2020/lib/table-row-actions/table-row-action.directive.mjs +196 -0
  53. package/esm2020/lib/table-row-actions/table-row-action.method.mjs +11 -0
  54. package/esm2020/lib/table-row-actions/table-row-actions.module.mjs +53 -0
  55. package/esm2020/lib/table-row-actions/table-row-header-action.directive.mjs +86 -0
  56. package/esm2020/lib/table-row-actions/tokens.mjs +3 -0
  57. package/esm2020/lib/table-row-controls/row-controls-cell/row-controls-cell.component.mjs +116 -0
  58. package/esm2020/lib/table-row-controls/row-controls-cell/row-controls-cell.component.module.mjs +42 -0
  59. package/esm2020/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.mjs +94 -0
  60. package/esm2020/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.module.mjs +42 -0
  61. package/esm2020/lib/table-row-controls/table-row-controls.module.mjs +21 -0
  62. package/esm2020/lib/table-row-controls/tokens.mjs +9 -0
  63. package/esm2020/lib/table-row-metadata.mjs +2 -0
  64. package/esm2020/lib/table-select-controls/table-select-controls.component.mjs +32 -0
  65. package/esm2020/lib/table-select-controls/table-select-controls.component.module.mjs +30 -0
  66. package/esm2020/rxap-material-table-system.mjs +5 -0
  67. package/fesm2015/rxap-material-table-system.mjs +2131 -0
  68. package/fesm2015/rxap-material-table-system.mjs.map +1 -0
  69. package/{fesm2015/rxap-material-table-system.js → fesm2020/rxap-material-table-system.mjs} +322 -468
  70. package/fesm2020/rxap-material-table-system.mjs.map +1 -0
  71. package/package.json +51 -37
  72. package/bundles/rxap-material-table-system.umd.js +0 -2928
  73. package/bundles/rxap-material-table-system.umd.js.map +0 -1
  74. package/esm2015/index.js +0 -91
  75. package/esm2015/index.js.map +0 -1
  76. package/esm2015/lib/cells/boolean-cell/boolean-cell.component.js +0 -25
  77. package/esm2015/lib/cells/boolean-cell/boolean-cell.component.js.map +0 -1
  78. package/esm2015/lib/cells/boolean-cell/boolean-cell.component.module.js +0 -26
  79. package/esm2015/lib/cells/boolean-cell/boolean-cell.component.module.js.map +0 -1
  80. package/esm2015/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.js +0 -22
  81. package/esm2015/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.js.map +0 -1
  82. package/esm2015/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.module.js +0 -26
  83. package/esm2015/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.module.js.map +0 -1
  84. package/esm2015/lib/cells/date-cell/date-cell.component.js +0 -27
  85. package/esm2015/lib/cells/date-cell/date-cell.component.js.map +0 -1
  86. package/esm2015/lib/cells/date-cell/date-cell.component.module.js +0 -22
  87. package/esm2015/lib/cells/date-cell/date-cell.component.module.js.map +0 -1
  88. package/esm2015/lib/cells/icon-cell/icon-cell.component.js +0 -23
  89. package/esm2015/lib/cells/icon-cell/icon-cell.component.js.map +0 -1
  90. package/esm2015/lib/cells/icon-cell/icon-cell.component.module.js +0 -30
  91. package/esm2015/lib/cells/icon-cell/icon-cell.component.module.js.map +0 -1
  92. package/esm2015/lib/cells/image-cell/image-cell.component.js +0 -37
  93. package/esm2015/lib/cells/image-cell/image-cell.component.js.map +0 -1
  94. package/esm2015/lib/cells/image-cell/image-cell.component.module.js +0 -19
  95. package/esm2015/lib/cells/image-cell/image-cell.component.module.js.map +0 -1
  96. package/esm2015/lib/cells/link-cell/link-cell.component.js +0 -32
  97. package/esm2015/lib/cells/link-cell/link-cell.component.js.map +0 -1
  98. package/esm2015/lib/cells/link-cell/link-cell.component.module.js +0 -34
  99. package/esm2015/lib/cells/link-cell/link-cell.component.module.js.map +0 -1
  100. package/esm2015/lib/cells/options-cell/options-cell.component.js +0 -75
  101. package/esm2015/lib/cells/options-cell/options-cell.component.js.map +0 -1
  102. package/esm2015/lib/cells/options-cell/options-cell.component.module.js +0 -17
  103. package/esm2015/lib/cells/options-cell/options-cell.component.module.js.map +0 -1
  104. package/esm2015/lib/expand-row/expand-controls-cell/expand-controls-cell.component.js +0 -37
  105. package/esm2015/lib/expand-row/expand-controls-cell/expand-controls-cell.component.js.map +0 -1
  106. package/esm2015/lib/expand-row/expand-controls-cell/expand-controls-cell.component.module.js +0 -30
  107. package/esm2015/lib/expand-row/expand-controls-cell/expand-controls-cell.component.module.js.map +0 -1
  108. package/esm2015/lib/expand-row/expand-row-container/expand-row-container.component.js +0 -74
  109. package/esm2015/lib/expand-row/expand-row-container/expand-row-container.component.js.map +0 -1
  110. package/esm2015/lib/expand-row/expand-row-container/expand-row-container.component.module.js +0 -35
  111. package/esm2015/lib/expand-row/expand-row-container/expand-row-container.component.module.js.map +0 -1
  112. package/esm2015/lib/expand-row/expand-row-container/expand-row-content.directive.js +0 -22
  113. package/esm2015/lib/expand-row/expand-row-container/expand-row-content.directive.js.map +0 -1
  114. package/esm2015/lib/expand-row/expand-row.directive.js +0 -41
  115. package/esm2015/lib/expand-row/expand-row.directive.js.map +0 -1
  116. package/esm2015/lib/expand-row/expand-row.module.js +0 -31
  117. package/esm2015/lib/expand-row/expand-row.module.js.map +0 -1
  118. package/esm2015/lib/expand-row/expand-row.service.js +0 -29
  119. package/esm2015/lib/expand-row/expand-row.service.js.map +0 -1
  120. package/esm2015/lib/persistent-paginator.directive.js +0 -63
  121. package/esm2015/lib/persistent-paginator.directive.js.map +0 -1
  122. package/esm2015/lib/row-animation.js +0 -25
  123. package/esm2015/lib/row-animation.js.map +0 -1
  124. package/esm2015/lib/select-row/checkbox-cell/checkbox-cell.component.js +0 -34
  125. package/esm2015/lib/select-row/checkbox-cell/checkbox-cell.component.js.map +0 -1
  126. package/esm2015/lib/select-row/checkbox-cell/checkbox-cell.component.module.js +0 -26
  127. package/esm2015/lib/select-row/checkbox-cell/checkbox-cell.component.module.js.map +0 -1
  128. package/esm2015/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.js +0 -51
  129. package/esm2015/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.js.map +0 -1
  130. package/esm2015/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.module.js +0 -26
  131. package/esm2015/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.module.js.map +0 -1
  132. package/esm2015/lib/select-row/select-row.module.js +0 -25
  133. package/esm2015/lib/select-row/select-row.module.js.map +0 -1
  134. package/esm2015/lib/select-row/select-row.options.js +0 -2
  135. package/esm2015/lib/select-row/select-row.options.js.map +0 -1
  136. package/esm2015/lib/select-row/select-row.service.js +0 -29
  137. package/esm2015/lib/select-row/select-row.service.js.map +0 -1
  138. package/esm2015/lib/select-row/selected-rows.directive.js +0 -47
  139. package/esm2015/lib/select-row/selected-rows.directive.js.map +0 -1
  140. package/esm2015/lib/select-row/tokens.js +0 -3
  141. package/esm2015/lib/select-row/tokens.js.map +0 -1
  142. package/esm2015/lib/table-column-menu/table-column-menu.component.js +0 -63
  143. package/esm2015/lib/table-column-menu/table-column-menu.component.js.map +0 -1
  144. package/esm2015/lib/table-column-menu/table-column-menu.component.module.js +0 -47
  145. package/esm2015/lib/table-column-menu/table-column-menu.component.module.js.map +0 -1
  146. package/esm2015/lib/table-column-menu/table-column-option/table-column-option.component.js +0 -85
  147. package/esm2015/lib/table-column-menu/table-column-option/table-column-option.component.js.map +0 -1
  148. package/esm2015/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.js +0 -36
  149. package/esm2015/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.js.map +0 -1
  150. package/esm2015/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.module.js +0 -26
  151. package/esm2015/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.module.js.map +0 -1
  152. package/esm2015/lib/table-create-button/table-create-button.directive.js +0 -71
  153. package/esm2015/lib/table-create-button/table-create-button.directive.js.map +0 -1
  154. package/esm2015/lib/table-create-button/tokens.js +0 -3
  155. package/esm2015/lib/table-create-button/tokens.js.map +0 -1
  156. package/esm2015/lib/table-data-source.directive.js +0 -172
  157. package/esm2015/lib/table-data-source.directive.js.map +0 -1
  158. package/esm2015/lib/table-filter/filter-header-row.directive.js +0 -56
  159. package/esm2015/lib/table-filter/filter-header-row.directive.js.map +0 -1
  160. package/esm2015/lib/table-filter/table-filter.module.js +0 -25
  161. package/esm2015/lib/table-filter/table-filter.module.js.map +0 -1
  162. package/esm2015/lib/table-filter/table-filter.service.js +0 -36
  163. package/esm2015/lib/table-filter/table-filter.service.js.map +0 -1
  164. package/esm2015/lib/table-filter/to-filter-column-names.pipe.js +0 -16
  165. package/esm2015/lib/table-filter/to-filter-column-names.pipe.js.map +0 -1
  166. package/esm2015/lib/table-filter/tokens.js +0 -3
  167. package/esm2015/lib/table-filter/tokens.js.map +0 -1
  168. package/esm2015/lib/table-row-actions/decorators.js +0 -8
  169. package/esm2015/lib/table-row-actions/decorators.js.map +0 -1
  170. package/esm2015/lib/table-row-actions/table-row-action-executing.directive.js +0 -23
  171. package/esm2015/lib/table-row-actions/table-row-action-executing.directive.js.map +0 -1
  172. package/esm2015/lib/table-row-actions/table-row-action-status.js +0 -8
  173. package/esm2015/lib/table-row-actions/table-row-action-status.js.map +0 -1
  174. package/esm2015/lib/table-row-actions/table-row-action.directive.js +0 -199
  175. package/esm2015/lib/table-row-actions/table-row-action.directive.js.map +0 -1
  176. package/esm2015/lib/table-row-actions/table-row-action.method.js +0 -11
  177. package/esm2015/lib/table-row-actions/table-row-action.method.js.map +0 -1
  178. package/esm2015/lib/table-row-actions/table-row-actions.module.js +0 -53
  179. package/esm2015/lib/table-row-actions/table-row-actions.module.js.map +0 -1
  180. package/esm2015/lib/table-row-actions/table-row-header-action.directive.js +0 -88
  181. package/esm2015/lib/table-row-actions/table-row-header-action.directive.js.map +0 -1
  182. package/esm2015/lib/table-row-actions/tokens.js +0 -3
  183. package/esm2015/lib/table-row-actions/tokens.js.map +0 -1
  184. package/esm2015/lib/table-row-controls/row-controls-cell/row-controls-cell.component.js +0 -134
  185. package/esm2015/lib/table-row-controls/row-controls-cell/row-controls-cell.component.js.map +0 -1
  186. package/esm2015/lib/table-row-controls/row-controls-cell/row-controls-cell.component.module.js +0 -42
  187. package/esm2015/lib/table-row-controls/row-controls-cell/row-controls-cell.component.module.js.map +0 -1
  188. package/esm2015/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.js +0 -117
  189. package/esm2015/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.js.map +0 -1
  190. package/esm2015/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.module.js +0 -42
  191. package/esm2015/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.module.js.map +0 -1
  192. package/esm2015/lib/table-row-controls/table-row-controls.module.js +0 -21
  193. package/esm2015/lib/table-row-controls/table-row-controls.module.js.map +0 -1
  194. package/esm2015/lib/table-row-controls/tokens.js +0 -9
  195. package/esm2015/lib/table-row-controls/tokens.js.map +0 -1
  196. package/esm2015/lib/table-row-metadata.js +0 -2
  197. package/esm2015/lib/table-row-metadata.js.map +0 -1
  198. package/esm2015/lib/table-select-controls/table-select-controls.component.js +0 -39
  199. package/esm2015/lib/table-select-controls/table-select-controls.component.js.map +0 -1
  200. package/esm2015/lib/table-select-controls/table-select-controls.component.module.js +0 -30
  201. package/esm2015/lib/table-select-controls/table-select-controls.component.module.js.map +0 -1
  202. package/esm2015/rxap-material-table-system.js +0 -5
  203. package/esm2015/rxap-material-table-system.js.map +0 -1
  204. package/fesm2015/rxap-material-table-system.js.map +0 -1
@@ -0,0 +1,2131 @@
1
+ import * as i0 from '@angular/core';
2
+ import { TemplateRef, Directive, Inject, Injectable, ViewContainerRef, Component, ChangeDetectionStrategy, Input, ContentChild, NgModule, HostListener, InjectionToken, Optional, ChangeDetectorRef, forwardRef, Pipe, ElementRef, ContentChildren, HostBinding, Renderer2, isDevMode } from '@angular/core';
3
+ import { __decorate, __metadata, __awaiter } from 'tslib';
4
+ import * as i1 from '@angular/cdk/portal';
5
+ import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
6
+ import { Required, equals, coerceBoolean, coerceArray } from '@rxap/utilities';
7
+ import { trigger, state, style, transition, animate, sequence } from '@angular/animations';
8
+ import { BehaviorSubject, EMPTY, ReplaySubject, Subscription, Subject, isObservable, of } from 'rxjs';
9
+ import { map, filter, tap, distinctUntilChanged, debounceTime, delay, startWith } from 'rxjs/operators';
10
+ import * as i2 from '@angular/common';
11
+ import { CommonModule } from '@angular/common';
12
+ import * as i2$1 from '@angular/material/button';
13
+ import { MatButtonModule, MatButton } from '@angular/material/button';
14
+ import * as i1$1 from '@angular/material/icon';
15
+ import { MatIconModule } from '@angular/material/icon';
16
+ import { SelectionModel } from '@angular/cdk/collections';
17
+ import * as i1$2 from '@angular/material/checkbox';
18
+ import { MatCheckboxModule } from '@angular/material/checkbox';
19
+ import * as i4 from '@angular/cdk/table';
20
+ import { CdkTable } from '@angular/cdk/table';
21
+ import * as i2$2 from '@angular/material/sort';
22
+ import { MatSort } from '@angular/material/sort';
23
+ import { DynamicTableDataSource } from '@rxap/data-source/table';
24
+ import { ToggleSubject } from '@rxap/utilities/rxjs';
25
+ import { pipeDataSource } from '@rxap/data-source';
26
+ import * as i1$3 from '@angular/material/paginator';
27
+ import { FormDirective } from '@rxap/forms';
28
+ import { ControlContainer } from '@angular/forms';
29
+ import * as i1$4 from '@angular/router';
30
+ import * as i3 from '@angular/material/menu';
31
+ import { MatMenuModule } from '@angular/material/menu';
32
+ import * as i6 from '@rxap/directives';
33
+ import { StopPropagationDirectiveModule, BackgroundSizeOptions, BackgroundRepeatOptions, BackgroundPositionOptions, BackgroundImageDirectiveModule } from '@rxap/directives';
34
+ import * as i7 from '@angular/flex-layout/extended';
35
+ import { FlexLayoutModule } from '@angular/flex-layout';
36
+ import * as i3$1 from '@angular/material/slide-toggle';
37
+ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
38
+ import * as i4$1 from '@angular/flex-layout/flex';
39
+ import * as i6$1 from '@angular/material/tooltip';
40
+ import { MatTooltipModule } from '@angular/material/tooltip';
41
+ import * as i7$1 from '@rxap/components';
42
+ import { ConfirmComponentModule, CopyToClipboardModule } from '@rxap/components';
43
+ import * as i8 from '@rxap/open-api/remote-method';
44
+ import { RXAP_WINDOW_REF } from '@rxap/window-system';
45
+ import * as i3$2 from '@rxap/material-directives/icon';
46
+ import { IconDirectiveModule } from '@rxap/material-directives/icon';
47
+ import { MatOption } from '@angular/material/core';
48
+ import { setMetadata, hasMetadata, getMetadata } from '@rxap/utilities/reflect-metadata';
49
+ import * as i2$3 from '@angular/material/snack-bar';
50
+ import { MatSnackBar } from '@angular/material/snack-bar';
51
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
52
+
53
+ class ExpandRowContentDirective {
54
+ constructor(template) {
55
+ this.template = template;
56
+ }
57
+ static ngTemplateContextGuard(dir, ctx) {
58
+ return true;
59
+ }
60
+ }
61
+ ExpandRowContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowContentDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
62
+ ExpandRowContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: ExpandRowContentDirective, selector: "[rxapExpandRowContent]", ngImport: i0 });
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowContentDirective, decorators: [{
64
+ type: Directive,
65
+ args: [{
66
+ selector: '[rxapExpandRowContent]'
67
+ }]
68
+ }], ctorParameters: function () {
69
+ return [{ type: i0.TemplateRef, decorators: [{
70
+ type: Inject,
71
+ args: [TemplateRef]
72
+ }] }];
73
+ } });
74
+
75
+ class ExpandRowService {
76
+ constructor() {
77
+ this.expandedRow = new BehaviorSubject(null);
78
+ }
79
+ toggleRow(row) {
80
+ if (this.expandedRow.value === row) {
81
+ this.expandedRow.next(null);
82
+ }
83
+ else {
84
+ this.expandedRow.next(row);
85
+ }
86
+ }
87
+ isExpanded(row) {
88
+ return this.expandedRow.value === row;
89
+ }
90
+ isExpanded$(row) {
91
+ return this.expandedRow.pipe(map((expandedRow) => expandedRow === row));
92
+ }
93
+ }
94
+ ExpandRowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
95
+ ExpandRowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowService });
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowService, decorators: [{
97
+ type: Injectable
98
+ }] });
99
+
100
+ class ExpandRowContainerComponent {
101
+ constructor(viewContainerRef, expandCell) {
102
+ this.viewContainerRef = viewContainerRef;
103
+ this.expandCell = expandCell;
104
+ this.portal = null;
105
+ }
106
+ ngOnDestroy() {
107
+ var _a;
108
+ (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
109
+ }
110
+ ngAfterContentInit() {
111
+ if (this.expandCellContent) {
112
+ this._subscription = this.expandCell.isExpanded$(this.element).pipe(filter(Boolean), tap(() => {
113
+ if (!this.portal) {
114
+ this.portal = new TemplatePortal(this.expandCellContent.template, this.viewContainerRef, { $implicit: this.element });
115
+ }
116
+ })).subscribe();
117
+ }
118
+ }
119
+ }
120
+ ExpandRowContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowContainerComponent, deps: [{ token: ViewContainerRef }, { token: ExpandRowService }], target: i0.ɵɵFactoryTarget.Component });
121
+ ExpandRowContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ExpandRowContainerComponent, selector: "td[rxap-expand-row]", inputs: { element: "element" }, host: { classAttribute: "rxap-expand-row" }, queries: [{ propertyName: "expandCellContent", first: true, predicate: ExpandRowContentDirective, descendants: true }], ngImport: i0, template: "<div class=\"element-detail\" [@detailExpand]=\"(expandCell.isExpanded$(element) | async) ? 'expanded' : 'collapsed'\">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n</div>\n", styles: [".element-detail{overflow:hidden;display:flex}\n"], directives: [{ type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], pipes: { "async": i2.AsyncPipe }, animations: [
122
+ trigger('detailExpand', [
123
+ state('collapsed', style({ height: '0px', minHeight: '0' })),
124
+ state('expanded', style({ height: '*' })),
125
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)'))
126
+ ])
127
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
128
+ __decorate([
129
+ Required,
130
+ __metadata("design:type", Object)
131
+ ], ExpandRowContainerComponent.prototype, "element", void 0);
132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowContainerComponent, decorators: [{
133
+ type: Component,
134
+ args: [{ selector: 'td[rxap-expand-row]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-expand-row' }, animations: [
135
+ trigger('detailExpand', [
136
+ state('collapsed', style({ height: '0px', minHeight: '0' })),
137
+ state('expanded', style({ height: '*' })),
138
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)'))
139
+ ])
140
+ ], template: "<div class=\"element-detail\" [@detailExpand]=\"(expandCell.isExpanded$(element) | async) ? 'expanded' : 'collapsed'\">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n</div>\n", styles: [".element-detail{overflow:hidden;display:flex}\n"] }]
141
+ }], ctorParameters: function () {
142
+ return [{ type: i0.ViewContainerRef, decorators: [{
143
+ type: Inject,
144
+ args: [ViewContainerRef]
145
+ }] }, { type: ExpandRowService, decorators: [{
146
+ type: Inject,
147
+ args: [ExpandRowService]
148
+ }] }];
149
+ }, propDecorators: { element: [{
150
+ type: Input
151
+ }], expandCellContent: [{
152
+ type: ContentChild,
153
+ args: [ExpandRowContentDirective]
154
+ }] } });
155
+
156
+ class ExpandRowContainerComponentModule {
157
+ }
158
+ ExpandRowContainerComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowContainerComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
159
+ ExpandRowContainerComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowContainerComponentModule, declarations: [ExpandRowContainerComponent,
160
+ ExpandRowContentDirective], imports: [PortalModule,
161
+ CommonModule], exports: [ExpandRowContainerComponent,
162
+ ExpandRowContentDirective] });
163
+ ExpandRowContainerComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowContainerComponentModule, imports: [[
164
+ PortalModule,
165
+ CommonModule
166
+ ]] });
167
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowContainerComponentModule, decorators: [{
168
+ type: NgModule,
169
+ args: [{
170
+ declarations: [
171
+ ExpandRowContainerComponent,
172
+ ExpandRowContentDirective
173
+ ],
174
+ imports: [
175
+ PortalModule,
176
+ CommonModule
177
+ ],
178
+ exports: [
179
+ ExpandRowContainerComponent,
180
+ ExpandRowContentDirective
181
+ ]
182
+ }]
183
+ }] });
184
+
185
+ class ExpandControlsCellComponent {
186
+ constructor(expandCell) {
187
+ this.expandCell = expandCell;
188
+ }
189
+ }
190
+ ExpandControlsCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandControlsCellComponent, deps: [{ token: ExpandRowService }], target: i0.ɵɵFactoryTarget.Component });
191
+ ExpandControlsCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ExpandControlsCellComponent, selector: "td[rxap-expand-controls-cell]", inputs: { element: "element" }, host: { classAttribute: "rxap-expand-controls-cell" }, ngImport: i0, template: "<button mat-icon-button>\n <mat-icon *ngIf=\"expandCell.isExpanded$(element) | async; else notExpanded\">expand_more</mat-icon>\n <ng-template #notExpanded>\n <mat-icon>keyboard_arrow_right</mat-icon>\n </ng-template>\n</button>\n", styles: [""], components: [{ type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
192
+ __decorate([
193
+ Required,
194
+ __metadata("design:type", Object)
195
+ ], ExpandControlsCellComponent.prototype, "element", void 0);
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandControlsCellComponent, decorators: [{
197
+ type: Component,
198
+ args: [{ selector: 'td[rxap-expand-controls-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-expand-controls-cell' }, template: "<button mat-icon-button>\n <mat-icon *ngIf=\"expandCell.isExpanded$(element) | async; else notExpanded\">expand_more</mat-icon>\n <ng-template #notExpanded>\n <mat-icon>keyboard_arrow_right</mat-icon>\n </ng-template>\n</button>\n", styles: [""] }]
199
+ }], ctorParameters: function () {
200
+ return [{ type: ExpandRowService, decorators: [{
201
+ type: Inject,
202
+ args: [ExpandRowService]
203
+ }] }];
204
+ }, propDecorators: { element: [{
205
+ type: Input
206
+ }] } });
207
+
208
+ class ExpandControlsCellComponentModule {
209
+ }
210
+ ExpandControlsCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandControlsCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
211
+ ExpandControlsCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandControlsCellComponentModule, declarations: [ExpandControlsCellComponent], imports: [CommonModule,
212
+ MatIconModule,
213
+ MatButtonModule], exports: [ExpandControlsCellComponent] });
214
+ ExpandControlsCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandControlsCellComponentModule, imports: [[
215
+ CommonModule,
216
+ MatIconModule,
217
+ MatButtonModule
218
+ ]] });
219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandControlsCellComponentModule, decorators: [{
220
+ type: NgModule,
221
+ args: [{
222
+ declarations: [ExpandControlsCellComponent],
223
+ imports: [
224
+ CommonModule,
225
+ MatIconModule,
226
+ MatButtonModule
227
+ ],
228
+ exports: [ExpandControlsCellComponent]
229
+ }]
230
+ }] });
231
+
232
+ class ExpandRowDirective {
233
+ constructor(expandCell) {
234
+ this.expandCell = expandCell;
235
+ }
236
+ get isExpanded() {
237
+ return this.expandCell.isExpanded(this.element);
238
+ }
239
+ onClick() {
240
+ this.expandCell.toggleRow(this.element);
241
+ }
242
+ }
243
+ ExpandRowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowDirective, deps: [{ token: ExpandRowService }], target: i0.ɵɵFactoryTarget.Directive });
244
+ ExpandRowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: ExpandRowDirective, selector: "tr[rxapExpandRow]", inputs: { element: "element" }, host: { listeners: { "expanded-row": "isExpanded()", "click": "onClick()" } }, ngImport: i0 });
245
+ __decorate([
246
+ Required,
247
+ __metadata("design:type", Object)
248
+ ], ExpandRowDirective.prototype, "element", void 0);
249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowDirective, decorators: [{
250
+ type: Directive,
251
+ args: [{
252
+ selector: 'tr[rxapExpandRow]'
253
+ }]
254
+ }], ctorParameters: function () {
255
+ return [{ type: ExpandRowService, decorators: [{
256
+ type: Inject,
257
+ args: [ExpandRowService]
258
+ }] }];
259
+ }, propDecorators: { isExpanded: [{
260
+ type: HostListener,
261
+ args: ['expanded-row']
262
+ }], element: [{
263
+ type: Input
264
+ }], onClick: [{
265
+ type: HostListener,
266
+ args: ['click']
267
+ }] } });
268
+
269
+ class ExpandRowModule {
270
+ }
271
+ ExpandRowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
272
+ ExpandRowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowModule, declarations: [ExpandRowDirective], exports: [ExpandRowContainerComponentModule,
273
+ ExpandControlsCellComponentModule,
274
+ ExpandRowDirective] });
275
+ ExpandRowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowModule, providers: [
276
+ ExpandRowService
277
+ ], imports: [ExpandRowContainerComponentModule,
278
+ ExpandControlsCellComponentModule] });
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ExpandRowModule, decorators: [{
280
+ type: NgModule,
281
+ args: [{
282
+ exports: [
283
+ ExpandRowContainerComponentModule,
284
+ ExpandControlsCellComponentModule,
285
+ ExpandRowDirective
286
+ ],
287
+ providers: [
288
+ ExpandRowService
289
+ ],
290
+ declarations: [ExpandRowDirective]
291
+ }]
292
+ }] });
293
+
294
+ const RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS = new InjectionToken('rxap-material/table-system/select-row/options');
295
+
296
+ class SelectRowService {
297
+ constructor(options = null) {
298
+ this.selectionModel = new SelectionModel(true);
299
+ this.selectionModel = new SelectionModel(options === null || options === void 0 ? void 0 : options.multiple);
300
+ if (options === null || options === void 0 ? void 0 : options.selected) {
301
+ this.selectionModel.select(...options === null || options === void 0 ? void 0 : options.selected);
302
+ }
303
+ this.selectedRows$ = this.selectionModel.changed.pipe(map(() => this.selectionModel.selected));
304
+ }
305
+ get selectedRows() {
306
+ return this.selectionModel.selected;
307
+ }
308
+ }
309
+ SelectRowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectRowService, deps: [{ token: RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
310
+ SelectRowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectRowService });
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectRowService, decorators: [{
312
+ type: Injectable
313
+ }], ctorParameters: function () {
314
+ return [{ type: undefined, decorators: [{
315
+ type: Optional
316
+ }, {
317
+ type: Inject,
318
+ args: [RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS]
319
+ }] }];
320
+ } });
321
+
322
+ class CheckboxCellComponent {
323
+ constructor(selectRow) {
324
+ this.selectRow = selectRow;
325
+ }
326
+ }
327
+ CheckboxCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxCellComponent, deps: [{ token: SelectRowService }], target: i0.ɵɵFactoryTarget.Component });
328
+ CheckboxCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: CheckboxCellComponent, selector: "td[rxap-checkbox-cell]", inputs: { element: "element" }, host: { classAttribute: "rxap-checkbox-cell" }, ngImport: i0, template: "<mat-checkbox\n (change)=\"selectRow.selectionModel.toggle(element)\"\n [checked]=\"selectRow.selectionModel.isSelected(element)\">\n</mat-checkbox>\n", styles: [""], components: [{ type: i1$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
329
+ __decorate([
330
+ Required,
331
+ __metadata("design:type", Object)
332
+ ], CheckboxCellComponent.prototype, "element", void 0);
333
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxCellComponent, decorators: [{
334
+ type: Component,
335
+ args: [{ selector: 'td[rxap-checkbox-cell]', changeDetection: ChangeDetectionStrategy.Default, host: { class: 'rxap-checkbox-cell' }, template: "<mat-checkbox\n (change)=\"selectRow.selectionModel.toggle(element)\"\n [checked]=\"selectRow.selectionModel.isSelected(element)\">\n</mat-checkbox>\n", styles: [""] }]
336
+ }], ctorParameters: function () {
337
+ return [{ type: SelectRowService, decorators: [{
338
+ type: Inject,
339
+ args: [SelectRowService]
340
+ }] }];
341
+ }, propDecorators: { element: [{
342
+ type: Input
343
+ }] } });
344
+
345
+ class CheckboxCellComponentModule {
346
+ }
347
+ CheckboxCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
348
+ CheckboxCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxCellComponentModule, declarations: [CheckboxCellComponent], imports: [MatCheckboxModule,
349
+ CommonModule], exports: [CheckboxCellComponent] });
350
+ CheckboxCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxCellComponentModule, imports: [[
351
+ MatCheckboxModule,
352
+ CommonModule
353
+ ]] });
354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxCellComponentModule, decorators: [{
355
+ type: NgModule,
356
+ args: [{
357
+ declarations: [CheckboxCellComponent],
358
+ imports: [
359
+ MatCheckboxModule,
360
+ CommonModule
361
+ ],
362
+ exports: [CheckboxCellComponent]
363
+ }]
364
+ }] });
365
+
366
+ class CheckboxHeaderCellComponent {
367
+ constructor(cdkTable, selectRow) {
368
+ this.cdkTable = cdkTable;
369
+ this.selectRow = selectRow;
370
+ this.indeterminate$ = EMPTY;
371
+ this.checked$ = EMPTY;
372
+ this.isMultipleSelection = false;
373
+ this.isMultipleSelection =
374
+ this.selectRow.selectionModel.isMultipleSelection();
375
+ }
376
+ ngOnInit() {
377
+ this.indeterminate$ = this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
378
+ this.cdkTable['_data'].length !== selectedRows.length));
379
+ this.checked$ = this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
380
+ this.cdkTable['_data'].length === selectedRows.length));
381
+ }
382
+ onChange($event) {
383
+ if ($event.checked) {
384
+ this.selectRow.selectionModel.select(...this.cdkTable['_data']);
385
+ }
386
+ else {
387
+ this.selectRow.selectionModel.clear();
388
+ }
389
+ }
390
+ }
391
+ CheckboxHeaderCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxHeaderCellComponent, deps: [{ token: CdkTable }, { token: SelectRowService }], target: i0.ɵɵFactoryTarget.Component });
392
+ CheckboxHeaderCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: CheckboxHeaderCellComponent, selector: "th[rxap-checkbox-header-cell]", host: { classAttribute: "rxap-checkbox-header-cell" }, ngImport: i0, template: "<mat-checkbox\n *ngIf=\"isMultipleSelection\"\n (change)=\"onChange($event)\"\n [indeterminate]=\"indeterminate$ | async\"\n [checked]=\"(checked$ | async) ?? false\">\n</mat-checkbox>\n", styles: [""], components: [{ type: i1$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxHeaderCellComponent, decorators: [{
394
+ type: Component,
395
+ args: [{ selector: 'th[rxap-checkbox-header-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-checkbox-header-cell' }, template: "<mat-checkbox\n *ngIf=\"isMultipleSelection\"\n (change)=\"onChange($event)\"\n [indeterminate]=\"indeterminate$ | async\"\n [checked]=\"(checked$ | async) ?? false\">\n</mat-checkbox>\n", styles: [""] }]
396
+ }], ctorParameters: function () {
397
+ return [{ type: i4.CdkTable, decorators: [{
398
+ type: Inject,
399
+ args: [CdkTable]
400
+ }] }, { type: SelectRowService }];
401
+ } });
402
+
403
+ class CheckboxHeaderCellComponentModule {
404
+ }
405
+ CheckboxHeaderCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxHeaderCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
406
+ CheckboxHeaderCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxHeaderCellComponentModule, declarations: [CheckboxHeaderCellComponent], imports: [MatCheckboxModule,
407
+ CommonModule], exports: [CheckboxHeaderCellComponent] });
408
+ CheckboxHeaderCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxHeaderCellComponentModule, imports: [[
409
+ MatCheckboxModule,
410
+ CommonModule
411
+ ]] });
412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CheckboxHeaderCellComponentModule, decorators: [{
413
+ type: NgModule,
414
+ args: [{
415
+ declarations: [CheckboxHeaderCellComponent],
416
+ imports: [
417
+ MatCheckboxModule,
418
+ CommonModule
419
+ ],
420
+ exports: [CheckboxHeaderCellComponent]
421
+ }]
422
+ }] });
423
+
424
+ class SelectedRowsDirective {
425
+ constructor(template, viewContainerRef, cdr, selectRowService) {
426
+ this.template = template;
427
+ this.viewContainerRef = viewContainerRef;
428
+ this.cdr = cdr;
429
+ this.selectRowService = selectRowService;
430
+ }
431
+ ngOnDestroy() {
432
+ var _a;
433
+ (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
434
+ }
435
+ ngOnInit() {
436
+ this._subscription = this.selectRowService.selectedRows$.pipe(distinctUntilChanged(), tap(selectedAllRows => {
437
+ this.viewContainerRef.clear();
438
+ if (selectedAllRows) {
439
+ this.viewContainerRef.createEmbeddedView(this.template, { $implicit: this.selectRowService.selectedRows });
440
+ }
441
+ this.cdr.detectChanges();
442
+ })).subscribe();
443
+ }
444
+ }
445
+ SelectedRowsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectedRowsDirective, deps: [{ token: TemplateRef }, { token: ViewContainerRef }, { token: ChangeDetectorRef }, { token: SelectRowService }], target: i0.ɵɵFactoryTarget.Directive });
446
+ SelectedRowsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: SelectedRowsDirective, selector: "[rxapSelectedRows]", ngImport: i0 });
447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectedRowsDirective, decorators: [{
448
+ type: Directive,
449
+ args: [{
450
+ selector: '[rxapSelectedRows]'
451
+ }]
452
+ }], ctorParameters: function () {
453
+ return [{ type: i0.TemplateRef, decorators: [{
454
+ type: Inject,
455
+ args: [TemplateRef]
456
+ }] }, { type: i0.ViewContainerRef, decorators: [{
457
+ type: Inject,
458
+ args: [ViewContainerRef]
459
+ }] }, { type: i0.ChangeDetectorRef, decorators: [{
460
+ type: Inject,
461
+ args: [ChangeDetectorRef]
462
+ }] }, { type: SelectRowService, decorators: [{
463
+ type: Inject,
464
+ args: [SelectRowService]
465
+ }] }];
466
+ } });
467
+
468
+ class SelectRowModule {
469
+ }
470
+ SelectRowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectRowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
471
+ SelectRowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectRowModule, declarations: [SelectedRowsDirective], exports: [CheckboxCellComponentModule,
472
+ CheckboxHeaderCellComponentModule,
473
+ SelectedRowsDirective] });
474
+ SelectRowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectRowModule, imports: [CheckboxCellComponentModule,
475
+ CheckboxHeaderCellComponentModule] });
476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SelectRowModule, decorators: [{
477
+ type: NgModule,
478
+ args: [{
479
+ exports: [
480
+ CheckboxCellComponentModule,
481
+ CheckboxHeaderCellComponentModule,
482
+ SelectedRowsDirective
483
+ ],
484
+ declarations: [SelectedRowsDirective]
485
+ }]
486
+ }] });
487
+
488
+ const offset = '50';
489
+ const RowAnimation = trigger('rowsAnimation', [
490
+ transition('void => *', [
491
+ style({
492
+ height: '*',
493
+ opacity: '0',
494
+ transform: 'translateY(' + (-offset).toString() + 'px)',
495
+ 'box-shadow': 'none'
496
+ }),
497
+ sequence([
498
+ animate('.2s ease', style({
499
+ height: '*',
500
+ opacity: '.2',
501
+ transform: 'translateX(0)',
502
+ 'box-shadow': 'none'
503
+ })),
504
+ animate('.35s ease', style({ height: '*', opacity: 1, transform: 'translateX(0)' }))
505
+ ])
506
+ ]),
507
+ transition('* => void', [
508
+ style({ height: '0', opacity: '0', 'box-shadow': 'none' })
509
+ ])
510
+ ]);
511
+
512
+ class TableFilterService {
513
+ constructor() {
514
+ this.change = new ReplaySubject(1);
515
+ this.current = {};
516
+ this._subscription = this.change.subscribe(current => this.current = current);
517
+ }
518
+ setMap(map) {
519
+ const current = this.current;
520
+ const next = Object.assign(current, map);
521
+ this.change.next(next);
522
+ }
523
+ set(key, value) {
524
+ const current = this.current;
525
+ current[key] = value;
526
+ this.change.next(current);
527
+ }
528
+ remove(key) {
529
+ const current = this.current;
530
+ if (current.hasOwnProperty(key)) {
531
+ delete current[key];
532
+ }
533
+ this.change.next(current);
534
+ }
535
+ ngOnDestroy() {
536
+ this._subscription.unsubscribe();
537
+ }
538
+ }
539
+ TableFilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
540
+ TableFilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableFilterService });
541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableFilterService, decorators: [{
542
+ type: Injectable
543
+ }], ctorParameters: function () { return []; } });
544
+
545
+ // TODO : add migration schematic
546
+ const RXAP_TABLE_METHOD = new InjectionToken('rxap/material/table-system/table-method');
547
+ /**
548
+ * @deprecated use TABLE_METHOD instead
549
+ */
550
+ const TABLE_REMOTE_METHOD = RXAP_TABLE_METHOD;
551
+ const TABLE_REMOTE_METHOD_ADAPTER_FACTORY = new InjectionToken('table-remote-method-adapter-factory');
552
+ const RXAP_TABLE_FILTER = new InjectionToken('rxap/material-table-system/table-filter');
553
+ const TABLE_DATA_SOURCE = new InjectionToken('table-data-source');
554
+ class TableDataSourceDirective {
555
+ constructor(matTable, cdr, sourceMethod, sourceDataSource, adapterFactory, matSort, tableFilter, _tableFilter) {
556
+ this.matTable = matTable;
557
+ this.cdr = cdr;
558
+ this.sourceMethod = sourceMethod;
559
+ this.sourceDataSource = sourceDataSource;
560
+ this.matSort = matSort;
561
+ this.tableFilter = tableFilter;
562
+ this._tableFilter = _tableFilter;
563
+ this.loading$ = new ToggleSubject(true);
564
+ this._subscription = new Subscription();
565
+ this.adapterFactory = null;
566
+ this.matTable.trackBy = this.trackBy;
567
+ this.adapterFactory = adapterFactory;
568
+ }
569
+ /**
570
+ * @deprecated use dataSource instead
571
+ */
572
+ set setDataSource(dataSource) {
573
+ if (typeof dataSource !== 'string') {
574
+ this.dataSource = dataSource;
575
+ }
576
+ }
577
+ /**
578
+ * @deprecated use method instead
579
+ */
580
+ get remoteMethod() {
581
+ return this.method;
582
+ }
583
+ /**
584
+ * @deprecated use sourceMethod instead
585
+ */
586
+ get sourceRemoteMethod() {
587
+ return this.sourceMethod;
588
+ }
589
+ trackBy(index, item) {
590
+ var _a;
591
+ return (_a = item.uuid) !== null && _a !== void 0 ? _a : index;
592
+ }
593
+ ngOnInit() {
594
+ var _a, _b, _c, _d;
595
+ const tableFilter = (_b = (_a = this._tableFilter) !== null && _a !== void 0 ? _a : this.tableFilter) !== null && _b !== void 0 ? _b : undefined;
596
+ if (this.sourceMethod) {
597
+ if (this.adapterFactory) {
598
+ this.method = this.adapterFactory(this.sourceMethod, this.paginator, this.matSort, tableFilter, this.parameters);
599
+ }
600
+ else {
601
+ this.method = this.sourceMethod;
602
+ }
603
+ this.dataSource = new DynamicTableDataSource(this.method, this.paginator, this.matSort, tableFilter, this.parameters, (_c = this.method.metadata) !== null && _c !== void 0 ? _c : { id: this.id });
604
+ }
605
+ else if (this.sourceDataSource) {
606
+ this.dataSource = this.sourceDataSource;
607
+ }
608
+ else if (!this.dataSource) {
609
+ throw new Error('The TABLE_DATA_SOURCE and TABLE_METHOD token are not defined!');
610
+ }
611
+ this.dataSource.paginator = this.paginator;
612
+ this.dataSource.sort = (_d = this.matSort) !== null && _d !== void 0 ? _d : undefined;
613
+ this.dataSource.filter = tableFilter;
614
+ this.dataSource.parameters = this.parameters;
615
+ this._subscription.add(this.dataSource.loading$.pipe(tap(loading => this.loading$.next(!!loading))).subscribe());
616
+ this.matTable.dataSource = pipeDataSource(this.dataSource, tap(rowList => rowList.forEach((element) => {
617
+ element.__metadata__ = { loading$: new ToggleSubject() };
618
+ })));
619
+ // TODO : remove hack to trigger change detection after data source refresh (machine-definition -> physical unit)
620
+ this._subscription.add(this.loading$
621
+ .pipe(filter((loading) => !loading), debounceTime(2000), tap(() => this.cdr.detectChanges()), tap(() => this.cdr.markForCheck()), delay(500), tap(() => this.cdr.detectChanges()), tap(() => this.cdr.markForCheck()), delay(500), tap(() => this.cdr.detectChanges()), tap(() => this.cdr.markForCheck()), delay(500), tap(() => this.cdr.detectChanges()), tap(() => this.cdr.markForCheck()), delay(500), tap(() => this.cdr.detectChanges()), tap(() => this.cdr.markForCheck()), delay(500), tap(() => this.cdr.detectChanges()), tap(() => this.cdr.markForCheck()), delay(500))
622
+ .subscribe());
623
+ }
624
+ ngOnDestroy() {
625
+ this._subscription.unsubscribe();
626
+ }
627
+ refresh() {
628
+ var _a;
629
+ (_a = this.dataSource) === null || _a === void 0 ? void 0 : _a.refresh();
630
+ }
631
+ }
632
+ TableDataSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableDataSourceDirective, deps: [{ token: CdkTable }, { token: i0.ChangeDetectorRef }, { token: RXAP_TABLE_METHOD, optional: true }, { token: TABLE_DATA_SOURCE, optional: true }, { token: TABLE_REMOTE_METHOD_ADAPTER_FACTORY, optional: true }, { token: MatSort, optional: true }, { token: TableFilterService, optional: true }, { token: RXAP_TABLE_FILTER, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
633
+ TableDataSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: TableDataSourceDirective, selector: "table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]", inputs: { setDataSource: ["rxapTableDataSource", "setDataSource"], paginator: "paginator", id: "id", parameters: "parameters", dataSource: "dataSource" }, exportAs: ["rxapTableDataSource"], ngImport: i0 });
634
+ __decorate([
635
+ Required,
636
+ __metadata("design:type", String)
637
+ ], TableDataSourceDirective.prototype, "id", void 0);
638
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableDataSourceDirective, decorators: [{
639
+ type: Directive,
640
+ args: [{
641
+ selector: 'table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]',
642
+ exportAs: 'rxapTableDataSource'
643
+ }]
644
+ }], ctorParameters: function () {
645
+ return [{ type: i4.CdkTable, decorators: [{
646
+ type: Inject,
647
+ args: [CdkTable]
648
+ }] }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
649
+ type: Optional
650
+ }, {
651
+ type: Inject,
652
+ args: [RXAP_TABLE_METHOD]
653
+ }] }, { type: undefined, decorators: [{
654
+ type: Optional
655
+ }, {
656
+ type: Inject,
657
+ args: [TABLE_DATA_SOURCE]
658
+ }] }, { type: undefined, decorators: [{
659
+ type: Optional
660
+ }, {
661
+ type: Inject,
662
+ args: [TABLE_REMOTE_METHOD_ADAPTER_FACTORY]
663
+ }] }, { type: i2$2.MatSort, decorators: [{
664
+ type: Optional
665
+ }, {
666
+ type: Inject,
667
+ args: [MatSort]
668
+ }] }, { type: TableFilterService, decorators: [{
669
+ type: Optional
670
+ }, {
671
+ type: Inject,
672
+ args: [TableFilterService]
673
+ }] }, { type: undefined, decorators: [{
674
+ type: Optional
675
+ }, {
676
+ type: Inject,
677
+ args: [RXAP_TABLE_FILTER]
678
+ }] }];
679
+ }, propDecorators: { setDataSource: [{
680
+ type: Input,
681
+ args: ['rxapTableDataSource']
682
+ }], paginator: [{
683
+ type: Input
684
+ }], id: [{
685
+ type: Input
686
+ }], parameters: [{
687
+ type: Input
688
+ }], dataSource: [{
689
+ type: Input
690
+ }] } });
691
+ class TableDataSourceModule {
692
+ }
693
+ TableDataSourceModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableDataSourceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
694
+ TableDataSourceModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableDataSourceModule, declarations: [TableDataSourceDirective], exports: [TableDataSourceDirective] });
695
+ TableDataSourceModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableDataSourceModule });
696
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableDataSourceModule, decorators: [{
697
+ type: NgModule,
698
+ args: [{
699
+ exports: [TableDataSourceDirective],
700
+ declarations: [TableDataSourceDirective],
701
+ }]
702
+ }] });
703
+
704
+ class PersistentPaginatorDirective {
705
+ constructor(matPaginator) {
706
+ this.matPaginator = matPaginator;
707
+ }
708
+ ngOnInit() {
709
+ const config = this.restoreConfig();
710
+ if (config) {
711
+ this.matPaginator.pageSize = config.pageSize;
712
+ }
713
+ this._subscription = this.matPaginator.page.pipe(tap(() => this.storeConfig())).subscribe();
714
+ }
715
+ ngOnDestroy() {
716
+ var _a;
717
+ (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
718
+ }
719
+ getKey() {
720
+ return 'rxap_mat-paginator-persistent' + this.id;
721
+ }
722
+ storeConfig() {
723
+ const pageSize = this.matPaginator.pageSize;
724
+ localStorage.setItem(this.getKey(), JSON.stringify({ pageSize }));
725
+ }
726
+ restoreConfig() {
727
+ const configStorage = localStorage.getItem(this.getKey());
728
+ if (configStorage) {
729
+ try {
730
+ return JSON.parse(configStorage);
731
+ }
732
+ catch (e) {
733
+ console.warn(`Could not parse mat paginator persistent config: ${e.message}`);
734
+ }
735
+ }
736
+ return null;
737
+ }
738
+ }
739
+ PersistentPaginatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PersistentPaginatorDirective, deps: [{ token: i1$3.MatPaginator }], target: i0.ɵɵFactoryTarget.Directive });
740
+ PersistentPaginatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: PersistentPaginatorDirective, selector: "mat-paginator[rxapPersistent]", inputs: { id: "id" }, ngImport: i0 });
741
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PersistentPaginatorDirective, decorators: [{
742
+ type: Directive,
743
+ args: [{
744
+ selector: 'mat-paginator[rxapPersistent]'
745
+ }]
746
+ }], ctorParameters: function () { return [{ type: i1$3.MatPaginator }]; }, propDecorators: { id: [{
747
+ type: Input
748
+ }] } });
749
+ class PersistentPaginatorDirectiveModule {
750
+ }
751
+ PersistentPaginatorDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PersistentPaginatorDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
752
+ PersistentPaginatorDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PersistentPaginatorDirectiveModule, declarations: [PersistentPaginatorDirective], exports: [PersistentPaginatorDirective] });
753
+ PersistentPaginatorDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PersistentPaginatorDirectiveModule });
754
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PersistentPaginatorDirectiveModule, decorators: [{
755
+ type: NgModule,
756
+ args: [{
757
+ exports: [PersistentPaginatorDirective],
758
+ declarations: [PersistentPaginatorDirective]
759
+ }]
760
+ }] });
761
+
762
+ const RXAP_TABLE_FILTER_FORM_DEFINITION = new InjectionToken('rxap/form-table-system/filter-form-definition');
763
+
764
+ class FilterHeaderRowDirective extends FormDirective {
765
+ constructor(tableFilter, cdr, formDefinition) {
766
+ super(cdr, formDefinition);
767
+ this.tableFilter = tableFilter;
768
+ }
769
+ ngOnInit() {
770
+ super.ngOnInit();
771
+ this._subscription = this.form.value$
772
+ .pipe(debounceTime(1000), map((values) => Object.entries(values)
773
+ .filter(([key, value]) => value !== null && value !== undefined && value !== '')
774
+ .reduce((obj, [key, value]) => (Object.assign(Object.assign({}, obj), { [key]: value })), {})), distinctUntilChanged((a, b) => equals(a, b)), tap(values => this.tableFilter.setMap(values)))
775
+ .subscribe();
776
+ }
777
+ ngOnDestroy() {
778
+ var _a;
779
+ super.ngOnDestroy();
780
+ (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
781
+ }
782
+ }
783
+ FilterHeaderRowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FilterHeaderRowDirective, deps: [{ token: TableFilterService }, { token: i0.ChangeDetectorRef }, { token: RXAP_TABLE_FILTER_FORM_DEFINITION, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
784
+ FilterHeaderRowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FilterHeaderRowDirective, selector: "table[rxap-filter-header-row]", providers: [
785
+ {
786
+ provide: ControlContainer,
787
+ // ignore coverage
788
+ useExisting: forwardRef(() => FilterHeaderRowDirective),
789
+ },
790
+ ], usesInheritance: true, ngImport: i0 });
791
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FilterHeaderRowDirective, decorators: [{
792
+ type: Directive,
793
+ args: [{
794
+ // tslint:disable-next-line:directive-selector
795
+ selector: 'table[rxap-filter-header-row]',
796
+ providers: [
797
+ {
798
+ provide: ControlContainer,
799
+ // ignore coverage
800
+ useExisting: forwardRef(() => FilterHeaderRowDirective),
801
+ },
802
+ ],
803
+ }]
804
+ }], ctorParameters: function () {
805
+ return [{ type: TableFilterService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
806
+ type: Optional
807
+ }, {
808
+ type: Inject,
809
+ args: [RXAP_TABLE_FILTER_FORM_DEFINITION]
810
+ }] }];
811
+ } });
812
+
813
+ class ToFilterColumnNamesPipe {
814
+ transform(columns) {
815
+ return columns.map(column => 'filter_' + column);
816
+ }
817
+ }
818
+ ToFilterColumnNamesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ToFilterColumnNamesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
819
+ ToFilterColumnNamesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ToFilterColumnNamesPipe, name: "toFilterColumnNames" });
820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ToFilterColumnNamesPipe, decorators: [{
821
+ type: Pipe,
822
+ args: [{
823
+ name: 'toFilterColumnNames'
824
+ }]
825
+ }] });
826
+
827
+ class TableFilterModule {
828
+ }
829
+ TableFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
830
+ TableFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableFilterModule, declarations: [ToFilterColumnNamesPipe,
831
+ FilterHeaderRowDirective], exports: [ToFilterColumnNamesPipe,
832
+ FilterHeaderRowDirective] });
833
+ TableFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableFilterModule });
834
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableFilterModule, decorators: [{
835
+ type: NgModule,
836
+ args: [{
837
+ exports: [
838
+ ToFilterColumnNamesPipe,
839
+ FilterHeaderRowDirective
840
+ ],
841
+ declarations: [
842
+ ToFilterColumnNamesPipe,
843
+ FilterHeaderRowDirective
844
+ ]
845
+ }]
846
+ }] });
847
+
848
+ class TableColumnOptionComponent {
849
+ constructor(_element, router) {
850
+ this._element = _element;
851
+ this.router = router;
852
+ this.active = true;
853
+ this._hidden = false;
854
+ }
855
+ /**
856
+ * The displayed value of the option. It is necessary to show the selected option in the
857
+ * select's trigger.
858
+ */
859
+ get display() {
860
+ return (this._element.nativeElement.textContent || '').trim();
861
+ }
862
+ set inactive(value) {
863
+ this.active = !coerceBoolean(value);
864
+ }
865
+ set hidden(value) {
866
+ this._hidden = coerceBoolean(value);
867
+ }
868
+ get hidden() {
869
+ return this._hidden;
870
+ }
871
+ set show(value) {
872
+ this._hidden = !value;
873
+ }
874
+ get cacheId() {
875
+ return this.router.url + '--' + this.name;
876
+ }
877
+ ngOnInit() {
878
+ const cachedValue = localStorage.getItem(this.cacheId);
879
+ if (cachedValue === 'true') {
880
+ this.active = true;
881
+ }
882
+ if (cachedValue === 'false') {
883
+ this.active = false;
884
+ }
885
+ }
886
+ toggle() {
887
+ this.active = !this.active;
888
+ localStorage.setItem(this.cacheId, this.active ? 'true' : 'false');
889
+ }
890
+ activate() {
891
+ this.active = true;
892
+ localStorage.setItem(this.cacheId, 'true');
893
+ }
894
+ deactivate() {
895
+ this.active = false;
896
+ localStorage.setItem(this.cacheId, 'false');
897
+ }
898
+ }
899
+ TableColumnOptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableColumnOptionComponent, deps: [{ token: ElementRef }, { token: i1$4.Router }], target: i0.ɵɵFactoryTarget.Component });
900
+ TableColumnOptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: TableColumnOptionComponent, selector: "rxap-table-column-option", inputs: { name: "name", active: "active", inactive: "inactive", hidden: "hidden", show: "show" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] });
901
+ __decorate([
902
+ Required,
903
+ __metadata("design:type", String)
904
+ ], TableColumnOptionComponent.prototype, "name", void 0);
905
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableColumnOptionComponent, decorators: [{
906
+ type: Component,
907
+ args: [{ selector: 'rxap-table-column-option', template: "<ng-content></ng-content>\n", styles: [""] }]
908
+ }], ctorParameters: function () {
909
+ return [{ type: i0.ElementRef, decorators: [{
910
+ type: Inject,
911
+ args: [ElementRef]
912
+ }] }, { type: i1$4.Router }];
913
+ }, propDecorators: { name: [{
914
+ type: Input
915
+ }], active: [{
916
+ type: Input
917
+ }], inactive: [{
918
+ type: Input
919
+ }], hidden: [{
920
+ type: Input
921
+ }], show: [{
922
+ type: Input
923
+ }] } });
924
+
925
+ class TableColumnMenuComponent {
926
+ constructor() {
927
+ this.displayColumns = [];
928
+ this._matCardMode = false;
929
+ }
930
+ set matCard(value) {
931
+ this._matCardMode = coerceBoolean(value);
932
+ }
933
+ ngAfterContentInit() {
934
+ this.updateDisplayColumns();
935
+ }
936
+ updateDisplayColumns() {
937
+ if (!this.columns) {
938
+ throw new Error('Could not query content children of TableColumnOptionComponent');
939
+ }
940
+ this.displayColumns = this.columns
941
+ .filter((option) => option.active)
942
+ .map((option) => option.name);
943
+ }
944
+ activate(columnName) {
945
+ var _a;
946
+ (_a = this.columns) === null || _a === void 0 ? void 0 : _a.filter((option) => option.name === columnName).forEach((column) => column.activate());
947
+ this.updateDisplayColumns();
948
+ }
949
+ deactivate(columnName) {
950
+ var _a;
951
+ (_a = this.columns) === null || _a === void 0 ? void 0 : _a.filter((option) => option.name === columnName).forEach((column) => column.deactivate());
952
+ this.updateDisplayColumns();
953
+ }
954
+ }
955
+ TableColumnMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableColumnMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
956
+ TableColumnMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: TableColumnMenuComponent, selector: "rxap-table-column-menu", inputs: { matCard: "matCard" }, host: { properties: { "class.mat-card-mode": "this._matCardMode" }, classAttribute: "mfd-table-column-menu" }, queries: [{ propertyName: "columns", predicate: TableColumnOptionComponent }], exportAs: ["rxapTableColumns"], ngImport: i0, template: "<button type=\"button\" mat-icon-button [matMenuTriggerFor]=\"columnMenu\">\n <mat-icon>tune</mat-icon>\n</button>\n\n<mat-menu #columnMenu=\"matMenu\">\n <span\n rxapStopPropagation\n *ngFor=\"let column of columns\"\n [disableRipple]=\"true\"\n [fxHide]=\"column.hidden\"\n mat-menu-item\n >\n <mat-checkbox\n (change)=\"column.toggle(); updateDisplayColumns()\"\n [checked]=\"column.active\">\n {{ column.display }}\n </mat-checkbox>\n </span>\n <ng-content select=\"[mat-menu-item],mat-divider\"></ng-content>\n</mat-menu>\n", styles: [":host.mat-card-mode{position:absolute;top:8px;right:8px;bottom:auto;left:auto}\n"], components: [{ type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i1$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.StopPropagationDirective, selector: "[rxapStopPropagation]" }, { type: i7.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
957
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableColumnMenuComponent, decorators: [{
958
+ type: Component,
959
+ args: [{ selector: 'rxap-table-column-menu', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mfd-table-column-menu' }, exportAs: 'rxapTableColumns', template: "<button type=\"button\" mat-icon-button [matMenuTriggerFor]=\"columnMenu\">\n <mat-icon>tune</mat-icon>\n</button>\n\n<mat-menu #columnMenu=\"matMenu\">\n <span\n rxapStopPropagation\n *ngFor=\"let column of columns\"\n [disableRipple]=\"true\"\n [fxHide]=\"column.hidden\"\n mat-menu-item\n >\n <mat-checkbox\n (change)=\"column.toggle(); updateDisplayColumns()\"\n [checked]=\"column.active\">\n {{ column.display }}\n </mat-checkbox>\n </span>\n <ng-content select=\"[mat-menu-item],mat-divider\"></ng-content>\n</mat-menu>\n", styles: [":host.mat-card-mode{position:absolute;top:8px;right:8px;bottom:auto;left:auto}\n"] }]
960
+ }], propDecorators: { columns: [{
961
+ type: ContentChildren,
962
+ args: [TableColumnOptionComponent]
963
+ }], matCard: [{
964
+ type: Input
965
+ }], _matCardMode: [{
966
+ type: HostBinding,
967
+ args: ['class.mat-card-mode']
968
+ }] } });
969
+
970
+ class TableColumnMenuComponentModule {
971
+ }
972
+ TableColumnMenuComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableColumnMenuComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
973
+ TableColumnMenuComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableColumnMenuComponentModule, declarations: [TableColumnMenuComponent, TableColumnOptionComponent], imports: [MatButtonModule,
974
+ MatIconModule,
975
+ MatMenuModule,
976
+ CommonModule,
977
+ MatCheckboxModule,
978
+ StopPropagationDirectiveModule,
979
+ FlexLayoutModule], exports: [TableColumnMenuComponent, TableColumnOptionComponent, MatMenuModule] });
980
+ TableColumnMenuComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableColumnMenuComponentModule, imports: [[
981
+ MatButtonModule,
982
+ MatIconModule,
983
+ MatMenuModule,
984
+ CommonModule,
985
+ MatCheckboxModule,
986
+ StopPropagationDirectiveModule,
987
+ FlexLayoutModule
988
+ ], MatMenuModule] });
989
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableColumnMenuComponentModule, decorators: [{
990
+ type: NgModule,
991
+ args: [{
992
+ declarations: [TableColumnMenuComponent, TableColumnOptionComponent],
993
+ imports: [
994
+ MatButtonModule,
995
+ MatIconModule,
996
+ MatMenuModule,
997
+ CommonModule,
998
+ MatCheckboxModule,
999
+ StopPropagationDirectiveModule,
1000
+ FlexLayoutModule
1001
+ ],
1002
+ exports: [TableColumnMenuComponent, TableColumnOptionComponent, MatMenuModule]
1003
+ }]
1004
+ }] });
1005
+
1006
+ class TableShowArchivedSlideComponent {
1007
+ constructor(tableFilter, tableColumnMenu) {
1008
+ this.tableFilter = tableFilter;
1009
+ this.tableColumnMenu = tableColumnMenu;
1010
+ }
1011
+ onChange($event) {
1012
+ this.tableFilter.set('__archived', $event.checked);
1013
+ if ($event.checked) {
1014
+ this.tableColumnMenu.activate('removedAt');
1015
+ }
1016
+ else {
1017
+ this.tableColumnMenu.deactivate('removedAt');
1018
+ }
1019
+ }
1020
+ }
1021
+ TableShowArchivedSlideComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableShowArchivedSlideComponent, deps: [{ token: TableFilterService }, { token: TableColumnMenuComponent }], target: i0.ɵɵFactoryTarget.Component });
1022
+ TableShowArchivedSlideComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: TableShowArchivedSlideComponent, selector: "mfd-table-show-archived-slide", host: { classAttribute: "mfd-table-show-archived-slide" }, ngImport: i0, template: "<div rxapStopPropagation>\n <mat-slide-toggle (change)=\"onChange($event)\" i18n=\"@@rxap.material.table-system.table-column-menu.table-show-archived-slide\">\n Show archived documents\n </mat-slide-toggle>\n</div>\n", styles: [""], components: [{ type: i3$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], directives: [{ type: i6.StopPropagationDirective, selector: "[rxapStopPropagation]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1023
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableShowArchivedSlideComponent, decorators: [{
1024
+ type: Component,
1025
+ args: [{ selector: 'mfd-table-show-archived-slide', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mfd-table-show-archived-slide' }, template: "<div rxapStopPropagation>\n <mat-slide-toggle (change)=\"onChange($event)\" i18n=\"@@rxap.material.table-system.table-column-menu.table-show-archived-slide\">\n Show archived documents\n </mat-slide-toggle>\n</div>\n", styles: [""] }]
1026
+ }], ctorParameters: function () { return [{ type: TableFilterService }, { type: TableColumnMenuComponent }]; } });
1027
+
1028
+ class TableShowArchivedSlideComponentModule {
1029
+ }
1030
+ TableShowArchivedSlideComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableShowArchivedSlideComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1031
+ TableShowArchivedSlideComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableShowArchivedSlideComponentModule, declarations: [TableShowArchivedSlideComponent], imports: [StopPropagationDirectiveModule,
1032
+ MatSlideToggleModule], exports: [TableShowArchivedSlideComponent] });
1033
+ TableShowArchivedSlideComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableShowArchivedSlideComponentModule, imports: [[
1034
+ StopPropagationDirectiveModule,
1035
+ MatSlideToggleModule,
1036
+ ]] });
1037
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableShowArchivedSlideComponentModule, decorators: [{
1038
+ type: NgModule,
1039
+ args: [{
1040
+ declarations: [TableShowArchivedSlideComponent],
1041
+ imports: [
1042
+ StopPropagationDirectiveModule,
1043
+ MatSlideToggleModule,
1044
+ ],
1045
+ exports: [TableShowArchivedSlideComponent],
1046
+ }]
1047
+ }] });
1048
+
1049
+ const TABLE_CREATE_REMOTE_METHOD = new InjectionToken('table-create-remote-method');
1050
+
1051
+ class TableCreateButtonDirective {
1052
+ constructor(remoteMethod, elementRef, renderer) {
1053
+ this.remoteMethod = remoteMethod;
1054
+ this.elementRef = elementRef;
1055
+ this.renderer = renderer;
1056
+ }
1057
+ ngOnInit() {
1058
+ this.renderer.setStyle(this.elementRef.nativeElement, 'margin-bottom', '6px');
1059
+ }
1060
+ ngOnDestroy() {
1061
+ if (this._createObservable instanceof Subject) {
1062
+ this._createObservable.complete();
1063
+ }
1064
+ }
1065
+ onClick() {
1066
+ return __awaiter(this, void 0, void 0, function* () {
1067
+ const result = this._createObservable = yield this.remoteMethod.call();
1068
+ if (isObservable(result)) {
1069
+ yield result.toPromise();
1070
+ }
1071
+ this.dataSource.refresh();
1072
+ });
1073
+ }
1074
+ }
1075
+ TableCreateButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableCreateButtonDirective, deps: [{ token: TABLE_CREATE_REMOTE_METHOD }, { token: ElementRef }, { token: Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1076
+ TableCreateButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: TableCreateButtonDirective, selector: "button[rxapTableCreate]", inputs: { dataSource: ["rxapTableCreate", "dataSource"] }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1077
+ __decorate([
1078
+ Required,
1079
+ __metadata("design:type", TableDataSourceDirective)
1080
+ ], TableCreateButtonDirective.prototype, "dataSource", void 0);
1081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableCreateButtonDirective, decorators: [{
1082
+ type: Directive,
1083
+ args: [{
1084
+ selector: 'button[rxapTableCreate]'
1085
+ }]
1086
+ }], ctorParameters: function () {
1087
+ return [{ type: undefined, decorators: [{
1088
+ type: Inject,
1089
+ args: [TABLE_CREATE_REMOTE_METHOD]
1090
+ }] }, { type: i0.ElementRef, decorators: [{
1091
+ type: Inject,
1092
+ args: [ElementRef]
1093
+ }] }, { type: i0.Renderer2, decorators: [{
1094
+ type: Inject,
1095
+ args: [Renderer2]
1096
+ }] }];
1097
+ }, propDecorators: { dataSource: [{
1098
+ type: Input,
1099
+ args: ['rxapTableCreate']
1100
+ }], onClick: [{
1101
+ type: HostListener,
1102
+ args: ['click']
1103
+ }] } });
1104
+ class TableCreateButtonDirectiveModule {
1105
+ }
1106
+ TableCreateButtonDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableCreateButtonDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1107
+ TableCreateButtonDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableCreateButtonDirectiveModule, declarations: [TableCreateButtonDirective], exports: [TableCreateButtonDirective] });
1108
+ TableCreateButtonDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableCreateButtonDirectiveModule });
1109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableCreateButtonDirectiveModule, decorators: [{
1110
+ type: NgModule,
1111
+ args: [{
1112
+ declarations: [TableCreateButtonDirective],
1113
+ exports: [TableCreateButtonDirective],
1114
+ }]
1115
+ }] });
1116
+
1117
+ const ROW_ARCHIVE_METHOD = new InjectionToken('archive-remote-method');
1118
+ const ROW_RESTORE_METHOD = new InjectionToken('unarchive-remote-method');
1119
+ const ROW_DELETE_METHOD = new InjectionToken('delete-remote-method');
1120
+ const ROW_EDIT_METHOD = new InjectionToken('edit-remote-method');
1121
+ const ROW_VIEW_METHOD = new InjectionToken('view-remote-method');
1122
+ const ROW_LINK_METHOD = new InjectionToken('link-remote-method');
1123
+ const ROW_EDIT_LOADER_METHOD = new InjectionToken('edit-loader-method');
1124
+
1125
+ class RowControlsCellComponent {
1126
+ constructor(tableDataSource, deleteRemoteMethod = null, archiveRemoteMethod = null, unarchiveRemoteMethod = null, editRemoteMethod = null, rowViewMethod = null, rowLinkMethod = null, editLoaderMethod = null) {
1127
+ this.tableDataSource = tableDataSource;
1128
+ this.deleteRemoteMethod = deleteRemoteMethod;
1129
+ this.archiveRemoteMethod = archiveRemoteMethod;
1130
+ this.unarchiveRemoteMethod = unarchiveRemoteMethod;
1131
+ this.editRemoteMethod = editRemoteMethod;
1132
+ this.rowViewMethod = rowViewMethod;
1133
+ this.rowLinkMethod = rowLinkMethod;
1134
+ this.editLoaderMethod = editLoaderMethod;
1135
+ }
1136
+ archive() {
1137
+ return __awaiter(this, void 0, void 0, function* () {
1138
+ if (this.archiveRemoteMethod) {
1139
+ yield this.archiveRemoteMethod.call({ parameters: { uuid: this.element.uuid } });
1140
+ this.tableDataSource.refresh();
1141
+ }
1142
+ });
1143
+ }
1144
+ unarchive() {
1145
+ return __awaiter(this, void 0, void 0, function* () {
1146
+ if (this.unarchiveRemoteMethod) {
1147
+ yield this.unarchiveRemoteMethod.call({ parameters: { uuid: this.element.uuid } });
1148
+ this.tableDataSource.refresh();
1149
+ }
1150
+ });
1151
+ }
1152
+ remove() {
1153
+ return __awaiter(this, void 0, void 0, function* () {
1154
+ if (this.deleteRemoteMethod) {
1155
+ yield this.deleteRemoteMethod.call({ parameters: { uuid: this.element.uuid } });
1156
+ this.tableDataSource.refresh();
1157
+ }
1158
+ });
1159
+ }
1160
+ view() {
1161
+ return __awaiter(this, void 0, void 0, function* () {
1162
+ if (this.rowViewMethod) {
1163
+ yield this.rowViewMethod.call(this.element);
1164
+ }
1165
+ });
1166
+ }
1167
+ link() {
1168
+ return __awaiter(this, void 0, void 0, function* () {
1169
+ if (this.rowLinkMethod) {
1170
+ yield this.rowLinkMethod.call(this.element);
1171
+ }
1172
+ });
1173
+ }
1174
+ edit() {
1175
+ return __awaiter(this, void 0, void 0, function* () {
1176
+ if (this.editRemoteMethod) {
1177
+ let initial = this.element;
1178
+ if (this.editLoaderMethod) {
1179
+ initial = yield this.editLoaderMethod.call(initial);
1180
+ }
1181
+ const result = yield this.editRemoteMethod.call(initial, { context: this.element });
1182
+ if (isObservable(result)) {
1183
+ yield result.toPromise();
1184
+ }
1185
+ this.tableDataSource.refresh();
1186
+ }
1187
+ });
1188
+ }
1189
+ }
1190
+ RowControlsCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsCellComponent, deps: [{ token: TableDataSourceDirective }, { token: ROW_DELETE_METHOD, optional: true }, { token: ROW_ARCHIVE_METHOD, optional: true }, { token: ROW_RESTORE_METHOD, optional: true }, { token: ROW_EDIT_METHOD, optional: true }, { token: ROW_VIEW_METHOD, optional: true }, { token: ROW_LINK_METHOD, optional: true }, { token: ROW_EDIT_LOADER_METHOD, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1191
+ RowControlsCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: RowControlsCellComponent, selector: "td[mfd-row-controls-cell]", inputs: { element: "element" }, host: { classAttribute: "mfd-row-controls-cell" }, ngImport: i0, template: "<div fxLayout=\"row\">\n\n <!-- archive -->\n <button (confirmed)=\"archive()\" *ngIf=\"!element.__archived && archiveRemoteMethod\" mat-icon-button matTooltip=\"Archivieren\" rxapConfirm type=\"button\"\n fxFlex=\"40px\">\n <mat-icon>archive</mat-icon>\n </button>\n\n <!-- unarchive -->\n <button (confirmed)=\"unarchive()\" *ngIf=\"element.__archived && unarchiveRemoteMethod\" mat-icon-button matTooltip=\"Wiederherstellen\" rxapConfirm type=\"button\"\n fxFlex=\"40px\">\n <mat-icon>unarchive</mat-icon>\n </button>\n\n <!-- delete -->\n <button *ngIf=\"(element.__archived && deleteRemoteMethod) || (deleteRemoteMethod && !unarchiveRemoteMethod && !archiveRemoteMethod)\" matTooltip=\"L\u00F6schen\"\n type=\"button\"\n (confirmed)=\"remove()\" mat-icon-button color=\"warn\"\n rxapConfirm fxFlex=\"40px\">\n <mat-icon>delete</mat-icon>\n </button>\n\n <!-- edit -->\n <button (click)=\"edit()\" *ngIf=\"!element.__archived && editRemoteMethod\" fxFlex=\"40px\" mat-icon-button matTooltip=\"Bearbeiten\" type=\"button\">\n <mat-icon>edit</mat-icon>\n </button>\n\n <!-- view -->\n <button (click)=\"view()\" *ngIf=\"rowViewMethod\" fxFlex=\"40px\" mat-icon-button matTooltip=\"Details\" type=\"button\">\n <mat-icon>visibility</mat-icon>\n </button>\n\n <!-- link -->\n <button type=\"button\" *ngIf=\"rowLinkMethod\" (click)=\"link()\" mat-icon-button fxFlex=\"40px\">\n <mat-icon svgIcon=\"database-import\"></mat-icon>\n </button>\n\n</div>\n", styles: [""], components: [{ type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i7$1.ConfirmDirective, selector: "[rxapConfirm]", inputs: ["rxapConfirm"], outputs: ["confirmed", "unconfirmed"] }, { type: i4$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1192
+ __decorate([
1193
+ Required,
1194
+ __metadata("design:type", Object)
1195
+ ], RowControlsCellComponent.prototype, "element", void 0);
1196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsCellComponent, decorators: [{
1197
+ type: Component,
1198
+ args: [{ selector: 'td[mfd-row-controls-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mfd-row-controls-cell' }, template: "<div fxLayout=\"row\">\n\n <!-- archive -->\n <button (confirmed)=\"archive()\" *ngIf=\"!element.__archived && archiveRemoteMethod\" mat-icon-button matTooltip=\"Archivieren\" rxapConfirm type=\"button\"\n fxFlex=\"40px\">\n <mat-icon>archive</mat-icon>\n </button>\n\n <!-- unarchive -->\n <button (confirmed)=\"unarchive()\" *ngIf=\"element.__archived && unarchiveRemoteMethod\" mat-icon-button matTooltip=\"Wiederherstellen\" rxapConfirm type=\"button\"\n fxFlex=\"40px\">\n <mat-icon>unarchive</mat-icon>\n </button>\n\n <!-- delete -->\n <button *ngIf=\"(element.__archived && deleteRemoteMethod) || (deleteRemoteMethod && !unarchiveRemoteMethod && !archiveRemoteMethod)\" matTooltip=\"L\u00F6schen\"\n type=\"button\"\n (confirmed)=\"remove()\" mat-icon-button color=\"warn\"\n rxapConfirm fxFlex=\"40px\">\n <mat-icon>delete</mat-icon>\n </button>\n\n <!-- edit -->\n <button (click)=\"edit()\" *ngIf=\"!element.__archived && editRemoteMethod\" fxFlex=\"40px\" mat-icon-button matTooltip=\"Bearbeiten\" type=\"button\">\n <mat-icon>edit</mat-icon>\n </button>\n\n <!-- view -->\n <button (click)=\"view()\" *ngIf=\"rowViewMethod\" fxFlex=\"40px\" mat-icon-button matTooltip=\"Details\" type=\"button\">\n <mat-icon>visibility</mat-icon>\n </button>\n\n <!-- link -->\n <button type=\"button\" *ngIf=\"rowLinkMethod\" (click)=\"link()\" mat-icon-button fxFlex=\"40px\">\n <mat-icon svgIcon=\"database-import\"></mat-icon>\n </button>\n\n</div>\n", styles: [""] }]
1199
+ }], ctorParameters: function () {
1200
+ return [{ type: TableDataSourceDirective }, { type: i8.OpenApiRemoteMethod, decorators: [{
1201
+ type: Optional
1202
+ }, {
1203
+ type: Inject,
1204
+ args: [ROW_DELETE_METHOD]
1205
+ }] }, { type: i8.OpenApiRemoteMethod, decorators: [{
1206
+ type: Optional
1207
+ }, {
1208
+ type: Inject,
1209
+ args: [ROW_ARCHIVE_METHOD]
1210
+ }] }, { type: i8.OpenApiRemoteMethod, decorators: [{
1211
+ type: Optional
1212
+ }, {
1213
+ type: Inject,
1214
+ args: [ROW_RESTORE_METHOD]
1215
+ }] }, { type: undefined, decorators: [{
1216
+ type: Optional
1217
+ }, {
1218
+ type: Inject,
1219
+ args: [ROW_EDIT_METHOD]
1220
+ }] }, { type: undefined, decorators: [{
1221
+ type: Optional
1222
+ }, {
1223
+ type: Inject,
1224
+ args: [ROW_VIEW_METHOD]
1225
+ }] }, { type: undefined, decorators: [{
1226
+ type: Optional
1227
+ }, {
1228
+ type: Inject,
1229
+ args: [ROW_LINK_METHOD]
1230
+ }] }, { type: undefined, decorators: [{
1231
+ type: Optional
1232
+ }, {
1233
+ type: Inject,
1234
+ args: [ROW_EDIT_LOADER_METHOD]
1235
+ }] }];
1236
+ }, propDecorators: { element: [{
1237
+ type: Input
1238
+ }] } });
1239
+
1240
+ class RowControlsCellComponentModule {
1241
+ }
1242
+ RowControlsCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1243
+ RowControlsCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsCellComponentModule, declarations: [RowControlsCellComponent], imports: [CommonModule,
1244
+ FlexLayoutModule,
1245
+ MatButtonModule,
1246
+ MatIconModule,
1247
+ ConfirmComponentModule,
1248
+ MatTooltipModule], exports: [RowControlsCellComponent] });
1249
+ RowControlsCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsCellComponentModule, imports: [[
1250
+ CommonModule,
1251
+ FlexLayoutModule,
1252
+ MatButtonModule,
1253
+ MatIconModule,
1254
+ ConfirmComponentModule,
1255
+ MatTooltipModule
1256
+ ]] });
1257
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsCellComponentModule, decorators: [{
1258
+ type: NgModule,
1259
+ args: [{
1260
+ declarations: [RowControlsCellComponent],
1261
+ imports: [
1262
+ CommonModule,
1263
+ FlexLayoutModule,
1264
+ MatButtonModule,
1265
+ MatIconModule,
1266
+ ConfirmComponentModule,
1267
+ MatTooltipModule
1268
+ ],
1269
+ exports: [RowControlsCellComponent]
1270
+ }]
1271
+ }] });
1272
+
1273
+ class RowControlsHeaderCellComponent {
1274
+ constructor(tableDataSource, tableFilter = null, selectRow = null, deleteRemoteMethod = null, archiveRemoteMethod = null, unarchiveRemoteMethod = null) {
1275
+ var _a, _b, _c, _d, _e, _f;
1276
+ this.tableDataSource = tableDataSource;
1277
+ this.tableFilter = tableFilter;
1278
+ this.selectRow = selectRow;
1279
+ this.deleteRemoteMethod = deleteRemoteMethod;
1280
+ this.archiveRemoteMethod = archiveRemoteMethod;
1281
+ this.unarchiveRemoteMethod = unarchiveRemoteMethod;
1282
+ this.disabled$ =
1283
+ (_b = (_a = this.selectRow) === null || _a === void 0 ? void 0 : _a.selectedRows$.pipe(map((selectedRows) => selectedRows.length === 0), startWith(true))) !== null && _b !== void 0 ? _b : of(true);
1284
+ this.showUnarchive$ = this.showDelete$ =
1285
+ (_d = (_c = this.tableFilter) === null || _c === void 0 ? void 0 : _c.change.pipe(map((filter) => filter &&
1286
+ filter.hasOwnProperty('__archived') &&
1287
+ filter['__archived'] === true), distinctUntilChanged())) !== null && _d !== void 0 ? _d : of(false);
1288
+ this.showArchive$ =
1289
+ (_f = (_e = this.tableFilter) === null || _e === void 0 ? void 0 : _e.change.pipe(map((filter) => !filter ||
1290
+ !filter.hasOwnProperty('__archived') ||
1291
+ filter['__archived'] === false), distinctUntilChanged())) !== null && _f !== void 0 ? _f : of(true);
1292
+ }
1293
+ archiveSelected(selectedRows) {
1294
+ return __awaiter(this, void 0, void 0, function* () {
1295
+ if (this.archiveRemoteMethod && selectedRows) {
1296
+ yield Promise.all(selectedRows.map((selectedRow) => {
1297
+ var _a;
1298
+ return (_a = this.archiveRemoteMethod) === null || _a === void 0 ? void 0 : _a.call({
1299
+ parameters: { uuid: selectedRow.uuid },
1300
+ });
1301
+ }));
1302
+ this.tableDataSource.refresh();
1303
+ }
1304
+ });
1305
+ }
1306
+ unarchiveSelected(selectedRows) {
1307
+ return __awaiter(this, void 0, void 0, function* () {
1308
+ if (this.unarchiveRemoteMethod && selectedRows) {
1309
+ yield Promise.all(selectedRows.map((selectedRow) => {
1310
+ var _a;
1311
+ return (_a = this.unarchiveRemoteMethod) === null || _a === void 0 ? void 0 : _a.call({
1312
+ parameters: { uuid: selectedRow.uuid },
1313
+ });
1314
+ }));
1315
+ this.tableDataSource.refresh();
1316
+ }
1317
+ });
1318
+ }
1319
+ deleteSelected(selectedRows) {
1320
+ return __awaiter(this, void 0, void 0, function* () {
1321
+ if (this.deleteRemoteMethod && selectedRows) {
1322
+ yield Promise.all(selectedRows.map((selectedRow) => {
1323
+ var _a;
1324
+ return (_a = this.deleteRemoteMethod) === null || _a === void 0 ? void 0 : _a.call({
1325
+ parameters: { uuid: selectedRow.uuid },
1326
+ });
1327
+ }));
1328
+ this.tableDataSource.refresh();
1329
+ }
1330
+ });
1331
+ }
1332
+ }
1333
+ RowControlsHeaderCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsHeaderCellComponent, deps: [{ token: TableDataSourceDirective }, { token: TableFilterService, optional: true }, { token: SelectRowService, optional: true }, { token: ROW_DELETE_METHOD, optional: true }, { token: ROW_ARCHIVE_METHOD, optional: true }, { token: ROW_RESTORE_METHOD, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1334
+ RowControlsHeaderCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: RowControlsHeaderCellComponent, selector: "th[mfd-row-controls-header-cell]", host: { classAttribute: "mfd-row-controls-header-cell" }, ngImport: i0, template: "<div fxLayout=\"row\">\n\n <!-- archive -->\n <button *ngIf=\"selectRow && (showArchive$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"Archivieren\" type=\"button\"\n (confirmed)=\"archiveSelected($event)\" mat-icon-button\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>archive</mat-icon>\n </button>\n\n <!-- unarchive -->\n <button *ngIf=\"selectRow && (showUnarchive$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"Wiederherstellen\" type=\"button\"\n (confirmed)=\"unarchiveSelected($event)\" mat-icon-button\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>unarchive</mat-icon>\n </button>\n\n <!-- delete -->\n <button (confirmed)=\"deleteSelected($event)\" *ngIf=\"selectRow && (showDelete$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"L\u00F6schen\" type=\"button\"\n mat-icon-button color=\"warn\"\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>delete</mat-icon>\n </button>\n\n</div>\n", styles: [""], components: [{ type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i7$1.ConfirmDirective, selector: "[rxapConfirm]", inputs: ["rxapConfirm"], outputs: ["confirmed", "unconfirmed"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsHeaderCellComponent, decorators: [{
1336
+ type: Component,
1337
+ args: [{ selector: 'th[mfd-row-controls-header-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mfd-row-controls-header-cell' }, template: "<div fxLayout=\"row\">\n\n <!-- archive -->\n <button *ngIf=\"selectRow && (showArchive$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"Archivieren\" type=\"button\"\n (confirmed)=\"archiveSelected($event)\" mat-icon-button\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>archive</mat-icon>\n </button>\n\n <!-- unarchive -->\n <button *ngIf=\"selectRow && (showUnarchive$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"Wiederherstellen\" type=\"button\"\n (confirmed)=\"unarchiveSelected($event)\" mat-icon-button\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>unarchive</mat-icon>\n </button>\n\n <!-- delete -->\n <button (confirmed)=\"deleteSelected($event)\" *ngIf=\"selectRow && (showDelete$ | async)\" [disabled]=\"disabled$ | async\" matTooltip=\"L\u00F6schen\" type=\"button\"\n mat-icon-button color=\"warn\"\n [rxapConfirm]=\"selectRow.selectedRows\" fxFlex=\"40px\">\n <mat-icon>delete</mat-icon>\n </button>\n\n</div>\n", styles: [""] }]
1338
+ }], ctorParameters: function () {
1339
+ return [{ type: TableDataSourceDirective }, { type: TableFilterService, decorators: [{
1340
+ type: Optional
1341
+ }, {
1342
+ type: Inject,
1343
+ args: [TableFilterService]
1344
+ }] }, { type: SelectRowService, decorators: [{
1345
+ type: Optional
1346
+ }, {
1347
+ type: Inject,
1348
+ args: [SelectRowService]
1349
+ }] }, { type: i8.OpenApiRemoteMethod, decorators: [{
1350
+ type: Optional
1351
+ }, {
1352
+ type: Inject,
1353
+ args: [ROW_DELETE_METHOD]
1354
+ }] }, { type: i8.OpenApiRemoteMethod, decorators: [{
1355
+ type: Optional
1356
+ }, {
1357
+ type: Inject,
1358
+ args: [ROW_ARCHIVE_METHOD]
1359
+ }] }, { type: i8.OpenApiRemoteMethod, decorators: [{
1360
+ type: Optional
1361
+ }, {
1362
+ type: Inject,
1363
+ args: [ROW_RESTORE_METHOD]
1364
+ }] }];
1365
+ } });
1366
+
1367
+ class RowControlsHeaderCellComponentModule {
1368
+ }
1369
+ RowControlsHeaderCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsHeaderCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1370
+ RowControlsHeaderCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsHeaderCellComponentModule, declarations: [RowControlsHeaderCellComponent], imports: [FlexLayoutModule,
1371
+ MatButtonModule,
1372
+ MatIconModule,
1373
+ ConfirmComponentModule,
1374
+ CommonModule,
1375
+ MatTooltipModule], exports: [RowControlsHeaderCellComponent] });
1376
+ RowControlsHeaderCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsHeaderCellComponentModule, imports: [[
1377
+ FlexLayoutModule,
1378
+ MatButtonModule,
1379
+ MatIconModule,
1380
+ ConfirmComponentModule,
1381
+ CommonModule,
1382
+ MatTooltipModule,
1383
+ ]] });
1384
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: RowControlsHeaderCellComponentModule, decorators: [{
1385
+ type: NgModule,
1386
+ args: [{
1387
+ declarations: [RowControlsHeaderCellComponent],
1388
+ imports: [
1389
+ FlexLayoutModule,
1390
+ MatButtonModule,
1391
+ MatIconModule,
1392
+ ConfirmComponentModule,
1393
+ CommonModule,
1394
+ MatTooltipModule,
1395
+ ],
1396
+ exports: [RowControlsHeaderCellComponent],
1397
+ }]
1398
+ }] });
1399
+
1400
+ class TableRowControlsModule {
1401
+ }
1402
+ TableRowControlsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowControlsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1403
+ TableRowControlsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowControlsModule, exports: [RowControlsCellComponentModule,
1404
+ RowControlsHeaderCellComponentModule] });
1405
+ TableRowControlsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowControlsModule, imports: [RowControlsCellComponentModule,
1406
+ RowControlsHeaderCellComponentModule] });
1407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowControlsModule, decorators: [{
1408
+ type: NgModule,
1409
+ args: [{
1410
+ exports: [
1411
+ RowControlsCellComponentModule,
1412
+ RowControlsHeaderCellComponentModule
1413
+ ]
1414
+ }]
1415
+ }] });
1416
+
1417
+ class TableSelectControlsComponent {
1418
+ constructor(selectRows, windowRef) {
1419
+ this.selectRows = selectRows;
1420
+ this.windowRef = windowRef;
1421
+ this.hasNotSelected$ = this.selectRows.selectedRows$.pipe(map((selected) => selected.length === 0));
1422
+ }
1423
+ cancel() {
1424
+ this.windowRef.close();
1425
+ }
1426
+ select() {
1427
+ this.windowRef.close(this.selectRows.selectedRows);
1428
+ }
1429
+ }
1430
+ TableSelectControlsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableSelectControlsComponent, deps: [{ token: SelectRowService }, { token: RXAP_WINDOW_REF }], target: i0.ɵɵFactoryTarget.Component });
1431
+ TableSelectControlsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: TableSelectControlsComponent, selector: "mfd-table-select-controls", host: { classAttribute: "mfd-table-select-controls" }, ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutGap=\"16px\">\n <button fxFlex=\"nogrow\" mat-stroked-button (click)=\"cancel()\" type=\"button\"\n i18n=\"@@rxap-material.table-system.table-select-controls.cancel\">Cancel\n </button>\n <button fxFlex=\"nogrow\" mat-raised-button (click)=\"select()\" type=\"button\" [disabled]=\"hasNotSelected$ | async\"\n i18n=\"@@rxap-material.table-system.table-select-controls.select\">Select\n </button>\n</div>\n", styles: [""], components: [{ type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i4$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableSelectControlsComponent, decorators: [{
1433
+ type: Component,
1434
+ args: [{ selector: 'mfd-table-select-controls', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mfd-table-select-controls' }, template: "<div fxLayout=\"row\" fxLayoutGap=\"16px\">\n <button fxFlex=\"nogrow\" mat-stroked-button (click)=\"cancel()\" type=\"button\"\n i18n=\"@@rxap-material.table-system.table-select-controls.cancel\">Cancel\n </button>\n <button fxFlex=\"nogrow\" mat-raised-button (click)=\"select()\" type=\"button\" [disabled]=\"hasNotSelected$ | async\"\n i18n=\"@@rxap-material.table-system.table-select-controls.select\">Select\n </button>\n</div>\n", styles: [""] }]
1435
+ }], ctorParameters: function () {
1436
+ return [{ type: SelectRowService }, { type: undefined, decorators: [{
1437
+ type: Inject,
1438
+ args: [RXAP_WINDOW_REF]
1439
+ }] }];
1440
+ } });
1441
+
1442
+ class TableSelectControlsComponentModule {
1443
+ }
1444
+ TableSelectControlsComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableSelectControlsComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1445
+ TableSelectControlsComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableSelectControlsComponentModule, declarations: [TableSelectControlsComponent], imports: [MatButtonModule,
1446
+ FlexLayoutModule,
1447
+ CommonModule], exports: [TableSelectControlsComponent] });
1448
+ TableSelectControlsComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableSelectControlsComponentModule, imports: [[
1449
+ MatButtonModule,
1450
+ FlexLayoutModule,
1451
+ CommonModule
1452
+ ]] });
1453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableSelectControlsComponentModule, decorators: [{
1454
+ type: NgModule,
1455
+ args: [{
1456
+ declarations: [TableSelectControlsComponent],
1457
+ imports: [
1458
+ MatButtonModule,
1459
+ FlexLayoutModule,
1460
+ CommonModule
1461
+ ],
1462
+ exports: [TableSelectControlsComponent]
1463
+ }]
1464
+ }] });
1465
+
1466
+ class ImageCellComponent {
1467
+ constructor() {
1468
+ this.size = BackgroundSizeOptions.COVER;
1469
+ this.repeat = BackgroundRepeatOptions.NO_REPEAT;
1470
+ this.position = BackgroundPositionOptions.CENTER_CENTER;
1471
+ this.value = null;
1472
+ }
1473
+ }
1474
+ ImageCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ImageCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1475
+ ImageCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ImageCellComponent, selector: "td[rxap-image-cell]", inputs: { preset: "preset", size: "size", repeat: "repeat", position: "position", value: ["rxap-image-cell", "value"] }, host: { classAttribute: "rxap-image-cell" }, ngImport: i0, template: "<div\n *ngIf=\"value\"\n [ngClass]=\"[preset]\"\n [repeat]=\"repeat\"\n [size]=\"size\"\n [position]=\"position\"\n [rxapBackgroundImage]=\"value\"\n class=\"image\">\n</div>\n<ng-content></ng-content>\n", styles: [".image{width:40px;height:40px}.image.circle{border-radius:24px}.image.rounded{border-radius:8px}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.BackgroundImageDirective, selector: "[rxapBackgroundImage]", inputs: ["rxapBackgroundImage", "placeholderImageUrl", "size", "repeat", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ImageCellComponent, decorators: [{
1477
+ type: Component,
1478
+ args: [{ selector: 'td[rxap-image-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-image-cell' }, template: "<div\n *ngIf=\"value\"\n [ngClass]=\"[preset]\"\n [repeat]=\"repeat\"\n [size]=\"size\"\n [position]=\"position\"\n [rxapBackgroundImage]=\"value\"\n class=\"image\">\n</div>\n<ng-content></ng-content>\n", styles: [".image{width:40px;height:40px}.image.circle{border-radius:24px}.image.rounded{border-radius:8px}\n"] }]
1479
+ }], propDecorators: { preset: [{
1480
+ type: Input
1481
+ }], size: [{
1482
+ type: Input
1483
+ }], repeat: [{
1484
+ type: Input
1485
+ }], position: [{
1486
+ type: Input
1487
+ }], value: [{
1488
+ type: Input,
1489
+ args: ['rxap-image-cell']
1490
+ }] } });
1491
+
1492
+ class ImageCellComponentModule {
1493
+ }
1494
+ ImageCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ImageCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1495
+ ImageCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ImageCellComponentModule, declarations: [ImageCellComponent], imports: [BackgroundImageDirectiveModule, CommonModule], exports: [ImageCellComponent] });
1496
+ ImageCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ImageCellComponentModule, imports: [[BackgroundImageDirectiveModule, CommonModule]] });
1497
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ImageCellComponentModule, decorators: [{
1498
+ type: NgModule,
1499
+ args: [{
1500
+ declarations: [ImageCellComponent],
1501
+ imports: [BackgroundImageDirectiveModule, CommonModule],
1502
+ exports: [ImageCellComponent]
1503
+ }]
1504
+ }] });
1505
+
1506
+ class CopyToClipboardCellComponent {
1507
+ }
1508
+ CopyToClipboardCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1509
+ CopyToClipboardCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: CopyToClipboardCellComponent, selector: "td[rxap-copy-to-clipboard-cell]", inputs: { value: ["rxap-copy-to-clipboard-cell", "value"] }, host: { classAttribute: "rxap-copy-to-clipboard-cell" }, ngImport: i0, template: "<rxap-copy-to-clipboard *ngIf=\"value !== null && value !== undefined && value !== ''\" [value]=\"value\" class=\"copy-to-clipboard\"></rxap-copy-to-clipboard>\n<ng-content></ng-content>\n", styles: ["::ng-deep .copy-to-clipboard .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], components: [{ type: i7$1.CopyToClipboardComponent, selector: "rxap-copy-to-clipboard", inputs: ["active", "disabled", "value"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardCellComponent, decorators: [{
1511
+ type: Component,
1512
+ args: [{ selector: 'td[rxap-copy-to-clipboard-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-copy-to-clipboard-cell' }, template: "<rxap-copy-to-clipboard *ngIf=\"value !== null && value !== undefined && value !== ''\" [value]=\"value\" class=\"copy-to-clipboard\"></rxap-copy-to-clipboard>\n<ng-content></ng-content>\n", styles: ["::ng-deep .copy-to-clipboard .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
1513
+ }], propDecorators: { value: [{
1514
+ type: Input,
1515
+ args: ['rxap-copy-to-clipboard-cell']
1516
+ }] } });
1517
+
1518
+ class CopyToClipboardCellComponentModule {
1519
+ }
1520
+ CopyToClipboardCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1521
+ CopyToClipboardCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardCellComponentModule, declarations: [CopyToClipboardCellComponent], imports: [CopyToClipboardModule,
1522
+ CommonModule], exports: [CopyToClipboardCellComponent] });
1523
+ CopyToClipboardCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardCellComponentModule, imports: [[
1524
+ CopyToClipboardModule,
1525
+ CommonModule
1526
+ ]] });
1527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardCellComponentModule, decorators: [{
1528
+ type: NgModule,
1529
+ args: [{
1530
+ declarations: [CopyToClipboardCellComponent],
1531
+ imports: [
1532
+ CopyToClipboardModule,
1533
+ CommonModule
1534
+ ],
1535
+ exports: [CopyToClipboardCellComponent]
1536
+ }]
1537
+ }] });
1538
+
1539
+ class IconCellComponent {
1540
+ }
1541
+ IconCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: IconCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1542
+ IconCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: IconCellComponent, selector: "td[rxap-icon-cell]", inputs: { icon: ["rxap-icon-cell", "icon"] }, host: { classAttribute: "rxap-icon-cell" }, ngImport: i0, template: "<mat-icon *ngIf=\"icon\" [rxapIcon]=\"icon\"></mat-icon>\n<ng-content></ng-content>\n", styles: [""], components: [{ type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$2.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1543
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: IconCellComponent, decorators: [{
1544
+ type: Component,
1545
+ args: [{ selector: 'td[rxap-icon-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-icon-cell' }, template: "<mat-icon *ngIf=\"icon\" [rxapIcon]=\"icon\"></mat-icon>\n<ng-content></ng-content>\n", styles: [""] }]
1546
+ }], propDecorators: { icon: [{
1547
+ type: Input,
1548
+ args: ['rxap-icon-cell']
1549
+ }] } });
1550
+
1551
+ class IconCellComponentModule {
1552
+ }
1553
+ IconCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: IconCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1554
+ IconCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: IconCellComponentModule, declarations: [IconCellComponent], imports: [MatIconModule,
1555
+ CommonModule,
1556
+ IconDirectiveModule], exports: [IconCellComponent] });
1557
+ IconCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: IconCellComponentModule, imports: [[
1558
+ MatIconModule,
1559
+ CommonModule,
1560
+ IconDirectiveModule,
1561
+ ]] });
1562
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: IconCellComponentModule, decorators: [{
1563
+ type: NgModule,
1564
+ args: [{
1565
+ declarations: [IconCellComponent],
1566
+ imports: [
1567
+ MatIconModule,
1568
+ CommonModule,
1569
+ IconDirectiveModule,
1570
+ ],
1571
+ exports: [IconCellComponent]
1572
+ }]
1573
+ }] });
1574
+
1575
+ class DateCellComponent {
1576
+ constructor() {
1577
+ this.date = null;
1578
+ this.format = 'dd.MM.yyyy HH:mm';
1579
+ }
1580
+ }
1581
+ DateCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1582
+ DateCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: DateCellComponent, selector: "td[rxap-date-cell]", inputs: { date: ["rxap-date-cell", "date"], format: "format" }, host: { classAttribute: "rxap-date-cell" }, ngImport: i0, template: "<ng-template [ngIf]=\"date\">\n {{date | date:format}}\n</ng-template>\n<ng-content></ng-content>\n", styles: [""], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "date": i2.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1583
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateCellComponent, decorators: [{
1584
+ type: Component,
1585
+ args: [{ selector: 'td[rxap-date-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-date-cell' }, template: "<ng-template [ngIf]=\"date\">\n {{date | date:format}}\n</ng-template>\n<ng-content></ng-content>\n", styles: [""] }]
1586
+ }], propDecorators: { date: [{
1587
+ type: Input,
1588
+ args: ['rxap-date-cell']
1589
+ }], format: [{
1590
+ type: Input
1591
+ }] } });
1592
+
1593
+ class DateCellComponentModule {
1594
+ }
1595
+ DateCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1596
+ DateCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateCellComponentModule, declarations: [DateCellComponent], imports: [CommonModule], exports: [DateCellComponent] });
1597
+ DateCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateCellComponentModule, imports: [[
1598
+ CommonModule,
1599
+ ]] });
1600
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DateCellComponentModule, decorators: [{
1601
+ type: NgModule,
1602
+ args: [{
1603
+ declarations: [DateCellComponent],
1604
+ imports: [
1605
+ CommonModule,
1606
+ ],
1607
+ exports: [DateCellComponent],
1608
+ }]
1609
+ }] });
1610
+
1611
+ class LinkCellComponent {
1612
+ get href() {
1613
+ if (this.protocol) {
1614
+ return [this.protocol, this.value].join(':');
1615
+ }
1616
+ return this.value;
1617
+ }
1618
+ }
1619
+ LinkCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LinkCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1620
+ LinkCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: LinkCellComponent, selector: "td[rxap-link-cell]", inputs: { value: ["rxap-link-cell", "value"], protocol: "protocol" }, host: { classAttribute: "rxap-link-cell" }, ngImport: i0, template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n <span fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"start center\">\n <ng-container [ngSwitch]=\"protocol\">\n <mat-icon *ngSwitchCase=\"'tel'\" fxFlex=\"nogrow\">call</mat-icon>\n <mat-icon *ngSwitchCase=\"'mailto'\" fxFlex=\"nogrow\">email</mat-icon>\n <mat-icon *ngSwitchDefault fxFlex=\"nogrow\">launch</mat-icon>\n </ng-container>\n <span fxFlex=\"nogrow\" class=\"content\">{{value}}</span>\n </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], components: [{ type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i4$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1621
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LinkCellComponent, decorators: [{
1622
+ type: Component,
1623
+ args: [{ selector: 'td[rxap-link-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-link-cell' }, template: "<a *ngIf=\"value\" [href]=\"href\" [matTooltip]=\"value\" class=\"link\" target=\"_blank\">\n <span fxLayout=\"row\" fxLayoutGap=\"8px\" fxLayoutAlign=\"start center\">\n <ng-container [ngSwitch]=\"protocol\">\n <mat-icon *ngSwitchCase=\"'tel'\" fxFlex=\"nogrow\">call</mat-icon>\n <mat-icon *ngSwitchCase=\"'mailto'\" fxFlex=\"nogrow\">email</mat-icon>\n <mat-icon *ngSwitchDefault fxFlex=\"nogrow\">launch</mat-icon>\n </ng-container>\n <span fxFlex=\"nogrow\" class=\"content\">{{value}}</span>\n </span>\n</a>\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
1624
+ }], propDecorators: { value: [{
1625
+ type: Input,
1626
+ args: ['rxap-link-cell']
1627
+ }], protocol: [{
1628
+ type: Input
1629
+ }] } });
1630
+
1631
+ class LinkCellComponentModule {
1632
+ }
1633
+ LinkCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LinkCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1634
+ LinkCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LinkCellComponentModule, declarations: [LinkCellComponent], imports: [MatTooltipModule,
1635
+ MatIconModule,
1636
+ FlexLayoutModule,
1637
+ CommonModule], exports: [LinkCellComponent] });
1638
+ LinkCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LinkCellComponentModule, imports: [[
1639
+ MatTooltipModule,
1640
+ MatIconModule,
1641
+ FlexLayoutModule,
1642
+ CommonModule
1643
+ ]] });
1644
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LinkCellComponentModule, decorators: [{
1645
+ type: NgModule,
1646
+ args: [{
1647
+ declarations: [LinkCellComponent],
1648
+ imports: [
1649
+ MatTooltipModule,
1650
+ MatIconModule,
1651
+ FlexLayoutModule,
1652
+ CommonModule
1653
+ ],
1654
+ exports: [LinkCellComponent]
1655
+ }]
1656
+ }] });
1657
+
1658
+ class OptionsCellComponent {
1659
+ constructor(renderer) {
1660
+ this.renderer = renderer;
1661
+ this._subscription = new Subscription();
1662
+ this._initialised = false;
1663
+ this.defaultViewValue = ''; // $localize`:@@rxap-material.table-system.options-cell.unknown:unknown`;
1664
+ this.emptyViewValue = ''; // $localize`:@@rxap-material.table-system.options-cell.empty:empty`;
1665
+ }
1666
+ ngAfterContentInit() {
1667
+ // Hide the mat-option elements
1668
+ this._subscription.add(this.options.changes.pipe(startWith(null), tap(() => this.options.forEach(option => this.renderer.setStyle(option._getHostElement(), 'display', 'none')))).subscribe());
1669
+ this.setViewValue();
1670
+ this._initialised = true;
1671
+ }
1672
+ setViewValue() {
1673
+ if (this.value === undefined || this.value === null) {
1674
+ this.viewValue = this.emptyViewValue;
1675
+ }
1676
+ else {
1677
+ if (this.options) {
1678
+ this._subscription.add(this.options.changes
1679
+ .pipe(startWith(null), tap(() => (this.viewValue = this.getViewValue())))
1680
+ .subscribe());
1681
+ }
1682
+ else if (isDevMode()) {
1683
+ console.log('Could not load any option');
1684
+ }
1685
+ }
1686
+ }
1687
+ ngOnChanges(changes) {
1688
+ if (this._initialised) {
1689
+ if (changes['value']) {
1690
+ this.setViewValue();
1691
+ }
1692
+ }
1693
+ }
1694
+ getViewValue() {
1695
+ var _a, _b;
1696
+ return ((_b = (_a = this.options.find((option) => option.value === this.value)) === null || _a === void 0 ? void 0 : _a.viewValue) !== null && _b !== void 0 ? _b : this.defaultViewValue);
1697
+ }
1698
+ ngOnDestroy() {
1699
+ var _a;
1700
+ (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1701
+ }
1702
+ }
1703
+ OptionsCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OptionsCellComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1704
+ OptionsCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: OptionsCellComponent, selector: "td[rxap-options-cell]", inputs: { value: ["rxap-options-cell", "value"], defaultViewValue: ["default", "defaultViewValue"], emptyViewValue: ["empty", "emptyViewValue"] }, host: { classAttribute: "rxap-options-cell" }, queries: [{ propertyName: "options", predicate: MatOption, descendants: true }], usesOnChanges: true, ngImport: i0, template: "{{viewValue}}\n<ng-content></ng-content>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1705
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OptionsCellComponent, decorators: [{
1706
+ type: Component,
1707
+ args: [{ selector: 'td[rxap-options-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-options-cell' }, template: "{{viewValue}}\n<ng-content></ng-content>\n", styles: [""] }]
1708
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { value: [{
1709
+ type: Input,
1710
+ args: ['rxap-options-cell']
1711
+ }], defaultViewValue: [{
1712
+ type: Input,
1713
+ args: ['default']
1714
+ }], emptyViewValue: [{
1715
+ type: Input,
1716
+ args: ['empty']
1717
+ }], options: [{
1718
+ type: ContentChildren,
1719
+ args: [MatOption, { descendants: true }]
1720
+ }] } });
1721
+
1722
+ class OptionsCellComponentModule {
1723
+ }
1724
+ OptionsCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OptionsCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1725
+ OptionsCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OptionsCellComponentModule, declarations: [OptionsCellComponent], exports: [OptionsCellComponent] });
1726
+ OptionsCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OptionsCellComponentModule, imports: [[]] });
1727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OptionsCellComponentModule, decorators: [{
1728
+ type: NgModule,
1729
+ args: [{
1730
+ declarations: [OptionsCellComponent],
1731
+ imports: [],
1732
+ exports: [OptionsCellComponent]
1733
+ }]
1734
+ }] });
1735
+
1736
+ class BooleanCellComponent {
1737
+ constructor() {
1738
+ this.value = null;
1739
+ }
1740
+ }
1741
+ BooleanCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BooleanCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1742
+ BooleanCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: BooleanCellComponent, selector: "td[rxap-boolean-cell]", inputs: { value: ["rxap-boolean-cell", "value"] }, host: { classAttribute: "rxap-boolean-cell" }, ngImport: i0, template: "<ng-template [ngIf]=\"value\" [ngIfElse]=\"isFalse\">\n <mat-icon class=\"truthy\">check_circle</mat-icon>\n</ng-template>\n<ng-template #isFalse>\n <mat-icon class=\"falsy\">cancel</mat-icon>\n</ng-template>\n<ng-content></ng-content>\n", styles: [""], components: [{ type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1743
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BooleanCellComponent, decorators: [{
1744
+ type: Component,
1745
+ args: [{ selector: 'td[rxap-boolean-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-boolean-cell' }, template: "<ng-template [ngIf]=\"value\" [ngIfElse]=\"isFalse\">\n <mat-icon class=\"truthy\">check_circle</mat-icon>\n</ng-template>\n<ng-template #isFalse>\n <mat-icon class=\"falsy\">cancel</mat-icon>\n</ng-template>\n<ng-content></ng-content>\n", styles: [""] }]
1746
+ }], propDecorators: { value: [{
1747
+ type: Input,
1748
+ args: ['rxap-boolean-cell']
1749
+ }] } });
1750
+
1751
+ class BooleanCellComponentModule {
1752
+ }
1753
+ BooleanCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BooleanCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1754
+ BooleanCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BooleanCellComponentModule, declarations: [BooleanCellComponent], imports: [CommonModule,
1755
+ MatIconModule], exports: [BooleanCellComponent] });
1756
+ BooleanCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BooleanCellComponentModule, imports: [[
1757
+ CommonModule,
1758
+ MatIconModule,
1759
+ ]] });
1760
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BooleanCellComponentModule, decorators: [{
1761
+ type: NgModule,
1762
+ args: [{
1763
+ declarations: [BooleanCellComponent],
1764
+ imports: [
1765
+ CommonModule,
1766
+ MatIconModule,
1767
+ ],
1768
+ exports: [BooleanCellComponent],
1769
+ }]
1770
+ }] });
1771
+
1772
+ const RXAP_TABLE_ACTION_METHOD_TYPE_METADATA = 'rxap-table-action-method-type-metadata';
1773
+ function TableActionMethod(type) {
1774
+ return function (target) {
1775
+ setMetadata(RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, type, target);
1776
+ };
1777
+ }
1778
+
1779
+ class TableRowActionExecutingDirective {
1780
+ constructor(templateRef, vcr) {
1781
+ this.templateRef = templateRef;
1782
+ this.vcr = vcr;
1783
+ }
1784
+ show() {
1785
+ this.vcr.createEmbeddedView(this.templateRef);
1786
+ }
1787
+ hide() {
1788
+ this.vcr.clear();
1789
+ }
1790
+ }
1791
+ TableRowActionExecutingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowActionExecutingDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
1792
+ TableRowActionExecutingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: TableRowActionExecutingDirective, selector: "[rxapTableRowActionExecuting]", ngImport: i0 });
1793
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowActionExecutingDirective, decorators: [{
1794
+ type: Directive,
1795
+ args: [{
1796
+ selector: '[rxapTableRowActionExecuting]'
1797
+ }]
1798
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
1799
+
1800
+ var TableRowActionStatus;
1801
+ (function (TableRowActionStatus) {
1802
+ TableRowActionStatus["EXECUTING"] = "executing";
1803
+ TableRowActionStatus["DONE"] = "done";
1804
+ TableRowActionStatus["ERROR"] = "error";
1805
+ TableRowActionStatus["SUCCESS"] = "success";
1806
+ })(TableRowActionStatus || (TableRowActionStatus = {}));
1807
+
1808
+ function IsTableRowActionTypeSwitchMethod(method) {
1809
+ return !hasMetadata(RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, method.constructor);
1810
+ }
1811
+ function IsTableRowActionTypeMethod(type) {
1812
+ return (method) => {
1813
+ return (getMetadata(RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, method.constructor) === type);
1814
+ };
1815
+ }
1816
+
1817
+ const RXAP_TABLE_ROW_ACTION_METHOD = new InjectionToken('rxap-table-row-action-method');
1818
+
1819
+ class TableRowActionDirective {
1820
+ constructor(actionMethodList, cdr, vcr, tableDataSourceDirective, snackBar, matButton) {
1821
+ this.cdr = cdr;
1822
+ this.vcr = vcr;
1823
+ this.tableDataSourceDirective = tableDataSourceDirective;
1824
+ this.snackBar = snackBar;
1825
+ this.matButton = matButton;
1826
+ this._hasConfirmDirective = false;
1827
+ this._currentStatus = TableRowActionStatus.DONE;
1828
+ this._actionDisabled = false;
1829
+ this.actionMethodList = coerceArray(actionMethodList);
1830
+ }
1831
+ set hasConfirmDirective(value) {
1832
+ this._hasConfirmDirective = coerceBoolean(value);
1833
+ }
1834
+ onConfirmed() {
1835
+ return this.execute();
1836
+ }
1837
+ onClick($event) {
1838
+ $event.stopPropagation();
1839
+ if (!this._hasConfirmDirective) {
1840
+ return this.execute();
1841
+ }
1842
+ else {
1843
+ if (isDevMode()) {
1844
+ console.debug('skip remote method call. Wait for confirmation.');
1845
+ }
1846
+ }
1847
+ return Promise.resolve();
1848
+ }
1849
+ execute() {
1850
+ return __awaiter(this, void 0, void 0, function* () {
1851
+ if (this._actionDisabled) {
1852
+ return Promise.resolve();
1853
+ }
1854
+ this.setStatus(TableRowActionStatus.EXECUTING);
1855
+ try {
1856
+ yield Promise.all(this.getElementList().map((element) => {
1857
+ return Promise.all([
1858
+ Promise.all(this.findUntypedActionMethod().map((am) => am.call({ element, type: this.type }))),
1859
+ Promise.all(this.findTypedActionMethod().map((am) => am.call(element)))
1860
+ ]);
1861
+ }));
1862
+ this.setStatus(TableRowActionStatus.SUCCESS);
1863
+ }
1864
+ catch (e) {
1865
+ console.error(`Failed to execute row action: ${e.message}`);
1866
+ this.setStatus(TableRowActionStatus.ERROR);
1867
+ }
1868
+ });
1869
+ }
1870
+ getElementList() {
1871
+ return [this.element];
1872
+ }
1873
+ /**
1874
+ * find all method instance in the actionMethodList member that
1875
+ * do not have a @TableActionMethod decorators
1876
+ * @private
1877
+ */
1878
+ findUntypedActionMethod() {
1879
+ return this.actionMethodList.filter(IsTableRowActionTypeSwitchMethod);
1880
+ }
1881
+ /**
1882
+ * find all method instance in the actionMethodList member that
1883
+ * do have a @TableActionMethod decorators with the current type
1884
+ * @private
1885
+ */
1886
+ findTypedActionMethod() {
1887
+ return this.actionMethodList.filter(IsTableRowActionTypeMethod(this.type));
1888
+ }
1889
+ /**
1890
+ * Disables the action. If the button is pressed the action is NOT executed
1891
+ *
1892
+ * Hint: the button is set to disabled = true to prevent any conflict with
1893
+ * extern button enable features linke : rxapHasEnablePermission
1894
+ * @protected
1895
+ */
1896
+ setButtonDisabled() {
1897
+ this._actionDisabled = true;
1898
+ }
1899
+ /**
1900
+ * Enables the action. If the button is pressed the action is executed
1901
+ *
1902
+ * TODO : find a way to communicate the disabled state between the features
1903
+ * Hint: the button is set to disabled = false to prevent any conflict with
1904
+ * extern button enable features linke : rxapHasEnablePermission
1905
+ * @protected
1906
+ */
1907
+ setButtonEnabled() {
1908
+ this._actionDisabled = false;
1909
+ }
1910
+ setStatus(status) {
1911
+ var _a, _b;
1912
+ if (this._currentStatus === status) {
1913
+ return;
1914
+ }
1915
+ this._currentStatus = status;
1916
+ switch (status) {
1917
+ case TableRowActionStatus.EXECUTING:
1918
+ this.setButtonDisabled();
1919
+ (_a = this.executingDirective) === null || _a === void 0 ? void 0 : _a.show();
1920
+ break;
1921
+ case TableRowActionStatus.SUCCESS:
1922
+ if (this.refresh) {
1923
+ this.tableDataSourceDirective.refresh();
1924
+ }
1925
+ if (this.successMessage) {
1926
+ this.snackBar.open(this.successMessage, 'ok', { duration: 2560 });
1927
+ }
1928
+ this.setStatus(TableRowActionStatus.DONE);
1929
+ break;
1930
+ case TableRowActionStatus.ERROR:
1931
+ this.setStatus(TableRowActionStatus.DONE);
1932
+ if (this.errorMessage) {
1933
+ this.snackBar.open(this.errorMessage, 'ok', { duration: 5120 });
1934
+ }
1935
+ break;
1936
+ case TableRowActionStatus.DONE:
1937
+ this.setButtonEnabled();
1938
+ (_b = this.executingDirective) === null || _b === void 0 ? void 0 : _b.hide();
1939
+ break;
1940
+ }
1941
+ this.cdr.detectChanges();
1942
+ }
1943
+ }
1944
+ TableRowActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowActionDirective, deps: [{ token: RXAP_TABLE_ROW_ACTION_METHOD }, { token: ChangeDetectorRef }, { token: ViewContainerRef }, { token: TableDataSourceDirective }, { token: MatSnackBar }, { token: MatButton, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1945
+ TableRowActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: TableRowActionDirective, selector: "button[rxapTableRowAction]", inputs: { hasConfirmDirective: ["rxapConfirm", "hasConfirmDirective"], element: "element", type: ["rxapTableRowAction", "type"], errorMessage: "errorMessage", successMessage: "successMessage", refresh: "refresh" }, host: { listeners: { "confirmed": "onConfirmed()", "click": "onClick($event)" } }, queries: [{ propertyName: "executingDirective", first: true, predicate: TableRowActionExecutingDirective, descendants: true }], ngImport: i0 });
1946
+ __decorate([
1947
+ Required,
1948
+ __metadata("design:type", Object)
1949
+ ], TableRowActionDirective.prototype, "element", void 0);
1950
+ __decorate([
1951
+ Required,
1952
+ __metadata("design:type", String)
1953
+ ], TableRowActionDirective.prototype, "type", void 0);
1954
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowActionDirective, decorators: [{
1955
+ type: Directive,
1956
+ args: [{
1957
+ selector: 'button[rxapTableRowAction]'
1958
+ }]
1959
+ }], ctorParameters: function () {
1960
+ return [{ type: undefined, decorators: [{
1961
+ type: Inject,
1962
+ args: [RXAP_TABLE_ROW_ACTION_METHOD]
1963
+ }] }, { type: i0.ChangeDetectorRef, decorators: [{
1964
+ type: Inject,
1965
+ args: [ChangeDetectorRef]
1966
+ }] }, { type: i0.ViewContainerRef, decorators: [{
1967
+ type: Inject,
1968
+ args: [ViewContainerRef]
1969
+ }] }, { type: TableDataSourceDirective, decorators: [{
1970
+ type: Inject,
1971
+ args: [TableDataSourceDirective]
1972
+ }] }, { type: i2$3.MatSnackBar, decorators: [{
1973
+ type: Inject,
1974
+ args: [MatSnackBar]
1975
+ }] }, { type: i2$1.MatButton, decorators: [{
1976
+ type: Optional
1977
+ }, {
1978
+ type: Inject,
1979
+ args: [MatButton]
1980
+ }] }];
1981
+ }, propDecorators: { hasConfirmDirective: [{
1982
+ type: Input,
1983
+ args: ['rxapConfirm']
1984
+ }], element: [{
1985
+ type: Input
1986
+ }], type: [{
1987
+ type: Input,
1988
+ args: ['rxapTableRowAction']
1989
+ }], errorMessage: [{
1990
+ type: Input
1991
+ }], successMessage: [{
1992
+ type: Input
1993
+ }], refresh: [{
1994
+ type: Input
1995
+ }], executingDirective: [{
1996
+ type: ContentChild,
1997
+ args: [TableRowActionExecutingDirective]
1998
+ }], onConfirmed: [{
1999
+ type: HostListener,
2000
+ args: ['confirmed']
2001
+ }], onClick: [{
2002
+ type: HostListener,
2003
+ args: ['click', ['$event']]
2004
+ }] } });
2005
+
2006
+ class TableRowHeaderActionDirective extends TableRowActionDirective {
2007
+ constructor(actionMethod, cdr, vcr, tableDataSourceDirective, snackBar, matButton, selectRowService) {
2008
+ super(actionMethod, cdr, vcr, tableDataSourceDirective, snackBar, matButton);
2009
+ this.selectRowService = selectRowService;
2010
+ }
2011
+ ngOnDestroy() {
2012
+ var _a;
2013
+ (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
2014
+ }
2015
+ ngOnInit() {
2016
+ if (this.selectRowService) {
2017
+ this._subscription = this.selectRowService.selectedRows$
2018
+ .pipe(startWith(this.selectRowService.selectedRows), map((rows) => rows.length !== 0), tap((hasSelected) => {
2019
+ if (hasSelected) {
2020
+ this.setButtonEnabled();
2021
+ }
2022
+ else {
2023
+ this.setButtonDisabled();
2024
+ }
2025
+ this.cdr.detectChanges();
2026
+ }))
2027
+ .subscribe();
2028
+ }
2029
+ else {
2030
+ this.setButtonDisabled();
2031
+ }
2032
+ }
2033
+ getElementList() {
2034
+ var _a, _b;
2035
+ return (_b = (_a = this.selectRowService) === null || _a === void 0 ? void 0 : _a.selectedRows) !== null && _b !== void 0 ? _b : [];
2036
+ }
2037
+ }
2038
+ TableRowHeaderActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowHeaderActionDirective, deps: [{ token: RXAP_TABLE_ROW_ACTION_METHOD }, { token: ChangeDetectorRef }, { token: ViewContainerRef }, { token: TableDataSourceDirective }, { token: MatSnackBar }, { token: MatButton, optional: true }, { token: SelectRowService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2039
+ TableRowHeaderActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: TableRowHeaderActionDirective, selector: "button[rxapTableRowHeaderAction]", inputs: { type: ["rxapTableRowHeaderAction", "type"] }, usesInheritance: true, ngImport: i0 });
2040
+ __decorate([
2041
+ Required,
2042
+ __metadata("design:type", String)
2043
+ ], TableRowHeaderActionDirective.prototype, "type", void 0);
2044
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowHeaderActionDirective, decorators: [{
2045
+ type: Directive,
2046
+ args: [{
2047
+ selector: 'button[rxapTableRowHeaderAction]'
2048
+ }]
2049
+ }], ctorParameters: function () {
2050
+ return [{ type: undefined, decorators: [{
2051
+ type: Inject,
2052
+ args: [RXAP_TABLE_ROW_ACTION_METHOD]
2053
+ }] }, { type: i0.ChangeDetectorRef, decorators: [{
2054
+ type: Inject,
2055
+ args: [ChangeDetectorRef]
2056
+ }] }, { type: i0.ViewContainerRef, decorators: [{
2057
+ type: Inject,
2058
+ args: [ViewContainerRef]
2059
+ }] }, { type: TableDataSourceDirective, decorators: [{
2060
+ type: Inject,
2061
+ args: [TableDataSourceDirective]
2062
+ }] }, { type: i2$3.MatSnackBar, decorators: [{
2063
+ type: Inject,
2064
+ args: [MatSnackBar]
2065
+ }] }, { type: i2$1.MatButton, decorators: [{
2066
+ type: Optional
2067
+ }, {
2068
+ type: Inject,
2069
+ args: [MatButton]
2070
+ }] }, { type: SelectRowService, decorators: [{
2071
+ type: Optional
2072
+ }, {
2073
+ type: Inject,
2074
+ args: [SelectRowService]
2075
+ }] }];
2076
+ }, propDecorators: { type: [{
2077
+ type: Input,
2078
+ args: ['rxapTableRowHeaderAction']
2079
+ }] } });
2080
+
2081
+ class TableRowActionsModule {
2082
+ }
2083
+ TableRowActionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowActionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2084
+ TableRowActionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowActionsModule, declarations: [TableRowActionDirective,
2085
+ TableRowActionExecutingDirective,
2086
+ TableRowHeaderActionDirective], exports: [TableRowActionDirective,
2087
+ TableRowHeaderActionDirective,
2088
+ TableRowActionExecutingDirective,
2089
+ MatTooltipModule,
2090
+ MatButtonModule,
2091
+ ConfirmComponentModule,
2092
+ MatIconModule,
2093
+ MatProgressBarModule,
2094
+ CommonModule] });
2095
+ TableRowActionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowActionsModule, imports: [MatTooltipModule,
2096
+ MatButtonModule,
2097
+ ConfirmComponentModule,
2098
+ MatIconModule,
2099
+ MatProgressBarModule,
2100
+ CommonModule] });
2101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: TableRowActionsModule, decorators: [{
2102
+ type: NgModule,
2103
+ args: [{
2104
+ declarations: [
2105
+ TableRowActionDirective,
2106
+ TableRowActionExecutingDirective,
2107
+ TableRowHeaderActionDirective
2108
+ ],
2109
+ exports: [
2110
+ TableRowActionDirective,
2111
+ TableRowHeaderActionDirective,
2112
+ TableRowActionExecutingDirective,
2113
+ MatTooltipModule,
2114
+ MatButtonModule,
2115
+ ConfirmComponentModule,
2116
+ MatIconModule,
2117
+ MatProgressBarModule,
2118
+ CommonModule
2119
+ ]
2120
+ }]
2121
+ }] });
2122
+
2123
+ // endregion
2124
+ // endregion
2125
+
2126
+ /**
2127
+ * Generated bundle index. Do not edit.
2128
+ */
2129
+
2130
+ export { BooleanCellComponent, BooleanCellComponentModule, CheckboxCellComponent, CheckboxCellComponentModule, CheckboxHeaderCellComponent, CheckboxHeaderCellComponentModule, CopyToClipboardCellComponent, CopyToClipboardCellComponentModule, DateCellComponent, DateCellComponentModule, ExpandControlsCellComponent, ExpandControlsCellComponentModule, ExpandRowContainerComponent, ExpandRowContainerComponentModule, ExpandRowContentDirective, ExpandRowDirective, ExpandRowModule, ExpandRowService, FilterHeaderRowDirective, IconCellComponent, IconCellComponentModule, ImageCellComponent, ImageCellComponentModule, IsTableRowActionTypeMethod, IsTableRowActionTypeSwitchMethod, LinkCellComponent, LinkCellComponentModule, OptionsCellComponent, OptionsCellComponentModule, PersistentPaginatorDirective, PersistentPaginatorDirectiveModule, ROW_ARCHIVE_METHOD, ROW_DELETE_METHOD, ROW_EDIT_LOADER_METHOD, ROW_EDIT_METHOD, ROW_LINK_METHOD, ROW_RESTORE_METHOD, ROW_VIEW_METHOD, RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, RXAP_TABLE_FILTER, RXAP_TABLE_FILTER_FORM_DEFINITION, RXAP_TABLE_METHOD, RXAP_TABLE_ROW_ACTION_METHOD, RowAnimation, RowControlsCellComponent, RowControlsCellComponentModule, RowControlsHeaderCellComponent, RowControlsHeaderCellComponentModule, SelectRowModule, SelectRowService, SelectedRowsDirective, TABLE_CREATE_REMOTE_METHOD, TABLE_DATA_SOURCE, TABLE_REMOTE_METHOD, TABLE_REMOTE_METHOD_ADAPTER_FACTORY, TableActionMethod, TableColumnMenuComponent, TableColumnMenuComponentModule, TableColumnOptionComponent, TableCreateButtonDirective, TableCreateButtonDirectiveModule, TableDataSourceDirective, TableDataSourceModule, TableFilterModule, TableFilterService, TableRowActionDirective, TableRowActionExecutingDirective, TableRowActionStatus, TableRowActionsModule, TableRowControlsModule, TableRowHeaderActionDirective, TableSelectControlsComponent, TableSelectControlsComponentModule, TableShowArchivedSlideComponent, TableShowArchivedSlideComponentModule, ToFilterColumnNamesPipe };
2131
+ //# sourceMappingURL=rxap-material-table-system.mjs.map