@unifylib/ui-lib 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/esm2022/iq-ui-lib.mjs +5 -0
  2. package/esm2022/lib/base-model/SearchStrConfig.mjs +11 -0
  3. package/esm2022/lib/base-model/api-response.mjs +2 -0
  4. package/esm2022/lib/base-model/audit-log-entry.mjs +3 -0
  5. package/esm2022/lib/base-model/button-action-settings.mjs +16 -0
  6. package/esm2022/lib/base-model/column-def.model.mjs +28 -0
  7. package/esm2022/lib/base-model/do-action-request.mjs +8 -0
  8. package/esm2022/lib/base-model/field-action.mjs +6 -0
  9. package/esm2022/lib/base-model/field-filter.model.mjs +3 -0
  10. package/esm2022/lib/base-model/field-info.mjs +57 -0
  11. package/esm2022/lib/base-model/field-predicate.model.mjs +10 -0
  12. package/esm2022/lib/base-model/filter-request.mjs +13 -0
  13. package/esm2022/lib/base-model/filter.model.mjs +25 -0
  14. package/esm2022/lib/base-model/get-items-list.mjs +10 -0
  15. package/esm2022/lib/base-model/index.mjs +12 -0
  16. package/esm2022/lib/base-model/items-total.model.mjs +8 -0
  17. package/esm2022/lib/base-model/line-item.model.mjs +11 -0
  18. package/esm2022/lib/base-model/lookupItem.mjs +16 -0
  19. package/esm2022/lib/base-model/page-info.mjs +17 -0
  20. package/esm2022/lib/base-model/report-request.model.mjs +17 -0
  21. package/esm2022/lib/base-model/response-envelop.model.mjs +10 -0
  22. package/esm2022/lib/base-model/snack-message.model.mjs +11 -0
  23. package/esm2022/lib/base-model/table-column.interface.mjs +2 -0
  24. package/esm2022/lib/base-model/table-page-user-action.interface.mjs +21 -0
  25. package/esm2022/lib/base-model/workflow/workflow-steps.model.mjs +9 -0
  26. package/esm2022/lib/base-model/workflow/workflow.model.mjs +42 -0
  27. package/esm2022/lib/components/action-comment/action-comment.component.mjs +101 -0
  28. package/esm2022/lib/components/action-confirmation/action-confirmation.component.mjs +55 -0
  29. package/esm2022/lib/components/activity-report-form/activity-report-form.component.mjs +499 -0
  30. package/esm2022/lib/components/advanced-filter/field-filter/field-filter.component.mjs +41 -0
  31. package/esm2022/lib/components/advanced-filter/filter-builder/filter-builder.component.mjs +162 -0
  32. package/esm2022/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.mjs +70 -0
  33. package/esm2022/lib/components/audit-log-list/audit-log.component.mjs +99 -0
  34. package/esm2022/lib/components/auto-complete/auto-complete.component.mjs +292 -0
  35. package/esm2022/lib/components/base-form/base-form.component.mjs +297 -0
  36. package/esm2022/lib/components/base-form-canvas/base-form-canvas.component.mjs +591 -0
  37. package/esm2022/lib/components/base-input-dialog/base-input-dialog.component.mjs +72 -0
  38. package/esm2022/lib/components/base-table/base-table.component.mjs +514 -0
  39. package/esm2022/lib/components/button-actions/button-actions.component.mjs +70 -0
  40. package/esm2022/lib/components/editable-base-table/editable-base-table.component.mjs +496 -0
  41. package/esm2022/lib/components/equation-builder/equation-builder.component.mjs +112 -0
  42. package/esm2022/lib/components/item-line-editor/item-line-editor.component.mjs +299 -0
  43. package/esm2022/lib/components/multi-auto-complete/multi-auto-complete.component.mjs +278 -0
  44. package/esm2022/lib/components/paginator/paginator.component.mjs +91 -0
  45. package/esm2022/lib/components/report-details-dialog/report-details-dialog.component.mjs +102 -0
  46. package/esm2022/lib/components/report-form/report-form.component.mjs +498 -0
  47. package/esm2022/lib/components/search-bar/search-bar.component.mjs +62 -0
  48. package/esm2022/lib/components/section-form-canvas/section-form-canvas.component.mjs +81 -0
  49. package/esm2022/lib/components/shared/action-button/action-button.component.mjs +59 -0
  50. package/esm2022/lib/components/shared/action-card/action-card.component.mjs +93 -0
  51. package/esm2022/lib/components/shared/attachment-uploader/attachment-uploader.component.mjs +70 -0
  52. package/esm2022/lib/components/shared-list/shared-list.component.mjs +47 -0
  53. package/esm2022/lib/components/snackbar-static/snackbar-static.component.mjs +43 -0
  54. package/esm2022/lib/components/title-bar/title-bar.component.mjs +119 -0
  55. package/esm2022/lib/services/backend-service.mjs +240 -0
  56. package/esm2022/lib/services/index.mjs +4 -0
  57. package/esm2022/lib/services/top-panel.mjs +22 -0
  58. package/esm2022/lib/services/trigger-form.service.mjs +17 -0
  59. package/esm2022/lib/utils/base-utils.mjs +97 -0
  60. package/esm2022/lib/validators/date-range-validator.mjs +27 -0
  61. package/esm2022/lib/validators/index.mjs +4 -0
  62. package/esm2022/lib/validators/match-list.validator.mjs +9 -0
  63. package/esm2022/lib/validators/multi-email-validator.mjs +13 -0
  64. package/esm2022/public-api.mjs +29 -0
  65. package/esm2022/q-btech-ui-lib.mjs +5 -0
  66. package/esm2022/unifylib-ui-lib.mjs +5 -0
  67. package/fesm2022/iq-ui-lib.mjs +5625 -0
  68. package/fesm2022/iq-ui-lib.mjs.map +1 -0
  69. package/fesm2022/q-btech-ui-lib.mjs +5619 -0
  70. package/fesm2022/q-btech-ui-lib.mjs.map +1 -0
  71. package/fesm2022/unifylib-ui-lib.mjs +5625 -0
  72. package/fesm2022/unifylib-ui-lib.mjs.map +1 -0
  73. package/index.d.ts +5 -0
  74. package/lib/base-model/SearchStrConfig.d.ts +8 -0
  75. package/{src/lib/base-model/api-response.ts → lib/base-model/api-response.d.ts} +21 -23
  76. package/lib/base-model/audit-log-entry.d.ts +7 -0
  77. package/lib/base-model/button-action-settings.d.ts +15 -0
  78. package/lib/base-model/column-def.model.d.ts +11 -0
  79. package/lib/base-model/do-action-request.d.ts +10 -0
  80. package/lib/base-model/field-action.d.ts +6 -0
  81. package/lib/base-model/field-filter.model.d.ts +7 -0
  82. package/lib/base-model/field-info.d.ts +53 -0
  83. package/lib/base-model/field-predicate.model.d.ts +7 -0
  84. package/lib/base-model/filter-request.d.ts +15 -0
  85. package/lib/base-model/filter.model.d.ts +22 -0
  86. package/lib/base-model/get-items-list.d.ts +21 -0
  87. package/lib/base-model/index.d.ts +11 -0
  88. package/lib/base-model/items-total.model.d.ts +6 -0
  89. package/lib/base-model/line-item.model.d.ts +9 -0
  90. package/lib/base-model/lookupItem.d.ts +13 -0
  91. package/lib/base-model/page-info.d.ts +52 -0
  92. package/lib/base-model/report-request.model.d.ts +18 -0
  93. package/lib/base-model/response-envelop.model.d.ts +8 -0
  94. package/lib/base-model/snack-message.model.d.ts +7 -0
  95. package/lib/base-model/table-column.interface.d.ts +28 -0
  96. package/lib/base-model/table-page-user-action.interface.d.ts +14 -0
  97. package/lib/base-model/workflow/workflow-steps.model.d.ts +7 -0
  98. package/lib/base-model/workflow/workflow.model.d.ts +13 -0
  99. package/lib/components/action-comment/action-comment.component.d.ts +32 -0
  100. package/lib/components/action-confirmation/action-confirmation.component.d.ts +19 -0
  101. package/lib/components/activity-report-form/activity-report-form.component.d.ts +93 -0
  102. package/lib/components/advanced-filter/field-filter/field-filter.component.d.ts +20 -0
  103. package/lib/components/advanced-filter/filter-builder/filter-builder.component.d.ts +28 -0
  104. package/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.d.ts +25 -0
  105. package/lib/components/audit-log-list/audit-log.component.d.ts +36 -0
  106. package/lib/components/auto-complete/auto-complete.component.d.ts +51 -0
  107. package/lib/components/base-form/base-form.component.d.ts +59 -0
  108. package/lib/components/base-form-canvas/base-form-canvas.component.d.ts +124 -0
  109. package/lib/components/base-input-dialog/base-input-dialog.component.d.ts +23 -0
  110. package/lib/components/base-table/base-table.component.d.ts +128 -0
  111. package/lib/components/button-actions/button-actions.component.d.ts +17 -0
  112. package/lib/components/editable-base-table/editable-base-table.component.d.ts +106 -0
  113. package/lib/components/equation-builder/equation-builder.component.d.ts +23 -0
  114. package/lib/components/item-line-editor/item-line-editor.component.d.ts +64 -0
  115. package/lib/components/multi-auto-complete/multi-auto-complete.component.d.ts +51 -0
  116. package/lib/components/paginator/paginator.component.d.ts +26 -0
  117. package/lib/components/report-details-dialog/report-details-dialog.component.d.ts +34 -0
  118. package/lib/components/report-form/report-form.component.d.ts +92 -0
  119. package/lib/components/search-bar/search-bar.component.d.ts +29 -0
  120. package/lib/components/section-form-canvas/section-form-canvas.component.d.ts +27 -0
  121. package/lib/components/shared/action-button/action-button.component.d.ts +17 -0
  122. package/lib/components/shared/action-card/action-card.component.d.ts +37 -0
  123. package/lib/components/shared/attachment-uploader/attachment-uploader.component.d.ts +16 -0
  124. package/lib/components/shared-list/shared-list.component.d.ts +21 -0
  125. package/lib/components/snackbar-static/snackbar-static.component.d.ts +15 -0
  126. package/lib/components/title-bar/title-bar.component.d.ts +42 -0
  127. package/lib/services/backend-service.d.ts +59 -0
  128. package/{src/lib/services/index.ts → lib/services/index.d.ts} +3 -3
  129. package/lib/services/top-panel.d.ts +8 -0
  130. package/lib/services/trigger-form.service.d.ts +7 -0
  131. package/lib/utils/base-utils.d.ts +13 -0
  132. package/lib/validators/date-range-validator.d.ts +2 -0
  133. package/{src/lib/validators/index.ts → lib/validators/index.d.ts} +3 -3
  134. package/lib/validators/match-list.validator.d.ts +4 -0
  135. package/lib/validators/multi-email-validator.d.ts +6 -0
  136. package/package.json +27 -14
  137. package/{src/public-api.ts → public-api.d.ts} +25 -29
  138. package/ng-package.json +0 -7
  139. package/src/lib/base-model/SearchStrConfig.ts +0 -12
  140. package/src/lib/base-model/audit-log-entry.ts +0 -7
  141. package/src/lib/base-model/button-action-settings.ts +0 -29
  142. package/src/lib/base-model/column-def.model.ts +0 -34
  143. package/src/lib/base-model/do-action-request.ts +0 -11
  144. package/src/lib/base-model/feature-item.ts +0 -9
  145. package/src/lib/base-model/field-action.ts +0 -7
  146. package/src/lib/base-model/field-filter.model.ts +0 -7
  147. package/src/lib/base-model/field-info.ts +0 -102
  148. package/src/lib/base-model/field-predicate.model.ts +0 -7
  149. package/src/lib/base-model/filter-request.ts +0 -27
  150. package/src/lib/base-model/filter.model.ts +0 -49
  151. package/src/lib/base-model/get-items-list.ts +0 -24
  152. package/src/lib/base-model/index.ts +0 -11
  153. package/src/lib/base-model/items-total.model.ts +0 -12
  154. package/src/lib/base-model/line-item.model.ts +0 -18
  155. package/src/lib/base-model/lookupItem.ts +0 -21
  156. package/src/lib/base-model/null-snackmessage.ts +0 -9
  157. package/src/lib/base-model/page-info.ts +0 -54
  158. package/src/lib/base-model/report-request.model.ts +0 -33
  159. package/src/lib/base-model/response-envelop.model.ts +0 -15
  160. package/src/lib/base-model/snack-message.model.ts +0 -14
  161. package/src/lib/base-model/snackmessage-interface.ts +0 -7
  162. package/src/lib/base-model/table-column.interface.ts +0 -29
  163. package/src/lib/base-model/table-page-user-action.interface.ts +0 -33
  164. package/src/lib/base-model/workflow/workflow-steps.model.ts +0 -9
  165. package/src/lib/base-model/workflow/workflow.model.ts +0 -52
  166. package/src/lib/components/action-comment/action-comment.component.css +0 -52
  167. package/src/lib/components/action-comment/action-comment.component.html +0 -47
  168. package/src/lib/components/action-comment/action-comment.component.spec.ts +0 -23
  169. package/src/lib/components/action-comment/action-comment.component.ts +0 -102
  170. package/src/lib/components/action-confirmation/action-confirmation.component.css +0 -46
  171. package/src/lib/components/action-confirmation/action-confirmation.component.html +0 -32
  172. package/src/lib/components/action-confirmation/action-confirmation.component.spec.ts +0 -23
  173. package/src/lib/components/action-confirmation/action-confirmation.component.ts +0 -58
  174. package/src/lib/components/activity-report-form/activity-report-form.component.html +0 -110
  175. package/src/lib/components/activity-report-form/activity-report-form.component.scss +0 -69
  176. package/src/lib/components/activity-report-form/activity-report-form.component.spec.ts +0 -25
  177. package/src/lib/components/activity-report-form/activity-report-form.component.ts +0 -616
  178. package/src/lib/components/advanced-filter/field-filter/field-filter.component.html +0 -8
  179. package/src/lib/components/advanced-filter/field-filter/field-filter.component.scss +0 -0
  180. package/src/lib/components/advanced-filter/field-filter/field-filter.component.spec.ts +0 -25
  181. package/src/lib/components/advanced-filter/field-filter/field-filter.component.ts +0 -55
  182. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.html +0 -36
  183. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.scss +0 -130
  184. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.spec.ts +0 -25
  185. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.ts +0 -186
  186. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.css +0 -51
  187. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.html +0 -23
  188. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.spec.ts +0 -23
  189. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.ts +0 -69
  190. package/src/lib/components/audit-log-list/audit-log.component.html +0 -26
  191. package/src/lib/components/audit-log-list/audit-log.component.scss +0 -50
  192. package/src/lib/components/audit-log-list/audit-log.component.spec.ts +0 -25
  193. package/src/lib/components/audit-log-list/audit-log.component.ts +0 -114
  194. package/src/lib/components/auto-complete/auto-complete.component.css +0 -55
  195. package/src/lib/components/auto-complete/auto-complete.component.html +0 -45
  196. package/src/lib/components/auto-complete/auto-complete.component.spec.ts +0 -23
  197. package/src/lib/components/auto-complete/auto-complete.component.ts +0 -331
  198. package/src/lib/components/base-form/base-form.component.html +0 -59
  199. package/src/lib/components/base-form/base-form.component.scss +0 -68
  200. package/src/lib/components/base-form/base-form.component.spec.ts +0 -25
  201. package/src/lib/components/base-form/base-form.component.ts +0 -323
  202. package/src/lib/components/base-form-canvas/base-form-canvas.component.css +0 -196
  203. package/src/lib/components/base-form-canvas/base-form-canvas.component.html +0 -1095
  204. package/src/lib/components/base-form-canvas/base-form-canvas.component.spec.ts +0 -23
  205. package/src/lib/components/base-form-canvas/base-form-canvas.component.ts +0 -680
  206. package/src/lib/components/base-input-dialog/base-input-dialog.component.css +0 -67
  207. package/src/lib/components/base-input-dialog/base-input-dialog.component.html +0 -47
  208. package/src/lib/components/base-input-dialog/base-input-dialog.component.spec.ts +0 -23
  209. package/src/lib/components/base-input-dialog/base-input-dialog.component.ts +0 -77
  210. package/src/lib/components/base-table/base-table.component.html +0 -268
  211. package/src/lib/components/base-table/base-table.component.scss +0 -140
  212. package/src/lib/components/base-table/base-table.component.spec.ts +0 -25
  213. package/src/lib/components/base-table/base-table.component.ts +0 -621
  214. package/src/lib/components/button-actions/button-actions.component.html +0 -27
  215. package/src/lib/components/button-actions/button-actions.component.scss +0 -101
  216. package/src/lib/components/button-actions/button-actions.component.spec.ts +0 -23
  217. package/src/lib/components/button-actions/button-actions.component.ts +0 -70
  218. package/src/lib/components/editable-base-table/editable-base-table.component.html +0 -337
  219. package/src/lib/components/editable-base-table/editable-base-table.component.scss +0 -126
  220. package/src/lib/components/editable-base-table/editable-base-table.component.spec.ts +0 -25
  221. package/src/lib/components/editable-base-table/editable-base-table.component.ts +0 -579
  222. package/src/lib/components/equation-builder/equation-builder.component.css +0 -39
  223. package/src/lib/components/equation-builder/equation-builder.component.html +0 -31
  224. package/src/lib/components/equation-builder/equation-builder.component.spec.ts +0 -23
  225. package/src/lib/components/equation-builder/equation-builder.component.ts +0 -119
  226. package/src/lib/components/item-line-editor/item-line-editor.component.html +0 -102
  227. package/src/lib/components/item-line-editor/item-line-editor.component.scss +0 -152
  228. package/src/lib/components/item-line-editor/item-line-editor.component.spec.ts +0 -23
  229. package/src/lib/components/item-line-editor/item-line-editor.component.ts +0 -306
  230. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.css +0 -19
  231. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.html +0 -38
  232. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.spec.ts +0 -23
  233. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.ts +0 -315
  234. package/src/lib/components/paginator/paginator.component.css +0 -65
  235. package/src/lib/components/paginator/paginator.component.html +0 -30
  236. package/src/lib/components/paginator/paginator.component.ts +0 -87
  237. package/src/lib/components/report-details-dialog/report-details-dialog.component.css +0 -17
  238. package/src/lib/components/report-details-dialog/report-details-dialog.component.html +0 -16
  239. package/src/lib/components/report-details-dialog/report-details-dialog.component.spec.ts +0 -23
  240. package/src/lib/components/report-details-dialog/report-details-dialog.component.ts +0 -111
  241. package/src/lib/components/report-form/report-form.component.html +0 -92
  242. package/src/lib/components/report-form/report-form.component.scss +0 -51
  243. package/src/lib/components/report-form/report-form.component.spec.ts +0 -25
  244. package/src/lib/components/report-form/report-form.component.ts +0 -599
  245. package/src/lib/components/search-bar/search-bar.component.html +0 -51
  246. package/src/lib/components/search-bar/search-bar.component.scss +0 -63
  247. package/src/lib/components/search-bar/search-bar.component.spec.ts +0 -25
  248. package/src/lib/components/search-bar/search-bar.component.ts +0 -68
  249. package/src/lib/components/section-form-canvas/section-form-canvas.component.html +0 -43
  250. package/src/lib/components/section-form-canvas/section-form-canvas.component.scss +0 -81
  251. package/src/lib/components/section-form-canvas/section-form-canvas.component.spec.ts +0 -23
  252. package/src/lib/components/section-form-canvas/section-form-canvas.component.ts +0 -67
  253. package/src/lib/components/shared/action-button/action-button.component.html +0 -12
  254. package/src/lib/components/shared/action-button/action-button.component.scss +0 -45
  255. package/src/lib/components/shared/action-button/action-button.component.ts +0 -51
  256. package/src/lib/components/shared/action-card/action-card.component.html +0 -78
  257. package/src/lib/components/shared/action-card/action-card.component.scss +0 -238
  258. package/src/lib/components/shared/action-card/action-card.component.ts +0 -56
  259. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.css +0 -135
  260. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.html +0 -36
  261. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.spec.ts +0 -23
  262. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.ts +0 -71
  263. package/src/lib/components/shared-list/shared-list.component.css +0 -0
  264. package/src/lib/components/shared-list/shared-list.component.html +0 -17
  265. package/src/lib/components/shared-list/shared-list.component.spec.ts +0 -23
  266. package/src/lib/components/shared-list/shared-list.component.ts +0 -53
  267. package/src/lib/components/snackbar-static/snackbar-static.component.html +0 -20
  268. package/src/lib/components/snackbar-static/snackbar-static.component.scss +0 -135
  269. package/src/lib/components/snackbar-static/snackbar-static.component.ts +0 -26
  270. package/src/lib/components/title-bar/title-bar.component.css +0 -0
  271. package/src/lib/components/title-bar/title-bar.component.css.map +0 -1
  272. package/src/lib/components/title-bar/title-bar.component.html +0 -35
  273. package/src/lib/components/title-bar/title-bar.component.scss +0 -126
  274. package/src/lib/components/title-bar/title-bar.component.spec.ts +0 -23
  275. package/src/lib/components/title-bar/title-bar.component.ts +0 -126
  276. package/src/lib/services/backend-service.ts +0 -287
  277. package/src/lib/services/top-panel.ts +0 -17
  278. package/src/lib/services/trigger-form.service.ts +0 -11
  279. package/src/lib/share-module/shared-module.ts +0 -10
  280. package/src/lib/utils/base-utils.ts +0 -102
  281. package/src/lib/validators/date-range-validator.ts +0 -31
  282. package/src/lib/validators/match-list.validator.ts +0 -10
  283. package/src/lib/validators/multi-email-validator.ts +0 -15
  284. package/tsconfig.lib.json +0 -15
  285. package/tsconfig.lib.prod.json +0 -11
  286. package/tsconfig.spec.json +0 -15
