@acorex/platform 19.3.0-next.1 → 19.3.0-next.3

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 (344) hide show
  1. package/auth/lib/application/application.types.d.ts +1 -1
  2. package/auth/lib/tenant/tenant.types.d.ts +1 -1
  3. package/common/index.d.ts +1 -0
  4. package/common/lib/app/application.types.d.ts +1 -1
  5. package/common/lib/app/index.d.ts +1 -0
  6. package/common/lib/configs/app.config.d.ts +1 -1
  7. package/common/lib/home-page/home-page-settings.key.d.ts +3 -0
  8. package/common/lib/home-page/home-page-settings.provider.d.ts +12 -0
  9. package/common/lib/home-page/home-page.module.d.ts +6 -0
  10. package/common/lib/home-page/home-page.routes.d.ts +2 -0
  11. package/common/lib/home-page/home-page.service.d.ts +24 -0
  12. package/common/lib/home-page/home-page.types.d.ts +9 -0
  13. package/common/lib/home-page/index.d.ts +4 -0
  14. package/common/lib/layout/logo/index.d.ts +0 -1
  15. package/common/lib/settings/setting.builder.d.ts +1 -1
  16. package/common/lib/settings/settings.types.d.ts +1 -1
  17. package/common/lib/workflows/navigate.workflow.d.ts +1 -1
  18. package/core/lib/data/data-generator.d.ts +2 -1
  19. package/core/lib/directives/grid-layout.directive.d.ts +15 -0
  20. package/core/lib/directives/index.d.ts +1 -0
  21. package/core/lib/expression-evaluator/expression-evaluator.service.d.ts +1 -2
  22. package/core/lib/types/core.types.d.ts +1 -0
  23. package/core/lib/types/index.d.ts +5 -3
  24. package/core/lib/types/interactive.types.d.ts +1 -0
  25. package/core/lib/types/layout.types.d.ts +27 -0
  26. package/core/lib/types/validation.types.d.ts +30 -1
  27. package/core/lib/utils/object-util.d.ts +1 -0
  28. package/fesm2022/acorex-platform-auth.mjs +0 -1
  29. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  30. package/fesm2022/acorex-platform-common.mjs +1559 -1396
  31. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  32. package/fesm2022/acorex-platform-core.mjs +247 -121
  33. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  34. package/fesm2022/acorex-platform-layout-builder.mjs +438 -401
  35. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  36. package/fesm2022/acorex-platform-layout-designer.mjs +10 -10
  37. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  38. package/fesm2022/acorex-platform-layout-entity.mjs +107 -90
  39. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  40. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-3gmbdeJ_.mjs → acorex-platform-themes-default-entity-master-create-view.component-CnqS3y7P.mjs} +5 -5
  41. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-3gmbdeJ_.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-CnqS3y7P.mjs.map} +1 -1
  42. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CuyWAi6X.mjs +862 -0
  43. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CuyWAi6X.mjs.map +1 -0
  44. package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-8DdICjNs.mjs → acorex-platform-themes-default-entity-master-modify-view.component-DzHZdi2R.mjs} +4 -4
  45. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DzHZdi2R.mjs.map +1 -0
  46. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-DadBeY1I.mjs → acorex-platform-themes-default-entity-master-single-view.component-BBJ7Aapd.mjs} +15 -8
  47. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BBJ7Aapd.mjs.map +1 -0
  48. package/fesm2022/{acorex-platform-themes-default-search-popup.component-BADEuoeJ.mjs → acorex-platform-themes-default-search-popup.component-ChJiJ12h.mjs} +8 -8
  49. package/fesm2022/{acorex-platform-themes-default-search-popup.component-BADEuoeJ.mjs.map → acorex-platform-themes-default-search-popup.component-ChJiJ12h.mjs.map} +1 -1
  50. package/fesm2022/{acorex-platform-themes-default-setting-page.component-Cj73brIK.mjs → acorex-platform-themes-default-setting-page.component-BxGzaKws.mjs} +4 -4
  51. package/fesm2022/{acorex-platform-themes-default-setting-page.component-Cj73brIK.mjs.map → acorex-platform-themes-default-setting-page.component-BxGzaKws.mjs.map} +1 -1
  52. package/fesm2022/{acorex-platform-themes-default-setting-view.component-rrAq6hg2.mjs → acorex-platform-themes-default-setting-view.component-CjmlI9Jb.mjs} +5 -5
  53. package/fesm2022/{acorex-platform-themes-default-setting-view.component-rrAq6hg2.mjs.map → acorex-platform-themes-default-setting-view.component-CjmlI9Jb.mjs.map} +1 -1
  54. package/fesm2022/acorex-platform-themes-default.mjs +295 -65
  55. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  56. package/fesm2022/{acorex-platform-themes-shared-setting.provider-CXiRmniv.mjs → acorex-platform-themes-shared-settings.provider-CXiRmniv.mjs} +1 -1
  57. package/fesm2022/acorex-platform-themes-shared-settings.provider-CXiRmniv.mjs.map +1 -0
  58. package/fesm2022/acorex-platform-themes-shared.mjs +10 -8
  59. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  60. package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-DVhi_mBH.mjs → acorex-platform-widgets-button-widget-designer.component-DSO0iNB_.mjs} +3 -3
  61. package/fesm2022/acorex-platform-widgets-button-widget-designer.component-DSO0iNB_.mjs.map +1 -0
  62. package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-CrdfTgeq.mjs → acorex-platform-widgets-checkbox-widget-designer.component-DDIkt5nB.mjs} +3 -3
  63. package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-DDIkt5nB.mjs.map +1 -0
  64. package/fesm2022/{acorex-platform-widgets-checkbox-widget-view.component-DfSoF52n.mjs → acorex-platform-widgets-checkbox-widget-view.component-CqHkVcv-.mjs} +3 -3
  65. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-CqHkVcv-.mjs.map +1 -0
  66. package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-BM1G-WaN.mjs → acorex-platform-widgets-color-box-widget-designer.component-l_Of5uKT.mjs} +3 -3
  67. package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-l_Of5uKT.mjs.map +1 -0
  68. package/fesm2022/{acorex-platform-widgets-contact-widget-filter.component-B1cKV-TM.mjs → acorex-platform-widgets-contact-widget-filter.component-KvKD5byB.mjs} +3 -3
  69. package/fesm2022/acorex-platform-widgets-contact-widget-filter.component-KvKD5byB.mjs.map +1 -0
  70. package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-DtwyOnuO.mjs → acorex-platform-widgets-page-widget-designer.component-BIvAjvW3.mjs} +5 -5
  71. package/fesm2022/acorex-platform-widgets-page-widget-designer.component-BIvAjvW3.mjs.map +1 -0
  72. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-u2RCVYRB.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-CybYV1Kf.mjs} +2 -2
  73. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-u2RCVYRB.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-CybYV1Kf.mjs.map} +1 -1
  74. package/fesm2022/{acorex-platform-widgets-text-block-widget-designer.component-C3H0Zldz.mjs → acorex-platform-widgets-text-block-widget-designer.component-DPy2UR_J.mjs} +3 -3
  75. package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-DPy2UR_J.mjs.map +1 -0
  76. package/fesm2022/acorex-platform-widgets.mjs +1832 -1490
  77. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  78. package/layout/builder/lib/builder/index.d.ts +2 -0
  79. package/layout/builder/lib/builder/view.types.d.ts +94 -0
  80. package/layout/builder/lib/builder/widget-base.component.d.ts +112 -0
  81. package/layout/builder/lib/builder/widget-map.d.ts +3 -0
  82. package/layout/builder/lib/builder/widget-renderer.directive.d.ts +12 -3
  83. package/layout/builder/lib/builder/widget.types.d.ts +9 -101
  84. package/layout/designer/lib/designer/shared/designer.service.d.ts +2 -2
  85. package/layout/designer/lib/designer/shared/widget-designer-renderer.directive.d.ts +2 -2
  86. package/layout/entity/lib/entity-master-list.viewmodel.d.ts +4 -2
  87. package/layout/entity/lib/entity-master-single.viewmodel.d.ts +4 -2
  88. package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +6 -5
  89. package/layout/entity/lib/widgets/lookup-widget/lookup-widget-view.component.d.ts +2 -2
  90. package/layout/entity/lib/widgets/lookup-widget/lookup-widget.config.d.ts +7 -0
  91. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-column.component.d.ts +2 -2
  92. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-edit.component.d.ts +2 -2
  93. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-filter.component.d.ts +2 -2
  94. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-print.component.d.ts +2 -2
  95. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-view.component.d.ts +2 -2
  96. package/layout/entity/lib/widgets/widget-selector/widget-selector-widget-edit.component.d.ts +2 -2
  97. package/layout/entity/lib/widgets/widget-selector/widget-selector-widget-view.component.d.ts +2 -2
  98. package/package.json +1 -1
  99. package/themes/default/index.d.ts +1 -0
  100. package/themes/default/lib/layouts/base/base-page.component.d.ts +9 -4
  101. package/themes/default/lib/layouts/base/base-page.types.d.ts +3 -2
  102. package/themes/default/lib/layouts/base/page-layout/page-layout.component.d.ts +9 -2
  103. package/themes/default/lib/layouts/entity-layouts/entity-category/entity-category.component.d.ts +10 -4
  104. package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +3 -1
  105. package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +2 -1
  106. package/themes/default/lib/layouts/entity-layouts/entity-master-toolbar-view/entity-master-toolbar-view.component.d.ts +62 -0
  107. package/themes/default/lib/layouts/entity-layouts/entity-master-toolbar-view/views/entity-view-toolbar.component.d.ts +4 -1
  108. package/themes/default/lib/layouts/root-layout/components/header/header.component.d.ts +3 -3
  109. package/themes/default/lib/layouts/root-layout/horizontal/horizontal-layout.component.d.ts +3 -3
  110. package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +4 -1
  111. package/themes/default/lib/layouts/root-layout/vertical/vertical-layout.component.d.ts +3 -3
  112. package/themes/default/lib/layouts/view-layouts/index.d.ts +1 -0
  113. package/themes/default/lib/layouts/view-layouts/layout-detail-view/layout-detail-view.component.d.ts +19 -0
  114. package/themes/shared/index.d.ts +1 -1
  115. package/themes/shared/lib/components/layout-elements/layout-side.component.d.ts +1 -1
  116. package/themes/shared/lib/widgets/font-size-chooser/font-size-chooser-widget.component.d.ts +2 -2
  117. package/themes/shared/lib/widgets/font-style-chooser/font-style-chooser-widget.component.d.ts +2 -2
  118. package/themes/shared/lib/widgets/menu-orientation-chooser/menu-orientation-chooser-widget.component.d.ts +2 -2
  119. package/themes/shared/lib/widgets/theme-mode-chooser/theme-mode-chooser-widget.component.d.ts +2 -2
  120. package/themes/shared/lib/widgets/theme-palette-chooser/theme-palette-chooser-widget.component.d.ts +2 -2
  121. package/widgets/lib/properties/layout.props.d.ts +0 -6
  122. package/widgets/lib/widgets/actions/button/button-widget-designer.component.d.ts +2 -2
  123. package/widgets/lib/widgets/actions/button/button-widget-view.component.d.ts +2 -2
  124. package/widgets/lib/widgets/advance/avatar/avatar-widget-designer.component.d.ts +2 -2
  125. package/widgets/lib/widgets/advance/avatar/avatar-widget-edit.component.d.ts +2 -2
  126. package/widgets/lib/widgets/advance/avatar/avatar-widget-print.component.d.ts +2 -2
  127. package/widgets/lib/widgets/advance/avatar/avatar-widget-view.component.d.ts +2 -2
  128. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-designer.component.d.ts +2 -2
  129. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-edit.component.d.ts +2 -2
  130. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-filter.component.d.ts +2 -2
  131. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-print.component.d.ts +2 -2
  132. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-view.component.d.ts +2 -2
  133. package/widgets/lib/widgets/advance/file/file-box-widget-column.component.d.ts +2 -2
  134. package/widgets/lib/widgets/advance/file/file-box-widget-edit.component.d.ts +2 -2
  135. package/widgets/lib/widgets/advance/file/file-box-widget-filter.component.d.ts +2 -2
  136. package/widgets/lib/widgets/advance/file/file-box-widget-print.component.d.ts +2 -2
  137. package/widgets/lib/widgets/advance/file/file-box-widget-view.component.d.ts +2 -2
  138. package/widgets/lib/widgets/advance/gallery/gallery-widget-edit.component.d.ts +2 -2
  139. package/widgets/lib/widgets/advance/gallery/gallery-widget-print.component.d.ts +2 -2
  140. package/widgets/lib/widgets/advance/gallery/gallery-widget-view.component.d.ts +2 -2
  141. package/widgets/lib/widgets/advance/map/map-box-widget-edit.component.d.ts +2 -2
  142. package/widgets/lib/widgets/advance/map/map-box-widget-view.component.d.ts +2 -2
  143. package/widgets/lib/widgets/advance/qrcode/qrcode-widget-view.component.d.ts +2 -2
  144. package/widgets/lib/widgets/advance/signature/signature-pad-widget-column.component.d.ts +2 -2
  145. package/widgets/lib/widgets/advance/signature/signature-pad-widget-edit.component.d.ts +2 -2
  146. package/widgets/lib/widgets/advance/signature/signature-pad-widget-filter.component.d.ts +2 -2
  147. package/widgets/lib/widgets/advance/signature/signature-pad-widget-print.component.d.ts +2 -2
  148. package/widgets/lib/widgets/advance/signature/signature-pad-widget-view.component.d.ts +2 -2
  149. package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget.component.d.ts +13 -24
  150. package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +2 -7
  151. package/widgets/lib/widgets/charts/chart.type.d.ts +1 -5
  152. package/widgets/lib/widgets/charts/clock-calendar/clock-calendar-widget.component.d.ts +2 -2
  153. package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget.component.d.ts +25 -21
  154. package/widgets/lib/widgets/charts/donut-chart/donut-chart.type.d.ts +52 -23
  155. package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget.component.d.ts +21 -7
  156. package/widgets/lib/widgets/charts/gauge-chart/gauge-chart.type.d.ts +1 -8
  157. package/widgets/lib/widgets/charts/notification/index.d.ts +3 -0
  158. package/widgets/lib/widgets/charts/notification/notification-widget.component.d.ts +54 -0
  159. package/widgets/lib/widgets/charts/notification/notification-widget.config.d.ts +10 -0
  160. package/widgets/lib/widgets/charts/notification/notification.type.d.ts +47 -0
  161. package/widgets/lib/widgets/charts/shared/chart-base.component.d.ts +4 -4
  162. package/widgets/lib/widgets/charts/shared/components/chart-tooltip/chart-tooltip.component.d.ts +28 -0
  163. package/widgets/lib/widgets/charts/shared/components/chart-tooltip/index.d.ts +1 -0
  164. package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget.component.d.ts +10 -6
  165. package/widgets/lib/widgets/charts/tasklist/index.d.ts +3 -0
  166. package/widgets/lib/widgets/charts/tasklist/tasklist-widget.component.d.ts +34 -0
  167. package/widgets/lib/widgets/charts/tasklist/tasklist-widget.config.d.ts +7 -0
  168. package/widgets/lib/widgets/charts/tasklist/tasklist.type.d.ts +36 -0
  169. package/widgets/lib/widgets/charts/weather/weather-widget.component.d.ts +2 -2
  170. package/widgets/lib/widgets/editors/checkbox/checkbox-widget-designer.component.d.ts +2 -2
  171. package/widgets/lib/widgets/editors/checkbox/checkbox-widget-edit.component.d.ts +2 -2
  172. package/widgets/lib/widgets/editors/checkbox/checkbox-widget-view.component.d.ts +2 -2
  173. package/widgets/lib/widgets/editors/checkbox/checkbox-widget.config.d.ts +7 -0
  174. package/widgets/lib/widgets/editors/color/color-box-widget-designer.component.d.ts +2 -2
  175. package/widgets/lib/widgets/editors/color/color-box-widget-edit.component.d.ts +2 -2
  176. package/widgets/lib/widgets/editors/color/color-box-widget-filter.component.d.ts +2 -2
  177. package/widgets/lib/widgets/editors/color/color-box-widget-print.component.d.ts +2 -2
  178. package/widgets/lib/widgets/editors/color/color-box-widget-view.component.d.ts +2 -2
  179. package/widgets/lib/widgets/editors/color/color-box-widget.config.d.ts +7 -0
  180. package/widgets/lib/widgets/editors/contact/contact-widget-edit.component.d.ts +2 -2
  181. package/widgets/lib/widgets/editors/contact/contact-widget-filter.component.d.ts +2 -2
  182. package/widgets/lib/widgets/editors/contact/contact-widget-print.component.d.ts +2 -2
  183. package/widgets/lib/widgets/editors/contact/contact-widget-view.component.d.ts +2 -2
  184. package/widgets/lib/widgets/editors/contact/contact-widget.config.d.ts +9 -0
  185. package/widgets/lib/widgets/editors/date-time/date-time-box-widget-edit.component.d.ts +2 -2
  186. package/widgets/lib/widgets/editors/date-time/date-time-box-widget-filter.component.d.ts +2 -2
  187. package/widgets/lib/widgets/editors/date-time/date-time-box-widget-print.component.d.ts +2 -2
  188. package/widgets/lib/widgets/editors/date-time/date-time-box-widget-view.component.d.ts +2 -2
  189. package/widgets/lib/widgets/editors/date-time/date-time-box-widget.config.d.ts +8 -0
  190. package/widgets/lib/widgets/editors/email/email-box-widget-edit.component.d.ts +2 -2
  191. package/widgets/lib/widgets/editors/email/email-box-widget-filter.component.d.ts +2 -2
  192. package/widgets/lib/widgets/editors/email/email-box-widget-print.component.d.ts +2 -2
  193. package/widgets/lib/widgets/editors/email/email-box-widget-view.component.d.ts +2 -2
  194. package/widgets/lib/widgets/editors/email/email-box-widget.config.d.ts +7 -0
  195. package/widgets/lib/widgets/editors/large-text/large-text-widget-edit.component.d.ts +2 -2
  196. package/widgets/lib/widgets/editors/large-text/large-text-widget-filter.component.d.ts +2 -2
  197. package/widgets/lib/widgets/editors/large-text/large-text-widget-print.component.d.ts +2 -2
  198. package/widgets/lib/widgets/editors/large-text/large-text-widget-view.component.d.ts +2 -2
  199. package/widgets/lib/widgets/editors/large-text/large-text-widget.config.d.ts +5 -0
  200. package/widgets/lib/widgets/editors/link/link-widget-edit.component.d.ts +2 -2
  201. package/widgets/lib/widgets/editors/link/link-widget-filter.component.d.ts +2 -2
  202. package/widgets/lib/widgets/editors/link/link-widget-print.component.d.ts +2 -2
  203. package/widgets/lib/widgets/editors/link/link-widget-view.component.d.ts +2 -2
  204. package/widgets/lib/widgets/editors/link/link-widget.config.d.ts +6 -0
  205. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-edit.component.d.ts +2 -2
  206. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-filter.component.d.ts +2 -2
  207. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-print.component.d.ts +2 -2
  208. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-view.component.d.ts +2 -2
  209. package/widgets/lib/widgets/editors/meta-data/meta-data-widget.config.d.ts +2 -0
  210. package/widgets/lib/widgets/editors/number/number-box-widget-edit.component.d.ts +2 -2
  211. package/widgets/lib/widgets/editors/number/number-box-widget-filter.component.d.ts +2 -2
  212. package/widgets/lib/widgets/editors/number/number-box-widget-print.component.d.ts +2 -2
  213. package/widgets/lib/widgets/editors/number/number-box-widget-view.component.d.ts +2 -2
  214. package/widgets/lib/widgets/editors/number/number-box-widget.config.d.ts +10 -0
  215. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-edit.component.d.ts +2 -2
  216. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-filter.component.d.ts +2 -2
  217. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-print.component.d.ts +2 -2
  218. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-view.component.d.ts +2 -2
  219. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget.config.d.ts +10 -0
  220. package/widgets/lib/widgets/editors/password/password-box-widget-edit.component.d.ts +2 -2
  221. package/widgets/lib/widgets/editors/password/password-box-widget-filter.component.d.ts +2 -2
  222. package/widgets/lib/widgets/editors/password/password-box-widget-print.component.d.ts +2 -2
  223. package/widgets/lib/widgets/editors/password/password-box-widget-view.component.d.ts +2 -2
  224. package/widgets/lib/widgets/editors/password/password-box-widget.config.d.ts +7 -0
  225. package/widgets/lib/widgets/editors/phone/phone-box-widget-edit.component.d.ts +2 -2
  226. package/widgets/lib/widgets/editors/phone/phone-box-widget-filter.component.d.ts +2 -2
  227. package/widgets/lib/widgets/editors/phone/phone-box-widget-print.component.d.ts +2 -2
  228. package/widgets/lib/widgets/editors/phone/phone-box-widget-view.component.d.ts +2 -2
  229. package/widgets/lib/widgets/editors/phone/phone-box-widget.config.d.ts +4 -0
  230. package/widgets/lib/widgets/editors/rich-text/rich-text-widget-edit.component.d.ts +2 -2
  231. package/widgets/lib/widgets/editors/rich-text/rich-text-widget-filter.component.d.ts +2 -2
  232. package/widgets/lib/widgets/editors/rich-text/rich-text-widget-print.component.d.ts +2 -2
  233. package/widgets/lib/widgets/editors/rich-text/rich-text-widget-view.component.d.ts +2 -2
  234. package/widgets/lib/widgets/editors/rich-text/rich-text-widget.config.d.ts +5 -0
  235. package/widgets/lib/widgets/editors/select/select-box-widget-filter.component.d.ts +2 -2
  236. package/widgets/lib/widgets/editors/select/select-box-widget-print.component.d.ts +2 -2
  237. package/widgets/lib/widgets/editors/select/select-box-widget-view.component.d.ts +2 -2
  238. package/widgets/lib/widgets/editors/select/select-box-widget.config.d.ts +11 -0
  239. package/widgets/lib/widgets/editors/selection-list/selection-list-widget-filter.component.d.ts +2 -2
  240. package/widgets/lib/widgets/editors/selection-list/selection-list-widget-print.component.d.ts +2 -2
  241. package/widgets/lib/widgets/editors/selection-list/selection-list-widget-view.component.d.ts +2 -2
  242. package/widgets/lib/widgets/editors/selection-list/selection-list-widget.config.d.ts +8 -0
  243. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-column.component.d.ts +2 -2
  244. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-edit.component.d.ts +2 -2
  245. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-filter.component.d.ts +2 -2
  246. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-print.component.d.ts +2 -2
  247. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-view.component.d.ts +2 -2
  248. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget.config.d.ts +2 -0
  249. package/widgets/lib/widgets/editors/tabular-data/table-widget.config.d.ts +7 -0
  250. package/widgets/lib/widgets/editors/tabular-data/tabular-data-filter.component.d.ts +2 -2
  251. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-edit.component.d.ts +2 -2
  252. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-print.component.d.ts +2 -2
  253. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-view.component.d.ts +2 -2
  254. package/widgets/lib/widgets/editors/template-box/template-box-widget-column.component.d.ts +2 -2
  255. package/widgets/lib/widgets/editors/template-box/template-box-widget-edit.component.d.ts +2 -2
  256. package/widgets/lib/widgets/editors/template-box/template-box-widget-filter.component.d.ts +2 -2
  257. package/widgets/lib/widgets/editors/template-box/template-box-widget-print.component.d.ts +2 -2
  258. package/widgets/lib/widgets/editors/template-box/template-box-widget-view.component.d.ts +2 -2
  259. package/widgets/lib/widgets/editors/template-box/template-box-widget.config.d.ts +5 -0
  260. package/widgets/lib/widgets/editors/text/text-box-widget-edit.component.d.ts +2 -2
  261. package/widgets/lib/widgets/editors/text/text-box-widget-filter.component.d.ts +2 -2
  262. package/widgets/lib/widgets/editors/text/text-box-widget-print.component.d.ts +2 -2
  263. package/widgets/lib/widgets/editors/text/text-box-widget-view.component.d.ts +2 -2
  264. package/widgets/lib/widgets/editors/text/text-box-widget.config.d.ts +8 -0
  265. package/widgets/lib/widgets/editors/toggle/toggle-widget-edit.component.d.ts +2 -2
  266. package/widgets/lib/widgets/editors/toggle/toggle-widget-filter.component.d.ts +2 -2
  267. package/widgets/lib/widgets/editors/toggle/toggle-widget-print.component.d.ts +2 -2
  268. package/widgets/lib/widgets/editors/toggle/toggle-widget-view.component.d.ts +2 -2
  269. package/widgets/lib/widgets/editors/toggle/toggle-widget.config.d.ts +7 -0
  270. package/widgets/lib/widgets/filters/boolean-filter/boolean-filter-widget-edit.component.d.ts +2 -2
  271. package/widgets/lib/widgets/filters/date-time-filter/date-time-filter-widget-edit.component.d.ts +2 -2
  272. package/widgets/lib/widgets/filters/number-filter/number-filter-widget-edit.component.d.ts +2 -2
  273. package/widgets/lib/widgets/filters/string-filter/string-filter-widget-edit.component.d.ts +2 -2
  274. package/widgets/lib/widgets/index.d.ts +3 -0
  275. package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-designer.component.d.ts +2 -2
  276. package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-view.component.d.ts +2 -2
  277. package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget.config.d.ts +2 -0
  278. package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget-designer.component.d.ts +2 -2
  279. package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget-print.component.d.ts +2 -2
  280. package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget-view.component.d.ts +2 -2
  281. package/widgets/lib/widgets/layout/advanced-grid-item/advanced-grid-item-widget.config.d.ts +2 -0
  282. package/widgets/lib/widgets/layout/block/block-widget-designer.component.d.ts +2 -7
  283. package/widgets/lib/widgets/layout/block/block-widget-view.component.d.ts +4 -7
  284. package/widgets/lib/widgets/layout/block/block-widget.config.d.ts +17 -0
  285. package/widgets/lib/widgets/layout/document/document-widget.config.d.ts +2 -0
  286. package/widgets/lib/widgets/layout/form-field/form-field-widget-designer.component.d.ts +2 -2
  287. package/widgets/lib/widgets/layout/form-field/form-field-widget-view.component.d.ts +2 -2
  288. package/widgets/lib/widgets/layout/form-field/form-field-widget.config.d.ts +3 -0
  289. package/widgets/lib/widgets/layout/grid/grid-widget-designer.component.d.ts +2 -2
  290. package/widgets/lib/widgets/layout/grid/grid-widget-view.component.d.ts +2 -2
  291. package/widgets/lib/widgets/layout/grid/grid-widget.config.d.ts +3 -0
  292. package/widgets/lib/widgets/layout/grid-item/grid-item-widget-designer.component.d.ts +2 -2
  293. package/widgets/lib/widgets/layout/grid-item/grid-item-widget-print.component.d.ts +2 -2
  294. package/widgets/lib/widgets/layout/grid-item/grid-item-widget-view.component.d.ts +2 -2
  295. package/widgets/lib/widgets/layout/grid-item/grid-item-widget.config.d.ts +18 -0
  296. package/widgets/lib/widgets/layout/grid-row/grid-row-widget-designer.component.d.ts +2 -2
  297. package/widgets/lib/widgets/layout/grid-row/grid-row-widget-print.component.d.ts +2 -2
  298. package/widgets/lib/widgets/layout/grid-row/grid-row-widget-view.component.d.ts +2 -2
  299. package/widgets/lib/widgets/layout/grid-row/grid-row-widget.config.d.ts +4 -0
  300. package/widgets/lib/widgets/layout/page/page-widget-designer.component.d.ts +2 -2
  301. package/widgets/lib/widgets/layout/page/page-widget-view.component.d.ts +2 -2
  302. package/widgets/lib/widgets/layout/page/page-widget.config.d.ts +7 -0
  303. package/widgets/lib/widgets/layout/panel/index.d.ts +3 -0
  304. package/widgets/lib/widgets/layout/panel/panel-widget-designer.component.d.ts +15 -0
  305. package/widgets/lib/widgets/layout/panel/panel-widget-view.component.d.ts +15 -0
  306. package/widgets/lib/widgets/layout/panel/panel-widget.config.d.ts +7 -0
  307. package/widgets/lib/widgets/layout/repeater/repeater-widget-designer.component.d.ts +2 -2
  308. package/widgets/lib/widgets/layout/repeater/repeater-widget-edit.component.d.ts +2 -2
  309. package/widgets/lib/widgets/layout/repeater/repeater-widget-print.component.d.ts +2 -2
  310. package/widgets/lib/widgets/layout/repeater/repeater-widget-view.component.d.ts +2 -2
  311. package/widgets/lib/widgets/layout/repeater/repeater-widget.config.d.ts +5 -0
  312. package/widgets/lib/widgets/layout/text-block/text-block-widget-designer.component.d.ts +2 -2
  313. package/widgets/lib/widgets/layout/text-block/text-block-widget-view.component.d.ts +2 -2
  314. package/widgets/lib/widgets/layout/text-block/text-block-widget.config.d.ts +3 -0
  315. package/widgets/lib/widgets/property-editors/advanced-grid-options/advanced-grid-options-widget-editor.component.d.ts +2 -2
  316. package/widgets/lib/widgets/property-editors/border/border-widget-editor.component.d.ts +2 -2
  317. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +7 -6
  318. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget.type.d.ts +3 -9
  319. package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget-editor.component.d.ts +2 -2
  320. package/widgets/lib/widgets/property-editors/spacing/spacing-widget-editor.component.d.ts +2 -2
  321. package/widgets/lib/widgets/validations/between-validation/between-validation-widget-edit.component.d.ts +2 -2
  322. package/widgets/lib/widgets/validations/callback-validation/callback-validation-widget-edit.component.d.ts +2 -2
  323. package/widgets/lib/widgets/validations/equal-validation/equal-validation-widget-edit.component.d.ts +2 -2
  324. package/widgets/lib/widgets/validations/greater-than-validation/greater-than-validation-widget-edit.component.d.ts +2 -2
  325. package/widgets/lib/widgets/validations/less-than-validation/less-than-validation-widget-edit.component.d.ts +2 -2
  326. package/widgets/lib/widgets/validations/max-length-validation/max-length-validation-widget-edit.component.d.ts +2 -2
  327. package/widgets/lib/widgets/validations/min-length-validation/min-length-validation-widget-edit.component.d.ts +2 -2
  328. package/widgets/lib/widgets/validations/regular-expression-validation/regular-expression-validation-widget-edit.component.d.ts +2 -2
  329. package/widgets/lib/widgets/validations/required-validation/required-validation-widget-edit.component.d.ts +2 -2
  330. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-nvrF63CN.mjs +0 -764
  331. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-nvrF63CN.mjs.map +0 -1
  332. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-8DdICjNs.mjs.map +0 -1
  333. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DadBeY1I.mjs.map +0 -1
  334. package/fesm2022/acorex-platform-themes-shared-setting.provider-CXiRmniv.mjs.map +0 -1
  335. package/fesm2022/acorex-platform-widgets-button-widget-designer.component-DVhi_mBH.mjs.map +0 -1
  336. package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-CrdfTgeq.mjs.map +0 -1
  337. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-DfSoF52n.mjs.map +0 -1
  338. package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-BM1G-WaN.mjs.map +0 -1
  339. package/fesm2022/acorex-platform-widgets-contact-widget-filter.component-B1cKV-TM.mjs.map +0 -1
  340. package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DtwyOnuO.mjs.map +0 -1
  341. package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-C3H0Zldz.mjs.map +0 -1
  342. /package/{common/lib/layout/logo → core/lib/types}/logo.types.d.ts +0 -0
  343. /package/themes/shared/lib/{setting.keys.d.ts → settings.keys.d.ts} +0 -0
  344. /package/themes/shared/lib/{setting.provider.d.ts → settings.provider.d.ts} +0 -0
