@one-paragon/angular-utilities 2.2.6 → 2.2.7

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 (297) hide show
  1. package/action-state/action-state-spinner/action-state-spinner.component.d.ts +12 -0
  2. package/action-state/action-state-ui/action-state-ui.module.d.ts +7 -0
  3. package/{src/action-state/index.ts → action-state/index.d.ts} +4 -8
  4. package/action-state/ngrx-ext/ngrx-ext.module.d.ts +8 -0
  5. package/action-state/ngrx.d.ts +31 -0
  6. package/fesm2022/one-paragon-angular-utilities.mjs +6565 -0
  7. package/fesm2022/one-paragon-angular-utilities.mjs.map +1 -0
  8. package/http-request-state/RequestStateFactory.d.ts +17 -0
  9. package/http-request-state/RequestStateStore.d.ts +101 -0
  10. package/{src/http-request-state/deprecated.ts → http-request-state/deprecated.d.ts} +20 -20
  11. package/http-request-state/directives/HttpStateDirectiveBase.d.ts +14 -0
  12. package/http-request-state/directives/http-error-state-directive.d.ts +10 -0
  13. package/http-request-state/directives/http-inProgress-state-directive.d.ts +10 -0
  14. package/http-request-state/directives/http-notStarted-state-directive.d.ts +10 -0
  15. package/http-request-state/directives/http-success-state-directive.d.ts +17 -0
  16. package/{src/http-request-state/directives/index.ts → http-request-state/directives/index.d.ts} +5 -5
  17. package/http-request-state/directives/request-state-directive.d.ts +34 -0
  18. package/http-request-state/helpers.d.ts +9 -0
  19. package/http-request-state/http-state-module.d.ts +11 -0
  20. package/{src/http-request-state/index.ts → http-request-state/index.d.ts} +7 -7
  21. package/http-request-state/request-state.d.ts +12 -0
  22. package/http-request-state/rxjs/getRequestorBody.d.ts +3 -0
  23. package/http-request-state/rxjs/getRequestorState.d.ts +3 -0
  24. package/{src/http-request-state/rxjs/index.ts → http-request-state/rxjs/index.d.ts} +4 -4
  25. package/http-request-state/rxjs/tapError.d.ts +3 -0
  26. package/http-request-state/rxjs/tapSuccess.d.ts +3 -0
  27. package/http-request-state/types.d.ts +41 -0
  28. package/index.d.ts +5 -0
  29. package/ngrx/actionable-selector.d.ts +32 -0
  30. package/ngrx/index.d.ts +1 -0
  31. package/package.json +27 -15
  32. package/{src/public-api.ts → public-api.d.ts} +16 -35
  33. package/rxjs/defaultShareReplay.d.ts +2 -0
  34. package/{src/rxjs/index.ts → rxjs/index.d.ts} +5 -5
  35. package/rxjs/mapError.d.ts +2 -0
  36. package/rxjs/rxjs-operators.d.ts +13 -0
  37. package/rxjs/subjectifier.d.ts +10 -0
  38. package/rxjs/subscriber.directive.d.ts +14 -0
  39. package/table-builder/classes/DefaultSettings.d.ts +9 -0
  40. package/table-builder/classes/MatTableObservableDataSource.d.ts +9 -0
  41. package/table-builder/classes/TableBuilderConfig.d.ts +31 -0
  42. package/table-builder/classes/TableBuilderDataSource.d.ts +18 -0
  43. package/table-builder/classes/TableState.d.ts +81 -0
  44. package/table-builder/classes/data-store.d.ts +8 -0
  45. package/{src/table-builder/classes/display-col.ts → table-builder/classes/display-col.d.ts} +5 -5
  46. package/table-builder/classes/filter-info.d.ts +39 -0
  47. package/table-builder/classes/table-builder-general-settings.d.ts +122 -0
  48. package/table-builder/classes/table-builder.d.ts +22 -0
  49. package/table-builder/classes/table-store.d.ts +146 -0
  50. package/table-builder/classes/table-store.helpers.d.ts +31 -0
  51. package/table-builder/components/array-column.component.d.ts +15 -0
  52. package/table-builder/components/column-builder/column-builder.component.d.ts +41 -0
  53. package/table-builder/components/column-builder/column-helpers.d.ts +38 -0
  54. package/table-builder/components/column-header-menu/column-header-menu.component.d.ts +50 -0
  55. package/table-builder/components/date-filter/date-filter.component.d.ts +37 -0
  56. package/table-builder/components/date-time-filter/date-time-filter.component.d.ts +37 -0
  57. package/table-builder/components/filter/filter.component.d.ts +48 -0
  58. package/table-builder/components/filter/in-list/in-list-filter.component.d.ts +22 -0
  59. package/table-builder/components/gen-col-displayer/gen-col-displayer.component.d.ts +17 -0
  60. package/table-builder/components/generic-table/generic-table.component.d.ts +85 -0
  61. package/table-builder/components/generic-table/paginator.component.d.ts +26 -0
  62. package/table-builder/components/group-by-list/group-by-list.component.d.ts +11 -0
  63. package/table-builder/components/in-filter/in-filter.component.d.ts +20 -0
  64. package/{src/table-builder/components/index.ts → table-builder/components/index.d.ts} +9 -9
  65. package/table-builder/components/initialization-component/initialization.component.d.ts +15 -0
  66. package/table-builder/components/link-column.component.d.ts +23 -0
  67. package/table-builder/components/number-filter/number-filter.component.d.ts +39 -0
  68. package/table-builder/components/profiles-menu/profiles-menu.component.d.ts +33 -0
  69. package/table-builder/components/reset-menu/reset-menu.component.d.ts +25 -0
  70. package/table-builder/components/scroll-strategy.d.ts +45 -0
  71. package/table-builder/components/sort-menu/sort-menu.component-store.d.ts +24 -0
  72. package/table-builder/components/sort-menu/sort-menu.component.d.ts +19 -0
  73. package/table-builder/components/table-container/table-container.component.d.ts +104 -0
  74. package/table-builder/components/table-container/table-container.helpers/data-state.helpers.d.ts +7 -0
  75. package/table-builder/components/table-container/table-container.helpers/filter-state.helpers.d.ts +19 -0
  76. package/table-builder/components/table-container/table-container.helpers/groupBy.helpers.d.ts +19 -0
  77. package/table-builder/components/table-container/table-container.helpers/meta-data.helpers.d.ts +2 -0
  78. package/table-builder/components/table-container/table-container.helpers/sort-state.helpers.d.ts +12 -0
  79. package/table-builder/components/table-container/tableProps.d.ts +10 -0
  80. package/table-builder/components/table-container/virtual-scroll-container.d.ts +40 -0
  81. package/table-builder/components/table-container-filter/filter-list/filter-list.component.d.ts +15 -0
  82. package/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.d.ts +12 -0
  83. package/table-builder/components/table-container-filter/table-wrapper-filter-store.d.ts +14 -0
  84. package/table-builder/components/table-header-menu/table-header-menu.component.d.ts +15 -0
  85. package/table-builder/directives/custom-cell-directive.d.ts +34 -0
  86. package/{src/table-builder/directives/index.ts → table-builder/directives/index.d.ts} +5 -6
  87. package/table-builder/directives/multi-sort.directive.d.ts +10 -0
  88. package/table-builder/directives/resize-column.directive.d.ts +43 -0
  89. package/table-builder/directives/table-wrapper.directive.d.ts +8 -0
  90. package/table-builder/directives/tb-filter.directive.d.ts +116 -0
  91. package/table-builder/enums/filterTypes.d.ts +36 -0
  92. package/table-builder/functions/boolean-filter-function.d.ts +3 -0
  93. package/table-builder/functions/date-filter-function.d.ts +4 -0
  94. package/table-builder/functions/download-data.d.ts +1 -0
  95. package/table-builder/functions/null-filter-function.d.ts +2 -0
  96. package/table-builder/functions/number-filter-function.d.ts +4 -0
  97. package/table-builder/functions/sort-data-function.d.ts +6 -0
  98. package/table-builder/functions/string-filter-function.d.ts +5 -0
  99. package/{src/table-builder/interfaces/ColumnInfo.ts → table-builder/interfaces/ColumnInfo.d.ts} +6 -7
  100. package/{src/table-builder/interfaces/dictionary.ts → table-builder/interfaces/dictionary.d.ts} +3 -3
  101. package/table-builder/interfaces/report-def.d.ts +229 -0
  102. package/table-builder/ngrx/tableBuilderStateStore.d.ts +69 -0
  103. package/table-builder/pipes/column-total.pipe.d.ts +8 -0
  104. package/table-builder/pipes/format-filter-type.pipe.d.ts +8 -0
  105. package/table-builder/pipes/format-filter-value.pipe.d.ts +11 -0
  106. package/table-builder/pipes/key-display.d.ts +9 -0
  107. package/table-builder/services/export-to-csv.service.d.ts +22 -0
  108. package/table-builder/services/link-creator.service.d.ts +16 -0
  109. package/table-builder/services/table-template-service.d.ts +14 -0
  110. package/table-builder/services/transform-creator.d.ts +9 -0
  111. package/table-builder/table-builder.module.d.ts +14 -0
  112. package/utilities/array-helpers.d.ts +1 -0
  113. package/utilities/directives/auto-focus.directive.d.ts +9 -0
  114. package/utilities/directives/clickEmitterDirective.d.ts +7 -0
  115. package/utilities/directives/clickSubject.d.ts +9 -0
  116. package/utilities/directives/conditional-classes.directive.d.ts +12 -0
  117. package/utilities/directives/dialog-service.d.ts +10 -0
  118. package/utilities/directives/dialog.d.ts +45 -0
  119. package/utilities/directives/mat-toggle-group-directive.d.ts +21 -0
  120. package/utilities/directives/prevent-enter.directive.d.ts +6 -0
  121. package/utilities/directives/stop-propagation.directive.d.ts +7 -0
  122. package/utilities/directives/styler.d.ts +16 -0
  123. package/utilities/directives/trim-whitespace.directive.d.ts +7 -0
  124. package/{src/utilities/index.ts → utilities/index.d.ts} +15 -22
  125. package/utilities/module.d.ts +19 -0
  126. package/utilities/pipes/function.pipe.d.ts +11 -0
  127. package/utilities/pipes/phone.pipe.d.ts +8 -0
  128. package/utilities/pipes/space-case.pipes.d.ts +17 -0
  129. package/karma.conf.js +0 -44
  130. package/ng-package.json +0 -7
  131. package/src/action-state/action-state-spinner/action-state-spinner.component.css +0 -16
  132. package/src/action-state/action-state-spinner/action-state-spinner.component.html +0 -7
  133. package/src/action-state/action-state-spinner/action-state-spinner.component.spec.ts +0 -25
  134. package/src/action-state/action-state-spinner/action-state-spinner.component.ts +0 -25
  135. package/src/action-state/action-state-ui/action-state-ui.module.ts +0 -13
  136. package/src/action-state/ngrx-ext/ngrx-ext.module.ts +0 -14
  137. package/src/action-state/ngrx.ts +0 -69
  138. package/src/http-request-state/RequestStateFactory.ts +0 -56
  139. package/src/http-request-state/RequestStateStore.ts +0 -284
  140. package/src/http-request-state/directives/HttpStateDirectiveBase.ts +0 -29
  141. package/src/http-request-state/directives/http-error-state-directive.ts +0 -21
  142. package/src/http-request-state/directives/http-inProgress-state-directive.ts +0 -19
  143. package/src/http-request-state/directives/http-notStarted-state-directive.ts +0 -19
  144. package/src/http-request-state/directives/http-success-state-directive.ts +0 -29
  145. package/src/http-request-state/directives/request-state-directive.spec.ts +0 -73
  146. package/src/http-request-state/directives/request-state-directive.ts +0 -78
  147. package/src/http-request-state/helpers.ts +0 -30
  148. package/src/http-request-state/http-state-module.ts +0 -23
  149. package/src/http-request-state/models/view-context.ts +0 -18
  150. package/src/http-request-state/observable.spec.ts +0 -43
  151. package/src/http-request-state/request-state.ts +0 -66
  152. package/src/http-request-state/rxjs/getRequestorBody.ts +0 -10
  153. package/src/http-request-state/rxjs/getRequestorState.ts +0 -8
  154. package/src/http-request-state/rxjs/tapError.ts +0 -16
  155. package/src/http-request-state/rxjs/tapSuccess.ts +0 -16
  156. package/src/http-request-state/strategies.spec.ts +0 -42
  157. package/src/http-request-state/types.ts +0 -54
  158. package/src/ngrx/actionable-selector.ts +0 -160
  159. package/src/ngrx/index.ts +0 -1
  160. package/src/rxjs/defaultShareReplay.ts +0 -8
  161. package/src/rxjs/mapError.ts +0 -8
  162. package/src/rxjs/rxjs-operators.ts +0 -130
  163. package/src/rxjs/subjectifier.ts +0 -17
  164. package/src/rxjs/subscriber.directive.ts +0 -57
  165. package/src/specs/clickSubject.spec.ts +0 -95
  166. package/src/specs/dialog.spec.ts +0 -101
  167. package/src/specs/toggleGroupDirective.spec.ts +0 -229
  168. package/src/table-builder/classes/DefaultSettings.ts +0 -11
  169. package/src/table-builder/classes/MatTableObservableDataSource.ts +0 -23
  170. package/src/table-builder/classes/TableBuilderConfig.ts +0 -50
  171. package/src/table-builder/classes/TableBuilderDataSource.ts +0 -64
  172. package/src/table-builder/classes/TableState.ts +0 -125
  173. package/src/table-builder/classes/data-store.ts +0 -10
  174. package/src/table-builder/classes/filter-info.ts +0 -125
  175. package/src/table-builder/classes/table-builder-general-settings.ts +0 -205
  176. package/src/table-builder/classes/table-builder.ts +0 -105
  177. package/src/table-builder/classes/table-store.helpers.ts +0 -104
  178. package/src/table-builder/classes/table-store.ts +0 -440
  179. package/src/table-builder/components/array-column.component.ts +0 -34
  180. package/src/table-builder/components/column-builder/column-builder.component.html +0 -87
  181. package/src/table-builder/components/column-builder/column-builder.component.scss +0 -43
  182. package/src/table-builder/components/column-builder/column-builder.component.spec.ts +0 -49
  183. package/src/table-builder/components/column-builder/column-builder.component.ts +0 -129
  184. package/src/table-builder/components/column-builder/column-helpers.ts +0 -54
  185. package/src/table-builder/components/column-header-menu/column-header-menu.component.html +0 -110
  186. package/src/table-builder/components/column-header-menu/column-header-menu.component.scss +0 -97
  187. package/src/table-builder/components/column-header-menu/column-header-menu.component.ts +0 -94
  188. package/src/table-builder/components/date-filter/date-filter.component.html +0 -25
  189. package/src/table-builder/components/date-filter/date-filter.component.ts +0 -22
  190. package/src/table-builder/components/date-time-filter/date-time-filter.component.html +0 -11
  191. package/src/table-builder/components/date-time-filter/date-time-filter.component.ts +0 -20
  192. package/src/table-builder/components/filter/filter.component.html +0 -109
  193. package/src/table-builder/components/filter/filter.component.scss +0 -60
  194. package/src/table-builder/components/filter/filter.component.spec.ts +0 -86
  195. package/src/table-builder/components/filter/filter.component.ts +0 -64
  196. package/src/table-builder/components/filter/in-list/in-list-filter.component.ts +0 -102
  197. package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.html +0 -60
  198. package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.scss +0 -57
  199. package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.ts +0 -44
  200. package/src/table-builder/components/generic-table/generic-table.component.html +0 -97
  201. package/src/table-builder/components/generic-table/generic-table.component.scss +0 -38
  202. package/src/table-builder/components/generic-table/generic-table.component.ts +0 -403
  203. package/src/table-builder/components/generic-table/paginator.component.ts +0 -112
  204. package/src/table-builder/components/group-by-list/group-by-list.component.css +0 -17
  205. package/src/table-builder/components/group-by-list/group-by-list.component.html +0 -14
  206. package/src/table-builder/components/group-by-list/group-by-list.component.spec.ts +0 -23
  207. package/src/table-builder/components/group-by-list/group-by-list.component.ts +0 -25
  208. package/src/table-builder/components/in-filter/in-filter.component.css +0 -3
  209. package/src/table-builder/components/in-filter/in-filter.component.html +0 -23
  210. package/src/table-builder/components/in-filter/in-filter.component.ts +0 -65
  211. package/src/table-builder/components/initialization-component/initialization.component.html +0 -78
  212. package/src/table-builder/components/initialization-component/initialization.component.ts +0 -27
  213. package/src/table-builder/components/link-column.component.ts +0 -42
  214. package/src/table-builder/components/number-filter/number-filter.component.css +0 -10
  215. package/src/table-builder/components/number-filter/number-filter.component.html +0 -25
  216. package/src/table-builder/components/number-filter/number-filter.component.spec.ts +0 -30
  217. package/src/table-builder/components/number-filter/number-filter.component.ts +0 -25
  218. package/src/table-builder/components/profiles-menu/profiles-menu.component.html +0 -77
  219. package/src/table-builder/components/profiles-menu/profiles-menu.component.scss +0 -126
  220. package/src/table-builder/components/profiles-menu/profiles-menu.component.spec.ts +0 -23
  221. package/src/table-builder/components/profiles-menu/profiles-menu.component.ts +0 -63
  222. package/src/table-builder/components/reset-menu/reset-menu.component.css +0 -3
  223. package/src/table-builder/components/reset-menu/reset-menu.component.html +0 -10
  224. package/src/table-builder/components/reset-menu/reset-menu.component.ts +0 -87
  225. package/src/table-builder/components/scroll-strategy.ts +0 -139
  226. package/src/table-builder/components/sort-menu/sort-menu.component-store.ts +0 -57
  227. package/src/table-builder/components/sort-menu/sort-menu.component.html +0 -115
  228. package/src/table-builder/components/sort-menu/sort-menu.component.scss +0 -119
  229. package/src/table-builder/components/sort-menu/sort-menu.component.ts +0 -88
  230. package/src/table-builder/components/table-container/table-container.component.html +0 -81
  231. package/src/table-builder/components/table-container/table-container.component.ts +0 -403
  232. package/src/table-builder/components/table-container/table-container.helpers/data-state.helpers.ts +0 -113
  233. package/src/table-builder/components/table-container/table-container.helpers/filter-state.helpers.ts +0 -125
  234. package/src/table-builder/components/table-container/table-container.helpers/groupBy.helpers.ts +0 -122
  235. package/src/table-builder/components/table-container/table-container.helpers/meta-data.helpers.ts +0 -16
  236. package/src/table-builder/components/table-container/table-container.helpers/sort-state.helpers.ts +0 -47
  237. package/src/table-builder/components/table-container/table-container.scss +0 -47
  238. package/src/table-builder/components/table-container/tableProps.ts +0 -18
  239. package/src/table-builder/components/table-container/virtual-scroll-container.ts +0 -216
  240. package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.html +0 -35
  241. package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.ts +0 -44
  242. package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.css +0 -40
  243. package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.html +0 -11
  244. package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.spec.ts +0 -85
  245. package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.ts +0 -36
  246. package/src/table-builder/components/table-container-filter/table-wrapper-filter-store.ts +0 -23
  247. package/src/table-builder/components/table-header-menu/table-header-menu.component.css +0 -21
  248. package/src/table-builder/components/table-header-menu/table-header-menu.component.html +0 -50
  249. package/src/table-builder/components/table-header-menu/table-header-menu.component.ts +0 -35
  250. package/src/table-builder/directives/custom-cell-directive.ts +0 -57
  251. package/src/table-builder/directives/multi-sort.directive.spec.ts +0 -124
  252. package/src/table-builder/directives/multi-sort.directive.ts +0 -50
  253. package/src/table-builder/directives/resize-column.directive.ts +0 -107
  254. package/src/table-builder/directives/table-wrapper.directive.ts +0 -13
  255. package/src/table-builder/directives/tb-filter.directive.ts +0 -376
  256. package/src/table-builder/enums/filterTypes.ts +0 -40
  257. package/src/table-builder/functions/boolean-filter-function.ts +0 -12
  258. package/src/table-builder/functions/date-filter-function.ts +0 -78
  259. package/src/table-builder/functions/download-data.ts +0 -11
  260. package/src/table-builder/functions/null-filter-function.ts +0 -9
  261. package/src/table-builder/functions/number-filter-function.ts +0 -41
  262. package/src/table-builder/functions/sort-data-function.ts +0 -80
  263. package/src/table-builder/functions/string-filter-function.ts +0 -53
  264. package/src/table-builder/interfaces/report-def.ts +0 -254
  265. package/src/table-builder/ngrx/tableBuilderStateStore.ts +0 -197
  266. package/src/table-builder/pipes/column-total.pipe.ts +0 -16
  267. package/src/table-builder/pipes/format-filter-type.pipe.ts +0 -12
  268. package/src/table-builder/pipes/format-filter-value.pipe.ts +0 -67
  269. package/src/table-builder/pipes/key-display.ts +0 -13
  270. package/src/table-builder/services/export-to-csv.service.ts +0 -113
  271. package/src/table-builder/services/link-creator.service.ts +0 -98
  272. package/src/table-builder/services/table-template-service.ts +0 -47
  273. package/src/table-builder/services/transform-creator.ts +0 -96
  274. package/src/table-builder/specs/table-custom-filters.spec.ts +0 -262
  275. package/src/table-builder/styles/collapser.styles.scss +0 -16
  276. package/src/table-builder/table-builder.module.ts +0 -38
  277. package/src/test.ts +0 -17
  278. package/src/utilities/array-helpers.ts +0 -13
  279. package/src/utilities/directives/auto-focus.directive.ts +0 -20
  280. package/src/utilities/directives/clickEmitterDirective.ts +0 -15
  281. package/src/utilities/directives/clickSubject.ts +0 -19
  282. package/src/utilities/directives/conditional-classes.directive.ts +0 -36
  283. package/src/utilities/directives/dialog-service.ts +0 -19
  284. package/src/utilities/directives/dialog.ts +0 -144
  285. package/src/utilities/directives/mat-toggle-group-directive.ts +0 -60
  286. package/src/utilities/directives/prevent-enter.directive.ts +0 -12
  287. package/src/utilities/directives/stop-propagation.directive.ts +0 -19
  288. package/src/utilities/directives/styler.ts +0 -44
  289. package/src/utilities/directives/trim-whitespace.directive.ts +0 -20
  290. package/src/utilities/module.ts +0 -53
  291. package/src/utilities/pipes/function.pipe.ts +0 -21
  292. package/src/utilities/pipes/phone.pipe.ts +0 -20
  293. package/src/utilities/pipes/space-case.pipes.spec.ts +0 -47
  294. package/src/utilities/pipes/space-case.pipes.ts +0 -26
  295. package/tsconfig.lib.json +0 -20
  296. package/tsconfig.lib.prod.json +0 -10
  297. package/tsconfig.spec.json +0 -17
