aril 1.2.23 → 1.2.25

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 (447) hide show
  1. package/esm2022/boot/base/index.mjs +1 -1
  2. package/esm2022/boot/base/src/create-base-app-config.mjs +1 -1
  3. package/esm2022/boot/bridge/index.mjs +1 -1
  4. package/esm2022/boot/bridge/src/mfe-bridge.mjs +1 -1
  5. package/esm2022/boot/bridge/src/provide-mfe-bridge.mjs +1 -1
  6. package/esm2022/boot/config/api/index.mjs +1 -1
  7. package/esm2022/boot/config/api/src/api.service.mjs +1 -1
  8. package/esm2022/boot/config/api/src/interfaces.mjs +1 -1
  9. package/esm2022/boot/config/apps/src/apps.service.mjs +4 -4
  10. package/esm2022/boot/config/apps/src/auth.guard.mjs +4 -4
  11. package/esm2022/boot/config/apps/src/interfaces.mjs +1 -1
  12. package/esm2022/boot/config/apps/src/route-permissions.mjs +1 -1
  13. package/esm2022/boot/config/apps/src/showdowDOMWrapper.mjs +4 -4
  14. package/esm2022/boot/config/plugins/src/getNgZone.mjs +1 -1
  15. package/esm2022/boot/config/plugins/src/interfaces.mjs +1 -1
  16. package/esm2022/boot/config/plugins/src/plugins.service.mjs +1 -1
  17. package/esm2022/boot/config/translate/primeng/i18n/tr.mjs +1 -1
  18. package/esm2022/boot/host/src/app.component.mjs +4 -4
  19. package/esm2022/boot/host/src/bootstrap.mjs +1 -1
  20. package/esm2022/boot/mfe/src/app.component.mjs +15 -15
  21. package/esm2022/boot/mfe/src/bootstrap.mjs +1 -1
  22. package/esm2022/boot/pages/index.mjs +1 -1
  23. package/esm2022/boot/pages/src/forbidden.component.mjs +53 -53
  24. package/esm2022/boot/pages/src/notFound.component.mjs +49 -49
  25. package/esm2022/http/lib/enums.mjs +1 -1
  26. package/esm2022/http/src/httpBackend.mjs +4 -4
  27. package/esm2022/http/src/serviceBase.mjs +1 -1
  28. package/esm2022/http/src/serviceStateMethods.mjs +1 -1
  29. package/esm2022/i18n/src/i18n.module.mjs +5 -5
  30. package/esm2022/i18n/src/loader.mjs +4 -4
  31. package/esm2022/keycloak/src/auth.interceptor.mjs +1 -1
  32. package/esm2022/provider/src/prodiveHost.mjs +1 -1
  33. package/esm2022/provider/src/prodiveHostRouter.mjs +1 -1
  34. package/esm2022/provider/src/provideHostKeycloak.mjs +1 -1
  35. package/esm2022/superset/index.mjs +1 -1
  36. package/esm2022/theme/layout/app/breadcrumb/app.breadcrumb.component.mjs +4 -4
  37. package/esm2022/theme/layout/app/expandableMenu/expandable-menu.component.mjs +5 -5
  38. package/esm2022/theme/layout/app/favorite-pages/favorite-pages-sidebar.component.mjs +4 -4
  39. package/esm2022/theme/layout/app/favorite-pages/favorite-pages.service.mjs +4 -4
  40. package/esm2022/theme/layout/app/favorite-pages/modals/add-edit-favorite-modal/add-edit-favorite-modal.component.mjs +4 -4
  41. package/esm2022/theme/layout/app/general-search/general-search.component.mjs +4 -4
  42. package/esm2022/theme/layout/app/history/history-sidebar.component.mjs +4 -4
  43. package/esm2022/theme/layout/app/history/history.service.mjs +4 -4
  44. package/esm2022/theme/layout/app/layout/app.layout.component.mjs +4 -4
  45. package/esm2022/theme/layout/app/layout/mfe.layout.component.mjs +4 -4
  46. package/esm2022/theme/layout/app/notifications/notifications-sidebar.component.mjs +4 -4
  47. package/esm2022/theme/layout/app/profileSidebar/app.profilesidebar.component.mjs +4 -4
  48. package/esm2022/theme/layout/app/profileSidebar/modals/change-password-modal/change-password-modal.component.mjs +4 -4
  49. package/esm2022/theme/layout/app/profileSidebar/modals/edit-profile-modal/edit-profile-modal.component.mjs +4 -4
  50. package/esm2022/theme/layout/app/profileSidebar/profile.service.mjs +4 -4
  51. package/esm2022/theme/layout/app/site-map/site-map-sidebar.component.mjs +4 -4
  52. package/esm2022/theme/layout/app/static-sidebar/static-sidebar.component.mjs +5 -5
  53. package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +10 -5
  54. package/esm2022/theme/layout/index.mjs +1 -1
  55. package/esm2022/theme/layout/service/app.layout.service.mjs +4 -4
  56. package/esm2022/theme/layout/service/app.menu.service.mjs +4 -4
  57. package/esm2022/theme/layout/service/breadcrumb.service.mjs +4 -4
  58. package/esm2022/theme/layout/service/interfaces/enum.mjs +1 -1
  59. package/esm2022/theme/layout/service/notifications.service.mjs +4 -4
  60. package/esm2022/theme/layout/service/search.service.mjs +4 -4
  61. package/esm2022/theme/layout/service/selection-group.service.mjs +4 -4
  62. package/esm2022/ui/autoComplete/src/auto-complete.component.mjs +4 -4
  63. package/esm2022/ui/badge/src/badge.component.mjs +4 -4
  64. package/esm2022/ui/button/src/button.component.mjs +4 -4
  65. package/esm2022/ui/button/src/split-button.component.mjs +4 -4
  66. package/esm2022/ui/calendar/src/calendar.component.mjs +4 -4
  67. package/esm2022/ui/charts/src/amCharts/column/column-chart.component.mjs +4 -4
  68. package/esm2022/ui/charts/src/amCharts/line/line-chart.component.mjs +4 -4
  69. package/esm2022/ui/charts/src/amCharts/pie/pie-chart.component.mjs +4 -4
  70. package/esm2022/ui/charts/src/highCharts/area/area-chart.component.mjs +4 -4
  71. package/esm2022/ui/charts/src/highCharts/bar/bar-chart.component.mjs +4 -4
  72. package/esm2022/ui/charts/src/highCharts/column/column-chart.component.mjs +4 -4
  73. package/esm2022/ui/charts/src/highCharts/gauge/solid-gauge.component.mjs +4 -4
  74. package/esm2022/ui/charts/src/highCharts/heatmap/heatMap-chart.component.mjs +4 -4
  75. package/esm2022/ui/charts/src/highCharts/line/line-chart-datetime-axis.component.mjs +4 -4
  76. package/esm2022/ui/charts/src/highCharts/line/line-chart-series.component.mjs +4 -4
  77. package/esm2022/ui/charts/src/highCharts/line/line-chart.component.mjs +4 -4
  78. package/esm2022/ui/charts/src/highCharts/pie/pie-chart.component.mjs +4 -4
  79. package/esm2022/ui/checkbox/src/check-box.component.mjs +4 -4
  80. package/esm2022/ui/checkbox/src/tri-state-checkbox.component.mjs +4 -4
  81. package/esm2022/ui/chip/src/chip.component.mjs +4 -4
  82. package/esm2022/ui/collapse-reorder-list/src/collapse-reorder-list.component.mjs +4 -4
  83. package/esm2022/ui/dxEditor/src/dx-editor.component.mjs +4 -4
  84. package/esm2022/ui/dxField/src/dx-field.component.mjs +4 -4
  85. package/esm2022/ui/editor/src/aril-editor.component.mjs +4 -4
  86. package/esm2022/ui/field/src/field.component.mjs +4 -4
  87. package/esm2022/ui/fileUpload/src/file-upload.component.mjs +4 -4
  88. package/esm2022/ui/form/index.mjs +5 -5
  89. package/esm2022/ui/form/src/form-submit-button.component.mjs +5 -5
  90. package/esm2022/ui/form/src/form.component.mjs +4 -4
  91. package/esm2022/ui/img-viewer/src/img-viewer.component.mjs +4 -4
  92. package/esm2022/ui/json-diff-comparison/src/json-diff.component.mjs +4 -4
  93. package/esm2022/ui/lib/src/form/form-error-message.component.mjs +4 -4
  94. package/esm2022/ui/lib/src/form/form-error-message.directive.mjs +4 -4
  95. package/esm2022/ui/lib/src/grid/enum-color-picker.pipe.mjs +4 -4
  96. package/esm2022/ui/lib/src/grid/flex-grid.directive.mjs +4 -4
  97. package/esm2022/ui/lib/src/input/common-input-validators.service.mjs +4 -4
  98. package/esm2022/ui/lib/src/input/dx-input-error-message.pipe.mjs +4 -4
  99. package/esm2022/ui/lib/src/input/input-disabled.directive.mjs +4 -4
  100. package/esm2022/ui/lib/src/input/input-error-message.pipe.mjs +4 -4
  101. package/esm2022/ui/lib/src/input/value-accessor.directive.mjs +4 -4
  102. package/esm2022/ui/loader/src/loader.component.mjs +4 -4
  103. package/esm2022/ui/mask/src/mask.component.mjs +4 -4
  104. package/esm2022/ui/multiSelect/src/multi-select.component.mjs +4 -4
  105. package/esm2022/ui/number/src/number.component.mjs +4 -4
  106. package/esm2022/ui/operation-types-dialog/src/operation-types-dialog.component.mjs +13 -13
  107. package/esm2022/ui/overlayPanel/src/overlay-panel.component.mjs +4 -4
  108. package/esm2022/ui/panel/src/panel.component.mjs +4 -4
  109. package/esm2022/ui/password/src/password.component.mjs +4 -4
  110. package/esm2022/ui/pdf-viewer/src/pdf-viewer.component.mjs +4 -4
  111. package/esm2022/ui/progressbar/src/progressbar.component.mjs +4 -4
  112. package/esm2022/ui/radioButton/src/radio-button.component.mjs +4 -4
  113. package/esm2022/ui/relativeDateSelector/src/relative-date-selector.component.mjs +4 -4
  114. package/esm2022/ui/selectBox/src/select-box.component.mjs +4 -4
  115. package/esm2022/ui/switch/src/switch.component.mjs +4 -4
  116. package/esm2022/ui/table/index.mjs +5 -5
  117. package/esm2022/ui/table/src/export-overlay-panel.component.mjs +129 -129
  118. package/esm2022/ui/table/src/interfaces.mjs +1 -1
  119. package/esm2022/ui/table/src/table-column.component.mjs +4 -4
  120. package/esm2022/ui/table/src/table.component.mjs +5 -5
  121. package/esm2022/ui/table-expand/index.mjs +5 -5
  122. package/esm2022/ui/table-expand/src/table-column.component.mjs +4 -4
  123. package/esm2022/ui/table-expand/src/table-expand-area.component.mjs +4 -4
  124. package/esm2022/ui/table-expand/src/table.component.mjs +4 -4
  125. package/esm2022/ui/tag/src/tag.component.mjs +4 -4
  126. package/esm2022/ui/tagBox/src/tag-box.component.mjs +4 -4
  127. package/esm2022/ui/text/src/text.component.mjs +4 -4
  128. package/esm2022/ui/textArea/src/text-area.component.mjs +4 -4
  129. package/esm2022/ui/toggle-button/src/toggle-button.component.mjs +4 -4
  130. package/esm2022/ui/tooltip/src/tooltip-component.mjs +4 -4
  131. package/esm2022/ui/translate-input/src/aril-lang-modal/aril-lang-modal.component.mjs +4 -4
  132. package/esm2022/ui/translate-input/src/aril-translate-input.component.mjs +4 -4
  133. package/esm2022/ui/tree/src/tree.component.mjs +4 -4
  134. package/esm2022/ui/treeSelect/src/treeSelect.component.mjs +4 -4
  135. package/esm2022/ui/treeTable/src/tree-table.component.mjs +4 -4
  136. package/esm2022/ui/value/src/value.component.mjs +4 -4
  137. package/esm2022/ui-business/assetPicker/index.mjs +2 -1
  138. package/esm2022/ui-business/assetPicker/src/asset-picker.component.mjs +5 -5
  139. package/esm2022/ui-business/detailed-overlay-panel/src/detailed-overlay-panel.component.mjs +5 -5
  140. package/esm2022/ui-business/enumPicker/src/enum-picker.component.mjs +5 -5
  141. package/esm2022/ui-business/enumPicker/src/interface.mjs +1 -1
  142. package/esm2022/ui-business/image-viewer/src/aril-image-viewer.component.mjs +4 -4
  143. package/esm2022/ui-business/multiAssetPicker/aril-ui-business-multiAssetPicker.mjs +5 -0
  144. package/esm2022/ui-business/multiAssetPicker/index.mjs +2 -0
  145. package/esm2022/ui-business/multiAssetPicker/src/multi-asset-picker.component.mjs +107 -0
  146. package/esm2022/ui-business/multiple-ref-value/src/multiple-ref-value.component.mjs +4 -4
  147. package/esm2022/ui-business/notification-templates-dialog/src/notification-templates-dialog.component.mjs +4 -4
  148. package/esm2022/ui-business/operation-types-dialog/src/operation-types-dialog.component.mjs +4 -4
  149. package/esm2022/ui-business/pdf-preview-modal/index.mjs +1 -1
  150. package/esm2022/ui-business/pdf-preview-modal/src/open-pdf-preview.mjs +1 -1
  151. package/esm2022/ui-business/pdf-preview-modal/src/pdf-preview-modal.component.mjs +29 -29
  152. package/esm2022/ui-business/ref-value/src/ref-value.component.mjs +5 -5
  153. package/esm2022/ui-business/rolePicker/src/role-picker.component.mjs +4 -4
  154. package/esm2022/ui-business/trace-drawer/index.mjs +1 -1
  155. package/esm2022/ui-business/trace-drawer/src/app-log.service.mjs +4 -4
  156. package/esm2022/ui-business/trace-drawer/src/interfaces.mjs +1 -1
  157. package/esm2022/ui-business/trace-drawer/src/trace-drawer.component.mjs +5 -5
  158. package/esm2022/ui-business/trace-drawer/src/trace-log.service.mjs +4 -4
  159. package/esm2022/ui-business/trace-id/index.mjs +1 -1
  160. package/esm2022/ui-business/trace-id/src/trace-id.component.mjs +5 -5
  161. package/esm2022/ui-business/userPicker/src/user-picker.component.mjs +4 -4
  162. package/esm2022/util/activity/index.mjs +1 -1
  163. package/esm2022/util/activity/src/activity.constants.mjs +1 -1
  164. package/esm2022/util/activity/src/activity.service.mjs +4 -4
  165. package/esm2022/util/activity/src/activity.types.mjs +1 -1
  166. package/esm2022/util/block/src/block.mjs +7 -7
  167. package/esm2022/util/directives/src/detail-page-customization/detail-page-customization.directive.mjs +4 -4
  168. package/esm2022/util/directives/src/dialog-component/plugin-dialog.component.mjs +4 -4
  169. package/esm2022/util/directives/src/dialog-service/plugin-dialog.service.mjs +4 -4
  170. package/esm2022/util/lib/src/module-router.mjs +4 -4
  171. package/esm2022/util/pipes/src/distance-to-now.pipe.mjs +4 -4
  172. package/esm2022/util/pipes/src/get-column-by-field.pipe.mjs +4 -4
  173. package/esm2022/util/pipes/src/parse.pipe.mjs +4 -4
  174. package/esm2022/util/pipes/src/round-number.pipe.mjs +4 -4
  175. package/esm2022/util/pipes/src/safe.pipe.mjs +4 -4
  176. package/esm2022/util/pipes/src/translate-json/translate-json.pipe.mjs +4 -4
  177. package/esm2022/util/pub-sub/src/pub-sub.service.mjs +4 -4
  178. package/esm2022/util/sync-active-tab-route/src/sync-active-tab-route.directive.mjs +4 -4
  179. package/esm2022/util/unwrap/src/unwrap-tag.directive.mjs +4 -4
  180. package/fesm2022/{aril-app.component-CwZZhJcO.mjs → aril-app.component-Pj4R9eG9.mjs} +15 -15
  181. package/fesm2022/aril-app.component-Pj4R9eG9.mjs.map +1 -0
  182. package/fesm2022/aril-boot-base.mjs +1 -1
  183. package/fesm2022/aril-boot-base.mjs.map +1 -1
  184. package/fesm2022/aril-boot-bridge.mjs.map +1 -1
  185. package/fesm2022/aril-boot-config-api.mjs +1 -1
  186. package/fesm2022/aril-boot-config-api.mjs.map +1 -1
  187. package/fesm2022/aril-boot-config-apps.mjs +10 -10
  188. package/fesm2022/aril-boot-config-apps.mjs.map +1 -1
  189. package/fesm2022/aril-boot-config-plugins.mjs +1 -1
  190. package/fesm2022/aril-boot-config-plugins.mjs.map +1 -1
  191. package/fesm2022/aril-boot-config-translate.mjs.map +1 -1
  192. package/fesm2022/aril-boot-host.mjs +4 -4
  193. package/fesm2022/aril-boot-host.mjs.map +1 -1
  194. package/fesm2022/{aril-boot-mfe-app.component-DwYgUUdL.mjs → aril-boot-mfe-app.component-GbZAGlTf.mjs} +16 -16
  195. package/fesm2022/aril-boot-mfe-app.component-GbZAGlTf.mjs.map +1 -0
  196. package/fesm2022/{aril-boot-mfe-aril-boot-mfe-hJkkFa_a.mjs → aril-boot-mfe-aril-boot-mfe-I5xT2fQx.mjs} +4 -4
  197. package/fesm2022/aril-boot-mfe-aril-boot-mfe-I5xT2fQx.mjs.map +1 -0
  198. package/fesm2022/aril-boot-mfe.mjs +1 -1
  199. package/fesm2022/aril-boot-pages.mjs +100 -100
  200. package/fesm2022/aril-boot-pages.mjs.map +1 -1
  201. package/fesm2022/aril-http.mjs +3 -3
  202. package/fesm2022/aril-http.mjs.map +1 -1
  203. package/fesm2022/aril-i18n.mjs +7 -7
  204. package/fesm2022/aril-i18n.mjs.map +1 -1
  205. package/fesm2022/aril-keycloak.mjs.map +1 -1
  206. package/fesm2022/aril-provider.mjs +1 -1
  207. package/fesm2022/aril-provider.mjs.map +1 -1
  208. package/fesm2022/aril-theme-layout.mjs +79 -75
  209. package/fesm2022/aril-theme-layout.mjs.map +1 -1
  210. package/fesm2022/aril-ui-autoComplete.mjs +6 -6
  211. package/fesm2022/aril-ui-autoComplete.mjs.map +1 -1
  212. package/fesm2022/aril-ui-badge.mjs +4 -4
  213. package/fesm2022/aril-ui-badge.mjs.map +1 -1
  214. package/fesm2022/aril-ui-business-assetPicker.mjs +6 -6
  215. package/fesm2022/aril-ui-business-assetPicker.mjs.map +1 -1
  216. package/fesm2022/aril-ui-business-detailed-overlay-panel.mjs +6 -6
  217. package/fesm2022/aril-ui-business-detailed-overlay-panel.mjs.map +1 -1
  218. package/fesm2022/aril-ui-business-enumPicker.mjs +6 -6
  219. package/fesm2022/aril-ui-business-enumPicker.mjs.map +1 -1
  220. package/fesm2022/aril-ui-business-image-viewer.mjs +3 -3
  221. package/fesm2022/aril-ui-business-image-viewer.mjs.map +1 -1
  222. package/fesm2022/aril-ui-business-multiAssetPicker.mjs +114 -0
  223. package/fesm2022/aril-ui-business-multiAssetPicker.mjs.map +1 -0
  224. package/fesm2022/aril-ui-business-multiple-ref-value.mjs +4 -4
  225. package/fesm2022/aril-ui-business-multiple-ref-value.mjs.map +1 -1
  226. package/fesm2022/aril-ui-business-notification-templates-dialog.mjs +3 -3
  227. package/fesm2022/aril-ui-business-notification-templates-dialog.mjs.map +1 -1
  228. package/fesm2022/aril-ui-business-operation-types-dialog.mjs +3 -3
  229. package/fesm2022/aril-ui-business-operation-types-dialog.mjs.map +1 -1
  230. package/fesm2022/aril-ui-business-pdf-preview-modal.mjs +28 -28
  231. package/fesm2022/aril-ui-business-pdf-preview-modal.mjs.map +1 -1
  232. package/fesm2022/aril-ui-business-ref-value.mjs +5 -5
  233. package/fesm2022/aril-ui-business-ref-value.mjs.map +1 -1
  234. package/fesm2022/aril-ui-business-rolePicker.mjs +4 -4
  235. package/fesm2022/aril-ui-business-rolePicker.mjs.map +1 -1
  236. package/fesm2022/aril-ui-business-trace-drawer.mjs +11 -11
  237. package/fesm2022/aril-ui-business-trace-drawer.mjs.map +1 -1
  238. package/fesm2022/aril-ui-business-trace-id.mjs +5 -5
  239. package/fesm2022/aril-ui-business-trace-id.mjs.map +1 -1
  240. package/fesm2022/aril-ui-business-userPicker.mjs +3 -3
  241. package/fesm2022/aril-ui-business-userPicker.mjs.map +1 -1
  242. package/fesm2022/aril-ui-button.mjs +7 -7
  243. package/fesm2022/aril-ui-button.mjs.map +1 -1
  244. package/fesm2022/aril-ui-calendar.mjs +3 -3
  245. package/fesm2022/aril-ui-calendar.mjs.map +1 -1
  246. package/fesm2022/aril-ui-charts.mjs +37 -37
  247. package/fesm2022/aril-ui-charts.mjs.map +1 -1
  248. package/fesm2022/aril-ui-checkbox.mjs +6 -6
  249. package/fesm2022/aril-ui-checkbox.mjs.map +1 -1
  250. package/fesm2022/aril-ui-chip.mjs +4 -4
  251. package/fesm2022/aril-ui-chip.mjs.map +1 -1
  252. package/fesm2022/aril-ui-collapse-reorder-list.mjs +4 -4
  253. package/fesm2022/aril-ui-collapse-reorder-list.mjs.map +1 -1
  254. package/fesm2022/aril-ui-dxEditor.mjs +4 -4
  255. package/fesm2022/aril-ui-dxEditor.mjs.map +1 -1
  256. package/fesm2022/aril-ui-dxField.mjs +4 -4
  257. package/fesm2022/aril-ui-dxField.mjs.map +1 -1
  258. package/fesm2022/aril-ui-editor.mjs +4 -4
  259. package/fesm2022/aril-ui-editor.mjs.map +1 -1
  260. package/fesm2022/aril-ui-field.mjs +4 -4
  261. package/fesm2022/aril-ui-field.mjs.map +1 -1
  262. package/fesm2022/aril-ui-fileUpload.mjs +4 -4
  263. package/fesm2022/aril-ui-fileUpload.mjs.map +1 -1
  264. package/fesm2022/aril-ui-form.mjs +12 -12
  265. package/fesm2022/aril-ui-form.mjs.map +1 -1
  266. package/fesm2022/aril-ui-img-viewer.mjs +3 -3
  267. package/fesm2022/aril-ui-img-viewer.mjs.map +1 -1
  268. package/fesm2022/aril-ui-json-diff-comparison.mjs +4 -4
  269. package/fesm2022/aril-ui-json-diff-comparison.mjs.map +1 -1
  270. package/fesm2022/aril-ui-lib.mjs +28 -28
  271. package/fesm2022/aril-ui-lib.mjs.map +1 -1
  272. package/fesm2022/aril-ui-loader.mjs +3 -3
  273. package/fesm2022/aril-ui-loader.mjs.map +1 -1
  274. package/fesm2022/aril-ui-mask.mjs +3 -3
  275. package/fesm2022/aril-ui-mask.mjs.map +1 -1
  276. package/fesm2022/aril-ui-multiSelect.mjs +3 -3
  277. package/fesm2022/aril-ui-multiSelect.mjs.map +1 -1
  278. package/fesm2022/aril-ui-number.mjs +3 -3
  279. package/fesm2022/aril-ui-number.mjs.map +1 -1
  280. package/fesm2022/aril-ui-operation-types-dialog.mjs +12 -12
  281. package/fesm2022/aril-ui-operation-types-dialog.mjs.map +1 -1
  282. package/fesm2022/aril-ui-overlayPanel.mjs +4 -4
  283. package/fesm2022/aril-ui-overlayPanel.mjs.map +1 -1
  284. package/fesm2022/aril-ui-panel.mjs +4 -4
  285. package/fesm2022/aril-ui-panel.mjs.map +1 -1
  286. package/fesm2022/aril-ui-password.mjs +3 -3
  287. package/fesm2022/aril-ui-password.mjs.map +1 -1
  288. package/fesm2022/aril-ui-pdf-viewer.mjs +3 -3
  289. package/fesm2022/aril-ui-pdf-viewer.mjs.map +1 -1
  290. package/fesm2022/aril-ui-progressbar.mjs +3 -3
  291. package/fesm2022/aril-ui-progressbar.mjs.map +1 -1
  292. package/fesm2022/aril-ui-radioButton.mjs +3 -3
  293. package/fesm2022/aril-ui-radioButton.mjs.map +1 -1
  294. package/fesm2022/aril-ui-relativeDateSelector.mjs +4 -4
  295. package/fesm2022/aril-ui-relativeDateSelector.mjs.map +1 -1
  296. package/fesm2022/aril-ui-selectBox.mjs +5 -5
  297. package/fesm2022/aril-ui-selectBox.mjs.map +1 -1
  298. package/fesm2022/aril-ui-switch.mjs +3 -3
  299. package/fesm2022/aril-ui-switch.mjs.map +1 -1
  300. package/fesm2022/aril-ui-table-expand.mjs +14 -14
  301. package/fesm2022/aril-ui-table-expand.mjs.map +1 -1
  302. package/fesm2022/aril-ui-table.mjs +141 -141
  303. package/fesm2022/aril-ui-table.mjs.map +1 -1
  304. package/fesm2022/aril-ui-tag.mjs +3 -3
  305. package/fesm2022/aril-ui-tag.mjs.map +1 -1
  306. package/fesm2022/aril-ui-tagBox.mjs +5 -5
  307. package/fesm2022/aril-ui-tagBox.mjs.map +1 -1
  308. package/fesm2022/aril-ui-text.mjs +3 -3
  309. package/fesm2022/aril-ui-text.mjs.map +1 -1
  310. package/fesm2022/aril-ui-textArea.mjs +3 -3
  311. package/fesm2022/aril-ui-textArea.mjs.map +1 -1
  312. package/fesm2022/aril-ui-toggle-button.mjs +4 -4
  313. package/fesm2022/aril-ui-toggle-button.mjs.map +1 -1
  314. package/fesm2022/aril-ui-tooltip.mjs +3 -3
  315. package/fesm2022/aril-ui-tooltip.mjs.map +1 -1
  316. package/fesm2022/aril-ui-translate-input.mjs +6 -6
  317. package/fesm2022/aril-ui-translate-input.mjs.map +1 -1
  318. package/fesm2022/aril-ui-tree.mjs +4 -4
  319. package/fesm2022/aril-ui-tree.mjs.map +1 -1
  320. package/fesm2022/aril-ui-treeSelect.mjs +4 -4
  321. package/fesm2022/aril-ui-treeSelect.mjs.map +1 -1
  322. package/fesm2022/aril-ui-treeTable.mjs +4 -4
  323. package/fesm2022/aril-ui-treeTable.mjs.map +1 -1
  324. package/fesm2022/aril-ui-value.mjs +5 -5
  325. package/fesm2022/aril-ui-value.mjs.map +1 -1
  326. package/fesm2022/aril-util-activity.mjs +3 -3
  327. package/fesm2022/aril-util-activity.mjs.map +1 -1
  328. package/fesm2022/aril-util-block.mjs +6 -6
  329. package/fesm2022/aril-util-block.mjs.map +1 -1
  330. package/fesm2022/aril-util-directives.mjs +10 -10
  331. package/fesm2022/aril-util-directives.mjs.map +1 -1
  332. package/fesm2022/aril-util-lib.mjs +3 -3
  333. package/fesm2022/aril-util-lib.mjs.map +1 -1
  334. package/fesm2022/aril-util-pipes.mjs +18 -18
  335. package/fesm2022/aril-util-pipes.mjs.map +1 -1
  336. package/fesm2022/aril-util-primitive-extensions.mjs.map +1 -1
  337. package/fesm2022/aril-util-pub-sub.mjs +3 -3
  338. package/fesm2022/aril-util-pub-sub.mjs.map +1 -1
  339. package/fesm2022/aril-util-sync-active-tab-route.mjs +4 -4
  340. package/fesm2022/aril-util-sync-active-tab-route.mjs.map +1 -1
  341. package/fesm2022/aril-util-unwrap.mjs +3 -3
  342. package/fesm2022/aril-util-unwrap.mjs.map +1 -1
  343. package/fesm2022/aril.mjs +6 -6
  344. package/fesm2022/aril.mjs.map +1 -1
  345. package/package.json +58 -52
  346. package/theme/layout/app/breadcrumb/app.breadcrumb.component.ts +127 -127
  347. package/theme/layout/app/expandableMenu/expandable-menu.component.html +137 -137
  348. package/theme/layout/app/expandableMenu/expandable-menu.component.ts +373 -373
  349. package/theme/layout/app/favorite-pages/favorite-pages-sidebar.component.d.ts +0 -16
  350. package/theme/layout/app/general-search/general-search.component.ts +93 -93
  351. package/theme/layout/app/history/history-sidebar.component.d.ts +0 -16
  352. package/theme/layout/app/history/history.service.ts +158 -158
  353. package/theme/layout/app/layout/app.layout.component.ts +168 -168
  354. package/theme/layout/app/notifications/notifications-sidebar.component.d.ts +0 -16
  355. package/theme/layout/app/site-map/site-map-sidebar.component.d.ts +0 -16
  356. package/theme/layout/app/site-map/site-map-sidebar.component.ts +195 -195
  357. package/theme/layout/app/static-sidebar/static-sidebar.component.html +162 -162
  358. package/theme/layout/app/static-sidebar/static-sidebar.component.scss +420 -420
  359. package/theme/layout/app/static-sidebar/static-sidebar.component.ts +343 -343
  360. package/theme/layout/app/topbar/app.topbar.component.d.ts +2 -0
  361. package/theme/layout/app/topbar/app.topbar.component.html +1 -1
  362. package/theme/layout/app/topbar/app.topbar.component.scss +1 -0
  363. package/theme/layout/app/topbar/app.topbar.component.ts +6 -0
  364. package/theme/layout/index.ts +9 -9
  365. package/theme/layout/service/interfaces/enum.ts +19 -19
  366. package/theme/styles/layout/_expanded_sidebar.scss +511 -511
  367. package/theme/styles/layout/_fonts.scss +81 -81
  368. package/theme/styles/theme/base/components/input/_inputtext.scss +104 -104
  369. package/theme/styles/theme/base/components/overlay/_sidebar.scss +27 -27
  370. package/theme/styles/theme/base/components/panel/_stepper.scss +205 -205
  371. package/theme/styles/theme/dark/_variables.scss +933 -933
  372. package/theme/styles/theme/light/_variables.scss +940 -940
  373. package/ui/autoComplete/src/auto-complete.component.d.ts +8 -8
  374. package/ui/badge/src/badge.component.d.ts +9 -9
  375. package/ui/button/src/button.component.d.ts +12 -12
  376. package/ui/button/src/split-button.component.d.ts +1 -1
  377. package/ui/calendar/src/calendar.component.d.ts +22 -22
  378. package/ui/charts/src/amCharts/column/column-chart.component.d.ts +4 -4
  379. package/ui/charts/src/amCharts/line/line-chart.component.d.ts +5 -5
  380. package/ui/charts/src/amCharts/pie/pie-chart.component.d.ts +4 -4
  381. package/ui/charts/src/highCharts/area/area-chart.component.d.ts +3 -3
  382. package/ui/charts/src/highCharts/bar/bar-chart.component.d.ts +7 -7
  383. package/ui/charts/src/highCharts/column/column-chart.component.d.ts +9 -9
  384. package/ui/charts/src/highCharts/gauge/solid-gauge.component.d.ts +3 -3
  385. package/ui/charts/src/highCharts/heatmap/heatMap-chart.component.d.ts +4 -4
  386. package/ui/charts/src/highCharts/line/line-chart-datetime-axis.component.d.ts +5 -5
  387. package/ui/charts/src/highCharts/line/line-chart-series.component.d.ts +4 -4
  388. package/ui/charts/src/highCharts/line/line-chart.component.d.ts +4 -4
  389. package/ui/charts/src/highCharts/pie/pie-chart.component.d.ts +7 -7
  390. package/ui/checkbox/src/check-box.component.d.ts +3 -3
  391. package/ui/checkbox/src/tri-state-checkbox.component.d.ts +2 -2
  392. package/ui/chip/src/chip.component.d.ts +7 -7
  393. package/ui/collapse-reorder-list/src/collapse-reorder-list.component.d.ts +4 -4
  394. package/ui/dxEditor/src/dx-editor.component.d.ts +5 -5
  395. package/ui/dxField/src/dx-field.component.d.ts +5 -5
  396. package/ui/editor/src/aril-editor.component.d.ts +3 -3
  397. package/ui/field/src/field.component.d.ts +9 -9
  398. package/ui/fileUpload/src/file-upload.component.d.ts +14 -14
  399. package/ui/form/src/form-submit-button.component.d.ts +1 -1
  400. package/ui/form/src/form.component.d.ts +1 -1
  401. package/ui/img-viewer/src/img-viewer.component.d.ts +1 -1
  402. package/ui/lib/src/form/form-error-message.directive.d.ts +1 -1
  403. package/ui/mask/src/mask.component.d.ts +6 -6
  404. package/ui/multiSelect/src/multi-select.component.d.ts +13 -13
  405. package/ui/number/src/number.component.d.ts +15 -15
  406. package/ui/overlayPanel/src/overlay-panel.component.d.ts +1 -1
  407. package/ui/panel/src/panel.component.d.ts +6 -6
  408. package/ui/password/src/password.component.d.ts +4 -4
  409. package/ui/pdf-viewer/src/pdf-viewer.component.d.ts +12 -12
  410. package/ui/progressbar/src/progressbar.component.d.ts +3 -3
  411. package/ui/radioButton/src/radio-button.component.d.ts +3 -3
  412. package/ui/selectBox/src/select-box.component.d.ts +10 -10
  413. package/ui/switch/src/switch.component.d.ts +1 -1
  414. package/ui/table/src/export-overlay-panel.component.d.ts +2 -2
  415. package/ui/table/src/table-column.component.d.ts +11 -11
  416. package/ui/table/src/table.component.d.ts +35 -35
  417. package/ui/table-expand/src/table-column.component.d.ts +6 -6
  418. package/ui/table-expand/src/table.component.d.ts +20 -20
  419. package/ui/tag/src/tag.component.d.ts +6 -4
  420. package/ui/tagBox/src/tag-box.component.d.ts +7 -7
  421. package/ui/text/src/text.component.d.ts +5 -5
  422. package/ui/textArea/src/text-area.component.d.ts +5 -5
  423. package/ui/toggle-button/src/toggle-button.component.d.ts +1 -1
  424. package/ui/tooltip/src/tooltip-component.d.ts +8 -8
  425. package/ui/translate-input/src/aril-translate-input.component.d.ts +2 -2
  426. package/ui/tree/src/tree.component.d.ts +8 -8
  427. package/ui/treeSelect/src/treeSelect.component.d.ts +12 -12
  428. package/ui/treeTable/src/tree-table.component.d.ts +5 -5
  429. package/ui/value/src/value.component.d.ts +15 -15
  430. package/ui-business/assetPicker/index.d.ts +1 -0
  431. package/ui-business/assetPicker/src/asset-picker.component.d.ts +11 -11
  432. package/ui-business/detailed-overlay-panel/src/detailed-overlay-panel.component.d.ts +6 -3
  433. package/ui-business/enumPicker/src/enum-picker.component.d.ts +24 -24
  434. package/ui-business/image-viewer/src/aril-image-viewer.component.d.ts +8 -8
  435. package/ui-business/multiAssetPicker/index.d.ts +1 -0
  436. package/ui-business/multiAssetPicker/src/multi-asset-picker.component.d.ts +39 -0
  437. package/ui-business/multiple-ref-value/src/multiple-ref-value.component.d.ts +5 -2
  438. package/ui-business/ref-value/src/ref-value.component.d.ts +5 -5
  439. package/ui-business/rolePicker/src/role-picker.component.d.ts +6 -6
  440. package/ui-business/trace-drawer/src/trace-drawer.component.d.ts +8 -8
  441. package/ui-business/trace-id/src/trace-id.component.d.ts +6 -6
  442. package/ui-business/userPicker/src/user-picker.component.d.ts +3 -3
  443. package/util/block/src/block.d.ts +4 -4
  444. package/util/lib/src/types.d.ts +0 -16
  445. package/fesm2022/aril-app.component-CwZZhJcO.mjs.map +0 -1
  446. package/fesm2022/aril-boot-mfe-app.component-DwYgUUdL.mjs.map +0 -1
  447. package/fesm2022/aril-boot-mfe-aril-boot-mfe-hJkkFa_a.mjs.map +0 -1
