@rxap/material-table-system 12.5.3 → 13.0.0-next.0

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 (206) 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 +56 -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 +63 -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 +2102 -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/src/schematics/ng-add/index.js +1 -1
  73. package/src/schematics/ng-add/index.js.map +1 -1
  74. package/bundles/rxap-material-table-system.umd.js +0 -2896
  75. package/bundles/rxap-material-table-system.umd.js.map +0 -1
  76. package/esm2015/index.js +0 -91
  77. package/esm2015/index.js.map +0 -1
  78. package/esm2015/lib/cells/boolean-cell/boolean-cell.component.js +0 -25
  79. package/esm2015/lib/cells/boolean-cell/boolean-cell.component.js.map +0 -1
  80. package/esm2015/lib/cells/boolean-cell/boolean-cell.component.module.js +0 -26
  81. package/esm2015/lib/cells/boolean-cell/boolean-cell.component.module.js.map +0 -1
  82. package/esm2015/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.js +0 -22
  83. package/esm2015/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.js.map +0 -1
  84. package/esm2015/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.module.js +0 -26
  85. package/esm2015/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.module.js.map +0 -1
  86. package/esm2015/lib/cells/date-cell/date-cell.component.js +0 -27
  87. package/esm2015/lib/cells/date-cell/date-cell.component.js.map +0 -1
  88. package/esm2015/lib/cells/date-cell/date-cell.component.module.js +0 -22
  89. package/esm2015/lib/cells/date-cell/date-cell.component.module.js.map +0 -1
  90. package/esm2015/lib/cells/icon-cell/icon-cell.component.js +0 -23
  91. package/esm2015/lib/cells/icon-cell/icon-cell.component.js.map +0 -1
  92. package/esm2015/lib/cells/icon-cell/icon-cell.component.module.js +0 -30
  93. package/esm2015/lib/cells/icon-cell/icon-cell.component.module.js.map +0 -1
  94. package/esm2015/lib/cells/image-cell/image-cell.component.js +0 -37
  95. package/esm2015/lib/cells/image-cell/image-cell.component.js.map +0 -1
  96. package/esm2015/lib/cells/image-cell/image-cell.component.module.js +0 -19
  97. package/esm2015/lib/cells/image-cell/image-cell.component.module.js.map +0 -1
  98. package/esm2015/lib/cells/link-cell/link-cell.component.js +0 -32
  99. package/esm2015/lib/cells/link-cell/link-cell.component.js.map +0 -1
  100. package/esm2015/lib/cells/link-cell/link-cell.component.module.js +0 -34
  101. package/esm2015/lib/cells/link-cell/link-cell.component.module.js.map +0 -1
  102. package/esm2015/lib/cells/options-cell/options-cell.component.js +0 -63
  103. package/esm2015/lib/cells/options-cell/options-cell.component.js.map +0 -1
  104. package/esm2015/lib/cells/options-cell/options-cell.component.module.js +0 -17
  105. package/esm2015/lib/cells/options-cell/options-cell.component.module.js.map +0 -1
  106. package/esm2015/lib/expand-row/expand-controls-cell/expand-controls-cell.component.js +0 -37
  107. package/esm2015/lib/expand-row/expand-controls-cell/expand-controls-cell.component.js.map +0 -1
  108. package/esm2015/lib/expand-row/expand-controls-cell/expand-controls-cell.component.module.js +0 -30
  109. package/esm2015/lib/expand-row/expand-controls-cell/expand-controls-cell.component.module.js.map +0 -1
  110. package/esm2015/lib/expand-row/expand-row-container/expand-row-container.component.js +0 -74
  111. package/esm2015/lib/expand-row/expand-row-container/expand-row-container.component.js.map +0 -1
  112. package/esm2015/lib/expand-row/expand-row-container/expand-row-container.component.module.js +0 -35
  113. package/esm2015/lib/expand-row/expand-row-container/expand-row-container.component.module.js.map +0 -1
  114. package/esm2015/lib/expand-row/expand-row-container/expand-row-content.directive.js +0 -22
  115. package/esm2015/lib/expand-row/expand-row-container/expand-row-content.directive.js.map +0 -1
  116. package/esm2015/lib/expand-row/expand-row.directive.js +0 -41
  117. package/esm2015/lib/expand-row/expand-row.directive.js.map +0 -1
  118. package/esm2015/lib/expand-row/expand-row.module.js +0 -31
  119. package/esm2015/lib/expand-row/expand-row.module.js.map +0 -1
  120. package/esm2015/lib/expand-row/expand-row.service.js +0 -29
  121. package/esm2015/lib/expand-row/expand-row.service.js.map +0 -1
  122. package/esm2015/lib/persistent-paginator.directive.js +0 -63
  123. package/esm2015/lib/persistent-paginator.directive.js.map +0 -1
  124. package/esm2015/lib/row-animation.js +0 -25
  125. package/esm2015/lib/row-animation.js.map +0 -1
  126. package/esm2015/lib/select-row/checkbox-cell/checkbox-cell.component.js +0 -34
  127. package/esm2015/lib/select-row/checkbox-cell/checkbox-cell.component.js.map +0 -1
  128. package/esm2015/lib/select-row/checkbox-cell/checkbox-cell.component.module.js +0 -26
  129. package/esm2015/lib/select-row/checkbox-cell/checkbox-cell.component.module.js.map +0 -1
  130. package/esm2015/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.js +0 -51
  131. package/esm2015/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.js.map +0 -1
  132. package/esm2015/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.module.js +0 -26
  133. package/esm2015/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.module.js.map +0 -1
  134. package/esm2015/lib/select-row/select-row.module.js +0 -25
  135. package/esm2015/lib/select-row/select-row.module.js.map +0 -1
  136. package/esm2015/lib/select-row/select-row.options.js +0 -2
  137. package/esm2015/lib/select-row/select-row.options.js.map +0 -1
  138. package/esm2015/lib/select-row/select-row.service.js +0 -29
  139. package/esm2015/lib/select-row/select-row.service.js.map +0 -1
  140. package/esm2015/lib/select-row/selected-rows.directive.js +0 -47
  141. package/esm2015/lib/select-row/selected-rows.directive.js.map +0 -1
  142. package/esm2015/lib/select-row/tokens.js +0 -3
  143. package/esm2015/lib/select-row/tokens.js.map +0 -1
  144. package/esm2015/lib/table-column-menu/table-column-menu.component.js +0 -63
  145. package/esm2015/lib/table-column-menu/table-column-menu.component.js.map +0 -1
  146. package/esm2015/lib/table-column-menu/table-column-menu.component.module.js +0 -47
  147. package/esm2015/lib/table-column-menu/table-column-menu.component.module.js.map +0 -1
  148. package/esm2015/lib/table-column-menu/table-column-option/table-column-option.component.js +0 -67
  149. package/esm2015/lib/table-column-menu/table-column-option/table-column-option.component.js.map +0 -1
  150. package/esm2015/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.js +0 -36
  151. package/esm2015/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.js.map +0 -1
  152. package/esm2015/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.module.js +0 -26
  153. package/esm2015/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.module.js.map +0 -1
  154. package/esm2015/lib/table-create-button/table-create-button.directive.js +0 -71
  155. package/esm2015/lib/table-create-button/table-create-button.directive.js.map +0 -1
  156. package/esm2015/lib/table-create-button/tokens.js +0 -3
  157. package/esm2015/lib/table-create-button/tokens.js.map +0 -1
  158. package/esm2015/lib/table-data-source.directive.js +0 -172
  159. package/esm2015/lib/table-data-source.directive.js.map +0 -1
  160. package/esm2015/lib/table-filter/filter-header-row.directive.js +0 -56
  161. package/esm2015/lib/table-filter/filter-header-row.directive.js.map +0 -1
  162. package/esm2015/lib/table-filter/table-filter.module.js +0 -25
  163. package/esm2015/lib/table-filter/table-filter.module.js.map +0 -1
  164. package/esm2015/lib/table-filter/table-filter.service.js +0 -36
  165. package/esm2015/lib/table-filter/table-filter.service.js.map +0 -1
  166. package/esm2015/lib/table-filter/to-filter-column-names.pipe.js +0 -16
  167. package/esm2015/lib/table-filter/to-filter-column-names.pipe.js.map +0 -1
  168. package/esm2015/lib/table-filter/tokens.js +0 -3
  169. package/esm2015/lib/table-filter/tokens.js.map +0 -1
  170. package/esm2015/lib/table-row-actions/decorators.js +0 -8
  171. package/esm2015/lib/table-row-actions/decorators.js.map +0 -1
  172. package/esm2015/lib/table-row-actions/table-row-action-executing.directive.js +0 -23
  173. package/esm2015/lib/table-row-actions/table-row-action-executing.directive.js.map +0 -1
  174. package/esm2015/lib/table-row-actions/table-row-action-status.js +0 -8
  175. package/esm2015/lib/table-row-actions/table-row-action-status.js.map +0 -1
  176. package/esm2015/lib/table-row-actions/table-row-action.directive.js +0 -199
  177. package/esm2015/lib/table-row-actions/table-row-action.directive.js.map +0 -1
  178. package/esm2015/lib/table-row-actions/table-row-action.method.js +0 -11
  179. package/esm2015/lib/table-row-actions/table-row-action.method.js.map +0 -1
  180. package/esm2015/lib/table-row-actions/table-row-actions.module.js +0 -53
  181. package/esm2015/lib/table-row-actions/table-row-actions.module.js.map +0 -1
  182. package/esm2015/lib/table-row-actions/table-row-header-action.directive.js +0 -88
  183. package/esm2015/lib/table-row-actions/table-row-header-action.directive.js.map +0 -1
  184. package/esm2015/lib/table-row-actions/tokens.js +0 -3
  185. package/esm2015/lib/table-row-actions/tokens.js.map +0 -1
  186. package/esm2015/lib/table-row-controls/row-controls-cell/row-controls-cell.component.js +0 -134
  187. package/esm2015/lib/table-row-controls/row-controls-cell/row-controls-cell.component.js.map +0 -1
  188. package/esm2015/lib/table-row-controls/row-controls-cell/row-controls-cell.component.module.js +0 -42
  189. package/esm2015/lib/table-row-controls/row-controls-cell/row-controls-cell.component.module.js.map +0 -1
  190. package/esm2015/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.js +0 -117
  191. package/esm2015/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.js.map +0 -1
  192. package/esm2015/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.module.js +0 -42
  193. package/esm2015/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.module.js.map +0 -1
  194. package/esm2015/lib/table-row-controls/table-row-controls.module.js +0 -21
  195. package/esm2015/lib/table-row-controls/table-row-controls.module.js.map +0 -1
  196. package/esm2015/lib/table-row-controls/tokens.js +0 -9
  197. package/esm2015/lib/table-row-controls/tokens.js.map +0 -1
  198. package/esm2015/lib/table-row-metadata.js +0 -2
  199. package/esm2015/lib/table-row-metadata.js.map +0 -1
  200. package/esm2015/lib/table-select-controls/table-select-controls.component.js +0 -39
  201. package/esm2015/lib/table-select-controls/table-select-controls.component.js.map +0 -1
  202. package/esm2015/lib/table-select-controls/table-select-controls.component.module.js +0 -30
  203. package/esm2015/lib/table-select-controls/table-select-controls.component.module.js.map +0 -1
  204. package/esm2015/rxap-material-table-system.js +0 -5
  205. package/esm2015/rxap-material-table-system.js.map +0 -1
  206. package/fesm2015/rxap-material-table-system.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"table-row-action.directive.js","sourceRoot":"","sources":["../../../../../../../libs/material/table-system/src/lib/table-row-actions/table-row-action.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,MAAM,EACN,KAAK,EACL,SAAS,EACT,QAAQ,EACR,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;A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AAC,YAAY,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;iBACjE;gBACD,MAAM;YACR,KAAK,oBAAoB,CAAC,IAAI;gBAC5B,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACxB,MAAA,IAAI,CAAC,kBAAkB,0CAAE,IAAI,EAAE,CAAC;gBAChC,MAAM;SACT;QACD,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAC3B,CAAC;;oHAhLU,uBAAuB,kBAoCxB,4BAA4B,aAI5B,iBAAiB,aAEjB,gBAAgB,aAEhB,wBAAwB,aAExB,WAAW,aAGX,SAAS;wGAjDR,uBAAuB,4ZA2BpB,gCAAgC;AAjB9C;IADC,QAAQ;;wDACa;AAGtB;IADC,QAAQ;;qDACY;2FAbV,uBAAuB;kBAHnC,SAAS;mBAAC;oBACT,QAAQ,EAAE,4BAA4B;iBACvC;;0BAqCI,MAAM;2BAAC,4BAA4B;;0BAInC,MAAM;2BAAC,iBAAiB;;0BAExB,MAAM;2BAAC,gBAAgB;;0BAEvB,MAAM;2BAAC,wBAAwB;;0BAE/B,MAAM;2BAAC,WAAW;;0BAElB,QAAQ;;0BACR,MAAM;2BAAC,SAAS;4CA7CR,mBAAmB;sBAD7B,KAAK;uBAAC,aAAa;gBAOb,OAAO;sBAFb,KAAK;gBAKC,IAAI;sBAFV,KAAK;uBAAC,oBAAoB;gBAKpB,YAAY;sBADlB,KAAK;gBAIC,cAAc;sBADpB,KAAK;gBAOC,OAAO;sBADb,KAAK;gBAIW,kBAAkB;sBADlC,YAAY;uBAAC,gCAAgC;gBA6BvC,WAAW;sBADjB,YAAY;uBAAC,WAAW;gBAMlB,OAAO;sBADb,YAAY;uBAAC,OAAO,EAAE,CAAE,QAAQ,CAAE","sourcesContent":["import {\n ChangeDetectorRef,\n ContentChild,\n Directive,\n HostListener,\n Inject,\n Input,\n isDevMode,\n Optional,\n ViewContainerRef\n} from '@angular/core';\nimport { MatButton } from '@angular/material/button';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n coerceArray,\n coerceBoolean,\n Required\n} from '@rxap/utilities';\nimport { TableRowActionExecutingDirective } from './table-row-action-executing.directive';\nimport { TableRowActionStatus } from './table-row-action-status';\nimport {\n IsTableRowActionTypeMethod,\n IsTableRowActionTypeSwitchMethod,\n TableRowActionMethod,\n TableRowActionTypeMethod,\n TableRowActionTypeSwitchMethod\n} from './table-row-action.method';\nimport { RXAP_TABLE_ROW_ACTION_METHOD } from './tokens';\nimport { TableDataSourceDirective } from '../table-data-source.directive';\n\n@Directive({\n selector: 'button[rxapTableRowAction]'\n})\nexport class TableRowActionDirective<Data extends Record<string, any>> {\n private _hasConfirmDirective = false;\n\n @Input('rxapConfirm')\n public set hasConfirmDirective(value: any) {\n this._hasConfirmDirective = coerceBoolean(value);\n }\n\n @Input()\n @Required\n public element!: Data;\n @Input('rxapTableRowAction')\n @Required\n public type!: string;\n\n @Input()\n public errorMessage?: string;\n\n @Input()\n public successMessage?: string;\n\n /**\n * true - after the action is executed the table datasource is refreshed\n */\n @Input()\n public refresh?: boolean;\n\n @ContentChild(TableRowActionExecutingDirective)\n private readonly executingDirective?: TableRowActionExecutingDirective;\n private _currentStatus: TableRowActionStatus = TableRowActionStatus.DONE;\n\n private readonly actionMethodList: Array<TableRowActionMethod<Data>>;\n\n private _actionDisabled = false;\n\n constructor(\n @Inject(RXAP_TABLE_ROW_ACTION_METHOD)\n actionMethodList:\n | Array<TableRowActionMethod<Data>>\n | TableRowActionMethod<Data>,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n @Inject(ViewContainerRef)\n private readonly vcr: ViewContainerRef,\n @Inject(TableDataSourceDirective)\n private readonly tableDataSourceDirective: TableDataSourceDirective,\n @Inject(MatSnackBar)\n private readonly snackBar: MatSnackBar,\n @Optional()\n @Inject(MatButton)\n private readonly matButton: MatButton | null\n ) {\n this.actionMethodList = coerceArray(actionMethodList);\n }\n\n @HostListener('confirmed')\n public onConfirmed() {\n return this.execute();\n }\n\n @HostListener('click', [ '$event' ])\n public onClick($event: Event) {\n $event.stopPropagation();\n if (!this._hasConfirmDirective) {\n return this.execute();\n } else {\n if (isDevMode()) {\n console.debug('skip remote method call. Wait for confirmation.');\n }\n }\n return Promise.resolve();\n }\n\n public async execute(): Promise<void> {\n if (this._actionDisabled) {\n return Promise.resolve();\n }\n this.setStatus(TableRowActionStatus.EXECUTING);\n try {\n await Promise.all(\n this.getElementList().map((element) => {\n return Promise.all([\n Promise.all(\n this.findUntypedActionMethod().map((am) =>\n am.call({ element, type: this.type })\n )\n ),\n Promise.all(\n this.findTypedActionMethod().map((am) => am.call(element))\n )\n ]);\n })\n );\n this.setStatus(TableRowActionStatus.SUCCESS);\n } catch (e) {\n console.error(`Failed to execute row action: ${e.message}`);\n this.setStatus(TableRowActionStatus.ERROR);\n }\n }\n\n protected getElementList(): Data[] {\n return [ this.element ];\n }\n\n /**\n * find all method instance in the actionMethodList member that\n * do not have a @TableActionMethod decorators\n * @private\n */\n private findUntypedActionMethod(): Array<TableRowActionTypeSwitchMethod<Data>> {\n return this.actionMethodList.filter(IsTableRowActionTypeSwitchMethod);\n }\n\n /**\n * find all method instance in the actionMethodList member that\n * do have a @TableActionMethod decorators with the current type\n * @private\n */\n private findTypedActionMethod(): Array<TableRowActionTypeMethod<Data>> {\n return this.actionMethodList.filter(IsTableRowActionTypeMethod(this.type));\n }\n\n /**\n * Disables the action. If the button is pressed the action is NOT executed\n *\n * Hint: the button is set to disabled = true to prevent any conflict with\n * extern button enable features linke : rxapHasEnablePermission\n * @protected\n */\n protected setButtonDisabled() {\n this._actionDisabled = true;\n }\n\n /**\n * Enables the action. If the button is pressed the action is executed\n *\n * TODO : find a way to communicate the disabled state between the features\n * Hint: the button is set to disabled = false to prevent any conflict with\n * extern button enable features linke : rxapHasEnablePermission\n * @protected\n */\n protected setButtonEnabled() {\n this._actionDisabled = false;\n }\n\n private setStatus(status: TableRowActionStatus) {\n if (this._currentStatus === status) {\n return;\n }\n this._currentStatus = status;\n switch (status) {\n case TableRowActionStatus.EXECUTING:\n this.setButtonDisabled();\n this.executingDirective?.show();\n break;\n case TableRowActionStatus.SUCCESS:\n if (this.refresh) {\n this.tableDataSourceDirective.refresh();\n }\n if (this.successMessage) {\n this.snackBar.open(this.successMessage, 'ok', { duration: 2560 });\n }\n this.setStatus(TableRowActionStatus.DONE);\n break;\n case TableRowActionStatus.ERROR:\n this.setStatus(TableRowActionStatus.DONE);\n if (this.errorMessage) {\n this.snackBar.open(this.errorMessage, 'ok', { duration: 5120 });\n }\n break;\n case TableRowActionStatus.DONE:\n this.setButtonEnabled();\n this.executingDirective?.hide();\n break;\n }\n this.cdr.detectChanges();\n }\n}\n"]}