@@ -1,65 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, ChangeDetectorRef, inject, input } from '@angular/core';
2
- import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
3
- import { FieldType } from '../../interfaces/report-def';
4
- import { AutoFocusDirective } from '../../../utilities';
5
-
6
- @Component({
7
- selector: 'lib-in-filter',
8
- templateUrl: './in-filter.component.html',
9
- styleUrls: ['./in-filter.component.css'],
10
- changeDetection: ChangeDetectionStrategy.OnPush,
11
- providers: [{
12
- provide: NG_VALUE_ACCESSOR,
13
- useExisting: InFilterComponent,
14
- multi: true
15
- }],
16
- imports: [
17
- FormsModule, AutoFocusDirective
18
- ]
19
- })
20
- export class InFilterComponent implements ControlValueAccessor {
21
- private ref = inject(ChangeDetectorRef);
22
-
23
- FieldType = FieldType;
24
- $type = input.required<FieldType>({ alias: 'type' })
25
- value: (string | number | undefined)[] = [undefined];
26
-
27
- constructor() {
28
- this.value = [undefined];
29
- }
30
- writeValue(obj: any[]): void {
31
- if(!obj?.length) obj = [undefined];
32
- this.value = obj;
33
- this.ref.markForCheck();
34
- }
35
- onChange = (_: any) => { };
36
-
37
- registerOnChange(fn: any): void {
38
- this.onChange = fn;
39
- }
40
- onTouched = () => { };
41
- registerOnTouched(fn: any): void {
42
- this.onTouched = fn;
43
- }
44
-
45
- addInput(){
46
- this.value = [...this.value, undefined];
47
- this.ref.markForCheck();
48
- this.onChange(this.value);
49
- }
50
-
51
- removeInput(index: number){
52
- this.value = [...this.value];
53
- this.value.splice(index, 1);
54
- this.ref.markForCheck();
55
- this.onChange(this.value);
56
- }
57
-
58
- onValueChange(i:number, value: number | string){
59
- this.value = [...this.value];
60
- this.value[i] = value;
61
- this.ref.markForCheck();
62
- this.onChange(this.value);
63
- }
64
-
65
- }
@@ -1,78 +0,0 @@
1
- <ng-template #link let-value='value' let-element='element' let-additional="additional" let-styles="innerStyles">
2
- @let link = additional.link | func : element;
3
- @if(link)
4
- {
5
- <tb-link-column [element]="element" [additional]="additional" [link]="$any(link)">
6
- <span [styler]="styles" [element]="element">{{value}}</span>
7
- </tb-link-column>
8
- }
9
- @else
10
- {
11
- <span [styler]="styles" [element]="element">{{value}}</span>
12
- }
13
- </ng-template>
14
-
15
- <ng-template #routerLink let-value='value' let-element='element' let-additional="additional" let-styles="innerStyles">
16
- @let link = additional.link | func : element;
17
- @if(link)
18
- {
19
- <tb-router-link-column [element]="element" [additional]="additional" [link]="$any(link)">
20
- <span [styler]="styles" [element]="element">{{value}}</span>
21
- </tb-router-link-column>
22
- }
23
- @else
24
- {
25
- <span [styler]="styles" [element]="element">{{value}}</span>
26
- }
27
-
28
- </ng-template>
29
-
30
- <ng-template #linkWithIcon let-value='value' let-element='element' let-additional="additional" let-styles="innerStyles">
31
- @let link = additional.link | func : element;
32
- @if(link)
33
- {
34
- <tb-link-column [element]="element" [additional]="additional" [link]="$any(link)">
35
- <mat-icon [styler]="styles" [element]="element">{{ value}}</mat-icon>
36
- </tb-link-column>
37
- }
38
- @else
39
- {
40
- <span [styler]="styles" [element]="element">{{value}}</span>
41
- }
42
- </ng-template>
43
-
44
- <ng-template #routerLinkWithIcon let-value='value' let-element='element' let-additional="additional" let-styles="innerStyles">
45
- @let link = additional.link | func : element;
46
- @if(link)
47
- {
48
- <tb-link-column [element]="element" [additional]="additional" [link]="$any(link)">
49
- <mat-icon [styler]="styles" [element]="element">{{ value}}</mat-icon>
50
- </tb-link-column>
51
- }
52
- @else
53
- {
54
- <mat-icon [styler]="styles" [element]="element">{{ value}}</mat-icon>
55
- }
56
- </ng-template>
57
-
58
- <ng-template #imageUrl let-value='value'>
59
- <span>
60
- <img height="75px" width="75px" [src]="value" />
61
- </span>
62
- </ng-template>
63
-
64
- <ng-template #arrayNewLine let-value='value' let-element='element' let-additional="additional" let-styles="innerStyles">
65
- <tb-new-line-array-column [value]='value' [additional]='additional' [styler]="styles" [element]="element"/>
66
- </ng-template>
67
-
68
- <ng-template #arrayComma let-value='value' let-element='element' let-additional="additional" let-styles="innerStyles">
69
- <tb-comma-array-column [value]='value' [additional]='additional' [styler]="styles" [element]="element"/>
70
- </ng-template>
71
-
72
- <ng-template #default let-value='value' let-element='element' let-styles="innerStyles">
73
- <span [styler]="styles" [element]="element">{{value}}</span>
74
- </ng-template>
75
-
76
- <ng-template #defaultWithIcon let-value='value' let-element='element' let-styles="innerStyles">
77
- <mat-icon [styler]="styles" [element]="element">{{value}}</mat-icon>
78
- </ng-template>
@@ -1,27 +0,0 @@
1
- import { Component, TemplateRef, viewChild } from "@angular/core";
2
- import { LinkColumnComponent, RouterLinkColumnComponent } from "../link-column.component";
3
- import { ArrayCommaColumnComponent, ArrayNewLineColumnComponent } from "../array-column.component";
4
- import { MatIcon } from "@angular/material/icon";
5
- import { StylerDirective } from "../../../utilities/directives/styler";
6
- import { FunctionPipe } from "../../../utilities";
7
-
8
- @Component({
9
- selector: 'initialization',
10
- templateUrl: './initialization.component.html',
11
- imports: [
12
- LinkColumnComponent, ArrayCommaColumnComponent, MatIcon,
13
- RouterLinkColumnComponent, ArrayNewLineColumnComponent,
14
- StylerDirective, FunctionPipe
15
- ]
16
- })
17
- export class InitializationComponent {
18
- $linkTemplate = viewChild.required<TemplateRef<any>>('link');
19
- $routerLinkTemplate = viewChild.required<TemplateRef<any>>('routerLink');
20
- $linkWithIconTemplate = viewChild.required<TemplateRef<any>>('linkWithIcon');
21
- $routerLinkWithIconTemplate = viewChild.required<TemplateRef<any>>('routerLinkWithIcon');
22
- $imageUrlTemplate = viewChild.required<TemplateRef<any>>('imageUrl');
23
- $arrayNewLineTemplate = viewChild.required<TemplateRef<any>>('arrayNewLine');
24
- $arrayCommaTemplate = viewChild.required<TemplateRef<any>>('arrayComma');
25
- $defaultTemplate = viewChild.required<TemplateRef<any>>('default');
26
- $defaultWithIcon = viewChild.required<TemplateRef<any>>('defaultWithIcon');
27
- }
@@ -1,42 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from "@angular/core";
2
- import { RouterModule } from "@angular/router";
3
- import { LinkInfo } from "../services/link-creator.service";
4
-
5
- @Component({
6
- selector: "tb-router-link-column",
7
- changeDetection: ChangeDetectionStrategy.OnPush,
8
- imports: [
9
- RouterModule
10
- ],
11
- template: `
12
- <a target="{{additional().target}}"
13
- [routerLink]=" [link()]"
14
- [queryParams]="queryParams()"
15
- [fragment]="routerLinkOptions().fragment"
16
- [preserveFragment]="routerLinkOptions().preserveFragment"
17
- [queryParamsHandling]="routerLinkOptions().queryParamsHandling"
18
- >
19
- <ng-content></ng-content>
20
- </a>
21
- `
22
- }) export class RouterLinkColumnComponent {
23
- additional = input.required<LinkInfo>();
24
- element = input.required<any>();
25
- queryParams = computed(() => this.additional().routerLinkOptions!.queryParams(this.element()));
26
- routerLinkOptions = computed(() => this.additional().routerLinkOptions!);
27
- link = input.required<string>();
28
- }
29
-
30
- @Component({
31
- selector: "tb-link-column",
32
- changeDetection: ChangeDetectionStrategy.OnPush,
33
- template: `
34
- <a target="{{additional().target}}" href="{{link()}}">
35
- <ng-content></ng-content>
36
- </a>
37
- `
38
- }) export class LinkColumnComponent {
39
- element = input.required<any>();
40
- additional = input.required<LinkInfo>();
41
- link = input.required<string>();
42
- }
@@ -1,10 +0,0 @@
1
- .switch {
2
- display: inline-block;
3
- }
4
-
5
- .my-filter {
6
- margin-right: 15px;
7
- }
8
- .inline{
9
- display: inline-block;
10
- }
@@ -1,25 +0,0 @@
1
- @let CurrentFilterType = $currentFilterType();
2
- @let info = $info();
3
-
4
- @if(CurrentFilterType !== FilterType.NumberBetween && CurrentFilterType !== FilterType.IsNull && CurrentFilterType !== FilterType.In)
5
- {
6
- <mat-form-field class="my-filter">
7
- <input matInput name="filterValue" type="number" [ngModel]="info.filterValue"/>
8
- </mat-form-field>
9
- }
10
- @if(CurrentFilterType === FilterType.NumberBetween)
11
- {
12
- <ng-container ngModelGroup="filterValue" >
13
- <mat-form-field class="my-filter">
14
- <input matInput name="Start" placeholder="Start" type="number" [ngModel]="info.filterValue?.Start"/>
15
- </mat-form-field>
16
- <mat-form-field class="my-filter">
17
- <input matInput name="End" placeholder="End" type="number" [ngModel]="info.filterValue?.End"/>
18
- </mat-form-field>
19
- </ng-container>
20
- }
21
-
22
- @if (CurrentFilterType === FilterType.In)
23
- {
24
- <lib-in-filter name='filterValue' [type]="FieldType.Number" [(ngModel)]='info.filterValue' />
25
- }
@@ -1,30 +0,0 @@
1
- import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
- import { FieldType } from 'projects/angular-utilities/src/public-api';
3
-
4
- import { NumberFilterComponent } from './number-filter.component';
5
-
6
- describe('NumberFilterComponent', () => {
7
- let component: NumberFilterComponent;
8
- let fixture: ComponentFixture<NumberFilterComponent>;
9
-
10
- beforeEach(waitForAsync(() => {
11
- TestBed.configureTestingModule({
12
- declarations: [NumberFilterComponent]
13
- })
14
- .compileComponents();
15
- }));
16
-
17
- beforeEach(() => {
18
- fixture = TestBed.createComponent(NumberFilterComponent);
19
- component = fixture.componentInstance;
20
- component.info = {
21
- key: '',
22
- fieldType: FieldType.Unknown
23
- };
24
- fixture.detectChanges();
25
- });
26
-
27
- it('should create', () => {
28
- expect(component).toBeTruthy();
29
- });
30
- });
@@ -1,25 +0,0 @@
1
- import { Component, ChangeDetectionStrategy, input } from '@angular/core';
2
- import { FilterType } from '../../enums/filterTypes';
3
- import { ControlContainer, FormsModule, NgForm } from '@angular/forms';
4
- import { PartialFilter } from '../../classes/filter-info';
5
- import { FieldType } from '../../interfaces/report-def';
6
- import { MatInputModule } from '@angular/material/input';
7
- import { InFilterComponent } from '../in-filter/in-filter.component';
8
-
9
-
10
- @Component({
11
- selector: 'tb-number-filter',
12
- templateUrl: './number-filter.component.html',
13
- styleUrls: ['./number-filter.component.css'],
14
- changeDetection: ChangeDetectionStrategy.OnPush,
15
- viewProviders: [{ provide: ControlContainer, useExisting: NgForm }],
16
- imports: [
17
- MatInputModule, FormsModule, InFilterComponent
18
- ]
19
- })
20
- export class NumberFilterComponent {
21
- FilterType = FilterType;
22
- FieldType = FieldType;
23
- $currentFilterType = input.required<FilterType>({ alias: 'CurrentFilterType' });
24
- $info = input.required<PartialFilter>({ alias: 'info' })
25
- }
@@ -1,77 +0,0 @@
1
- @if(!$isMatMenuChild())
2
- {
3
- <button #trigger="matMenuTrigger" color="primary" mat-icon-button [matMenuTriggerFor]="menu" [matTooltip]="'Profiles'">
4
- <mat-icon color="primary">people</mat-icon>
5
- </button>
6
- }
7
- <mat-menu #menu="matMenu" (closed)="addedKey.value = null; allProfilesPanelOpened.set(false); newProfilePanelOpened.set(false)">
8
- @if(!!$currentProfile())
9
- {
10
- <div mat-menu-item mat-stroked-button [matTooltip]="'Save Profile'" (click)="saveState($currentProfile()!)">
11
- <mat-icon color="primary">save</mat-icon>
12
- <span>{{$currentProfile()}}</span>
13
- </div>
14
- }
15
- @else
16
- {
17
- <div class="profile-line">
18
- <button color="primary" class="first-in-line first-button" mat-stroked-button (click)="addState(defaultName, m.checked);">
19
- <mat-icon class="save-for-default-icon button-save-icon" color="primary">save</mat-icon>
20
- <span>Save as <span class="current-name">{{defaultName}}</span> </span>
21
- </button>
22
- <button stop-propagation mat-icon-button [matTooltip]="'Toggle Profile Being Created As Default'" (click)="m.toggle()" >
23
- <mat-icon style="color: green;">{{m.checked ? 'star' : 'star_border'}}</mat-icon>
24
- </button>
25
- <mat-checkbox #m class="display-none" [checked]="true" />
26
- </div>
27
- }
28
- @if (allProfilesPanelOpened()) {<hr class="divider"/>}
29
- <div mat-menu-item stop-propagation [class]="{ hide: !$keys().length, 'all-profile-row': true }" (click)="allProfilesPanelOpened.set(!allProfilesPanelOpened())">
30
- <div class="all-profiles">
31
- <span>All Profiles</span>
32
- <span class="arrow" [class]="`${(allProfilesPanelOpened() ? 'all-profile-arrow-close' : 'all-profile-arrow-open')} all-profile-arrow`"></span>
33
- </div>
34
- </div>
35
- <div [class]="{ hide: !allProfilesPanelOpened(), panel: true }">
36
- @for (key of $keys() ; track key)
37
- {
38
- <div class="profile-line" [class]="key === $currentProfile() ? 'current-in-list' : 'not-current-in-list'">
39
- <button class="menu-item first-in-line" mat-stroked-button [matTooltip]="'Select Profile'" (click)='stateService.setLocalCurrentState({ tableId: $tableId(), currentStateKey: key})'>
40
- <span>{{key}}</span>
41
- </button>
42
- @if(key !== $defaultProfile())
43
- {
44
- <button stop-propagation mat-icon-button [matTooltip]="'Toggle Profile Being Default'" (click)="setDefault(key)">
45
- <mat-icon style="color: green;">star_border</mat-icon>
46
- </button>
47
- }
48
- @else
49
- {
50
- <button stop-propagation mat-icon-button [matTooltip]="'Toggle Profile Being Default'" (click)="unsetDefault()">
51
- <mat-icon style="color: green;">star</mat-icon>
52
- </button>
53
- }
54
- <button color="warn" class="last-in-line" stop-propagation mat-icon-button [matTooltip]="'Delete Profile'" (click)='stateService.deleteProfileFromLocalAndStorage($tableId(), key)'>
55
- <mat-icon color='warn'>delete_forever</mat-icon>
56
- </button>
57
- </div>
58
- }
59
- <hr class="divider"/>
60
- </div>
61
- <div class="add-new-profile-row" mat-menu-item stop-propagation (click)="newProfilePanelOpened.set(!newProfilePanelOpened()); addedKey.focus()">Add New Profile</div>
62
- <div [class]="{ hide: !newProfilePanelOpened(), panel: true }" >
63
- <div class="profile-line" stop-propagation>
64
- <div class="new-name-input">
65
- <i class="input-hint">Enter New Name</i>
66
- <input #addedKey="matInput" matInput [name]="'key'" />
67
- </div>
68
- <button stop-propagation mat-icon-button [matTooltip]="'Toggle Profile Being Created As Default'" (click)="m2.toggle()" >
69
- <mat-icon style="color: green;">{{m2.checked ? 'star' : 'star_border'}}</mat-icon>
70
- </button>
71
- <mat-checkbox #m2 class="display-none" [ngModel]="!$defaultProfile()" />
72
- </div>
73
- <button class="add-button" color="primary" mat-raised-button [matTooltip]="'Create New Profile'" [disabled]="!addedKey.value" (click)="addState(addedKey.value, m2.checked); addedKey.value = null">
74
- Add
75
- </button>
76
- </div>
77
- </mat-menu>
@@ -1,126 +0,0 @@
1
-
2
- :host ::ng-deep .mat-expansion-panel-header{
3
- padding: 0;
4
- }
5
- .current-name{
6
- color: var(tb-current-profile, blue);
7
- }
8
- .menu-item{
9
- display: inline-flex;
10
- width: initial;
11
- flex-grow: 1;
12
- }
13
- .profile-line{
14
- display: flex;
15
- justify-content: space-between;
16
- align-items: center;
17
- }
18
- .first-in-line{
19
- --f-b: 2rem;
20
- margin-left: var(--mat-menu-item-with-icon-leading-spacing);
21
- &.first-button{
22
- height: var(--f-b);
23
- margin: .2rem;
24
- }
25
- .button-save-icon{
26
- height: var(--f-b);
27
- width: var(--f-b);
28
- font-size: var(--f-b);
29
- }
30
- }
31
- .main-save-button{
32
- height: 4rem;
33
- width: 4rem;
34
- padding: .5rem;
35
- mat-icon{
36
- height: 3rem;
37
- width: 3rem;
38
- font-size: 3rem;
39
- }
40
- }
41
- .save-for-default-icon{
42
- margin: 0;
43
- }
44
- .display-none{
45
- display: none;
46
- }
47
- .last-in-line{
48
- padding-right: var(--mat-menu-item-with-icon-trailing-spacing);
49
- }
50
- .default-cursor{
51
- cursor: default;
52
- }
53
- .as-def{
54
- padding-left: var(--mat-menu-item-with-icon-leading-spacing);
55
- }
56
- .divider{
57
- margin: .2px 0;
58
- }
59
- .add-key{
60
- max-width: 8.5rem;
61
- margin-left: 2px;
62
- ::ng-deep{
63
- .mdc-text-field{
64
- padding: 0;
65
- }
66
- }
67
- }
68
- .panel{
69
- transition: height .1s
70
- }
71
- .hide{
72
- height: 0;
73
- min-height: 0;
74
- overflow: hidden;
75
- }
76
- .open-panel-button{
77
- width: 100%;
78
- height: 2.5rem;
79
- }
80
- .current-in-list{
81
- border-left: 3px solid blue;
82
- background-color: #0000ff0d;
83
- }
84
- .not-current-in-list{
85
- border-left: 3px solid rgba(255, 255, 255, 0);
86
- }
87
- .add-new-profile-row, .all-profile-row{
88
- border-top: rgb(128 128 128 / 25%) solid 1px;
89
- }
90
- .all-profiles{
91
- display: flex;
92
- justify-content: space-between;
93
- &:has(.all-profile-arrow-close){
94
- align-items: center;
95
- }
96
- }
97
- .all-profile-arrow{
98
- display: inline-block;
99
- height: .7rem;
100
- width: .7rem;
101
- border-color: black;
102
- transform: rotate(-45deg);
103
- &-open{
104
- border-left: solid 2px;
105
- border-bottom: solid 2px;
106
- }
107
- &-close{
108
- border-right: solid 2px;
109
- border-top: solid 2px;
110
- }
111
- }
112
- .new-name-input{
113
- margin-left: 3px;
114
- display: flex;
115
- flex-direction: column;
116
- .input-hint{
117
- font-size: smaller;
118
- font-weight: 200;
119
- color: gray;
120
- }
121
- }
122
- .add-button{
123
- height: 20px;
124
- line-height: 20px;
125
- margin: 3px 0 0 3px;
126
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { ProfilesMenuComponent } from './profiles-menu.component';
4
-
5
- describe('ProfilesMenuComponent', () => {
6
- let component: ProfilesMenuComponent;
7
- let fixture: ComponentFixture<ProfilesMenuComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [ProfilesMenuComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(ProfilesMenuComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,63 +0,0 @@
1
- import { Component, computed, inject, input, output, signal, viewChild } from '@angular/core';
2
- import { TableBuilderStateStore } from '../../ngrx/tableBuilderStateStore';
3
- import { MatMenu, MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
4
- import { MatIcon } from '@angular/material/icon';
5
- import { TableStore } from '../../classes/table-store';
6
- import { MatTooltip } from '@angular/material/tooltip';
7
- import { MatButton, MatIconButton } from '@angular/material/button';
8
- import { StopPropagationDirective } from '../../../utilities';
9
- import { MatInput, MatInputModule } from '@angular/material/input';
10
- import { MatCheckbox } from '@angular/material/checkbox';
11
- import { Subject } from 'rxjs';
12
- import { FormsModule } from '@angular/forms';
13
-
14
- @Component({
15
- selector: 'tb-profiles-menu',
16
- imports: [MatIcon, MatTooltip, MatIconButton, MatMenuModule, MatButton, MatInput,
17
- MatCheckbox, StopPropagationDirective, MatInputModule, FormsModule
18
- ],
19
- templateUrl: './profiles-menu.component.html',
20
- styleUrl: './profiles-menu.component.scss'
21
- })
22
- export class ProfilesMenuComponent {
23
- stateService = inject(TableBuilderStateStore);
24
- tableStore = inject(TableStore);
25
- $tableId = input.required<string>({ alias: 'tableId' });
26
- $isMatMenuChild = input<boolean>(false, { alias: 'isMatMenuChild' });
27
- trigger = viewChild<MatMenuTrigger>('trigger');
28
- menu = viewChild.required(MatMenu)
29
- allProfilesPanelOpened = signal(false);
30
- newProfilePanelOpened = signal(false);
31
- $currentProfile = computed(() => this.stateService.$selectLocalProfileCurrentKey(this.$tableId())());
32
- $defaultProfile = computed(() => this.stateService.$selectLocalProfileDefaultKey(this.$tableId())());
33
- $keys = computed(() => this.stateService.$selectLocalProfileKeys(this.$tableId())());
34
- saveState(key: string) {
35
- const tableState = this.tableStore.$savableState();
36
- this.stateService.saveTableSettingsToLocalAndStorage(this.$tableId(), key, tableState);
37
- }
38
-
39
- addState(key: string, asDefault: boolean){
40
- const tableState = this.tableStore.$savableState();
41
- this.stateService.addNewStateToLocalAndStorage(this.$tableId(), key, tableState, asDefault);
42
- }
43
-
44
- setDefault(key: string){
45
- this.stateService.setDefaultInLocalAndStorage(this.$tableId(), key);
46
- }
47
-
48
- unsetDefault(){
49
- this.stateService.unsetDefaultFromLocalAndStorage(this.$tableId());
50
- }
51
-
52
- defaultName = 'My Profile';
53
- position$ = new Subject<{ top: string, right: string} | undefined>();
54
- setPosition = (e: HTMLElement) => {
55
- const rect = e.getBoundingClientRect();
56
- if(rect.top === 0) return;
57
- const a = {
58
- right: `${(window.innerWidth - rect.right)}px`,
59
- top: `${rect.top}px`,
60
- }
61
- return a;
62
- }
63
- }
@@ -1,3 +0,0 @@
1
- :host{
2
- display: contents;
3
- }
@@ -1,10 +0,0 @@
1
- <mat-menu #menu2="matMenu">
2
- @if($set().length > 1)
3
- {
4
- <button mat-menu-item (click)="state.resetState()">All</button>
5
- }
6
- @for (item of $set(); track $index)
7
- {
8
- <button mat-menu-item (click)="state.resetPart(item)">Reset {{item}}</button>
9
- }
10
- </mat-menu>