@@ -1,12 +1,17 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, provideAppInitializer, inject, InjectionToken, Injector, ErrorHandler, Input, Directive, EventEmitter, Output, runInInjectionContext, Optional, Inject, NgModule, Component, computed, ViewEncapsulation, signal, model, linkedSignal, afterNextRender } from '@angular/core';
3
- import { kebabCase, sortBy, omit, merge, cloneDeep, get } from 'lodash-es';
2
+ import { Injectable, provideAppInitializer, inject, InjectionToken, Injector, makeEnvironmentProviders, NgModule, ErrorHandler, Input, Directive, EventEmitter, Output, runInInjectionContext, Optional, Inject, Component, computed, ViewEncapsulation, signal, model, linkedSignal, afterNextRender } from '@angular/core';
3
+ import { kebabCase, merge, cloneDeep, get, sortBy, omit } from 'lodash-es';
4
+ import { ROUTES, Router, RouterModule } from '@angular/router';
5
+ import { AXPSessionService } from '@acorex/platform/auth';
6
+ import { Subject, merge as merge$1 } from 'rxjs';
7
+ import { AXPPlatformScope, AXPBroadcastEventService, objectKeyValueTransforms, AXPComponentLogoConfig, AXPFontIconLogoConfig, AXPImageUrlLogoConfig, AXPTextLogoConfig } from '@acorex/platform/core';
8
+ import { AXTranslationService } from '@acorex/core/translation';
9
+ import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
4
10
  import { AXPopupModule, AXPopupService } from '@acorex/components/popup';
5
11
  import { AXToastService, AXToastModule } from '@acorex/components/toast';
6
12
  import { AXDateTimeModule } from '@acorex/core/date-time';
7
13
  import * as i3 from '@acorex/platform/workflow';
8
14
  import { AXPWorkflowService, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowError, AXPWorkflowModule } from '@acorex/platform/workflow';
9
- import { Router, RouterModule } from '@angular/router';
10
15
  import * as i4 from '@acorex/components/decorators';
11
16
  import { AXDecoratorModule } from '@acorex/components/decorators';
12
17
  import * as i2 from '@acorex/components/image';
@@ -14,10 +19,7 @@ import { AXImageModule } from '@acorex/components/image';
14
19
  import * as i1 from '@angular/common';
15
20
  import { CommonModule } from '@angular/common';
16
21
  import { signalStore, withState, withMethods, patchState, withHooks } from '@ngrx/signals';
17
- import { AXTranslationService } from '@acorex/core/translation';
18
22
  import { AXFormatService } from '@acorex/core/format';
19
- import { AXPPlatformScope, AXPBroadcastEventService } from '@acorex/platform/core';
20
- import { Subject } from 'rxjs';
21
23
  import { AXDialogService } from '@acorex/components/dialog';
22
24
  import * as i5 from '@acorex/components/button';
23
25
  import { AXButtonModule } from '@acorex/components/button';
@@ -238,1591 +240,1752 @@ const ALL_DEFAULT_OPERATORS = [
238
240
  BETWEEN_OPER,
239
241
  ];
240
242
 
241
- class AXPDataProvider {
242
- }
243
-
244
- class AXPCustomOperatorService {
245
- }
246
- class AXPCustomOperatorServiceImpl extends AXPCustomOperatorService {
247
- getCustomOperators() {
248
- return {};
249
- }
250
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCustomOperatorServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
251
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCustomOperatorServiceImpl }); }
252
- }
253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCustomOperatorServiceImpl, decorators: [{
254
- type: Injectable
255
- }] });
243
+ const AXP_HOME_PAGES = new InjectionToken('AXP_HOME_PAGES');
244
+ const AXP_HOME_PAGE_DEFAULT_KEY = new InjectionToken('AXP_HOME_PAGE_DEFAULT_KEY', {
245
+ factory: () => 'home'
246
+ });
256
247
 
257
- class AXPFilterOperatorMiddlewareService {
258
- }
259
- class AXPFilterOperatorMiddlewareServiceImpl extends AXPFilterOperatorMiddlewareService {
248
+ class AXPSettingDefinitionProviderContext {
260
249
  constructor() {
261
- super(...arguments);
262
- this.customOperatorService = inject(AXPCustomOperatorService);
263
- this.operators = {
264
- ...this.getDefaultOperators(),
265
- ...this.customOperatorService.getCustomOperators(),
266
- };
267
- }
268
- transformFilters(filters) {
269
- return filters.map((filter) => this.transformFilter(filter));
250
+ this.rootGroups = [];
251
+ this.groupMap = new Map();
270
252
  }
271
- transformFilter(filter) {
272
- const { operator, value, filters, field } = filter;
273
- // Find the operator (either default or custom)
274
- const filterOperator = this.operators[operator?.type ?? ''] || null;
275
- // Start by transforming the filter itself
276
- const transformedFilter = {
277
- ...filter, // Keep the original filter structure
278
- operator: filterOperator ? filterOperator : operator, // Add operator name
253
+ addGroup(name, title, description, icon) {
254
+ const newGroup = {
255
+ name,
256
+ title,
257
+ description,
258
+ icon,
259
+ groups: [],
260
+ sections: [],
279
261
  };
280
- // If the filter contains nested filters, recursively transform them
281
- if (filters && filters.length > 0) {
282
- transformedFilter.filters = this.transformFilters(filters); // Recursively transform nested filters
262
+ this.rootGroups.push(newGroup);
263
+ this.groupMap.set(name, newGroup); // Index by name
264
+ return new AXPSettingDefinitionGroupBuilder(this, newGroup);
265
+ }
266
+ group(name) {
267
+ const foundGroup = this.groupMap.get(name);
268
+ if (!foundGroup) {
269
+ console.error(`Group with name "${name}" not found.`);
270
+ return null;
283
271
  }
284
- return transformedFilter;
272
+ return new AXPSettingDefinitionGroupBuilder(this, foundGroup);
285
273
  }
286
- getOperator(key) {
287
- return this.operators[key];
274
+ getGroups() {
275
+ return this.rootGroups;
288
276
  }
289
- // Helper function to return the default operators
290
- getDefaultOperators() {
291
- return ALL_DEFAULT_OPERATORS.reduce((acc, operator) => {
292
- acc[operator.name] = {
293
- type: operator.name,
294
- };
295
- return acc;
296
- }, {});
277
+ // Expose groupMap for controlled access
278
+ hasGroup(name) {
279
+ return this.groupMap.has(name);
280
+ }
281
+ getGroup(name) {
282
+ return this.groupMap.get(name);
297
283
  }
298
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
299
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl }); }
300
284
  }
301
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, decorators: [{
302
- type: Injectable
303
- }] });
304
-
305
- class AXPErrorHandlerRegistryService {
306
- constructor(injector) {
307
- this.injector = injector;
308
- this.errorHandlers = [];
285
+ class AXPSettingDefinitionGroupBuilder {
286
+ constructor(context, group) {
287
+ this.context = context;
288
+ this.group = group;
309
289
  }
310
- register(...plugins) {
311
- plugins.forEach(t => {
312
- const childInjector = Injector.create({ providers: [{ provide: t, useClass: t, deps: [] }], parent: this.injector });
313
- const handler = childInjector.get(t);
314
- if (handler) {
315
- this.errorHandlers.push(handler);
316
- }
317
- });
290
+ addSection(name, title, description) {
291
+ const newSection = {
292
+ name,
293
+ title,
294
+ description: description,
295
+ settings: [],
296
+ };
297
+ this.group.sections.push(newSection);
298
+ return new AXPSettingDefinitionSectionBuilder(this, newSection);
318
299
  }
319
- get handlers() {
320
- return this.errorHandlers;
300
+ section(name) {
301
+ const foundSection = this.group.sections.find((section) => section.name === name);
302
+ if (!foundSection) {
303
+ throw new Error(`Section with name "${name}" not found in group "${this.group.name}".`);
304
+ }
305
+ return new AXPSettingDefinitionSectionBuilder(this, foundSection);
306
+ }
307
+ addGroup(name, title, description, icon) {
308
+ const newGroup = {
309
+ name,
310
+ title,
311
+ description: description,
312
+ icon,
313
+ groups: [],
314
+ sections: [],
315
+ };
316
+ this.group.groups.push(newGroup);
317
+ if (this.context.hasGroup(name)) {
318
+ throw new Error(`Group with name "${name}" already exists.`);
319
+ }
320
+ this.context['groupMap'].set(name, newGroup);
321
+ return new AXPSettingDefinitionGroupBuilder(this.context, newGroup);
322
+ }
323
+ endGroup() {
324
+ return this.context;
321
325
  }
322
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPErrorHandlerRegistryService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
323
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPErrorHandlerRegistryService, providedIn: 'root' }); }
324
326
  }
325
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPErrorHandlerRegistryService, decorators: [{
326
- type: Injectable,
327
- args: [{
328
- providedIn: 'root'
329
- }]
330
- }], ctorParameters: () => [{ type: i0.Injector }] });
331
-
332
- class AXPGlobalErrorHandler extends ErrorHandler {
333
- constructor(injector, registry) {
334
- super();
335
- this.injector = injector;
336
- this.registry = registry;
327
+ class AXPSettingDefinitionSectionBuilder {
328
+ constructor(groupBuilder, section) {
329
+ this.groupBuilder = groupBuilder;
330
+ this.section = section;
337
331
  }
338
- handleError(error) {
339
- const handleErrorRecursively = (index, error) => {
340
- const errorHandlers = this.registry.handlers;
341
- if (index < errorHandlers.length) {
342
- errorHandlers[index].handleError(error, (err) => {
343
- handleErrorRecursively(index + 1, err);
344
- });
345
- }
346
- else {
347
- super.handleError(error); // Fallback to default handler
348
- }
332
+ addSetting(setting) {
333
+ const newSetting = {
334
+ name: setting.key,
335
+ title: setting.title,
336
+ description: setting.description,
337
+ isRequired: setting.isRequired ?? false,
338
+ isInherited: setting.isInherited ?? false,
339
+ isEncrypted: setting.isEncrypted ?? false,
340
+ defaultValue: setting.defaultValue,
341
+ scope: setting.scope ?? 'G',
342
+ layout: setting.widget.layout,
343
+ widget: {
344
+ type: setting.widget.type,
345
+ name: setting.key,
346
+ path: setting.key,
347
+ defaultValue: setting.defaultValue,
348
+ options: merge(setting.widget.options ?? {}, {
349
+ label: Object.keys(setting.widget.options ?? {}).includes('label') ? setting.widget.options?.['label'] : setting.title,
350
+ validationRules: setting.validationRules ?? [],
351
+ }),
352
+ valueTransforms: setting.valueTransforms,
353
+ triggers: setting.widget.triggers,
354
+ },
349
355
  };
350
- if (error.message?.startsWith('NG0100')) {
351
- //ignore it
352
- return;
353
- }
354
- handleErrorRecursively(0, error);
356
+ this.section.settings.push(newSetting);
357
+ return this;
358
+ }
359
+ endSection() {
360
+ return this.groupBuilder;
355
361
  }
356
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGlobalErrorHandler, deps: [{ token: i0.Injector }, { token: AXPErrorHandlerRegistryService }], target: i0.ɵɵFactoryTarget.Injectable }); }
357
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGlobalErrorHandler, providedIn: 'root' }); }
358
362
  }