@@ -1,11 +0,0 @@
1
- import { getMetadata, hasMetadata } from '@rxap/utilities/reflect-metadata';
2
- import { RXAP_TABLE_ACTION_METHOD_TYPE_METADATA } from './decorators';
3
- export function IsTableRowActionTypeSwitchMethod(method) {
4
- return !hasMetadata(RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, method.constructor);
5
- }
6
- export function IsTableRowActionTypeMethod(type) {
7
- return (method) => {
8
- return (getMetadata(RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, method.constructor) === type);
9
- };
10
- }
11
- //# sourceMappingURL=table-row-action.method.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table-row-action.method.js","sourceRoot":"","sources":["../../../../../../../libs/material/table-system/src/lib/table-row-actions/table-row-action.method.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EACZ,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,sCAAsC,EAAE,MAAM,cAAc,CAAC;AAUtE,MAAM,UAAU,gCAAgC,CAC9C,MAAkC;IAElC,OAAO,CAAC,WAAW,CACjB,sCAAsC,EACtC,MAAM,CAAC,WAAW,CACnB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,IAAY;IAEZ,OAAO,CACL,MAAkC,EACQ,EAAE;QAC5C,OAAO,CACL,WAAW,CACT,sCAAsC,EACtC,MAAM,CAAC,WAAW,CACnB,KAAK,IAAI,CACX,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {\n getMetadata,\n hasMetadata\n} from '@rxap/utilities/reflect-metadata';\nimport { Method } from '@rxap/utilities/rxjs';\nimport { RXAP_TABLE_ACTION_METHOD_TYPE_METADATA } from './decorators';\n\nexport type TableRowActionTypeSwitchMethod<Data extends Record<string, any>> = Method<any, { element: Data; type: string }>;\nexport type TableRowActionTypeMethod<Data extends Record<string, any>> = Method<any,\n Data>;\n\nexport type TableRowActionMethod<Data extends Record<string, any>> =\n | TableRowActionTypeSwitchMethod<Data>\n | TableRowActionTypeMethod<Data>;\n\nexport function IsTableRowActionTypeSwitchMethod<Data extends Record<string, any>>(\n method: TableRowActionMethod<Data>\n): method is TableRowActionTypeSwitchMethod<Data> {\n return !hasMetadata(\n RXAP_TABLE_ACTION_METHOD_TYPE_METADATA,\n method.constructor\n );\n}\n\nexport function IsTableRowActionTypeMethod<Data extends Record<string, any>>(\n type: string\n) {\n return (\n method: TableRowActionMethod<Data>\n ): method is TableRowActionTypeMethod<Data> => {\n return (\n getMetadata(\n RXAP_TABLE_ACTION_METHOD_TYPE_METADATA,\n method.constructor\n ) === type\n );\n };\n}\n"]}
@@ -1,53 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { NgModule } from '@angular/core';
3
- import { MatButtonModule } from '@angular/material/button';
4
- import { MatIconModule } from '@angular/material/icon';
5
- import { MatProgressBarModule } from '@angular/material/progress-bar';
6
- import { MatTooltipModule } from '@angular/material/tooltip';
7
- import { ConfirmComponentModule } from '@rxap/components';
8
- import { TableRowActionExecutingDirective } from './table-row-action-executing.directive';
9
- import { TableRowActionDirective } from './table-row-action.directive';
10
- import { TableRowHeaderActionDirective } from './table-row-header-action.directive';
11
- import * as i0 from "@angular/core";
12
- export class TableRowActionsModule {
13
- }
14
- TableRowActionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: TableRowActionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15
- TableRowActionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: TableRowActionsModule, declarations: [TableRowActionDirective,
16
- TableRowActionExecutingDirective,
17
- TableRowHeaderActionDirective], exports: [TableRowActionDirective,
18
- TableRowHeaderActionDirective,
19
- TableRowActionExecutingDirective,
20
- MatTooltipModule,
21
- MatButtonModule,
22
- ConfirmComponentModule,
23
- MatIconModule,
24
- MatProgressBarModule,
25
- CommonModule] });
26
- TableRowActionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: TableRowActionsModule, imports: [MatTooltipModule,
27
- MatButtonModule,
28
- ConfirmComponentModule,
29
- MatIconModule,
30
- MatProgressBarModule,
31
- CommonModule] });
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: TableRowActionsModule, decorators: [{
33
- type: NgModule,
34
- args: [{
35
- declarations: [
36
- TableRowActionDirective,
37
- TableRowActionExecutingDirective,
38
- TableRowHeaderActionDirective
39
- ],
40
- exports: [
41
- TableRowActionDirective,
42
- TableRowHeaderActionDirective,
43
- TableRowActionExecutingDirective,
44
- MatTooltipModule,
45
- MatButtonModule,
46
- ConfirmComponentModule,
47
- MatIconModule,
48
- MatProgressBarModule,
49
- CommonModule
50
- ]
51
- }]
52
- }] });
53
- //# sourceMappingURL=table-row-actions.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table-row-actions.module.js","sourceRoot":"","sources":["../../../../../../../libs/material/table-system/src/lib/table-row-actions/table-row-actions.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;;AAoBpF,MAAM,OAAO,qBAAqB;;kHAArB,qBAAqB;mHAArB,qBAAqB,iBAhB9B,uBAAuB;QACvB,gCAAgC;QAChC,6BAA6B,aAG7B,uBAAuB;QACvB,6BAA6B;QAC7B,gCAAgC;QAChC,gBAAgB;QAChB,eAAe;QACf,sBAAsB;QACtB,aAAa;QACb,oBAAoB;QACpB,YAAY;mHAGH,qBAAqB,YAR9B,gBAAgB;QAChB,eAAe;QACf,sBAAsB;QACtB,aAAa;QACb,oBAAoB;QACpB,YAAY;2FAGH,qBAAqB;kBAlBjC,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,uBAAuB;wBACvB,gCAAgC;wBAChC,6BAA6B;qBAC9B;oBACD,OAAO,EAAO;wBACZ,uBAAuB;wBACvB,6BAA6B;wBAC7B,gCAAgC;wBAChC,gBAAgB;wBAChB,eAAe;wBACf,sBAAsB;wBACtB,aAAa;wBACb,oBAAoB;wBACpB,YAAY;qBACb;iBACF","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { ConfirmComponentModule } from '@rxap/components';\nimport { TableRowActionExecutingDirective } from './table-row-action-executing.directive';\nimport { TableRowActionDirective } from './table-row-action.directive';\nimport { TableRowHeaderActionDirective } from './table-row-header-action.directive';\n\n@NgModule({\n declarations: [\n TableRowActionDirective,\n TableRowActionExecutingDirective,\n TableRowHeaderActionDirective\n ],\n exports: [\n TableRowActionDirective,\n TableRowHeaderActionDirective,\n TableRowActionExecutingDirective,\n MatTooltipModule,\n MatButtonModule,\n ConfirmComponentModule,\n MatIconModule,\n MatProgressBarModule,\n CommonModule\n ]\n})\nexport class TableRowActionsModule {}\n"]}
@@ -1,88 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { ChangeDetectorRef, Directive, Inject, Input, Optional, ViewContainerRef } from '@angular/core';
3
- import { MatButton } from '@angular/material/button';
4
- import { MatSnackBar } from '@angular/material/snack-bar';
5
- import { Required } from '@rxap/utilities';
6
- import { map, startWith, tap } from 'rxjs/operators';
7
- import { TableRowActionDirective } from './table-row-action.directive';
8
- import { RXAP_TABLE_ROW_ACTION_METHOD } from './tokens';
9
- import { TableDataSourceDirective } from '../table-data-source.directive';
10
- import { SelectRowService } from '../select-row/select-row.service';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "../table-data-source.directive";
13
- import * as i2 from "@angular/material/snack-bar";
14
- import * as i3 from "@angular/material/button";
15
- import * as i4 from "../select-row/select-row.service";
16
- export class TableRowHeaderActionDirective extends TableRowActionDirective {
17
- constructor(actionMethod, cdr, vcr, tableDataSourceDirective, snackBar, matButton, selectRowService) {
18
- super(actionMethod, cdr, vcr, tableDataSourceDirective, snackBar, matButton);
19
- this.selectRowService = selectRowService;
20
- }
21
- ngOnDestroy() {
22
- var _a;
23
- (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
24
- }
25
- ngOnInit() {
26
- if (this.selectRowService) {
27
- this._subscription = this.selectRowService.selectedRows$
28
- .pipe(startWith(this.selectRowService.selectedRows), map((rows) => rows.length !== 0), tap((hasSelected) => {
29
- if (hasSelected) {
30
- this.setButtonEnabled();
31
- }
32
- else {
33
- this.setButtonDisabled();
34
- }
35
- this.cdr.detectChanges();
36
- }))
37
- .subscribe();
38
- }
39
- else {
40
- this.setButtonDisabled();
41
- }
42
- }
43
- getElementList() {
44
- var _a, _b;
45
- return (_b = (_a = this.selectRowService) === null || _a === void 0 ? void 0 : _a.selectedRows) !== null && _b !== void 0 ? _b : [];
46
- }
47
- }
48
- TableRowHeaderActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", 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 });
49
- TableRowHeaderActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: TableRowHeaderActionDirective, selector: "button[rxapTableRowHeaderAction]", inputs: { type: ["rxapTableRowHeaderAction", "type"] }, usesInheritance: true, ngImport: i0 });
50
- __decorate([
51
- Required,
52
- __metadata("design:type", String)
53
- ], TableRowHeaderActionDirective.prototype, "type", void 0);
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: TableRowHeaderActionDirective, decorators: [{
55
- type: Directive,
56
- args: [{
57
- selector: 'button[rxapTableRowHeaderAction]'
58
- }]
59
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
60
- type: Inject,
61
- args: [RXAP_TABLE_ROW_ACTION_METHOD]
62
- }] }, { type: i0.ChangeDetectorRef, decorators: [{
63
- type: Inject,
64
- args: [ChangeDetectorRef]
65
- }] }, { type: i0.ViewContainerRef, decorators: [{
66
- type: Inject,
67
- args: [ViewContainerRef]
68
- }] }, { type: i1.TableDataSourceDirective, decorators: [{
69
- type: Inject,
70
- args: [TableDataSourceDirective]
71
- }] }, { type: i2.MatSnackBar, decorators: [{
72
- type: Inject,
73
- args: [MatSnackBar]
74
- }] }, { type: i3.MatButton, decorators: [{
75
- type: Optional
76
- }, {
77
- type: Inject,
78
- args: [MatButton]
79
- }] }, { type: i4.SelectRowService, decorators: [{
80
- type: Optional
81
- }, {
82
- type: Inject,
83
- args: [SelectRowService]
84
- }] }]; }, propDecorators: { type: [{
85
- type: Input,
86
- args: ['rxapTableRowHeaderAction']
87
- }] } });
88
- //# sourceMappingURL=table-row-header-action.directive.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table-row-header-action.directive.js","sourceRoot":"","sources":["../../../../../../../libs/material/table-system/src/lib/table-row-actions/table-row-header-action.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,MAAM,EACN,KAAK,EAGL,QAAQ,EACR,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EACL,GAAG,EACH,SAAS,EACT,GAAG,EACJ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;;;;;;AAKpE,MAAM,OAAO,6BACX,SAAQ,uBAA6B;IAIrC,YAEI,YAAwC,EAExC,GAAsB,EAEtB,GAAqB,EAErB,wBAAkD,EAElD,QAAqB,EAGrB,SAA2B,EAGZ,gBAA+C;QAEhE,KAAK,CACH,YAAY,EACZ,GAAG,EACH,GAAG,EACH,wBAA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BAE/B,MAAM;2BAAC,WAAW;;0BAElB,QAAQ;;0BACR,MAAM;2BAAC,SAAS;;0BAEhB,QAAQ;;0BACR,MAAM;2BAAC,gBAAgB;4CA4CnB,IAAI;sBAFV,KAAK;uBAAC,0BAA0B","sourcesContent":["import {\n ChangeDetectorRef,\n Directive,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n ViewContainerRef\n} from '@angular/core';\nimport { MatButton } from '@angular/material/button';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { Required } from '@rxap/utilities';\nimport { Subscription } from 'rxjs';\nimport {\n map,\n startWith,\n tap\n} from 'rxjs/operators';\nimport { TableRowActionDirective } from './table-row-action.directive';\nimport { TableRowActionMethod } from './table-row-action.method';\nimport { RXAP_TABLE_ROW_ACTION_METHOD } from './tokens';\nimport { TableDataSourceDirective } from '../table-data-source.directive';\nimport { SelectRowService } from '../select-row/select-row.service';\n\n@Directive({\n selector: 'button[rxapTableRowHeaderAction]'\n})\nexport class TableRowHeaderActionDirective<Data extends Record<string, any>>\n extends TableRowActionDirective<Data>\n implements OnInit, OnDestroy {\n private _subscription?: Subscription;\n\n constructor(\n @Inject(RXAP_TABLE_ROW_ACTION_METHOD)\n actionMethod: TableRowActionMethod<Data>,\n @Inject(ChangeDetectorRef)\n cdr: ChangeDetectorRef,\n @Inject(ViewContainerRef)\n vcr: ViewContainerRef,\n @Inject(TableDataSourceDirective)\n tableDataSourceDirective: TableDataSourceDirective,\n @Inject(MatSnackBar)\n snackBar: MatSnackBar,\n @Optional()\n @Inject(MatButton)\n matButton: MatButton | null,\n @Optional()\n @Inject(SelectRowService)\n private readonly selectRowService: SelectRowService<Data> | null\n ) {\n super(\n actionMethod,\n cdr,\n vcr,\n tableDataSourceDirective,\n snackBar,\n matButton\n );\n }\n\n public ngOnDestroy() {\n this._subscription?.unsubscribe();\n }\n\n public ngOnInit() {\n if (this.selectRowService) {\n this._subscription = this.selectRowService.selectedRows$\n .pipe(\n startWith(this.selectRowService.selectedRows),\n map((rows) => rows.length !== 0),\n tap((hasSelected) => {\n if (hasSelected) {\n this.setButtonEnabled();\n } else {\n this.setButtonDisabled();\n }\n this.cdr.detectChanges();\n })\n )\n .subscribe();\n } else {\n this.setButtonDisabled();\n }\n }\n\n protected getElementList(): Data[] {\n return this.selectRowService?.selectedRows ?? [];\n }\n\n @Input('rxapTableRowHeaderAction')\n @Required\n public type!: string;\n}\n"]}
@@ -1,3 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- export const RXAP_TABLE_ROW_ACTION_METHOD = new InjectionToken('rxap-table-row-action-method');
3
- //# sourceMappingURL=tokens.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../../../../libs/material/table-system/src/lib/table-row-actions/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,cAAc,CAC5D,8BAA8B,CAC/B,CAAC","sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const RXAP_TABLE_ROW_ACTION_METHOD = new InjectionToken(\n 'rxap-table-row-action-method'\n);\n"]}
@@ -1,134 +0,0 @@
1
- import { __awaiter, __decorate, __metadata } from "tslib";
2
- import { ChangeDetectionStrategy, Component, Inject, Input, Optional } from '@angular/core';
3
- import { Required } from '@rxap/utilities';
4
- import { ROW_ARCHIVE_METHOD, ROW_DELETE_METHOD, ROW_EDIT_LOADER_METHOD, ROW_EDIT_METHOD, ROW_LINK_METHOD, ROW_RESTORE_METHOD, ROW_VIEW_METHOD } from '../tokens';
5
- import { TableDataSourceDirective } from '../../table-data-source.directive';
6
- import { isObservable } from 'rxjs';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "../../table-data-source.directive";
9
- import * as i2 from "@angular/material/button";
10
- import * as i3 from "@angular/material/icon";
11
- import * as i4 from "@angular/flex-layout/flex";
12
- import * as i5 from "@angular/common";
13
- import * as i6 from "@angular/material/tooltip";
14
- import * as i7 from "@rxap/components";
15
- import * as i8 from "@rxap/open-api/remote-method";
16
- export class RowControlsCellComponent {
17
- constructor(tableDataSource, deleteRemoteMethod = null, archiveRemoteMethod = null, unarchiveRemoteMethod = null, editRemoteMethod = null, rowViewMethod = null, rowLinkMethod = null, editLoaderMethod = null) {
18
- this.tableDataSource = tableDataSource;
19
- this.deleteRemoteMethod = deleteRemoteMethod;
20
- this.archiveRemoteMethod = archiveRemoteMethod;
21
- this.unarchiveRemoteMethod = unarchiveRemoteMethod;
22
- this.editRemoteMethod = editRemoteMethod;
23
- this.rowViewMethod = rowViewMethod;
24
- this.rowLinkMethod = rowLinkMethod;
25
- this.editLoaderMethod = editLoaderMethod;
26
- }
27
- archive() {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- if (this.archiveRemoteMethod) {
30
- yield this.archiveRemoteMethod.call({ parameters: { uuid: this.element.uuid } });
31
- this.tableDataSource.refresh();
32
- }
33
- });
34
- }
35
- unarchive() {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- if (this.unarchiveRemoteMethod) {
38
- yield this.unarchiveRemoteMethod.call({ parameters: { uuid: this.element.uuid } });
39
- this.tableDataSource.refresh();
40
- }
41
- });
42
- }
43
- remove() {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- if (this.deleteRemoteMethod) {
46
- yield this.deleteRemoteMethod.call({ parameters: { uuid: this.element.uuid } });
47
- this.tableDataSource.refresh();
48
- }
49
- });
50
- }
51
- view() {
52
- return __awaiter(this, void 0, void 0, function* () {
53
- if (this.rowViewMethod) {
54
- yield this.rowViewMethod.call(this.element);
55
- }
56
- });
57
- }
58
- link() {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- if (this.rowLinkMethod) {
61
- yield this.rowLinkMethod.call(this.element);
62
- }
63
- });
64
- }
65
- edit() {
66
- return __awaiter(this, void 0, void 0, function* () {
67
- if (this.editRemoteMethod) {
68
- let initial = this.element;
69
- if (this.editLoaderMethod) {
70
- initial = yield this.editLoaderMethod.call(initial);
71
- }
72
- const result = yield this.editRemoteMethod.call(initial, { context: this.element });
73
- if (isObservable(result)) {
74
- yield result.toPromise();
75
- }
76
- this.tableDataSource.refresh();
77
- }
78
- });
79
- }
80
- }
81
- RowControlsCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsCellComponent, deps: [{ token: i1.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 });
82
- RowControlsCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", 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.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: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4.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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i7.ConfirmDirective, selector: "[rxapConfirm]", inputs: ["rxapConfirm"], outputs: ["confirmed", "unconfirmed"] }, { type: i4.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 });
83
- __decorate([
84
- Required,
85
- __metadata("design:type", Object)
86
- ], RowControlsCellComponent.prototype, "element", void 0);
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsCellComponent, decorators: [{
88
- type: Component,
89
- args: [{
90
- selector: 'td[mfd-row-controls-cell]',
91
- templateUrl: './row-controls-cell.component.html',
92
- styleUrls: ['./row-controls-cell.component.scss'],
93
- changeDetection: ChangeDetectionStrategy.OnPush,
94
- host: { class: 'mfd-row-controls-cell' }
95
- }]
96
- }], ctorParameters: function () { return [{ type: i1.TableDataSourceDirective }, { type: i8.OpenApiRemoteMethod, decorators: [{
97
- type: Optional
98
- }, {
99
- type: Inject,
100
- args: [ROW_DELETE_METHOD]
101
- }] }, { type: i8.OpenApiRemoteMethod, decorators: [{
102
- type: Optional
103
- }, {
104
- type: Inject,
105
- args: [ROW_ARCHIVE_METHOD]
106
- }] }, { type: i8.OpenApiRemoteMethod, decorators: [{
107
- type: Optional
108
- }, {
109
- type: Inject,
110
- args: [ROW_RESTORE_METHOD]
111
- }] }, { type: undefined, decorators: [{
112
- type: Optional
113
- }, {
114
- type: Inject,
115
- args: [ROW_EDIT_METHOD]
116
- }] }, { type: undefined, decorators: [{
117
- type: Optional
118
- }, {
119
- type: Inject,
120
- args: [ROW_VIEW_METHOD]
121
- }] }, { type: undefined, decorators: [{
122
- type: Optional
123
- }, {
124
- type: Inject,
125
- args: [ROW_LINK_METHOD]
126
- }] }, { type: undefined, decorators: [{
127
- type: Optional
128
- }, {
129
- type: Inject,
130
- args: [ROW_EDIT_LOADER_METHOD]
131
- }] }]; }, propDecorators: { element: [{
132
- type: Input
133
- }] } });
134
- //# sourceMappingURL=row-controls-cell.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"row-controls-cell.component.js","sourceRoot":"","sources":["../../../../../../../../libs/material/table-system/src/lib/table-row-controls/row-controls-cell/row-controls-cell.component.ts","../../../../../../../../libs/material/table-system/src/lib/table-row-controls/row-controls-cell/row-controls-cell.component.html"],"names":[],"mappings":";AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,MAAM,EACN,KAAK,EACL,QAAQ,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,eAAe,EAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EACL,YAAY,EAEb,MAAM,MAAM,CAAC;;;;;;;;;;AAUd,MAAM,OAAO,wBAAwB;IAMnC,YACmB,eAA+C,EAGhD,qBAA2E,IAAI,EAG/E,sBAA2E,IAAI,EAG/E,wBAA2E,IAAI,EAG/E,mBAA2E,IAAI,EAG/E,gBAA2E,IAAI,EAG/E,gBAA2E,IAAI,EAG/E,mBAA2E,IAAI;QArB9E,oBAAe,GAAf,eAAe,CAAgC;QAGhD,uBAAkB,GAAlB,kBAAkB,CAA6D;QAG/E,wBAAmB,GAAnB,mBAAmB,CAA4D;QAG/E,0BAAqB,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AAQ;;0BACR,MAAM;2BAAC,eAAe;;0BAEtB,QAAQ;;0BACR,MAAM;2BAAC,sBAAsB;4CAvBzB,OAAO;sBAFb,KAAK","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n Input,\n Optional\n} from '@angular/core';\nimport { Required } from '@rxap/utilities';\nimport {\n ROW_ARCHIVE_METHOD,\n ROW_DELETE_METHOD,\n ROW_EDIT_LOADER_METHOD,\n ROW_EDIT_METHOD,\n ROW_LINK_METHOD,\n ROW_RESTORE_METHOD,\n ROW_VIEW_METHOD\n} from '../tokens';\nimport { OpenApiRemoteMethod } from '@rxap/open-api/remote-method';\nimport { TableDataSourceDirective } from '../../table-data-source.directive';\nimport {\n isObservable,\n Observable\n} from 'rxjs';\nimport { Method } from '@rxap/utilities/rxjs';\n\n@Component({\n selector: 'td[mfd-row-controls-cell]',\n templateUrl: './row-controls-cell.component.html',\n styleUrls: [ './row-controls-cell.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'mfd-row-controls-cell' }\n})\nexport class RowControlsCellComponent<Data extends Record<string, any> & { uuid: string }> {\n\n @Input()\n @Required\n public element!: Data;\n\n constructor(\n private readonly tableDataSource: TableDataSourceDirective<Data>,\n @Optional()\n @Inject(ROW_DELETE_METHOD)\n public readonly deleteRemoteMethod: OpenApiRemoteMethod<any, { uuid: string }> | null = null,\n @Optional()\n @Inject(ROW_ARCHIVE_METHOD)\n public readonly archiveRemoteMethod: OpenApiRemoteMethod<any, { uuid: string }> | null = null,\n @Optional()\n @Inject(ROW_RESTORE_METHOD)\n public readonly unarchiveRemoteMethod: OpenApiRemoteMethod<any, { uuid: string }> | null = null,\n @Optional()\n @Inject(ROW_EDIT_METHOD)\n public readonly editRemoteMethod: Method<any, Data | Observable<Data>> | null = null,\n @Optional()\n @Inject(ROW_VIEW_METHOD)\n public readonly rowViewMethod: Method<any, { uuid: string }> | null = null,\n @Optional()\n @Inject(ROW_LINK_METHOD)\n public readonly rowLinkMethod: Method<any, { uuid: string }> | null = null,\n @Optional()\n @Inject(ROW_EDIT_LOADER_METHOD)\n public readonly editLoaderMethod: Method<any, Data> | null = null\n ) {}\n\n public async archive() {\n if (this.archiveRemoteMethod) {\n await this.archiveRemoteMethod.call({ parameters: { uuid: this.element.uuid } });\n this.tableDataSource.refresh();\n }\n }\n\n public async unarchive() {\n if (this.unarchiveRemoteMethod) {\n await this.unarchiveRemoteMethod.call({ parameters: { uuid: this.element.uuid } });\n this.tableDataSource.refresh();\n }\n }\n\n public async remove() {\n if (this.deleteRemoteMethod) {\n await this.deleteRemoteMethod.call({ parameters: { uuid: this.element.uuid } });\n this.tableDataSource.refresh();\n }\n }\n\n public async view() {\n if (this.rowViewMethod) {\n await this.rowViewMethod.call(this.element);\n }\n }\n\n public async link() {\n if (this.rowLinkMethod) {\n await this.rowLinkMethod.call(this.element);\n }\n }\n\n public async edit() {\n if (this.editRemoteMethod) {\n let initial = this.element;\n if (this.editLoaderMethod) {\n initial = await this.editLoaderMethod.call(initial);\n }\n const result = await this.editRemoteMethod.call(initial, { context: this.element });\n if (isObservable(result)) {\n await result.toPromise();\n }\n this.tableDataSource.refresh();\n }\n }\n}\n","<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öschen\"\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"]}
@@ -1,42 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { RowControlsCellComponent } from './row-controls-cell.component';
3
- import { CommonModule } from '@angular/common';
4
- import { FlexLayoutModule } from '@angular/flex-layout';
5
- import { MatButtonModule } from '@angular/material/button';
6
- import { MatIconModule } from '@angular/material/icon';
7
- import { ConfirmComponentModule } from '@rxap/components';
8
- import { MatTooltipModule } from '@angular/material/tooltip';
9
- import * as i0 from "@angular/core";
10
- export class RowControlsCellComponentModule {
11
- }
12
- RowControlsCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
- RowControlsCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsCellComponentModule, declarations: [RowControlsCellComponent], imports: [CommonModule,
14
- FlexLayoutModule,
15
- MatButtonModule,
16
- MatIconModule,
17
- ConfirmComponentModule,
18
- MatTooltipModule], exports: [RowControlsCellComponent] });
19
- RowControlsCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsCellComponentModule, imports: [[
20
- CommonModule,
21
- FlexLayoutModule,
22
- MatButtonModule,
23
- MatIconModule,
24
- ConfirmComponentModule,
25
- MatTooltipModule
26
- ]] });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsCellComponentModule, decorators: [{
28
- type: NgModule,
29
- args: [{
30
- declarations: [RowControlsCellComponent],
31
- imports: [
32
- CommonModule,
33
- FlexLayoutModule,
34
- MatButtonModule,
35
- MatIconModule,
36
- ConfirmComponentModule,
37
- MatTooltipModule
38
- ],
39
- exports: [RowControlsCellComponent]
40
- }]
41
- }] });
42
- //# sourceMappingURL=row-controls-cell.component.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"row-controls-cell.component.module.js","sourceRoot":"","sources":["../../../../../../../../libs/material/table-system/src/lib/table-row-controls/row-controls-cell/row-controls-cell.component.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;;AAe7D,MAAM,OAAO,8BAA8B;;2HAA9B,8BAA8B;4HAA9B,8BAA8B,iBAXzB,wBAAwB,aAEtC,YAAY;QACZ,gBAAgB;QAChB,eAAe;QACf,aAAa;QACb,sBAAsB;QACtB,gBAAgB,aAEF,wBAAwB;4HAE7B,8BAA8B,YAV3B;YACZ,YAAY;YACZ,gBAAgB;YAChB,eAAe;YACf,aAAa;YACb,sBAAsB;YACtB,gBAAgB;SACjB;2FAGU,8BAA8B;kBAZ1C,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,wBAAwB,CAAE;oBAC1C,OAAO,EAAO;wBACZ,YAAY;wBACZ,gBAAgB;wBAChB,eAAe;wBACf,aAAa;wBACb,sBAAsB;wBACtB,gBAAgB;qBACjB;oBACD,OAAO,EAAO,CAAE,wBAAwB,CAAE;iBAC3C","sourcesContent":["import { NgModule } from '@angular/core';\nimport { RowControlsCellComponent } from './row-controls-cell.component';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { ConfirmComponentModule } from '@rxap/components';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n\n@NgModule({\n declarations: [ RowControlsCellComponent ],\n imports: [\n CommonModule,\n FlexLayoutModule,\n MatButtonModule,\n MatIconModule,\n ConfirmComponentModule,\n MatTooltipModule\n ],\n exports: [ RowControlsCellComponent ]\n})\nexport class RowControlsCellComponentModule {\n}\n"]}
@@ -1,117 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- import { ChangeDetectionStrategy, Component, Inject, Optional, } from '@angular/core';
3
- import { TableFilterService } from '../../table-filter/table-filter.service';
4
- import { of } from 'rxjs';
5
- import { distinctUntilChanged, map, startWith } from 'rxjs/operators';
6
- import { ROW_ARCHIVE_METHOD, ROW_DELETE_METHOD, ROW_RESTORE_METHOD, } from '../tokens';
7
- import { TableDataSourceDirective } from '../../table-data-source.directive';
8
- import { SelectRowService } from '../../select-row/select-row.service';
9
- import * as i0 from "@angular/core";
10
- import * as i1 from "../../table-data-source.directive";
11
- import * as i2 from "@angular/material/button";
12
- import * as i3 from "@angular/material/icon";
13
- import * as i4 from "@angular/flex-layout/flex";
14
- import * as i5 from "@angular/common";
15
- import * as i6 from "@angular/material/tooltip";
16
- import * as i7 from "@rxap/components";
17
- import * as i8 from "../../table-filter/table-filter.service";
18
- import * as i9 from "../../select-row/select-row.service";
19
- import * as i10 from "@rxap/open-api/remote-method";
20
- export class RowControlsHeaderCellComponent {
21
- constructor(tableDataSource, tableFilter = null, selectRow = null, deleteRemoteMethod = null, archiveRemoteMethod = null, unarchiveRemoteMethod = null) {
22
- var _a, _b, _c, _d, _e, _f;
23
- this.tableDataSource = tableDataSource;
24
- this.tableFilter = tableFilter;
25
- this.selectRow = selectRow;
26
- this.deleteRemoteMethod = deleteRemoteMethod;
27
- this.archiveRemoteMethod = archiveRemoteMethod;
28
- this.unarchiveRemoteMethod = unarchiveRemoteMethod;
29
- this.disabled$ =
30
- (_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);
31
- this.showUnarchive$ = this.showDelete$ =
32
- (_d = (_c = this.tableFilter) === null || _c === void 0 ? void 0 : _c.change.pipe(map((filter) => filter &&
33
- filter.hasOwnProperty('__archived') &&
34
- filter['__archived'] === true), distinctUntilChanged())) !== null && _d !== void 0 ? _d : of(false);
35
- this.showArchive$ =
36
- (_f = (_e = this.tableFilter) === null || _e === void 0 ? void 0 : _e.change.pipe(map((filter) => !filter ||
37
- !filter.hasOwnProperty('__archived') ||
38
- filter['__archived'] === false), distinctUntilChanged())) !== null && _f !== void 0 ? _f : of(true);
39
- }
40
- archiveSelected(selectedRows) {
41
- return __awaiter(this, void 0, void 0, function* () {
42
- if (this.archiveRemoteMethod && selectedRows) {
43
- yield Promise.all(selectedRows.map((selectedRow) => {
44
- var _a;
45
- return (_a = this.archiveRemoteMethod) === null || _a === void 0 ? void 0 : _a.call({
46
- parameters: { uuid: selectedRow.uuid },
47
- });
48
- }));
49
- this.tableDataSource.refresh();
50
- }
51
- });
52
- }
53
- unarchiveSelected(selectedRows) {
54
- return __awaiter(this, void 0, void 0, function* () {
55
- if (this.unarchiveRemoteMethod && selectedRows) {
56
- yield Promise.all(selectedRows.map((selectedRow) => {
57
- var _a;
58
- return (_a = this.unarchiveRemoteMethod) === null || _a === void 0 ? void 0 : _a.call({
59
- parameters: { uuid: selectedRow.uuid },
60
- });
61
- }));
62
- this.tableDataSource.refresh();
63
- }
64
- });
65
- }
66
- deleteSelected(selectedRows) {
67
- return __awaiter(this, void 0, void 0, function* () {
68
- if (this.deleteRemoteMethod && selectedRows) {
69
- yield Promise.all(selectedRows.map((selectedRow) => {
70
- var _a;
71
- return (_a = this.deleteRemoteMethod) === null || _a === void 0 ? void 0 : _a.call({
72
- parameters: { uuid: selectedRow.uuid },
73
- });
74
- }));
75
- this.tableDataSource.refresh();
76
- }
77
- });
78
- }
79
- }
80
- RowControlsHeaderCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsHeaderCellComponent, deps: [{ token: i1.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 });
81
- RowControlsHeaderCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", 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.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: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4.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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4.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.ConfirmDirective, selector: "[rxapConfirm]", inputs: ["rxapConfirm"], outputs: ["confirmed", "unconfirmed"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsHeaderCellComponent, decorators: [{
83
- type: Component,
84
- args: [{
85
- selector: 'th[mfd-row-controls-header-cell]',
86
- templateUrl: './row-controls-header-cell.component.html',
87
- styleUrls: ['./row-controls-header-cell.component.scss'],
88
- changeDetection: ChangeDetectionStrategy.OnPush,
89
- host: { class: 'mfd-row-controls-header-cell' },
90
- }]
91
- }], ctorParameters: function () { return [{ type: i1.TableDataSourceDirective }, { type: i8.TableFilterService, decorators: [{
92
- type: Optional
93
- }, {
94
- type: Inject,
95
- args: [TableFilterService]
96
- }] }, { type: i9.SelectRowService, decorators: [{
97
- type: Optional
98
- }, {
99
- type: Inject,
100
- args: [SelectRowService]
101
- }] }, { type: i10.OpenApiRemoteMethod, decorators: [{
102
- type: Optional
103
- }, {
104
- type: Inject,
105
- args: [ROW_DELETE_METHOD]
106
- }] }, { type: i10.OpenApiRemoteMethod, decorators: [{
107
- type: Optional
108
- }, {
109
- type: Inject,
110
- args: [ROW_ARCHIVE_METHOD]
111
- }] }, { type: i10.OpenApiRemoteMethod, decorators: [{
112
- type: Optional
113
- }, {
114
- type: Inject,
115
- args: [ROW_RESTORE_METHOD]
116
- }] }]; } });
117
- //# sourceMappingURL=row-controls-header-cell.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"row-controls-header-cell.component.js","sourceRoot":"","sources":["../../../../../../../../libs/material/table-system/src/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.ts","../../../../../../../../libs/material/table-system/src/lib/table-row-controls/row-controls-header-cell/row-controls-header-cell.component.html"],"names":[],"mappings":";AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;;;;;;;;;;;;AAUvE,MAAM,OAAO,8BAA8B;IASzC,YACmB,eAA+C,EAG/C,cAAyC,IAAI,EAG9C,YAA2C,IAAI,EAG9C,qBAGN,IAAI,EAGE,sBAGN,IAAI,EAGE,wBAGN,IAAI;;QAxBE,oBAAe,GAAf,eAAe,CAAgC;QAG/C,gBAAW,GAAX,WAAW,CAAkC;QAG9C,cAAS,GAAT,SAAS,CAAsC;QAG9C,uBAAkB,GAAlB,kBAAkB,CAGpB;QAGE,wBAAmB,GAAnB,mBAAmB,CAGrB;QAGE,0BAAqB,GAArB,qBAAqB,CAGvB;QAEf,IAAI,CAAC,SAAS;YACZ,MAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,aAAa,CAAC,IAAI,CAChC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,CAAC,EAChD,SAAS,CAAC,IAAI,C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AM;2BAAC,kBAAkB","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n Optional,\n} from '@angular/core';\nimport { TableFilterService } from '../../table-filter/table-filter.service';\nimport type { Observable } from 'rxjs';\nimport { of } from 'rxjs';\nimport { distinctUntilChanged, map, startWith } from 'rxjs/operators';\nimport {\n ROW_ARCHIVE_METHOD,\n ROW_DELETE_METHOD,\n ROW_RESTORE_METHOD,\n} from '../tokens';\nimport { TableDataSourceDirective } from '../../table-data-source.directive';\nimport { SelectRowService } from '../../select-row/select-row.service';\nimport { OpenApiRemoteMethod } from '@rxap/open-api/remote-method';\n\n@Component({\n selector: 'th[mfd-row-controls-header-cell]',\n templateUrl: './row-controls-header-cell.component.html',\n styleUrls: ['./row-controls-header-cell.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'mfd-row-controls-header-cell' },\n})\nexport class RowControlsHeaderCellComponent<Data extends Record<string, any>> {\n public showArchive$: Observable<boolean>;\n\n public showUnarchive$: Observable<boolean>;\n\n public showDelete$: Observable<boolean>;\n\n public disabled$: Observable<boolean>;\n\n constructor(\n private readonly tableDataSource: TableDataSourceDirective<Data>,\n @Optional()\n @Inject(TableFilterService)\n private readonly tableFilter: TableFilterService | null = null,\n @Optional()\n @Inject(SelectRowService)\n public readonly selectRow: SelectRowService<Data> | null = null,\n @Optional()\n @Inject(ROW_DELETE_METHOD)\n private readonly deleteRemoteMethod: OpenApiRemoteMethod<\n any,\n { uuid: string }\n > | null = null,\n @Optional()\n @Inject(ROW_ARCHIVE_METHOD)\n private readonly archiveRemoteMethod: OpenApiRemoteMethod<\n any,\n { uuid: string }\n > | null = null,\n @Optional()\n @Inject(ROW_RESTORE_METHOD)\n private readonly unarchiveRemoteMethod: OpenApiRemoteMethod<\n any,\n { uuid: string }\n > | null = null\n ) {\n this.disabled$ =\n this.selectRow?.selectedRows$.pipe(\n map((selectedRows) => selectedRows.length === 0),\n startWith(true)\n ) ?? of(true);\n this.showUnarchive$ = this.showDelete$ =\n this.tableFilter?.change.pipe(\n map(\n (filter) =>\n filter &&\n filter.hasOwnProperty('__archived') &&\n filter['__archived'] === true\n ),\n distinctUntilChanged()\n ) ?? of(false);\n this.showArchive$ =\n this.tableFilter?.change.pipe(\n map(\n (filter) =>\n !filter ||\n !filter.hasOwnProperty('__archived') ||\n filter['__archived'] === false\n ),\n distinctUntilChanged()\n ) ?? of(true);\n }\n\n public async archiveSelected(selectedRows: Data[] | undefined) {\n if (this.archiveRemoteMethod && selectedRows) {\n await Promise.all(\n selectedRows.map((selectedRow) =>\n this.archiveRemoteMethod?.call({\n parameters: { uuid: selectedRow.uuid },\n })\n )\n );\n this.tableDataSource.refresh();\n }\n }\n\n public async unarchiveSelected(selectedRows: Data[] | undefined) {\n if (this.unarchiveRemoteMethod && selectedRows) {\n await Promise.all(\n selectedRows.map((selectedRow) =>\n this.unarchiveRemoteMethod?.call({\n parameters: { uuid: selectedRow.uuid },\n })\n )\n );\n this.tableDataSource.refresh();\n }\n }\n\n public async deleteSelected(selectedRows: Data[] | undefined) {\n if (this.deleteRemoteMethod && selectedRows) {\n await Promise.all(\n selectedRows.map((selectedRow) =>\n this.deleteRemoteMethod?.call({\n parameters: { uuid: selectedRow.uuid },\n })\n )\n );\n this.tableDataSource.refresh();\n }\n }\n}\n","<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öschen\" 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"]}
@@ -1,42 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { RowControlsHeaderCellComponent } from './row-controls-header-cell.component';
3
- import { FlexLayoutModule } from '@angular/flex-layout';
4
- import { MatButtonModule } from '@angular/material/button';
5
- import { MatIconModule } from '@angular/material/icon';
6
- import { ConfirmComponentModule } from '@rxap/components';
7
- import { CommonModule } from '@angular/common';
8
- import { MatTooltipModule } from '@angular/material/tooltip';
9
- import * as i0 from "@angular/core";
10
- export class RowControlsHeaderCellComponentModule {
11
- }
12
- RowControlsHeaderCellComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsHeaderCellComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
- RowControlsHeaderCellComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsHeaderCellComponentModule, declarations: [RowControlsHeaderCellComponent], imports: [FlexLayoutModule,
14
- MatButtonModule,
15
- MatIconModule,
16
- ConfirmComponentModule,
17
- CommonModule,
18
- MatTooltipModule], exports: [RowControlsHeaderCellComponent] });
19
- RowControlsHeaderCellComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsHeaderCellComponentModule, imports: [[
20
- FlexLayoutModule,
21
- MatButtonModule,
22
- MatIconModule,
23
- ConfirmComponentModule,
24
- CommonModule,
25
- MatTooltipModule,
26
- ]] });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: RowControlsHeaderCellComponentModule, decorators: [{
28
- type: NgModule,
29
- args: [{
30
- declarations: [RowControlsHeaderCellComponent],
31
- imports: [
32
- FlexLayoutModule,
33
- MatButtonModule,
34
- MatIconModule,
35
- ConfirmComponentModule,
36
- CommonModule,
37
- MatTooltipModule,
38
- ],
39
- exports: [RowControlsHeaderCellComponent],
40
- }]
41
- }] });
42
- //# sourceMappingURL=row-controls-header-cell.component.module.js.map