@@ -1,25 +0,0 @@
1
- import {ComponentFixture, TestBed} from '@angular/core/testing';
2
-
3
- import {AuditLogComponent} from './audit-log.component';
4
-
5
- describe('BaseFormComponent', () => {
6
- let component: AuditLogComponent;
7
- let fixture: ComponentFixture<AuditLogComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ AuditLogComponent ]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(AuditLogComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,114 +0,0 @@
1
- import {Component, Inject, Input, OnInit} from '@angular/core';
2
- import {FieldInfo, Filter, FilterRequest, PageInfo, TableColumn} from "../../base-model";
3
- import {TranslateModule, TranslateService} from "@ngx-translate/core";
4
- import {BackendService} from "../../services";
5
- import {DatePipe, NgForOf, NgIf} from "@angular/common";
6
- import {MatButton, MatButtonModule} from "@angular/material/button";
7
- import {MatIconModule} from "@angular/material/icon";
8
- import {MatDialog} from "@angular/material/dialog";
9
- import {ActivatedRoute, Router} from "@angular/router";
10
- import {AuditLogEntry} from "../../base-model/audit-log-entry";
11
- import {AuditLogDetailsDialogComponent} from "../audit-log-details-dialog/audit-log-details-dialog.component";
12
- import {Directionality} from "@angular/cdk/bidi";
13
-
14
- @Component({
15
- selector: 'app-audit-log',
16
- standalone: true,
17
- imports: [
18
- NgForOf,
19
- MatButtonModule,
20
- TranslateModule,
21
- NgIf,
22
- MatIconModule,
23
- MatButton
24
- ],
25
- providers: [DatePipe],
26
- templateUrl: './audit-log.component.html',
27
- styleUrl: './audit-log.component.scss'
28
- })
29
- export class AuditLogComponent implements OnInit {
30
- auditLogEntries: AuditLogEntry[] = [];
31
-
32
- @Input()
33
- pageInfo!: PageInfo;
34
-
35
- @Input()
36
- fields: FieldInfo[];
37
-
38
- @Input()
39
- showHiddenFields : string[];
40
-
41
-
42
- itemId: number;
43
-
44
- item : any = {};
45
- isLoaded : boolean = false;
46
- columnsDefinition: TableColumn<any>[];
47
-
48
- currentDirection: 'ltr' | 'rtl';
49
-
50
-
51
- constructor(public dialog: MatDialog,
52
- private activatedRoute: ActivatedRoute,
53
- private datePipe: DatePipe,
54
- private translateService:TranslateService,
55
- private router:Router,
56
- private directionality: Directionality,
57
- @Inject('securityManager') private securityManager: any,
58
- public backendService: BackendService) {
59
- }
60
-
61
- ngOnInit(): void {
62
- this.currentDirection = this.directionality.value;
63
- this.directionality.change.subscribe((value) => {
64
- this.currentDirection = value;
65
- })
66
-
67
- this.loadItem();
68
- }
69
-
70
-
71
- private loadItem() {
72
- if (this.activatedRoute.snapshot.queryParams['token']) {
73
- this.itemId = this.backendService.decrypt(this.activatedRoute.snapshot.queryParams['token']);
74
- }
75
- const filterRequest = new FilterRequest;
76
- if (this.itemId > 0) {
77
- filterRequest.filters = [];
78
- filterRequest.sortDirection = "DESC";
79
- // TODO
80
- // add pagination support here.
81
- filterRequest.pageSize = 1000;
82
- filterRequest.filters.push(new Filter({
83
- key: 0,
84
- fieldType: 'Long',
85
- fieldName: 'id',
86
- valueObject: this.itemId,
87
- filterType: 'FILED_FILTER',
88
- operator: 'EQUALS'
89
- }));
90
- }
91
- this.backendService.getItemAuditLog(filterRequest, this.pageInfo!.apiUri).subscribe(resp => {
92
- this.auditLogEntries = resp.body;
93
- });
94
- }
95
-
96
-
97
- viewObject(auditLog: AuditLogEntry) {
98
- const dialogRef = this.dialog.open(AuditLogDetailsDialogComponent, {
99
- data: {pageInfo: this.pageInfo, fields: this.fields, item:auditLog.subject, comment: auditLog.comment, showHiddenFields:this.showHiddenFields},
100
- width: '800px',
101
- height: 'auto',
102
- direction: this.currentDirection
103
- });
104
-
105
- }
106
-
107
- getDescription(auditLog: AuditLogEntry) {
108
- return `
109
- ${auditLog.createdBy || this.translateService.instant('system')}
110
- ${this.translateService.instant('on')}
111
- ${this.datePipe.transform(auditLog.createdOn, 'medium')}
112
- ${this.translateService.instant('audit-log.executed')} ${this.translateService.instant(auditLog.action.toString())}`
113
- }
114
- }
@@ -1,55 +0,0 @@
1
-
2
- .main-auto-complete {
3
- display: flex;
4
- flex-direction: column;
5
- width: 100%;
6
- }
7
-
8
- .mat-field-wrapper {
9
- display: flex;
10
- flex-direction: column;
11
- width: 100%;
12
- }
13
-
14
- .label-and-asterisk-container {
15
- display: flex;
16
- align-items: center;
17
- gap: 4px;
18
- margin-bottom: 4px;
19
- }
20
-
21
- .custom-label {
22
- font-weight: 500;
23
- }
24
-
25
- .required-asterisk {
26
- color: red;
27
- }
28
-
29
-
30
- .autocomplete-field {
31
- width: 100%;
32
- display: flex;
33
- /*flex-direction: row;*/
34
- align-items: center;
35
- }
36
-
37
-
38
- .autocomplete-button {
39
- margin-left: 4px;
40
- }
41
-
42
-
43
- @media (max-width: 600px) {
44
- .main-auto-complete,
45
- .mat-field-wrapper,
46
- .autocomplete-field {
47
- flex-direction: column;
48
- width: 100%;
49
- }
50
-
51
- .autocomplete-button {
52
- margin-left: 0;
53
- margin-top: 4px;
54
- }
55
- }
@@ -1,45 +0,0 @@
1
- <ng-container *ngIf="field" class="main-auto-complete">
2
- <div class="mat-field-wrapper" [formGroup]="form">
3
-
4
- <div class="label-and-asterisk-container">
5
- <span class="custom-label" id="label-{{field.property}}">
6
- {{ field.label! | translate }}
7
- </span>
8
- <span *ngIf="field.required" class="required-asterisk"> * </span>
9
- </div>
10
-
11
- <mat-form-field class="autocomplete-field" appearance="outline">
12
- <input type="text"
13
- [placeholder]="'search_placeholder' | translate"
14
- [id]="getId()"
15
- [formControl]="myControl"
16
- (keydown)="onKeydown($event, autocompleteTrigger)"
17
- [matAutocomplete]="auto"
18
- matInput
19
- [required]="isRequired"
20
- #autocompleteTrigger="matAutocompleteTrigger"
21
- [readonly]="readonly"
22
- >
23
-
24
- <button mat-button matSuffix
25
- color="primary"
26
- class="autocomplete-button"
27
- (click)="autocompleteTrigger.openPanel(); filterLookupItems('', autocompleteTrigger); $event.stopPropagation()"
28
- [attr.id]="'autocomplete-trigger-' + field.property">
29
- <mat-icon>arrow_drop_down</mat-icon>
30
- </button>
31
-
32
- <mat-autocomplete #auto="matAutocomplete" autoActiveFirstOption [displayWith]="displayFn.bind(this)"
33
- (optionSelected)="itemSelected($event.option.value)"
34
- (closed)="closed()">
35
- <ng-container *ngIf="!field.readonly">
36
- <mat-option *ngIf="items.length > 1 && lookupItems$" [value]="null">{{ "none" | translate }}</mat-option>
37
- <mat-option *ngFor="let item of lookupItems$ | async" [value]="item" [ngClass]="_allowSelection(item)">
38
- {{ itemNameByLag(item) }}
39
- </mat-option>
40
- </ng-container>
41
- </mat-autocomplete>
42
- </mat-form-field>
43
-
44
- </div>
45
- </ng-container>
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { AutoCompleteComponent } from './auto-complete.component';
4
-
5
- describe('AutoCompleteComponent', () => {
6
- let component: AutoCompleteComponent;
7
- let fixture: ComponentFixture<AutoCompleteComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [AutoCompleteComponent]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(AutoCompleteComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,331 +0,0 @@
1
- import {
2
- Component,
3
- EventEmitter,
4
- Inject,
5
- Input,
6
- OnChanges,
7
- OnInit,
8
- Output,
9
- SimpleChanges,
10
- ViewChild
11
- } from '@angular/core';
12
- import {FieldInfo, Filter, LookupItem} from "../../base-model";
13
- import {MatAutocomplete, MatAutocompleteTrigger, MatOption} from "@angular/material/autocomplete";
14
- import {Observable, of} from "rxjs";
15
- import {FormControl, FormGroup, ReactiveFormsModule, Validators} from "@angular/forms";
16
- import {BackendService} from "../../services";
17
- import {GetItemsList} from "../../base-model/get-items-list";
18
- import {TranslateModule, TranslateService} from "@ngx-translate/core";
19
- import {MatFormFieldModule} from "@angular/material/form-field";
20
- import {MatInputModule} from "@angular/material/input";
21
- import {AsyncPipe, NgClass, NgForOf, NgIf} from "@angular/common";
22
- import {MatIcon} from "@angular/material/icon";
23
- import {buildItemsList} from "../../utils/base-utils";
24
- import {RequireMatch} from "../../validators";
25
- import {MatButton, MatIconButton} from "@angular/material/button";
26
-
27
- @Component({
28
- selector: 'app-auto-complete',
29
- standalone: true,
30
- imports: [
31
- TranslateModule,
32
- MatFormFieldModule,
33
- MatAutocompleteTrigger,
34
- MatInputModule,
35
- ReactiveFormsModule,
36
- NgIf,
37
- MatAutocomplete,
38
- AsyncPipe,
39
- MatOption,
40
- NgClass,
41
- MatIcon,
42
- NgForOf,
43
- MatIconButton,
44
- MatButton,
45
-
46
- ],
47
- templateUrl: './auto-complete.component.html',
48
- styleUrl: './auto-complete.component.css'
49
- })
50
- export class AutoCompleteComponent implements OnInit, OnChanges {
51
- @ViewChild('autocompleteTrigger') matACTrigger: MatAutocompleteTrigger;
52
-
53
- lookupItems$: Observable<LookupItem[]> | undefined;
54
- lookupItems: LookupItem[] = [];
55
- items: LookupItem[] = [];
56
-
57
- // @ts-ignore
58
- // form: FormGroup;
59
-
60
- @Input()// @ts-ignore
61
- field: FieldInfo;
62
-
63
- @Input()// @ts-ignore
64
- form: FormGroup;
65
- @Input()// @ts-ignore
66
- defaultValue: any;
67
-
68
- @Input()
69
- readonly:boolean = false;
70
-
71
- @Input()
72
- supportingAttributes: any;
73
-
74
- @Output()
75
- selectedValue: EventEmitter<LookupItem> = new EventEmitter();
76
-
77
- @ViewChild(MatAutocompleteTrigger) autocompleteTrigger!: MatAutocompleteTrigger;
78
-
79
- question = 'Would you like to add ?"';
80
- cascadedId: number = 0;
81
- isRequired:boolean = false;
82
-
83
- private timer: any;
84
- myControl = new FormControl();
85
-
86
- constructor(private backendService: BackendService,
87
- protected translateService: TranslateService,
88
- @Inject('secretsManager') private secretsManager: any) {
89
- }
90
-
91
- ngOnInit(): void {
92
- this.buildControl();
93
- this.extractWorkflowGuidedCascading();
94
- this.getLookupData();
95
- // this.myControl.valueChanges.subscribe(v => {
96
- // if (typeof v === 'string') this.filterLookupItems(v, null);
97
- // });
98
-
99
- this.form.get(this.field.property).valueChanges.subscribe(x => {
100
- if (x?.id === -100) {
101
- this.myControl.reset()
102
- }
103
- })
104
- if (this.field.cascadedBy) {
105
- this.form.get(this.field.cascadedByProperty)?.valueChanges.subscribe(v => {
106
- this.cascadedId = this.form.get(this.field.cascadedByProperty).value?.id;
107
- this.lookupItems = [];
108
- this.myControl.setValue(undefined);
109
- this.myControl.patchValue(undefined, {emitEvent: true});
110
- this.form.get(this.field.property)?.setValue(undefined);
111
- this.form.get(this.field.property)?.patchValue(undefined, {emitEvent: true});
112
- this.getLookupData();
113
- });
114
- }
115
-
116
- }
117
-
118
- private extractWorkflowGuidedCascading() {
119
- if (this.supportingAttributes && this.field.workflowCascadingField && this.supportingAttributes[this.field.workflowCascadingField]) {
120
- this.cascadedId = this.supportingAttributes[this.field.workflowCascadingField];
121
- }
122
- }
123
-
124
- private buildControl() {
125
- this.myControl = new FormControl(this.form?.controls[this.field?.property]);
126
- this.backendService.fieldAction$.subscribe( e => {
127
- if (e.property === this.field?.property) {
128
- this.field.readonly = e.fieldInfo.readonly;
129
- this.updateAttributes();
130
- }
131
- });
132
- this.updateAttributes();
133
-
134
- this.myControl.valueChanges.subscribe( v => {
135
- if (typeof v === 'string') {
136
- clearTimeout(this.timer);
137
- this.timer = setTimeout(() => {
138
- this.filterLookupItems(v, null); }, 700);
139
- }
140
- }
141
- );
142
- }
143
-
144
- private updateAttributes() {
145
- this.myControl.enable();
146
- if (this.field.readonly) {
147
- this.myControl.disable();
148
- this.isRequired = false;
149
- } else if (this.field.required) {
150
- this.form?.controls[this.field?.property].setValidators([Validators.required]);
151
- this.myControl.setValidators([Validators.required]);
152
- this.isRequired = true;
153
- }
154
-
155
- if (!this.field.acceptNewItem) {
156
- // @ts-ignore
157
- this.myControl.setValidators(RequireMatch);
158
- }
159
-
160
- this.myControl.setValue(this.form?.get(this.field?.property)?.value);
161
- }
162
-
163
- ngOnChanges({defaultValue}: SimpleChanges): void {
164
- this.patchLookupValue(defaultValue?.currentValue);
165
- }
166
-
167
- private getLookupData() {
168
- if (this.field.cascadedBy && !this.cascadedId) {
169
- } else {
170
- const listItems = buildItemsList('', this.field.lookupApiPath, this.field.cascadedBy);
171
- listItems.columns = ['id','code','englishName','arabicName'];
172
-
173
- this.backendService.getLookupItemsByFilter(listItems, this.cascadedId).subscribe((resp => {
174
- if (resp.valid) {
175
- this.lookupItems = resp.body;
176
- this.lookupItems = [];
177
- resp.body.forEach((r: LookupItem) => this.lookupItems.push(r));
178
- if (!this.form?.get('id')?.value) {
179
- this.patchLookupValue(this.lookupItems?.find(l => l.defaultValue));
180
- }
181
- this.patchLookupValue(this.myControl.value);
182
- }
183
-
184
- }));
185
- }
186
- }
187
-
188
- itemSelected(value: any) {
189
- if (value && value.id !== -1) {
190
- if (value.englishName.indexOf(this.question) === 0) {
191
- value.englishName = value.englishName.substring(this.question.length).split('"?')[0];
192
- }
193
- if (value.arabicName && value.arabicName.indexOf(this.question) === 0) {
194
- value.arabicName = value.arabicName.substring(this.question.length).split('"?')[0];
195
- }
196
- this.form.get(this.field.property)?.setValue(value);
197
- // @ts-ignore
198
- this.selectedValue.emit(this.myControl.value);
199
- }
200
- setTimeout(() => {
201
- this.autocompleteTrigger.closePanel();
202
- });
203
-
204
- }
205
-
206
- displayFn(selected: any): string | undefined {
207
- if (selected?.id < 0) {
208
- return null;
209
- }
210
-
211
- if (Array.isArray(selected))
212
- selected = this.defaultValue
213
- return this.translateService.getDefaultLang() === 'en'
214
- ? selected?.englishName
215
- : selected?.arabicName;
216
- }
217
-
218
-
219
- _allowSelection(option: LookupItem): { [className: string]: boolean } {
220
- return {
221
- 'prevent-selection': option.id === -1,
222
- };
223
- }
224
-
225
- itemNameByLag(item: any): string {
226
- return this.translateService.getDefaultLang() === 'en' ? item.englishName : item.arabicName
227
-
228
- }
229
-
230
- filterLookupItems(name: any, trigger: MatAutocompleteTrigger) {
231
- if (this.myControl.enabled) {
232
- if (trigger) {
233
- trigger.openPanel();
234
- }
235
- if (name === undefined) {
236
- name = '';
237
- }
238
-
239
- if (name === '' && !this.myControl.value) {
240
- this.myControl.setValue(undefined);
241
- this.myControl.updateValueAndValidity();
242
- }
243
-
244
- const listItems: GetItemsList = buildItemsList(name, this.field.lookupApiPath, this.field.cascadedBy);
245
- listItems.filters = this.field.lookupFilterList;
246
- this.addLookupFilterByAnotherProperties(listItems);
247
- listItems.columns = ['id','code','englishName','arabicName'];
248
- this.backendService.getLookupItemsByFilter(listItems);
249
- if (this.field.cascadedBy) {
250
- this.cascadedId = this.form.get(this.field.cascadedByProperty).value?.id;
251
- } else {
252
- this.extractWorkflowGuidedCascading();
253
- }
254
- listItems.columns = ['id','code','englishName','arabicName'];
255
- this.backendService.getLookupItemsByFilter(listItems, this.cascadedId).subscribe(resp => {
256
- if (resp.valid) {
257
- this.items = resp.body.filter((item: { id: any; }) => this.myControl.value?.id !== item.id);
258
- if (!this.items?.length) {
259
- this.field.acceptNewItem ?
260
- this.items?.push(new LookupItem({id: -2, englishName: this.question + name, arabicName: this.question + name})) :
261
- this.items?.push(new LookupItem({id: -1, englishName: 'No match ...', arabicName: 'غير موجود ... '}));
262
- }
263
- } else {
264
- if (this.items?.length == 0)
265
- this.field.acceptNewItem && this.backendService.parentForm.get(this.field.cascadedBy).value != null ?
266
- this.items?.push(new LookupItem({id: -2, englishName: this.question + name, arabicName: this.question + name})) :
267
- this.items?.push(new LookupItem({id: -1, englishName: 'No match ...', arabicName: 'غير موجود ... '}));
268
- }
269
- this.lookupItems$ = of(this.items);
270
- });
271
- return;
272
- }
273
- }
274
-
275
- addLookupFilterByAnotherProperties(listItems: GetItemsList) {
276
- const properties = this.field.lookupFilterList;
277
- if (!Array.isArray(properties)) return;
278
-
279
- const newFilters: Filter[] = [];
280
-
281
- for (const prop of properties) {
282
- const fieldValue = this.form?.value?.[prop.fieldName];
283
- const finalValue = typeof fieldValue === 'object' && fieldValue !== null ? fieldValue.code : fieldValue;
284
- if (!finalValue) continue;
285
-
286
- const fieldName =typeof fieldValue === 'object' && fieldValue !== null ? prop.fieldName + "." + this.field.flattenBySubAttribute : prop.fieldName;
287
- const filter = new Filter({
288
- fieldType: 'FILED_FILTER',
289
- filterType: undefined,
290
- operator: prop.operator,
291
- valueObject: finalValue,
292
- fieldName: fieldName
293
- });
294
-
295
- newFilters.push(filter);
296
- }
297
-
298
- if (newFilters.length) {
299
- listItems.filters = [...(listItems.filters || []), ...newFilters];
300
- }
301
- listItems.filters = listItems.filters.filter(f => f.valueObject);
302
- }
303
-
304
- private patchLookupValue(defaultValue: any) {
305
- if (defaultValue) {
306
-
307
- // this.form?.get(this.field.property)?.patchValue(defaultValue);
308
- this.myControl.setValue(defaultValue);
309
- this.myControl.patchValue(defaultValue, {emitEvent: true});
310
- }
311
- }
312
- getId() {
313
- return this.field.property;
314
- }
315
- onKeydown(event: KeyboardEvent, autocompleteTrigger: MatAutocompleteTrigger) {
316
- if (event.key === 'Enter') {
317
- this.filterLookupItems('', autocompleteTrigger);
318
- autocompleteTrigger.openPanel();
319
- event.preventDefault();
320
- }
321
- }
322
-
323
- closed() {
324
- if (!this.myControl.value){
325
- this.form.get(this.field.property)?.setValue(this.myControl.value);
326
- this.selectedValue.emit(this.myControl.value);
327
- } else if (typeof this.myControl.value === 'string') {
328
- this.myControl.setValue(null);
329
- }
330
- }
331
- }
@@ -1,59 +0,0 @@
1
- <div class="page-container">
2
-
3
- <div class="row full-width mt-2vh">
4
- <div class="column full-width">
5
- <app-title-bar
6
- [pageTitle]="getTitle()"
7
- [newAction]="false"
8
- [hideBackButton]="hideBackButton">
9
- </app-title-bar>
10
- </div>
11
- </div>
12
-
13
- <app-base-form-canvas
14
- [pageInfo]="pageInfo"
15
- [fields]="fields"
16
- [editable]="editable"
17
- [errors]="errors"
18
- [item]="item"
19
- (formUpdated)="updateForm($event)">
20
- </app-base-form-canvas>
21
-
22
- <div class="row main-form-canvas mt-3vh">
23
- <div class="column flex-49">
24
- <div class="row row-center-start">
25
- <button *ngIf="hasWfPositivePermission()" color="primary" mat-flat-button
26
- (click)="doSaveApproveAction()"
27
- [disabled]="disabledSaveButton(item)"
28
- class="action-button"
29
- id="base-form-positive-btn">
30
- {{ getPositiveWfActionKey(item?.stateType) | translate }}
31
- </button>
32
- <button *ngIf="hasWfNegativePermission()" color="second" mat-raised-button
33
- (click)="doCancelRejectAction()"
34
- [disabled]="disabledSaveButton(item)"
35
- class="action-button"
36
- id="base-form-negative-btn">
37
- {{ getNegativeWfActionKey(item?.stateType) | translate }}
38
- </button>
39
- <button *ngIf="pageInfo.hideExtractButton === false && itemId > 0 && editable" color="primary" mat-raised-button
40
- (click)="doExtraAction()"
41
- class="action-button"
42
- id="base-form-extra-btn">
43
- {{ pageInfo.labelsSection + "." + "EXTRA_BUTTON_NAME" | translate }}
44
- </button>
45
- </div>
46
- </div>
47
- <div class="column flex-49"></div>
48
- </div>
49
-
50
-
51
- <ng-container *ngIf="!pageInfo.hideAuditLog">
52
- <div class="row main-form-canvas mt-4vh pb-5vh">
53
- <div class="column flex-95">
54
- <app-audit-log [pageInfo]="pageInfo" [fields]="fields"></app-audit-log>
55
- </div>
56
- </div>
57
- </ng-container>
58
-
59
- </div>