359
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGlobalErrorHandler, decorators: [{
360
- type: Injectable,
361
- args: [{ providedIn: 'root' }]
362
- }], ctorParameters: () => [{ type: i0.Injector }, { type: AXPErrorHandlerRegistryService }] });
363
363
 
364
- // src/app/directives/grid-layout.directive.ts
365
- class AXPGridLayoutDirective {
366
- constructor(el, renderer) {
367
- this.el = el;
368
- this.renderer = renderer;
364
+ // Injection token for setting providers
365
+ const AXP_SETTING_DEFINITION_PROVIDER = new InjectionToken('AXP_SETTING_DEFINITION_PROVIDER');
366
+ class AXPSettingDefinitionProviderService {
367
+ constructor() {
368
+ this.providers = inject(AXP_SETTING_DEFINITION_PROVIDER, { optional: true });
369
+ this.cache = null;
369
370
  }
370
- ngOnChanges(changes) {
371
- if (changes['options']) {
372
- this.applyTailwindClasses();
371
+ async load() {
372
+ if (this.cache) {
373
+ return;
374
+ }
375
+ const context = new AXPSettingDefinitionProviderContext();
376
+ if (Array.isArray(this.providers)) {
377
+ for (const provider of this.providers) {
378
+ if (provider instanceof Promise) {
379
+ // If provider is a promise, resolve it
380
+ const resolvedProvider = await provider;
381
+ await resolvedProvider.provide(context);
382
+ }
383
+ else {
384
+ // If provider is a direct instance, use it directly
385
+ await provider.provide(context);
386
+ }
387
+ }
373
388
  }
389
+ this.cache = context.getGroups();
374
390
  }
375
- applyTailwindClasses() {
376
- if (this.options?.positions == null)
377
- return;
378
- // Clear existing grid classes
379
- this.clearClasses();
380
- // Apply new grid classes based on the input options
381
- this.setClasses(this.options.positions?.default, '');
382
- this.setClasses(this.options.positions?.md, 'md:');
383
- this.setClasses(this.options.positions?.lg, 'lg:');
384
- this.setClasses(this.options.positions?.xl, 'xl:');
385
- this.setClasses(this.options.positions?.xxl, '2xl:');
391
+ async reload() {
392
+ this.cache = null;
393
+ await this.load();
386
394
  }
387
- setClasses(positions, prefix) {
388
- if (positions == null)
389
- return;
390
- const colStart = positions.colStart ? `${prefix}ax-col-start-${positions.colStart}` : '';
391
- const colEnd = positions.colEnd ? `${prefix}ax-col-end-${positions.colEnd}` : '';
392
- const colSpan = positions.colSpan ? `${prefix}ax-col-span-${positions.colSpan}` : '';
393
- const rowStart = positions.rowStart ? `${prefix}ax-row-start-${positions.rowStart}` : '';
394
- const rowEnd = positions.rowEnd ? `${prefix}ax-row-end-${positions.rowEnd}` : '';
395
- const rowSpan = positions.rowSpan ? `${prefix}ax-row-span-${positions.rowSpan}` : '';
396
- const order = positions.order ? `${prefix}ax-order-${positions.order}` : ''; // Handling order
397
- [colStart, colEnd, colSpan, rowStart, rowEnd, rowSpan, order].forEach(cls => {
398
- if (cls) {
399
- this.renderer.addClass(this.el.nativeElement, cls);
400
- }
401
- });
402
- }
403
- clearClasses() {
404
- const currentClasses = this.el.nativeElement.className.split(' ');
405
- currentClasses.forEach((className) => {
406
- if (className.startsWith('ax-col-') || className.startsWith('ax-row-') || className.startsWith('ax-order-')) {
407
- this.renderer.removeClass(this.el.nativeElement, className);
408
- }
409
- });
410
- }
411
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGridLayoutDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
412
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: AXPGridLayoutDirective, isStandalone: true, selector: "[gridLayout]", inputs: { options: ["gridLayout", "options"] }, usesOnChanges: true, ngImport: i0 }); }
413
- }
414
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGridLayoutDirective, decorators: [{
415
- type: Directive,
416
- args: [{
417
- selector: '[gridLayout]',
418
- standalone: true,
419
- }]
420
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { options: [{
421
- type: Input,
422
- args: ['gridLayout']
423
- }] } });
424
-
425
- class AXPStickyDirective {
426
- get isSticky() {
427
- return this._isSticky;
395
+ async getListAsync(scope) {
396
+ await this.load();
397
+ return this.getList(scope);
428
398
  }
429
- set isSticky(value) {
430
- if (this._isSticky !== value) {
431
- this._isSticky = value;
432
- this.isStickyChange.emit(value);
399
+ getList(scope) {
400
+ if (!this.cache) {
401
+ return [];
433
402
  }
403
+ const scopeOrder = ['C', 'G', 'T', 'U']; // Scopes hierarchy in ascending order
404
+ const filterByScope = (groups, currentScope) => {
405
+ const currentScopeIndex = scopeOrder.indexOf(currentScope);
406
+ return groups
407
+ .map((group) => ({
408
+ ...group,
409
+ sections: group.sections.map((section) => ({
410
+ ...section,
411
+ settings: section.settings.filter((setting) => {
412
+ const settingScopeIndex = scopeOrder.indexOf(setting.scope);
413
+ // Include settings where:
414
+ // 1. The scope matches the requested scope.
415
+ if (setting.scope === currentScope)
416
+ return true;
417
+ // 2. The setting scope is higher (closer to 'U') and is inherited.
418
+ if (setting.isInherited &&
419
+ settingScopeIndex > currentScopeIndex // Higher scope
420
+ ) {
421
+ return true;
422
+ }
423
+ // 3. Exclude settings with a lower or irrelevant scope.
424
+ return false;
425
+ }),
426
+ })).filter((section) => section.settings.length > 0), // Keep only sections with settings
427
+ groups: filterByScope(group.groups, currentScope), // Recursively filter nested groups
428
+ }))
429
+ .filter((group) => group.sections.length > 0 || group.groups.length > 0); // Keep groups with valid sections or nested groups
430
+ };
431
+ return filterByScope(this.cache, scope);
434
432
  }
435
- constructor(element, renderer, zone, cdr) {
436
- this.element = element;
437
- this.renderer = renderer;
438
- this.zone = zone;
439
- this.cdr = cdr;
440
- this.stickyOffset = 100;
441
- this.isStickyChange = new EventEmitter();
442
- this._isSticky = false;
443
- this.onParentScroll = () => {
444
- this.zone.runOutsideAngular(() => {
445
- const scrollTop = this.parentElement === window
446
- ? window.scrollY
447
- : this.parentElement.scrollTop;
448
- const shouldStick = scrollTop + this.stickyOffset >= this.topOffset;
449
- if (shouldStick !== this.isSticky) {
450
- this.zone.run(() => {
451
- this.isSticky = shouldStick;
452
- this.toggleStickyClasses(shouldStick);
453
- this.cdr.markForCheck();
433
+ async defaultValues() {
434
+ const defaults = {};
435
+ const collectDefaults = (groups) => {
436
+ groups.forEach((group) => {
437
+ group.sections.forEach((section) => {
438
+ section.settings.forEach((setting) => {
439
+ if (setting.defaultValue !== undefined) {
440
+ defaults[setting.name] = setting.defaultValue;
441
+ }
454
442
  });
455
- }
443
+ });
444
+ collectDefaults(group.groups);
456
445
  });
457
446
  };
458
- }
459
- ngAfterViewInit() {
460
- this.initSticky();
461
- // Add mutation observer for dynamic content
462
- this.mutationObserver = new MutationObserver(() => {
463
- this.updateTopOffset();
464
- });
465
- this.mutationObserver.observe(this.element.nativeElement, {
466
- childList: true,
467
- subtree: true,
468
- });
469
- // Add resize event listener
470
- window.addEventListener('resize', this.updateTopOffset.bind(this));
471
- }
472
- initSticky() {
473
- if (this.stickyParent instanceof HTMLElement) {
474
- this.parentElement = this.stickyParent;
475
- }
476
- else {
477
- this.parentElement =
478
- document.querySelector(this.stickyParent) || window;
447
+ if (!this.cache) {
448
+ await this.load();
479
449
  }
480
- this.targetElement =
481
- document.querySelector(this.stickyTarget) ||
482
- this.element.nativeElement;
483
- this.updateTopOffset();
484
- this.parentElement.addEventListener('scroll', this.onParentScroll);
450
+ collectDefaults(this.cache);
451
+ return defaults;
485
452
  }
486
- updateTopOffset() {
487
- this.zone.runOutsideAngular(() => {
488
- const rect = this.targetElement.getBoundingClientRect();
489
- this.topOffset = rect.top + (window.scrollY || 0);
490
- });
453
+ findGroup(scope, groupName) {
454
+ return this.searchRecursive(this.getList(scope), groupName, []); // Initialize with an empty breadcrumb
491
455
  }
492
- toggleStickyClasses(isSticky) {
493
- const classes = this.stickyClass.split(' ').filter(Boolean);
494
- classes.forEach((className) => {
495
- if (isSticky) {
496
- this.renderer.addClass(this.targetElement, className);
456
+ searchRecursive(groups, groupName, breadcrumb) {
457
+ for (const group of groups) {
458
+ const currentBreadcrumb = [...breadcrumb, { name: group.name, title: group.title, description: group.description }];
459
+ // If the group name matches, return its details
460
+ if (group.name === groupName) {
461
+ return {
462
+ breadcrumb: currentBreadcrumb,
463
+ sections: group.sections.length > 0 ? group.sections : null,
464
+ groups: group.groups.length > 0 ? group.groups : null,
465
+ };
497
466
  }
498
- else {
499
- this.renderer.removeClass(this.targetElement, className);
467
+ // Recursively search in nested groups
468
+ const nestedResult = this.searchRecursive(group.groups, groupName, currentBreadcrumb);
469
+ if (nestedResult.breadcrumb.length > 0) {
470
+ return nestedResult;
500
471
  }
501
- });
502
- }
503
- ngOnDestroy() {
504
- this.parentElement.removeEventListener('scroll', this.onParentScroll);
505
- window.removeEventListener('resize', this.updateTopOffset.bind(this));
506
- if (this.mutationObserver) {
507
- this.mutationObserver.disconnect();
508
472
  }
473
+ // If no matching group is found
474
+ return {
475
+ breadcrumb: [],
476
+ groups: [],
477
+ sections: []
478
+ };
509
479
  }
510
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPStickyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
511
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: AXPStickyDirective, isStandalone: true, selector: "[axpSticky]", inputs: { stickyClass: ["axpSticky", "stickyClass"], stickyOffset: "stickyOffset", stickyParent: "stickyParent", stickyTarget: "stickyTarget" }, outputs: { isStickyChange: "isStickyChange" }, exportAs: ["axpSticky"], ngImport: i0 }); }
480
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
481
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, providedIn: 'root' }); }
512
482
  }
513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPStickyDirective, decorators: [{
514
- type: Directive,
515
- args: [{
516
- selector: '[axpSticky]',
517
- exportAs: 'axpSticky',
518
- standalone: true,
519
- }]
520
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { stickyClass: [{
521
- type: Input,
522
- args: ['axpSticky']
523
- }], stickyOffset: [{
524
- type: Input,
525
- args: ['stickyOffset']
526
- }], isStickyChange: [{
527
- type: Output
528
- }], stickyParent: [{
529
- type: Input
530
- }], stickyTarget: [{
531
- type: Input
532
- }] } });
533
-
534
- class AXPComponentSlotRegistryService {
483
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
484
+ type: Injectable,
485
+ args: [{ providedIn: 'root' }]
486
+ }] });
487
+ class AXPSettingDefaultValueProvider {
535
488
  constructor() {
536
- this.registry = new Map();
489
+ this.definitionProvider = inject(AXPSettingDefinitionProviderService);
537
490
  }
538
- register(slotName, config) {
539
- let configs = this.registry.get(slotName) || [];
540
- // Check if the component is already registered in this slot
541
- const isDuplicate = configs.some(existingConfig => existingConfig.name === config.name);
542
- if (!isDuplicate) {
543
- configs = [...configs, config]; // Add the new configuration
544
- this.registry.set(slotName, configs);
545
- }
491
+ get scope() {
492
+ return AXPPlatformScope.Global;
546
493
  }
547
- get(slotName) {
548
- return this.registry.get(slotName) || [];
494
+ async load() {
495
+ return Object.entries(await this.definitionProvider.defaultValues()).map(c => ({ key: c[0], value: c[1] }));
496
+ }
497
+ set(key, value) {
498
+ throw new Error('Method not implemented.');
549
499
  }
550
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
551
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, providedIn: 'root' }); }
552
500
  }
553
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, decorators: [{
554
- type: Injectable,
555
- args: [{
556
- providedIn: 'root'
557
- }]
558
- }] });
559
501
 
560
- class AXPComponentSlotLoaderService {
561
- constructor(registryService, injector) {
562
- this.registryService = registryService;
563
- this.injector = injector;
502
+ const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
503
+ providedIn: 'root',
504
+ factory: () => {
505
+ return [
506
+ new AXPSettingValueProviderDefault(AXPPlatformScope.Tenant),
507
+ new AXPSettingValueProviderDefault(AXPPlatformScope.User)
508
+ ];
564
509
  }
565
- loadComponent(slotName, viewContainerRef) {
566
- const configs = sortBy(this.registryService.get(slotName), (c) => c.priority ?? 0);
567
- if (configs) {
568
- viewContainerRef.clear();
569
- configs.forEach(async (config) => {
570
- let component;
571
- let options = {};
572
- if (typeof config.loadComponent === 'function') {
573
- // If component is a function
574
- runInInjectionContext(this.injector, () => {
575
- component = config.loadComponent?.();
576
- });
577
- }
578
- else if (config.component) {
579
- // If component is a Type
580
- component = config.component;
581
- }
582
- //
583
- if (typeof config.options === 'function') {
584
- // If options is a function
585
- runInInjectionContext(this.injector, () => {
586
- const fun = config.options;
587
- options = fun();
588
- });
589
- }
590
- else if (config.options) {
591
- // If options is a object
592
- options = config.options;
593
- }
594
- //
595
- if (component != null) {
596
- const componentRef = viewContainerRef.createComponent(component);
597
- Object.assign(componentRef.instance, options);
598
- }
510
+ });
511
+ class AXPSettingValueProviderDefault {
512
+ get scope() {
513
+ return this._scope;
514
+ }
515
+ constructor(_scope) {
516
+ this._scope = _scope;
517
+ this.cache = new Map();
518
+ this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.scope})`;
519
+ }
520
+ async load() {
521
+ // Load settings from localStorage as a single key
522
+ const storedSettings = localStorage.getItem(this.localStorageKey);
523
+ if (storedSettings) {
524
+ const parsedSettings = JSON.parse(storedSettings);
525
+ Object.entries(parsedSettings).forEach(([key, value]) => {
526
+ this.cache.set(key, value);
599
527
  });
528
+ return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
600
529
  }
530
+ return Promise.resolve([]);
601
531
  }
602
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, deps: [{ token: AXPComponentSlotRegistryService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
603
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, providedIn: 'root' }); }
604
- }
605
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, decorators: [{
606
- type: Injectable,
607
- args: [{
608
- providedIn: 'root',
609
- }]
610
- }], ctorParameters: () => [{ type: AXPComponentSlotRegistryService }, { type: i0.Injector }] });
611
-
612
- class AXPComponentSlotDirective {
613
- constructor(dynamicLoaderService, viewContainerRef) {
614
- this.dynamicLoaderService = dynamicLoaderService;
615
- this.viewContainerRef = viewContainerRef;
532
+ async set(keyOrValues, value) {
533
+ if (typeof keyOrValues === 'string') {
534
+ // Single value update
535
+ this.cache.set(keyOrValues, value);
536
+ }
537
+ else {
538
+ // Bulk update
539
+ for (const [key, val] of Object.entries(keyOrValues)) {
540
+ this.cache.set(key, val);
541
+ }
542
+ }
543
+ await this.saveToLocalStorage();
616
544
  }
617
- ngOnInit() {
618
- this.dynamicLoaderService.loadComponent(this.name, this.viewContainerRef);
545
+ async saveToLocalStorage() {
546
+ const settingsObject = {};
547
+ this.cache.forEach((value, key) => {
548
+ settingsObject[key] = value;
549
+ });
550
+ localStorage.setItem(this.localStorageKey, JSON.stringify(settingsObject));
619
551
  }
620
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotDirective, deps: [{ token: AXPComponentSlotLoaderService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
621
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: AXPComponentSlotDirective, isStandalone: false, selector: "axp-component-slot", inputs: { name: "name" }, ngImport: i0 }); }
622
552
  }
623
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotDirective, decorators: [{
624
- type: Directive,
625
- args: [{
626
- selector: 'axp-component-slot',
627
- standalone: false
628
- }]
629
- }], ctorParameters: () => [{ type: AXPComponentSlotLoaderService }, { type: i0.ViewContainerRef }], propDecorators: { name: [{
630
- type: Input
631
- }] } });
632
553
 
633
- class AXPComponentSlotModule {
634
- static forRoot(configs) {
635
- return {
636
- ngModule: AXPComponentSlotModule,
637
- providers: [
638
- {
639
- provide: 'AXPComponentSlotModuleFactory',
640
- useFactory: (registry) => () => {
641
- if (configs) {
642
- for (const [key, value] of Object.entries(configs)) {
643
- value.forEach(v => {
644
- registry.register(key, v);
645
- });
646
- }
647
- }
648
- },
649
- deps: [AXPComponentSlotRegistryService],
650
- multi: true
651
- }
652
- ]
653
- };
554
+ class AXPSettingService {
555
+ constructor() {
556
+ this.providers = inject(AXP_SETTING_VALUE_PROVIDER);
557
+ //private readonly definitionService = inject(AXPSettingDefinitionProviderService);
558
+ this.injector = inject(Injector);
559
+ this.eventService = inject(AXPBroadcastEventService);
560
+ this.scopedSettingsCache = new Map();
561
+ this.onChanged = new Subject();
562
+ // Initialize scoped caches for dynamic scopes
563
+ const staticScopes = [
564
+ AXPPlatformScope.Environment,
565
+ AXPPlatformScope.Global,
566
+ AXPPlatformScope.Tenant,
567
+ AXPPlatformScope.User,
568
+ ];
569
+ staticScopes.forEach((scope) => {
570
+ if (!this.scopedSettingsCache.has(scope)) {
571
+ this.scopedSettingsCache.set(scope, new Map());
572
+ }
573
+ });
574
+ // Listen for setting changes from other tabs
575
+ this.eventService.listen('AXPSettingChangedEvent').subscribe((event) => {
576
+ const data = event.data;
577
+ data.keys.forEach((key) => {
578
+ this.scopedSettingsCache.get(data.scope)?.set(key, data.values[key]);
579
+ });
580
+ this.onChanged.next(data); // Notify subscribers in the current tab
581
+ });
654
582
  }
655
- static forChild(configs) {
656
- return {
657
- ngModule: AXPComponentSlotModule,
658
- providers: [
659
- {
660
- provide: 'AXPComponentSlotModuleFactory',
661
- useFactory: (registry) => () => {
662
- if (configs) {
663
- for (const [key, value] of Object.entries(configs)) {
664
- value.forEach(v => {
665
- registry.register(key, v);
666
- });
667
- }
668
- }
669
- },
670
- deps: [AXPComponentSlotRegistryService],
671
- multi: true
583
+ async load() {
584
+ try {
585
+ const settingsList = [];
586
+ for (const provider of this.providers) {
587
+ const scopeCache = this.scopedSettingsCache.get(provider.scope);
588
+ const providerSettings = await provider.load();
589
+ providerSettings.forEach((setting) => {
590
+ scopeCache.set(setting.key, setting.value);
591
+ });
592
+ settingsList.push(...providerSettings);
593
+ }
594
+ return settingsList;
595
+ }
596
+ catch (error) {
597
+ console.error('Error loading settings', error);
598
+ throw error;
599
+ }
600
+ }
601
+ async get(key) {
602
+ if (this.scopedSettingsCache.size === 0) {
603
+ await this.load();
604
+ }
605
+ const scopeOrder = [
606
+ AXPPlatformScope.User,
607
+ AXPPlatformScope.Tenant,
608
+ AXPPlatformScope.Global,
609
+ AXPPlatformScope.Environment,
610
+ ];
611
+ for (const scope of scopeOrder) {
612
+ const scopeCache = this.scopedSettingsCache.get(scope);
613
+ if (scopeCache && scopeCache.has(key)) {
614
+ const value = scopeCache.get(key);
615
+ if (value !== undefined && value !== null) {
616
+ return cloneDeep(value);
672
617
  }
673
- ]
674
- };
618
+ }
619
+ }
620
+ const definitionService = this.injector.get(AXPSettingDefinitionProviderService);
621
+ const defaults = await definitionService.defaultValues();
622
+ return get(defaults, key); // Fallback if no value is found
675
623
  }
676
- /**
677
- * @ignore
678
- */
679
- constructor(instances) {
680
- instances?.forEach(f => {
681
- f();
682
- });
624
+ async defaultValues(scope) {
625
+ let scopeOrder = [
626
+ AXPPlatformScope.Environment,
627
+ AXPPlatformScope.Global,
628
+ AXPPlatformScope.Tenant,
629
+ AXPPlatformScope.User,
630
+ ].reverse();
631
+ const scopeIndex = scopeOrder.indexOf(scope);
632
+ if (scopeIndex === -1) {
633
+ throw new Error(`Invalid scope: ${scope}`);
634
+ }
635
+ scopeOrder = scopeOrder.slice(scopeIndex + 1);
636
+ // Accumulate defaults from the current scope and higher scopes
637
+ const accumulatedDefaults = {};
638
+ for (let i = scopeIndex; i < scopeOrder.length; i++) {
639
+ const currentScope = scopeOrder[i];
640
+ const scopeCache = this.scopedSettingsCache.get(currentScope);
641
+ if (scopeCache) {
642
+ scopeCache.forEach((value, key) => {
643
+ if (!(key in accumulatedDefaults)) {
644
+ accumulatedDefaults[key] = value;
645
+ }
646
+ });
647
+ }
648
+ }
649
+ // Merge with global default values from the definition service
650
+ const definitionService = this.injector.get(AXPSettingDefinitionProviderService);
651
+ const globalDefaults = await definitionService.defaultValues();
652
+ return { ...globalDefaults, ...accumulatedDefaults };
683
653
  }
684
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, deps: [{ token: 'AXPComponentSlotModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
685
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, declarations: [AXPComponentSlotDirective], exports: [AXPComponentSlotDirective] }); }
686
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule }); }
654
+ scope(scope) {
655
+ const provider = this.providers.find((p) => p.scope === scope);
656
+ if (!provider) {
657
+ throw new Error(`No provider found for scope: ${scope}`);
658
+ }
659
+ return new ScopedSettingService(this, provider, this.scopedSettingsCache.get(scope));
660
+ }
661
+ invokeChangeEvent(event) {
662
+ this.onChanged.next(event);
663
+ this.eventService.publish("AXPSettingChangedEvent", event);
664
+ }
665
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
666
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingService, providedIn: 'root' }); }
687
667
  }
688
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, decorators: [{
689
- type: NgModule,
668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingService, decorators: [{
669
+ type: Injectable,
690
670
  args: [{
691
- declarations: [AXPComponentSlotDirective],
692
- exports: [AXPComponentSlotDirective]
671
+ providedIn: 'root',
693
672
  }]
694
- }], ctorParameters: () => [{ type: undefined, decorators: [{
695
- type: Optional
696
- }, {
697
- type: Inject,
698
- args: ['AXPComponentSlotModuleFactory']
699
- }] }] });
700
-
701
- class AXPTextLogoConfig {
702
- constructor(text) {
703
- this.text = text;
673
+ }], ctorParameters: () => [] });
674
+ class ScopedSettingService {
675
+ constructor(parent, provider, scopeCache) {
676
+ this.parent = parent;
677
+ this.provider = provider;
678
+ this.scopeCache = scopeCache;
704
679
  }
705
- }
706
- class AXPImageUrlLogoConfig {
707
- constructor(url) {
708
- this.url = url;
680
+ async get(key) {
681
+ const settings = await this.provider.load();
682
+ const setting = settings.find((s) => s.key === key);
683
+ return setting ? cloneDeep(setting.value) : undefined;
709
684
  }
710
- }
711
- class AXPFontIconLogoConfig {
712
- constructor(iconClass) {
713
- this.iconClass = iconClass;
685
+ async all() {
686
+ const settings = await this.provider.load();
687
+ return Object.fromEntries(settings.map((s) => [s.key, cloneDeep(s.value)]));
714
688
  }
715
- }
716
- class AXPComponentLogoConfig {
717
- constructor(component) {
718
- this.component = component;
689
+ async defaultValues() {
690
+ return this.parent.defaultValues(this.provider.scope);
719
691
  }
720
- }
721
-
722
- class AXPLogoComponent {
723
- ngOnInit() {
724
- switch (true) {
725
- case this.source instanceof AXPTextLogoConfig:
726
- this.logoType = 'text';
727
- break;
728
- case this.source instanceof AXPImageUrlLogoConfig:
729
- this.logoType = 'url';
730
- break;
731
- case this.source instanceof AXPFontIconLogoConfig:
732
- this.logoType = 'iconClass';
733
- break;
734
- case this.source instanceof AXPComponentLogoConfig:
735
- this.logoType = 'component';
736
- break;
737
- default:
738
- break;
692
+ async set(keyOrValues, value) {
693
+ if (typeof keyOrValues === 'string') {
694
+ // Single key-value pair
695
+ await this.provider.set(keyOrValues, value);
696
+ this.scopeCache.set(keyOrValues, value); // Sync the cache
697
+ this.parent.invokeChangeEvent({
698
+ scope: this.provider.scope,
699
+ keys: [keyOrValues],
700
+ values: { [keyOrValues]: value },
701
+ entries: [{ key: keyOrValues, value }],
702
+ });
703
+ }
704
+ else {
705
+ // Multiple key-value pairs
706
+ await this.provider.set(keyOrValues);
707
+ Object.entries(keyOrValues).forEach(([key, val]) => this.scopeCache.set(key, val)); // Sync the cache
708
+ const entries = Object.entries(keyOrValues).map(([key, val]) => ({ key, value: val }));
709
+ this.parent.invokeChangeEvent({
710
+ scope: this.provider.scope,
711
+ keys: Object.keys(keyOrValues),
712
+ values: keyOrValues,
713
+ entries,
714
+ });
739
715
  }
740
716
  }
741
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
742
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPLogoComponent, isStandalone: true, selector: "axp-logo", inputs: { source: "source" }, host: { classAttribute: "ax-flex ax-justify-center" }, ngImport: i0, template: "@switch (logoType) {\n@case ('text') {\n<span class=\"ax-font-bold ax-select-none\">{{ source.text }}</span>\n}\n@case ('url') {\n<ax-image [src]=\"source.url\"></ax-image>\n} @case ('iconClass') {\n<ax-icon class=\"{{ source.classIcon }}\"></ax-icon>\n} @case ('component') {\n<ng-container *ngComponentOutlet=\"source.component\"></ng-container>\n}\n}", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "ngmodule", type: AXImageModule }, { kind: "component", type: i2.AXImageComponent, selector: "ax-image", inputs: ["overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }] }); }
717
+ async update(key, updateFn) {
718
+ const currentValue = await this.get(key);
719
+ const newValue = updateFn(currentValue);
720
+ await this.set(key, newValue);
721
+ }
743
722
  }
744
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLogoComponent, decorators: [{
745
- type: Component,
746
- args: [{ selector: 'axp-logo', imports: [CommonModule, AXImageModule, AXDecoratorModule], host: { 'class': 'ax-flex ax-justify-center' }, template: "@switch (logoType) {\n@case ('text') {\n<span class=\"ax-font-bold ax-select-none\">{{ source.text }}</span>\n}\n@case ('url') {\n<ax-image [src]=\"source.url\"></ax-image>\n} @case ('iconClass') {\n<ax-icon class=\"{{ source.classIcon }}\"></ax-icon>\n} @case ('component') {\n<ng-container *ngComponentOutlet=\"source.component\"></ng-container>\n}\n}" }]
747
- }], propDecorators: { source: [{
748
- type: Input
749
- }] } });
750
723
 
751
- const AXP_MENU_PROVIDER = new InjectionToken('AXP_MENU_PROVIDER');
752
- class AXPMenuProviderService {
724
+ var AXPHomePageSettings;
725
+ (function (AXPHomePageSettings) {
726
+ AXPHomePageSettings["UserHomePath"] = "general:startup:home-page";
727
+ })(AXPHomePageSettings || (AXPHomePageSettings = {}));
728
+
729
+ class AXPHomePageService {
730
+ get flatCandidates() {
731
+ return this.candidates.flatMap((c) => c);
732
+ }
753
733
  constructor() {
754
- this.providers = inject(AXP_MENU_PROVIDER, { optional: true });
755
- this.cache = null;
756
- this.pendingInserts = [];
757
- this.pendingRemovals = [];
758
- this.pendingUpdates = [];
759
- this.pendingAdditions = [];
734
+ this.defaultHomePageKey = inject(AXP_HOME_PAGE_DEFAULT_KEY, { optional: true }) ?? 'home';
735
+ this.userHomePageKey = null;
736
+ this.candidates = inject(AXP_HOME_PAGES, { optional: true }) ?? [];
737
+ this.settingsService = inject(AXPSettingService);
738
+ this.sessionService = inject(AXPSessionService);
739
+ // remove circular dependency
740
+ setTimeout(async () => {
741
+ await this.init();
742
+ });
760
743
  }
761
- async items() {
762
- // Return cached items if available
763
- if (this.cache) {
764
- return this.cache;
765
- }
766
- const items = [];
767
- const context = this.createMenuProviderContext(items);
768
- if (Array.isArray(this.providers)) {
769
- for (const provider of this.providers) {
770
- await provider.provide(context);
744
+ async init() {
745
+ await this.load();
746
+ //
747
+ const keys = [AXPHomePageSettings.UserHomePath];
748
+ this.settingsService.onChanged.subscribe(async (c) => {
749
+ if (keys.some((k) => c.keys.includes(k))) {
750
+ await this.load();
771
751
  }
772
- }
773
- // Apply pending operations
774
- this.applyPendingOperations(items);
775
- // Sort items by priority
776
- items.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
777
- // ADD level property to items
778
- setMenuItemMeta(items);
779
- // Cache the computed items
780
- this.cache = items;
781
- return items;
752
+ });
753
+ //
754
+ merge$1(this.sessionService.status$, this.sessionService.application$, this.sessionService.tenant$).subscribe(async () => {
755
+ await this.load();
756
+ });
782
757
  }
783
- createMenuProviderContext(items) {
758
+ async load() {
759
+ this.userHomePageKey = await this.settingsService.get(AXPHomePageSettings.UserHomePath);
760
+ }
761
+ getRegisteredList() {
762
+ return this.flatCandidates.filter((c) => c.route);
763
+ }
764
+ getRegisteredRoutes() {
765
+ const defaultHomePage = this.flatCandidates.find((c) => c.key === this.defaultHomePageKey);
766
+ const home = this.flatCandidates.find((c) => this.userHomePageKey && c.key === this.userHomePageKey) ?? defaultHomePage;
767
+ if (home && home.route) {
768
+ const fullPath = this.findPath(home.route);
769
+ return [
770
+ { path: '', redirectTo: fullPath, pathMatch: 'full' },
771
+ { path: ':app', redirectTo: fullPath, pathMatch: 'full' },
772
+ { ...home?.route, ...{ data: { key: home?.key, title: home?.title, path: fullPath } } },
773
+ ];
774
+ }
775
+ return [];
776
+ }
777
+ getCurrent() {
778
+ const key = this.userHomePageKey ?? this.defaultHomePageKey;
779
+ const homePage = this.getRegisteredRoutes().find((c) => c.data?.['key'] === key);
784
780
  return {
785
- addItems: (newItems) => {
786
- items.push(...newItems);
787
- },
788
- find: (target) => {
789
- return {
790
- insert: (newItems, position) => {
791
- this.pendingInserts.push({ target, newItems, position });
792
- },
793
- remove: () => {
794
- this.pendingRemovals.push(target);
795
- },
796
- update: (updatedItem) => {
797
- this.pendingUpdates.push({ target, updatedItem });
798
- },
799
- addItems: (newItems) => {
800
- this.pendingAdditions.push({ target, newItems });
801
- }
802
- };
803
- }
781
+ path: homePage.data?.['path'],
782
+ title: homePage.data?.['title'],
804
783
  };
805
784
  }
806
- applyPendingOperations(items) {
807
- for (const { target, newItems, position } of this.pendingInserts) {
808
- const foundItemInfo = this.findItemWithParent(items, target);
809
- const { foundItem, parentItems } = foundItemInfo;
810
- if (!foundItem) {
811
- console.warn(`Target "${target}" not found, appending items.`);
812
- items.push(...newItems);
813
- }
814
- else {
815
- if (position == 'inside') {
816
- foundItem.children?.push(...newItems);
817
- }
818
- else {
819
- const index = parentItems.indexOf(foundItem);
820
- const insertPosition = position === 'before' ? index : index + 1;
821
- parentItems.splice(insertPosition, 0, ...newItems);
822
- }
823
- }
824
- }
825
- for (const target of this.pendingRemovals) {
826
- const foundItemInfo = this.findItemWithParent(items, target);
827
- const { foundItem, parentItems } = foundItemInfo;
828
- if (!foundItem) {
829
- console.warn(`Target "${target}" not found, nothing to remove.`);
830
- }
831
- else {
832
- const index = parentItems.indexOf(foundItem);
833
- parentItems.splice(index, 1);
834
- }
835
- }
836
- for (const { target, updatedItem } of this.pendingUpdates) {
837
- const foundItemInfo = this.findItemWithParent(items, target);
838
- const { foundItem } = foundItemInfo;
839
- if (!foundItem) {
840
- console.warn(`Target "${target}" not found, nothing to update.`);
841
- }
842
- else {
843
- Object.assign(foundItem, updatedItem);
844
- }
845
- }
846
- for (const { target, newItems } of this.pendingAdditions) {
847
- const foundItemInfo = this.findItemWithParent(items, target);
848
- const { foundItem } = foundItemInfo;
849
- if (!foundItem) {
850
- console.warn(`Target "${target}" not found, nothing to add items to.`);
851
- }
852
- else {
853
- if (!foundItem.children) {
854
- foundItem.children = [];
855
- }
856
- foundItem.children.push(...newItems);
857
- }
785
+ findPath(target) {
786
+ const rawPath = this.buildFullPaths(target).join('/');
787
+ const appName = this.sessionService.application?.name;
788
+ if (appName) {
789
+ return rawPath.replace(':app', appName);
858
790
  }
859
- // Clear pending operations after applying them
860
- this.pendingInserts = [];
861
- this.pendingRemovals = [];
862
- this.pendingUpdates = [];
863
- this.pendingAdditions = [];
791
+ return rawPath;
864
792
  }
865
- findItemWithParent(items, target, parentItems = items) {
866
- for (const item of items) {
867
- if (item.name === target) {
868
- return { foundItem: item, parentItems };
869
- }
870
- if (item.children) {
871
- const result = this.findItemWithParent(item.children, target, item.children);
872
- if (result.foundItem) {
873
- return result;
874
- }
875
- }
793
+ buildFullPaths(route, parentPath = []) {
794
+ const segments = [...parentPath];
795
+ if (route.path) {
796
+ segments.push(route.path);
876
797
  }
877
- return { foundItem: null, parentItems: items };
878
- }
879
- // Method to clear the cache, if needed (e.g., when providers change)
880
- clearCache() {
881
- this.cache = null;
882
- this.pendingInserts = [];
883
- this.pendingRemovals = [];
884
- this.pendingUpdates = [];
885
- this.pendingAdditions = [];
798
+ // Recursively search the first matched child (deepest first match)
799
+ if (route.children?.length) {
800
+ return this.buildFullPaths(route.children[0], segments);
801
+ }
802
+ return segments;
886
803
  }
887
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
888
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, providedIn: 'root' }); }
804
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPHomePageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
805
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPHomePageService, providedIn: 'root' }); }
889
806
  }
890
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, decorators: [{
807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPHomePageService, decorators: [{
891
808
  type: Injectable,
892
- args: [{ providedIn: 'root' }]
893
- }] });
894
- function setMenuItemMeta(items, parentIndex = '', depth = 0) {
895
- items.forEach((item, index) => {
896
- const currentIndex = parentIndex ? `${parentIndex}-${index}` : `${index}`;
897
- const hasChildren = !!(item.children && Array.isArray(item.children) && item.children.length > 0);
898
- item.meta = {
899
- index: currentIndex,
900
- isRoot: depth === 0,
901
- hasChildren,
902
- depth
903
- };
904
- if (hasChildren) {
905
- setMenuItemMeta(item.children, currentIndex, depth + 1);
809
+ args: [{
810
+ providedIn: 'root',
811
+ }]
812
+ }], ctorParameters: () => [] });
813
+
814
+ function dynamicRoutesFactory() {
815
+ const service = inject(AXPHomePageService);
816
+ return service.getRegisteredRoutes();
817
+ }
818
+ function provideDynamicHomePage() {
819
+ return makeEnvironmentProviders([
820
+ {
821
+ provide: ROUTES,
822
+ useFactory: dynamicRoutesFactory,
823
+ multi: true
906
824
  }
907
- });
825
+ ]);
908
826
  }
909
827
 
910
- const AXPMenuService = signalStore({ providedIn: 'root' },
911
- // Initial State
912
- withState((router = inject(Router)) => {
913
- return {
914
- items: [],
915
- selectedMenuItem: {
916
- item: null,
917
- isFullMatch: false
918
- },
919
- };
920
- }),
921
- // Methods for State Management
922
- withMethods((store, router = inject(Router), workflow = inject(AXPWorkflowService)) => {
923
- return {
924
- setMenuItems(items) {
925
- patchState(store, { items: items });
926
- },
927
- selectMenuItemByRoute(path) {
928
- const findItem = (items) => {
929
- for (const item of items) {
930
- // Recursively search children first
931
- if (item.children) {
932
- const foundChild = findItem(item.children);
933
- if (foundChild.item) {
934
- return foundChild;
935
- }
936
- }
937
- if (item.path) {
938
- // Check if the item path matches the current path
939
- const matchResult = pathsMatch(item.path, path, ["list", "view", "edit", "create"]);
940
- if (matchResult.isMatch) {
941
- return { item, isPartialMatch: matchResult.isPartial };
942
- }
943
- }
944
- }
945
- return { item: null, isPartialMatch: false };
946
- };
947
- const pathsMatch = (itemPath, currentPath, trailingSegmentsToIgnore = []) => {
948
- const itemSegments = itemPath.split('/').filter(segment => segment.length > 0);
949
- const pathSegments = currentPath.split('/').filter(segment => segment.length > 0);
950
- const menuLength = itemSegments.length;
951
- const pathLength = pathSegments.length;
952
- // Identify the effective base length for the menuPath
953
- let effectiveMenuLength = menuLength;
954
- if (menuLength > 0 &&
955
- trailingSegmentsToIgnore.includes(itemSegments[menuLength - 1])) {
956
- effectiveMenuLength--; // Exclude trailing non-hierarchical segments
957
- }
958
- // Check if the menuPath (base segments) is a prefix of browserPath
959
- let isPrefix = true;
960
- for (let i = 0; i < effectiveMenuLength; i++) {
961
- if (itemSegments[i] !== pathSegments[i]) {
962
- isPrefix = false;
963
- break;
964
- }
965
- }
966
- // Partial match: menuPath base is a strict prefix of browserPath
967
- const isPartialMatch = isPrefix && effectiveMenuLength < pathLength;
968
- // Exact match: all segments match completely
969
- const isExactMatch = isPrefix && effectiveMenuLength === pathLength;
970
- return {
971
- isMatch: isExactMatch || isPartialMatch,
972
- isPartial: isPartialMatch && !isExactMatch,
973
- };
974
- };
975
- const items = store.items();
976
- const { item, isPartialMatch } = findItem(items);
977
- patchState(store, { selectedMenuItem: { item, isFullMatch: !isPartialMatch } });
978
- },
979
- executeCommand(item) {
980
- if (item.path) {
981
- workflow.execute('navigate', { type: 'router', options: { path: item.path } });
982
- patchState(store, { selectedMenuItem: { item, isFullMatch: true } });
983
- }
984
- if (item.command) {
985
- const command = item.command;
986
- workflow.execute(command.name, command.options);
987
- }
988
- },
989
- isItemOpen(item) {
990
- const selectedItem = store.selectedMenuItem();
991
- if (!selectedItem) {
992
- return false;
993
- }
994
- const findParent = (currentItem, targetItem) => {
995
- if (currentItem.children?.includes(targetItem)) {
996
- return true;
997
- }
998
- return currentItem.children?.some(child => findParent(child, targetItem)) ?? false;
999
- };
1000
- return item === selectedItem?.item || findParent(item, selectedItem.item);
828
+ class AXPHomePageSettingProvider {
829
+ constructor(injector) {
830
+ this.injector = injector;
831
+ this.translateService = this.injector.get(AXTranslationService);
832
+ this.homePageService = this.injector.get(AXPHomePageService);
833
+ }
834
+ async provide(context) {
835
+ const trans = async (key) => await this.translateService.translateAsync(`settings.${key}`, { scope: 'general' });
836
+ const list = await this.homePageService.getRegisteredList().map((c) => ({ id: c.key, title: c.title }));
837
+ if (list.length === 0) {
838
+ return;
1001
839
  }
1002
- };
1003
- }), withHooks((store, menuProviderService = inject(AXPMenuProviderService)) => ({
1004
- onInit() {
1005
- (async () => {
1006
- const items = await menuProviderService.items();
1007
- patchState(store, { items: items });
1008
- })();
1009
- },
1010
- onDestroy() {
1011
- },
1012
- })));
840
+ // Define the 'General Settings' group
841
+ context
842
+ .addGroup('general', await trans('general.title'), await trans('general.description'), 'fa-light fa-palette')
843
+ // Add the 'Startup' section
844
+ .addSection('startup', await trans('general.startup.title'), await trans('general.startup.description'))
845
+ // Add the 'Home Page' setting
846
+ .addSetting({
847
+ key: AXPHomePageSettings.UserHomePath,
848
+ title: await trans('general.startup.home-page.title'),
849
+ scope: AXPPlatformScope.User,
850
+ isInherited: true,
851
+ defaultValue: list[0].id,
852
+ valueTransforms: objectKeyValueTransforms('id'),
853
+ widget: {
854
+ type: AXPWidgetsCatalog.select,
855
+ options: {
856
+ valueField: 'id',
857
+ textField: 'title',
858
+ dataSource: list,
859
+ },
860
+ },
861
+ description: await trans('general.startup.home-page.description'),
862
+ })
863
+ // End the 'Startup' section
864
+ .endSection()
865
+ // End the 'General Settings' group
866
+ .endGroup();
867
+ }
868
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPHomePageSettingProvider, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
869
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPHomePageSettingProvider }); }
870
+ }
871
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPHomePageSettingProvider, decorators: [{
872
+ type: Injectable
873
+ }], ctorParameters: () => [{ type: i0.Injector }] });
1013
874
 
1014
- class AXPMenuSearchDefinitionProvider {
1015
- async provide(context) {
1016
- context.addDefinition('menu', 'Menu', 'menu', 'fa-thin fa-bars', 2, {
1017
- format: {
1018
- id: '{{data.name}}',
875
+ class AXPHomePageModule {
876
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPHomePageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
877
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPHomePageModule }); }
878
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPHomePageModule, providers: [
879
+ {
880
+ provide: AXP_SETTING_DEFINITION_PROVIDER,
881
+ useClass: AXPHomePageSettingProvider,
882
+ multi: true,
1019
883
  },
1020
- actions: [
1021
- {
1022
- name: 'navigate',
1023
- type: 'view',
1024
- priority: 'primary',
1025
- },
1026
- ],
1027
- });
884
+ ] }); }
885
+ }
886
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPHomePageModule, decorators: [{
887
+ type: NgModule,
888
+ args: [{
889
+ imports: [],
890
+ providers: [
891
+ {
892
+ provide: AXP_SETTING_DEFINITION_PROVIDER,
893
+ useClass: AXPHomePageSettingProvider,
894
+ multi: true,
895
+ },
896
+ ],
897
+ }]
898
+ }] });
899
+
900
+ class AXPDataProvider {
901
+ }
902
+
903
+ class AXPCustomOperatorService {
904
+ }
905
+ class AXPCustomOperatorServiceImpl extends AXPCustomOperatorService {
906
+ getCustomOperators() {
907
+ return {};
1028
908
  }
909
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCustomOperatorServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
910
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCustomOperatorServiceImpl }); }
1029
911
  }
912
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCustomOperatorServiceImpl, decorators: [{
913
+ type: Injectable
914
+ }] });
1030
915
 
1031
- class AXPMenuSearchProvider {
916
+ class AXPFilterOperatorMiddlewareService {
917
+ }
918
+ class AXPFilterOperatorMiddlewareServiceImpl extends AXPFilterOperatorMiddlewareService {
1032
919
  constructor() {
1033
- this.menuService = inject(AXPMenuProviderService);
1034
- this.translateService = inject(AXTranslationService);
920
+ super(...arguments);
921
+ this.customOperatorService = inject(AXPCustomOperatorService);
922
+ this.operators = {
923
+ ...this.getDefaultOperators(),
924
+ ...this.customOperatorService.getCustomOperators(),
925
+ };
1035
926
  }
1036
- async search(text) {
1037
- const menuItems = await this.searchMenuItems(await this.menuService.items(), text);
1038
- return sortBy(menuItems.map((item) => ({
1039
- group: 'menu', // Use `name` or empty string if undefined
1040
- title: item.text, // Use `text` for the `title`
1041
- icon: item.icon, // Include the `icon` if present
1042
- data: omit(item, ['parent', 'children']), // Include all data except `parent` and `children`
1043
- command: item.path ? {
1044
- name: 'navigate',
1045
- options: {
1046
- type: 'router',
1047
- options: {
1048
- path: item.path,
1049
- },
1050
- }
1051
- } : item.command,
1052
- parent: item.parent
1053
- ? {
1054
- title: item.parent.text,
1055
- }
1056
- : undefined,
1057
- })), [(o) => this.translateService.translateSync(o.title)]);
927
+ transformFilters(filters) {
928
+ return filters.map((filter) => this.transformFilter(filter));
1058
929
  }
1059
- /**
1060
- * Recursively searches AXPMenuItem and its children for a matching text.
1061
- *
1062
- * @param menuItems - The array of AXPMenuItem to search in.
1063
- * @param searchText - The text to search for (case-insensitive).
1064
- * @returns An array of AXPMenuItem that match the search text.
1065
- */
1066
- async searchMenuItems(menuItems, searchText) {
1067
- const result = [];
1068
- for (const item of menuItems) {
1069
- // Check if the current item's text matches the search text
1070
- if (item.type != 'group' &&
1071
- (item.children?.length ?? 0) == 0 &&
1072
- (await this.translateService.translateAsync(item.text)).toLowerCase().includes(searchText.toLowerCase())) {
1073
- result.push(item);
930
+ transformFilter(filter) {
931
+ const { operator, value, filters, field } = filter;
932
+ // Find the operator (either default or custom)
933
+ const filterOperator = this.operators[operator?.type ?? ''] || null;
934
+ // Start by transforming the filter itself
935
+ const transformedFilter = {
936
+ ...filter, // Keep the original filter structure
937
+ operator: filterOperator ? filterOperator : operator, // Add operator name
938
+ };
939
+ // If the filter contains nested filters, recursively transform them
940
+ if (filters && filters.length > 0) {
941
+ transformedFilter.filters = this.transformFilters(filters); // Recursively transform nested filters
942
+ }
943
+ return transformedFilter;
944
+ }
945
+ getOperator(key) {
946
+ return this.operators[key];
947
+ }
948
+ // Helper function to return the default operators
949
+ getDefaultOperators() {
950
+ return ALL_DEFAULT_OPERATORS.reduce((acc, operator) => {
951
+ acc[operator.name] = {
952
+ type: operator.name,
953
+ };
954
+ return acc;
955
+ }, {});
956
+ }
957
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
958
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl }); }
959
+ }
960
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, decorators: [{
961
+ type: Injectable
962
+ }] });
963
+
964
+ class AXPErrorHandlerRegistryService {
965
+ constructor(injector) {
966
+ this.injector = injector;
967
+ this.errorHandlers = [];
968
+ }
969
+ register(...plugins) {
970
+ plugins.forEach(t => {
971
+ const childInjector = Injector.create({ providers: [{ provide: t, useClass: t, deps: [] }], parent: this.injector });
972
+ const handler = childInjector.get(t);
973
+ if (handler) {
974
+ this.errorHandlers.push(handler);
975
+ }
976
+ });
977
+ }
978
+ get handlers() {
979
+ return this.errorHandlers;
980
+ }
981
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPErrorHandlerRegistryService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
982
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPErrorHandlerRegistryService, providedIn: 'root' }); }
983
+ }
984
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPErrorHandlerRegistryService, decorators: [{
985
+ type: Injectable,
986
+ args: [{
987
+ providedIn: 'root'
988
+ }]
989
+ }], ctorParameters: () => [{ type: i0.Injector }] });
990
+
991
+ class AXPGlobalErrorHandler extends ErrorHandler {
992
+ constructor(injector, registry) {
993
+ super();
994
+ this.injector = injector;
995
+ this.registry = registry;
996
+ }
997
+ handleError(error) {
998
+ const handleErrorRecursively = (index, error) => {
999
+ const errorHandlers = this.registry.handlers;
1000
+ if (index < errorHandlers.length) {
1001
+ errorHandlers[index].handleError(error, (err) => {
1002
+ handleErrorRecursively(index + 1, err);
1003
+ });
1074
1004
  }
1075
- // Recursively search in children if they exist
1076
- if (item.children && item.children.length > 0) {
1077
- const childResults = await this.searchMenuItems(item.children, searchText);
1078
- result.push(...childResults.map((x) => ({ ...x, parent: item })));
1005
+ else {
1006
+ super.handleError(error); // Fallback to default handler
1079
1007
  }
1008
+ };
1009
+ if (error.message?.startsWith('NG0100')) {
1010
+ //ignore it
1011
+ return;
1080
1012
  }
1081
- return result;
1013
+ handleErrorRecursively(0, error);
1082
1014
  }
1015
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGlobalErrorHandler, deps: [{ token: i0.Injector }, { token: AXPErrorHandlerRegistryService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1016
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGlobalErrorHandler, providedIn: 'root' }); }
1083
1017
  }
1018
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGlobalErrorHandler, decorators: [{
1019
+ type: Injectable,
1020
+ args: [{ providedIn: 'root' }]
1021
+ }], ctorParameters: () => [{ type: i0.Injector }, { type: AXPErrorHandlerRegistryService }] });
1084
1022
 
1085
- class AXPMenuBadgeHelper {
1086
- static { this.cache = new WeakMap(); }
1087
- static getTotalCount(item, badgeService) {
1088
- if (this.cache.has(item))
1089
- return this.cache.get(item);
1090
- const own = item.badgeKey ? badgeService.getCount(item.badgeKey) : () => 0;
1091
- const children = item.children?.map(child => this.getTotalCount(child, badgeService)) ?? [];
1092
- const total = computed(() => own() + children.reduce((sum, s) => sum + s(), 0));
1093
- this.cache.set(item, total);
1094
- return total;
1023
+ // src/app/directives/grid-layout.directive.ts
1024
+ class AXPGridLayoutDirective {
1025
+ constructor(el, renderer) {
1026
+ this.el = el;
1027
+ this.renderer = renderer;
1095
1028
  }
1096
- }
1097
-
1098
- class AXPFooterTextSlotComponent {
1099
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFooterTextSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1100
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPFooterTextSlotComponent, isStandalone: true, selector: "ng-component", inputs: { text: "text" }, ngImport: i0, template: `
1101
- <small class="ax-text-sm" [innerHTML]="text"></small>
1102
- `, isInline: true }); }
1103
- }
1104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFooterTextSlotComponent, decorators: [{
1105
- type: Component,
1106
- args: [{
1107
- template: `
1108
- <small class="ax-text-sm" [innerHTML]="text"></small>
1109
- `,
1110
- standalone: true
1111
- }]
1112
- }], propDecorators: { text: [{
1113
- type: Input
1114
- }] } });
1115
-
1116
- class AXPNavBarSlotComponent {
1117
- handleCommand(action) {
1118
- // if (action)
1119
- // this.store.dispatch(action)
1029
+ ngOnChanges(changes) {
1030
+ if (changes['options']) {
1031
+ this.applyTailwindClasses();
1032
+ }
1120
1033
  }
1121
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPNavBarSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1122
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPNavBarSlotComponent, isStandalone: true, selector: "ng-component", inputs: { items: "items" }, ngImport: i0, template: `
1123
- <div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
1124
- <a *ngFor="let link of items" (click)="handleCommand(link.command)" >{{ link.text }}</a>
1125
- </div>
1126
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], encapsulation: i0.ViewEncapsulation.None }); }
1034
+ applyTailwindClasses() {
1035
+ if (this.options?.positions == null)
1036
+ return;
1037
+ // Clear existing grid classes
1038
+ this.clearClasses();
1039
+ // Apply new grid classes based on the input options
1040
+ this.setClasses(this.options.positions?.default, '');
1041
+ this.setClasses(this.options.positions?.md, 'md:');
1042
+ this.setClasses(this.options.positions?.lg, 'lg:');
1043
+ this.setClasses(this.options.positions?.xl, 'xl:');
1044
+ this.setClasses(this.options.positions?.xxl, '2xl:');
1045
+ }
1046
+ setClasses(positions, prefix) {
1047
+ if (positions == null)
1048
+ return;
1049
+ const colStart = positions.colStart ? `${prefix}ax-col-start-${positions.colStart}` : '';
1050
+ const colEnd = positions.colEnd ? `${prefix}ax-col-end-${positions.colEnd}` : '';
1051
+ const colSpan = positions.colSpan ? `${prefix}ax-col-span-${positions.colSpan}` : '';
1052
+ const rowStart = positions.rowStart ? `${prefix}ax-row-start-${positions.rowStart}` : '';
1053
+ const rowEnd = positions.rowEnd ? `${prefix}ax-row-end-${positions.rowEnd}` : '';
1054
+ const rowSpan = positions.rowSpan ? `${prefix}ax-row-span-${positions.rowSpan}` : '';
1055
+ const order = positions.order ? `${prefix}ax-order-${positions.order}` : ''; // Handling order
1056
+ [colStart, colEnd, colSpan, rowStart, rowEnd, rowSpan, order].forEach(cls => {
1057
+ if (cls) {
1058
+ this.renderer.addClass(this.el.nativeElement, cls);
1059
+ }
1060
+ });
1061
+ }
1062
+ clearClasses() {
1063
+ const currentClasses = this.el.nativeElement.className.split(' ');
1064
+ currentClasses.forEach((className) => {
1065
+ if (className.startsWith('ax-col-') || className.startsWith('ax-row-') || className.startsWith('ax-order-')) {
1066
+ this.renderer.removeClass(this.el.nativeElement, className);
1067
+ }
1068
+ });
1069
+ }
1070
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGridLayoutDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1071
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: AXPGridLayoutDirective, isStandalone: true, selector: "[gridLayout]", inputs: { options: ["gridLayout", "options"] }, usesOnChanges: true, ngImport: i0 }); }
1127
1072
  }
1128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPNavBarSlotComponent, decorators: [{
1129
- type: Component,
1073
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPGridLayoutDirective, decorators: [{
1074
+ type: Directive,
1130
1075
  args: [{
1131
- template: `
1132
- <div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
1133
- <a *ngFor="let link of items" (click)="handleCommand(link.command)" >{{ link.text }}</a>
1134
- </div>
1135
- `,
1136
- imports: [CommonModule],
1137
- encapsulation: ViewEncapsulation.None
1076
+ selector: '[gridLayout]',
1077
+ standalone: true,
1138
1078
  }]
1139
- }], propDecorators: { items: [{
1140
- type: Input
1079
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { options: [{
1080
+ type: Input,
1081
+ args: ['gridLayout']
1141
1082
  }] } });
1142
1083
 
1143
- class AXPSearchDefinitionProviderContext {
1144
- constructor() {
1145
- this.definitions = [];
1146
- this.definitionMap = new Map();
1084
+ class AXPStickyDirective {
1085
+ get isSticky() {
1086
+ return this._isSticky;
1147
1087
  }
1148
- addDefinition(name, title, group, icon, order, options) {
1149
- const definitionSearch = {
1150
- name,
1151
- title,
1152
- group,
1153
- icon,
1154
- order,
1155
- format: {
1156
- title: options?.format?.title ?? '{{ title }}',
1157
- description: options?.format?.description ?? undefined,
1158
- icon: options?.format?.icon ?? undefined,
1159
- id: options?.format?.id ?? '{{ id }}',
1160
- },
1161
- actions: options?.actions ?? [],
1162
- };
1163
- this.definitions.push(definitionSearch);
1164
- this.definitionMap.set(name, definitionSearch); // Index by name
1165
- return new AXPSearchDefinitionBuilder(this, definitionSearch);
1088
+ set isSticky(value) {
1089
+ if (this._isSticky !== value) {
1090
+ this._isSticky = value;
1091
+ this.isStickyChange.emit(value);
1092
+ }
1166
1093
  }
1167
- getDefinitions() {
1168
- return this.definitions;
1094
+ constructor(element, renderer, zone, cdr) {
1095
+ this.element = element;
1096
+ this.renderer = renderer;
1097
+ this.zone = zone;
1098
+ this.cdr = cdr;
1099
+ this.stickyOffset = 100;
1100
+ this.isStickyChange = new EventEmitter();
1101
+ this._isSticky = false;
1102
+ this.onParentScroll = () => {
1103
+ this.zone.runOutsideAngular(() => {
1104
+ const scrollTop = this.parentElement === window
1105
+ ? window.scrollY
1106
+ : this.parentElement.scrollTop;
1107
+ const shouldStick = scrollTop + this.stickyOffset >= this.topOffset;
1108
+ if (shouldStick !== this.isSticky) {
1109
+ this.zone.run(() => {
1110
+ this.isSticky = shouldStick;
1111
+ this.toggleStickyClasses(shouldStick);
1112
+ this.cdr.markForCheck();
1113
+ });
1114
+ }
1115
+ });
1116
+ };
1169
1117
  }
1170
- // Expose groupMap for controlled access
1171
- hasEntity(name) {
1172
- return this.definitionMap.has(name);
1118
+ ngAfterViewInit() {
1119
+ this.initSticky();
1120
+ // Add mutation observer for dynamic content
1121
+ this.mutationObserver = new MutationObserver(() => {
1122
+ this.updateTopOffset();
1123
+ });
1124
+ this.mutationObserver.observe(this.element.nativeElement, {
1125
+ childList: true,
1126
+ subtree: true,
1127
+ });
1128
+ // Add resize event listener
1129
+ window.addEventListener('resize', this.updateTopOffset.bind(this));
1173
1130
  }
1174
- getDefinition(name) {
1175
- return this.definitionMap.get(name);
1131
+ initSticky() {
1132
+ if (this.stickyParent instanceof HTMLElement) {
1133
+ this.parentElement = this.stickyParent;
1134
+ }
1135
+ else {
1136
+ this.parentElement =
1137
+ document.querySelector(this.stickyParent) || window;
1138
+ }
1139
+ this.targetElement =
1140
+ document.querySelector(this.stickyTarget) ||
1141
+ this.element.nativeElement;
1142
+ this.updateTopOffset();
1143
+ this.parentElement.addEventListener('scroll', this.onParentScroll);
1176
1144
  }
1177
- }
1178
- class AXPSearchDefinitionBuilder {
1179
- constructor(context, definition) {
1180
- this.context = context;
1181
- this.definition = definition;
1145
+ updateTopOffset() {
1146
+ this.zone.runOutsideAngular(() => {
1147
+ const rect = this.targetElement.getBoundingClientRect();
1148
+ this.topOffset = rect.top + (window.scrollY || 0);
1149
+ });
1182
1150
  }
1183
- addAction(name) {
1184
- const newAction = {
1185
- name,
1186
- type: 'view',
1187
- priority: 'primary',
1188
- };
1189
- this.definition.actions.push(newAction);
1190
- return new AXPSearchDefinitionActionBuilder(this);
1151
+ toggleStickyClasses(isSticky) {
1152
+ const classes = this.stickyClass.split(' ').filter(Boolean);
1153
+ classes.forEach((className) => {
1154
+ if (isSticky) {
1155
+ this.renderer.addClass(this.targetElement, className);
1156
+ }
1157
+ else {
1158
+ this.renderer.removeClass(this.targetElement, className);
1159
+ }
1160
+ });
1191
1161
  }
1192
- action(name) {
1193
- const foundAction = this.definition.actions.find((action) => action.name === name);
1194
- if (!foundAction) {
1195
- throw new Error(`action with name "${name}" not found in entity "${this.definition.name}".`);
1162
+ ngOnDestroy() {
1163
+ this.parentElement.removeEventListener('scroll', this.onParentScroll);
1164
+ window.removeEventListener('resize', this.updateTopOffset.bind(this));
1165
+ if (this.mutationObserver) {
1166
+ this.mutationObserver.disconnect();
1196
1167
  }
1197
- return new AXPSearchDefinitionActionBuilder(this);
1198
- }
1199
- endEntity() {
1200
- return this.context;
1201
- }
1202
- }
1203
- class AXPSearchDefinitionActionBuilder {
1204
- constructor(entityBuilder) {
1205
- this.entityBuilder = entityBuilder;
1206
- }
1207
- endAction() {
1208
- return this.entityBuilder;
1209
1168
  }
1169
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPStickyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1170
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: AXPStickyDirective, isStandalone: true, selector: "[axpSticky]", inputs: { stickyClass: ["axpSticky", "stickyClass"], stickyOffset: "stickyOffset", stickyParent: "stickyParent", stickyTarget: "stickyTarget" }, outputs: { isStickyChange: "isStickyChange" }, exportAs: ["axpSticky"], ngImport: i0 }); }
1210
1171
  }
1172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPStickyDirective, decorators: [{
1173
+ type: Directive,
1174
+ args: [{
1175
+ selector: '[axpSticky]',
1176
+ exportAs: 'axpSticky',
1177
+ standalone: true,
1178
+ }]
1179
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { stickyClass: [{
1180
+ type: Input,
1181
+ args: ['axpSticky']
1182
+ }], stickyOffset: [{
1183
+ type: Input,
1184
+ args: ['stickyOffset']
1185
+ }], isStickyChange: [{
1186
+ type: Output
1187
+ }], stickyParent: [{
1188
+ type: Input
1189
+ }], stickyTarget: [{
1190
+ type: Input
1191
+ }] } });
1211
1192
 
1212
- // Injection token for setting providers
1213
- const AXP_SEARCH_DEFINITION_PROVIDER = new InjectionToken('AXP_SEARCH_DEFINITION_PROVIDER');
1214
- class AXPSearchDefinitionProviderService {
1193
+ class AXPComponentSlotRegistryService {
1215
1194
  constructor() {
1216
- this.providers = inject(AXP_SEARCH_DEFINITION_PROVIDER, { optional: true });
1217
- this.cache = null;
1218
- }
1219
- async load() {
1220
- if (this.cache) {
1221
- return;
1222
- }
1223
- const context = new AXPSearchDefinitionProviderContext();
1224
- if (Array.isArray(this.providers)) {
1225
- for (const provider of this.providers) {
1226
- await provider.provide(context);
1227
- }
1228
- }
1229
- this.cache = context.getDefinitions();
1230
- }
1231
- async getListAsync() {
1232
- await this.load();
1233
- return this.getList();
1234
- }
1235
- getList() {
1236
- if (!this.cache) {
1237
- return [];
1238
- }
1239
- else {
1240
- return this.cache;
1241
- }
1195
+ this.registry = new Map();
1242
1196
  }
1243
- findDefinition(definitionName) {
1244
- const definition = this.getList().find((definition) => definition.name === definitionName);
1245
- if (!definition) {
1246
- throw new Error(`Definition with name ${definitionName} not found`);
1197
+ register(slotName, config) {
1198
+ let configs = this.registry.get(slotName) || [];
1199
+ // Check if the component is already registered in this slot
1200
+ const isDuplicate = configs.some(existingConfig => existingConfig.name === config.name);
1201
+ if (!isDuplicate) {
1202
+ configs = [...configs, config]; // Add the new configuration
1203
+ this.registry.set(slotName, configs);
1247
1204
  }
1248
- return definition;
1249
1205
  }
1250
- findDefinitionByGroup(definitionGroup) {
1251
- const definition = this.getList().find((definition) => definition.group === definitionGroup);
1252
- if (!definition) {
1253
- throw new Error(`Definition with group ${definitionGroup} not found`);
1254
- }
1255
- return definition;
1206
+ get(slotName) {
1207
+ return this.registry.get(slotName) || [];
1256
1208
  }
1257
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1258
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, providedIn: 'root' }); }
1209
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1210
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, providedIn: 'root' }); }
1259
1211
  }
1260
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, decorators: [{
1212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotRegistryService, decorators: [{
1261
1213
  type: Injectable,
1262
- args: [{ providedIn: 'root' }]
1214
+ args: [{
1215
+ providedIn: 'root'
1216
+ }]
1263
1217
  }] });
1264
1218
 
1265
- class AXPSearchCommandProvider {
1266
- async search(text) {
1267
- return this.commands.filter((command) => command.title.toLowerCase().includes(text.toLowerCase()));
1268
- }
1269
- }
1270
-
1271
- // Injection token for setting providers
1272
- const AXP_SEARCH_PROVIDER = new InjectionToken('AXP_SEARCH_PROVIDER');
1273
- class AXPSearchService {
1274
- constructor() {
1275
- this.providers = inject(AXP_SEARCH_PROVIDER, { optional: true });
1276
- this.definitionService = inject(AXPSearchDefinitionProviderService);
1277
- this.formatService = inject(AXFormatService);
1219
+ class AXPComponentSlotLoaderService {
1220
+ constructor(registryService, injector) {
1221
+ this.registryService = registryService;
1222
+ this.injector = injector;
1278
1223
  }
1279
- async search(text) {
1280
- //TODO better handle this
1281
- if (this.definitionService.getList().length == 0) {
1282
- await this.definitionService.getListAsync();
1283
- }
1284
- if (!this.providers || (this.providers?.length || 0) === 0) {
1285
- throw new Error('No search providers available'); // No providers available
1286
- }
1287
- const mergeData = [];
1288
- const promises = this.providers.map((provider) => provider.search(text));
1289
- const results = await Promise.all(promises);
1290
- for (const resultArray of results) {
1291
- for (const result of resultArray) {
1292
- try {
1293
- const definition = this.definitionService.findDefinition(result.group);
1294
- mergeData.push({
1295
- definitionName: definition.group,
1296
- definitionTitle: definition.title,
1297
- name: result.group,
1298
- id: `${definition.name}:${this.formatService.format(definition.format.id, 'string', result)}`,
1299
- title: result.title ??
1300
- (definition.format.title
1301
- ? this.formatService.format(definition.format.title, 'string', result.data)
1302
- : 'Unknown'),
1303
- description: result.description ??
1304
- (definition.format.description
1305
- ? this.formatService.format(definition.format.description, 'string', result.data)
1306
- : undefined),
1307
- icon: result.icon ??
1308
- (result.icon
1309
- ? this.formatService.format(definition.format.icon, 'string', result.data)
1310
- : definition.icon),
1311
- data: result.data,
1312
- command: result.command,
1313
- actions: definition.actions,
1314
- parent: result.parent,
1315
- order: definition.order,
1224
+ loadComponent(slotName, viewContainerRef) {
1225
+ const configs = sortBy(this.registryService.get(slotName), (c) => c.priority ?? 0);
1226
+ if (configs) {
1227
+ viewContainerRef.clear();
1228
+ configs.forEach(async (config) => {
1229
+ let component;
1230
+ let options = {};
1231
+ if (typeof config.loadComponent === 'function') {
1232
+ // If component is a function
1233
+ runInInjectionContext(this.injector, () => {
1234
+ component = config.loadComponent?.();
1316
1235
  });
1317
1236
  }
1318
- catch (e) {
1319
- console.error(e);
1237
+ else if (config.component) {
1238
+ // If component is a Type
1239
+ component = config.component;
1320
1240
  }
1321
- }
1322
- }
1323
- // Group data
1324
- const groupedData = [];
1325
- const groupMap = {};
1326
- // Create groups
1327
- for (const item of mergeData) {
1328
- const groupName = item.definitionName; // Change this to the property you want to group by
1329
- if (!groupMap[groupName]) {
1330
- groupMap[groupName] = {
1331
- name: groupName,
1332
- title: item.definitionTitle, // You can adjust the title logic if needed
1333
- order: item.order, // Add order to the group
1334
- children: [],
1335
- };
1336
- groupedData.push(groupMap[groupName]);
1337
- }
1338
- groupMap[groupName].children.push(omit(item, ['definitionName', 'definitionTitle', 'order']));
1241
+ //
1242
+ if (typeof config.options === 'function') {
1243
+ // If options is a function
1244
+ runInInjectionContext(this.injector, () => {
1245
+ const fun = config.options;
1246
+ options = fun();
1247
+ });
1248
+ }
1249
+ else if (config.options) {
1250
+ // If options is a object
1251
+ options = config.options;
1252
+ }
1253
+ //
1254
+ if (component != null) {
1255
+ const componentRef = viewContainerRef.createComponent(component);
1256
+ Object.assign(componentRef.instance, options);
1257
+ }
1258
+ });
1339
1259
  }
1340
- // Sort groups by order
1341
- groupedData.sort((a, b) => a.order - b.order);
1342
- return groupedData;
1343
1260
  }
1344
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1345
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, providedIn: 'root' }); }
1261
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, deps: [{ token: AXPComponentSlotRegistryService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
1262
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, providedIn: 'root' }); }
1346
1263
  }
1347
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, decorators: [{
1264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotLoaderService, decorators: [{
1348
1265
  type: Injectable,
1349
- args: [{ providedIn: 'root' }]
1350
- }] });
1351
-
1352
- class AXPSettingDefinitionProviderContext {
1353
- constructor() {
1354
- this.rootGroups = [];
1355
- this.groupMap = new Map();
1356
- }
1357
- addGroup(name, title, description, icon) {
1358
- const newGroup = {
1359
- name,
1360
- title,
1361
- description,
1362
- icon,
1363
- groups: [],
1364
- sections: [],
1365
- };
1366
- this.rootGroups.push(newGroup);
1367
- this.groupMap.set(name, newGroup); // Index by name
1368
- return new AXPSettingDefinitionGroupBuilder(this, newGroup);
1369
- }
1370
- group(name) {
1371
- const foundGroup = this.groupMap.get(name);
1372
- if (!foundGroup) {
1373
- throw new Error(`Group with name "${name}" not found.`);
1374
- }
1375
- return new AXPSettingDefinitionGroupBuilder(this, foundGroup);
1376
- }
1377
- getGroups() {
1378
- return this.rootGroups;
1379
- }
1380
- // Expose groupMap for controlled access
1381
- hasGroup(name) {
1382
- return this.groupMap.has(name);
1266
+ args: [{
1267
+ providedIn: 'root',
1268
+ }]
1269
+ }], ctorParameters: () => [{ type: AXPComponentSlotRegistryService }, { type: i0.Injector }] });
1270
+
1271
+ class AXPComponentSlotDirective {
1272
+ constructor(dynamicLoaderService, viewContainerRef) {
1273
+ this.dynamicLoaderService = dynamicLoaderService;
1274
+ this.viewContainerRef = viewContainerRef;
1383
1275
  }
1384
- getGroup(name) {
1385
- return this.groupMap.get(name);
1276
+ ngOnInit() {
1277
+ this.dynamicLoaderService.loadComponent(this.name, this.viewContainerRef);
1386
1278
  }
1279
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotDirective, deps: [{ token: AXPComponentSlotLoaderService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1280
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: AXPComponentSlotDirective, isStandalone: false, selector: "axp-component-slot", inputs: { name: "name" }, ngImport: i0 }); }
1387
1281
  }
1388
- class AXPSettingDefinitionGroupBuilder {
1389
- constructor(context, group) {
1390
- this.context = context;
1391
- this.group = group;
1392
- }
1393
- addSection(name, title, description) {
1394
- const newSection = {
1395
- name,
1396
- title,
1397
- description: description,
1398
- settings: [],
1282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotDirective, decorators: [{
1283
+ type: Directive,
1284
+ args: [{
1285
+ selector: 'axp-component-slot',
1286
+ standalone: false
1287
+ }]
1288
+ }], ctorParameters: () => [{ type: AXPComponentSlotLoaderService }, { type: i0.ViewContainerRef }], propDecorators: { name: [{
1289
+ type: Input
1290
+ }] } });
1291
+
1292
+ class AXPComponentSlotModule {
1293
+ static forRoot(configs) {
1294
+ return {
1295
+ ngModule: AXPComponentSlotModule,
1296
+ providers: [
1297
+ {
1298
+ provide: 'AXPComponentSlotModuleFactory',
1299
+ useFactory: (registry) => () => {
1300
+ if (configs) {
1301
+ for (const [key, value] of Object.entries(configs)) {
1302
+ value.forEach(v => {
1303
+ registry.register(key, v);
1304
+ });
1305
+ }
1306
+ }
1307
+ },
1308
+ deps: [AXPComponentSlotRegistryService],
1309
+ multi: true
1310
+ }
1311
+ ]
1399
1312
  };
1400
- this.group.sections.push(newSection);
1401
- return new AXPSettingDefinitionSectionBuilder(this, newSection);
1402
- }
1403
- section(name) {
1404
- const foundSection = this.group.sections.find((section) => section.name === name);
1405
- if (!foundSection) {
1406
- throw new Error(`Section with name "${name}" not found in group "${this.group.name}".`);
1407
- }
1408
- return new AXPSettingDefinitionSectionBuilder(this, foundSection);
1409
1313
  }
1410
- addGroup(name, title, description, icon) {
1411
- const newGroup = {
1412
- name,
1413
- title,
1414
- description: description,
1415
- icon,
1416
- groups: [],
1417
- sections: [],
1314
+ static forChild(configs) {
1315
+ return {
1316
+ ngModule: AXPComponentSlotModule,
1317
+ providers: [
1318
+ {
1319
+ provide: 'AXPComponentSlotModuleFactory',
1320
+ useFactory: (registry) => () => {
1321
+ if (configs) {
1322
+ for (const [key, value] of Object.entries(configs)) {
1323
+ value.forEach(v => {
1324
+ registry.register(key, v);
1325
+ });
1326
+ }
1327
+ }
1328
+ },
1329
+ deps: [AXPComponentSlotRegistryService],
1330
+ multi: true
1331
+ }
1332
+ ]
1418
1333
  };
1419
- this.group.groups.push(newGroup);
1420
- if (this.context.hasGroup(name)) {
1421
- throw new Error(`Group with name "${name}" already exists.`);
1422
- }
1423
- this.context['groupMap'].set(name, newGroup);
1424
- return new AXPSettingDefinitionGroupBuilder(this.context, newGroup);
1425
1334
  }
1426
- endGroup() {
1427
- return this.context;
1335
+ /**
1336
+ * @ignore
1337
+ */
1338
+ constructor(instances) {
1339
+ instances?.forEach(f => {
1340
+ f();
1341
+ });
1428
1342
  }
1343
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, deps: [{ token: 'AXPComponentSlotModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
1344
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, declarations: [AXPComponentSlotDirective], exports: [AXPComponentSlotDirective] }); }
1345
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule }); }
1429
1346
  }
1430
- class AXPSettingDefinitionSectionBuilder {
1431
- constructor(groupBuilder, section) {
1432
- this.groupBuilder = groupBuilder;
1433
- this.section = section;
1434
- }
1435
- addSetting(setting) {
1436
- const newSetting = {
1437
- name: setting.key,
1438
- title: setting.title,
1439
- description: setting.description,
1440
- isRequired: setting.isRequired ?? false,
1441
- isInherited: setting.isInherited ?? false,
1442
- isEncrypted: setting.isEncrypted ?? false,
1443
- defaultValue: setting.defaultValue,
1444
- scope: setting.scope ?? 'G',
1445
- layout: setting.widget.layout,
1446
- widget: {
1447
- type: setting.widget.type,
1448
- name: setting.key,
1449
- path: setting.key,
1450
- defaultValue: setting.defaultValue,
1451
- options: merge(setting.widget.options ?? {}, {
1452
- label: setting.widget.options?.['label'] ?? setting.title,
1453
- validationRules: setting.validationRules ?? [],
1454
- }),
1455
- valueTransforms: setting.valueTransforms,
1456
- triggers: setting.widget.triggers,
1457
- },
1458
- };
1459
- this.section.settings.push(newSetting);
1460
- return this;
1461
- }
1462
- endSection() {
1463
- return this.groupBuilder;
1347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPComponentSlotModule, decorators: [{
1348
+ type: NgModule,
1349
+ args: [{
1350
+ declarations: [AXPComponentSlotDirective],
1351
+ exports: [AXPComponentSlotDirective]
1352
+ }]
1353
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1354
+ type: Optional
1355
+ }, {
1356
+ type: Inject,
1357
+ args: ['AXPComponentSlotModuleFactory']
1358
+ }] }] });
1359
+
1360
+ class AXPLogoComponent {
1361
+ ngOnInit() {
1362
+ switch (true) {
1363
+ case this.source instanceof AXPTextLogoConfig:
1364
+ this.logoType = 'text';
1365
+ break;
1366
+ case this.source instanceof AXPImageUrlLogoConfig:
1367
+ this.logoType = 'url';
1368
+ break;
1369
+ case this.source instanceof AXPFontIconLogoConfig:
1370
+ this.logoType = 'iconClass';
1371
+ break;
1372
+ case this.source instanceof AXPComponentLogoConfig:
1373
+ this.logoType = 'component';
1374
+ break;
1375
+ default:
1376
+ break;
1377
+ }
1464
1378
  }
1379
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1380
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPLogoComponent, isStandalone: true, selector: "axp-logo", inputs: { source: "source" }, host: { classAttribute: "ax-flex ax-justify-center" }, ngImport: i0, template: "@switch (logoType) {\n@case ('text') {\n<span class=\"ax-font-bold ax-select-none\">{{ source.text }}</span>\n}\n@case ('url') {\n<ax-image [src]=\"source.url\"></ax-image>\n} @case ('iconClass') {\n<ax-icon class=\"{{ source.classIcon }}\"></ax-icon>\n} @case ('component') {\n<ng-container *ngComponentOutlet=\"source.component\"></ng-container>\n}\n}", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "ngmodule", type: AXImageModule }, { kind: "component", type: i2.AXImageComponent, selector: "ax-image", inputs: ["overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }] }); }
1465
1381
  }
1382
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLogoComponent, decorators: [{
1383
+ type: Component,
1384
+ args: [{ selector: 'axp-logo', imports: [CommonModule, AXImageModule, AXDecoratorModule], host: { class: 'ax-flex ax-justify-center' }, template: "@switch (logoType) {\n@case ('text') {\n<span class=\"ax-font-bold ax-select-none\">{{ source.text }}</span>\n}\n@case ('url') {\n<ax-image [src]=\"source.url\"></ax-image>\n} @case ('iconClass') {\n<ax-icon class=\"{{ source.classIcon }}\"></ax-icon>\n} @case ('component') {\n<ng-container *ngComponentOutlet=\"source.component\"></ng-container>\n}\n}" }]
1385
+ }], propDecorators: { source: [{
1386
+ type: Input
1387
+ }] } });
1466
1388
 
1467
- // Injection token for setting providers
1468
- const AXP_SETTING_DEFINITION_PROVIDER = new InjectionToken('AXP_SETTING_DEFINITION_PROVIDER');
1469
- class AXPSettingDefinitionProviderService {
1389
+ const AXP_MENU_PROVIDER = new InjectionToken('AXP_MENU_PROVIDER');
1390
+ class AXPMenuProviderService {
1470
1391
  constructor() {
1471
- this.providers = inject(AXP_SETTING_DEFINITION_PROVIDER, { optional: true });
1392
+ this.providers = inject(AXP_MENU_PROVIDER, { optional: true });
1472
1393
  this.cache = null;
1394
+ this.pendingInserts = [];
1395
+ this.pendingRemovals = [];
1396
+ this.pendingUpdates = [];
1397
+ this.pendingAdditions = [];
1473
1398
  }
1474
- async load() {
1399
+ async items() {
1400
+ // Return cached items if available
1475
1401
  if (this.cache) {
1476
- return;
1402
+ return this.cache;
1403
+ }
1404
+ const items = [];
1405
+ const context = this.createMenuProviderContext(items);
1406
+ if (Array.isArray(this.providers)) {
1407
+ for (const provider of this.providers) {
1408
+ await provider.provide(context);
1409
+ }
1410
+ }
1411
+ // Apply pending operations
1412
+ this.applyPendingOperations(items);
1413
+ // Sort items by priority
1414
+ items.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
1415
+ // ADD level property to items
1416
+ setMenuItemMeta(items);
1417
+ // Cache the computed items
1418
+ this.cache = items;
1419
+ return items;
1420
+ }
1421
+ createMenuProviderContext(items) {
1422
+ return {
1423
+ addItems: (newItems) => {
1424
+ items.push(...newItems);
1425
+ },
1426
+ find: (target) => {
1427
+ return {
1428
+ insert: (newItems, position) => {
1429
+ this.pendingInserts.push({ target, newItems, position });
1430
+ },
1431
+ remove: () => {
1432
+ this.pendingRemovals.push(target);
1433
+ },
1434
+ update: (updatedItem) => {
1435
+ this.pendingUpdates.push({ target, updatedItem });
1436
+ },
1437
+ addItems: (newItems) => {
1438
+ this.pendingAdditions.push({ target, newItems });
1439
+ }
1440
+ };
1441
+ }
1442
+ };
1443
+ }
1444
+ applyPendingOperations(items) {
1445
+ for (const { target, newItems, position } of this.pendingInserts) {
1446
+ const foundItemInfo = this.findItemWithParent(items, target);
1447
+ const { foundItem, parentItems } = foundItemInfo;
1448
+ if (!foundItem) {
1449
+ console.warn(`Target "${target}" not found, appending items.`);
1450
+ items.push(...newItems);
1451
+ }
1452
+ else {
1453
+ if (position == 'inside') {
1454
+ foundItem.children?.push(...newItems);
1455
+ }
1456
+ else {
1457
+ const index = parentItems.indexOf(foundItem);
1458
+ const insertPosition = position === 'before' ? index : index + 1;
1459
+ parentItems.splice(insertPosition, 0, ...newItems);
1460
+ }
1461
+ }
1462
+ }
1463
+ for (const target of this.pendingRemovals) {
1464
+ const foundItemInfo = this.findItemWithParent(items, target);
1465
+ const { foundItem, parentItems } = foundItemInfo;
1466
+ if (!foundItem) {
1467
+ console.warn(`Target "${target}" not found, nothing to remove.`);
1468
+ }
1469
+ else {
1470
+ const index = parentItems.indexOf(foundItem);
1471
+ parentItems.splice(index, 1);
1472
+ }
1477
1473
  }
1478
- const context = new AXPSettingDefinitionProviderContext();
1479
- if (Array.isArray(this.providers)) {
1480
- for (const provider of this.providers) {
1481
- if (provider instanceof Promise) {
1482
- // If provider is a promise, resolve it
1483
- const resolvedProvider = await provider;
1484
- await resolvedProvider.provide(context);
1474
+ for (const { target, updatedItem } of this.pendingUpdates) {
1475
+ const foundItemInfo = this.findItemWithParent(items, target);
1476
+ const { foundItem } = foundItemInfo;
1477
+ if (!foundItem) {
1478
+ console.warn(`Target "${target}" not found, nothing to update.`);
1479
+ }
1480
+ else {
1481
+ Object.assign(foundItem, updatedItem);
1482
+ }
1483
+ }
1484
+ for (const { target, newItems } of this.pendingAdditions) {
1485
+ const foundItemInfo = this.findItemWithParent(items, target);
1486
+ const { foundItem } = foundItemInfo;
1487
+ if (!foundItem) {
1488
+ console.warn(`Target "${target}" not found, nothing to add items to.`);
1489
+ }
1490
+ else {
1491
+ if (!foundItem.children) {
1492
+ foundItem.children = [];
1485
1493
  }
1486
- else {
1487
- // If provider is a direct instance, use it directly
1488
- await provider.provide(context);
1494
+ foundItem.children.push(...newItems);
1495
+ }
1496
+ }
1497
+ // Clear pending operations after applying them
1498
+ this.pendingInserts = [];
1499
+ this.pendingRemovals = [];
1500
+ this.pendingUpdates = [];
1501
+ this.pendingAdditions = [];
1502
+ }
1503
+ findItemWithParent(items, target, parentItems = items) {
1504
+ for (const item of items) {
1505
+ if (item.name === target) {
1506
+ return { foundItem: item, parentItems };
1507
+ }
1508
+ if (item.children) {
1509
+ const result = this.findItemWithParent(item.children, target, item.children);
1510
+ if (result.foundItem) {
1511
+ return result;
1489
1512
  }
1490
1513
  }
1491
1514
  }
1492
- this.cache = context.getGroups();
1515
+ return { foundItem: null, parentItems: items };
1493
1516
  }
1494
- async reload() {
1517
+ // Method to clear the cache, if needed (e.g., when providers change)
1518
+ clearCache() {
1495
1519
  this.cache = null;
1496
- await this.load();
1497
- }
1498
- async getListAsync(scope) {
1499
- await this.load();
1500
- return this.getList(scope);
1520
+ this.pendingInserts = [];
1521
+ this.pendingRemovals = [];
1522
+ this.pendingUpdates = [];
1523
+ this.pendingAdditions = [];
1501
1524
  }
1502
- getList(scope) {
1503
- if (!this.cache) {
1504
- return [];
1525
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1526
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, providedIn: 'root' }); }
1527
+ }
1528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPMenuProviderService, decorators: [{
1529
+ type: Injectable,
1530
+ args: [{ providedIn: 'root' }]
1531
+ }] });
1532
+ function setMenuItemMeta(items, parentIndex = '', depth = 0) {
1533
+ items.forEach((item, index) => {
1534
+ const currentIndex = parentIndex ? `${parentIndex}-${index}` : `${index}`;
1535
+ const hasChildren = !!(item.children && Array.isArray(item.children) && item.children.length > 0);
1536
+ item.meta = {
1537
+ index: currentIndex,
1538
+ isRoot: depth === 0,
1539
+ hasChildren,
1540
+ depth
1541
+ };
1542
+ if (hasChildren) {
1543
+ setMenuItemMeta(item.children, currentIndex, depth + 1);
1505
1544
  }
1506
- const scopeOrder = ['C', 'G', 'T', 'U']; // Scopes hierarchy in ascending order
1507
- const filterByScope = (groups, currentScope) => {
1508
- const currentScopeIndex = scopeOrder.indexOf(currentScope);
1509
- return groups
1510
- .map((group) => ({
1511
- ...group,
1512
- sections: group.sections.map((section) => ({
1513
- ...section,
1514
- settings: section.settings.filter((setting) => {
1515
- const settingScopeIndex = scopeOrder.indexOf(setting.scope);
1516
- // Include settings where:
1517
- // 1. The scope matches the requested scope.
1518
- if (setting.scope === currentScope)
1519
- return true;
1520
- // 2. The setting scope is higher (closer to 'U') and is inherited.
1521
- if (setting.isInherited &&
1522
- settingScopeIndex > currentScopeIndex // Higher scope
1523
- ) {
1524
- return true;
1545
+ });
1546
+ }
1547
+
1548
+ const AXPMenuService = signalStore({ providedIn: 'root' },
1549
+ // Initial State
1550
+ withState((router = inject(Router)) => {
1551
+ return {
1552
+ items: [],
1553
+ selectedMenuItem: {
1554
+ item: null,
1555
+ isFullMatch: false
1556
+ },
1557
+ };
1558
+ }),
1559
+ // Methods for State Management
1560
+ withMethods((store, router = inject(Router), workflow = inject(AXPWorkflowService)) => {
1561
+ return {
1562
+ setMenuItems(items) {
1563
+ patchState(store, { items: items });
1564
+ },
1565
+ selectMenuItemByRoute(path) {
1566
+ const findItem = (items) => {
1567
+ for (const item of items) {
1568
+ // Recursively search children first
1569
+ if (item.children) {
1570
+ const foundChild = findItem(item.children);
1571
+ if (foundChild.item) {
1572
+ return foundChild;
1525
1573
  }
1526
- // 3. Exclude settings with a lower or irrelevant scope.
1527
- return false;
1528
- }),
1529
- })).filter((section) => section.settings.length > 0), // Keep only sections with settings
1530
- groups: filterByScope(group.groups, currentScope), // Recursively filter nested groups
1531
- }))
1532
- .filter((group) => group.sections.length > 0 || group.groups.length > 0); // Keep groups with valid sections or nested groups
1533
- };
1534
- return filterByScope(this.cache, scope);
1535
- }
1536
- async defaultValues() {
1537
- const defaults = {};
1538
- const collectDefaults = (groups) => {
1539
- groups.forEach((group) => {
1540
- group.sections.forEach((section) => {
1541
- section.settings.forEach((setting) => {
1542
- if (setting.defaultValue !== undefined) {
1543
- defaults[setting.name] = setting.defaultValue;
1574
+ }
1575
+ if (item.path) {
1576
+ // Check if the item path matches the current path
1577
+ const matchResult = pathsMatch(item.path, path, ["list", "view", "edit", "create"]);
1578
+ if (matchResult.isMatch) {
1579
+ return { item, isPartialMatch: matchResult.isPartial };
1544
1580
  }
1545
- });
1546
- });
1547
- collectDefaults(group.groups);
1548
- });
1549
- };
1550
- if (!this.cache) {
1551
- await this.load();
1552
- }
1553
- collectDefaults(this.cache);
1554
- return defaults;
1555
- }
1556
- findGroup(scope, groupName) {
1557
- return this.searchRecursive(this.getList(scope), groupName, []); // Initialize with an empty breadcrumb
1558
- }
1559
- searchRecursive(groups, groupName, breadcrumb) {
1560
- for (const group of groups) {
1561
- const currentBreadcrumb = [...breadcrumb, { name: group.name, title: group.title, description: group.description }];
1562
- // If the group name matches, return its details
1563
- if (group.name === groupName) {
1581
+ }
1582
+ }
1583
+ return { item: null, isPartialMatch: false };
1584
+ };
1585
+ const pathsMatch = (itemPath, currentPath, trailingSegmentsToIgnore = []) => {
1586
+ const itemSegments = itemPath.split('/').filter(segment => segment.length > 0);
1587
+ const pathSegments = currentPath.split('/').filter(segment => segment.length > 0);
1588
+ const menuLength = itemSegments.length;
1589
+ const pathLength = pathSegments.length;
1590
+ // Identify the effective base length for the menuPath
1591
+ let effectiveMenuLength = menuLength;
1592
+ if (menuLength > 0 &&
1593
+ trailingSegmentsToIgnore.includes(itemSegments[menuLength - 1])) {
1594
+ effectiveMenuLength--; // Exclude trailing non-hierarchical segments
1595
+ }
1596
+ // Check if the menuPath (base segments) is a prefix of browserPath
1597
+ let isPrefix = true;
1598
+ for (let i = 0; i < effectiveMenuLength; i++) {
1599
+ if (itemSegments[i] !== pathSegments[i]) {
1600
+ isPrefix = false;
1601
+ break;
1602
+ }
1603
+ }
1604
+ // Partial match: menuPath base is a strict prefix of browserPath
1605
+ const isPartialMatch = isPrefix && effectiveMenuLength < pathLength;
1606
+ // Exact match: all segments match completely
1607
+ const isExactMatch = isPrefix && effectiveMenuLength === pathLength;
1564
1608
  return {
1565
- breadcrumb: currentBreadcrumb,
1566
- sections: group.sections.length > 0 ? group.sections : null,
1567
- groups: group.groups.length > 0 ? group.groups : null,
1609
+ isMatch: isExactMatch || isPartialMatch,
1610
+ isPartial: isPartialMatch && !isExactMatch,
1568
1611
  };
1612
+ };
1613
+ const items = store.items();
1614
+ const { item, isPartialMatch } = findItem(items);
1615
+ patchState(store, { selectedMenuItem: { item, isFullMatch: !isPartialMatch } });
1616
+ },
1617
+ executeCommand(item) {
1618
+ if (item.path) {
1619
+ workflow.execute('navigate', { type: 'router', options: { path: item.path } });
1620
+ patchState(store, { selectedMenuItem: { item, isFullMatch: true } });
1569
1621
  }
1570
- // Recursively search in nested groups
1571
- const nestedResult = this.searchRecursive(group.groups, groupName, currentBreadcrumb);
1572
- if (nestedResult.breadcrumb.length > 0) {
1573
- return nestedResult;
1622
+ if (item.command) {
1623
+ const command = item.command;
1624
+ workflow.execute(command.name, command.options);
1625
+ }
1626
+ },
1627
+ isItemOpen(item) {
1628
+ const selectedItem = store.selectedMenuItem();
1629
+ if (!selectedItem) {
1630
+ return false;
1574
1631
  }
1632
+ const findParent = (currentItem, targetItem) => {
1633
+ if (currentItem.children?.includes(targetItem)) {
1634
+ return true;
1635
+ }
1636
+ return currentItem.children?.some(child => findParent(child, targetItem)) ?? false;
1637
+ };
1638
+ return item === selectedItem?.item || findParent(item, selectedItem.item);
1575
1639
  }
1576
- // If no matching group is found
1577
- return {
1578
- breadcrumb: [],
1579
- groups: [],
1580
- sections: []
1581
- };
1640
+ };
1641
+ }), withHooks((store, menuProviderService = inject(AXPMenuProviderService)) => ({
1642
+ onInit() {
1643
+ (async () => {
1644
+ const items = await menuProviderService.items();
1645
+ patchState(store, { items: items });
1646
+ })();
1647
+ },
1648
+ onDestroy() {
1649
+ },
1650
+ })));
1651
+
1652
+ class AXPMenuSearchDefinitionProvider {
1653
+ async provide(context) {
1654
+ context.addDefinition('menu', 'Menu', 'menu', 'fa-thin fa-bars', 2, {
1655
+ format: {
1656
+ id: '{{data.name}}',
1657
+ },
1658
+ actions: [
1659
+ {
1660
+ name: 'navigate',
1661
+ type: 'view',
1662
+ priority: 'primary',
1663
+ },
1664
+ ],
1665
+ });
1582
1666
  }
1583
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1584
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, providedIn: 'root' }); }
1585
1667
  }
1586
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
1587
- type: Injectable,
1588
- args: [{ providedIn: 'root' }]
1589
- }] });
1590
- class AXPSettingDefaultValueProvider {
1668
+
1669
+ class AXPMenuSearchProvider {
1591
1670
  constructor() {
1592
- this.definitionProvider = inject(AXPSettingDefinitionProviderService);
1671
+ this.menuService = inject(AXPMenuProviderService);
1672
+ this.translateService = inject(AXTranslationService);
1593
1673
  }
1594
- get scope() {
1595
- return AXPPlatformScope.Global;
1674
+ async search(text) {
1675
+ const menuItems = await this.searchMenuItems(await this.menuService.items(), text);
1676
+ return sortBy(menuItems.map((item) => ({
1677
+ group: 'menu', // Use `name` or empty string if undefined
1678
+ title: item.text, // Use `text` for the `title`
1679
+ icon: item.icon, // Include the `icon` if present
1680
+ data: omit(item, ['parent', 'children']), // Include all data except `parent` and `children`
1681
+ command: item.path ? {
1682
+ name: 'navigate',
1683
+ options: {
1684
+ type: 'router',
1685
+ options: {
1686
+ path: item.path,
1687
+ },
1688
+ }
1689
+ } : item.command,
1690
+ parent: item.parent
1691
+ ? {
1692
+ title: item.parent.text,
1693
+ }
1694
+ : undefined,
1695
+ })), [(o) => this.translateService.translateSync(o.title)]);
1596
1696
  }
1597
- async load() {
1598
- return Object.entries(await this.definitionProvider.defaultValues()).map(c => ({ key: c[0], value: c[1] }));
1697
+ /**
1698
+ * Recursively searches AXPMenuItem and its children for a matching text.
1699
+ *
1700
+ * @param menuItems - The array of AXPMenuItem to search in.
1701
+ * @param searchText - The text to search for (case-insensitive).
1702
+ * @returns An array of AXPMenuItem that match the search text.
1703
+ */
1704
+ async searchMenuItems(menuItems, searchText) {
1705
+ const result = [];
1706
+ for (const item of menuItems) {
1707
+ // Check if the current item's text matches the search text
1708
+ if (item.type != 'group' &&
1709
+ (item.children?.length ?? 0) == 0 &&
1710
+ (await this.translateService.translateAsync(item.text)).toLowerCase().includes(searchText.toLowerCase())) {
1711
+ result.push(item);
1712
+ }
1713
+ // Recursively search in children if they exist
1714
+ if (item.children && item.children.length > 0) {
1715
+ const childResults = await this.searchMenuItems(item.children, searchText);
1716
+ result.push(...childResults.map((x) => ({ ...x, parent: item })));
1717
+ }
1718
+ }
1719
+ return result;
1599
1720
  }
1600
- set(key, value) {
1601
- throw new Error('Method not implemented.');
1721
+ }
1722
+
1723
+ class AXPMenuBadgeHelper {
1724
+ static { this.cache = new WeakMap(); }
1725
+ static getTotalCount(item, badgeService) {
1726
+ if (this.cache.has(item))
1727
+ return this.cache.get(item);
1728
+ const own = item.badgeKey ? badgeService.getCount(item.badgeKey) : () => 0;
1729
+ const children = item.children?.map(child => this.getTotalCount(child, badgeService)) ?? [];
1730
+ const total = computed(() => own() + children.reduce((sum, s) => sum + s(), 0));
1731
+ this.cache.set(item, total);
1732
+ return total;
1602
1733
  }
1603
1734
  }
1604
1735
 
1605
- const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
1606
- providedIn: 'root',
1607
- factory: () => {
1608
- return [
1609
- new AXPSettingValueProviderDefault(AXPPlatformScope.Tenant),
1610
- new AXPSettingValueProviderDefault(AXPPlatformScope.User)
1611
- ];
1736
+ class AXPFooterTextSlotComponent {
1737
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFooterTextSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1738
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPFooterTextSlotComponent, isStandalone: true, selector: "ng-component", inputs: { text: "text" }, ngImport: i0, template: `
1739
+ <small class="ax-text-sm" [innerHTML]="text"></small>
1740
+ `, isInline: true }); }
1741
+ }
1742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPFooterTextSlotComponent, decorators: [{
1743
+ type: Component,
1744
+ args: [{
1745
+ template: `
1746
+ <small class="ax-text-sm" [innerHTML]="text"></small>
1747
+ `,
1748
+ standalone: true
1749
+ }]
1750
+ }], propDecorators: { text: [{
1751
+ type: Input
1752
+ }] } });
1753
+
1754
+ class AXPNavBarSlotComponent {
1755
+ handleCommand(action) {
1756
+ // if (action)
1757
+ // this.store.dispatch(action)
1612
1758
  }
1613
- });
1614
- class AXPSettingValueProviderDefault {
1615
- get scope() {
1616
- return this._scope;
1759
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPNavBarSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1760
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPNavBarSlotComponent, isStandalone: true, selector: "ng-component", inputs: { items: "items" }, ngImport: i0, template: `
1761
+ <div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
1762
+ <a *ngFor="let link of items" (click)="handleCommand(link.command)" >{{ link.text }}</a>
1763
+ </div>
1764
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], encapsulation: i0.ViewEncapsulation.None }); }
1765
+ }
1766
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPNavBarSlotComponent, decorators: [{
1767
+ type: Component,
1768
+ args: [{
1769
+ template: `
1770
+ <div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
1771
+ <a *ngFor="let link of items" (click)="handleCommand(link.command)" >{{ link.text }}</a>
1772
+ </div>
1773
+ `,
1774
+ imports: [CommonModule],
1775
+ encapsulation: ViewEncapsulation.None
1776
+ }]
1777
+ }], propDecorators: { items: [{
1778
+ type: Input
1779
+ }] } });
1780
+
1781
+ class AXPSearchDefinitionProviderContext {
1782
+ constructor() {
1783
+ this.definitions = [];
1784
+ this.definitionMap = new Map();
1617
1785
  }
1618
- constructor(_scope) {
1619
- this._scope = _scope;
1620
- this.cache = new Map();
1621
- this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.scope})`;
1786
+ addDefinition(name, title, group, icon, order, options) {
1787
+ const definitionSearch = {
1788
+ name,
1789
+ title,
1790
+ group,
1791
+ icon,
1792
+ order,
1793
+ format: {
1794
+ title: options?.format?.title ?? '{{ title }}',
1795
+ description: options?.format?.description ?? undefined,
1796
+ icon: options?.format?.icon ?? undefined,
1797
+ id: options?.format?.id ?? '{{ id }}',
1798
+ },
1799
+ actions: options?.actions ?? [],
1800
+ };
1801
+ this.definitions.push(definitionSearch);
1802
+ this.definitionMap.set(name, definitionSearch); // Index by name
1803
+ return new AXPSearchDefinitionBuilder(this, definitionSearch);
1622
1804
  }
1623
- async load() {
1624
- // Load settings from localStorage as a single key
1625
- const storedSettings = localStorage.getItem(this.localStorageKey);
1626
- if (storedSettings) {
1627
- const parsedSettings = JSON.parse(storedSettings);
1628
- Object.entries(parsedSettings).forEach(([key, value]) => {
1629
- this.cache.set(key, value);
1630
- });
1631
- return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
1632
- }
1633
- return Promise.resolve([]);
1805
+ getDefinitions() {
1806
+ return this.definitions;
1634
1807
  }
1635
- async set(keyOrValues, value) {
1636
- if (typeof keyOrValues === 'string') {
1637
- // Single value update
1638
- this.cache.set(keyOrValues, value);
1639
- }
1640
- else {
1641
- // Bulk update
1642
- for (const [key, val] of Object.entries(keyOrValues)) {
1643
- this.cache.set(key, val);
1644
- }
1645
- }
1646
- await this.saveToLocalStorage();
1808
+ // Expose groupMap for controlled access
1809
+ hasEntity(name) {
1810
+ return this.definitionMap.has(name);
1647
1811
  }
1648
- async saveToLocalStorage() {
1649
- const settingsObject = {};
1650
- this.cache.forEach((value, key) => {
1651
- settingsObject[key] = value;
1652
- });
1653
- localStorage.setItem(this.localStorageKey, JSON.stringify(settingsObject));
1812
+ getDefinition(name) {
1813
+ return this.definitionMap.get(name);
1654
1814
  }
1655
1815
  }
1656
-
1657
- class AXPSettingService {
1658
- constructor() {
1659
- this.providers = inject(AXP_SETTING_VALUE_PROVIDER);
1660
- //private readonly definitionService = inject(AXPSettingDefinitionProviderService);
1661
- this.injector = inject(Injector);
1662
- this.eventService = inject(AXPBroadcastEventService);
1663
- this.scopedSettingsCache = new Map();
1664
- this.onChanged = new Subject();
1665
- // Initialize scoped caches for dynamic scopes
1666
- const staticScopes = [
1667
- AXPPlatformScope.Environment,
1668
- AXPPlatformScope.Global,
1669
- AXPPlatformScope.Tenant,
1670
- AXPPlatformScope.User,
1671
- ];
1672
- staticScopes.forEach((scope) => {
1673
- if (!this.scopedSettingsCache.has(scope)) {
1674
- this.scopedSettingsCache.set(scope, new Map());
1675
- }
1676
- });
1677
- // Listen for setting changes from other tabs
1678
- this.eventService.listen('AXPSettingChangedEvent').subscribe((event) => {
1679
- const data = event.data;
1680
- data.keys.forEach((key) => {
1681
- this.scopedSettingsCache.get(data.scope)?.set(key, data.values[key]);
1682
- });
1683
- this.onChanged.next(data); // Notify subscribers in the current tab
1684
- });
1816
+ class AXPSearchDefinitionBuilder {
1817
+ constructor(context, definition) {
1818
+ this.context = context;
1819
+ this.definition = definition;
1820
+ }
1821
+ addAction(name) {
1822
+ const newAction = {
1823
+ name,
1824
+ type: 'view',
1825
+ priority: 'primary',
1826
+ };
1827
+ this.definition.actions.push(newAction);
1828
+ return new AXPSearchDefinitionActionBuilder(this);
1829
+ }
1830
+ action(name) {
1831
+ const foundAction = this.definition.actions.find((action) => action.name === name);
1832
+ if (!foundAction) {
1833
+ throw new Error(`action with name "${name}" not found in entity "${this.definition.name}".`);
1834
+ }
1835
+ return new AXPSearchDefinitionActionBuilder(this);
1836
+ }
1837
+ endEntity() {
1838
+ return this.context;
1839
+ }
1840
+ }
1841
+ class AXPSearchDefinitionActionBuilder {
1842
+ constructor(entityBuilder) {
1843
+ this.entityBuilder = entityBuilder;
1844
+ }
1845
+ endAction() {
1846
+ return this.entityBuilder;
1847
+ }
1848
+ }
1849
+
1850
+ // Injection token for setting providers
1851
+ const AXP_SEARCH_DEFINITION_PROVIDER = new InjectionToken('AXP_SEARCH_DEFINITION_PROVIDER');
1852
+ class AXPSearchDefinitionProviderService {
1853
+ constructor() {
1854
+ this.providers = inject(AXP_SEARCH_DEFINITION_PROVIDER, { optional: true });
1855
+ this.cache = null;
1685
1856
  }
1686
1857
  async load() {
1687
- try {
1688
- const settingsList = [];
1858
+ if (this.cache) {
1859
+ return;
1860
+ }
1861
+ const context = new AXPSearchDefinitionProviderContext();
1862
+ if (Array.isArray(this.providers)) {
1689
1863
  for (const provider of this.providers) {
1690
- const scopeCache = this.scopedSettingsCache.get(provider.scope);
1691
- const providerSettings = await provider.load();
1692
- providerSettings.forEach((setting) => {
1693
- scopeCache.set(setting.key, setting.value);
1694
- });
1695
- settingsList.push(...providerSettings);
1864
+ await provider.provide(context);
1696
1865
  }
1697
- return settingsList;
1698
- }
1699
- catch (error) {
1700
- console.error('Error loading settings', error);
1701
- throw error;
1702
1866
  }
1867
+ this.cache = context.getDefinitions();
1703
1868
  }
1704
- async get(key) {
1705
- if (this.scopedSettingsCache.size === 0) {
1706
- await this.load();
1707
- }
1708
- const scopeOrder = [
1709
- AXPPlatformScope.User,
1710
- AXPPlatformScope.Tenant,
1711
- AXPPlatformScope.Global,
1712
- AXPPlatformScope.Environment,
1713
- ];
1714
- for (const scope of scopeOrder) {
1715
- const scopeCache = this.scopedSettingsCache.get(scope);
1716
- if (scopeCache && scopeCache.has(key)) {
1717
- const value = scopeCache.get(key);
1718
- if (value !== undefined && value !== null) {
1719
- return cloneDeep(value);
1720
- }
1721
- }
1722
- }
1723
- const definitionService = this.injector.get(AXPSettingDefinitionProviderService);
1724
- const defaults = await definitionService.defaultValues();
1725
- return get(defaults, key); // Fallback if no value is found
1869
+ async getListAsync() {
1870
+ await this.load();
1871
+ return this.getList();
1726
1872
  }
1727
- async defaultValues(scope) {
1728
- let scopeOrder = [
1729
- AXPPlatformScope.Environment,
1730
- AXPPlatformScope.Global,
1731
- AXPPlatformScope.Tenant,
1732
- AXPPlatformScope.User,
1733
- ].reverse();
1734
- const scopeIndex = scopeOrder.indexOf(scope);
1735
- if (scopeIndex === -1) {
1736
- throw new Error(`Invalid scope: ${scope}`);
1873
+ getList() {
1874
+ if (!this.cache) {
1875
+ return [];
1737
1876
  }
1738
- scopeOrder = scopeOrder.slice(scopeIndex + 1);
1739
- // Accumulate defaults from the current scope and higher scopes
1740
- const accumulatedDefaults = {};
1741
- for (let i = scopeIndex; i < scopeOrder.length; i++) {
1742
- const currentScope = scopeOrder[i];
1743
- const scopeCache = this.scopedSettingsCache.get(currentScope);
1744
- if (scopeCache) {
1745
- scopeCache.forEach((value, key) => {
1746
- if (!(key in accumulatedDefaults)) {
1747
- accumulatedDefaults[key] = value;
1748
- }
1749
- });
1750
- }
1877
+ else {
1878
+ return this.cache;
1751
1879
  }
1752
- // Merge with global default values from the definition service
1753
- const definitionService = this.injector.get(AXPSettingDefinitionProviderService);
1754
- const globalDefaults = await definitionService.defaultValues();
1755
- return { ...globalDefaults, ...accumulatedDefaults };
1756
1880
  }
1757
- scope(scope) {
1758
- const provider = this.providers.find((p) => p.scope === scope);
1759
- if (!provider) {
1760
- throw new Error(`No provider found for scope: ${scope}`);
1881
+ findDefinition(definitionName) {
1882
+ const definition = this.getList().find((definition) => definition.name === definitionName);
1883
+ if (!definition) {
1884
+ throw new Error(`Definition with name ${definitionName} not found`);
1761
1885
  }
1762
- return new ScopedSettingService(this, provider, this.scopedSettingsCache.get(scope));
1886
+ return definition;
1763
1887
  }
1764
- invokeChangeEvent(event) {
1765
- this.onChanged.next(event);
1766
- this.eventService.publish("AXPSettingChangedEvent", event);
1888
+ findDefinitionByGroup(definitionGroup) {
1889
+ const definition = this.getList().find((definition) => definition.group === definitionGroup);
1890
+ if (!definition) {
1891
+ throw new Error(`Definition with group ${definitionGroup} not found`);
1892
+ }
1893
+ return definition;
1767
1894
  }
1768
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1769
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingService, providedIn: 'root' }); }
1895
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1896
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, providedIn: 'root' }); }
1770
1897
  }
1771
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingService, decorators: [{
1898
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, decorators: [{
1772
1899
  type: Injectable,
1773
- args: [{
1774
- providedIn: 'root',
1775
- }]
1776
- }], ctorParameters: () => [] });
1777
- class ScopedSettingService {
1778
- constructor(parent, provider, scopeCache) {
1779
- this.parent = parent;
1780
- this.provider = provider;
1781
- this.scopeCache = scopeCache;
1782
- }
1783
- async get(key) {
1784
- const settings = await this.provider.load();
1785
- const setting = settings.find((s) => s.key === key);
1786
- return setting ? cloneDeep(setting.value) : undefined;
1787
- }
1788
- async all() {
1789
- const settings = await this.provider.load();
1790
- return Object.fromEntries(settings.map((s) => [s.key, cloneDeep(s.value)]));
1900
+ args: [{ providedIn: 'root' }]
1901
+ }] });
1902
+
1903
+ class AXPSearchCommandProvider {
1904
+ async search(text) {
1905
+ return this.commands.filter((command) => command.title.toLowerCase().includes(text.toLowerCase()));
1791
1906
  }
1792
- async defaultValues() {
1793
- return this.parent.defaultValues(this.provider.scope);
1907
+ }
1908
+
1909
+ // Injection token for setting providers
1910
+ const AXP_SEARCH_PROVIDER = new InjectionToken('AXP_SEARCH_PROVIDER');
1911
+ class AXPSearchService {
1912
+ constructor() {
1913
+ this.providers = inject(AXP_SEARCH_PROVIDER, { optional: true });
1914
+ this.definitionService = inject(AXPSearchDefinitionProviderService);
1915
+ this.formatService = inject(AXFormatService);
1794
1916
  }
1795
- async set(keyOrValues, value) {
1796
- if (typeof keyOrValues === 'string') {
1797
- // Single key-value pair
1798
- await this.provider.set(keyOrValues, value);
1799
- this.scopeCache.set(keyOrValues, value); // Sync the cache
1800
- this.parent.invokeChangeEvent({
1801
- scope: this.provider.scope,
1802
- keys: [keyOrValues],
1803
- values: { [keyOrValues]: value },
1804
- entries: [{ key: keyOrValues, value }],
1805
- });
1917
+ async search(text) {
1918
+ //TODO better handle this
1919
+ if (this.definitionService.getList().length == 0) {
1920
+ await this.definitionService.getListAsync();
1806
1921
  }
1807
- else {
1808
- // Multiple key-value pairs
1809
- await this.provider.set(keyOrValues);
1810
- Object.entries(keyOrValues).forEach(([key, val]) => this.scopeCache.set(key, val)); // Sync the cache
1811
- const entries = Object.entries(keyOrValues).map(([key, val]) => ({ key, value: val }));
1812
- this.parent.invokeChangeEvent({
1813
- scope: this.provider.scope,
1814
- keys: Object.keys(keyOrValues),
1815
- values: keyOrValues,
1816
- entries,
1817
- });
1922
+ if (!this.providers || (this.providers?.length || 0) === 0) {
1923
+ throw new Error('No search providers available'); // No providers available
1818
1924
  }
1925
+ const mergeData = [];
1926
+ const promises = this.providers.map((provider) => provider.search(text));
1927
+ const results = await Promise.all(promises);
1928
+ for (const resultArray of results) {
1929
+ for (const result of resultArray) {
1930
+ try {
1931
+ const definition = this.definitionService.findDefinition(result.group);
1932
+ mergeData.push({
1933
+ definitionName: definition.group,
1934
+ definitionTitle: definition.title,
1935
+ name: result.group,
1936
+ id: `${definition.name}:${this.formatService.format(definition.format.id, 'string', result)}`,
1937
+ title: result.title ??
1938
+ (definition.format.title
1939
+ ? this.formatService.format(definition.format.title, 'string', result.data)
1940
+ : 'Unknown'),
1941
+ description: result.description ??
1942
+ (definition.format.description
1943
+ ? this.formatService.format(definition.format.description, 'string', result.data)
1944
+ : undefined),
1945
+ icon: result.icon ??
1946
+ (result.icon
1947
+ ? this.formatService.format(definition.format.icon, 'string', result.data)
1948
+ : definition.icon),
1949
+ data: result.data,
1950
+ command: result.command,
1951
+ actions: definition.actions,
1952
+ parent: result.parent,
1953
+ order: definition.order,
1954
+ });
1955
+ }
1956
+ catch (e) {
1957
+ console.error(e);
1958
+ }
1959
+ }
1960
+ }
1961
+ // Group data
1962
+ const groupedData = [];
1963
+ const groupMap = {};
1964
+ // Create groups
1965
+ for (const item of mergeData) {
1966
+ const groupName = item.definitionName; // Change this to the property you want to group by
1967
+ if (!groupMap[groupName]) {
1968
+ groupMap[groupName] = {
1969
+ name: groupName,
1970
+ title: item.definitionTitle, // You can adjust the title logic if needed
1971
+ order: item.order, // Add order to the group
1972
+ children: [],
1973
+ };
1974
+ groupedData.push(groupMap[groupName]);
1975
+ }
1976
+ groupMap[groupName].children.push(omit(item, ['definitionName', 'definitionTitle', 'order']));
1977
+ }
1978
+ // Sort groups by order
1979
+ groupedData.sort((a, b) => a.order - b.order);
1980
+ return groupedData;
1819
1981
  }
1820
- async update(key, updateFn) {
1821
- const currentValue = await this.get(key);
1822
- const newValue = updateFn(currentValue);
1823
- await this.set(key, newValue);
1824
- }
1982
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1983
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, providedIn: 'root' }); }
1825
1984
  }
1985
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, decorators: [{
1986
+ type: Injectable,
1987
+ args: [{ providedIn: 'root' }]
1988
+ }] });
1826
1989
 
1827
1990
  //TODO Loading, Redirect, Drawer, Show toast
1828
1991
  const AXPRedirectEvent = createWorkFlowEvent('Redirect Event Fired');
@@ -1904,7 +2067,7 @@ class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
1904
2067
  async execute(context) {
1905
2068
  const command = context.getVariable();
1906
2069
  const path = command.options.path;
1907
- if (path.toLowerCase().startsWith('http') || command.options?.extras?.target === 'blank') {
2070
+ if (path?.toLowerCase()?.startsWith('http') || command.options?.extras?.target === 'blank') {
1908
2071
  window.open(path, '_blank');
1909
2072
  }
1910
2073
  else {
@@ -1926,7 +2089,7 @@ class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
1926
2089
  return undefined;
1927
2090
  return queryString
1928
2091
  .split('&')
1929
- .map(pair => pair.split('='))
2092
+ .map((pair) => pair.split('='))
1930
2093
  .reduce((params, [key, value]) => {
1931
2094
  params[decodeURIComponent(key)] = decodeURIComponent(value);
1932
2095
  return params;
@@ -1941,7 +2104,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
1941
2104
  const AXPNavigateWorkflow = {
1942
2105
  startStepId: 'start',
1943
2106
  steps: {
1944
- 'start': {
2107
+ start: {
1945
2108
  action: 'navigate-router',
1946
2109
  },
1947
2110
  },
@@ -2133,7 +2296,7 @@ const AXPPlatformDefaultConfigs = {
2133
2296
  },
2134
2297
  network: {
2135
2298
  timeOut: 5000,
2136
- }
2299
+ },
2137
2300
  };
2138
2301
  function configPlatform(config = AXPPlatformDefaultConfigs) {
2139
2302
  return merge(AXPPlatformDefaultConfigs, config);
@@ -2645,5 +2808,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2645
2808
  * Generated bundle index. Do not edit.
2646
2809
  */
2647
2810
 
2648
- export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPAppStartUpProvider, AXPAppStartUpService, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPComponentLogoConfig, AXPComponentSlotDirective, AXPComponentSlotLoaderService, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataGenerator, AXPDataProvider, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFiltersProviderService, AXPFontIconLogoConfig, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGridLayoutDirective, AXPImageUrlLogoConfig, AXPLogoComponent, AXPMenuBadgeHelper, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRegionalService, AXPRelationshipCardinality, AXPRelationshipKind, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValueProvider, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingService, AXPStickyDirective, AXPTaskBadgeProvider, AXPTaskBadgeService, AXPTextLogoConfig, AXPToastAction, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, AXP_TASK_BADGE_PROVIDERS, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, createAllQueryView, createQueryView, getEntityInfo, resolveActionLook };
2811
+ export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPAppStartUpProvider, AXPAppStartUpService, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPComponentSlotDirective, AXPComponentSlotLoaderService, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataGenerator, AXPDataProvider, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFiltersProviderService, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGridLayoutDirective, AXPHomePageModule, AXPHomePageService, AXPLogoComponent, AXPMenuBadgeHelper, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRegionalService, AXPRelationshipCardinality, AXPRelationshipKind, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValueProvider, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingService, AXPStickyDirective, AXPTaskBadgeProvider, AXPTaskBadgeService, AXPToastAction, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_HOME_PAGES, AXP_HOME_PAGE_DEFAULT_KEY, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, AXP_TASK_BADGE_PROVIDERS, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, createAllQueryView, createQueryView, getEntityInfo, provideDynamicHomePage, resolveActionLook };
2649
2812
  //# sourceMappingURL=acorex-platform-common.mjs.map