@@ -1,343 +1,343 @@
1
- import { NgClass, NgTemplateOutlet } from '@angular/common';
2
- import { HttpClient } from '@angular/common/http';
3
- import { Component, OnDestroy, OnInit, Signal, signal } from '@angular/core';
4
- import { toSignal } from '@angular/core/rxjs-interop';
5
- import { FormsModule } from '@angular/forms';
6
- import { NavigationEnd, Router, RouterLink } from '@angular/router';
7
-
8
- import { InputTextModule } from 'primeng/inputtext';
9
- import { ScrollPanelModule } from 'primeng/scrollpanel';
10
- import { TooltipModule } from 'primeng/tooltip';
11
-
12
- import { TranslocoModule, TranslocoService } from '@ngneat/transloco';
13
- import { Subscription, filter } from 'rxjs';
14
-
15
- import { bridge } from 'aril/boot/bridge';
16
- import { MenuItemAction, PluginMenuItem } from 'aril/boot/config/apps';
17
- import { TranslateJsonPipe } from 'aril/util/pipes';
18
-
19
- import { LayoutService } from '../../service/app.layout.service';
20
- import { AppMenuService } from '../../service/app.menu.service';
21
-
22
- interface MenuNode {
23
- key: string;
24
- label: any;
25
- icon?: string;
26
- routerLink?: string;
27
- action?: MenuItemAction;
28
- children?: MenuNode[];
29
- expanded: boolean;
30
- actionLoading?: boolean;
31
- }
32
-
33
- @Component({
34
- standalone: true,
35
- selector: 'app-static-sidebar',
36
- imports: [
37
- RouterLink,
38
- NgClass,
39
- NgTemplateOutlet,
40
- ScrollPanelModule,
41
- TooltipModule,
42
- FormsModule,
43
- TranslocoModule,
44
- InputTextModule
45
- ],
46
- templateUrl: './static-sidebar.component.html',
47
- styleUrl: './static-sidebar.component.scss',
48
- providers: [TranslateJsonPipe]
49
- })
50
- export class StaticSidebarComponent implements OnInit, OnDestroy {
51
- activeLang: Signal<string>;
52
- menuNodes = signal<MenuNode[]>([]);
53
- filteredNodes = signal<MenuNode[]>([]);
54
- searchTerm = signal<string>('');
55
-
56
- private routerSubscription: Subscription | null = null;
57
- private actionSubscription: Subscription | null = null;
58
-
59
- private readonly MAX_LENGTH = { level0: 25, level1: 20, level2: 16, level3: 13 };
60
-
61
- constructor(
62
- private readonly menuService: AppMenuService,
63
- private readonly router: Router,
64
- private readonly layoutService: LayoutService,
65
- private readonly translateJsonPipe: TranslateJsonPipe,
66
- private readonly translocoService: TranslocoService,
67
- private readonly http: HttpClient
68
- ) {
69
- this.activeLang = toSignal(this.translocoService.langChanges$, { initialValue: 'tr' });
70
- }
71
-
72
- get isCollapsed(): boolean {
73
- return this.layoutService.isStaticSidebarCollapsed();
74
- }
75
-
76
- get topLevelNodes(): MenuNode[] {
77
- return this.menuNodes();
78
- }
79
-
80
- ngOnInit() {
81
- this.buildMenuTree();
82
- this.routerSubscription = this.router.events
83
- .pipe(filter((event) => event instanceof NavigationEnd))
84
- .subscribe(() => this.buildMenuTree());
85
- }
86
-
87
- ngOnDestroy() {
88
- this.routerSubscription?.unsubscribe();
89
- this.actionSubscription?.unsubscribe();
90
- }
91
-
92
- isTextTruncated(label: any, lang: string | null, level = 0): boolean {
93
- if (!label || !lang || !label[lang]) return false;
94
- const text = label[lang];
95
- const len = text.length;
96
- const limits = [this.MAX_LENGTH.level0, this.MAX_LENGTH.level1, this.MAX_LENGTH.level2, this.MAX_LENGTH.level3];
97
- return len > limits[Math.min(level, 3)];
98
- }
99
-
100
- isMobile(): boolean {
101
- return this.layoutService.isMobile();
102
- }
103
-
104
- buildMenuTree() {
105
- const menuItems = this.getMenuItems();
106
- const nodes = this.convertToMenuNodes(menuItems);
107
- this.menuNodes.set(nodes);
108
- this.filteredNodes.set([...nodes]);
109
- this.expandActiveMenu();
110
- }
111
-
112
- private expandActiveMenu() {
113
- const nodes = this.menuNodes();
114
- this.findAndExpandActiveNode(nodes);
115
- this.filteredNodes.set([...this.filteredNodes()]);
116
- }
117
-
118
- private findAndExpandActiveNode(nodes: MenuNode[]): MenuNode | null {
119
- for (const node of nodes) {
120
- if (this.isActiveRouteForNode(node)) {
121
- return node;
122
- }
123
-
124
- if (node.children && node.children.length > 0) {
125
- const activeChild = this.findAndExpandActiveNode(node.children);
126
- if (activeChild) {
127
- // we find active child and then opened its parent nodes
128
- node.expanded = true;
129
- return activeChild;
130
- }
131
- }
132
- }
133
- return null;
134
- }
135
-
136
- convertToMenuNodes(items: PluginMenuItem[], parentKey = ''): MenuNode[] {
137
- return items
138
- .filter((item) => !item.separator)
139
- .map((item, index) => {
140
- const key = parentKey ? `${parentKey}-${index}` : `${index}`;
141
- const node: MenuNode = {
142
- key,
143
- label: item.label,
144
- icon: item.icon,
145
- routerLink: item.action ? undefined : item.routerLink,
146
- action: item.action,
147
- expanded: false
148
- };
149
- if (item.items && item.items.length > 0) {
150
- node.children = this.convertToMenuNodes(item.items, key);
151
- }
152
- return node;
153
- });
154
- }
155
-
156
- getMenuItems(): PluginMenuItem[] {
157
- return bridge.isHostMode() ? bridge.hostMenuItems() : this.menuService.menuItems();
158
- }
159
-
160
- getLocalText(text: any): string {
161
- return this.translateJsonPipe.transform(text);
162
- }
163
-
164
- isActiveRouteForNode(node: MenuNode): boolean {
165
- if (!node.routerLink) return false;
166
- const currentUrl = this.router.url;
167
- const hashUrl = currentUrl.indexOf('#') > -1 ? currentUrl.split('#')[1] : currentUrl;
168
- if (hashUrl === node.routerLink || hashUrl === '/' + node.routerLink) return true;
169
- return (
170
- node.routerLink !== '/' &&
171
- (hashUrl.startsWith(node.routerLink + '/') || hashUrl.startsWith('/' + node.routerLink + '/'))
172
- );
173
- }
174
-
175
- // use on collapsed mode
176
- isNodeOrChildActive(node: MenuNode): boolean {
177
- if (this.isActiveRouteForNode(node)) {
178
- return true;
179
- }
180
- if (node.children && node.children.length > 0) {
181
- return node.children.some((child) => this.isNodeOrChildActive(child));
182
- }
183
-
184
- return false;
185
- }
186
-
187
- isTopLevelNodeActive(node: MenuNode): boolean {
188
- return this.isNodeOrChildActive(node);
189
- }
190
-
191
- isChildNodeActive(node: MenuNode): boolean {
192
- return this.isActiveRouteForNode(node);
193
- }
194
-
195
- toggleNode(node: MenuNode, level = 0) {
196
- const wasExpanded = node.expanded;
197
- if (level === 0) {
198
- // Diğer ana menüleri kapat
199
- this.closeOtherTopLevelNodes(node);
200
- }
201
- node.expanded = !wasExpanded;
202
-
203
- this.filteredNodes.set([...this.filteredNodes()]);
204
- }
205
-
206
- private closeOtherTopLevelNodes(exceptNode: MenuNode) {
207
- const nodes = this.menuNodes();
208
- nodes.forEach((node) => {
209
- if (node !== exceptNode) {
210
- node.expanded = false;
211
- this.closeAllChildNodes(node);
212
- }
213
- });
214
- }
215
-
216
- private closeAllChildNodes(node: MenuNode) {
217
- if (node.children) {
218
- node.children.forEach((child) => {
219
- child.expanded = false;
220
- this.closeAllChildNodes(child);
221
- });
222
- }
223
- }
224
-
225
- onMenuItemClick() {
226
- if (this.isMobile()) {
227
- this.layoutService.closeMobileMenu();
228
- }
229
-
230
- this.searchTerm.set('');
231
- this.filteredNodes.set(this.menuNodes() || []);
232
- }
233
-
234
- onActionItemClick(node: MenuNode, event: Event) {
235
- event.preventDefault();
236
- event.stopPropagation();
237
-
238
- if (!node.action || node.actionLoading) return;
239
-
240
- // Cancel any previous action request
241
- this.actionSubscription?.unsubscribe();
242
-
243
- node.actionLoading = true;
244
-
245
- const request$ =
246
- node.action.method === 'GET' ?
247
- this.http.get(node.action.url)
248
- : this.http.post(node.action.url, node.action.body ?? {});
249
-
250
- this.actionSubscription = request$.subscribe({
251
- next: (response: any) => {
252
- node.actionLoading = false;
253
- const route = this.buildSuccessRoute(node.action!, response);
254
- this.router.navigate([route]);
255
- this.onMenuItemClick();
256
- },
257
- error: () => {
258
- node.actionLoading = false;
259
- }
260
- });
261
- }
262
-
263
- private buildSuccessRoute(action: MenuItemAction, response: any): string {
264
- if (!action.successRouteResponseKey) return action.successRoute;
265
-
266
- const value = this.getValueByPath(response, action.successRouteResponseKey);
267
- if (value === undefined || value === null) return action.successRoute;
268
-
269
- return `${action.successRoute}/${value}`;
270
- }
271
-
272
- private getValueByPath(obj: any, path: string): any {
273
- if (!obj || !path) return undefined;
274
-
275
- return path.split('.').reduce((current, key) => {
276
- if (current === undefined || current === null) return undefined;
277
-
278
- // Handle array access like 'result[0]'
279
- const arrayMatch = key.match(/^(.+?)\[(\d+)\]$/);
280
- if (arrayMatch) {
281
- const arrayKey = arrayMatch[1];
282
- const index = parseInt(arrayMatch[2], 10);
283
- return current[arrayKey]?.[index];
284
- }
285
-
286
- return current[key];
287
- }, obj);
288
- }
289
-
290
- onCollapsedItemClick(node: MenuNode) {
291
- if (this.isCollapsed) {
292
- this.layoutService.onMenuToggle();
293
- }
294
- this.closeOtherTopLevelNodes(node);
295
- if (node.children && node.children.length > 0) {
296
- node.expanded = true;
297
- }
298
- this.filteredNodes.set([...this.filteredNodes()]);
299
- if (node.routerLink) {
300
- this.onMenuItemClick();
301
- }
302
- }
303
-
304
- onSearchChange(): void {
305
- const currentLang = this.translocoService.getActiveLang();
306
- const currentSearchTerm = this.searchTerm()?.toLocaleLowerCase(currentLang)?.trim();
307
- if (!currentSearchTerm) {
308
- this.filteredNodes.set(this.menuNodes() || []);
309
- return;
310
- }
311
- this.filteredNodes.set(this.filterNodes(this.menuNodes(), currentSearchTerm));
312
- }
313
-
314
- private filterNodes(nodes: MenuNode[], searchTerm: string): MenuNode[] {
315
- const filtered: MenuNode[] = [];
316
- const currentLang = this.translocoService.getActiveLang();
317
-
318
- for (const node of nodes) {
319
- // Convert label to string for search based on active language
320
- const labelText =
321
- typeof node.label === 'string' ?
322
- node.label
323
- : (node.label as any)?.[currentLang] || (node.label as any)?.tr || (node.label as any)?.en || '';
324
-
325
- const matches = labelText.toLocaleLowerCase(currentLang).includes(searchTerm);
326
- let filteredChildren: MenuNode[] = [];
327
-
328
- if (node.children) {
329
- filteredChildren = this.filterNodes(node.children, searchTerm);
330
- }
331
-
332
- if (matches || filteredChildren.length > 0) {
333
- filtered.push({
334
- ...node,
335
- children: filteredChildren.length > 0 ? filteredChildren : node.children,
336
- expanded: filteredChildren.length > 0
337
- });
338
- }
339
- }
340
-
341
- return filtered;
342
- }
343
- }
1
+ import { NgClass, NgTemplateOutlet } from '@angular/common';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { Component, OnDestroy, OnInit, Signal, signal } from '@angular/core';
4
+ import { toSignal } from '@angular/core/rxjs-interop';
5
+ import { FormsModule } from '@angular/forms';
6
+ import { NavigationEnd, Router, RouterLink } from '@angular/router';
7
+
8
+ import { InputTextModule } from 'primeng/inputtext';
9
+ import { ScrollPanelModule } from 'primeng/scrollpanel';
10
+ import { TooltipModule } from 'primeng/tooltip';
11
+
12
+ import { TranslocoModule, TranslocoService } from '@ngneat/transloco';
13
+ import { Subscription, filter } from 'rxjs';
14
+
15
+ import { bridge } from 'aril/boot/bridge';
16
+ import { MenuItemAction, PluginMenuItem } from 'aril/boot/config/apps';
17
+ import { TranslateJsonPipe } from 'aril/util/pipes';
18
+
19
+ import { LayoutService } from '../../service/app.layout.service';
20
+ import { AppMenuService } from '../../service/app.menu.service';
21
+
22
+ interface MenuNode {
23
+ key: string;
24
+ label: any;
25
+ icon?: string;
26
+ routerLink?: string;
27
+ action?: MenuItemAction;
28
+ children?: MenuNode[];
29
+ expanded: boolean;
30
+ actionLoading?: boolean;
31
+ }
32
+
33
+ @Component({
34
+ standalone: true,
35
+ selector: 'app-static-sidebar',
36
+ imports: [
37
+ RouterLink,
38
+ NgClass,
39
+ NgTemplateOutlet,
40
+ ScrollPanelModule,
41
+ TooltipModule,
42
+ FormsModule,
43
+ TranslocoModule,
44
+ InputTextModule
45
+ ],
46
+ templateUrl: './static-sidebar.component.html',
47
+ styleUrl: './static-sidebar.component.scss',
48
+ providers: [TranslateJsonPipe]
49
+ })
50
+ export class StaticSidebarComponent implements OnInit, OnDestroy {
51
+ activeLang: Signal<string>;
52
+ menuNodes = signal<MenuNode[]>([]);
53
+ filteredNodes = signal<MenuNode[]>([]);
54
+ searchTerm = signal<string>('');
55
+
56
+ private routerSubscription: Subscription | null = null;
57
+ private actionSubscription: Subscription | null = null;
58
+
59
+ private readonly MAX_LENGTH = { level0: 25, level1: 20, level2: 16, level3: 13 };
60
+
61
+ constructor(
62
+ private readonly menuService: AppMenuService,
63
+ private readonly router: Router,
64
+ private readonly layoutService: LayoutService,
65
+ private readonly translateJsonPipe: TranslateJsonPipe,
66
+ private readonly translocoService: TranslocoService,
67
+ private readonly http: HttpClient
68
+ ) {
69
+ this.activeLang = toSignal(this.translocoService.langChanges$, { initialValue: 'tr' });
70
+ }
71
+
72
+ get isCollapsed(): boolean {
73
+ return this.layoutService.isStaticSidebarCollapsed();
74
+ }
75
+
76
+ get topLevelNodes(): MenuNode[] {
77
+ return this.menuNodes();
78
+ }
79
+
80
+ ngOnInit() {
81
+ this.buildMenuTree();
82
+ this.routerSubscription = this.router.events
83
+ .pipe(filter((event) => event instanceof NavigationEnd))
84
+ .subscribe(() => this.buildMenuTree());
85
+ }
86
+
87
+ ngOnDestroy() {
88
+ this.routerSubscription?.unsubscribe();
89
+ this.actionSubscription?.unsubscribe();
90
+ }
91
+
92
+ isTextTruncated(label: any, lang: string | null, level = 0): boolean {
93
+ if (!label || !lang || !label[lang]) return false;
94
+ const text = label[lang];
95
+ const len = text.length;
96
+ const limits = [this.MAX_LENGTH.level0, this.MAX_LENGTH.level1, this.MAX_LENGTH.level2, this.MAX_LENGTH.level3];
97
+ return len > limits[Math.min(level, 3)];
98
+ }
99
+
100
+ isMobile(): boolean {
101
+ return this.layoutService.isMobile();
102
+ }
103
+
104
+ buildMenuTree() {
105
+ const menuItems = this.getMenuItems();
106
+ const nodes = this.convertToMenuNodes(menuItems);
107
+ this.menuNodes.set(nodes);
108
+ this.filteredNodes.set([...nodes]);
109
+ this.expandActiveMenu();
110
+ }
111
+
112
+ private expandActiveMenu() {
113
+ const nodes = this.menuNodes();
114
+ this.findAndExpandActiveNode(nodes);
115
+ this.filteredNodes.set([...this.filteredNodes()]);
116
+ }
117
+
118
+ private findAndExpandActiveNode(nodes: MenuNode[]): MenuNode | null {
119
+ for (const node of nodes) {
120
+ if (this.isActiveRouteForNode(node)) {
121
+ return node;
122
+ }
123
+
124
+ if (node.children && node.children.length > 0) {
125
+ const activeChild = this.findAndExpandActiveNode(node.children);
126
+ if (activeChild) {
127
+ // we find active child and then opened its parent nodes
128
+ node.expanded = true;
129
+ return activeChild;
130
+ }
131
+ }
132
+ }
133
+ return null;
134
+ }
135
+
136
+ convertToMenuNodes(items: PluginMenuItem[], parentKey = ''): MenuNode[] {
137
+ return items
138
+ .filter((item) => !item.separator)
139
+ .map((item, index) => {
140
+ const key = parentKey ? `${parentKey}-${index}` : `${index}`;
141
+ const node: MenuNode = {
142
+ key,
143
+ label: item.label,
144
+ icon: item.icon,
145
+ routerLink: item.action ? undefined : item.routerLink,
146
+ action: item.action,
147
+ expanded: false
148
+ };
149
+ if (item.items && item.items.length > 0) {
150
+ node.children = this.convertToMenuNodes(item.items, key);
151
+ }
152
+ return node;
153
+ });
154
+ }
155
+
156
+ getMenuItems(): PluginMenuItem[] {
157
+ return bridge.isHostMode() ? bridge.hostMenuItems() : this.menuService.menuItems();
158
+ }
159
+
160
+ getLocalText(text: any): string {
161
+ return this.translateJsonPipe.transform(text);
162
+ }
163
+
164
+ isActiveRouteForNode(node: MenuNode): boolean {
165
+ if (!node.routerLink) return false;
166
+ const currentUrl = this.router.url;
167
+ const hashUrl = currentUrl.indexOf('#') > -1 ? currentUrl.split('#')[1] : currentUrl;
168
+ if (hashUrl === node.routerLink || hashUrl === '/' + node.routerLink) return true;
169
+ return (
170
+ node.routerLink !== '/' &&
171
+ (hashUrl.startsWith(node.routerLink + '/') || hashUrl.startsWith('/' + node.routerLink + '/'))
172
+ );
173
+ }
174
+
175
+ // use on collapsed mode
176
+ isNodeOrChildActive(node: MenuNode): boolean {
177
+ if (this.isActiveRouteForNode(node)) {
178
+ return true;
179
+ }
180
+ if (node.children && node.children.length > 0) {
181
+ return node.children.some((child) => this.isNodeOrChildActive(child));
182
+ }
183
+
184
+ return false;
185
+ }
186
+
187
+ isTopLevelNodeActive(node: MenuNode): boolean {
188
+ return this.isNodeOrChildActive(node);
189
+ }
190
+
191
+ isChildNodeActive(node: MenuNode): boolean {
192
+ return this.isActiveRouteForNode(node);
193
+ }
194
+
195
+ toggleNode(node: MenuNode, level = 0) {
196
+ const wasExpanded = node.expanded;
197
+ if (level === 0) {
198
+ // Diğer ana menüleri kapat
199
+ this.closeOtherTopLevelNodes(node);
200
+ }
201
+ node.expanded = !wasExpanded;
202
+
203
+ this.filteredNodes.set([...this.filteredNodes()]);
204
+ }
205
+
206
+ private closeOtherTopLevelNodes(exceptNode: MenuNode) {
207
+ const nodes = this.menuNodes();
208
+ nodes.forEach((node) => {
209
+ if (node !== exceptNode) {
210
+ node.expanded = false;
211
+ this.closeAllChildNodes(node);
212
+ }
213
+ });
214
+ }
215
+
216
+ private closeAllChildNodes(node: MenuNode) {
217
+ if (node.children) {
218
+ node.children.forEach((child) => {
219
+ child.expanded = false;
220
+ this.closeAllChildNodes(child);
221
+ });
222
+ }
223
+ }
224
+
225
+ onMenuItemClick() {
226
+ if (this.isMobile()) {
227
+ this.layoutService.closeMobileMenu();
228
+ }
229
+
230
+ this.searchTerm.set('');
231
+ this.filteredNodes.set(this.menuNodes() || []);
232
+ }
233
+
234
+ onActionItemClick(node: MenuNode, event: Event) {
235
+ event.preventDefault();
236
+ event.stopPropagation();
237
+
238
+ if (!node.action || node.actionLoading) return;
239
+
240
+ // Cancel any previous action request
241
+ this.actionSubscription?.unsubscribe();
242
+
243
+ node.actionLoading = true;
244
+
245
+ const request$ =
246
+ node.action.method === 'GET' ?
247
+ this.http.get(node.action.url)
248
+ : this.http.post(node.action.url, node.action.body ?? {});
249
+
250
+ this.actionSubscription = request$.subscribe({
251
+ next: (response: any) => {
252
+ node.actionLoading = false;
253
+ const route = this.buildSuccessRoute(node.action!, response);
254
+ this.router.navigate([route]);
255
+ this.onMenuItemClick();
256
+ },
257
+ error: () => {
258
+ node.actionLoading = false;
259
+ }
260
+ });
261
+ }
262
+
263
+ private buildSuccessRoute(action: MenuItemAction, response: any): string {
264
+ if (!action.successRouteResponseKey) return action.successRoute;
265
+
266
+ const value = this.getValueByPath(response, action.successRouteResponseKey);
267
+ if (value === undefined || value === null) return action.successRoute;
268
+
269
+ return `${action.successRoute}/${value}`;
270
+ }
271
+
272
+ private getValueByPath(obj: any, path: string): any {
273
+ if (!obj || !path) return undefined;
274
+
275
+ return path.split('.').reduce((current, key) => {
276
+ if (current === undefined || current === null) return undefined;
277
+
278
+ // Handle array access like 'result[0]'
279
+ const arrayMatch = key.match(/^(.+?)\[(\d+)\]$/);
280
+ if (arrayMatch) {
281
+ const arrayKey = arrayMatch[1];
282
+ const index = parseInt(arrayMatch[2], 10);
283
+ return current[arrayKey]?.[index];
284
+ }
285
+
286
+ return current[key];
287
+ }, obj);
288
+ }
289
+
290
+ onCollapsedItemClick(node: MenuNode) {
291
+ if (this.isCollapsed) {
292
+ this.layoutService.onMenuToggle();
293
+ }
294
+ this.closeOtherTopLevelNodes(node);
295
+ if (node.children && node.children.length > 0) {
296
+ node.expanded = true;
297
+ }
298
+ this.filteredNodes.set([...this.filteredNodes()]);
299
+ if (node.routerLink) {
300
+ this.onMenuItemClick();
301
+ }
302
+ }
303
+
304
+ onSearchChange(): void {
305
+ const currentLang = this.translocoService.getActiveLang();
306
+ const currentSearchTerm = this.searchTerm()?.toLocaleLowerCase(currentLang)?.trim();
307
+ if (!currentSearchTerm) {
308
+ this.filteredNodes.set(this.menuNodes() || []);
309
+ return;
310
+ }
311
+ this.filteredNodes.set(this.filterNodes(this.menuNodes(), currentSearchTerm));
312
+ }
313
+
314
+ private filterNodes(nodes: MenuNode[], searchTerm: string): MenuNode[] {
315
+ const filtered: MenuNode[] = [];
316
+ const currentLang = this.translocoService.getActiveLang();
317
+
318
+ for (const node of nodes) {
319
+ // Convert label to string for search based on active language
320
+ const labelText =
321
+ typeof node.label === 'string' ?
322
+ node.label
323
+ : (node.label as any)?.[currentLang] || (node.label as any)?.tr || (node.label as any)?.en || '';
324
+
325
+ const matches = labelText.toLocaleLowerCase(currentLang).includes(searchTerm);
326
+ let filteredChildren: MenuNode[] = [];
327
+
328
+ if (node.children) {
329
+ filteredChildren = this.filterNodes(node.children, searchTerm);
330
+ }
331
+
332
+ if (matches || filteredChildren.length > 0) {
333
+ filtered.push({
334
+ ...node,
335
+ children: filteredChildren.length > 0 ? filteredChildren : node.children,
336
+ expanded: filteredChildren.length > 0
337
+ });
338
+ }
339
+ }
340
+
341
+ return filtered;
342
+ }
343
+ }